Skip to content

chore(pacquet): fold registry-mock into root workspace, fix npm metadata#11643

Merged
zkochan merged 4 commits into
mainfrom
pacquet-workspace-cleanup
May 14, 2026
Merged

chore(pacquet): fold registry-mock into root workspace, fix npm metadata#11643
zkochan merged 4 commits into
mainfrom
pacquet-workspace-cleanup

Conversation

@zkochan

@zkochan zkochan commented May 14, 2026

Copy link
Copy Markdown
Member

Summary

Two unrelated cleanups bundled because they touch the same publishing/workspace plumbing.

1. Fix stale npm metadata in pacquet/npm/pacquet/package.json

The imported manifest still pointed at the standalone repo:

  • repository.url: https://github.com/pnpm/pacquethttps://github.com/pnpm/pnpm
  • repository.directory: npm/pacquetpacquet/npm/pacquet
  • homepage: https://github.com/pnpm/pacquethttps://github.com/pnpm/pnpm/tree/main/pacquet
  • bugs: https://github.com/pnpm/pacquet/issueshttps://github.com/pnpm/pnpm/issues

generate-packages.mjs emits per-platform packages (pacquet-linux-x64, etc.) at release time — its hardcoded repository.url was also repointed at pnpm/pnpm.

2. Fold pacquet/tasks/registry-mock into the root pnpm workspace

The standalone-pacquet setup put pacquet/tasks/registry-mock in its own nested workspace with nodeLinker: 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 install resolves the new workspace member; root pnpm-lock.yaml gains a pacquet/tasks/registry-mock importer entry.
  • pacquet/tasks/registry-mock/node_modules/@pnpm/registry-mock is linked correctly under the isolated layout.
  • node launch.mjs prepare runs successfully — verdaccio writes its config + storage.

Changes:

  • Add pacquet/tasks/registry-mock to pnpm-workspace.yaml.
  • Rename the package @pnpm-private/pacquet-registry-mock-launcher (matches the @pnpm-private/* convention other internal members use) and switch @pnpm/registry-mock to catalog: (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.
  • 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 operationally.
  • 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 root pnpm-lock.yaml / pnpm-workspace.yaml.

Test plan

  • CI: Pacquet CI / Lint and Test passes on all 3 OSes (validates that the registry-mock launcher resolves @pnpm/registry-mock under isolated linker).
  • CI: Pacquet Integrated-Benchmark triggers correctly on changes to pnpm-lock.yaml / pnpm-workspace.yaml (the new path filters).
  • Locally: pnpm install, then cd pacquet/tasks/registry-mock && node launch.mjs prepare exits 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

    • Updated package metadata to point to the monorepo location.
    • Consolidated installs to run from the repository root and added the registry-mock package to the workspace.
    • Adjusted CI to monitor root lockfiles and align pnpm cache behavior with the root lockfile.
    • Switched a dev dependency to a catalog-based reference and removed legacy package metadata.
  • New Scripts

    • Added a build script to produce the pacquet binary.

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.
Copilot AI review requested due to automatic review settings May 14, 2026 18:07
@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bf88978d-f748-4e27-9eec-4fcb7c1bafe0

📥 Commits

Reviewing files that changed from the base of the PR and between 1cb32f5 and 1e4bfd2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json
✅ Files skipped from review due to trivial changes (1)
  • package.json
📜 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)
  • GitHub Check: Run benchmark on ubuntu-latest
  • GitHub Check: Lint and Test (macos-latest)
  • GitHub Check: Lint and Test (ubuntu-latest)
  • GitHub Check: Dylint
  • GitHub Check: Lint and Test (windows-latest)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Compile & Lint

📝 Walkthrough

Walkthrough

Moves 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 pacquet/package.json entry was removed.

Changes

Pacquet monorepo integration

Layer / File(s) Summary
Workspace wiring
pnpm-workspace.yaml, pacquet/tasks/registry-mock/pnpm-workspace.yaml
Adds pacquet/tasks/registry-mock to root packages and removes the nested workspace overrides (allowBuilds.core-js, nodeLinker: hoisted) previously defined under the registry-mock workspace.
Repo-level install flow
justfile, pacquet/tasks/registry-mock/package.json
just install target now runs pnpm install --frozen-lockfile --prefer-offline from the repository root (comments added); @pnpm/registry-mock devDependency in registry-mock switched from ^6.0.0 to a catalog: spec.
CI workflow triggers & cache
.github/workflows/pacquet-integrated-benchmark.yml
Pull request path filters updated to monitor root pnpm-lock.yaml and pnpm-workspace.yaml instead of registry-mock copies; pnpm cache key now hashes the root pnpm-lock.yaml.
Package metadata & generation
pacquet/npm/pacquet/package.json, pacquet/npm/pacquet/scripts/generate-packages.mjs
homepage, bugs, and repository metadata changed to reference https://github.com/pnpm/pnpm with repository.directory set to pacquet/npm/pacquet; the package generator now emits repository.url pointing to pnpm/pnpm.
Removed standalone pacquet manifest
pacquet/package.json
Previous root pacquet/package.json content (workspace-root metadata and devEngines.packageManager / build script) was removed from the diff.
Build script
package.json
Adds build:pacquet script: cargo build --release --bin pacquet.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • pnpm/pnpm#11635: Related adjustments to Pacquet CI triggers and install location to align with pnpm monorepo layout.

Poem

"🐰 I hopped from root to branch with cheer,
Moved packages where the paths are clear.
Workspaces joined, workflows re-tuned,
A cosy burrow — code cocooned.
Carrots for builds, and hops to cheer!"

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main changes: folding registry-mock into root workspace and fixing npm metadata, both of which are primary objectives of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pacquet-workspace-cleanup

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

zkochan added 2 commits May 14, 2026 20:13
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.
Copilot AI review requested due to automatic review settings May 14, 2026 18:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.
@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Scenario: Frozen Lockfile

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.511 ± 0.069 2.432 2.662 1.03 ± 0.04
pacquet@main 2.440 ± 0.056 2.382 2.577 1.00
pnpm 4.897 ± 0.053 4.842 4.992 2.01 ± 0.05
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)

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 713.9 ± 31.8 692.5 792.9 1.00
pacquet@main 790.6 ± 68.5 733.0 964.3 1.11 ± 0.11
pnpm 2604.7 ± 123.6 2496.4 2853.4 3.65 ± 0.24
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
      ]
    }
  ]
}

@zkochan zkochan merged commit 1575076 into main May 14, 2026
20 of 21 checks passed
@zkochan zkochan deleted the pacquet-workspace-cleanup branch May 14, 2026 19:05
github-actions Bot pushed a commit to Eyalm321/pnpm that referenced this pull request May 18, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants