Conversation
`pnpm ci` was missing `recursiveByDefault`, so in a workspace the composed install handler ran only against the root and never linked dependencies into workspace packages. Closes #11427.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughA patch release for ChangesFix: pnpm ci Workspace node_modules Reinstall
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes a workspace regression in pnpm ci: when run inside a workspace, the command now follows the same recursive-default path as pnpm install, so workspace package node_modules directories are rebuilt after the clean step.
Changes:
- Mark
pnpm ci/clean-installas recursive-by-default so workspace project selection is initialized inmain.ts. - Add a regression test covering
pnpm ciin a workspace and asserting a package-level dependency link is restored. - Add a patch changeset entry documenting the fix for issue #11427.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pnpm/src/cmd/cleanInstall.ts |
Enables recursive-by-default behavior for ci, aligning workspace handling with install. |
pnpm/test/ci.ts |
Adds a regression test proving workspace package node_modules is repopulated after pnpm ci. |
pnpm/.changeset/ci-recursive-by-default.md |
Records the user-facing patch note for the workspace ci fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
`pnpm ci` was missing `recursiveByDefault`, so in a workspace the composed install handler ran only against the root and never linked dependencies into workspace packages. Closes #11427.
Summary
pnpm ciwas missingrecursiveByDefault, so when invoked in a workspace,main.tsskipped the workspace setup that buildsselectedProjectsGraph/allProjects. The composedinstall.handlerthen ran only against the root project and never linked dependencies into workspace packages.node_modulesis repopulated afterpnpm ci.Closes #11427.
Test plan
pnpm --filter pnpm test test/ci.ts(4 tests pass, including the new workspace one)packages/foo/node_modules/<dep>exists post-pnpm ciSummary by CodeRabbit
Bug Fixes
pnpm cinow properly reinstalls node_modules directories for workspace packages following the clean step, ensuring all dependencies are available in monorepo environments.