Skip to content

chore: update pnpm and add pacquet to config deps#11765

Merged
zkochan merged 4 commits into
mainfrom
use-pacquet-config-dep
May 21, 2026
Merged

chore: update pnpm and add pacquet to config deps#11765
zkochan merged 4 commits into
mainfrom
use-pacquet-config-dep

Conversation

@zkochan
Copy link
Copy Markdown
Member

@zkochan zkochan commented May 20, 2026

Summary by CodeRabbit

  • Chores
    • Bumped pnpm package manager from 11.1.3 to 11.2.2.
    • Simplified CI workflows by removing redundant install/setup steps and an extra package install step.
    • Added a workspace-level config entry to pin a package-tooling helper (improves reproducible installs).

Review Change Stack

Copilot AI review requested due to automatic review settings May 20, 2026 11:38
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ead2d615-bedb-43be-b52f-b2af000ac87d

📥 Commits

Reviewing files that changed from the base of the PR and between 6fd1938 and 2b8b21c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • pnpm-workspace.yaml
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Run benchmark on ubuntu-latest
  • GitHub Check: Compile & Lint
🔇 Additional comments (1)
pnpm-workspace.yaml (1)

331-332: 💤 Low value

@pnpm/pacquet@0.2.3 is published (latest) and the unquoted YAML value is fine.

0.2.3 exists on npm (it’s the latest dist-tag). Since the scalar is 0.2.3, YAML treats it as a string, so there’s no functional issue with leaving it unquoted.


📝 Walkthrough

Walkthrough

Bumps pnpm to 11.2.2, pins @pnpm/pacquet to 0.2.3 in the workspace, and shortens CI/test workflows by removing the explicit pacquet install step, dropping install: false from pnpm/setup, and deleting a job-level pnpm_config_verify_deps_before_run override.

Changes

pnpm Upgrade and CI Workflow Alignment

Layer / File(s) Summary
pnpm version upgrade
package.json
Root packageManager and devEngines.packageManager.version updated to pnpm@11.2.2.
Workspace pacquet dependency pinning
pnpm-workspace.yaml
Adds configDependencies mapping to pin @pnpm/pacquet to 0.2.3.
CI and test workflow adjustments
.github/workflows/ci.yml, .github/workflows/test.yml
Removes manual pacquet install from compile-and-lint job; pnpm/setup no longer uses install: false; removes job-level pnpm_config_verify_deps_before_run: false from test workflow.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • pnpm/pnpm#11719: Also touches pnpm version and pacquet installation strategy.
  • pnpm/pnpm#11589: Related workflow changes around pnpm/setup configuration.
  • pnpm/pnpm#11657: Overlapping removals/changes for pacquet install and pnpm setup flags in CI workflows.

Poem

I’m a rabbit who hops through CI and trees,
I bump the pnpm and tidy the breeze.
Pacquet pinned to a newer tune,
Workflows pruned — I hum a tune. 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating pnpm version and adding pacquet to config dependencies in pnpm-workspace.yaml.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch use-pacquet-config-dep

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repo to pnpm 11.2.0 and switches CI/workspace configuration to use pacquet via configDependencies, so pnpm install can delegate the materialization phase to pacquet.

Changes:

  • Add @pnpm/pacquet to configDependencies in pnpm-workspace.yaml.
  • Update packageManager/lockfile to pnpm 11.2.0 and include pacquet + its platform packages in pnpm-lock.yaml.
  • Simplify CI workflows by removing the explicit pacquet install step and letting pnpm/setup perform installation.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Adds configDependencies entry to enable pacquet-backed installs.
pnpm-lock.yaml Bumps pnpm to 11.2.0 and records pacquet/config dependency resolutions.
package.json Updates packageManager and devEngines.packageManager to 11.2.0.
.github/workflows/test.yml Removes manual pacquet install and relies on pnpm/setup install.
.github/workflows/ci.yml Removes manual pacquet install and relies on pnpm/setup install.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pnpm-lock.yaml Outdated
Comment thread .github/workflows/test.yml
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Line 61: Update the packageManager entries in package.json from the
non-existent "pnpm@11.2.0" to a valid released version (e.g., "pnpm@11.1.3");
locate the "packageManager" key(s) in the file and replace their values with
"pnpm@11.1.3" (or the intended officially released pnpm version) so the manifest
points to a published pnpm release.

In `@pnpm-workspace.yaml`:
- Around line 331-332: The configDependencies entry for '`@pnpm/pacquet`' uses an
unquoted, non-existent version token; update the value for the
configDependencies key by verifying and pinning the correct published version of
'`@pnpm/pacquet`' and write it as a quoted YAML string (e.g., "'0.2.2-10'" or the
correct version like "'0.2.3'") ensuring the identifier '`@pnpm/pacquet`' stays
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: de392f36-8148-4225-b03c-a2a5feb51595

📥 Commits

Reviewing files that changed from the base of the PR and between 0fb7233 and 52acd46.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • .github/workflows/test.yml
  • package.json
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (2)
  • .github/workflows/ci.yml
  • .github/workflows/test.yml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Agent
  • GitHub Check: Run benchmark on ubuntu-latest
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-05-05T23:03:04.286Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11479
File: __utils__/scripts/package.json:6-9
Timestamp: 2026-05-05T23:03:04.286Z
Learning: The pattern cross-env NODE_OPTIONS="$NODE_OPTIONS ..." in package.json scripts is an established convention in the pnpm/pnpm repository and is used across many packages (e.g., fs/hard-link-dir, worker, __utils__/scripts). Do not flag this as a cross-platform issue in individual files; if a change is needed, apply it as a repo-wide change in a separate PR. Scope this guidance to all package.json files in the repo; use the minimatch pattern '**/package.json' to identify relevant files and review changes at the repository level rather than per-file.

Applied to files:

  • package.json

Comment thread package.json Outdated
Comment thread pnpm-workspace.yaml Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Integrated-Benchmark Report (Linux)

Scenario: Frozen Lockfile

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.529 ± 0.100 2.359 2.741 1.05 ± 0.05
pacquet@main 2.419 ± 0.072 2.333 2.532 1.00
pnpm 4.855 ± 0.062 4.780 4.990 2.01 ± 0.07
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5293496174800003,
      "stddev": 0.10022818245735587,
      "median": 2.5188660278799997,
      "user": 2.7523333199999995,
      "system": 3.77741798,
      "min": 2.35853072538,
      "max": 2.74069718638,
      "times": [
        2.50858347538,
        2.5489786293799996,
        2.52914858038,
        2.49612385838,
        2.74069718638,
        2.56909552938,
        2.35853072538,
        2.47886622438,
        2.60420696338,
        2.45926500238
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.4189599801799995,
      "stddev": 0.0724097192453061,
      "median": 2.3922381473799996,
      "user": 2.7874781199999994,
      "system": 3.7601714799999995,
      "min": 2.33344565038,
      "max": 2.53201358838,
      "times": [
        2.35348095638,
        2.53201358838,
        2.40777447338,
        2.3640270973799997,
        2.50911655138,
        2.3767018213799997,
        2.37453794838,
        2.43238062938,
        2.50612108538,
        2.33344565038
      ]
    },
    {
      "command": "pnpm",
      "mean": 4.85474403148,
      "stddev": 0.06208705430566961,
      "median": 4.8486917383799994,
      "user": 8.13281162,
      "system": 4.28850718,
      "min": 4.78032800938,
      "max": 4.99025597038,
      "times": [
        4.90491047738,
        4.87482250138,
        4.81023728838,
        4.99025597038,
        4.78032800938,
        4.84848422138,
        4.84889925538,
        4.82161703738,
        4.79003836538,
        4.87784718838
      ]
    }
  ]
}

