Populate Version.Integrity for pub, julia and nuget#23
Merged
Conversation
pub.dev returns archive_sha256 on each version entry, julia's Versions.toml already gives us git-tree-sha1, and nuget's catalog leaf carries packageHash/packageHashAlgorithm (sha512, base64). The nuget hash is not in the registration index so this fetches the catalog leaf per version, same pattern hex already uses. deno is left out: the apiland /v2/modules endpoint only returns bare version strings with no per-version detail endpoint, so there is no checksum to read without changing data source. Related to ecosyste-ms/packages#1630.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires up
Version.Integrityfor three more ecosystems where the registry already gives us a hash.archive_sha256from the package response, formatted assha256-<hex>git-tree-sha1fromVersions.toml(already parsed into metadata), formatted assha1-<hex>packageHash+packageHashAlgorithmfrom the catalog leaf, formatted as<algo>-<base64>. The registration index doesn't include the hash so this fetches the leaf per version, same as hex already does. Failures are swallowed since integrity is best-effort.Deno was on the list but the apiland
/v2/modules/<name>endpoint we hit only returns bare version strings and there's no per-version endpoint exposing a checksum, so it's skipped.Related to ecosyste-ms/packages#1630.