Repository navigation
fix(add): add to the existing allowBuilds instead of replacing it - #13873
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? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 5 remain after this review. 📝 WalkthroughWalkthrough
ChangesAllow-build policy update
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change preserves existing allowBuilds entries when adding a new approved build, with no actionable merge-blocking risk remaining beyond normal checks and review. Assessment against linked issues
Suggested labels: Suggested reviewers: ✨ 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 |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (3): Last reviewed commit: "test(add): call the workspace manifest w..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@pnpm11/pnpm/test/install/lifecycleScripts.ts`:
- Line 191: Update the execPnpmSync call in the lifecycleScripts regression test
to pass { expectSuccess: true }, ensuring pnpm add failures abort the test
before manifest assertions while preserving validation of both allowBuilds
entries.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: cca0ff57-b4e9-44de-a508-afa411c96a90
📒 Files selected for processing (3)
.changeset/add-allow-build-keeps-existing-entries.mdpnpm11/installing/commands/src/add.tspnpm11/pnpm/test/install/lifecycleScripts.ts
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
The red windows shard fails the same way on a clean main with nothing applied: a git dependency gets recorded as |
|
@lazerg some maintainer feedback from @btea in #13872 (comment)
Can you sync this with the Rust version? |
|
@karlhorky @btea I checked the Rust side before changing anything, and I don't think it has this bug. On the Rust CLI, Tested with the Rust binary built from current main ( # pnpm-workspace.yaml before
packages:
- "."
allowBuilds:
esbuild: true# pnpm-workspace.yaml after
packages:
- "."
allowBuilds:
esbuild: true
unrs-resolver: trueTwo The TS handler was the only one that started from an empty map, so the fix in this PR is TS only. If you tested against a Rust build and saw the entry disappear, tell me the version and the manifest you started from and I will dig in again. |
The allowBuilds regression test read `pnpm-workspace.yaml` into a variable named `modulesManifest`, which names a different file. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
f435f7c to
22af21c
Compare
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can route each action level your way: inline, summary, both, or drop |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
@karlhorky you are a member. You can approve PRs. |
The allowBuilds merge fix already landed on main with its own changeset, so this one would duplicate the release note. The remaining PR content is internal/test-only and needs no changeset. Co-Authored-By: Claude Fable 5 <[email protected]>
The scalar-budget regression test built a 96 MB lockfile out of a million importer lines, so parsing allocated a million AST nodes and the test ran for many minutes (or timed out) instead of exercising the one thing it guards: that a document larger than the parser's 64 MiB default scalar budget still parses. A single 65 MiB scalar crosses the same budget and parses in under a second. Also drops a needless `return` in pnpm-fs's is_symlink_or_junction, uses `.cast()` instead of `as _` for the raw handle passed to GetFileInformationByHandle in the injected-deps syncer, and extends the --allow-build merge test with a string-valued allowBuilds entry. The allowBuilds fix this PR originally carried was superseded by #13873 (Closes #13872 there). --------- Co-authored-by: Zoltan Kochan <[email protected]>
Summary
pnpm add --allow-build=foowritesallowBuildsfrom scratch out of the names the flag carried, so anything already inpnpm-workspace.yamlis gone after the command:The next install then reports
unrs-resolveras an ignored build again.The handler built two maps. One started empty and went to
writeSettings, the other started fromopts.allowBuildsand went toinstallDeps. Only the second carried what was already on disk, which is why the install itself still ran every approved build while the file quietly lost entries. Seeding the written map the same way fixes it and makes the second map redundant.approve-buildsandpnpm add -galready merge this way.pacquet needs no counterpart:
set_allow_buildsupserts one entry at a time into the existing document and never rewrites the block.Fixes #13872
Squash Commit Body
Checklist
already linked to it solves it.
pnpm/port, or the description notes what still needs porting.pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
pnpm add --allow-buildnow preserves existingallowBuildsentries while adding newly approved packages.pnpm-workspace.yamlremain effective after adding new package approvals.