Scenario: Frozen Lockfile (Hot Cache)

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 682.3 ± 30.9 664.3 769.0 1.00
pacquet@main 690.5 ± 29.9 662.7 733.1 1.01 ± 0.06
pnpm 2667.1 ± 83.3 2532.7 2793.7 3.91 ± 0.22
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.68233866148,
      "stddev": 0.030908578016133448,
      "median": 0.67389796048,
      "user": 0.38173996000000004,
      "system": 1.5693598999999998,
      "min": 0.66427176898,
      "max": 0.76899517698,
      "times": [
        0.76899517698,
        0.67380027798,
        0.66967974198,
        0.67896000798,
        0.66433604798,
        0.66427176898,
        0.67734026098,
        0.67399564298,
        0.67293903898,
        0.67906864998
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.69049136178,
      "stddev": 0.029883126554707335,
      "median": 0.67144513398,
      "user": 0.37168256,
      "system": 1.578293,
      "min": 0.66272072398,
      "max": 0.73314334798,
      "times": [
        0.72537203598,
        0.66272072398,
        0.70879934598,
        0.66837980298,
        0.67451046498,
        0.66774051298,
        0.73314334798,
        0.72983901698,
        0.66733210198,
        0.66707626398
      ]
    },
    {
      "command": "pnpm",
      "mean": 2.66712493548,
      "stddev": 0.08329856809134902,
      "median": 2.6544773044800003,
      "user": 3.21079966,
      "system": 2.2852465000000004,
      "min": 2.53273849498,
      "max": 2.79370306798,
      "times": [
        2.74563789798,
        2.70232576698,
        2.75486421698,
        2.79370306798,
        2.65319643198,
        2.53273849498,
        2.56958868698,
        2.65363014498,
        2.61024018198,
        2.65532446398
      ]
    }
  ]
}

@coderabbitai coderabbitai Bot added the area: supply chain security Issues related to minimumReleaseAge, blockExoticSubdeps, build script safety, and trust policies. label May 20, 2026
zkochan added a commit that referenced this pull request May 21, 2026
When the install engine is delegated to pacquet via configDependencies,
pnpm hard-coded the args to `install --frozen-lockfile --reporter=ndjson`
and silently dropped the user's other CLI flags. `pnpm install --no-runtime`
therefore still installed the workspace's runtime devDependency, clobbering
the Node version the surrounding tooling had set up — visible as the
`Verify Node version` failure on PR #11765 where setup-pnpm provisions
Node 24.0.0 but pacquet then materializes node 24.6.0.

Pacquet's `install` subcommand already mirrors pnpm's surface for the
common flags (`--no-runtime`, `--prod`, `--dev`, `--no-optional`,
`--node-linker`, `--offline`, `--prefer-offline`, `--cpu`/`--os`/`--libc`).
Forward the user's argv verbatim when the command is `install`/`i`;
`add`/`update`/`dedupe` still don't forward — their flag surfaces don't
line up with pacquet's `install`.
zkochan added a commit that referenced this pull request May 21, 2026
…1781)

* fix(installing.commands): forward `pnpm install` flags to pacquet

When the install engine is delegated to pacquet via configDependencies,
pnpm hard-coded the args to `install --frozen-lockfile --reporter=ndjson`
and silently dropped the user's other CLI flags. `pnpm install --no-runtime`
therefore still installed the workspace's runtime devDependency, clobbering
the Node version the surrounding tooling had set up — visible as the
`Verify Node version` failure on PR #11765 where setup-pnpm provisions
Node 24.0.0 but pacquet then materializes node 24.6.0.

Pacquet's `install` subcommand already mirrors pnpm's surface for the
common flags (`--no-runtime`, `--prod`, `--dev`, `--no-optional`,
`--node-linker`, `--offline`, `--prefer-offline`, `--cpu`/`--os`/`--libc`).
Forward the user's argv verbatim when the command is `install`/`i`;
`add`/`update`/`dedupe` still don't forward — their flag surfaces don't
line up with pacquet's `install`.

* fix(installing.commands): pass --ignore-manifest-check to pacquet

`pnpm up` / `add` / `remove` were aborting with
`pacquet_package_manager::outdated_lockfile` whenever pacquet was
declared in `configDependencies`. After resolving and writing the
updated lockfile, pnpm hands materialization off to pacquet but
hasn't yet written the post-mutation `package.json` — that write
happens after `mutateModules` returns. Pacquet's frozen-lockfile
freshness gate then saw the new lockfile paired with the
pre-mutation manifest and refused to install.

Pass pacquet's new `--ignore-manifest-check` flag (pacquet PR #11811)
on every delegation. The flag is narrow: it only skips
`satisfies_package_manifest`. Settings drift like `overrides` is
still enforced, and pnpm already re-validated the lockfile before
delegating, so re-checking the manifest here was redundant work that
only ever fired false positives on the mutate-then-materialize path.

