Skip to content

[pull] main from pnpm:main - #347

Merged
pull[bot] merged 4 commits into
dwongdev:mainfrom
pnpm:main
Jun 22, 2026
Merged

pull[bot] merged 4 commits into
dwongdev:mainfrom
pnpm:main

Conversation

@pull

@pull pull Bot commented Jun 22, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

zkochan and others added 4 commits June 22, 2026 10:56
Load the local OSV index for the pnpr registry surface when osv is enabled, not just for the resolver surface.

Registry responses now apply the index at serve time. Full and abbreviated packuments, version manifests, and dist-tag responses omit vulnerable versions without mutating cached upstream bytes. Direct version-manifest requests for filtered versions return 404, and dist-tags pointing at filtered versions are removed from served responses.

Tarball requests parse the version from the validated npm tarball filename and return 403 for vulnerable versions after the normal access policy check, before reading from cache or fetching upstream. This keeps private package metadata behind the existing auth boundary.

The tests cover proxied and cached packuments, direct version manifests, dist-tags, tarballs before upstream fetch, tarballs from cache, registry-only OSV loading, and private-package access ordering.

Closes #12561.
Implements the `cat-index` command for the Rust pacquet CLI. It mirrors the exact behavior of pnpm's `cat-index`.

---------

Co-authored-by: Zoltan Kochan <[email protected]>
Some registries generate tarballs on demand and cannot list an integrity in
their packument. pnpm then wrote integrity-less lockfile entries on the first
install and failed the next one with ERR_PNPM_MISSING_TARBALL_INTEGRITY, unable
to install from its own lockfile.

Compute the missing integrity from the downloaded bytes and write it into the
resolution before the lockfile is built:

- Add an optional `resolutionNeedsFetch` contract to the fetcher API (backward
  compatible, since custom fetchers come from hooks). The remote-tarball fetcher
  reports it when a resolution lacks integrity; the picked fetcher's signal flows
  through PackageResponse -> ResolvedPackage so nothing re-derives it.
- The package requester downloads such tarballs (including under --lockfile-only /
  skipFetch / not-installable) and fills the computed integrity onto the resolution
  via the already-running `fetching` promise, so dependency resolution isn't
  blocked. The deps-resolver awaits only the flagged entries before updateLockfile,
  because the integrity feeds the global virtual-store paths.
- Move read-side enforcement into the npm resolver's lockfile verifier
  (MISSING_TARBALL_INTEGRITY): reject a registry/http(s) tarball entry whose
  integrity is missing/empty/non-string, fail-closed, before the URL-keyed and
  semver short-circuits. Drop the earlier read-side auto-heal (a missing-field
  bypass). Harden against tampered lockfiles (non-string tarball/integrity).
- Reuse the fetcher picked during resolution on the fetch path instead of running
  pickFetcher (and a custom fetcher's async canFetch) twice per package.

Mirrored in pacquet: PrefetchingResolver computes the integrity for integrity-less
tarball resolutions during resolution (FetchTarballForResolution::run), deduped per
URL with a singleflight cache.

Closes #12145.

---------

Co-authored-by: Zoltan Kochan <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Jun 22, 2026
@pull pull Bot added the ⤵️ pull label Jun 22, 2026
@pull
pull Bot merged commit 886fe57 into dwongdev:main Jun 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants