Repository navigation
Conversation
|
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)
📝 WalkthroughWalkthroughHoisting tests now verify workspace links survive frozen reinstalls. Lifecycle-script tests add frozen-reinstall coverage for binary links and build-script filtering, plus NDJSON assertions for ignored-script reporting. Test-porting documentation reflects the expanded coverage. ChangesInstall parity tests
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
PR Summary by QodoTests: add frozen-reinstall tails and ignored-scripts reporter assertions
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Confidence Score: 5/5Test-only change adding frozen-reinstall tails and NDJSON reporter-event assertions to existing integration tests; no production code or published packages are touched. All three modified files are tests or documentation. The new No files require special attention. Reviews (3): Last reviewed commit: "test(pacquet): reuse pacquet_in for froz..." | 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 `@pnpm/crates/cli/tests/lifecycle_scripts.rs`:
- Around line 369-375: Avoid redundant CommandTempCwd mock-registry setup in the
frozen-install tests: in pnpm/crates/cli/tests/lifecycle_scripts.rs at lines
369-375 and 435-441, use Command::cargo_bin("pnpm") with the workspace directory
and frozen-install arguments; at lines 513-518 and 590-597, use the equivalent
cargo-bin output builder, preserving the reporter arguments where present.
Remove frozen_root from the drop tuples at lines 391, 449, 529, and 606.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 5a027d42-6797-4701-9d1e-9c973553b640
📒 Files selected for processing (3)
pnpm/crates/cli/tests/hoist.rspnpm/crates/cli/tests/lifecycle_scripts.rspnpm/plans/TEST_PORTING.md
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
… registries Address CodeRabbit review on #13176: the frozen-reinstall reruns spawned a fresh CommandTempCwd (temp dir + mock-registry lease) only to obtain a fresh Command whose cwd was immediately overridden. Use the existing _utils::pacquet_in helper, which anchors a new invocation in the original workspace.
Complete the "Noted missing tails on otherwise-ported tests" section of #13167: - `bins_linked_even_if_scripts_ignored` and `selectively_ignore_scripts_by_allow_builds` now replay `install --frozen-lockfile` after deleting `node_modules` and re-assert the linked bins / ignored scripts, matching the upstream tails. - `selectively_allow_scripts_by_allow_builds` and its exact-versions sibling now assert the `pnpm:ignored-scripts` reporter event through the NDJSON reporter — the channel has landed since the TODO was written — including the empty list under explicit denial. The exact-versions sibling also gains the frozen-reinstall tail its upstream counterpart has. - `hoist_workspace_packages_links_projects_by_name` now covers the frozen-reinstall preservation tail: deleting the root `node_modules` and replaying `--frozen-lockfile` reproduces the name-links. Also refreshes the matching TEST_PORTING.md notes and the stale known_failures doc references in hoist.rs.
… registries Address CodeRabbit review on #13176: the frozen-reinstall reruns spawned a fresh CommandTempCwd (temp dir + mock-registry lease) only to obtain a fresh Command whose cwd was immediately overridden. Use the existing _utils::pacquet_in helper, which anchors a new invocation in the original workspace.
|
Code review by qodo was updated up to the latest commit e3373d7 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Micro-Benchmark ResultsLinux |
|
Code review by qodo was updated up to the latest commit d1baa79 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13176 +/- ##
=======================================
Coverage 86.55% 86.56%
=======================================
Files 510 510
Lines 86274 86274
=======================================
+ Hits 74678 74683 +5
+ Misses 11596 11591 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Completes the "Noted missing tails on otherwise-ported tests" section of #13167 (related to that issue; the rest of it stays open):
bins_linked_even_if_scripts_ignoredandselectively_ignore_scripts_by_allow_builds(pnpm/crates/cli/tests/lifecycle_scripts.rs) previously ran a single fresh install. They now replayinstall --frozen-lockfileafter deletingnode_modulesand re-assert the linked bins / not-run scripts, matching the tails of the upstream tests (installing/deps-installer/test/install/lifecycleScripts.ts:511and:584).selectively_allow_scripts_by_allow_buildscarried two TODOs for thepnpm:ignored-scriptsreporter assertions, left from when pacquet did not emit that channel. The channel exists now, so the test runs the installs under--reporter=ndjsonand asserts the event exactly: the unapproved package (with version) on the fresh install, and an empty list on the frozen reinstall where the package is explicitly denied (allowBuilds: falsemeans "deliberately skipped", not "ignored"). A smallignored_scripts_package_nameshelper asserts the event is emitted exactly once per install.selectively_allow_scripts_by_allow_builds_exact_versionswas not listed in the issue, but its upstream counterpart (lifecycleScripts.ts:643) has the same reporter assertions and frozen-reinstall tail, so it gains both for consistency.hoist_workspace_packages_links_projects_by_name(pnpm/crates/cli/tests/hoist.rs) now covers the frozen-reinstall preservation tail ofinstalling/deps-installer/test/install/hoist.ts:813: deleting the rootnode_modulesand replaying--frozen-lockfilereproduces the workspace name-links into.pnpm/node_modules(and their absence underhoistWorkspacePackages: false). The old "needs partial install" notes were stale — the layout assertions pass against the current implementation.Also refreshes the corresponding
TEST_PORTING.mdnotes and two stale doc references inhoist.rsthat still pointed atknown_failuresstubs which have since become real tests.Test-only change: no behavior changes in either stack and no published package is affected, so there is no changeset. The upstream TypeScript tests already contain these scenarios — this PR closes the coverage gap on the pacquet side.
Ran:
cargo nextest run -p pacquet-cli --test lifecycle_scripts --test hoist(74 passed) plus fmt/clippy via the pre-push checks.Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.(Test-only: the upstream TypeScript tests already cover these scenarios;
this ports their missing tails to pacquet.)
pnpm/plans/TEST_PORTING.md)Written by an agent (Claude Code, claude-fable-5).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
node_modules, including NDJSON assertions forpnpm:ignored-scriptsreporting and verifying expected bin/script artifacts.pnpm:ignored-scriptsassertions for relevant scenarios.