mirror of
https://github.com/pnpm/pnpm.git
synced 2026-06-02 13:13:17 -04:00
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.
52 lines
1.3 KiB
JSON
52 lines
1.3 KiB
JSON
{
|
|
"name": "@pnpm/testing.temp-store",
|
|
"version": "1100.1.4",
|
|
"description": "A temporary store for testing purposes",
|
|
"keywords": [
|
|
"pnpm",
|
|
"pnpm11",
|
|
"store"
|
|
],
|
|
"license": "MIT",
|
|
"funding": "https://opencollective.com/pnpm",
|
|
"repository": "https://github.com/pnpm/pnpm/tree/main/testing/temp-store",
|
|
"homepage": "https://github.com/pnpm/pnpm/tree/main/testing/temp-store#readme",
|
|
"bugs": {
|
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
},
|
|
"type": "module",
|
|
"main": "lib/index.js",
|
|
"types": "lib/index.d.ts",
|
|
"exports": {
|
|
".": "./lib/index.js"
|
|
},
|
|
"files": [
|
|
"lib",
|
|
"!*.map"
|
|
],
|
|
"scripts": {
|
|
"prepublishOnly": "tsgo --build",
|
|
"lint": "eslint \"src/**/*.ts\"",
|
|
"test": "pn compile",
|
|
"start": "tsgo --watch",
|
|
"compile": "tsgo --build && pn lint --fix"
|
|
},
|
|
"dependencies": {
|
|
"@pnpm/installing.client": "workspace:*",
|
|
"@pnpm/resolving.resolver-base": "workspace:*",
|
|
"@pnpm/store.controller": "workspace:*",
|
|
"@pnpm/store.controller-types": "workspace:*",
|
|
"@pnpm/store.index": "workspace:*",
|
|
"@pnpm/testing.registry-mock": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@pnpm/testing.temp-store": "workspace:*"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.13"
|
|
},
|
|
"jest": {
|
|
"preset": "@pnpm/jest-config"
|
|
}
|
|
}
|