Skip to content

[pull] main from pnpm:main - #357

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

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

Conversation

@pull

@pull pull Bot commented Jun 25, 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 6 commits June 25, 2026 09:41
pnpr no longer accepts HTTP Basic (`_auth`) on requests, so test helpers
that authenticated with Basic credentials started returning 401 once CI
ran against a bearer-only pnpr build.

Switch the registry-mock `addDistTag` helper and the
publish/deprecate/dist-tag/unpublish suites to the bearer token that the
with-registry globalSetup already mints (`REGISTRY_MOCK_TOKEN`), exposed
through a new `getRegistryMockToken()` helper.

The two install/auth.ts tests that cover pnpm's own Basic `_auth` client
support now run against a small local registry proxy that enforces Basic
auth and forwards to pnpr with a bearer token, so that coverage is kept.
The MAX_BUNDLE_DEPTH belt-and-braces guard in collect_bundled_files
(added in #12620) had no coverage: the existing closure tests
all terminate through the visited-set, never the depth counter, leaving
packlist.rs lines 143-150 uncovered in the CodeCov report.

Add a test that builds a linear `dependencies` chain longer than the cap,
with every package resolving to a fresh canonical path so the visited-set
can't short-circuit the walk. It asserts packages created past depth 32
are refused while everything within the cap still ships, exercising the
warn-and-continue branch.
* feat(pacquet): port audit command

* fix(pacquet): redact audit registry credentials

* fix(pacquet): ignore blank audit GHSA entries

* fix(pacquet): match prerelease audit ranges

* test(pacquet): port audit coverage

* fix(pacquet): keep ignored audit errors off stdout
…#12646)

* fix(pnpr): reject re-publishing an existing version with 409 Conflict

merge_objects unconditionally overwrote an existing versions[v] entry, and stage_publish wrote
the new tarball over the old one, so a Publish-permissioned user could re-publish name@version
with backdoored bytes and a new dist.integrity. Clients with the old hash in their lockfile then
hit EINTEGRITY; clients without a lockfile silently fetched the replaced bytes. npm and verdaccio
treat published versions as immutable and answer a re-publish with 409.

stage_publish now reads the hosted packument once and rejects the publish with the new
VersionAlreadyPublished error (HTTP 409) when any incoming version is already hosted, before any
tarball is written. The check looks only at the locally hosted packument, not the upstream-seeded
merge, so a version that exists only upstream can still be published locally for the first time.
The attachment version is threaded through ValidatedPublish via a named PreparedAttachment.

Co-authored-by: Claude <[email protected]>

* fix(pnpr): reject re-publish of every incoming version, not just attachment-backed ones

The 409 guard only iterated attachment-backed versions, but merge_manifest consumes the entire
incoming `versions` map. A client could smuggle a modified entry for an already-hosted version
(e.g. 1.0.0) alongside a real attachment for 1.0.1, slip past the guard, and overwrite the hosted
metadata. Check every version in the incoming body against the hosted packument instead.
PreparedAttachment no longer needs to carry the version. Addresses the review.

Co-authored-by: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
* feat(pacquet-cli): add fetch command

* fix(fetch): add dylint reason, rebase onto latest main, and add integration tests

* test: add edge cases for fetch

* fix: fetch test edge case

* style: cargo fmt

* style: cargo clippy fix

* fix(cli): correct fetch dependency-group filtering and config plumbing

Address review feedback on the fetch command:

- Optional dependencies now follow production, matching pnpm's fetch
  (`optionalDependencies: opts.production !== false`), so `pacquet fetch
  --dev` no longer pulls optional deps.
- Honor `config.trustLockfile` and `config.skipRuntimes` instead of
  hardcoding them off, mirroring `pacquet install` (fetch exposes no CLI
  override for either).
- Set the new `disable_optimistic_repeat_install` Install field
  introduced on main, so fetch compiles after the rebase.

Strengthen the integration tests to prove the contract rather than exit
status: the no-lockfile path asserts a lockfile-specific error, and new
cases verify `--prod` keeps optional/drops dev and `--dev` drops both
production and optional.

Written by an agent (Claude Code, claude-opus-4-8).

---------

Co-authored-by: Zoltan Kochan <[email protected]>
* fix: restore pacquet current lockfile on repeat install

* fix: align pacquet current lockfile checks
@pull pull Bot locked and limited conversation to collaborators Jun 25, 2026
@pull pull Bot added the ⤵️ pull label Jun 25, 2026
@pull
pull Bot merged commit 0d50197 into dwongdev:main Jun 25, 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.

5 participants