Files
pnpm/__utils__/assert-project/package.json
Marvin Hagemeister 49e6074644 test: replace @pnpm/registry-mock with an in-repo in-process registry (#11927)
Replace the external `@pnpm/registry-mock` (Verdaccio) test dependency with an in-repo, in-process registry that serves package fixtures to **both** the pacquet Rust tests and the pnpm CLI (Jest) tests. No separately managed registry process is needed.

### How it works

- **Fixtures** live at `registry/.fixtures/packages/<name>/<version>/…`, moved verbatim from [`pnpm/registry-mock`](https://github.com/pnpm/registry-mock) (keyed by each `package.json`'s `name`+`version`).
- **`pnpm-registry-fixtures`** builds verdaccio-shaped storage from those fixtures; the in-tree **`pnpm-registry`** crate serves it.
  - Files whose names differ only by case (`@pnpm.e2e/with-same-file-in-different-cases`) and `bundleDependencies` trees are composed **in memory** by the builder, since neither can be committed to the working tree.
- **pacquet**: `pacquet-testing-utils`' `TestRegistry` starts the server lazily (once per process) in proxy mode, serving `@pnpm.e2e` fixtures locally and falling through to the npm uplink for real packages (`is-positive`, `is-negative`, …) — matching how registry-mock behaved.
- **pnpm CLI**: the `with-registry` Jest `globalSetup` builds storage from the fixtures via the new `pnpm-registry-prepare` binary (built from source in the Test CI job) and serves it with `pnpm-registry`. `REGISTRY_MOCK_PORT` / `REGISTRY_MOCK_CREDENTIALS` / `getIntegrity` now come from `@pnpm/testing.registry-mock`.

### Result

`@pnpm/registry-mock` is removed from every manifest, the catalog, and `packageExtensions`; `cargo test` / `cargo nextest run` / `just test` and the pnpm CLI Jest suites all run registry-backed tests without launching Verdaccio.
2026-05-29 14:35:45 +02:00

62 lines
1.7 KiB
JSON

{
"name": "@pnpm/assert-project",
"description": "Utils for testing projects that use pnpm",
"version": "1100.0.11",
"author": {
"name": "Zoltan Kochan",
"email": "z@kochan.io",
"url": "https://www.kochan.io/"
},
"bugs": {
"url": "https://github.com/pnpm/pnpm/issues"
},
"main": "lib/index.js",
"type": "module",
"types": "lib/index.d.ts",
"files": [
"lib/"
],
"devDependencies": {
"@pnpm/assert-project": "workspace:*",
"@types/is-windows": "catalog:",
"@types/isexe": "catalog:",
"@types/js-yaml": "catalog:",
"@types/node": "catalog:"
},
"directories": {
"test": "test"
},
"homepage": "https://github.com/pnpm/pnpm/blob/master/privatePackages/assert-project#readme",
"keywords": [
"pnpm",
"pnpm11"
],
"license": "MIT",
"engines": {
"node": ">=10"
},
"repository": "https://github.com/pnpm/pnpm/tree/main/__utils__/assert-project",
"scripts": {
"lint": "eslint src/**/*.ts test/**/*.ts",
"lint-test": "tslint -c tslint.json --project test",
"compile": "rimraf tsconfig.tsbuildinfo lib && tsc --build",
"prepublishOnly": "pn compile",
"pretest": "pn install -C test/fixture/project --force --no-shared-workspace-lockfile",
"test": "pn pretest && pn compile && jest"
},
"dependencies": {
"@jest/globals": "catalog:",
"@pnpm/assert-store": "workspace:*",
"@pnpm/constants": "workspace:*",
"@pnpm/installing.modules-yaml": "workspace:*",
"@pnpm/lockfile.types": "workspace:*",
"@pnpm/testing.registry-mock": "workspace:*",
"@pnpm/types": "workspace:*",
"is-windows": "catalog:",
"isexe": "catalog:",
"js-yaml": "catalog:",
"read-yaml-file": "catalog:",
"write-package": "catalog:"
}
}