librariesio / libraries.io

:books: The Open Source Discovery Service
https://libraries.io
GNU Affero General Public License v3.0
1.1k stars 206 forks source link

Adds builder classes for mapping() and versions() methods. #3397

Closed tiegz closed 4 weeks ago

tiegz commented 1 month ago

The sub-classes of PackageManager::Base must define mapping() and versions() class methods, which return Hashes of data we need to update the project/versions in PackageManager::Base.update().

these two changes should help standardize those two methods:

with these two classes, passing unknown or accidental keys back will raise an error, and we'll have a documented way of returning this data so it's obvious and clear.