Repository navigation
fix(deploy): don't copy the workspace root's package manager pin into the deployed manifest - #16405
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
💤 Files with no reviewable changes (5)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughNative and releasing-command deploy paths no longer copy the workspace root’s ChangesDeploy manifest package-manager fields
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Assessment against linked issues
Possibly related PRs
Suggested labels: Suggested reviewers: Merge Risk: ⚪ Minimal · up to Deploy output stops inheriting workspace-root package-manager pins while retaining the deployed project's own fields. No merge-blocking issue is established; the change is ready to merge subject to normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change narrows manifest inheritance rather than expanding deploy authority. Selected-project declarations remain authoritative, and the inspected deploy paths retain their existing validation and failure behavior. No introduced security concern was established, but downstream enforcement and the broader changed surface are not fully covered. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
pnpm11/releasing/commands/src/deploy/deploy.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. pnpm11/releasing/commands/test/deploy/deploy.test.tsESLint skipped: the matched ESLint configuration already failed (missing-dependency). 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. Comment |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Both implementations can drop an integrity hash or replace the root’s pnpm pin with a different package manager.
Review effort: Balanced
Findings: 2
Open (5)
Preserve package manager integrity hashes during deploy · New Retain Corepack integrity hashes in deployed packageManager · New Fall back to root packageManager for ignored non-pnpm entries · New Avoid replacing pnpm pin with ignored non-pnpm devEngine · New Update deploy docs for packageManager inheritance behavior · New
What changed in this PR
This PR changes pnpm deploy in both CLI implementations so the deployed manifest keeps a package manager pin without copying the workspace root’s devEngines enforcement, addressing the npm script failure reported in #16403.
Changes:
- Inherit
packageManager, converting an exact rootdevEngines.packageManagerversion into a pin when needed. - Add native and legacy deploy regression tests, plus a release note.
| File | Description |
|---|---|
pnpm11/releasing/commands/test/deploy/deploy.test.ts |
Tests deployed manifest behavior in both modes. |
pnpm11/releasing/commands/src/deploy/inheritPackageManager.ts |
Changes TypeScript pin inheritance. |
pnpm/crates/cli/tests/suite/deploy/package_manager.rs |
Tests Rust deploy pin inheritance. |
pnpm/crates/cli/src/cli_args/deploy/package_manager.rs |
Changes Rust pin inheritance. |
cspell.json |
Adds the npm error code to the spelling list. |
.changeset/deploy-does-not-copy-dev-engines.md |
Adds a release note. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16405 +/- ##
==========================================
- Coverage 92.16% 92.16% -0.01%
==========================================
Files 1516 1515 -1
Lines 204012 204059 +47
==========================================
+ Hits 188024 188066 +42
- Misses 15988 15993 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked-workspace scenario compares current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.81999783412,
"stddev": 0.1087484725510389,
"median": 2.8182225293200003,
"user": 2.7560841999999997,
"system": 2.2109845399999997,
"min": 2.6721730538200004,
"max": 3.02615187982
},
{
"command": "pacquet@main",
"mean": 2.6808194689200002,
"stddev": 0.08516890355953188,
"median": 2.6749782143200003,
"user": 2.4255787,
"system": 1.9973336399999997,
"min": 2.55671429782,
"max": 2.8106004878200004
},
{
"command": "pnpr@HEAD",
"mean": 1.5097326302199998,
"stddev": 0.11441698440440459,
"median": 1.49780295432,
"user": 2.0565337999999995,
"system": 1.83315594,
"min": 1.36281868782,
"max": 1.72915163782
},
{
"command": "pnpr@main",
"mean": 1.54214481562,
"stddev": 0.11742739671126112,
"median": 1.47854205782,
"user": 2.0837191,
"system": 1.9502380399999997,
"min": 1.4279035178200001,
"max": 1.7479191658200002
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26770585958,
"stddev": 0.030891376579704834,
"median": 0.25844488668,
"user": 0.31094368,
"system": 0.62711334,
"min": 0.22516545268000002,
"max": 0.31798710168
},
{
"command": "pacquet@main",
"mean": 0.27261335728,
"stddev": 0.02893038154364704,
"median": 0.26622601718000005,
"user": 0.31388037999999996,
"system": 0.6191752399999999,
"min": 0.24328671668000001,
"max": 0.33570461868
},
{
"command": "pnpr@HEAD",
"mean": 0.28827950398,
"stddev": 0.024377153400025105,
"median": 0.28818305118,
"user": 0.31643367999999994,
"system": 0.6227260399999999,
"min": 0.24643384268000001,
"max": 0.33969991468
},
{
"command": "pnpr@main",
"mean": 0.28936878378,
"stddev": 0.02605026243555738,
"median": 0.28809154768,
"user": 0.31452717999999996,
"system": 0.6340872400000002,
"min": 0.24871595368000002,
"max": 0.33274550868
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.010656450374740497,
"stddev": 0.002562898790709145,
"median": 0.0096324027,
"user": 0.00629203806228374,
"system": 0.005325695363321798,
"min": 0.007670107700000001,
"max": 0.0198399887
},
{
"command": "pacquet@main",
"mean": 0.00989536031458333,
"stddev": 0.001269597808704989,
"median": 0.0095990452,
"user": 0.005923666666666663,
"system": 0.004838451597222223,
"min": 0.008220552700000001,
"max": 0.015571052700000003
},
{
"command": "pnpr@HEAD",
"mean": 0.009658598359192824,
"stddev": 0.0010919902146390354,
"median": 0.009503430700000001,
"user": 0.005976004484304933,
"system": 0.004547435246636771,
"min": 0.007618049700000001,
"max": 0.0161889427
},
{
"command": "pnpr@main",
"mean": 0.008672437050000002,
"stddev": 0.0008678706366495366,
"median": 0.008564381200000002,
"user": 0.005480289285714285,
"system": 0.003973422785714286,
"min": 0.007077155700000001,
"max": 0.013368011700000001
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.010173475845863462,
"stddev": 0.0008998940968135479,
"median": 0.01013618638,
"user": 0.005698882008032126,
"system": 0.0053571566265060225,
"min": 0.00809249938,
"max": 0.012680924380000002
},
{
"command": "pacquet@main",
"mean": 0.009184896716363631,
"stddev": 0.0009192984234400274,
"median": 0.008941157380000002,
"user": 0.005677082818181818,
"system": 0.0042795613636363635,
"min": 0.00775611738,
"max": 0.012975777380000001
},
{
"command": "pnpr@HEAD",
"mean": 0.009869642539663867,
"stddev": 0.000806939195746181,
"median": 0.00972895788,
"user": 0.006480224537815125,
"system": 0.0042726491596638645,
"min": 0.008511254380000001,
"max": 0.012983956380000002
},
{
"command": "pnpr@main",
"mean": 0.009869378244197532,
"stddev": 0.0009402660402683793,
"median": 0.009813072380000001,
"user": 0.006033886172839503,
"system": 0.0046921090534979394,
"min": 0.00815098038,
"max": 0.01459141438
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.9419326625599997,
"stddev": 0.11210577619092497,
"median": 2.91163918176,
"user": 2.9679145399999998,
"system": 2.31899076,
"min": 2.82336754476,
"max": 3.16873408176
},
{
"command": "pacquet@main",
"mean": 2.67779076286,
"stddev": 0.07126999579009152,
"median": 2.65191039876,
"user": 2.32130284,
"system": 1.82448866,
"min": 2.60587991776,
"max": 2.78985010276
},
{
"command": "pnpr@HEAD",
"mean": 1.5726107291600002,
"stddev": 0.10225397212359658,
"median": 1.53964187226,
"user": 1.4592365399999998,
"system": 1.5647748599999998,
"min": 1.46965409976,
"max": 1.8287914837600001
},
{
"command": "pnpr@main",
"mean": 1.69091063776,
"stddev": 0.1631114463223684,
"median": 1.6944727897600003,
"user": 1.6579898400000002,
"system": 1.8577563599999993,
"min": 1.50292112376,
"max": 1.99739071976
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.51680465498,
"stddev": 0.0263117817597288,
"median": 0.52324450538,
"user": 0.7238049200000001,
"system": 0.77853484,
"min": 0.48319894488000004,
"max": 0.55633522488
},
{
"command": "pacquet@main",
"mean": 0.50855144598,
"stddev": 0.04950253290481795,
"median": 0.49781142038000004,
"user": 0.7053082199999999,
"system": 0.7782535399999999,
"min": 0.43776219288000007,
"max": 0.61743616088
},
{
"command": "pnpr@HEAD",
"mean": 0.3212744027800001,
"stddev": 0.03173010940602889,
"median": 0.31219814238000004,
"user": 0.28090181999999997,
"system": 0.6088484399999999,
"min": 0.27431005288000004,
"max": 0.38729326988
},
{
"command": "pnpr@main",
"mean": 0.30424241778000005,
"stddev": 0.011593508654358663,
"median": 0.30402518038000004,
"user": 0.26164141999999996,
"system": 0.5902393399999999,
"min": 0.28755041788,
"max": 0.32196931288
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.79810860706,
"stddev": 0.0551217706004087,
"median": 1.78423457916,
"user": 1.25302886,
"system": 1.24839746,
"min": 1.7378999241600002,
"max": 1.90235160016
},
{
"command": "pacquet@main",
"mean": 1.7839417788600003,
"stddev": 0.0439330492228548,
"median": 1.77459479966,
"user": 1.25550766,
"system": 1.23491596,
"min": 1.7058060661600003,
"max": 1.87398988416
},
{
"command": "pnpr@HEAD",
"mean": 0.37268206286000005,
"stddev": 0.013167950491792531,
"median": 0.37128074016,
"user": 0.35333026,
"system": 0.79101986,
"min": 0.35696266016,
"max": 0.39615128916000003
},
{
"command": "pnpr@main",
"mean": 0.37230935616000005,
"stddev": 0.01324933945813739,
"median": 0.37120073566,
"user": 0.36507036000000004,
"system": 0.78680806,
"min": 0.35393133916,
"max": 0.39632839016000004
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26893206140000003,
"stddev": 0.056740488125577984,
"median": 0.24411116160000002,
"user": 0.24629172000000002,
"system": 0.09165904,
"min": 0.20495078310000003,
"max": 0.3800430241
},
{
"command": "pacquet@main",
"mean": 0.22834911702307698,
"stddev": 0.011558865427159544,
"median": 0.22744530110000002,
"user": 0.2011833046153846,
"system": 0.08757307076923077,
"min": 0.21246813210000004,
"max": 0.25048318810000003
},
{
"command": "pnpr@HEAD",
"mean": 0.09275362303103449,
"stddev": 0.0016681247090681943,
"median": 0.0930149101,
"user": 0.03559712689655173,
"system": 0.013345259310344826,
"min": 0.08962549310000001,
"max": 0.0974189401
},
{
"command": "pnpr@main",
"mean": 0.09244617244375002,
"stddev": 0.001764871638997152,
"median": 0.0922802536,
"user": 0.033784326249999996,
"system": 0.013888027499999999,
"min": 0.0889366421,
"max": 0.0974727011
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.36114892552444444,
"stddev": 0.04062779972035492,
"median": 0.35089624408,
"user": 0.38845868888888885,
"system": 0.08199110444444443,
"min": 0.30748532508,
"max": 0.41882212808
},
{
"command": "pacquet@main",
"mean": 0.32176833808,
"stddev": 0.02649376350846696,
"median": 0.32170546608,
"user": 0.35047035555555556,
"system": 0.07627443777777777,
"min": 0.27635376108,
"max": 0.35458289508
},
{
"command": "pnpm@HEAD",
"mean": 3.533663086191111,
"stddev": 0.11422610751562136,
"median": 3.50764076408,
"user": 5.457573355555556,
"system": 0.27845477111111105,
"min": 3.42136609608,
"max": 3.76313870708
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.23790827619454546,
"stddev": 0.015880083110303242,
"median": 0.23070430974,
"user": 0.18681699272727273,
"system": 0.09422700909090907,
"min": 0.21839024674000002,
"max": 0.26020559274000005
},
{
"command": "pacquet@main",
"mean": 0.22641438843230766,
"stddev": 0.013393202321787841,
"median": 0.22062556174,
"user": 0.1700193353846154,
"system": 0.09579594615384615,
"min": 0.21048836574000002,
"max": 0.25619462074000005
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.642452237039999,
"stddev": 0.2328659895544878,
"median": 4.60048707664,
"user": 2.2238109399999995,
"system": 1.7803663399999998,
"min": 4.42675865914,
"max": 5.23163113514
},
{
"command": "pacquet@main",
"mean": 4.569272017039999,
"stddev": 0.11613211930057984,
"median": 4.53836578164,
"user": 2.0329542399999996,
"system": 1.7078080400000004,
"min": 4.46007280114,
"max": 4.86658896814
},
{
"command": "pnpr@HEAD",
"mean": 3.54574297354,
"stddev": 0.15684745530443475,
"median": 3.49016947764,
"user": 1.69456904,
"system": 1.6506678399999999,
"min": 3.39701857114,
"max": 3.83447946714
},
{
"command": "pnpr@main",
"mean": 3.5843413795399997,
"stddev": 0.09139272104328634,
"median": 3.57785175464,
"user": 1.65871814,
"system": 1.6572431399999998,
"min": 3.45508088414,
"max": 3.76404083014
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2014204372177778,
"stddev": 0.04383483274779766,
"median": 0.20234319044,
"user": 0.24820333555555557,
"system": 0.20068067555555558,
"min": 0.13814910144,
"max": 0.28586470744000003
},
{
"command": "pacquet@main",
"mean": 0.14028524033473685,
"stddev": 0.0095979135021148,
"median": 0.13809496944,
"user": 0.17603204315789475,
"system": 0.14502872526315788,
"min": 0.12971908144,
"max": 0.16512097744
},
{
"command": "pnpr@HEAD",
"mean": 0.16123856370666667,
"stddev": 0.010935275041313178,
"median": 0.16465227744,
"user": 0.18863197999999998,
"system": 0.15720108666666663,
"min": 0.13993336744,
"max": 0.17447426644
},
{
"command": "pnpr@main",
"mean": 0.16341933149555554,
"stddev": 0.01128073110686582,
"median": 0.16401070694,
"user": 0.19316794666666665,
"system": 0.16006367555555553,
"min": 0.14540652844,
"max": 0.18143495144
}
]
} |
…oyed manifest `pnpm deploy` copied the workspace root's `devEngines.packageManager` into the deployed `package.json` (pnpm#15434). npm enforces `devEngines` by default, so installing a deploy output with npm made every script of it fail: EBADDEVENGINES: devEngines.packageManager wanted: { name: "pnpm", version: "12.8.1", onFail: "error" } current: { name: "npm", version: "11.7.0" } A deploy directory is meant to be installed by whichever package manager its consumer uses, so it must not carry a development-time contract that rules one of them out. The deployed manifest now inherits only the `packageManager` field, which is the pin corepack reads. The root's `devEngines.packageManager` still outranks its `packageManager` field, so when the root pins an exact version there and declares no `packageManager`, that version is written as the `packageManager` spec instead: the pin pnpm#15434 set out to preserve is kept, without exporting its enforcement. A range or a dist-tag names no version that could be installed, so it falls back to the `packageManager` field. Fixes pnpm#16403. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 7ee9c5ce-96b9-4d2b-a163-a6e5a4a4eb38
27ca480 to
f1469a6
Compare
Review SummarySummary
Evaluation
VerdictApproved. Clean bug fix with complete version coverage and rigorous tests. Reviewed by Zoltan's Agent |
A root `packageManager` naming the same version as the exact pnpm `devEngines.packageManager` entry is now kept as written, so its corepack integrity hash survives. A hash on the devEngines entry is kept too. Only a pnpm entry is converted; an entry for another package manager falls back to the root `packageManager` field. Update both versions' deploy docs, and reword the changeset. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Review by Qodo
1. Website misstates fixed deploy versions
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit 7721b06 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Code review by qodo was updated up to the latest commit deb6db7 |
|
On your question about that sentence in the description: it doesn't hold up, and I removed it. Since b76b9de, deploy doesn't create a Written by an agent (Claude Code, claude-opus-5-5). |
|
Code review by qodo was updated up to the latest commit b76b9de |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
npm runs scripts after a devEngines mismatch when onFail is warn or ignore, so the comments now say the refusal comes with the default. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Qodo's "Deploy comments overstate npm failures" finding is fixed in 19a276b. The Rust and TypeScript doc comments and the Rust test comment now say npm refuses to run scripts with the default Written by an agent (Claude Code, claude-opus-5-5). |
|
Code review by qodo was updated up to the latest commit 19a276b |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Deploy no longer writes the workspace root's `packageManager` or `devEngines.packageManager` into the deployed manifest. This reverts the inheritance added in pnpm#15434. A deploy directory is installed by whatever package manager its consumer uses, and with the default onFail npm refuses to run the scripts of a manifest whose devEngines.packageManager names pnpm. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
There was no good reason. The only one was that Written by an agent (Claude Code, claude-opus-5-5). |
|
Code review by qodo was updated up to the latest commit c2fd79b |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
@coderabbitai resume |
|
@coderabbitai review |
✅ Action performedReviews resumed and review finished. |
|



Summary
pnpm deploystops copying the workspace root'spackageManageranddevEngines.packageManagerinto the deployedpackage.json.#15434 added that copy (for #9079) in 12.7.0 and 11.28.0. A deploy directory is usually run by whatever the target image has, often npm. With the default
onFail, npm refuses to run any script of a manifest whosedevEngines.packageManagernames pnpm, sonpm run startin the deploy output exits withEBADDEVENGINES. ApackageManagerpin can also make corepack or pnpm's own version switching download another pnpm inside the image. The deploy output is for running the app, not developing it, so it carries no pin from the workspace. A project that wants one can declare it in its ownpackage.json, which deploy keeps as-is.This reverts the #15434 inheritance in both the Rust and TypeScript CLIs and removes the dependency on
@pnpm/workspace.project-manifest-readerthat it added to@pnpm/releasing.commands.Closes #16403
Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Originally prepared with AI assistance (GitHub Copilot). Revised by an agent (Claude Code, claude-opus-5-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
package.jsonfiles no longer inherit the workspace root’spackageManagerordevEngines.packageManagerfields. The deployed project’s own runtimedevEnginesentry remains intact.