Repository navigation
chore: sync upstream and repin Garnet action - #129
Conversation
… does not list (pnpm#17320) An importer that the wanted lockfile does not list falls back to `all_locked_peer_versions`, which walks every snapshot and recovers the peers of every hashed suffix. `LockedPeers::of` ran that walk once per such importer, so N new workspace projects repeated the whole-lockfile scan N times. The result does not depend on the importer, so `WorkspaceTreeCtx` now holds it in a `OnceLock` and every unlisted importer shares the same `Arc`. pnpm v11 already shares this result, through the `UNLISTED_IMPORTER` key in `getLockedPeerVersionsOfImporter`. Closes pnpm#17311 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Zoltan Kochan <z@kochan.io>
…npm#17342) `pnpm audit --ignore` and `pnpm audit --ignore-unfixable` returned exit code 0 right after writing the ignore list, so CI passed even when vulnerabilities that were not ignored remained. Both CLIs now remove every GHSA in the merged ignore list (the configured ignores plus the new ones) from the report and apply the same audit-level check a plain `pnpm audit` uses. The printed message is unchanged. v11: the threshold filter is extracted into filterAdvisoriesByAuditLevel and shared by the report and ignore paths. v12: ignore_vulnerabilities returns the merged list it wrote, and filter_ignored_advisories delegates to a new remove_advisories_by_ghsa. Part of pnpm/tasks#191
…ce (pnpm#17341) get-pnpm moves from pnpm/get.pnpm.io into pnpm/npm/get-pnpm, at 0.0.9 (get.pnpm.io be4e983, where its history stays). - The pnpm v12 npm package depends on it with `workspace:*`, so a pnpm release bundles get-pnpm's source as of that release. A wrapper fix no longer needs a get-pnpm release, a catalog bump, and a minimumReleaseAge exclusion first. bundle-node-gyp builds it before the deploy injects its build output. - It is released on its own: a `get-pnpm` product in bump.ts and create-release-pr.yml (off by default), `get-pnpm@<version>` tags, and build-get-pnpm/publish-get-pnpm jobs in release.yml. It is private in the workspace so the TypeScript release's recursive publish skips it; the packed manifest drops the flag. - Its runtime dependencies stay exact, through a `get-pnpm` named catalog. Its lint is the root ESLint config. Its TLS tests use the fixture the Rust network tests use. - The npm-wrapper CI job runs its tests on Node.js 24 and 22, beside the wrapper's. The forwarding proxy in its download tests forwards only to the servers the tests start. npm's registry signing keys were pinned in five places: v11, v12, get-pnpm, and get.pnpm.io's install.sh and install.ps1. Only v11's copy was refreshed, by the release PR, and the two repositories handled a withdrawn key in opposite ways. They now come from .config/npm-signing-keys.json: - .github/scripts/update-npm-signing-keys.mjs refreshes it from npm on every release PR, not only v11 ones. A key npm stops listing stays, marked withdrawn. - The meta-updater renders it into the v11, v12, and get-pnpm copies, so `pnpm lint:meta` fails on a copy edited by hand. pnpm v11 and v12 keep trusting withdrawn keys, so packages signed before a rotation verify. get-pnpm drops them, as get.pnpm.io's installers do. - get.pnpm.io's update script is to read this file.
…ersion> (pnpm#17340) Rewrite served `dist.tarball` URLs on `.tgz` registries to `{public_url}/{pkg}@{version}` for every addressable version (matching tar registries), so `serverType: pnpr` drops canonical tarball URLs from `pnpm-lock.yaml` on both `.tgz` and tar registries while keeping `{public_url}/{pkg}/-/{filename}` served for existing lockfiles and older clients. - Emit `{public_url}/{pkg}@{version}` in `pnpr-upstream` for all addressable versions and normalize `<pkg>@{version}` tarball URLs to `<scopeless-name>-<version>.tgz` in `tarball_basename_for_package` for chained `pnpr` instances. - Accept round-tripped `{public_url}/{pkg}@{version}` URLs in `check_tarball_immutable` during `PUT /:pkg/-rev/:rev` and restore the stored `.tgz` URL on disk. - Route `DELETE /:pkg@:version/-rev/:rev` and `DELETE /@:scope/:pkg@:version/-rev/:rev` to `unpublish_version_tarball` while rejecting reserved `+r<digits>` revision suffixes. - Fall back to the version parsed from a canonical `<name>-<version>.tgz` request in `expected_tarball_dist` so chained `pnpr` proxies resolve non-canonical upstream filenames, and preserve `<name>@<version>` routes in `TarballRouter`. Related to pnpm/tasks#208.
… of --depth (pnpm#17330) The subtree-reuse walk keyed its memo and cycle detection on a depth bucket, so under a finite `--depth` a dependency cycle only closed once the walk had gone round it once per level: `pnpm update --depth=<n>` held a memo entry per node per level and recursed `n` frames deep. On a 1,600-package lockfile `--depth=9999` passed 6 GB before being killed, and `--depth=30000` overflowed the stack. Compute instead, once per update scope, each snapshot node's shortest distance to an update target, by a breadth-first search from the targets over the reversed snapshot graph. A node visited at depth `d` has a target within the ceiling `n` iff `d + k <= n` for its distance `k`, and when that fails for a node it fails for every node below it. The walk checks it before the memo, so the memoised answers are purely structural and need neither a depth nor an importer in their key, and the walk's cost never depends on `--depth`. Fixes pnpm#17329 --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Zoltan Kochan <z@kochan.io>
…chDB suffixes (pnpm#17346) Mount DELETE handlers on /{name}, /@{scope}/{name}, /{name}@{version}, /@{scope}/{name}@{version}, /{name}/-/{filename}, and /@{scope}/{name}/-/{filename} alongside the legacy /-rev/{rev} routes, and accept bare /-/user/{name} on PUT and GET while still stripping the legacy org.couchdb.user: prefix. Related to pnpm/tasks#208. Written by an agent (Antigravity, Gemini 4 Argon).
…m#17351) Mount batch::serve_ecosystem_publish at both /-/pnpr/v0/publish and /npm/-/pnpr/v0/publish, remove the duplicate npm-only serve_batch_publish handler on /-/pnpm/v1/publish, and point pnpm publish --batch at /-/pnpr/v0/publish. Since batch::serve_ecosystem_publish defaults entries without an explicit `ecosystem` field to npm, mounting it on `/npm/-/pnpr/v0/publish` as well as the server root lets `pnpm publish --batch` and cross-ecosystem batch publishes share a single implementation and journaled commit path. Closes pnpm/tasks#208 Written by an agent (Antigravity, Gemini 4 Argon).
…pm#17353) A scoped package was one escaped segment, so `@pnpm-testing/fresh` was stored as `packages/!40pnpm-testing!2ffresh/` and its tarball as `blobs/fresh-1.0.0.tgz`, repeating a name the directory already holds. The hosted store and the proxy cache now place every package two directories below `packages/`: - `@<scope>/<name>/` for a scoped name, `@/<name>/` for any other. No npm scope is empty, so `@` cannot collide with a scope. - A `.tgz`, `.sigstore` or `.crate` blob named `<basename>-<rest>` is stored as `<rest>`, so a tarball is `blobs/1.0.0.tgz`. Such a file that does not start with `<basename>-` (a non-canonical upstream tarball in the proxy cache) is stored with a leading `@`, which `encode_segment` never writes, so the two forms cannot collide. Every other file (OCI digests, PyPI wheels and sdists) keeps its name. - The rule keys on the extension rather than the ecosystem because `pnpr verify` and the image maintenance walk namespaces read from storage, where the ecosystem is not known. - The prefix is not stripped when the rest would be empty or start with `.`, so `foo-..tgz` cannot become a hidden `..tgz` file. Each segment is still `encode_segment`ed, so names that differ only in case stay apart on a case-insensitive filesystem. The mapping lives in `layout.rs` with strict inverses; every backend and listing goes through it, so no caller of the storage API changed. `LAYOUT_VERSION` stays 1: pnpr is experimental, and an existing store is republished rather than converted. `pnpr upgrade-storage` writes the new paths when converting a pre-marker store, and the fixture fingerprint hashes a sample path so cached fixture trees in the old layout are rebuilt.
pnpr serves dist.tarball as <registry>/<name>@<version> on .tgz registries since pnpm#17340. pnpm v12 rebuilds those URLs for a registry declared with `serverType: pnpr`, so it leaves them out of the lockfile. The TypeScript CLI knew only npm and artifactory, so it wrote a host-specific tarball URL for every package installed from pnpr. Teach it the pnpr layout, matching v12: the package name unencoded and the version with its build metadata. getNpmTarballUrl is the single source of the shape, so the lockfile writer, the reader, and the fast override rewrite agree by construction. The e2e tests that assert a lockfile without tarball URLs now declare `serverType: pnpr` for the mock registry, as the v12 tests do. The deps-installer testDefaults and the shared command-handler DEFAULT_OPTS declare `serverType: pnpr` for the mock registry. Config dependencies do not read serverType in either CLI, so the env lockfile tests expect the pnpr URL. pnpm#17351 moved pnpr's batch publish to PUT /-/pnpr/v0/publish, so `pnpm publish --batch` now sends there, as v12 does. The fast lockfile rewrite for override and catalog changes now gets registryOptionsByUrl, so it applies the declared serverType. The registry mock's getIntegrity and hostedBlobPath read pnpr's packages/@<scope>/<name>/ storage layout from pnpm#17353. This is a maintainer-approved exception to the bug-fix-only policy for the TypeScript CLI, for compatibility with pnpr.
…7355) Separate hosted storage namespaces by ecosystem (`default/<ecosystem>/` and `orgs/<org>/<ecosystem>/`) and map package names to path segments per ecosystem: - Hosted registries declared under an `<ecosystem>:` group without an explicit `org:` now default their `org` to their own registry `name` instead of `<ecosystem>~<name>`. - Hosted registries in different ecosystems may share an `org:` without colliding; the collision check in `pnpr-config` compares `(org, ecosystem)`. - `layout::package_segments` and `layout::decode_package_segments` take an `Ecosystem`: npm maps scoped `@<scope>/<name>` to `[@<scope>, <name>]` and unscoped to `[@, <name>]`; Cargo and PyPI map to `[@, <name>]`; OCI maps multi-component `c_1/.../c_k` to `[@<c_1>, ..., @<c_{k-1}>, <c_k>]` and single-component names to `[@, <name>]`. - `pnpr upgrade-storage` converts legacy hosted stores into the per-ecosystem layout and maps nested OCI repositories into multi-segment `@<c_i>` directories. Closes pnpm/tasks#213
…pnpm#17352) A fix flow writes overrides or updates the lockfile but never records ignores, so `--ignore` and `--ignore-unfixable` were silently dropped next to `--fix` (any method) or `--interactive`, which implies `--fix`. Both CLIs now fail with ERR_PNPM_AUDIT_FIX_WITH_IGNORE before loading the lockfile or contacting the registry, naming the flags that were passed. Part of pnpm/tasks#191 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
pnpm#17355 moved pnpr's hosted storage under default/<ecosystem>/, so getIntegrity and hostedBlobPath looked in default/packages/ and every v11 test that calls them failed on main. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…npm#17357) Part of pnpm/tasks#213. - Store `.team-rosters` and `.rule-overrides` records under `<ecosystem>/<local_name>.json` regardless of whether the registry is declared at top level or under an `<ecosystem>:` block in `pnpr.yaml`, and remove the legacy flat-key fallback and `HostedBackend::remove_record_if_current`. - Store package tombstones under `.tombstones/<ecosystem>/<scope>/<name>.json` via `package_segments` instead of flat `!`-escaped filenames. - Normalize upstream names to `<ecosystem>/<local_name>` in `compute_upstream_cache_namespace` so moving an upstream between top-level `registries:` and an `<ecosystem>:` group does not invalidate its cache digest, and use `CanonicalPackageName::ecosystem()` directly in `Store::package_dir` and `S3Store::package_prefix`. - Drop redundant `/v0`, `/v1`, and `pnpr-` prefixes from storage and cache directories (`.tombstones`, `.team-rosters`, `.rule-overrides`, `.scim-users`, `.pipeline-runs`, `.uploads`, `.journal`, `.staging`, `.artifacts`, `shared-artifacts`, `resolver-store`, `resolver-cache`) and migrate legacy keys in `pnpr upgrade-storage`.
The registry mock proxies real npm packages through its npmjs upstream. pnpr's breaker opens after two consecutive upstream failures and stays open for 5m, which outlasts pnpm's fetch retries. One network blip on a Windows runner (an "error sending request" and a 504) tripped it, and the retries of optionalDependencies.ts all got 503 "circuit open", failing TS CI on main (run 40241451781). With maxFails: 0 every retry reaches npmjs again.
…npm#17360) Extend PHILOSOPHY.md, pnpr/AGENTS.md, REVIEW_GUIDE.md, .coderabbit.yaml, and .pr_agent.toml so the repository philosophy applies to pnpr and establishes that pnpr is pre-1.0 on the alpha prerelease lane (experimental per PHILOSOPHY.md), consolidating storage layouts, internal record formats, configuration keys, and CLI flags in place before 1.0 without backward-compatibility fallbacks, aliases, or migration commands between alpha builds. - Remove pnpr upgrade-storage and Command::UpgradeStorage. - Remove legacy .pnpr-journal recovery path and journal manifest serde aliases (packument_file, tarballs). - Remove StoredDerivedTar::Legacy and DerivedTar::scanned in .tar-integrity records. - Remove the redundant /v1 segment from compiler_cache_path. - Remove CLI subcommand and flag aliases (pnpr config-check, --packument-ttl-secs, --no-check-hashes, --min-age-secs, --max-age-secs) and the PNPR_PACKUMENT_TTL_SECS env fallback. - Remove YAML configuration snake_case, *_secs, maxage, and backend.postgresql serde aliases, standardizing on camelCase.
…7362) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
A pnpr resolve request carries the client's registries as declarations keyed by URL. Each declaration held one prefix, so when a project routed two prefixes to one URL (for example through namedRegistries), only the smallest reached the server. A dependency or lockfile entry using the other prefix then failed on a delegated install. The request protocol adds an `aliases` list next to `prefix`. `prefix` stays the smallest prefix, the one lockfile keys carry, so the server keys packages the way the client does and re-keys a lockfile entry written with another declared prefix. `aliases` exists only in the request protocol. pnpm-workspace.yaml refuses it in both CLIs, so no new setting is added to v11. The v11 config reader now defines prefix routes as own data properties, so a `__proto__` prefix is kept instead of hitting the inherited setter. Closes pnpm/tasks#204. --------- Co-authored-by: Zoltan Kochan <z@kochan.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Reject `-T` on `add` with an error that names `--save-types` and `--tilde`. `add` has both `--save-types` and `--tilde`. Accepting `-T` would force pnpm to guess between two long options that are both valid for the command, so the parser reports the ambiguity and points at the explicit spellings instead. `-T` is declared as a hidden short flag on `add` and rejected in `validate_command_scoped_global_options` after clap parses. Going through clap keeps short clusters (`-DT`), attached values (`-CT`, `--save-prefix=-T`) and tokens after `--` handled by clap's own rules. The `install <pkg>` -> `add` rewrite runs before parsing, so `install foo -T` gets the same error. The flag is hidden, so `-T` does not appear in the help text. This change is v12-only. pnpm v11 does not expose both options on `add`. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tats-u <12870451+tats-u@users.noreply.github.com> Co-authored-by: Zoltan Kochan <z@kochan.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The legacy directory matcher rejected equal paths, so a directory selector skipped its own project and a negated selector failed to exclude it. Treat an empty relative path as a match in the shared directory helper. Cover inclusion, exclusion, sibling-prefix boundaries, and recursive exec. pnpm v11 already includes the directory itself and needs no change. Closes pnpm/tasks#196. --------- Co-authored-by: Zoltan Kochan <z@kochan.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…npm#17327) The CAS prune removed a store file whose hard-link count was 1. A package imported with clone or copy leaves its store files at one link while a project still uses it. That is every patched or built package, every package under packageImportMethod: copy, and every package of a macOS clone. So the prune removed them, and the next install downloaded them again. The prune now also keeps every file that a registered project's installed lockfile references: - For each registered project it reads <modulesDir>/.pnpm/lock.yaml and the lock.yaml in the virtualStoreDir recorded in <modulesDir>/.modules.yaml. modulesDir comes from the nearest pnpm-workspace.yaml at or above the registered directory. - Each package's store index keys come from the install's own key functions: both keys of a git-hosted package, the manifest-keyed and plain keys of a runtime, and every variant of a variations resolution. - Every file of each row is kept, including each side-effects entry. - A project with no installed lockfile and a package with no row add nothing, so the hard-link check still decides for them. - A lockfile of an unsupported version is skipped with a warning. A lockfile, .modules.yaml, pnpm-workspace.yaml, or store index row that cannot be read fails the prune with ERR_PNPM_STORE_DIR_PRUNE_IN_USE_FILES. Registry errors keep their own codes. In pnpm 12, StoreDir::prune_keeping runs a caller's collector under the prune lock, and the CLI supplies the collector because store-dir does not depend on the lockfile crate. pnpm 11 collects before any removal. pnpm 11 and pnpm 12 share one store. pnpm 12 keys a runtime row with its synthesized manifest, so the pnpm 11 collector also keeps package-manifest keys whose tail it references. It scans the index keys only when a lockfile holds a runtime. A modulesDir set only on the command line, in the environment, in the global config, or in packageConfigs is not seen. --------- Co-authored-by: Zoltan Kochan <z@kochan.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Windows Rust CI aborted pnpr-auth libsql tests with 0xc0000005 (four times recently: registration_cap_is_strict_across_backend_instances three times, sync_server::bulk_revocation_refreshes_a_replica_whose_tokens_went_elsewhere once). libsql's LibsqlConnection::drop calls disconnect() and then the inner local::Connection's own Drop calls disconnect() again. Both see the drop_ref Arc as unique, so sqlite3_close_v2 runs a second time on a handle SQLite already freed. Usually it reads freed memory as "closed" and reports misuse. When another thread reused that memory, it read garbage and crashed. The tests that crashed run several connections concurrently, which makes reuse likely. Upstream fixed it in tursodatabase/libsql#2261 (released in 0.10.0), which nulls the handle after the first close. pnpr stays on the pnpm fork because tursodatabase/libsql#2301 is still unreleased, so the fix is cherry-picked onto the fork's pnpm-0.9.30 branch. The new test installs an SQLite log callback, drops one connection and asserts no misuse was logged. It logged two before the fork bump. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ry specifier (pnpm#17365) An optional dependency that fails to resolve is skipped unless the wanted lockfile already holds an entry that satisfies it. The check only accepted plain semver ranges, so a specifier with a named-registry prefix such as `work:^1.0.0` was always skipped and its locked entries were dropped. Both stacks now let the existing lockfile-reuse spec parser (`locked_child_admits` in v12, `getRangeOfLockedPackage` in v11) judge the entries. The parser unwraps a declared prefix or built-in alias to its range and registry, and it matches only entries locked from that registry. Closes pnpm/tasks#210
…ws (pnpm#17369) The git fetchers wrote store-index rows with no bundled manifest, so the warm prefetch re-derived `requiresBuild` from the row's files on every install, reading and parsing `package.json` once per git dependency, and the cached git prepare check could read it again. `queue_files_index` now reads the manifest once, derives `requiresBuild` from it and the file list, and stores the normalized manifest in the row, as pnpm v11 does. Rows with a bundled manifest keep their stored `requiresBuild`; only rows written by older releases are re-derived. `normalize_bundled_manifest` moves from `pnpm-tarball` to `pnpm-package-manifest` so the git fetcher can use it. The manifest-plus-files build check moves there too as `requires_build_from_files`, next to a new `read_package_json_from_cas_paths` that `requires_build_from_cas_paths` and the warm git prepare check now share. Closes pnpm/tasks#188
…pm#17367) The settings a repository must not control (ci, stateDir, scope, globalDir, globalBinDir, macosBackup, globalShims, tools, symlinkedLockfileTargetDirs) move from WorkspaceSettings into a new MachineSettings struct. A project's pnpm-workspace.yaml and a config dependency's entry parse into WorkspaceSettings only, so clear_machine_only_settings and the separate globalShims clearing go away. A new machine setting can no longer reach a project file because someone forgot to add it to a list. The global config.yaml, PNPM_CONFIG_*, the command line, and the updateConfig hook round-trip read into TrustedSettings, which holds both halves. The global file is read once per half rather than through serde(flatten), which buffers values untyped and would break scalar settings such as `tag: 1.0`. The machine half is parsed only when the file mentions one of its keys. The pnpm-home pnpm-workspace.yaml keeps setting globalShims. A global command reads that one key from it explicitly. The refused-key warning and the `pnpm config set` refusal now cover every MachineSettings key, derived from the struct. Keys that `pnpm config set --global` cannot write (tools) are routed to the global config.yaml and their PNPM_CONFIG_* variable. updateConfig hooks keep reading and writing machine settings as before, except the two already hidden from them, because hook code runs as the user. Closes pnpm/tasks#207
…to the pnpm bootstrap (pnpm#17368) Both CLIs built the network config for self-update and the pinned-pnpm download (the package-manager bootstrap) from the trusted `.npmrc` files and the command line's `.npmrc`-spelled tokens only, so `strictSsl` / `localAddress` set in the global `config.yaml` or through `PNPM_CONFIG_STRICT_SSL` / `PNPM_CONFIG_LOCAL_ADDRESS` applied to ordinary registry requests but not to the bootstrap. Both sources are trusted, so the bootstrap now reads them with the project precedence: trusted `.npmrc` < global `config.yaml` < environment < command line. The project `pnpm-workspace.yaml` stays out of the bootstrap. v12: `WorkspaceSettings::apply_tls_to` no longer consumes its fields, and `Config::load_sources` applies it to `package_manager_bootstrap.tls` where it already overlays the proxy settings: in `apply_bootstrap_settings` (global `config.yaml`), `apply_env_settings` (`PNPM_CONFIG_*`), and `apply_cli_setting_values`. The last one is what makes `--config.localAddress` reach the bootstrap: the CLI kebab-cases the key into `setting_values`, while `npmrc_tokens` keeps it as given and the `.npmrc` parser does not know the camelCase spelling. v11: `createPackageManagerNetworkConfig` resolves `strictSsl` and `localAddress` as `configFromCliOpts` (camelCased, so both spellings), then the global `config.yaml`, then `trustedConfig`. The command line comes first because its kebab-case tokens also sit inside `trustedConfig`, where the global yaml would otherwise override them. `applyEnvSetting` mirrors the two settings onto `packageManagerNetworkConfig` as it does for `registry`; it already skips keys the command line set. `applyGlobalYamlConfig` returns the file's two settings next to the registries, so `addSettingsFromWorkspaceManifestToConfig` returns the manifest's settings (copying the command line over them instead of mutating them) and `PnpmSettings` types `strictSsl` and `localAddress`, which are yaml settings since b652047. `TYPED_WORKSPACE_MANIFEST_KEYS` and its Rust mirror list them too. Covered by `tests::tls_settings` in pnpm-config and the "package manager bootstrap" tests in `pnpm11/config/reader/test/index.ts`; with the overlays removed, three tests fail in each stack. Closes pnpm/tasks#201
…npm#17370) Under nodeLinker: hoisted, both CLIs reuse a package at a location the previous install's hoistedLocations records. Nothing marked an install in progress, so an install that stopped after replacing a recorded location but before writing .modules.yaml left the old record behind. Reverting the change then reused the replaced files. Before the linker touches the tree, both CLIs now rewrite .modules.yaml without every recorded location the install does not reuse as is. A repeat install that reuses everything writes nothing extra. A narrow window remains between the final .modules.yaml write and the current lockfile write, which this change keeps in their existing order. Closes pnpm/tasks#182
…to another registry (pnpm#17373) A plain lockfile key (`@scope/a@1.0.0`) records no registry, so the reuse gate read its registry from the current scope route. Routing the scope to another registry was invisible: the lockfile stayed fresh, the install went headless, and the locked versions and children were fetched from the new registry with the old integrity. The install failed where resolving against the new registry would succeed. The workspace state now records the scope routes an install resolved the lockfile under (registryRoutes). A resolving unfiltered install records the routes it ran under; a frozen or filtered install keeps the previous record while a plain key still sits under a moved route. The default registry is not recorded: switching it is routinely a mirror switch and would resolve every unscoped package again. The registry context carries those routes as the provenance of plain keys. The reuse gate reads a plain key's registry from them, so a key under a moved scope is refused, loses its pin, and resolves again from its range against the new registry. In pacquet the subtree-reuse walk also refuses a subtree holding a moved key, because a reused parent seeds its children with exact pins and only its fresh manifest carries the ranges. A plain key under a moved route marks the lockfile stale for a resolving install; --frozen-lockfile installs it as recorded. A route change is a settings drift for the repeat-install shortcut. The route: entries of registryPrefixes are redundant with the new record and are dropped (that record is unreleased). Closes pnpm/tasks#209
pnpm#17372) The v12 command reference (pnpm/docs/cli) had drifted from the clap definitions, and the error codes the docs name had drifted from the ones the source emits. Nothing caught either. Two unit tests in pnpm-cli now compare the docs with the code, following the settings test from pnpm#17269. docs_command_pages maps every visible clap command to its page and checks both directions: a flag without a heading, and a heading for a flag the command rejects. Pages may delegate to another page, import .mdx partials, and document a --[no-] pair with either side; a flag that spells a setting is claimed by ConfigOverrides::extract before clap sees it, so the test asks that entry point, and the -s shorthand is accepted everywhere too. docs_error_codes checks that every ERR_PNPM_* code the docs name is emitted by a source file under pnpm/, with the migration guides exempt, and keeps errors.md in alphabetical order. Each test keeps a list of today's gaps, and fixing a gap means deleting its entry. The gaps the tests found are fixed: add documents its include, lockfile, dedupe, and script flags; deploy names the install options it accepts; remove documents --[no-]trust-lockfile; import documents --pnpr-server; recursive.md no longer presents --link-workspace-packages as a recursive option; the frozenStore section drops the v11-only ERR_PNPM_FROZEN_STORE_INCOMPLETE. errors.md in both docs trees opens with what a code is for, lists its codes in alphabetical order, and adds the codes users meet most. The doctor page stops describing v11 (no skipped store check, no @pnpm/exe install method), and the exec page states that pnpm parses its own options up to the command name on either side of `exec`. DOCUMENTATION.md gets the reference-page templates and the rules the three drift tests parse. Part of pnpm/tasks#191.
…7363) createPackageManagerNetworkConfig now reads `https-proxy`, `http-proxy`, and `proxy` as unset unless they are a non-empty string. `false`, `null`, and an empty value fall through to the next setting and then the environment, matching resolveProxySettings for installs and pnpm v12. An explicit `proxy=false` remains the way to turn the proxy off, and it now also stops the download's `httpProxy` from falling back to `HTTP_PROXY`, as installs do. The engine identity check of the pinned pnpm now takes its network settings from getPackageManagerBootstrapConfig, like the store controller that downloads it, instead of the project's proxy, TLS, and auth settings. Closes pnpm/tasks#193 --------- Co-authored-by: Zoltan Kochan <z@kochan.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(install): refuse nodeLinker changes on v11 mutations * fix(install): keep node_modules on a filtered install after a nodeLinker change A plain install that selected the workspace root purged the root modules directory on a nodeLinker mismatch even when other workspace projects were not selected. Under the hoisted linker those projects keep their dependencies in the root modules directory, and the filtered install does not relink them, so they lost their dependencies. The purge for a nodeLinker mismatch now runs only when the install covers every workspace project. Otherwise it fails with ERR_PNPM_NODE_LINKER_DIFF. Adds tests for the whole-workspace purge and the root-only refusal, and documents the error in the v11 docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Zoltan Kochan <z@kochan.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…17654) A version may now be published with platform variants only: its document has no `dist` and no plain attachment. pnpr normalizes the submitted manifest as an archive's is, requires it and every variant to name the URL's package and the version key (so a key with the `+r<N>` reserved for revisions is refused), checks the variants against it, then generates the minimal archive that npm's documents point to: a package.json with the version's name and version and the union of the variants' `os`, `cpu`, and Linux `libc` (glibc when a Linux platform names none; none of them when a variant is `wasm32`), packed deterministically so every replica and rebuild produces the same bytes. It is written through the publish's own slot path, so a registry that stores tars stores its tar. The generated archive is not one of the version's archives. pnpr's document and the release record describe such a version by the manifest its variants share (the peers, and each dependency every variant declares with the same specifier), with no top-level integrity, facts, or primary inputs, and each variant's manifest difference is taken against that shared manifest. Provenance does not name it, but a statement over the variants may accompany the version, and npm's documents keep its attestations. Variants published with an `any` archive are held to the same identity, and a packument rewrite restores the variant fields pnpr derived for every retained version instead of dropping them. A staged `any` archive may also be referenced by `dist.integrity` alone, as a release job that packs none sends it; a test covers that. pnpr's variant handling calls the archive every other host installs the `any` archive, as pnpm/rfcs#70 models it, instead of the primary.
Two Windows e2e tests that switch to a downloaded pnpm 9.x sometimes outlive nextest's 300 s limit, and the TS counterpart hits spawnSync's ETIMEDOUT. Both runs drop everything the command printed, so the logs show nothing about where the stall is. - `pnpm_testing_utils::stall_report::output_within` replaces `Command::output` in `dispatched_pinned_pnpm_inherits_env_file_and_strips_flag` and `child_pnpm_selects_the_version_for_its_own_directory`. It echoes output to stderr as it arrives, stamped with the time since the start, which survives nextest killing the test. The command is done once it has exited and its output streams have closed. If it is not done after 4 minutes, the test fails with the output so far and the processes of the run, each with its CPU time and uptime, and those are killed. The processes are found by an environment variable each of them inherits, so ones whose parent has exited are included. - `execPnpmSync` adds the output a process printed before it failed, timed out or was killed to the error. Its stderr was labelled STDOUT. Refs pnpm/tasks#263
…7657) pnpm reads `publishConfig.variants`, an array with one entry per archive: `targets` are canonical platform tags, or the reserved `any` for the archive of every other host; a platform variant's tag is its targets sorted by their bytes and joined with `+`. Before anything is packed, pnpm checks that every target is `any` or a canonical tag (suggesting the canonical spelling, such as `linux-x64` for the napi-rs triple `linux-x64-gnu`), that no target appears twice and `any` stands alone, which also rules out two variants that could tie on a host, that each tag fits pnpr's 128-byte limit, and that no manifest sets a field every archive shares or, for a platform variant, `os`, `cpu`, or `libc`. `pnpm pack` writes one archive per entry, the `any` archive under the usual name and each variant as `<name>-<version>~<tag>.tgz`, and `--variant <target>` packs only the archives its targets name. A file an entry's pattern claims goes only into that entry's archives; every other file is shared. Each archive holds the files its own manifest's `main`, `browser`, and `bin` name, after its entry's `manifest`, rather than the base manifest's, and each must name a file the archive holds by its exact path. A pattern of a packed entry that matches nothing fails the pack. Each archive passes the checks pnpr runs, and the CRLF shebang and dotenv checks a single archive gets, before it is written.
…npm#17669) Require matching child variants before collapsing peer dependents. Recursive compatibility could independently choose incompatible targets for a child and its parent, giving one project two instances of the same dependency. Retain all surviving variants for subsequent rounds, stop when no variant collapses, and compose replacement maps so importer references reach the final survivor. Use an iterative loop for the rounds. When a cycle prevents child-first progress, collapse one recursively compatible pair per independent cyclic component and resume those rounds. Defer parents of changed components. Process dependency components before their parents when selecting that pair. Reuse the peer walker's iterative component pass and the graph sequencer's component helper. Index incoming edges so each round rewrites references to collapsed paths without scanning unrelated nodes. Add synthetic regression coverage in both implementations. Declare serde's rc feature in resolver-base, whose serialized manifest contains Arc<Value>, so scoped resolver builds do not depend on workspace feature unification. Closes pnpm#17666.
`pnpm publish` of a package that declares `publishConfig.variants` packs every archive and publishes them as one version to a registry declared with `serverType: pnpr`: it stages each archive by its integrity (HEAD, then PUT when missing) and sends the usual document, which references the `any` archive as `<name>-<version>.tgz` and each platform variant as `<name>-<version>~<tag>.tgz`, by integrity and length. A version without an `any` entry is sent with no `dist` and no plain attachment, and pnpr generates the archive npm's documents point to. Publishing variants to any other registry is refused, also in a dry run, because a version published without its variants cannot get them later. `--no-variants` publishes only the `any` archive instead. Provenance for such a version is refused before any archive is staged. pnpm warns when `publishConfig.variants` has no entry that targets `any`, so the version has no archive for a host no variant matches, and when it declares platform variants without a top-level `files` field, so every file no entry claims ships in every archive.
The resolver adds optional type peers before running readPackage on an injected workspace dependency. Freshness verification used the importer manifest, which lacked those inferred peers. Retain the project manifests before importer hooks. The existing directory manifest walk uses that source and the resolver's ordered hook chain when addMissingPeerTypes is enabled. Only reachable directory dependencies are transformed. Importer manifests remain unchanged, since inferred peers on an importer would become install requirements. Cover normal install followed by frozen install with shared and per-project lockfiles, including hooks that remove an inferred type peer or add a peer. Isolate the existing external-importer fixture from ancestor workspaces. Closes pnpm#17668.
…e records (pnpm#17671) With `sharedWorkspaceLockfile: false` the up-to-date fast path declined, since each project keeps its own lockfile and workspace state, and the install ran its loop over every project after discovery parsed every manifest. The fast path now lists the projects without reading them and checks each one against its own state, as its run in the loop would: its configuration anchored to it, its manifest rebuilt from its record, and the other projects as the ones whose commands it links. The projects are registered in the store once all of them are up to date. Any project that cannot be decided from its record sends the install to the loop. The check of each project already refuses the shortcut while an injected source may have changed, so injected copies still follow their sources. `packageConfigs` and the global virtual store decline, since the records carry neither per-project settings nor the runtime the build markers depend on. Part of pnpm/tasks#256.
… by integrity (pnpm#17659) `pnpm publish --upload-variant <target>` packs the archive of the `publishConfig.variants` entry the target names, uploads it to the registry's staging area, and prints `<target>=<integrity>`. It publishes nothing, always sends the PUT so a rerun renews the archive, needs a registry declared `serverType: pnpr`, and refuses `--provenance`. `pnpm publish --variant-integrity <target>=<integrity>`, repeated per entry (`<name>~<target>=<integrity>` with `--recursive`), publishes the version from those archives without packing any. Before the commit, pnpm checks that every entry, the `any` entry included, has exactly one value, and asks the registry with HEAD that each archive is still staged for this account, taking its length from the answer; a missing one fails naming the archive and the job to rerun.
…ersion (pnpm#17660) With `--provenance`, a version with platform variants is published with one statement whose subjects are every archive it publishes: the `any` archive by the version's PURL, and each platform variant by the same PURL with a `variant` qualifier holding its tag (`+` written `%2B`), each with its `.tgz` SHA-512. Archives other jobs uploaded are named by the integrity given with `--variant-integrity`. A version without an `any` archive names only its variants, since pnpr generates the archive npm's documents point to.
Upgrade serde-saphyr to 2.1.0. Adapt scanner and token handling, and treat comment-only YAML as empty where callers use defaults. Preserve lockfile serialization. Closes pnpm/tasks#258. --------- Co-authored-by: Zoltan Kochan <z@kochan.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ps gate (pnpm#17672) With sharedWorkspaceLockfile: false, a recursive run or exec checks each selected project with its own verify-deps gate. Each gate of a project that links workspace commands walked the workspace and read every project manifest again, so the manifest reads grew with the square of the project count. check_deps_status_before_run_at now takes an optional GateWorkspace, which a recursive command creates once and passes to every gate. It discovers the workspace projects lazily, on the first gate that needs them. A gate that finds its project out of date drops the shared projects, so the gates after a possible install discover them again, and the rechecks after a spawned install pass None. The shared projects keep the discovery options they ran with. A gate whose anchored config discovers differently, such as one with a custom modulesDir, walks the workspace itself. FindWorkspaceProjectsOpts::finds_the_same_as compares options by what they can change. It leaves out an ignored directory under a node_modules that the walk skips by name, meaning one spelled that way on disk or one that does not exist, so each project's own node_modules still shares the discovery. The walk itself still receives every configured exclusion. A gate whose workspace root differs from the shared one, in a nested workspace, walks its own workspace. The shared discovery keeps the workspace manifest with its projects, so a forgotten discovery reads pnpm-workspace.yaml again. pnpm -r exec true in a 300-project workspace with verifyDepsBeforeRun: error went from 492 ms to 42 ms (median, release build). The opens test helper now also watches IN_CLOSE. inotify merges an event into an identical one left unread at the tail of the queue, so back-to-back opens were counted as one.
pnpm#17675) A version pnpr publishes with variants and no archive for every other host has no integrity of its own in pnpr's document. The resolver no longer records that missing archive as the variant that targets any: the lockfile lists only the version's platform variants. On a host none of them fits, the package is skipped as an optional dependency, as a platform its manifest excluded would be; a dependency that is not optional fails with an error that lists the platforms the version is published for. The fit is decided for the host, whose variant the installer links.
…m#17674) Replicas sharing a libSQL metadata database hold no package lock in common, which left two publish races. - Two publishes to one package could read the same packument, and the one that committed second was refused with 409. It now rebases what it changed (its versions, tags, times, and other fields) onto the packument the store holds and commits again, a bounded number of times. It does so only while the package's maintainers are the ones the publish was authorized against. A batch of npm packuments rebases each one; other formats keep answering the conflict. - A refused publish removed the archives it had written, though another replica may have found one in place with the same bytes and committed it. On libSQL they now stay, referenced by nothing and never served. A single SQLite instance keeps removing them under its package lock.
Retain the declaring package id in cached missing-peer requirements. Re-anchor relative workspace peer specifiers to the current importer when emitting the hoist input, using the existing LocalSpec parser and renderer and the directory-resolution helper ordinary dependencies use. Keep the original ranges in peer requirements and lockfile declarations. This covers both fresh peer discovery and cached subtree replay without binding shared cache entries to the first importer's directory. The issue reproduction completes on the TypeScript v11 CLI without the wrong-directory error, so this fix targets v12. Closes pnpm#17676.
…m#17682) Loading the config for a switch to the pinned pnpm placed the project's store, which probes hard linking by writing a `_tmp_*` file into the project directory on every command. File watchers report it. The switch installs into the engine store under the pnpm home and never uses the project's store, so the switch load now leaves it unplaced, as the pin decision load already does. Closes pnpm#17681 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…npm#17678) Every written archive, a platform variant's included, now reports its SHA-512 integrity and its size, so a publish from several machines can reference an archive without hashing it again. A dry run writes no archive and reports neither. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Add advisory declaration diagnostics to peers check when peer auto-installation is disabled and deduplication reuses required peer providers outside the project's declared dependency scope. Account for ancestor providers and the enabled workspace-root scope. Keep these advisories separate from unresolved and incompatible peer errors and leave strict install behavior unchanged. Expose advisory data in JSON and document the distinction between resolved peers and project dependency declarations. Preserve existing resolution. The new diagnostic targets v12; document the existing reuse behavior in both versions and exercise the settings matrix in both CLIs. Closes pnpm#17673.
…e record (pnpm#17683) * feat(publish): confirm a retried publish against the version's release record When pnpr answers that the version is already published, pnpm reads the version's release record, its provenance statement when this run signs one, and its dist-tags. It reports the version as published only when the record names the same archives, the statement names every archive, and the dist-tag points at the version, and otherwise names what differs. A version without an any archive is compared by its variants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(publish): confirm the release when a rerun finds its staged archives retired pnpr retires the archives another job staged once the version they were published with is accepted, so rerunning that publish failed on the missing archive before the release check ran. A rerun now confirms the recorded release instead, and fails as before when pnpr has no record of the version. Signing is a named case, and the tests show the values they check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(publish): drop comments that repeat the code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(publish): take only a response with the record schema as the release record Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… the repeat-install fast path (pnpm#17686)
WalkthroughWarning Review details and warnings were omitted to fit the comment limit. |
There was a problem hiding this comment.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use AI Credits, select a billing entity via the GitHub site, under Settings > Copilot > Features.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
PR Summary by QodoSync pnpm upstream and repin Garnet monitoring to v2.5.2
AI Description
Diagram
High-Level Assessment
Files changed (27)
|
Code Review by Qodo
1. Dependabot recordings cannot be published
|
| @@ -209,7 +209,7 @@ jobs: | |||
| run: node control/.github/scripts/garnet-dependabot-record.mjs prepare | |||
| - name: Start trusted sensor using OIDC only | |||
| timeout-minutes: ${{ fromJSON(needs.resolve.outputs.stop_budget).experiment && 2 || 45 }} | |||
| uses: garnet-org/action@8cccc85403e4ac4e05fb7822c994d3c199f9aa57 # v2.4.0 | |||
| uses: garnet-org/action@673a06d87748bec49e4d8df22d371b2a3420aba4 # v2.5.2 | |||
There was a problem hiding this comment.
1. Dependabot recordings cannot be published 🐞 Bug ≡ Correctness
validateWorkflowPins still allows the old Garnet action commit while the recording workflow now uses v2.5.2. When the publisher reads a recording made from the updated workflow, it rejects the workflow with unapproved_worker_action_pin.
Agent Prompt
## Issue description
The repinned recording workflow fails the publisher's hard-coded action-pin check.
## Fix Focus Areas
- .github/workflows/garnet-dependabot-record.yml[212-212]
- .github/scripts/garnet-dependabot-publish.mjs[19-19]
- .github/scripts/garnet-dependabot-publish.mjs[1088-1092]
## Recommended Fix
Update the publisher's allowed Garnet action commit to `673a06d87748bec49e4d8df22d371b2a3420aba4`, keeping its workflow-pin verification intact.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| @@ -209,7 +209,7 @@ jobs: | |||
| run: node control/.github/scripts/garnet-dependabot-record.mjs prepare | |||
| - name: Start trusted sensor using OIDC only | |||
| timeout-minutes: ${{ fromJSON(needs.resolve.outputs.stop_budget).experiment && 2 || 45 }} | |||
| uses: garnet-org/action@8cccc85403e4ac4e05fb7822c994d3c199f9aa57 # v2.4.0 | |||
| uses: garnet-org/action@673a06d87748bec49e4d8df22d371b2a3420aba4 # v2.5.2 | |||
There was a problem hiding this comment.
2. Recorder receipts name the wrong action 🐞 Bug ≡ Correctness
garnet-dependabot-record.mjs still writes the old action commit into action_sha, despite the workflow running v2.5.2. Its receipt validator compares that field to the same stale constant, so recordings from the updated workflow retain an incorrect action identity even after the publisher's allowlist is fixed.
Agent Prompt
## Issue description
The recording workflow runs v2.5.2, but its receipts attest the previous action commit.
## Fix Focus Areas
- .github/workflows/garnet-dependabot-record.yml[212-212]
- .github/scripts/garnet-dependabot-record.mjs[29-29]
- .github/scripts/garnet-dependabot-record.mjs[570-570]
## Recommended Fix
Update the recorder's `ACTION` constant to `673a06d87748bec49e4d8df22d371b2a3420aba4` and keep its receipt check aligned with the action actually run.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
pnpm/pnpmmainat37ade57d2dcaa9aa77ef7de8423e45eb12bf3607into the fork with a real merge commit so upstream ancestry remains connected.garnet-org/actionreferences across 8 workflow files to the v2.5.2 commit673a06d87748bec49e4d8df22d371b2a3420aba4.This PR must be merged with a merge commit. Squashing or rebasing it would discard the upstream ancestry this sync restores.
The only merge conflict was
.pr_agent.toml; it was resolved with the upstream version as required. No Garnet-owned workflow or script conflicted.Squash Commit Body
Checklist
jibril_versioninputs remain at v2.17.0.$/self-action diagnostics.Written by an agent (Cursor, GPT-5.6 Sol).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.