Repository navigation
refactor(pacquet): rename the Rust crates from pacquet- to pnpm- - #13948
Conversation
The Rust CLI ships as `pnpm`; `pacquet` survives only as the in-repo package identifier that keeps the npm wrapper from colliding with the TypeScript CLI's name. Carrying that identifier into all 75 Cargo crate names made every `use` statement and every `cargo nextest run -p ...` spell a name users never see. This renames the crates to the product they belong to. Mechanical, name-only: package/lib/bin names, the root `[workspace.dependencies]` keys, every dependency entry, and every Rust path reference. All the crates are `publish = false`, so nothing about the released artifacts changes and no changeset is needed. Also updated the tooling and docs that spell crate names: the `codecov` cargo alias, the `registry-mock` just recipe, the release workflow's `-p` targets and `libpnpm_napi.*` artifact paths, and the crate names quoted across `AGENTS.md`, `CONTRIBUTING.md`, `CODE_STYLE_GUIDE.md`, and the plans. Two spots needed more than a token swap. The five insta snapshot files carry the crate name in their filename, since insta derives it from the module path, so they are renamed too — otherwise the tests fail with "snapshot not found" rather than a diff. And the private module in `pnpm-lockfile-verification` that mirrors the npm verifier's violation codes is named after the crate it shadows, so it moved with it. Left alone deliberately, none of which are crate names: the product name in prose and in the changeset package identifier, the `--pacquet` benchmark flag and testbed IDs, test helpers and temp-dir prefixes (`pacquet-test-*`, `../pacquet-store`), the released changesets that quote error codes shipped versions actually emitted, the `.github/workflows/pacquet-*.yml` filenames, and the `@pnpm-private/pacquet-registry-mock-launcher` npm package. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The NAPI addon's shared library is now `libpnpm_napi`, so the old dictionary entry no longer matches anything and the new name tripped the spellcheck. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…calls The shorter crate names let rustfmt fit three macro invocations on one line, and `perfectionist::macro_trailing_comma` rejects a trailing comma there. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Too many files changed for review (934 files, 100 file limit). |
|
Important Review skippedToo many files! This PR contains 928 files, which is 628 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (928)
You can disable this status message by setting the 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 QodoRename Rust workspace crates from
AI Description
Diagram
High-Level Assessment
Files changed (20)
|
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 add REVIEW.md to your repo root and Qodo follows it on every PR |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Micro-Benchmark ResultsLinux |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13948 +/- ##
==========================================
- Coverage 88.14% 88.13% -0.01%
==========================================
Files 643 643
Lines 106028 105968 -60
==========================================
- Hits 93455 93395 -60
Misses 12573 12573 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Picks up a large batch, of which two reshape this branch's changes: #13948 renames the Rust crates from `pacquet-` to `pnpm-`, and #13679 moves the CLI end-to-end tests under `tests/suite/` so they build as one target. This branch's helpers move with them. The `pnpm-testing-utils` mtime helpers keep their names, their imports follow the crate rename, and the `bump_mtime` call sites travel to the relocated suite files. The `Sys: Clock` seam on `build_workspace_state` and its `::<Host>` call sites are re-applied against the renamed crates.
The crate rename (#13948) collided with every import this branch touches, and two changes collided semantically: - `config.registries` became `registries_by_scope` (#13942), so `publish_options` builds its scoped-registry map from the new field. - main's side of `publish_options` still parsed the resolved access through `Access::parse`. This branch forwards it verbatim on purpose -- pnpm validates only `publishConfig.access`, and dropping an unrecognized configured value falls back to the manifest's, which can be the more permissive level. Kept this branch's resolution, on main's field name. The CLI end-to-end tests became a single target under `tests/suite/` (#13679); git carried the three publish/stage files across and they are registered in `main.rs`. Replace this branch's hand-rolled ambient-config isolation with `without_ambient_pnpm_config()` from #13744, which strips every `pnpm_config_*` / `npm_config_*` spelling rather than the five names spelled out here. `CommandTempCwd` already applies it, so the recursive suite only needs the `XDG_CONFIG_HOME` pin that keeps a developer's global `config.yaml` out; the other two build their own command and call it directly. Repoint the `pacquet_publish::` doc references this branch added at `pnpm_publish::`.
Five conflicts, all from main growing its own version of what this branch touches. The Rust crates were renamed from `pacquet-` to `pnpm-` (#13948), so every `pacquet_config::` path in the new code moved with them, and `cli_args/config_warnings.rs` picked up a second warning (`warn_unmatched_registry_options`) beside this branch's emit-once drain. Both halves are additive: the file keeps both, and its test module keeps both test sets. `crates/cli/tests/` is now a single target whose modules live in `tests/suite/` (#13679). Git moved `login.rs` for us but left this branch's new `config_warnings.rs` at the old path, where it would have become its own ~240 MB binary; it moves into `tests/suite/` and is declared in `main.rs`. The substantive one is the config reader. This branch hand-rolled a `REPO_MANIFEST_SKIPPED_SETTINGS` denylist plus a bespoke `IGNORED_SCOPE_WARNING`, and main has since generalized exactly that concept: `PROJECT_MANIFEST_SKIPPED_KEYS`, assembled from the machine locations, the current run's locations, and the credential keys, with one warning that names each refused key and the route that does set it (#13642). Keeping both would leave two denylists answering the same question, so `scope` joins main's as a `LOGIN_TARGET_KEYS` category and the bespoke set and constant are dropped. Users get the unified sentence, which also names the global command, and `pnpm config set scope` in a project now refuses with that same route rather than writing a key the reader would ignore. pacquet has no such mechanism — main left it untouched, since it parses the manifest into a declared struct — so its `IGNORED_SCOPE_WARNING` is reworded to the sentence the TypeScript reader now assembles, keeping the two stacks emitting identical text. The `Config.ts` note on the field goes away with it: main keeps this fact only in the denylist, and `configDir` and its peers carry no such note.
Summary
Renames all 75 Cargo crates of the Rust CLI from the
pacquet-prefix topnpm-.The Rust CLI ships as
pnpm.pacquetsurvives only as the in-repo packageidentifier that keeps the npm wrapper from colliding with the TypeScript CLI's
name — but carrying it into every crate name meant every
usestatement andevery
cargo nextest run -p …spelled a name users never see. This renames thecrates to the product they belong to:
pacquet-lockfile→pnpm-lockfile,pacquet_config→pnpm_config, and so on.The change is mechanical and name-only: package/lib/bin names, the root
[workspace.dependencies]keys, every dependency entry, and every Rust pathreference. All of these crates are
publish = false, so nothing about thereleased artifacts changes.
Two spots needed more than a token swap:
instasnapshot files are renamed as well.instaderives asnapshot's filename from the module path, whose first segment is the crate
name, so leaving them would fail the tests with "snapshot not found" rather
than a diff.
pnpm-lockfile-verificationthat mirrors the npmverifier's violation codes is named after the crate it shadows, so it moved
with it.
where
perfectionist::macro_trailing_commarejects the trailing comma thatwas legal while they were wrapped. Those three commas are dropped.
Tooling and docs that spell crate names were updated too: the
codecovcargoalias, the
registry-mockjust recipe, the release workflow's-ptargets andlibpnpm_napi.*artifact paths, thelibpacquet→libpnpmcspell dictionaryentry, and the crate names quoted across
AGENTS.md,CONTRIBUTING.md,CODE_STYLE_GUIDE.md, and the plans.Deliberately left alone, since none of these are crate names:
--pacquetbenchmark flag and thepacquetBencher testbed IDs.pacquet-test-*,../pacquet-store,../pacquet-cache).actually emitted (
pacquet_package_manager::outdated_lockfile) — rewritingrelease-note history would misreport what users saw.
.github/workflows/pacquet-*.ymlfilenames and their self-referencingpaths:filters.@pnpm-private/pacquet-registry-mock-launchernpm package.Verified green locally:
cargo check --locked --workspace --all-targets,cargo clippy -- -D warnings,RUSTDOCFLAGS=-D warnings cargo doc,cargo fmt --check,taplo format,typos pnpm pnpr, andcargo nextest runfor the three snapshot-bearing crates.
Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.(Rust-internal only — Cargo crate names have no TypeScript counterpart and
no user-visible surface changes, so there is nothing to port.)
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
(Not applicable: every renamed crate is
publish = falseand no publishedpackage changes.)
(No new tests — a rename has no behavior to cover. The five
instasnapshotfiles were renamed so the existing snapshot tests keep matching.)
Written by an agent (Claude Code, claude-opus-5[1m]).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.