chore(pacquet): fold registry-mock into root workspace, fix npm metadata#11643
Conversation
Two unrelated cleanups bundled because they touch the same publishing/
workspace plumbing:
1. **`pacquet/npm/pacquet/package.json` metadata** — the imported file
still pointed at the standalone repo: `repository.url` was
`pnpm/pacquet`, `repository.directory` was `npm/pacquet`, `homepage`
and `bugs` likewise. Repoint at `pnpm/pnpm`. Update
`generate-packages.mjs` so the per-platform packages it emits at
release time also point at `pnpm/pnpm`.
2. **Fold `pacquet/tasks/registry-mock` into the root pnpm workspace**.
Pacquet's standalone-repo nested-workspace setup pinned
`nodeLinker: hoisted` "for verdaccio CJS resolution," but pnpm's
own jest globalSetup (`__utils__/jest-config/with-registry/`) calls
the same `@pnpm/registry-mock.start()` API under the default
isolated linker without issue, and verified locally that
`node launch.mjs prepare` works after consolidation. The hoisted
constraint was scoped to standalone-pacquet's install pattern; in
the monorepo it's unnecessary.
Changes for (2):
- Add `pacquet/tasks/registry-mock` to `pnpm-workspace.yaml`.
- Rename the package `@pnpm-private/pacquet-registry-mock-launcher`
(private, matches the `@pnpm-private/*` convention used by other
internal workspace members) and switch `@pnpm/registry-mock` to
`catalog:` (the root catalog already pins it at 6.0.0).
- Delete `pacquet/tasks/registry-mock/pnpm-lock.yaml` and
`pnpm-workspace.yaml` — root install handles both now.
- Delete `pacquet/package.json` and `pacquet/pnpm-lock.yaml` — the
file only had a `cargo build` script + `devEngines: pnpm`, both
already covered by root, and nothing referenced it.
- `justfile install` is now just `pnpm install` (was
`cd pacquet/tasks/registry-mock && pnpm install --frozen-lockfile`).
- `pacquet-integrated-benchmark.yml` path filter and cache key
swap the deleted nested lockfile for the root `pnpm-lock.yaml` /
`pnpm-workspace.yaml`.
Verified: `pnpm install` resolves the workspace member, the lockfile
gains a `pacquet/tasks/registry-mock` importer entry, and
`pacquet/tasks/registry-mock/node_modules/@pnpm/registry-mock` is
linked correctly under the isolated layout.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
📝 WalkthroughWalkthroughMoves Pacquet into the pnpm monorepo: workspace entries and package metadata updated, CI path triggers and pnpm cache key now reference root lock/workspace files, repo install target runs pnpm from the repository root, and a previously standalone ChangesPacquet monorepo integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
The previous version of `pacquet/tasks/registry-mock/package.json`
omitted `version`, which crashed `pn lint:meta` (meta-updater hits
`manifest.version!.split('.')[0]` for every workspace package).
Backfill all the fields meta-updater would emit for an internal
`@pnpm-private/*` private package, matching `__typecheck__/package.json`
and friends:
- `version: 1100.0.0` (the pnpm 11.x convention for non-experimental
internal packages)
- self-devDep entry (`workspace:*`) that meta-updater would otherwise
inject
- `keywords: [pnpm, pnpm11]`
- `repository` pointing at this directory inside pnpm/pnpm
This is the same shape every other `@pnpm-private/*` private workspace
member uses; it lets `pn lint:meta --test` pass without modifying the
file.
Restore the `cargo build --release --bin pacquet` shortcut that lived in the deleted `pacquet/package.json`. Naming it `build:pacquet` (rather than `build`) matches the existing namespacing convention in this file (`lint:ts`, `lint:meta`) and leaves room for a general `build` script later. Invoke with `pnpm build:pacquet` or `pn build:pacquet` from the repo root.
Integrated-Benchmark Report (Linux)Scenario: Frozen Lockfile
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.5113658428,
"stddev": 0.06943945183164296,
"median": 2.4901613584000004,
"user": 2.67436008,
"system": 3.87501692,
"min": 2.4324819559,
"max": 2.6617937539000005,
"times": [
2.4580635439000003,
2.4761214679,
2.4324819559,
2.5706333569,
2.5211945099000004,
2.4923346329000005,
2.6617937539000005,
2.4522226899,
2.4879880839000004,
2.5608244329
]
},
{
"command": "pacquet@main",
"mean": 2.439922673900001,
"stddev": 0.05555925224991327,
"median": 2.4280333369000004,
"user": 2.6931532799999998,
"system": 3.853465719999999,
"min": 2.3817420479000004,
"max": 2.5766749399,
"times": [
2.4533231129,
2.4219468119000003,
2.3851167919000003,
2.4341198619,
2.4169924449,
2.4747764139000004,
2.4341353289,
2.5766749399,
2.4203989849000003,
2.3817420479000004
]
},
{
"command": "pnpm",
"mean": 4.8971391587,
"stddev": 0.05264825081113157,
"median": 4.8767123069,
"user": 8.28550578,
"system": 4.28689582,
"min": 4.8417569859,
"max": 4.9917096449,
"times": [
4.8836582139,
4.8697663999000005,
4.8662806519,
4.8417569859,
4.8924196829,
4.9122889529,
4.9885725699000005,
4.9917096449,
4.8667510099,
4.8581874749
]
}
]
}Scenario: Frozen Lockfile (Hot Cache)
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7138983881600001,
"stddev": 0.03183369377160339,
"median": 0.7007828442599999,
"user": 0.36912401999999994,
"system": 1.66448524,
"min": 0.69253707776,
"max": 0.79290850376,
"times": [
0.79290850376,
0.71104937076,
0.69253707776,
0.74637746176,
0.69303017576,
0.70547945476,
0.69995500676,
0.6991158857599999,
0.69692026276,
0.70161068176
]
},
{
"command": "pacquet@main",
"mean": 0.79055081196,
"stddev": 0.0685351134811199,
"median": 0.76067283176,
"user": 0.37277812,
"system": 1.64551804,
"min": 0.73301260176,
"max": 0.96434718676,
"times": [
0.96434718676,
0.75308371176,
0.75617225876,
0.73301260176,
0.80260494876,
0.83817444476,
0.75400208476,
0.76517340476,
0.79056399276,
0.74837348476
]
},
{
"command": "pnpm",
"mean": 2.6047322802600004,
"stddev": 0.12359600853745382,
"median": 2.57628669826,
"user": 3.28351982,
"system": 2.2799068399999998,
"min": 2.4964279687600004,
"max": 2.8534032387600003,
"times": [
2.50272325876,
2.6050683287600003,
2.59424889876,
2.7964310937600003,
2.55832449776,
2.54300460876,
2.50171935576,
2.4964279687600004,
2.8534032387600003,
2.5959715527600005
]
}
]
} |
…ata (pnpm#11643) * chore(pacquet): fold registry-mock into root workspace, fix npm metadata Two unrelated cleanups bundled because they touch the same publishing/ workspace plumbing: 1. **`pacquet/npm/pacquet/package.json` metadata** — the imported file still pointed at the standalone repo: `repository.url` was `pnpm/pacquet`, `repository.directory` was `npm/pacquet`, `homepage` and `bugs` likewise. Repoint at `pnpm/pnpm`. Update `generate-packages.mjs` so the per-platform packages it emits at release time also point at `pnpm/pnpm`. 2. **Fold `pacquet/tasks/registry-mock` into the root pnpm workspace**. Pacquet's standalone-repo nested-workspace setup pinned `nodeLinker: hoisted` "for verdaccio CJS resolution," but pnpm's own jest globalSetup (`__utils__/jest-config/with-registry/`) calls the same `@pnpm/registry-mock.start()` API under the default isolated linker without issue, and verified locally that `node launch.mjs prepare` works after consolidation. The hoisted constraint was scoped to standalone-pacquet's install pattern; in the monorepo it's unnecessary. Changes for (2): - Add `pacquet/tasks/registry-mock` to `pnpm-workspace.yaml`. - Rename the package `@pnpm-private/pacquet-registry-mock-launcher` (private, matches the `@pnpm-private/*` convention used by other internal workspace members) and switch `@pnpm/registry-mock` to `catalog:` (the root catalog already pins it at 6.0.0). - Delete `pacquet/tasks/registry-mock/pnpm-lock.yaml` and `pnpm-workspace.yaml` — root install handles both now. - Delete `pacquet/package.json` and `pacquet/pnpm-lock.yaml` — the file only had a `cargo build` script + `devEngines: pnpm`, both already covered by root, and nothing referenced it. - `justfile install` is now just `pnpm install` (was `cd pacquet/tasks/registry-mock && pnpm install --frozen-lockfile`). - `pacquet-integrated-benchmark.yml` path filter and cache key swap the deleted nested lockfile for the root `pnpm-lock.yaml` / `pnpm-workspace.yaml`. Verified: `pnpm install` resolves the workspace member, the lockfile gains a `pacquet/tasks/registry-mock` importer entry, and `pacquet/tasks/registry-mock/node_modules/@pnpm/registry-mock` is linked correctly under the isolated layout. * fix(pacquet): match meta-updater conventions in registry-mock launcher The previous version of `pacquet/tasks/registry-mock/package.json` omitted `version`, which crashed `pn lint:meta` (meta-updater hits `manifest.version!.split('.')[0]` for every workspace package). Backfill all the fields meta-updater would emit for an internal `@pnpm-private/*` private package, matching `__typecheck__/package.json` and friends: - `version: 1100.0.0` (the pnpm 11.x convention for non-experimental internal packages) - self-devDep entry (`workspace:*`) that meta-updater would otherwise inject - `keywords: [pnpm, pnpm11]` - `repository` pointing at this directory inside pnpm/pnpm This is the same shape every other `@pnpm-private/*` private workspace member uses; it lets `pn lint:meta --test` pass without modifying the file. * fix: update lockfile * chore(pacquet): add build:pacquet script at root Restore the `cargo build --release --bin pacquet` shortcut that lived in the deleted `pacquet/package.json`. Naming it `build:pacquet` (rather than `build`) matches the existing namespacing convention in this file (`lint:ts`, `lint:meta`) and leaves room for a general `build` script later. Invoke with `pnpm build:pacquet` or `pn build:pacquet` from the repo root.
Summary
Two unrelated cleanups bundled because they touch the same publishing/workspace plumbing.
1. Fix stale npm metadata in
pacquet/npm/pacquet/package.jsonThe imported manifest still pointed at the standalone repo:
repository.url:https://github.com/pnpm/pacquet→https://github.com/pnpm/pnpmrepository.directory:npm/pacquet→pacquet/npm/pacquethomepage:https://github.com/pnpm/pacquet→https://github.com/pnpm/pnpm/tree/main/pacquetbugs:https://github.com/pnpm/pacquet/issues→https://github.com/pnpm/pnpm/issuesgenerate-packages.mjsemits per-platform packages (pacquet-linux-x64, etc.) at release time — its hardcodedrepository.urlwas also repointed atpnpm/pnpm.2. Fold
pacquet/tasks/registry-mockinto the root pnpm workspaceThe standalone-pacquet setup put
pacquet/tasks/registry-mockin its own nested workspace withnodeLinker: hoisted, citing verdaccio CJS resolution problems. But pnpm/pnpm's own jest globalSetup (__utils__/jest-config/with-registry/) calls the same@pnpm/registry-mock.start()API under the default isolated linker without issue — the hoisted constraint was scoped to standalone-pacquet's install pattern, not a verdaccio-wide requirement.Verified locally:
pnpm installresolves the new workspace member; rootpnpm-lock.yamlgains apacquet/tasks/registry-mockimporter entry.pacquet/tasks/registry-mock/node_modules/@pnpm/registry-mockis linked correctly under the isolated layout.node launch.mjs prepareruns successfully — verdaccio writes its config + storage.Changes:
pacquet/tasks/registry-mocktopnpm-workspace.yaml.@pnpm-private/pacquet-registry-mock-launcher(matches the@pnpm-private/*convention other internal members use) and switch@pnpm/registry-mocktocatalog:(root catalog already pins it at 6.0.0).pacquet/tasks/registry-mock/pnpm-lock.yamlandpnpm-workspace.yaml— root install handles both.pacquet/package.jsonandpacquet/pnpm-lock.yaml— the file only had acargo buildscript +devEngines: pnpm, both already covered by root, and nothing referenced it operationally.justfile installis now justpnpm install(wascd pacquet/tasks/registry-mock && pnpm install --frozen-lockfile).pacquet-integrated-benchmark.ymlpath filter and cache key swap the deleted nested lockfile for rootpnpm-lock.yaml/pnpm-workspace.yaml.Test plan
Pacquet CI / Lint and Testpasses on all 3 OSes (validates that the registry-mock launcher resolves@pnpm/registry-mockunder isolated linker).Pacquet Integrated-Benchmarktriggers correctly on changes topnpm-lock.yaml/pnpm-workspace.yaml(the new path filters).pnpm install, thencd pacquet/tasks/registry-mock && node launch.mjs prepareexits 0 and verdaccio's~/.config/verdaccio/and~/.local/share/verdaccio/storage/get populated.Written by an agent (Claude Code, claude-opus-4-7).
Summary by CodeRabbit
Chores
New Scripts