Skip to content

[pull] main from pnpm:main - #349

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

pull[bot] merged 2 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 added 2 commits June 22, 2026 23:15
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.
@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 7e1be2f 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.

1 participant