Requires a pacquet release that ships the flag; bump
`PACQUET_VERSION` in `pnpm/test/install/pacquet.ts` once it does, or
the existing e2e tests will fail against pacquet 0.2.2-9 (which
doesn't recognize the flag and clap would reject).

Closes #11797.

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

* fix: update pacquet in tests

* fix(installing.commands): strip positionals + always-injected flags when forwarding to pacquet

`collectForwardedFlags` checked `argv[0] === 'install'` to find the
command token to strip. Any global flag the user typed before `install`
(e.g. `--config.registry=...` in the e2e test) shifted the token out
of position, so the function returned the full argv and pacquet saw
`install` twice — `error: unexpected argument 'install' found`.

Use the parsed argv that `@pnpm/cli.parse-cli-args` already produced:
`remain` lists positionals (the `install`/`i` token and nothing else
on this code path, since `isInstallCommand` is only true when no
package params are present), and `original` preserves the user's
exact tokens. Drop positionals + the flags we always inject
(`--reporter=ndjson`, `--frozen-lockfile`, `--ignore-manifest-check`)
so clap doesn't reject duplicates either.

`original` over `cooked` deliberately: nopt's `cooked` splits
`--key=value` into two tokens, which would break pacquet's
`--config.<key>=<value>` parser (it requires the `=` form).

* fix(installing.commands): make argv.cooked/remain optional on InstallCommandOptions

Widening these to required broke test fixtures elsewhere (publish/pack/
deprecate/dist-tag/deploy) that construct minimal `argv: { original }`
options for code paths that never reach pacquet. Only the pacquet
delegation actually reads `remain`, so make the two new fields optional
on the shared options type and supply a default at the runPacquet call
site. The runtime path through main.ts already populates all three.

* fix(installing.commands): strip any user-supplied --reporter when forwarding to pacquet

Pacquet's `--reporter` is a clap value option with last-value-wins
semantics, so `pnpm install --reporter=silent` (or
`--reporter silent` two-token form) reached pacquet and overrode
the `--reporter=ndjson` pnpm injects, breaking the NDJSON-to-
streamParser plumbing the default reporter depends on. The previous
filter only matched the exact `--reporter=ndjson` token.

Walk argv with a lookahead so both `--reporter=<value>` and
`--reporter <value>` are dropped without consuming an adjacent flag.

* fix(installing.commands): drop negated/value forms of always-injected flags

`collectForwardedFlags` only matched the exact positive tokens
`--frozen-lockfile` and `--ignore-manifest-check`, so a user typing
`pnpm install --no-frozen-lockfile` (or `--frozen-lockfile=false`)
forwarded the negation to pacquet, which then saw both our injected
`--frozen-lockfile` and the user's `--no-frozen-lockfile` and crashed
clap with "unexpected argument".

Match every shape the user can write the same flag in: positive,
`--no-` negated, and any `=value` form. Can't blindly strip `--no-`
either way — pacquet has flags whose literal name starts with `no-`
(`--no-runtime`, `--no-optional`); those must still forward.

The user's `--no-frozen-lockfile` intent is honored upstream — pnpm
did a fresh resolve before delegating; pacquet's role here is just
lockfile-driven materialization, which is always frozen.

* fix(installing.commands): match positionals by index, hide reporter from dropped-flags warning

`collectForwardedFlags` matched positionals via `new Set(argv.remain)`,
which strips by value: a flag value that happened to equal a
positional token (e.g. `pnpm install --node-linker install`) was
wrongly dropped from the forwarded list, costing pacquet the value
of `--node-linker`. Walk `argv.original` with a subsequence pointer
into `argv.remain` so only the actual positional indexes get skipped.

`collectDroppedFlags` still surfaced `--reporter foo` / `--reporter=foo`
in the "may not be honored" warning on `add`/`update`/`dedupe`, but
pnpm honors reporter selection itself before delegation — so the
warning was misleading. Route both helpers through the same
`isAlwaysInjected` check and consume `--reporter` and its value the
same way `collectForwardedFlags` already does.
@zkochan zkochan merged commit fecaee0 into main May 21, 2026
13 checks passed
@zkochan zkochan deleted the use-pacquet-config-dep branch May 21, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: supply chain security Issues related to minimumReleaseAge, blockExoticSubdeps, build script safety, and trust policies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants