Repository navigation
fix(install): record pnpm@<release version> in .modules.yaml - #13087
Conversation
`.modules.yaml` recorded `packageManager: "[email protected]"`, which is wrong on both halves. `pacquet` is an in-repo crate name that has no meaning outside this repository — the CLI ships as `pnpm`. And `CARGO_PKG_VERSION` is the crate's version (`0.0.1`), not the release version the user installed (`12.0.0-alpha.13`). The TypeScript CLI writes `${name}@${version}` sourced from its own package.json, so it records `[email protected]`. It also branches on `packageManager.name === 'pnpm'` when deriving `pnpmVersion` (`installing/deps-installer/src/install/index.ts`), which shows the name half is meaningful and not decorative. Use `pacquet_config::PNPM_VERSION`, the constant `pnpm --version` already prints. Its doc comment records that `pnpm bump` keeps it in sync with the npm wrapper package's version and that the release workflow verifies the two match, so it is the release version by construction. Nothing reads the field back in either stack — it is informational metadata — so this changes no behavior. It is still part of the on-disk contract that external tooling can inspect, and it should not name a crate the user has never heard of. Tighten the test from a `starts_with("pacquet@")` prefix check to an exact comparison against `pnpm@{PNPM_VERSION}`, so a future drift between the recorded name/version and the release version fails.
|
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)
📝 WalkthroughWalkthroughThe package manager now writes ChangesModules manifest version metadata
Estimated code review effort: 1 (Trivial) | ~5 minutes 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 QodoFix .modules.yaml packageManager to record pnpm@
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Confidence Score: 5/5Safe to merge. The change is a single-line correction to an informational metadata field that nothing in either stack reads back. The test is made strictly stronger, and PNPM_VERSION is already the canonical constant used everywhere else in the codebase. The fix is minimal and correct: it replaces a compile-time string literal that embedded the wrong crate name and crate version with the same No files require special attention. The two test files in Reviews (1): Last reviewed commit: "fix(install): record pnpm@<release versi..." | Re-trigger Greptile |
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1. Changeset missing pnpm entry
|
| --- | ||
| "pacquet": patch | ||
| --- |
There was a problem hiding this comment.
1. Changeset missing pnpm entry 📘 Rule violation § Compliance
The new changeset file lists only pacquet and does not declare a bump type for the pnpm package. This violates the changeset requirement and may prevent the user-facing change from being released under the correct package.
Agent Prompt
## Issue description
The changeset front-matter is missing an entry for the `pnpm` package.
## Issue Context
Per compliance requirements, changeset files must explicitly include `pnpm` with a valid bump type (`patch`/`minor`/`major`).
## Fix Focus Areas
- .changeset/modules-yaml-package-manager-pnpm.md[1-3]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Micro-Benchmark ResultsLinux |
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☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
node_modules/.modules.yamlrecordedpackageManager: "[email protected]", which is wrong on both halves:pacquetis an in-repo crate name with no meaning outside this repository — the CLI ships aspnpm.CARGO_PKG_VERSIONis the crate's version (0.0.1), not the release version the user installed (12.0.0-alpha.13).The TypeScript CLI writes
${name}@${version}sourced from its own package.json, so it records[email protected]. It also branches onpackageManager.name === 'pnpm'when derivingpnpmVersion(installing/deps-installer/src/install/index.ts:1133), which shows the name half is meaningful rather than decorative.This PR uses
pacquet_config::PNPM_VERSION— the constantpnpm --versionalready prints. Its doc comment records thatpnpm bumpkeeps it in sync with the npm wrapper package's version (pnpm/npm/pnpm/package.json) and that the release workflow verifies the two match before building, so it is the release version by construction rather than by convention.Risk
None to behavior. Neither stack reads the field back — I checked both: it is written by pacquet's
install.rsand by the TypeScriptdeps-installer/deps-restorer, and read by neither. It is informational metadata. It is still part of the on-disk contract that external tooling can inspect, and it should not name a crate the user has never heard of.Verified
cargo nextest run -p pacquet-package-manager— 730/730 pass.The existing test checked only the
starts_with("pacquet@")prefix, so it would not have caught the wrong version. It is now an exact comparison againstpnpm@{PNPM_VERSION}, which fails if the recorded name or version ever drifts from the release version.Found while confirming the fix for #13025. Related to #13086, which cleans up the same internal name leaking into error messages and
--helptext; this one is separate because it changes data written to disk rather than wording, and warrants its own release note.Squash Commit Body
Checklist
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.
Written by an agent (Claude Code, claude-opus-4-8).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
.modules.yamlmetadata to report the correctpnpm@<version>package manager value.