Skip to content

Populate Version.Integrity for pub, julia and nuget#23

Merged
andrew merged 1 commit into
mainfrom
integrity-pub-julia-nuget
May 10, 2026
Merged

Populate Version.Integrity for pub, julia and nuget#23
andrew merged 1 commit into
mainfrom
integrity-pub-julia-nuget

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented May 9, 2026

Wires up Version.Integrity for three more ecosystems where the registry already gives us a hash.

  • pub: archive_sha256 from the package response, formatted as sha256-<hex>
  • julia: git-tree-sha1 from Versions.toml (already parsed into metadata), formatted as sha1-<hex>
  • nuget: packageHash + packageHashAlgorithm from 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.

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.
@andrew andrew merged commit 4e20b50 into main May 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant