Repository navigation
[pull] main from pnpm:main - #357
Merged
Merged
Conversation
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
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 : )