mirror of
https://github.com/pnpm/pnpm.git
synced 2026-06-01 04:28:22 -04:00
* 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.
75 lines
3.4 KiB
JSON
75 lines
3.4 KiB
JSON
{
|
|
"name": "monorepo-root",
|
|
"private": true,
|
|
"scripts": {
|
|
"bump": "node __utils__/scripts/src/bump.ts && pn update-manifests",
|
|
"changeset": "changeset",
|
|
"prepare": "husky",
|
|
"pretest": "pn compile-only && pn prepare-fixtures",
|
|
"prepare-fixtures": "pn --dir=__fixtures__ prepareFixtures",
|
|
"lint": "pn spellcheck && pn lint:meta && pn lint:ts",
|
|
"spellcheck": "cspell \"**/*.ts\" \"**/README.md\" \".changeset/*.md\" --no-progress",
|
|
"lint:ts": "eslint \"**/src/**/*.ts\" \"**/test/**/*.ts\" --cache",
|
|
"test-all": "pn pretest && pn lint && pn test-pkgs-all",
|
|
"ci:test-all": "pn prepare-fixtures && pn test-pkgs-all",
|
|
"remove-temp-dir": "shx rm -rf ../pnpm_tmp",
|
|
"test-pkgs-all": "pn remove-temp-dir && pn --no-sort --workspace-concurrency=1 -r .test",
|
|
"test-branch": "pn pretest && pn lint && git remote set-branches --add origin main && git fetch origin main && pn test-pkgs-branch",
|
|
"ci:test-branch": "pn prepare-fixtures && pn test-pkgs-branch",
|
|
"test-pkgs-branch": "pn remove-temp-dir && pn --workspace-concurrency=1 --filter=...[origin/main] --no-sort --if-present .test",
|
|
"compile-only": "tsgo --build workspace/workspace-manifest-reader workspace/projects-reader && pnx node@runtime:24.6.0 __utils__/scripts/src/typecheck-only.ts && pn -F=pnpm compile",
|
|
"compile": "pn compile-only && pn update-manifests",
|
|
"build:pacquet": "cargo build --release --bin pacquet",
|
|
"make-lcov": "shx mkdir -p coverage && lcov-result-merger './packages/*/coverage/lcov.info' 'coverage/lcov.info'",
|
|
"update-manifests": "pn meta-updater && pn install",
|
|
"meta-updater": "pn --filter=@pnpm-private/updater compile && pn exec meta-updater",
|
|
"lint:meta": "pn meta-updater --test",
|
|
"copy-artifacts": "node __utils__/scripts/src/copy-artifacts.ts",
|
|
"make-release-description": "pn --filter=@pnpm/get-release-text run write-release-text",
|
|
"release": "pn --filter=@pnpm/exe run build-artifacts && pn --filter=@pnpm/exe publish --tag=next-11 --access=public --provenance && pn publish --filter=!pnpm --filter=!@pnpm/exe --access=public --provenance && pn publish --filter=pnpm --tag=next-11 --access=public --provenance",
|
|
"dev-setup": "pn -C=./pnpm/dev link -g"
|
|
},
|
|
"devDependencies": {
|
|
"@changesets/cli": "catalog:",
|
|
"@commitlint/cli": "catalog:",
|
|
"@commitlint/config-conventional": "catalog:",
|
|
"@commitlint/prompt-cli": "catalog:",
|
|
"@pnpm/eslint-config": "workspace:*",
|
|
"@pnpm/jest-config": "workspace:*",
|
|
"@pnpm/meta-updater": "catalog:",
|
|
"@pnpm/tgz-fixtures": "catalog:",
|
|
"@pnpm/tsconfig": "workspace:*",
|
|
"@types/jest": "catalog:",
|
|
"@types/node": "catalog:",
|
|
"@types/picomatch": "catalog:",
|
|
"@typescript/native-preview": "catalog:",
|
|
"c8": "catalog:",
|
|
"concurrently": "catalog:",
|
|
"cross-env": "catalog:",
|
|
"cspell": "catalog:",
|
|
"eslint": "catalog:",
|
|
"eslint-plugin-regexp": "catalog:",
|
|
"husky": "catalog:",
|
|
"jest": "catalog:",
|
|
"keyv": "catalog:",
|
|
"lcov-result-merger": "catalog:",
|
|
"rimraf": "catalog:",
|
|
"shx": "catalog:",
|
|
"typescript": "catalog:",
|
|
"verdaccio": "catalog:"
|
|
},
|
|
"packageManager": "pnpm@11.1.1",
|
|
"devEngines": {
|
|
"packageManager": {
|
|
"name": "pnpm",
|
|
"version": "11.1.1",
|
|
"onFail": "download"
|
|
},
|
|
"runtime": {
|
|
"name": "node",
|
|
"version": "24.6.0",
|
|
"onFail": "download"
|
|
}
|
|
}
|
|
}
|