Repository navigation
[pull] main from pnpm:main - #349
Merged
Merged
Conversation
The proxied-tarball integrity fix (#12570, GHSA-5f9g-98vq-2jxw) started reconstructing each rewritten dist.tarball filename from its version key (`<name>-<version>.tgz`). That assumes upstream tarball names are always canonical, which breaks packages like esprima-fb whose real npm tarball is `esprima-fb-3001.0001.0000-dev-harmony-fb.tgz` for version `3001.1.0-dev-harmony-fb`: the rewritten URL no longer matched what npm hosts, so the client recorded the wrong lockfile URL and the proxied fetch 404'd. Preserve the upstream basename verbatim in the rewrite again, and resolve a tarball request's version and dist.integrity by matching the requested filename against each version's dist.tarball basename instead of parsing the version out of the filename. OSV screening re-runs against the resolved version when it differs from the filename-derived one. The GHSA protection is unchanged: served bytes are still verified against the SRI declared by the version that owns that tarball name, so a preserved name cannot smuggle in bytes of another provenance. Tests that encoded the canonical-reconstruction behavior are updated to assert basename preservation, with new coverage for non-canonical names. Also fix a pre-existing compile break in the pnpr server test target: UserStore::in_memory gained a MaxUsers argument (#12581) but one test call site was not updated.
#12572) Port pnpm's build-policy commands to the Rust CLI: `ignored-builds`, `approve-builds`, and the `rebuild` flow they build on. The rebuild flow reuses the frozen-install pipeline: a `RebuildOptions` selection threads from `Install::run_rebuild` through `InstallFrozenLockfile` and `run_build_phase` into `BuildModules`, where selected packages bypass the `is_built` side-effects gate and the "up to date" short-circuit is skipped. The allow-build policy is still honored, matching `pnpm rebuild`. `approve-builds` re-loads config after writing settings so the rebuild's policy reflects the new `allowBuilds`; the frozen path then rewrites `.modules.yaml` to pnpm's exact end state (decided entries removed, undecided kept). Adds a boolean-aware `set_allow_builds` writer to `workspace-manifest-writer` and an `allow_build_key_from_ignored_build` helper (port of `@pnpm/building.policy` key derivation). Tested with unit tests for the helper and writer plus mocked-registry integration tests covering listing, approve, deny, and rebuild. Pacquet-side port of existing TypeScript commands; no changeset needed.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 : )