Fix bin/setup failing on pnpm workspace member directories#2477
Fix bin/setup failing on pnpm workspace member directories#2477
Conversation
Workspace members like spec/dummy don't have their own pnpm-lock.yaml — their dependencies are managed by the root pnpm install. Skip running pnpm install --frozen-lockfile in directories without a lockfile. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe setup script now runs Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Greptile SummaryFixed
The change is minimal, well-targeted, and aligns with pnpm workspace conventions where member packages don't maintain their own lockfiles. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: e3d38d3 |
ReviewThe fix is correct and minimal. Workspace members ( A few observations: 1. Implicit assumption about what a missing lockfile means The heuristic is: "if A more explicit alternative would be checking for 2.
3. Ordering in The script always calls Summary: Functionally correct. The lockfile heuristic works for the current directory set. Points 1 and 2 are worth noting for robustness as the repo evolves, but neither is a blocker. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@bin/setup`:
- Around line 160-168: The current branch that detects workspace-managed
packages (elif [ -f "package.json" ]) silently prints success when
pnpm-lock.yaml is missing; change that to make skips visible and optionally
tighten detection: in the elif block replace print_success with print_warning
(so missing lockfile is surfaced), and if you want a stricter fix add an
explicit allowlist (e.g. WORKSPACE_ONLY_DIRS or WORKSPACE_MANAGED_DIRS) and
check membership before skipping the install instead of relying solely on
pnpm-lock.yaml; keep the pnpm install path (pnpm install --frozen-lockfile and
print_error on failure) unchanged.
|
Addressed both open review points in
This keeps behavior the same while avoiding false "success" signaling and making the heuristic explicit. |
|
The fix is correct and well-scoped. In a pnpm workspace, only the root directory has a pnpm-lock.yaml; member packages like spec/dummy are covered by the root install. Running pnpm install --frozen-lockfile inside a member directory would always fail because there is no lockfile to freeze against. This change properly guards against that. One minor note (see inline): the print_warning call on the skip path uses a Warning prefix and the hedge word assuming, which could confuse contributors into thinking something went wrong. Since skipping is the correct behavior for workspace members, a neutral informational echo message would be clearer. Everything else looks good: the AND condition on line 160 is the right approach, the root directory setup is unaffected since it has pnpm-lock.yaml, and the change is minimal without introducing new control-flow complexity. |
|
Updated as requested: the workspace-member case now uses plain informational output instead of warning semantics. |
ReviewThe fix is correct and well-scoped. Workspace members like A few observations: Heuristic is appropriate — using Minor: silent skip for unexpected missing lockfiles — If a directory has Message style is consistent — the new Overall: clean, minimal fix. LGTM. |
Co-Authored-By: Claude Opus 4.6 <[email protected]>
…k cleanup (#2596) ## Summary - Added missing changelog entries for PRs #2439, #2477, #2554 - Stamped version header for 16.4.0.rc.9 (collapsed rc.8 into rc.9) - **Fixed rake task bug**: `collapse_prerelease_sections` removed section headers but left behind orphaned compare links at the bottom of CHANGELOG.md. Added `cleanup_collapsed_prerelease_links` to remove these links and update `[unreleased]` to compare from the last stable version. ## Changes 1. **CHANGELOG.md**: New entries + rc.9 stamp + removed orphaned `[16.4.0.rc.8]` link 2. **update_changelog.rake**: Added `cleanup_collapsed_prerelease_links` function, called from `prepare_changelog_for_auto_version` 3. **update_changelog_rake_helpers_spec.rb**: 3 new tests covering link cleanup (multi-prerelease chain, single prerelease, no prereleases) ## Skipped PRs (not user-visible) - #2593 — test only (lock instrumentation) - #2591 — test only (Jest clearMocks) - #2588 — internal refactoring (Thor shell output) - #2584 — docs restructuring - #2587 — internal tooling (release script) - #2589 — docs fix (JWT claim name) - #2586 — docs/CI (dead link removal) ## Test plan - [x] All 13 rake helper tests pass (3 new) - [ ] CI passes - [ ] After merge, run `rake release` to publish 16.4.0.rc.9 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed bin/setup failing in pnpm workspace member directories. * **New Features** * Added host configuration option for the Node Renderer Fastify worker. * **Improvements / Changed** * Automatic installation of react_on_rails_pro enabled for --rsc/--pro flags. * Clarified Pro-installation signaling related to immediate hydration warnings. * Updated changelog to include RC9 entries and ensure Unreleased links point to the correct base. * **Documentation** * Added startup warning and remediation guidance for unsafe compression middleware callbacks. * **Tests** * Added tests covering changelog prerelease-link cleanup behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
…k cleanup (#2596) ## Summary - Added missing changelog entries for PRs #2439, #2477, #2554 - Stamped version header for 16.4.0.rc.9 (collapsed rc.8 into rc.9) - **Fixed rake task bug**: `collapse_prerelease_sections` removed section headers but left behind orphaned compare links at the bottom of CHANGELOG.md. Added `cleanup_collapsed_prerelease_links` to remove these links and update `[unreleased]` to compare from the last stable version. ## Changes 1. **CHANGELOG.md**: New entries + rc.9 stamp + removed orphaned `[16.4.0.rc.8]` link 2. **update_changelog.rake**: Added `cleanup_collapsed_prerelease_links` function, called from `prepare_changelog_for_auto_version` 3. **update_changelog_rake_helpers_spec.rb**: 3 new tests covering link cleanup (multi-prerelease chain, single prerelease, no prereleases) ## Skipped PRs (not user-visible) - #2593 — test only (lock instrumentation) - #2591 — test only (Jest clearMocks) - #2588 — internal refactoring (Thor shell output) - #2584 — docs restructuring - #2587 — internal tooling (release script) - #2589 — docs fix (JWT claim name) - #2586 — docs/CI (dead link removal) ## Test plan - [x] All 13 rake helper tests pass (3 new) - [ ] CI passes - [ ] After merge, run `rake release` to publish 16.4.0.rc.9 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed bin/setup failing in pnpm workspace member directories. * **New Features** * Added host configuration option for the Node Renderer Fastify worker. * **Improvements / Changed** * Automatic installation of react_on_rails_pro enabled for --rsc/--pro flags. * Clarified Pro-installation signaling related to immediate hydration warnings. * Updated changelog to include RC9 entries and ensure Unreleased links point to the correct base. * **Documentation** * Added startup warning and remediation guidance for unsafe compression middleware callbacks. * **Tests** * Added tests covering changelog prerelease-link cleanup behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
…k cleanup (#2596) ## Summary - Added missing changelog entries for PRs #2439, #2477, #2554 - Stamped version header for 16.4.0.rc.9 (collapsed rc.8 into rc.9) - **Fixed rake task bug**: `collapse_prerelease_sections` removed section headers but left behind orphaned compare links at the bottom of CHANGELOG.md. Added `cleanup_collapsed_prerelease_links` to remove these links and update `[unreleased]` to compare from the last stable version. ## Changes 1. **CHANGELOG.md**: New entries + rc.9 stamp + removed orphaned `[16.4.0.rc.8]` link 2. **update_changelog.rake**: Added `cleanup_collapsed_prerelease_links` function, called from `prepare_changelog_for_auto_version` 3. **update_changelog_rake_helpers_spec.rb**: 3 new tests covering link cleanup (multi-prerelease chain, single prerelease, no prereleases) ## Skipped PRs (not user-visible) - #2593 — test only (lock instrumentation) - #2591 — test only (Jest clearMocks) - #2588 — internal refactoring (Thor shell output) - #2584 — docs restructuring - #2587 — internal tooling (release script) - #2589 — docs fix (JWT claim name) - #2586 — docs/CI (dead link removal) ## Test plan - [x] All 13 rake helper tests pass (3 new) - [ ] CI passes - [ ] After merge, run `rake release` to publish 16.4.0.rc.9 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed bin/setup failing in pnpm workspace member directories. * **New Features** * Added host configuration option for the Node Renderer Fastify worker. * **Improvements / Changed** * Automatic installation of react_on_rails_pro enabled for --rsc/--pro flags. * Clarified Pro-installation signaling related to immediate hydration warnings. * Updated changelog to include RC9 entries and ensure Unreleased links point to the correct base. * **Documentation** * Added startup warning and remediation guidance for unsafe compression middleware callbacks. * **Tests** * Added tests covering changelog prerelease-link cleanup behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
Summary
bin/setupwas failing on workspace member directories (e.g.,spec/dummy) because it ranpnpm install --frozen-lockfilein directories without apnpm-lock.yamlpnpm install, so they don't need their own install steppnpm install, and prints a message that dependencies are managed by the workspace rootTest plan
bin/setup --skip-prolocally — completes successfully🤖 Generated with Claude Code
Note
Low Risk
Small, localized change to setup scripting that only relaxes a directory-level precondition for running
pnpm install.Overview
Fixes
bin/setupfailures in pnpm workspace member directories by only runningpnpm install --frozen-lockfilewhen a localpnpm-lock.yamlexists.If a directory has a
package.jsonbut no lockfile (typical for workspace members like dummy apps), the script now skips the install step and reports that JS dependencies are managed by the workspace root.Written by Cursor Bugbot for commit e3d38d3. Configure here.
Summary by CodeRabbit