diff --git a/.github/workflows/pacquet-ci.yml b/.github/workflows/pacquet-ci.yml index fac7ce0ae4..af4f23557a 100644 --- a/.github/workflows/pacquet-ci.yml +++ b/.github/workflows/pacquet-ci.yml @@ -110,8 +110,6 @@ jobs: - name: Test shell: bash run: | - just registry-mock launch - # removing env vars is a temporary workaround for unit tests in pacquet relying on external environment # this should be removed in the future unset PNPM_HOME @@ -119,8 +117,6 @@ jobs: just test - just registry-mock end - doc: name: Doc runs-on: ubuntu-latest diff --git a/.github/workflows/pacquet-codecov.yml b/.github/workflows/pacquet-codecov.yml index 25b82c930f..ca7b4d7956 100644 --- a/.github/workflows/pacquet-codecov.yml +++ b/.github/workflows/pacquet-codecov.yml @@ -75,8 +75,6 @@ jobs: - name: Run run: | - just registry-mock launch - # removing env vars is a temporary workaround for unit tests in pacquet relying on external environment # this should be removed in the future unset PNPM_HOME @@ -84,8 +82,6 @@ jobs: cargo codecov --lcov --output-path lcov.info - just registry-mock end - - name: Upload Artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34ff4f12a7..c8af1c0c92 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,6 +69,21 @@ jobs: name: compiled-packages - name: Extract compiled artifacts run: tar -xzf compiled.tar.gz + # The test harness serves package fixtures through the in-repo + # `pnpm-registry`; `pnpm-registry-prepare` turns the raw fixtures under + # `registry/.fixtures/packages` into the storage the server reads. + - name: Install Rust + uses: ./.github/actions/rustup + with: + save-cache: ${{ github.ref_name == 'main' }} + shared-key: registry-prepare + - name: Build the registry fixture preparer + shell: bash + run: | + cargo build --locked --release -p pnpm-registry-fixtures --bin pnpm-registry-prepare + bin="$PWD/target/release/pnpm-registry-prepare" + [ -f "$bin.exe" ] && bin="$bin.exe" + echo "PNPM_REGISTRY_PREPARE_BIN=$bin" >> "$GITHUB_ENV" - name: Determine test scope id: test-scope shell: bash diff --git a/.gitignore b/.gitignore index aea936dee3..8f4d3f968b 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,7 @@ __fixtures__/custom-modules-dir/patches/ /target /bench-work-env .pacquet + +## test registry auth state (written by pnpm-registry when serving with auth) +htpasswd +tokens.db diff --git a/.taplo.toml b/.taplo.toml index ce5c8427ef..a5b62d59fc 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -1,4 +1,4 @@ -include = ["Cargo.toml", "pacquet/crates/*/*.toml", "pacquet/tasks/*/*.toml"] +include = ["Cargo.toml", "pacquet/crates/*/*.toml", "pacquet/tasks/*/*.toml", "registry/crates/*/*.toml"] [formatting] align_entries = true diff --git a/Cargo.lock b/Cargo.lock index 940849ebb2..7e64a89932 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -899,6 +899,7 @@ version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ + "crc32fast", "miniz_oxide", "zlib-rs", ] @@ -2577,7 +2578,6 @@ dependencies = [ "pacquet-patching", "pacquet-real-hoist", "pacquet-registry", - "pacquet-registry-mock", "pacquet-reporter", "pacquet-resolving-default-resolver", "pacquet-resolving-deps-resolver", @@ -2677,6 +2677,7 @@ dependencies = [ "clap", "home", "pipe-trait", + "pnpm-registry-fixtures", "reqwest", "serde", "serde_json", @@ -2908,9 +2909,11 @@ dependencies = [ "assert_cmd", "command-extra", "junction", - "pacquet-registry-mock", + "pnpm-registry", + "pnpm-registry-fixtures", "tempfile", "text-block-macros", + "tokio", "walkdir", ] @@ -3086,6 +3089,20 @@ dependencies = [ "wax", ] +[[package]] +name = "pnpm-registry-fixtures" +version = "0.0.1" +dependencies = [ + "base64 0.22.1", + "clap", + "flate2", + "node-semver", + "serde_json", + "sha2", + "tar", + "walkdir", +] + [[package]] name = "pori" version = "0.0.0" diff --git a/Cargo.toml b/Cargo.toml index 86366fb8d0..2be9d7af8c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,8 @@ pacquet-workspace-state = { path = "pacquet/crates/workspace-s pacquet-registry-mock = { path = "pacquet/tasks/registry-mock" } # Registry (sibling project — pnpm-compatible registry server) -pnpm-registry = { path = "registry/crates/pnpm-registry", version = "0.0.1" } +pnpm-registry = { path = "registry/crates/pnpm-registry", version = "0.0.1" } +pnpm-registry-fixtures = { path = "registry/crates/pnpm-registry-fixtures", version = "0.0.1" } # Dependencies async-recursion = { version = "1.1.1" } @@ -85,6 +86,7 @@ clap = { version = "4", features = ["derive", "string"] } command-extra = { version = "1.0.0" } base64 = { version = "0.22.1" } bcrypt = { version = "0.17.1" } +bytes = { version = "1.11.0" } chrono = { version = "0.4.44", default-features = false, features = ["clock"] } dashmap = { version = "6.1.0" } derive_more = { version = "2.1.1", features = ["full"] } @@ -97,6 +99,7 @@ indexmap = { version = "2.14.0", features = ["serde"] } insta = { version = "1.47.2", features = ["yaml", "glob", "walkdir"] } itertools = { version = "0.14.0" } futures-util = { version = "0.3.32" } +flate2 = { version = "1.1.9" } gethostname = { version = "1" } getrandom = { version = "0.3.4" } miette = { version = "7.6.0", features = ["fancy"] } diff --git a/__utils__/assert-project/package.json b/__utils__/assert-project/package.json index 915ab9f012..8fc957704e 100644 --- a/__utils__/assert-project/package.json +++ b/__utils__/assert-project/package.json @@ -50,7 +50,7 @@ "@pnpm/constants": "workspace:*", "@pnpm/installing.modules-yaml": "workspace:*", "@pnpm/lockfile.types": "workspace:*", - "@pnpm/registry-mock": "catalog:", + "@pnpm/testing.registry-mock": "workspace:*", "@pnpm/types": "workspace:*", "is-windows": "catalog:", "isexe": "catalog:", diff --git a/__utils__/assert-project/src/index.ts b/__utils__/assert-project/src/index.ts index f730474cd8..b970e14c1d 100644 --- a/__utils__/assert-project/src/index.ts +++ b/__utils__/assert-project/src/index.ts @@ -8,7 +8,7 @@ import { assertStore } from '@pnpm/assert-store' import { WANTED_LOCKFILE } from '@pnpm/constants' import type { Modules } from '@pnpm/installing.modules-yaml' import type { LockfileFile } from '@pnpm/lockfile.types' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import yaml from 'js-yaml' import { readYamlFileSync } from 'read-yaml-file' import { writePackageSync } from 'write-package' diff --git a/__utils__/assert-project/tsconfig.json b/__utils__/assert-project/tsconfig.json index 6ca0096c9c..8549455523 100644 --- a/__utils__/assert-project/tsconfig.json +++ b/__utils__/assert-project/tsconfig.json @@ -21,6 +21,9 @@ { "path": "../../lockfile/types" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../assert-store" } diff --git a/__utils__/assert-store/package.json b/__utils__/assert-store/package.json index 32935ca4ad..54c5509091 100644 --- a/__utils__/assert-store/package.json +++ b/__utils__/assert-store/package.json @@ -33,9 +33,9 @@ }, "dependencies": { "@jest/globals": "catalog:", - "@pnpm/registry-mock": "catalog:", "@pnpm/store.cafs": "workspace:*", - "@pnpm/store.index": "workspace:*" + "@pnpm/store.index": "workspace:*", + "@pnpm/testing.registry-mock": "workspace:*" }, "devDependencies": { "@pnpm/assert-store": "workspace:*", diff --git a/__utils__/assert-store/src/index.ts b/__utils__/assert-store/src/index.ts index 9f87cebb57..4c7644e672 100644 --- a/__utils__/assert-store/src/index.ts +++ b/__utils__/assert-store/src/index.ts @@ -2,8 +2,8 @@ import fs from 'node:fs' import path from 'node:path' import { expect } from '@jest/globals' -import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { StoreIndex, storeIndexKey } from '@pnpm/store.index' +import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' export interface StoreAssertions { getPkgIndexFilePath: (pkgName: string, version: string) => string diff --git a/__utils__/assert-store/tsconfig.json b/__utils__/assert-store/tsconfig.json index 94e3b145e1..e6b6fe65db 100644 --- a/__utils__/assert-store/tsconfig.json +++ b/__utils__/assert-store/tsconfig.json @@ -17,6 +17,9 @@ }, { "path": "../../store/index" + }, + { + "path": "../../testing/registry-mock" } ] } diff --git a/__utils__/jest-config/package.json b/__utils__/jest-config/package.json index 05ceef5bd2..bfc6bf4d5d 100644 --- a/__utils__/jest-config/package.json +++ b/__utils__/jest-config/package.json @@ -8,12 +8,10 @@ "@babel/core": "catalog:", "@babel/plugin-transform-explicit-resource-management": "catalog:", "@pnpm/pnpr": "catalog:", - "@pnpm/registry-mock": "catalog:", "@pnpm/testing.registry-mock": "workspace:*", "@pnpm/worker": "workspace:*", "amaro": "catalog:", "get-port": "catalog:", - "read-yaml-file": "catalog:", "tree-kill": "catalog:" }, "devDependencies": { diff --git a/__utils__/jest-config/with-registry/globalSetup.js b/__utils__/jest-config/with-registry/globalSetup.js index 86cc1db7c6..bf602ca39e 100644 --- a/__utils__/jest-config/with-registry/globalSetup.js +++ b/__utils__/jest-config/with-registry/globalSetup.js @@ -1,32 +1,34 @@ -import { spawn } from 'node:child_process' +import { spawn, spawnSync } from 'node:child_process' +import { existsSync, mkdtempSync } from 'node:fs' import { createRequire } from 'node:module' +import { tmpdir } from 'node:os' +import path from 'node:path' import { scheduler } from 'node:timers/promises' import { promisify } from 'node:util' import getPort from 'get-port' -import { readYamlFileSync } from 'read-yaml-file' import treeKill from 'tree-kill' const kill = promisify(treeKill) const require = createRequire(import.meta.url) +const REPO_ROOT = path.join(import.meta.dirname, '..', '..', '..') +const FIXTURE_PACKAGES = path.join(REPO_ROOT, 'registry', '.fixtures', 'packages') + export default async () => { if (!process.env.PNPM_REGISTRY_MOCK_PORT) { process.env.PNPM_REGISTRY_MOCK_PORT = (await getPort({ from: 7700, to: 7800 })).toString() } - // We still call `prepare()` from `@pnpm/registry-mock`: it copies - // the read-only fixture `storage-cache` into a tempy directory - // and writes `registry/runtime-config-${port}.yaml` with the - // tempy path under `storage:`. That yaml is what - // `locations.storage()` reads when `getIntegrity` (also from - // registry-mock) is called from tests. We just don't launch - // verdaccio against it — we launch pnpm-registry instead. - const { prepare, REGISTRY_MOCK_CREDENTIALS } = await import('@pnpm/registry-mock') - const { addUser } = await import('@pnpm/testing.registry-mock') - prepare() + const { addUser, REGISTRY_MOCK_CREDENTIALS } = await import('@pnpm/testing.registry-mock') + + // Build verdaccio-shaped storage from the in-repo package fixtures. The + // registry mutates this storage during tests (publishes, dist-tags), so it + // gets its own writable copy in a temp dir, never the read-only fixtures. + const storage = mkdtempSync(path.join(tmpdir(), 'pnpm-registry-mock-storage-')) + buildStorage(storage) + process.env.PNPM_REGISTRY_MOCK_STORAGE = storage - const storage = readStoragePath(process.env.PNPM_REGISTRY_MOCK_PORT) const bin = resolvePnpmRegistryBin() const server = spawn( @@ -34,11 +36,9 @@ export default async () => { [ '--listen', `127.0.0.1:${process.env.PNPM_REGISTRY_MOCK_PORT}`, '--storage', storage, - '--upstream', process.env.PNPM_REGISTRY_MOCK_UPLINK ?? 'https://registry.npmjs.org', '--public-url', `http://localhost:${process.env.PNPM_REGISTRY_MOCK_PORT}`, - // Match registry-mock's verdaccio config: a one-year TTL so - // the fixture packuments (mtime: whenever the npm tarball was - // built) never look stale and never trigger a re-fetch to + // A one-year TTL so the fixture packuments (whose `time` values are + // static) never look stale and never trigger a re-fetch to // npmjs.org that would 404. '--packument-ttl-secs', '31536000', ], @@ -72,36 +72,44 @@ export default async () => { } /** - * Read the `storage:` path that `@pnpm/registry-mock`'s `prepare()` - * just wrote into the runtime-config yaml. We can't import - * `locations.storage` from the registry-mock package — it isn't - * re-exported from its `index.ts` — but the file path is stable. + * Build registry storage from the in-repo fixtures into `out` using the + * `pnpm-registry-prepare` binary (built from the `pnpm-registry-fixtures` + * crate). The same builder backs pacquet's in-process registry. */ -function readStoragePath (port) { - const configPath = require.resolve( - `@pnpm/registry-mock/registry/runtime-config-${port}.yaml` - ) - const { storage } = readYamlFileSync(configPath) - return storage +function buildStorage (out) { + const bin = resolvePnpmRegistryPrepareBin() + const result = spawnSync(bin, ['--packages', FIXTURE_PACKAGES, '--out', out], { stdio: 'inherit' }) + if (result.status !== 0) { + throw new Error( + `pnpm-registry-prepare failed to build fixture storage (exit ${result.status ?? result.signal}).` + ) + } } /** - * Locate the `pnpm-registry` binary. Lookup order: + * Locate the `pnpm-registry-prepare` binary. Lookup order: * - * 1. `PNPM_REGISTRY_BIN` env var override (escape hatch for local - * Rust work — point it at `target/release/pnpm-registry` to test - * in-progress changes to the registry crate). - * 2. The platform binary that `pnpm install` pulled in as an - * optionalDependency of `@pnpm/pnpr` — i.e. - * `@pnpm/pnpr.-/pnpr[.exe]`. The resolution goes - * through the `@pnpm/pnpr` wrapper's path because the platform - * sub-package lives in the wrapper's own `node_modules`, not - * anywhere on the parent chain of this file. + * 1. `PNPM_REGISTRY_PREPARE_BIN` env var (set by CI, which builds it from source). + * 2. A locally-built `target/{release,debug}/pnpm-registry-prepare`. + */ +function resolvePnpmRegistryPrepareBin () { + return resolveRustBin('pnpm-registry-prepare', 'PNPM_REGISTRY_PREPARE_BIN') +} + +/** + * Locate the `pnpm-registry` server binary. Lookup order: + * + * 1. `PNPM_REGISTRY_BIN` env var override. + * 2. A locally-built `target/{release,debug}/pnpm-registry`. + * 3. The platform binary shipped as an optionalDependency of `@pnpm/pnpr`. */ function resolvePnpmRegistryBin () { if (process.env.PNPM_REGISTRY_BIN) { return process.env.PNPM_REGISTRY_BIN } + const localBin = findRustTargetBin('pnpm-registry') + if (localBin) return localBin + const ext = process.platform === 'win32' ? '.exe' : '' const platformPkg = `@pnpm/pnpr.${process.platform}-${process.arch}` try { @@ -109,14 +117,33 @@ function resolvePnpmRegistryBin () { return wrapperRequire.resolve(`${platformPkg}/pnpr${ext}`) } catch { throw new Error( - `pnpm-registry binary not found. The test suite expects ${platformPkg} ` + - 'to be installed (it ships as an optionalDependency of @pnpm/pnpr — ' + - 'run `pnpm install` at the repo root to pull it in), or set ' + - 'PNPM_REGISTRY_BIN to an absolute path to a locally-built binary.' + 'pnpm-registry binary not found. Build it with `cargo build -p pnpm-registry`, ' + + `set PNPM_REGISTRY_BIN, or install ${platformPkg} (an optionalDependency of @pnpm/pnpr).` ) } } +function resolveRustBin (name, envVar) { + if (process.env[envVar]) { + return process.env[envVar] + } + const localBin = findRustTargetBin(name) + if (localBin) return localBin + throw new Error( + `${name} binary not found. Build it with \`cargo build -p pnpm-registry-fixtures --bin ${name}\` ` + + `or set ${envVar} to an absolute path.` + ) +} + +function findRustTargetBin (name) { + const ext = process.platform === 'win32' ? '.exe' : '' + for (const profile of ['release', 'debug']) { + const candidate = path.join(REPO_ROOT, 'target', profile, `${name}${ext}`) + if (existsSync(candidate)) return candidate + } + return undefined +} + const UNUSUAL_REGISTRY_STARTUP_THRESHOLD = 15 // seconds async function waitForServerOnline () { @@ -153,4 +180,3 @@ function *exponentialBackoff (attempts = 15, base = 1.5, initialWait = 100) { yield initialWait * Math.pow(base, i) } } - diff --git a/agent/server/package.json b/agent/server/package.json index d3a77640f8..3ed9aa4d3d 100644 --- a/agent/server/package.json +++ b/agent/server/package.json @@ -52,7 +52,7 @@ "@jest/globals": "catalog:", "@pnpm/agent.client": "workspace:*", "@pnpm/logger": "workspace:*", - "@pnpm/registry-mock": "catalog:", + "@pnpm/testing.registry-mock": "workspace:*", "cross-env": "catalog:", "pnpm-agent": "workspace:*" }, diff --git a/agent/server/test/integration.ts b/agent/server/test/integration.ts index 8cfdc56def..d2166159bf 100644 --- a/agent/server/test/integration.ts +++ b/agent/server/test/integration.ts @@ -7,8 +7,8 @@ import { afterAll, beforeAll, describe, expect, it, jest } from '@jest/globals' // First run downloads packages from registry-mock — slow on Windows CI jest.setTimeout(600_000) import { fetchFromPnpmRegistry } from '@pnpm/agent.client' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { StoreIndex } from '@pnpm/store.index' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { DepPath, ProjectId } from '@pnpm/types' import { createRegistryServer } from 'pnpm-agent' diff --git a/agent/server/tsconfig.json b/agent/server/tsconfig.json index 335c3254df..55b9d926fb 100644 --- a/agent/server/tsconfig.json +++ b/agent/server/tsconfig.json @@ -36,6 +36,9 @@ { "path": "../../store/index" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../client" } diff --git a/building/commands/package.json b/building/commands/package.json index a3804a64e2..f102763b9a 100644 --- a/building/commands/package.json +++ b/building/commands/package.json @@ -64,12 +64,12 @@ "@pnpm/crypto.object-hasher": "workspace:*", "@pnpm/logger": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/store.cafs": "workspace:*", "@pnpm/store.index": "workspace:*", "@pnpm/test-fixtures": "workspace:*", "@pnpm/test-ipc-server": "workspace:*", "@pnpm/testing.command-defaults": "workspace:*", + "@pnpm/testing.registry-mock": "workspace:*", "@pnpm/workspace.projects-filter": "workspace:*", "@types/ramda": "catalog:", "execa": "catalog:", diff --git a/building/commands/test/build/index.ts b/building/commands/test/build/index.ts index 8c0cf1a8b5..25c788792d 100644 --- a/building/commands/test/build/index.ts +++ b/building/commands/test/build/index.ts @@ -7,10 +7,10 @@ import { rebuild } from '@pnpm/building.commands' import { ENGINE_NAME, STORE_VERSION, WANTED_LOCKFILE } from '@pnpm/constants' import { hashObject } from '@pnpm/crypto.object-hasher' import { prepare } from '@pnpm/prepare' -import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import type { PackageFilesIndex } from '@pnpm/store.cafs' import { StoreIndex, storeIndexKey } from '@pnpm/store.index' import { fixtures } from '@pnpm/test-fixtures' +import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { safeExeca as execa } from 'execa' import { DEFAULT_OPTS } from './utils/index.js' diff --git a/building/commands/test/policy/approveBuilds.test.ts b/building/commands/test/policy/approveBuilds.test.ts index 7de9d32dc0..211b425558 100644 --- a/building/commands/test/policy/approveBuilds.test.ts +++ b/building/commands/test/policy/approveBuilds.test.ts @@ -7,7 +7,7 @@ import { getConfig } from '@pnpm/config.reader' import { readModulesManifest } from '@pnpm/installing.modules-yaml' import { prepare } from '@pnpm/prepare' import { tempDir } from '@pnpm/prepare-temp-dir' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { safeExeca as execa } from 'execa' import { omit } from 'ramda' import { readYamlFileSync } from 'read-yaml-file' diff --git a/building/commands/tsconfig.json b/building/commands/tsconfig.json index 9623a6d06f..4d75f9b864 100644 --- a/building/commands/tsconfig.json +++ b/building/commands/tsconfig.json @@ -75,6 +75,9 @@ { "path": "../../testing/command-defaults" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../../workspace/projects-filter" }, diff --git a/cache/commands/package.json b/cache/commands/package.json index 8f6201977b..27c3787aa3 100644 --- a/cache/commands/package.json +++ b/cache/commands/package.json @@ -49,7 +49,7 @@ "@pnpm/cache.commands": "workspace:*", "@pnpm/logger": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", + "@pnpm/testing.registry-mock": "workspace:*", "@types/ramda": "catalog:", "@zkochan/rimraf": "catalog:", "execa": "catalog:" diff --git a/cache/commands/test/cacheDelete.cmd.test.ts b/cache/commands/test/cacheDelete.cmd.test.ts index 81289648b0..5a73ac023f 100644 --- a/cache/commands/test/cacheDelete.cmd.test.ts +++ b/cache/commands/test/cacheDelete.cmd.test.ts @@ -3,7 +3,7 @@ import path from 'node:path' import { beforeEach, describe, expect, test } from '@jest/globals' import { cache } from '@pnpm/cache.commands' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { safeExeca as execa } from 'execa' diff --git a/cache/commands/test/cacheList.cmd.test.ts b/cache/commands/test/cacheList.cmd.test.ts index 24344daed7..6fb927ce3b 100644 --- a/cache/commands/test/cacheList.cmd.test.ts +++ b/cache/commands/test/cacheList.cmd.test.ts @@ -3,7 +3,7 @@ import path from 'node:path' import { beforeAll, describe, expect, test } from '@jest/globals' import { cache } from '@pnpm/cache.commands' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { safeExeca as execa } from 'execa' diff --git a/cache/commands/test/cacheView.cmd.test.ts b/cache/commands/test/cacheView.cmd.test.ts index e2003060d7..e2ac3bd57f 100644 --- a/cache/commands/test/cacheView.cmd.test.ts +++ b/cache/commands/test/cacheView.cmd.test.ts @@ -3,7 +3,7 @@ import path from 'node:path' import { beforeEach, describe, expect, test } from '@jest/globals' import { cache } from '@pnpm/cache.commands' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { safeExeca as execa } from 'execa' diff --git a/cache/commands/tsconfig.json b/cache/commands/tsconfig.json index 9e0cc80128..5e8168b194 100644 --- a/cache/commands/tsconfig.json +++ b/cache/commands/tsconfig.json @@ -30,6 +30,9 @@ { "path": "../../store/path" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../api" } diff --git a/deps/compliance/commands/package.json b/deps/compliance/commands/package.json index c8678517a5..eb062c75ca 100644 --- a/deps/compliance/commands/package.json +++ b/deps/compliance/commands/package.json @@ -76,7 +76,6 @@ "@pnpm/logger": "workspace:*", "@pnpm/pkg-manifest.reader": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/test-fixtures": "workspace:*", "@pnpm/testing.command-defaults": "workspace:*", "@pnpm/testing.mock-agent": "workspace:*", diff --git a/deps/inspection/commands/package.json b/deps/inspection/commands/package.json index e840f6e066..3e3c7b7c4c 100644 --- a/deps/inspection/commands/package.json +++ b/deps/inspection/commands/package.json @@ -72,7 +72,6 @@ "@pnpm/deps.inspection.commands": "workspace:*", "@pnpm/installing.commands": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/test-fixtures": "workspace:*", "@pnpm/testing.command-defaults": "workspace:*", "@pnpm/testing.registry-mock": "workspace:*", diff --git a/deps/inspection/commands/test/bugs.ts b/deps/inspection/commands/test/bugs.ts index 402c1fe9bd..1a0b6c8d17 100644 --- a/deps/inspection/commands/test/bugs.ts +++ b/deps/inspection/commands/test/bugs.ts @@ -4,7 +4,7 @@ import path from 'node:path' import { expect, jest, test } from '@jest/globals' import type { Config, ConfigContext } from '@pnpm/config.reader' import { tempDir } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' const mockOpen = jest.fn() jest.unstable_mockModule('open', () => ({ diff --git a/deps/inspection/commands/test/docs.ts b/deps/inspection/commands/test/docs.ts index 5f8350af40..f1b22f1430 100644 --- a/deps/inspection/commands/test/docs.ts +++ b/deps/inspection/commands/test/docs.ts @@ -1,6 +1,6 @@ import { expect, jest, test } from '@jest/globals' import type { Config, ConfigContext } from '@pnpm/config.reader' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' const mockOpen = jest.fn() jest.unstable_mockModule('open', () => ({ diff --git a/deps/inspection/commands/test/listing/why.ts b/deps/inspection/commands/test/listing/why.ts index 690f4f6529..3b58d50a8d 100644 --- a/deps/inspection/commands/test/listing/why.ts +++ b/deps/inspection/commands/test/listing/why.ts @@ -6,7 +6,7 @@ import { expect, test } from '@jest/globals' import { why } from '@pnpm/deps.inspection.commands' import type { PnpmError } from '@pnpm/error' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { safeExeca as execa } from 'execa' const pnpmBin = path.join(import.meta.dirname, '../../../../../pnpm/bin/pnpm.mjs') diff --git a/deps/inspection/commands/test/outdated/index.ts b/deps/inspection/commands/test/outdated/index.ts index 9dd17799c5..42b85f7f90 100644 --- a/deps/inspection/commands/test/outdated/index.ts +++ b/deps/inspection/commands/test/outdated/index.ts @@ -8,8 +8,8 @@ import { WANTED_LOCKFILE } from '@pnpm/constants' import { outdated } from '@pnpm/deps.inspection.commands' import type { PnpmError } from '@pnpm/error' import { prepare, tempDir } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { symlinkDirSync } from 'symlink-dir' const f = fixtures(import.meta.dirname) diff --git a/deps/inspection/commands/test/outdated/minimumReleaseAge.test.ts b/deps/inspection/commands/test/outdated/minimumReleaseAge.test.ts index bae79b4c36..9e3782e2ba 100644 --- a/deps/inspection/commands/test/outdated/minimumReleaseAge.test.ts +++ b/deps/inspection/commands/test/outdated/minimumReleaseAge.test.ts @@ -6,8 +6,8 @@ import { stripVTControlCharacters as stripAnsi } from 'node:util' import { expect, test } from '@jest/globals' import { outdated } from '@pnpm/deps.inspection.commands' import { tempDir } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' const f = fixtures(import.meta.dirname) const hasOutdatedDepsFixture = f.find('has-outdated-deps') diff --git a/deps/inspection/commands/test/repo.ts b/deps/inspection/commands/test/repo.ts index ecd8da78be..75b3cf0ca3 100644 --- a/deps/inspection/commands/test/repo.ts +++ b/deps/inspection/commands/test/repo.ts @@ -4,7 +4,7 @@ import path from 'node:path' import { expect, jest, test } from '@jest/globals' import type { Config, ConfigContext } from '@pnpm/config.reader' import { tempDir } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' const mockOpen = jest.fn() jest.unstable_mockModule('open', () => ({ diff --git a/deps/inspection/commands/test/view.ts b/deps/inspection/commands/test/view.ts index 309ff4a55e..2087407d43 100644 --- a/deps/inspection/commands/test/view.ts +++ b/deps/inspection/commands/test/view.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals' import type { Config, ConfigContext } from '@pnpm/config.reader' import { view } from '@pnpm/deps.inspection.commands' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' const REGISTRY_URL = `http://localhost:${REGISTRY_MOCK_PORT}` diff --git a/exec/commands/package.json b/exec/commands/package.json index 89d1a7fd43..29c3defc9a 100644 --- a/exec/commands/package.json +++ b/exec/commands/package.json @@ -81,7 +81,6 @@ "@pnpm/exec.commands": "workspace:*", "@pnpm/logger": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/test-ipc-server": "workspace:*", "@pnpm/testing.command-defaults": "workspace:*", "@pnpm/workspace.projects-filter": "workspace:*", diff --git a/installing/commands/package.json b/installing/commands/package.json index 504bfb991a..6740fa620a 100644 --- a/installing/commands/package.json +++ b/installing/commands/package.json @@ -103,7 +103,6 @@ "@pnpm/installing.modules-yaml": "workspace:*", "@pnpm/logger": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/store.index": "workspace:*", "@pnpm/test-fixtures": "workspace:*", "@pnpm/test-ipc-server": "workspace:*", diff --git a/installing/commands/test/add.ts b/installing/commands/test/add.ts index b4a9eb634d..b034b87b2d 100644 --- a/installing/commands/test/add.ts +++ b/installing/commands/test/add.ts @@ -5,7 +5,7 @@ import { describe, expect, test } from '@jest/globals' import type { PnpmError } from '@pnpm/error' import { add, remove } from '@pnpm/installing.commands' import { prepare, prepareEmpty, preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { ProjectManifest } from '@pnpm/types' import { loadJsonFile } from 'load-json-file' import { temporaryDirectory } from 'tempy' diff --git a/installing/commands/test/fetch.ts b/installing/commands/test/fetch.ts index 0c52fc11a4..f5434c28db 100644 --- a/installing/commands/test/fetch.ts +++ b/installing/commands/test/fetch.ts @@ -5,9 +5,9 @@ import { expect, test } from '@jest/globals' import { STORE_VERSION } from '@pnpm/constants' import { fetch, install } from '@pnpm/installing.commands' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { closeAllStoreIndexes } from '@pnpm/store.index' import { fixtures } from '@pnpm/test-fixtures' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { finishWorkers } from '@pnpm/worker' import { rimrafSync } from '@zkochan/rimraf' diff --git a/installing/commands/test/import.ts b/installing/commands/test/import.ts index 00d9409f0c..d795b9c130 100644 --- a/installing/commands/test/import.ts +++ b/installing/commands/test/import.ts @@ -6,9 +6,8 @@ import { assertProject } from '@pnpm/assert-project' import { PnpmError } from '@pnpm/error' import { importCommand } from '@pnpm/installing.commands' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' -import { addDistTag } from '@pnpm/testing.registry-mock' +import { addDistTag, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { temporaryDirectory } from 'tempy' const f = fixtures(import.meta.dirname) diff --git a/installing/commands/test/importRecursive.ts b/installing/commands/test/importRecursive.ts index a102892d79..358cac6644 100644 --- a/installing/commands/test/importRecursive.ts +++ b/installing/commands/test/importRecursive.ts @@ -4,8 +4,8 @@ import path from 'node:path' import { expect, test } from '@jest/globals' import { assertProject } from '@pnpm/assert-project' import { importCommand } from '@pnpm/installing.commands' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { filterProjectsBySelectorObjectsFromDir } from '@pnpm/workspace.projects-filter' import { temporaryDirectory } from 'tempy' diff --git a/installing/commands/test/peerDependencies.ts b/installing/commands/test/peerDependencies.ts index 9b5fac2a72..f6e9ff0161 100644 --- a/installing/commands/test/peerDependencies.ts +++ b/installing/commands/test/peerDependencies.ts @@ -3,7 +3,7 @@ import path from 'node:path' import { expect, test } from '@jest/globals' import { add, install } from '@pnpm/installing.commands' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { temporaryDirectory } from 'tempy' const REGISTRY_URL = `http://localhost:${REGISTRY_MOCK_PORT}` diff --git a/installing/commands/test/prune.ts b/installing/commands/test/prune.ts index 35802d5bbe..4a7eb9877a 100644 --- a/installing/commands/test/prune.ts +++ b/installing/commands/test/prune.ts @@ -4,9 +4,9 @@ import path from 'node:path' import { expect, test } from '@jest/globals' import { add, install, prune } from '@pnpm/installing.commands' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' import { createTestIpcServer } from '@pnpm/test-ipc-server' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { symlinkDirSync } from 'symlink-dir' const REGISTRY_URL = `http://localhost:${REGISTRY_MOCK_PORT}` diff --git a/installing/commands/test/update/interactive.ts b/installing/commands/test/update/interactive.ts index 86cf486093..6c864605db 100644 --- a/installing/commands/test/update/interactive.ts +++ b/installing/commands/test/update/interactive.ts @@ -3,8 +3,7 @@ import path from 'node:path' import { expect, jest, test } from '@jest/globals' import type { LockfileObject } from '@pnpm/lockfile.types' import { prepare, preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' -import { addDistTag } from '@pnpm/testing.registry-mock' +import { addDistTag, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { filterProjectsBySelectorObjectsFromDir } from '@pnpm/workspace.projects-filter' import chalk from 'chalk' import { readYamlFileSync } from 'read-yaml-file' diff --git a/installing/commands/test/update/issue-7415.ts b/installing/commands/test/update/issue-7415.ts index 2074f839ec..a42699a1a3 100644 --- a/installing/commands/test/update/issue-7415.ts +++ b/installing/commands/test/update/issue-7415.ts @@ -2,7 +2,7 @@ import path from 'node:path' import { jest, test } from '@jest/globals' import { preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { filterProjectsBySelectorObjectsFromDir } from '@pnpm/workspace.projects-filter' jest.unstable_mockModule('@inquirer/prompts', () => { diff --git a/installing/deps-installer/package.json b/installing/deps-installer/package.json index 3f1570570d..bcc0b85c31 100644 --- a/installing/deps-installer/package.json +++ b/installing/deps-installer/package.json @@ -136,7 +136,6 @@ "@pnpm/network.git-utils": "workspace:*", "@pnpm/pkg-manifest.reader": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/resolving.registry.types": "workspace:*", "@pnpm/store.cafs": "workspace:*", "@pnpm/store.path": "workspace:*", diff --git a/installing/deps-installer/test/install/aliases.ts b/installing/deps-installer/test/install/aliases.ts index e0736509da..06d9a703e9 100644 --- a/installing/deps-installer/test/install/aliases.ts +++ b/installing/deps-installer/test/install/aliases.ts @@ -2,8 +2,7 @@ import { expect, test } from '@jest/globals' import { LOCKFILE_VERSION } from '@pnpm/constants' import { addDependenciesToPackage } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' -import { addDistTag } from '@pnpm/testing.registry-mock' +import { addDistTag, getIntegrity } from '@pnpm/testing.registry-mock' import { testDefaults } from '../utils/index.js' diff --git a/installing/deps-installer/test/install/auth.ts b/installing/deps-installer/test/install/auth.ts index a6aa074949..8b37d0a4f3 100644 --- a/installing/deps-installer/test/install/auth.ts +++ b/installing/deps-installer/test/install/auth.ts @@ -3,8 +3,7 @@ import path from 'node:path' import { test } from '@jest/globals' import { addDependenciesToPackage, install } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' -import { addUser } from '@pnpm/testing.registry-mock' +import { addUser, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { RegistryConfig } from '@pnpm/types' import { rimrafSync } from '@zkochan/rimraf' diff --git a/installing/deps-installer/test/install/autoInstallPeers.ts b/installing/deps-installer/test/install/autoInstallPeers.ts index f907d5e5a5..54c9fc9e86 100644 --- a/installing/deps-installer/test/install/autoInstallPeers.ts +++ b/installing/deps-installer/test/install/autoInstallPeers.ts @@ -5,8 +5,7 @@ import { assertProject } from '@pnpm/assert-project' import { createPeerDepGraphHash } from '@pnpm/deps.path' import { addDependenciesToPackage, install, mutateModules, mutateModulesInSingleProject, type PackageManifest } from '@pnpm/installing.deps-installer' import { prepareEmpty, preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' -import { addDistTag } from '@pnpm/testing.registry-mock' +import { addDistTag, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { ProjectRootDir } from '@pnpm/types' import { rimrafSync } from '@zkochan/rimraf' diff --git a/installing/deps-installer/test/install/bunRuntime.ts b/installing/deps-installer/test/install/bunRuntime.ts index a5e3769292..305089486e 100644 --- a/installing/deps-installer/test/install/bunRuntime.ts +++ b/installing/deps-installer/test/install/bunRuntime.ts @@ -2,7 +2,7 @@ import { expect, test } from '@jest/globals' import { LOCKFILE_VERSION, WANTED_LOCKFILE } from '@pnpm/constants' import { addDependenciesToPackage, install } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' +import { getIntegrity } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { writeYamlFileSync } from 'write-yaml-file' diff --git a/installing/deps-installer/test/install/customResolvers.ts b/installing/deps-installer/test/install/customResolvers.ts index f5f6a93dd8..77692b83c0 100644 --- a/installing/deps-installer/test/install/customResolvers.ts +++ b/installing/deps-installer/test/install/customResolvers.ts @@ -2,7 +2,7 @@ import { expect, test } from '@jest/globals' import type { CustomResolver } from '@pnpm/hooks.types' import { addDependenciesToPackage } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { testDefaults } from '../utils/index.js' diff --git a/installing/deps-installer/test/install/denoRuntime.ts b/installing/deps-installer/test/install/denoRuntime.ts index 813af3edc6..a3007d92cc 100644 --- a/installing/deps-installer/test/install/denoRuntime.ts +++ b/installing/deps-installer/test/install/denoRuntime.ts @@ -2,8 +2,8 @@ import { afterEach, beforeEach, expect, test } from '@jest/globals' import { LOCKFILE_VERSION, WANTED_LOCKFILE } from '@pnpm/constants' import { addDependenciesToPackage, install } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' import { getMockAgent, setupMockAgent, teardownMockAgent } from '@pnpm/testing.mock-agent' +import { getIntegrity } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { writeYamlFileSync } from 'write-yaml-file' diff --git a/installing/deps-installer/test/install/errors.ts b/installing/deps-installer/test/install/errors.ts index 51adf42f1c..0c40aee2f3 100644 --- a/installing/deps-installer/test/install/errors.ts +++ b/installing/deps-installer/test/install/errors.ts @@ -4,9 +4,9 @@ import { expect, test } from '@jest/globals' import type { PnpmError } from '@pnpm/error' import { addDependenciesToPackage, mutateModulesInSingleProject } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' import { getMockAgent, setupMockAgent, teardownMockAgent } from '@pnpm/testing.mock-agent' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { ProjectRootDir } from '@pnpm/types' import { loadJsonFileSync } from 'load-json-file' diff --git a/installing/deps-installer/test/install/fromTarball.ts b/installing/deps-installer/test/install/fromTarball.ts index 99f843eb2a..9a55eb35b3 100644 --- a/installing/deps-installer/test/install/fromTarball.ts +++ b/installing/deps-installer/test/install/fromTarball.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals' import { addDependenciesToPackage } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { testDefaults } from '../utils/index.js' diff --git a/installing/deps-installer/test/install/globalVirtualStore.ts b/installing/deps-installer/test/install/globalVirtualStore.ts index 2a7fbf2abc..5262b03967 100644 --- a/installing/deps-installer/test/install/globalVirtualStore.ts +++ b/installing/deps-installer/test/install/globalVirtualStore.ts @@ -5,10 +5,9 @@ import { afterAll, expect, test } from '@jest/globals' import { assertProject } from '@pnpm/assert-project' import { install, type MutatedProject, mutateModules, type ProjectOptions } from '@pnpm/installing.deps-installer' import { prepareEmpty, preparePackages } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' import type { PackageFilesIndex } from '@pnpm/store.cafs' import { StoreIndex, storeIndexKey } from '@pnpm/store.index' -import { addDistTag } from '@pnpm/testing.registry-mock' +import { addDistTag, getIntegrity } from '@pnpm/testing.registry-mock' import type { ProjectRootDir } from '@pnpm/types' import { rimrafSync } from '@zkochan/rimraf' diff --git a/installing/deps-installer/test/install/lockfileOnly.ts b/installing/deps-installer/test/install/lockfileOnly.ts index 708f117284..1fa9410dd7 100644 --- a/installing/deps-installer/test/install/lockfileOnly.ts +++ b/installing/deps-installer/test/install/lockfileOnly.ts @@ -9,8 +9,7 @@ import { install, } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' -import { addDistTag } from '@pnpm/testing.registry-mock' +import { addDistTag, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { testDefaults } from '../utils/index.js' diff --git a/installing/deps-installer/test/install/misc.ts b/installing/deps-installer/test/install/misc.ts index 81abd1ff0a..5d96312c30 100644 --- a/installing/deps-installer/test/install/misc.ts +++ b/installing/deps-installer/test/install/misc.ts @@ -11,9 +11,8 @@ import { UnexpectedVirtualStoreDirError, } from '@pnpm/installing.deps-installer' import { prepare, prepareEmpty, preparePackages } from '@pnpm/prepare' -import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' -import { addDistTag } from '@pnpm/testing.registry-mock' +import { addDistTag, getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { ProjectManifest, ProjectRootDir } from '@pnpm/types' import { rimrafSync } from '@zkochan/rimraf' import { isCI } from 'ci-info' diff --git a/installing/deps-installer/test/install/nodeRuntime.ts b/installing/deps-installer/test/install/nodeRuntime.ts index 94c981f2f7..d4dc928295 100644 --- a/installing/deps-installer/test/install/nodeRuntime.ts +++ b/installing/deps-installer/test/install/nodeRuntime.ts @@ -5,8 +5,8 @@ import { expect, test } from '@jest/globals' import { LOCKFILE_VERSION, WANTED_LOCKFILE } from '@pnpm/constants' import { addDependenciesToPackage, install } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' import type { VariationsResolution } from '@pnpm/resolving.resolver-base' +import { getIntegrity } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { writeYamlFileSync } from 'write-yaml-file' diff --git a/installing/deps-installer/test/install/patch.ts b/installing/deps-installer/test/install/patch.ts index d43f434b24..70cca54ac8 100644 --- a/installing/deps-installer/test/install/patch.ts +++ b/installing/deps-installer/test/install/patch.ts @@ -6,10 +6,10 @@ import { ENGINE_NAME } from '@pnpm/constants' import { createHexHashFromFile } from '@pnpm/crypto.hash' import { install } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' import type { PackageFilesIndex } from '@pnpm/store.cafs' import { StoreIndex, storeIndexKey } from '@pnpm/store.index' import { fixtures } from '@pnpm/test-fixtures' +import { getIntegrity } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { testDefaults } from '../utils/index.js' diff --git a/installing/deps-installer/test/install/peerDependencies.ts b/installing/deps-installer/test/install/peerDependencies.ts index 54295d7260..a924420ccf 100644 --- a/installing/deps-installer/test/install/peerDependencies.ts +++ b/installing/deps-installer/test/install/peerDependencies.ts @@ -16,9 +16,8 @@ import { } from '@pnpm/installing.deps-installer' import type { LockfileFile } from '@pnpm/lockfile.fs' import { prepareEmpty, preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' -import { addDistTag } from '@pnpm/testing.registry-mock' +import { addDistTag, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { ProjectRootDir } from '@pnpm/types' import { rimrafSync } from '@zkochan/rimraf' import deepRequireCwd from 'deep-require-cwd' diff --git a/installing/deps-installer/test/install/sideEffects.ts b/installing/deps-installer/test/install/sideEffects.ts index 5371e43424..4e1566e803 100644 --- a/installing/deps-installer/test/install/sideEffects.ts +++ b/installing/deps-installer/test/install/sideEffects.ts @@ -6,9 +6,9 @@ import { ENGINE_NAME } from '@pnpm/constants' import { hashObject } from '@pnpm/crypto.object-hasher' import { addDependenciesToPackage, install } from '@pnpm/installing.deps-installer' import { prepareEmpty } from '@pnpm/prepare' -import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { getFilePathByModeInCafs, type PackageFilesIndex } from '@pnpm/store.cafs' import { StoreIndex, storeIndexKey } from '@pnpm/store.index' +import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { testDefaults } from '../utils/index.js' diff --git a/installing/deps-installer/test/lockfile.ts b/installing/deps-installer/test/lockfile.ts index e4f90d21c9..885249081f 100644 --- a/installing/deps-installer/test/lockfile.ts +++ b/installing/deps-installer/test/lockfile.ts @@ -16,10 +16,9 @@ import type { LockfileObject, TarballResolution } from '@pnpm/lockfile.fs' import type { LockfileFile } from '@pnpm/lockfile.types' import { readPackageJsonFromDir } from '@pnpm/pkg-manifest.reader' import { prepareEmpty, preparePackages, tempDir } from '@pnpm/prepare' -import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' import { getMockAgent, setupMockAgent, teardownMockAgent } from '@pnpm/testing.mock-agent' -import { addDistTag } from '@pnpm/testing.registry-mock' +import { addDistTag, getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { DepPath, ProjectManifest, ProjectRootDir } from '@pnpm/types' import { rimrafSync } from '@zkochan/rimraf' import { loadJsonFileSync } from 'load-json-file' diff --git a/installing/deps-installer/test/uninstall.ts b/installing/deps-installer/test/uninstall.ts index 0954eee21e..9e2a07faea 100644 --- a/installing/deps-installer/test/uninstall.ts +++ b/installing/deps-installer/test/uninstall.ts @@ -10,8 +10,8 @@ import { } from '@pnpm/installing.deps-installer' import type { LockfileObject } from '@pnpm/lockfile.fs' import { prepareEmpty, preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { PackageManifest, ProjectRootDir } from '@pnpm/types' import existsSymlink from 'exists-link' import { readYamlFileSync } from 'read-yaml-file' diff --git a/installing/deps-installer/test/utils/testDefaults.ts b/installing/deps-installer/test/utils/testDefaults.ts index a40d1667ea..66e92b0576 100644 --- a/installing/deps-installer/test/utils/testDefaults.ts +++ b/installing/deps-installer/test/utils/testDefaults.ts @@ -1,8 +1,8 @@ import type { CustomResolver } from '@pnpm/hooks.types' import type { InstallOptions } from '@pnpm/installing.deps-installer' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import type { ResolutionVerifier } from '@pnpm/resolving.resolver-base' import type { StoreController } from '@pnpm/store.controller-types' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { createTempStore } from '@pnpm/testing.temp-store' import type { Registries } from '@pnpm/types' diff --git a/installing/deps-restorer/package.json b/installing/deps-restorer/package.json index 93dc79d9e7..2a5fded552 100644 --- a/installing/deps-restorer/package.json +++ b/installing/deps-restorer/package.json @@ -85,12 +85,12 @@ "@pnpm/installing.read-projects-context": "workspace:*", "@pnpm/logger": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/store.cafs": "workspace:*", "@pnpm/store.index": "workspace:*", "@pnpm/store.path": "workspace:*", "@pnpm/test-fixtures": "workspace:*", "@pnpm/test-ipc-server": "workspace:*", + "@pnpm/testing.registry-mock": "workspace:*", "@pnpm/testing.temp-store": "workspace:*", "@types/fs-extra": "catalog:", "@types/ramda": "catalog:", diff --git a/installing/deps-restorer/test/index.ts b/installing/deps-restorer/test/index.ts index e725e3a752..ec00098900 100644 --- a/installing/deps-restorer/test/index.ts +++ b/installing/deps-restorer/test/index.ts @@ -10,11 +10,11 @@ import { headlessInstall } from '@pnpm/installing.deps-restorer' import { readModulesManifest } from '@pnpm/installing.modules-yaml' import { readWantedLockfile } from '@pnpm/lockfile.fs' import { tempDir } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' import type { PackageFilesIndex } from '@pnpm/store.cafs' import { StoreIndex, storeIndexKey } from '@pnpm/store.index' import { fixtures } from '@pnpm/test-fixtures' import { createTestIpcServer } from '@pnpm/test-ipc-server' +import { getIntegrity } from '@pnpm/testing.registry-mock' import type { DepPath } from '@pnpm/types' import { rimrafSync } from '@zkochan/rimraf' import { loadJsonFileSync } from 'load-json-file' diff --git a/installing/deps-restorer/test/utils/testDefaults.ts b/installing/deps-restorer/test/utils/testDefaults.ts index 94657f7e43..44e8b05a4c 100644 --- a/installing/deps-restorer/test/utils/testDefaults.ts +++ b/installing/deps-restorer/test/utils/testDefaults.ts @@ -3,8 +3,8 @@ import path from 'node:path' import type { HeadlessOptions } from '@pnpm/installing.deps-restorer' import { readProjectsContext } from '@pnpm/installing.read-projects-context' import { safeReadPackageJsonFromDir } from '@pnpm/pkg-manifest.reader' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { getStorePath } from '@pnpm/store.path' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { createTempStore } from '@pnpm/testing.temp-store' import { temporaryDirectory } from 'tempy' diff --git a/installing/deps-restorer/tsconfig.json b/installing/deps-restorer/tsconfig.json index b9d2042f22..d8fcad8569 100644 --- a/installing/deps-restorer/tsconfig.json +++ b/installing/deps-restorer/tsconfig.json @@ -96,6 +96,9 @@ { "path": "../../store/path" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../../testing/temp-store" }, diff --git a/installing/env-installer/package.json b/installing/env-installer/package.json index 4cb62ea564..d86d8e7c0d 100644 --- a/installing/env-installer/package.json +++ b/installing/env-installer/package.json @@ -67,7 +67,7 @@ "@jest/globals": "catalog:", "@pnpm/installing.env-installer": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", + "@pnpm/testing.registry-mock": "workspace:*", "@pnpm/testing.temp-store": "workspace:*", "@types/semver": "catalog:", "load-json-file": "catalog:", diff --git a/installing/env-installer/test/installConfigDeps.ts b/installing/env-installer/test/installConfigDeps.ts index ee9708e41e..c20a55c528 100644 --- a/installing/env-installer/test/installConfigDeps.ts +++ b/installing/env-installer/test/installConfigDeps.ts @@ -6,7 +6,7 @@ import { expect, test } from '@jest/globals' import { installConfigDeps } from '@pnpm/installing.env-installer' import { createEnvLockfile, type EnvLockfile, readEnvLockfile } from '@pnpm/lockfile.fs' import { prepareEmpty } from '@pnpm/prepare' -import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { createTempStore } from '@pnpm/testing.temp-store' import { rimraf } from '@zkochan/rimraf' import { loadJsonFileSync } from 'load-json-file' diff --git a/installing/env-installer/test/resolveAndInstallConfigDeps.test.ts b/installing/env-installer/test/resolveAndInstallConfigDeps.test.ts index 019744abff..995b5e576a 100644 --- a/installing/env-installer/test/resolveAndInstallConfigDeps.test.ts +++ b/installing/env-installer/test/resolveAndInstallConfigDeps.test.ts @@ -5,7 +5,7 @@ import { resolveAndInstallConfigDeps } from '@pnpm/installing.env-installer' import { createEnvLockfile, readEnvLockfile, writeEnvLockfile } from '@pnpm/lockfile.fs' import { type LogBase, streamParser } from '@pnpm/logger' import { prepareEmpty } from '@pnpm/prepare' -import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { createTempStore } from '@pnpm/testing.temp-store' import { loadJsonFileSync } from 'load-json-file' diff --git a/installing/env-installer/test/resolveConfigDeps.test.ts b/installing/env-installer/test/resolveConfigDeps.test.ts index 9165398e62..fe59ad8eea 100644 --- a/installing/env-installer/test/resolveConfigDeps.test.ts +++ b/installing/env-installer/test/resolveConfigDeps.test.ts @@ -4,7 +4,7 @@ import { expect, test } from '@jest/globals' import { resolveConfigDeps } from '@pnpm/installing.env-installer' import { readEnvLockfile, writeEnvLockfile } from '@pnpm/lockfile.fs' import { prepareEmpty } from '@pnpm/prepare' -import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { createTempStore } from '@pnpm/testing.temp-store' import { readYamlFileSync } from 'read-yaml-file' diff --git a/installing/env-installer/tsconfig.json b/installing/env-installer/tsconfig.json index e8d280f50e..7c85e14f06 100644 --- a/installing/env-installer/tsconfig.json +++ b/installing/env-installer/tsconfig.json @@ -72,6 +72,9 @@ { "path": "../../store/controller-types" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../../testing/temp-store" }, diff --git a/installing/package-requester/package.json b/installing/package-requester/package.json index 3a26a37b7f..eacf7bb7a2 100644 --- a/installing/package-requester/package.json +++ b/installing/package-requester/package.json @@ -66,11 +66,11 @@ "@pnpm/installing.client": "workspace:*", "@pnpm/installing.package-requester": "workspace:*", "@pnpm/logger": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/store.cafs-types": "workspace:*", "@pnpm/store.create-cafs-store": "workspace:*", "@pnpm/test-fixtures": "workspace:*", "@pnpm/testing.mock-agent": "workspace:*", + "@pnpm/testing.registry-mock": "workspace:*", "@types/normalize-path": "catalog:", "@types/ramda": "catalog:", "@types/semver": "catalog:", diff --git a/installing/package-requester/test/index.ts b/installing/package-requester/test/index.ts index 802e73a0af..600c6ea4f4 100644 --- a/installing/package-requester/test/index.ts +++ b/installing/package-requester/test/index.ts @@ -7,13 +7,13 @@ import { depPathToFilename } from '@pnpm/deps.path' import { createClient } from '@pnpm/installing.client' import { createPackageRequester, type PackageResponse } from '@pnpm/installing.package-requester' import { streamParser } from '@pnpm/logger' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import type { PackageFilesIndex } from '@pnpm/store.cafs' import type { PkgRequestFetchResult, PkgResolutionId, RequestPackageOptions } from '@pnpm/store.controller-types' import { createCafsStore } from '@pnpm/store.create-cafs-store' import { StoreIndex } from '@pnpm/store.index' import { fixtures } from '@pnpm/test-fixtures' import { setupMockAgent, teardownMockAgent } from '@pnpm/testing.mock-agent' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { restartWorkerPool } from '@pnpm/worker' import delay from 'delay' import normalize from 'normalize-path' diff --git a/installing/package-requester/tsconfig.json b/installing/package-requester/tsconfig.json index 818837f84f..ef273a1093 100644 --- a/installing/package-requester/tsconfig.json +++ b/installing/package-requester/tsconfig.json @@ -63,6 +63,9 @@ { "path": "../../testing/mock-agent" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../../worker" }, diff --git a/pacquet/AGENTS.md b/pacquet/AGENTS.md index 25e906abcb..46f1fa532b 100644 --- a/pacquet/AGENTS.md +++ b/pacquet/AGENTS.md @@ -186,13 +186,15 @@ Warnings are errors (`--deny warnings` in lint). Do not silence them with ## Tests - Tests live alongside the code they exercise (standard Cargo layout) plus - integration tests under each crate's `tests/`. Shared test fixtures live - under `crates/testing-utils/src/fixtures/`. + integration tests under each crate's `tests/`. Shared pacquet fixtures live + under `crates/testing-utils/src/fixtures/`; registry package fixtures live + under `../registry/.fixtures/packages/`. - Snapshot tests use `insta`. When an intentional change alters a snapshot, review the diff carefully, then accept with `cargo insta review`. Never accept snapshot changes blindly. -- Some tests require the mocked registry. Start it with - `just registry-mock launch` if a test needs it. +- Tests that need the mocked registry start `pnpm-registry` through + `pacquet-testing-utils`; `cargo test` / `cargo nextest run` should not + require a separate `just registry-mock launch` step. - When porting behavior from pnpm, port the relevant pnpm tests too (as Rust tests) whenever they translate. Matching test coverage is the easiest way to prove behavioral parity. diff --git a/pacquet/CONTRIBUTING.md b/pacquet/CONTRIBUTING.md index bb4594675e..ea562e8300 100644 --- a/pacquet/CONTRIBUTING.md +++ b/pacquet/CONTRIBUTING.md @@ -102,7 +102,7 @@ This runs `typos`, `cargo fmt`, `just check` (which is `cargo check --locked --w > Run `just ready` before every commit. This rule applies to all changes, including documentation edits, comment changes, and config updates. Any change can break formatting, linting, building, or tests across the supported platforms. > [!NOTE] -> Some integration tests require the local registry mock. Start it with `just registry-mock launch` before running `just test` if a test needs it. +> Integration tests that need the local registry mock start `pnpm-registry` automatically. After dependencies are installed, `cargo test`, `cargo nextest run`, and `just test` should not require a separate registry process. ## Debugging @@ -116,7 +116,6 @@ TRACE=pacquet_tarball just cli add fastify ```sh just install # install necessary dependencies -just registry-mock launch # start a mocked registry server (optional) just test # run tests ``` diff --git a/pacquet/crates/cli/tests/install.rs b/pacquet/crates/cli/tests/install.rs index 2378d00a56..370ebef648 100644 --- a/pacquet/crates/cli/tests/install.rs +++ b/pacquet/crates/cli/tests/install.rs @@ -136,12 +136,12 @@ fn should_install_index_files() { drop((root, mock_instance)); // cleanup } -// Ignored on CI: the test drives the mocked verdaccio with hundreds of +// Ignored on CI: the test drives the registry fixture with hundreds of // concurrent tarball fetches and reliably reports ConnectionAborted (Windows) / // ConnectionReset (macOS) / ConnectionClosed (Ubuntu) on hosted runners. Run -// manually with `just registry-mock launch` + `cargo test --test install -- --ignored +// manually with `cargo test --test install -- --ignored // frozen_lockfile_should_be_able_to_handle_big_lockfile`. -#[ignore = "flaky on CI: mocked verdaccio drops connections under concurrent load"] +#[ignore = "flaky on CI: registry fixture drops connections under concurrent load"] #[test] fn frozen_lockfile_should_be_able_to_handle_big_lockfile() { let CommandTempCwd { pacquet, root, workspace, npmrc_info, .. } = diff --git a/pacquet/crates/cli/tests/snapshots/install__should_install_dependencies.snap b/pacquet/crates/cli/tests/snapshots/install__should_install_dependencies.snap index cd3c4d8fd7..b56ce959a0 100644 --- a/pacquet/crates/cli/tests/snapshots/install__should_install_dependencies.snap +++ b/pacquet/crates/cli/tests/snapshots/install__should_install_dependencies.snap @@ -1,6 +1,5 @@ --- source: pacquet/crates/cli/tests/install.rs -assertion_line: 49 expression: "(workspace_folders, store_files)" --- ( @@ -29,10 +28,10 @@ expression: "(workspace_folders, store_files)" ], [ "v11/files/02/f9d952341eade675d0a8f5da14d4277fded62f937242292c2cf5f1bb0eda101b5f803098d64e2a138f4bfe4cdf326cfaf8f6b4015476ab86d25df03ddec731-exec", - "v11/files/2f/b86ecd88e34f18360bf865231219f7898cf713f63ad6d099f72b821f47cded6b92ece8d468775219a2950c50451d3f3e2f3920d15b4a3c372098f2daff864b", - "v11/files/65/d9491d753c9cff7b6d93461c83b8542a36db429a4cba4c712f841ae657f0d82b36d94081816d5a92ce761146c64b036ea1d89d53890c86b115d457bb98fa6b", + "v11/files/68/b837b4fd7982b081521e51b14a167ccdb272b3c499202449d07d48d78a2fa7bb8652d3a894bb06ac6e3995e5126ee3470f73b5775584940751fce8be468405", + "v11/files/76/7494fa050e61986b11b9d8af9a97faec0065fb71983265000e596f1b9cd8c35bda0ba18b643064ffc3e08da7da1afc42f6548f7939a91526f5780abbe1af10", + "v11/files/93/e31fcd9144a604f87d04fa8fb4a058202c579df17fd2b21301e17ac0ae4f3e2bae90ced7ae71b71218bd4a789e355ef7b8bd8899cdb785250071b229503b2e", "v11/files/bf/0c878f2a4f2ec6f231bb2d414547efb15eb22a673815cba36acfd89633cd4c8affcbdc9378e90ad4d8fc654de921d1f67444be94e6a2f81bda9330be60be93-exec", - "v11/files/fe/06f6dff7c043b7ea30547ff55a8fd06fecc30fe143e3acf09cdd30def35d660f8cafa74ff28287748f661bbd767987eed52b440c77942eb0fb9aa6f44cfb37", "v11/index.db", ], ) diff --git a/pacquet/crates/cli/tests/snapshots/install__should_install_exec_files.snap b/pacquet/crates/cli/tests/snapshots/install__should_install_exec_files.snap index 5b2ffbbdd4..3092ed5a18 100644 --- a/pacquet/crates/cli/tests/snapshots/install__should_install_exec_files.snap +++ b/pacquet/crates/cli/tests/snapshots/install__should_install_exec_files.snap @@ -1,13 +1,12 @@ --- -source: crates/cli/tests/install.rs -assertion_line: 108 +source: pacquet/crates/cli/tests/install.rs expression: store_files --- [ "v11/files/02/f9d952341eade675d0a8f5da14d4277fded62f937242292c2cf5f1bb0eda101b5f803098d64e2a138f4bfe4cdf326cfaf8f6b4015476ab86d25df03ddec731-exec", - "v11/files/2f/b86ecd88e34f18360bf865231219f7898cf713f63ad6d099f72b821f47cded6b92ece8d468775219a2950c50451d3f3e2f3920d15b4a3c372098f2daff864b", - "v11/files/65/d9491d753c9cff7b6d93461c83b8542a36db429a4cba4c712f841ae657f0d82b36d94081816d5a92ce761146c64b036ea1d89d53890c86b115d457bb98fa6b", + "v11/files/68/b837b4fd7982b081521e51b14a167ccdb272b3c499202449d07d48d78a2fa7bb8652d3a894bb06ac6e3995e5126ee3470f73b5775584940751fce8be468405", + "v11/files/76/7494fa050e61986b11b9d8af9a97faec0065fb71983265000e596f1b9cd8c35bda0ba18b643064ffc3e08da7da1afc42f6548f7939a91526f5780abbe1af10", + "v11/files/93/e31fcd9144a604f87d04fa8fb4a058202c579df17fd2b21301e17ac0ae4f3e2bae90ced7ae71b71218bd4a789e355ef7b8bd8899cdb785250071b229503b2e", "v11/files/bf/0c878f2a4f2ec6f231bb2d414547efb15eb22a673815cba36acfd89633cd4c8affcbdc9378e90ad4d8fc654de921d1f67444be94e6a2f81bda9330be60be93-exec", - "v11/files/fe/06f6dff7c043b7ea30547ff55a8fd06fecc30fe143e3acf09cdd30def35d660f8cafa74ff28287748f661bbd767987eed52b440c77942eb0fb9aa6f44cfb37", "v11/index.db", ] diff --git a/pacquet/crates/cli/tests/snapshots/install__should_install_index_files.snap b/pacquet/crates/cli/tests/snapshots/install__should_install_index_files.snap index 3487693aaf..870b2bd53b 100644 --- a/pacquet/crates/cli/tests/snapshots/install__should_install_index_files.snap +++ b/pacquet/crates/cli/tests/snapshots/install__should_install_index_files.snap @@ -1,31 +1,30 @@ --- -source: crates/cli/tests/install.rs -assertion_line: 133 +source: pacquet/crates/cli/tests/install.rs expression: index_file_contents --- -"sha512-G3aEYkPR7vdClnAaLekaPPXJdy1fDE7I0j8HagQDeJ9x3hX4iACybYTL7yZr6i69UsmK/Ho7xyxQII0OARxawA==\t@pnpm.e2e/hello-world-js-bin-parent@1.0.0": +"sha512-CapZoP8cyT6kYKGzA1VQH0+l+MHUzfZzPpsgmQxkCkRLAyPmLdkFi5J/qazltGsUY1f3HlgrI0fJckcZQi8Idg==\t@pnpm.e2e/hello-world-js-bin@1.0.0": LICENSE: - digest: 65d9491d753c9cff7b6d93461c83b8542a36db429a4cba4c712f841ae657f0d82b36d94081816d5a92ce761146c64b036ea1d89d53890c86b115d457bb98fa6b + digest: 767494fa050e61986b11b9d8af9a97faec0065fb71983265000e596f1b9cd8c35bda0ba18b643064ffc3e08da7da1afc42f6548f7939a91526f5780abbe1af10 mode: 420 - size: 1066 - index.js: - digest: 02f9d952341eade675d0a8f5da14d4277fded62f937242292c2cf5f1bb0eda101b5f803098d64e2a138f4bfe4cdf326cfaf8f6b4015476ab86d25df03ddec731 - mode: 493 - size: 79 - package.json: - digest: fe06f6dff7c043b7ea30547ff55a8fd06fecc30fe143e3acf09cdd30def35d660f8cafa74ff28287748f661bbd767987eed52b440c77942eb0fb9aa6f44cfb37 - mode: 420 - size: 536 -"sha512-bFWeEhV2pspARSwVwLnMfQStl22sXBuexcX+OvSlMw5hKw3tpyqeDCEA04qhdo1XCX1Hag0pBuI6H9Ri0ctzOw==\t@pnpm.e2e/hello-world-js-bin@1.0.0": - LICENSE: - digest: 65d9491d753c9cff7b6d93461c83b8542a36db429a4cba4c712f841ae657f0d82b36d94081816d5a92ce761146c64b036ea1d89d53890c86b115d457bb98fa6b - mode: 420 - size: 1066 + size: 1170 index.js: digest: bf0c878f2a4f2ec6f231bb2d414547efb15eb22a673815cba36acfd89633cd4c8affcbdc9378e90ad4d8fc654de921d1f67444be94e6a2f81bda9330be60be93 mode: 493 size: 48 package.json: - digest: 2fb86ecd88e34f18360bf865231219f7898cf713f63ad6d099f72b821f47cded6b92ece8d468775219a2950c50451d3f3e2f3920d15b4a3c372098f2daff864b + digest: 68b837b4fd7982b081521e51b14a167ccdb272b3c499202449d07d48d78a2fa7bb8652d3a894bb06ac6e3995e5126ee3470f73b5775584940751fce8be468405 mode: 420 - size: 410 + size: 379 +"sha512-P9VEb+AGUvzD40fpbbaO+ycsz+HMFTHfb/M4nZNChq77Q/umVX2brpidjLd00s0GpXm/quE1mr0h8Aiacz85xw==\t@pnpm.e2e/hello-world-js-bin-parent@1.0.0": + LICENSE: + digest: 767494fa050e61986b11b9d8af9a97faec0065fb71983265000e596f1b9cd8c35bda0ba18b643064ffc3e08da7da1afc42f6548f7939a91526f5780abbe1af10 + mode: 420 + size: 1170 + index.js: + digest: 02f9d952341eade675d0a8f5da14d4277fded62f937242292c2cf5f1bb0eda101b5f803098d64e2a138f4bfe4cdf326cfaf8f6b4015476ab86d25df03ddec731 + mode: 493 + size: 79 + package.json: + digest: 93e31fcd9144a604f87d04fa8fb4a058202c579df17fd2b21301e17ac0ae4f3e2bae90ced7ae71b71218bd4a789e355ef7b8bd8899cdb785250071b229503b2e + mode: 420 + size: 537 diff --git a/pacquet/crates/package-manager/Cargo.toml b/pacquet/crates/package-manager/Cargo.toml index d80b5fcf27..ff3d54537c 100644 --- a/pacquet/crates/package-manager/Cargo.toml +++ b/pacquet/crates/package-manager/Cargo.toml @@ -69,7 +69,6 @@ tracing = { workspace = true } miette = { workspace = true } [dev-dependencies] -pacquet-registry-mock = { workspace = true } pacquet-testing-utils = { workspace = true } node-semver = { workspace = true } diff --git a/pacquet/crates/package-manager/src/install/tests.rs b/pacquet/crates/package-manager/src/install/tests.rs index 495950a25f..9be9de3198 100644 --- a/pacquet/crates/package-manager/src/install/tests.rs +++ b/pacquet/crates/package-manager/src/install/tests.rs @@ -6,7 +6,6 @@ use pacquet_modules_yaml::{ read_modules_manifest, write_modules_manifest, }; use pacquet_package_manifest::{DependencyGroup, PackageManifest}; -use pacquet_registry_mock::AutoMockInstance; use pacquet_reporter::{ BrokenModulesLog, ContextLog, IgnoredScriptsLog, LogEvent, PackageManifestLog, PackageManifestMessage, ProgressLog, ProgressMessage, Reporter, SilentReporter, Stage, @@ -14,6 +13,7 @@ use pacquet_reporter::{ }; use pacquet_store_dir::STORE_VERSION; use pacquet_testing_utils::fs::{get_all_folders, is_symlink_or_junction}; +use pacquet_testing_utils::registry::TestRegistry; use pacquet_workspace_state::{ self as workspace_state, NodeLinker as WorkspaceStateNodeLinker, load_workspace_state, }; @@ -24,7 +24,7 @@ use text_block_macros::text_block; #[tokio::test] async fn should_install_dependencies() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -282,7 +282,7 @@ async fn frozen_lockfile_flag_overrides_config_lockfile_false() { /// #[tokio::test] async fn npm_alias_dependency_installs_under_alias_key() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -366,7 +366,7 @@ async fn npm_alias_dependency_installs_under_alias_key() { /// but omit the `@1.0.0` suffix to trigger the default-to-`latest` path. #[tokio::test] async fn unversioned_npm_alias_defaults_to_latest() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -985,7 +985,7 @@ mod build_workspace_state_tests { /// resolves. #[tokio::test] async fn install_optional_failing_postinstall_dep_via_registry_mock_succeeds() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -1060,7 +1060,7 @@ async fn install_optional_failing_postinstall_dep_via_registry_mock_succeeds() { /// [`peerDependencies.ts:1181-1255`](https://github.com/pnpm/pnpm/blob/1fb8a2d5d8/installing/deps-installer/test/install/peerDependencies.ts#L1181-L1255). #[tokio::test] async fn auto_install_peers_does_not_cascade_optional_peers() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -1158,7 +1158,7 @@ async fn auto_install_peers_does_not_cascade_optional_peers() { /// [`installing/deps-installer/test/install/peerDependencies.ts`](https://github.com/pnpm/pnpm/blob/1fb8a2d5d8/installing/deps-installer/test/install/peerDependencies.ts#L1257-L1323). #[tokio::test] async fn auto_install_peers_skips_meta_only_optional_peers() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -3812,7 +3812,7 @@ async fn install_rejects_invalid_minimum_release_age_exclude_pattern() { /// project's `node_modules` symlink exist. #[tokio::test] async fn frozen_lockfile_gate_rejects_under_huge_minimum_release_age() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -3925,7 +3925,7 @@ async fn frozen_lockfile_gate_rejects_under_huge_minimum_release_age() { /// under `.`, and matching `packages:` / `snapshots:` rows. #[tokio::test] async fn fresh_install_writes_pnpm_lock_yaml_with_expected_shape() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -4010,7 +4010,7 @@ async fn fresh_install_writes_pnpm_lock_yaml_with_expected_shape() { /// lands in the lockfile's `devDependencies` section. #[tokio::test] async fn fresh_install_splits_dev_and_prod_dependency_sections() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -4083,7 +4083,7 @@ async fn fresh_install_splits_dev_and_prod_dependency_sections() { /// (`1.0.0`). #[tokio::test] async fn fresh_install_records_user_written_specifier() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -4151,7 +4151,7 @@ async fn fresh_install_records_user_written_specifier() { /// don't catch because they assert on the in-memory shape). #[tokio::test] async fn fresh_install_lockfile_round_trips_through_load_save_load() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -4217,7 +4217,7 @@ async fn fresh_install_lockfile_round_trips_through_load_save_load() { /// no `pnpm-lock.yaml` on disk, but `node_modules/` materialized. #[tokio::test] async fn fresh_install_with_lockfile_disabled_does_not_write_a_lockfile() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -4288,7 +4288,7 @@ async fn fresh_install_with_lockfile_disabled_does_not_write_a_lockfile() { /// --frozen-lockfile` can read it back without a parse error. #[tokio::test] async fn fresh_install_also_writes_current_lockfile_under_virtual_store() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -4373,7 +4373,7 @@ async fn fresh_install_also_writes_current_lockfile_under_virtual_store() { /// matching upstream pnpm's all-or-nothing `useLockfile` behavior. #[tokio::test] async fn fresh_install_with_lockfile_disabled_skips_current_lockfile_too() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -4437,7 +4437,7 @@ async fn fresh_install_with_lockfile_disabled_skips_current_lockfile_too() { /// sibling lands `optional: false` so the test pins both sides. #[tokio::test] async fn fresh_install_marks_optional_snapshots_in_pnpm_lock_yaml() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -5624,7 +5624,7 @@ async fn optimistic_repeat_install_does_not_short_circuit_when_lockfile_missing( /// (which covers the negative direction). #[tokio::test] async fn optimistic_repeat_install_round_trips_on_single_project_install() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); @@ -5771,7 +5771,7 @@ async fn optimistic_repeat_install_round_trips_on_single_project_install() { /// [`crate::FreshnessCheckError::Stale`]). #[tokio::test] async fn fresh_install_applies_package_extensions_to_dependency_manifest() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let dir = tempdir().unwrap(); let store_dir = dir.path().join("pacquet-store"); diff --git a/pacquet/crates/package-manager/src/install_package_from_registry/tests.rs b/pacquet/crates/package-manager/src/install_package_from_registry/tests.rs index 2c49f85f7f..7351b7f36e 100644 --- a/pacquet/crates/package-manager/src/install_package_from_registry/tests.rs +++ b/pacquet/crates/package-manager/src/install_package_from_registry/tests.rs @@ -2,7 +2,6 @@ use super::{InstallPackageFromRegistry, InstallPackageFromRegistryError}; use pacquet_config::Config; use pacquet_lockfile::{LockfileResolution, TarballResolution}; use pacquet_network::ThrottledClient; -use pacquet_registry_mock::AutoMockInstance; use pacquet_reporter::{LogEvent, ProgressMessage, Reporter, SilentReporter}; use pacquet_resolving_npm_resolver::{ InMemoryPackageMetaCache, NpmResolver, shared_packument_fetch_locker, @@ -10,6 +9,7 @@ use pacquet_resolving_npm_resolver::{ }; use pacquet_resolving_resolver_base::{ResolveOptions, ResolveResult, Resolver, WantedDependency}; use pacquet_store_dir::{SharedVerifiedFilesCache, StoreDir}; +use pacquet_testing_utils::registry::TestRegistry; use pipe_trait::Pipe; use pretty_assertions::assert_eq; use std::{ @@ -144,7 +144,7 @@ async fn resolve_via_mock( #[tokio::test] pub async fn should_install_package_from_pre_resolved_result() { - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let store_dir = tempdir().unwrap(); let modules_dir = tempdir().unwrap(); let virtual_store_dir = tempdir().unwrap(); @@ -227,7 +227,7 @@ async fn second_visit_skips_progress_emits_but_still_links() { } } - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let store_dir = tempdir().unwrap(); let modules_dir = tempdir().unwrap(); let second_parent_dir = tempdir().unwrap(); @@ -343,7 +343,7 @@ async fn install_emits_progress_sequence() { } } - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let store_dir = tempdir().unwrap(); let modules_dir = tempdir().unwrap(); diff --git a/pacquet/crates/package-manager/tokens.db b/pacquet/crates/package-manager/tokens.db deleted file mode 100644 index 9196cb2c09..0000000000 Binary files a/pacquet/crates/package-manager/tokens.db and /dev/null differ diff --git a/pacquet/crates/testing-utils/Cargo.toml b/pacquet/crates/testing-utils/Cargo.toml index 2ac2df3d67..e3d36e0912 100644 --- a/pacquet/crates/testing-utils/Cargo.toml +++ b/pacquet/crates/testing-utils/Cargo.toml @@ -11,13 +11,14 @@ license.workspace = true repository.workspace = true [dependencies] -pacquet-registry-mock = { workspace = true } - -assert_cmd = { workspace = true } -command-extra = { workspace = true } -tempfile = { workspace = true } -walkdir = { workspace = true } -text-block-macros = { workspace = true } +assert_cmd = { workspace = true } +command-extra = { workspace = true } +pnpm-registry = { workspace = true } +tempfile = { workspace = true } +tokio = { workspace = true } +walkdir = { workspace = true } +text-block-macros = { workspace = true } +pnpm-registry-fixtures = { workspace = true } [target.'cfg(windows)'.dependencies] junction = { workspace = true } diff --git a/pacquet/crates/testing-utils/src/bin.rs b/pacquet/crates/testing-utils/src/bin.rs index 521826a2e5..fd0015dfa3 100644 --- a/pacquet/crates/testing-utils/src/bin.rs +++ b/pacquet/crates/testing-utils/src/bin.rs @@ -1,6 +1,6 @@ +use crate::registry::TestRegistry; use assert_cmd::prelude::*; use command_extra::CommandExtra; -use pacquet_registry_mock::AutoMockInstance; use std::{fs, path::PathBuf, process::Command}; use tempfile::{TempDir, tempdir}; use text_block_macros::text_block_fnl; @@ -44,8 +44,8 @@ pub struct AddMockedRegistry { pub store_dir: PathBuf, /// Absolute path to the cache directory as defined by the `.npmrc` file. pub cache_dir: PathBuf, - /// Anchor to a mocked registry instance. The server will be stop when [dropped](Drop). - pub mock_instance: AutoMockInstance, + /// Handle to the process-scoped mocked registry used by this test. + pub mock_instance: TestRegistry, } impl CommandTempCwd<()> { @@ -61,7 +61,7 @@ impl CommandTempCwd<()> { "store-dir=../pacquet-store" "cache-dir=../pacquet-cache" }; - let mock_instance = AutoMockInstance::load_or_init(); + let mock_instance = TestRegistry::start(); let mocked_registry = mock_instance.url(); let npmrc_text = format!("registry={mocked_registry}\n{npmrc_text}"); fs::write(&npmrc_path, npmrc_text).expect("write to .npmrc"); diff --git a/pacquet/crates/testing-utils/src/lib.rs b/pacquet/crates/testing-utils/src/lib.rs index 6dce8c99b3..146e78f73f 100644 --- a/pacquet/crates/testing-utils/src/lib.rs +++ b/pacquet/crates/testing-utils/src/lib.rs @@ -3,3 +3,4 @@ pub mod env_guard; pub mod fixtures; pub mod fs; pub mod known_failure; +pub mod registry; diff --git a/pacquet/crates/testing-utils/src/registry.rs b/pacquet/crates/testing-utils/src/registry.rs new file mode 100644 index 0000000000..310d4f784c --- /dev/null +++ b/pacquet/crates/testing-utils/src/registry.rs @@ -0,0 +1,70 @@ +use pnpm_registry::Config; +use std::{ + net::{Ipv4Addr, TcpListener}, + sync::OnceLock, + thread, +}; + +#[derive(Debug)] +#[must_use] +pub struct TestRegistry { + instance: &'static TestRegistryInstance, +} + +impl TestRegistry { + pub fn start() -> Self { + Self { instance: TestRegistryInstance::get() } + } + + pub fn url(&self) -> String { + self.instance.url.clone() + } +} + +#[derive(Debug)] +struct TestRegistryInstance { + url: String, +} + +impl TestRegistryInstance { + fn get() -> &'static Self { + static INSTANCE: OnceLock = OnceLock::new(); + INSTANCE.get_or_init(Self::start) + } + + fn start() -> Self { + let listener = TcpListener::bind((Ipv4Addr::LOCALHOST, 0)) + .expect("bind test registry to an unused localhost port"); + listener.set_nonblocking(true).expect("set test registry listener to nonblocking"); + let listen = listener.local_addr().expect("read test registry listener address"); + + let url = format!("http://{listen}/"); + let storage = pnpm_registry_fixtures::ensure_storage(); + // Proxy mode: `@pnpm.e2e` fixtures are served from local storage, while + // real npm packages (`is-positive`, `is-negative`, etc.) fall through to + // the npm uplink — matching how registry-mock served pacquet's tests. + let mut config = Config::proxy(listen, storage.to_path_buf()); + config.public_url = url.trim_end_matches('/').to_string(); + // A long TTL keeps the fixture packuments (whose `time` values are static) + // from being treated as stale and refetched from the uplink. + config.packument_ttl = std::time::Duration::from_secs(31_536_000); + thread::Builder::new() + .name("pacquet-test-registry".to_string()) + .spawn(move || run_registry(config, listener)) + .expect("spawn test registry thread"); + + Self { url } + } +} + +fn run_registry(config: Config, listener: TcpListener) { + let runtime = tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .expect("create test registry runtime"); + + runtime.block_on(async move { + let listener = tokio::net::TcpListener::from_std(listener).expect("create tokio listener"); + pnpm_registry::serve_listener(config, listener).await.expect("serve test registry"); + }); +} diff --git a/pacquet/tasks/registry-mock/Cargo.toml b/pacquet/tasks/registry-mock/Cargo.toml index d1c5341dad..3f77359c8a 100644 --- a/pacquet/tasks/registry-mock/Cargo.toml +++ b/pacquet/tasks/registry-mock/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pacquet-registry-mock" version = "0.0.0" -description = "Drives pnpm-registry against @pnpm/registry-mock's shipped storage for pacquet tests" +description = "Drives pnpm-registry against the in-repo registry fixtures for pacquet benchmarks" publish = false authors.workspace = true edition.workspace = true @@ -21,16 +21,17 @@ path = "src/main.rs" doc = false [dependencies] -assert_cmd = { workspace = true } -clap = { workspace = true } -home = { workspace = true } -pipe-trait = { workspace = true } -reqwest = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } -sysinfo = { workspace = true } -tokio = { workspace = true } -walkdir = { workspace = true } +assert_cmd = { workspace = true } +clap = { workspace = true } +home = { workspace = true } +pipe-trait = { workspace = true } +pnpm-registry-fixtures = { workspace = true } +reqwest = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +sysinfo = { workspace = true } +tokio = { workspace = true } +walkdir = { workspace = true } [lints] workspace = true diff --git a/pacquet/tasks/registry-mock/package.json b/pacquet/tasks/registry-mock/package.json index 62d401dc31..2569a63d33 100644 --- a/pacquet/tasks/registry-mock/package.json +++ b/pacquet/tasks/registry-mock/package.json @@ -3,8 +3,7 @@ "version": "1100.0.0", "private": true, "devDependencies": { - "@pnpm-private/pacquet-registry-mock-launcher": "workspace:*", - "@pnpm/registry-mock": "catalog:" + "@pnpm-private/pacquet-registry-mock-launcher": "workspace:*" }, "keywords": [ "pnpm", diff --git a/pacquet/tasks/registry-mock/src/dirs.rs b/pacquet/tasks/registry-mock/src/dirs.rs index 3f29b1e1a5..8b65438467 100644 --- a/pacquet/tasks/registry-mock/src/dirs.rs +++ b/pacquet/tasks/registry-mock/src/dirs.rs @@ -31,26 +31,12 @@ pub fn workspace_root() -> &'static Path { }) } -pub fn registry_mock() -> &'static Path { - static REGISTRY_MOCK: OnceLock = OnceLock::new(); - REGISTRY_MOCK - .get_or_init(|| workspace_root().join("pacquet").join("tasks").join("registry-mock")) -} - -/// The verdaccio-shaped storage that `@pnpm/registry-mock`'s published -/// npm tarball ships under `registry/storage-cache/`. We don't serve -/// directly from here — see [`runtime_storage`] for why — but we -/// seed [`runtime_storage`] from it on every launch. +/// The verdaccio-shaped storage built from the in-repo package fixtures +/// (`registry/.fixtures/packages`) — the same storage pacquet's tests serve. +/// We don't serve directly from here — see [`runtime_storage`] for why — but +/// we seed [`runtime_storage`] from it on every launch. pub fn registry_mock_storage() -> &'static Path { - static STORAGE: OnceLock = OnceLock::new(); - STORAGE.get_or_init(|| { - registry_mock() - .join("node_modules") - .join("@pnpm") - .join("registry-mock") - .join("registry") - .join("storage-cache") - }) + pnpm_registry_fixtures::ensure_storage() } /// Stable cache path we hand to `pnpm-registry --storage` (instead @@ -59,9 +45,9 @@ pub fn registry_mock_storage() -> &'static Path { /// /// 1. `pnpm-registry` writes proxy-mode cache entries (the ~2.3k /// unscoped npm packages the benchmark lockfile pulls) into -/// `--storage`. If we pointed at the registry-mock package's -/// install dir we'd pollute `node_modules` and lose every cached -/// entry when `pnpm install` recreates it. +/// `--storage`. If we pointed at the generated fixture storage +/// we'd mix proxy-cache entries into it and lose them whenever the +/// fixtures are rebuilt. /// 2. CI caches this path across runs /// (`.github/workflows/pacquet-integrated-benchmark.yml`). Without /// that, cold-cache scenarios pay a full 2.3k-packument fetch diff --git a/pacquet/tasks/registry-mock/src/mock_instance.rs b/pacquet/tasks/registry-mock/src/mock_instance.rs index bee49489a9..a5aacf6d0e 100644 --- a/pacquet/tasks/registry-mock/src/mock_instance.rs +++ b/pacquet/tasks/registry-mock/src/mock_instance.rs @@ -79,12 +79,11 @@ impl<'a> MockInstanceOptions<'a> { let stderr = stderr.map_or_else(Stdio::null, |stderr| { File::create(stderr).expect("create file for stderr").into() }); - // No `prepare` step needed — `@pnpm/registry-mock`'s npm - // tarball ships `registry/storage-cache/` already populated. - // pnpm-registry runs in proxy mode against npmjs.org so - // off-storage packages (`is-positive`, `json-append`, etc.) - // fall through to npm; see `pnpm_registry_command` for the - // rationale. + // Storage is built from the in-repo fixtures (see + // `registry_mock_storage`) and seeded into runtime storage by + // `pnpm_registry_command`. pnpm-registry runs in proxy mode + // against npmjs.org so off-fixture packages fall through to + // npm; see `pnpm_registry_command` for the rationale. let process = pnpm_registry_command(port) .stdin(Stdio::null()) .stdout(stdout) diff --git a/pacquet/tasks/registry-mock/src/pnpm_registry_command.rs b/pacquet/tasks/registry-mock/src/pnpm_registry_command.rs index ffb3d811ce..0d67fed290 100644 --- a/pacquet/tasks/registry-mock/src/pnpm_registry_command.rs +++ b/pacquet/tasks/registry-mock/src/pnpm_registry_command.rs @@ -45,14 +45,12 @@ fn pnpm_registry_binary() -> PathBuf { } /// Build a [`Command`] that spawns the `pnpm-registry` binary in -/// proxy mode against `@pnpm/registry-mock`'s prepared storage -/// directory, with `registry.npmjs.org` as the upstream. +/// proxy mode against the storage built from the in-repo fixtures, +/// with `registry.npmjs.org` as the upstream. /// -/// This mirrors verdaccio's `'**': proxy: npmjs` setup in -/// `@pnpm/registry-mock`'s `registry/config.yaml`: the storage -/// holds the scoped fixture packages (`@foo`, `@pnpm.e2e`, …) and -/// anything else (e.g. `is-positive`, `json-append`) is pulled -/// from npmjs.org on demand. +/// The storage holds the fixture packages (`@foo`, `@pnpm.e2e`, …) +/// and anything else (e.g. extra npm packages the benchmark lockfile +/// pulls) is fetched from npmjs.org on demand. /// /// `--packument-ttl-secs 31536000` (one year) keeps the fixture /// packuments authoritative across a test run: their on-disk diff --git a/pacquet/tasks/registry-mock/src/seed_storage.rs b/pacquet/tasks/registry-mock/src/seed_storage.rs index a395ad9caa..3abf146c30 100644 --- a/pacquet/tasks/registry-mock/src/seed_storage.rs +++ b/pacquet/tasks/registry-mock/src/seed_storage.rs @@ -19,9 +19,9 @@ pub fn seed_runtime_storage() -> io::Result { let src = registry_mock_storage(); let dest = runtime_storage(); if !src.exists() { - // The launcher needs registry-mock installed via pnpm — if - // it isn't, fall through with zero seeded and let - // pnpm-registry's own startup fail with a clear message. + // `registry_mock_storage` builds the fixture storage on first + // call, so this is unreachable in practice; guard anyway and + // let pnpm-registry's own startup surface any problem. return Ok(0); } fs::create_dir_all(dest)?; diff --git a/patching/commands/package.json b/patching/commands/package.json index 2380c36b7b..d4dad7b3af 100644 --- a/patching/commands/package.json +++ b/patching/commands/package.json @@ -75,9 +75,9 @@ "@pnpm/logger": "workspace:*", "@pnpm/patching.commands": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/test-fixtures": "workspace:*", "@pnpm/testing.command-defaults": "workspace:*", + "@pnpm/testing.registry-mock": "workspace:*", "@pnpm/workspace.projects-filter": "workspace:*", "@types/is-windows": "catalog:", "@types/normalize-path": "catalog:", diff --git a/patching/commands/test/patch.test.ts b/patching/commands/test/patch.test.ts index 2f073815ec..e3b16617a0 100644 --- a/patching/commands/test/patch.test.ts +++ b/patching/commands/test/patch.test.ts @@ -6,8 +6,8 @@ import { beforeAll, beforeEach, describe, expect, it, jest, test } from '@jest/g import { install } from '@pnpm/installing.commands' import type { PatchCommandOptions, PatchRemoveCommandOptions } from '@pnpm/patching.commands' import { prepare, preparePackages, tempDir } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { readProjectManifest } from '@pnpm/workspace.project-manifest-reader' import { filterProjectsBySelectorObjectsFromDir } from '@pnpm/workspace.projects-filter' import { readWorkspaceManifest } from '@pnpm/workspace.workspace-manifest-reader' diff --git a/patching/commands/tsconfig.json b/patching/commands/tsconfig.json index ab23aa3be5..3164f88857 100644 --- a/patching/commands/tsconfig.json +++ b/patching/commands/tsconfig.json @@ -72,6 +72,9 @@ { "path": "../../testing/command-defaults" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../../workspace/project-manifest-reader" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5573a9aa78..0a594c1136 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -343,9 +343,6 @@ catalogs: '@pnpm/pnpr': specifier: 0.0.0-26052601 version: 0.0.0-26052601 - '@pnpm/registry-mock': - specifier: 6.0.0 - version: 6.0.0 '@pnpm/semver-diff': specifier: ^2.0.0 version: 2.0.0 @@ -1057,7 +1054,7 @@ overrides: validator@<13.15.22: '>=13.15.22' yaml@<2.2.2: '>=2.2.2' -packageExtensionsChecksum: sha256-5MFvHtkx55wociGgObsUBZkqCEdGsYYli4HO9Jm9LqY= +packageExtensionsChecksum: sha256-dCLe+IoExfAcR32yX7G/Rkg9Pl+KZvrZU0shhI7/1sE= pnpmfileChecksum: sha256-FyKtfMeHqu9zq1rXAr8P3zdA0NAXUioGdY0esg+SB5s= @@ -1231,9 +1228,9 @@ importers: '@pnpm/lockfile.types': specifier: workspace:* version: link:../../lockfile/types - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock '@pnpm/types': specifier: workspace:* version: link:../../core/types @@ -1274,15 +1271,15 @@ importers: '@jest/globals': specifier: 'catalog:' version: 30.3.0 - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/store.cafs': specifier: workspace:* version: link:../../store/cafs '@pnpm/store.index': specifier: workspace:* version: link:../../store/index + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock devDependencies: '@pnpm/assert-store': specifier: workspace:* @@ -1367,9 +1364,6 @@ importers: '@pnpm/pnpr': specifier: 'catalog:' version: 0.0.0-26052601 - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/testing.registry-mock': specifier: workspace:* version: link:../../testing/registry-mock @@ -1382,9 +1376,6 @@ importers: get-port: specifier: 'catalog:' version: 7.2.0 - read-yaml-file: - specifier: 'catalog:' - version: 3.0.0 tree-kill: specifier: 'catalog:' version: 1.2.2 @@ -1586,9 +1577,9 @@ importers: '@pnpm/logger': specifier: workspace:* version: link:../../core/logger - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock cross-env: specifier: 'catalog:' version: 10.1.0 @@ -1973,9 +1964,6 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/store.cafs': specifier: workspace:* version: link:../../store/cafs @@ -1991,6 +1979,9 @@ importers: '@pnpm/testing.command-defaults': specifier: workspace:* version: link:../../testing/command-defaults + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock '@pnpm/workspace.projects-filter': specifier: workspace:* version: link:../../workspace/projects-filter @@ -2182,9 +2173,9 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock '@types/ramda': specifier: 'catalog:' version: 0.31.1 @@ -3135,9 +3126,6 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/test-fixtures': specifier: workspace:* version: link:../../../__utils__/test-fixtures @@ -3533,9 +3521,6 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/test-fixtures': specifier: workspace:* version: link:../../../__utils__/test-fixtures @@ -4392,9 +4377,6 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/test-ipc-server': specifier: workspace:* version: link:../../__utils__/test-ipc-server @@ -5480,9 +5462,6 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/store.index': specifier: workspace:* version: link:../../store/index @@ -5871,9 +5850,6 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/resolving.registry.types': specifier: workspace:* version: link:../../resolving/registry/types @@ -6224,9 +6200,6 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/store.cafs': specifier: workspace:* version: link:../../store/cafs @@ -6242,6 +6215,9 @@ importers: '@pnpm/test-ipc-server': specifier: workspace:* version: link:../../__utils__/test-ipc-server + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock '@pnpm/testing.temp-store': specifier: workspace:* version: link:../../testing/temp-store @@ -6360,9 +6336,9 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock '@pnpm/testing.temp-store': specifier: workspace:* version: link:../../testing/temp-store @@ -6645,9 +6621,6 @@ importers: '@pnpm/logger': specifier: workspace:* version: link:../../core/logger - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/store.cafs-types': specifier: workspace:* version: link:../../store/cafs-types @@ -6660,6 +6633,9 @@ importers: '@pnpm/testing.mock-agent': specifier: workspace:* version: link:../../testing/mock-agent + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock '@types/normalize-path': specifier: 'catalog:' version: 3.0.2 @@ -7426,9 +7402,6 @@ importers: '@pnpm-private/pacquet-registry-mock-launcher': specifier: workspace:* version: 'link:' - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) patching/apply-patch: dependencies: @@ -7569,15 +7542,15 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/test-fixtures': specifier: workspace:* version: link:../../__utils__/test-fixtures '@pnpm/testing.command-defaults': specifier: workspace:* version: link:../../testing/command-defaults + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock '@pnpm/workspace.projects-filter': specifier: workspace:* version: link:../../workspace/projects-filter @@ -7856,9 +7829,6 @@ importers: '@pnpm/registry-access.commands': specifier: workspace:* version: link:../registry-access/commands - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/releasing.commands': specifier: workspace:* version: link:../releasing/commands @@ -8245,9 +8215,6 @@ importers: '@pnpm/registry-access.commands': specifier: workspace:* version: 'link:' - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/releasing.commands': specifier: workspace:* version: link:../../releasing/commands @@ -8257,6 +8224,9 @@ importers: '@pnpm/testing.mock-agent': specifier: workspace:* version: link:../../testing/mock-agent + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock '@types/ramda': specifier: 'catalog:' version: 0.31.1 @@ -8447,9 +8417,6 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/releasing.commands': specifier: workspace:* version: 'link:' @@ -8462,6 +8429,9 @@ importers: '@pnpm/testing.command-defaults': specifier: workspace:* version: link:../../testing/command-defaults + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock '@types/cross-spawn': specifier: 'catalog:' version: 6.0.6 @@ -9130,15 +9100,15 @@ importers: '@pnpm/prepare': specifier: workspace:* version: link:../../__utils__/prepare - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/store.commands': specifier: workspace:* version: 'link:' '@pnpm/store.controller': specifier: workspace:* version: link:../controller + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../../testing/registry-mock '@types/archy': specifier: 'catalog:' version: 0.0.36 @@ -9434,9 +9404,9 @@ importers: testing/command-defaults: dependencies: - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../registry-mock devDependencies: '@pnpm/testing.command-defaults': specifier: workspace:* @@ -9463,9 +9433,6 @@ importers: '@pnpm/registry-access.client': specifier: workspace:* version: link:../../registry-access/client - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) devDependencies: '@pnpm/testing.registry-mock': specifier: workspace:* @@ -9476,9 +9443,6 @@ importers: '@pnpm/installing.client': specifier: workspace:* version: link:../../installing/client - '@pnpm/registry-mock': - specifier: 'catalog:' - version: 6.0.0(encoding@0.1.13) '@pnpm/resolving.resolver-base': specifier: workspace:* version: link:../../resolving/resolver-base @@ -9491,6 +9455,9 @@ importers: '@pnpm/store.index': specifier: workspace:* version: link:../../store/index + '@pnpm/testing.registry-mock': + specifier: workspace:* + version: link:../registry-mock devDependencies: '@pnpm/testing.temp-store': specifier: workspace:* @@ -11810,16 +11777,6 @@ packages: peerDependencies: '@pnpm/logger': ^1001.0.1 - '@pnpm/registry-mock@6.0.0': - resolution: {integrity: sha512-OdeuaWEcAg0yFQacHwujnTckr5muhZ5P2PRoxoMMtiGDoOVKtEXqb4mXkz9VwsFeuSrj/3bbI5v42SVNZr+EHw==} - engines: {node: '>=18.12'} - hasBin: true - peerDependencies: - verdaccio: ^5.20.1 || ^6.1.6 - peerDependenciesMeta: - verdaccio: - optional: true - '@pnpm/registry.pkg-metadata-filter@1000.1.6': resolution: {integrity: sha512-1sgnH0BKvnavbunCXZVRCSOXef/2E8dIFocNqZdHXF84JWcy4QIi5rwXHNRElMBgqZt1vUzKsEMMVtwQaS9cGA==} engines: {node: '>=18.12'} @@ -11986,20 +11943,6 @@ packages: resolution: {integrity: sha512-aEmCtfPJejq9I/q7pIYNo3Q0ryPrUoR57noCJbU+f0zNmg8JKG5YVVfCVvo5KNnG3LlN/MDyWvSHTeqy+HCoWA==} engines: {node: '>=18.12'} - '@postman/form-data@3.1.1': - resolution: {integrity: sha512-vjh8Q2a8S6UCm/KKs31XFJqEEgmbjBmpPNVV2eVav6905wyFAwaUOBGA1NPBI4ERH9MMZc6w0umFgM6WbEPMdg==} - engines: {node: '>= 6'} - - '@postman/tough-cookie@4.1.3-postman.1': - resolution: {integrity: sha512-txpgUqZOnWYnUHZpHjkfb0IwVH4qJmyq77pPnJLlfhMtdCLMFTEeQHlzQiK906aaNCe4NEB5fGJHo9uzGbFMeA==} - engines: {node: '>=6'} - - '@postman/tunnel-agent@0.6.8': - resolution: {integrity: sha512-2U42SmZW5G+suEcS++zB94sBWNO4qD4bvETGFRFDTqSpYl5ksfjcPqzYpgQgXgUmb6dfz+fAGbkcRamounGm0w==} - - '@qiwi/npm-types@1.0.3': - resolution: {integrity: sha512-fHUud+Fo8JiGOPMmnVaOYd/crEnBM+qB8qXrSRz1AkYZAj8BtudFYcsiFweL6DcYXguq7+iXKdzx42dGCEPHiQ==} - '@reflink/reflink-darwin-arm64@0.1.19': resolution: {integrity: sha512-ruy44Lpepdk1FqDz38vExBY/PVUsjxZA+chd9wozjUH9JjuDT/HEaQYA6wYN9mf041l0yLVar6BCZuWABJvHSA==} engines: {node: '>= 10'} @@ -12564,10 +12507,6 @@ packages: cpu: [x64] os: [win32] - '@verdaccio/file-locking@10.3.0': - resolution: {integrity: sha512-FE5D5H4wy/nhgR/d2J5e1Na9kScj2wMjlLPBHz7XF4XZAVSRdm45+kL3ZmrfA6b2HTADP/uH7H05/cnAYW8bhw==} - engines: {node: '>=8'} - '@yarnpkg/core@4.5.0': resolution: {integrity: sha512-jZnEYfP05k3KpBIWlNkPEuJ3E0QLnYTNALQOH+7x8LAQyzhnN9yuLZx8Ze80Y7mlU1Hnv5wUGtzzUFn1wyBAlQ==} engines: {node: '>=18.12.0'} @@ -12690,10 +12629,6 @@ packages: resolution: {integrity: sha512-+Ut8d9LLqwEvHHJl1+PIHqoyDxFgVN847JTVM3Izi3xHDWPE4UtzzXysMZQs64DMcrJfBeS/uoEP4AD3HQHnQQ==} engines: {node: '>=12.0'} - agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - agent-base@7.1.4: resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} @@ -12716,9 +12651,6 @@ packages: resolution: {integrity: sha512-Qx5+iHi3mKWz95XNx/WPFl8yRMZEGNoRZDaOkoej72kxAo20FbDVx7jALcvyOn/N3+h+GboKip49yba7xqLlKA==} engines: {node: '>=22'} - anonymous-npm-registry-client@0.3.2: - resolution: {integrity: sha512-Cw96dHAq3W/xVBNkPwLiTZnIbLgNXbmIxFAh63x8LjeaRVEGjMnZ6X/u7xSuqRqbig5jrYWJp5UTgRoXKUotVQ==} - ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} @@ -12737,10 +12669,6 @@ packages: resolution: {integrity: sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==} engines: {node: '>=18'} - ansi-regex@2.1.1: - resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} - engines: {node: '>=0.10.0'} - ansi-regex@3.0.1: resolution: {integrity: sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==} engines: {node: '>=4'} @@ -12772,20 +12700,9 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} - apache-md5@1.1.8: - resolution: {integrity: sha512-FCAJojipPn0bXjuEpjOOOMN8FZDkxfWWp4JGN9mifU2IhxvKyXZYqpzPHdnTSUpmPDy+tsslB6Z1g+Vg6nVbYA==} - engines: {node: '>=8'} - - aproba@1.2.0: - resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} - archy@1.0.0: resolution: {integrity: sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==} - are-we-there-yet@1.1.7: - resolution: {integrity: sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==} - deprecated: This package is no longer supported. - argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -12824,13 +12741,6 @@ packages: as-table@1.0.55: resolution: {integrity: sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==} - asn1@0.2.6: - resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} - - assert-plus@1.0.0: - resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==} - engines: {node: '>=0.8'} - astral-regex@2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} @@ -12846,12 +12756,6 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - aws-sign2@0.7.0: - resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==} - - aws4@1.13.2: - resolution: {integrity: sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==} - b4a@1.8.1: resolution: {integrity: sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==} peerDependencies: @@ -12941,12 +12845,6 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - bcrypt-pbkdf@1.0.2: - resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} - - bcryptjs@2.4.3: - resolution: {integrity: sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==} - better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -12969,9 +12867,6 @@ packages: bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - bluebird@2.11.0: - resolution: {integrity: sha512-UfFSr22dmHPQqPP9XWHRhq+gWnHCYguQGkXQlbyPtW5qTnhFWA8/iXg765tH0cAjy7l/zPJ1aBTO0g5XgA7kvQ==} - body-parser@2.2.2: resolution: {integrity: sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==} engines: {node: '>=18'} @@ -12987,9 +12882,6 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - brotli@1.3.3: - resolution: {integrity: sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==} - browserslist@4.28.2: resolution: {integrity: sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -13004,9 +12896,6 @@ packages: buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - builtins@1.0.3: - resolution: {integrity: sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==} - builtins@5.1.0: resolution: {integrity: sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==} @@ -13103,9 +12992,6 @@ packages: caniuse-lite@1.0.30001793: resolution: {integrity: sha512-iwSsYWaCOoh26cV8NwNRViHlrfUvYsHDfRVcbtmw0Kg6PJIZZXwMkj1442FYLBGkeUf1juAsU3DTfxW579mrPA==} - caseless@0.12.0: - resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} - chalk-template@1.1.2: resolution: {integrity: sha512-2bxTP2yUH7AJj/VAXfcA+4IcWGdQ87HwBANLt5XxGTeomo8yG0y95N1um9i5StvhT/Bl0/2cARA5v1PpPXUxUA==} engines: {node: '>=14.16'} @@ -13222,10 +13108,6 @@ packages: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - code-point-at@1.1.0: - resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==} - engines: {node: '>=0.10.0'} - collect-v8-coverage@1.0.3: resolution: {integrity: sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==} @@ -13274,10 +13156,6 @@ packages: resolution: {integrity: sha512-4pxiLt2bXHe5BDrolTJs9wfwwT0pPQPQxeUj+X6SKTCkpi8VwvOvgMzohTVVDLXHmAjrZuKEq+tyb0C5zzTSxw==} engines: {node: '>=22.13'} - concat-stream@2.0.0: - resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} - engines: {'0': node >= 6.0} - concurrently@9.2.1: resolution: {integrity: sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==} engines: {node: '>=18'} @@ -13286,9 +13164,6 @@ packages: config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} - console-control-strings@1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} - content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -13324,12 +13199,6 @@ packages: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} - core-util-is@1.0.2: - resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} - - core-util-is@1.0.3: - resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - cosmiconfig-typescript-loader@6.3.0: resolution: {integrity: sha512-Akr82WH1Wfqatyiqpj8HDkO2o2KmJRu1FhKfSNJP3K4IdXwHfEyL7MOb62i1AGQVLtIQM+iCE9CGOtrfhR+mmA==} engines: {node: '>=v18'} @@ -13409,10 +13278,6 @@ packages: resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==} engines: {node: '>=0.10.0'} - dashdash@1.14.1: - resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} - engines: {node: '>=0.10'} - data-uri-to-buffer@2.0.2: resolution: {integrity: sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==} @@ -13519,9 +13384,6 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - delegates@1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} @@ -13592,9 +13454,6 @@ packages: each-limit@1.0.0: resolution: {integrity: sha512-9GMDx+2h6lIE1ZMXyCehATlnH/m29DiYV2090bmd68actuyiTiTkOGvdjU2PpzKzgw37zoYecMmJUv4JcVQHvQ==} - ecc-jsbn@0.1.2: - resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} - ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} @@ -13881,10 +13740,6 @@ packages: extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} - extsprintf@1.3.0: - resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==} - engines: {'0': node >=0.6.0} - fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -14033,9 +13888,6 @@ packages: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} - forever-agent@0.6.1: - resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} - form-data@4.0.5: resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==} engines: {node: '>= 6'} @@ -14109,10 +13961,6 @@ packages: fuse-shared-library@1.1.1: resolution: {integrity: sha512-EfgTo/eS1euZFUe7x8KqyA40hV4DwP7kqp1VNZApu2nlPnJv8SanraBE3VXyX7ff41sxw7M0oWY7re3G3wnZVA==} - gauge@2.7.4: - resolution: {integrity: sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==} - deprecated: This package is no longer supported. - generator-function@2.0.1: resolution: {integrity: sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==} engines: {node: '>= 0.4'} @@ -14179,9 +14027,6 @@ packages: get-tsconfig@4.14.0: resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} - getpass@0.1.7: - resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} - ghooks@2.0.4: resolution: {integrity: sha512-Ey6PSgelTufntLJBUQZsSHHeRg1PjsjM1oOS+0lpExHqXGjrL5uyQVQdOIlf2WR5EBJVdJbJlCdSHAVt+uZmNA==} @@ -14268,15 +14113,6 @@ packages: grapheme-splitter@1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} - har-schema@2.0.0: - resolution: {integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==} - engines: {node: '>=4'} - - har-validator@5.1.5: - resolution: {integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==} - engines: {node: '>=6'} - deprecated: this library is no longer supported - hard-rejection@2.1.0: resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} engines: {node: '>=6'} @@ -14308,9 +14144,6 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} - has-unicode@2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - hasown@2.0.3: resolution: {integrity: sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==} engines: {node: '>= 0.4'} @@ -14348,10 +14181,6 @@ packages: http-cache-semantics@4.2.0: resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==} - http-errors@2.0.0: - resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} - engines: {node: '>= 0.8'} - http-errors@2.0.1: resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} engines: {node: '>= 0.8'} @@ -14373,18 +14202,10 @@ packages: resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} engines: {node: '>=8.0.0'} - http-signature@1.3.6: - resolution: {integrity: sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==} - engines: {node: '>=0.10'} - http2-wrapper@1.0.3: resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} engines: {node: '>=10.19.0'} - https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} - https-proxy-agent@7.0.6: resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} engines: {node: '>= 14'} @@ -14559,10 +14380,6 @@ packages: resolution: {integrity: sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==} engines: {node: '>= 0.4'} - is-fullwidth-code-point@1.0.0: - resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} - engines: {node: '>=0.10.0'} - is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} @@ -14725,9 +14542,6 @@ packages: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} - isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} @@ -14742,9 +14556,6 @@ packages: resolution: {integrity: sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==} engines: {node: '>=20'} - isstream@0.1.2: - resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} - istanbul-lib-coverage@3.2.2: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} @@ -14968,9 +14779,6 @@ packages: resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} hasBin: true - jsbn@0.1.1: - resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} - jsdoc-type-pratt-parser@7.2.0: resolution: {integrity: sha512-dh140MMgjyg3JhJZY/+iEzW+NO5xR2gpbDFKHqotCmexElVntw7GjWjt511+C/Ef02RU5TKYrJo/Xlzk+OLaTw==} engines: {node: '>=20.0.0'} @@ -14996,9 +14804,6 @@ packages: json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - json-schema@0.4.0: - resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} @@ -15020,10 +14825,6 @@ packages: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} engines: {'0': node >= 0.2.0} - jsprim@2.0.2: - resolution: {integrity: sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==} - engines: {'0': node >=0.6.0} - keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} @@ -15089,9 +14890,6 @@ packages: resolution: {integrity: sha512-XT9ewWAC43tiAV7xDAPflMkG0qOPn2QjHqlgX8FOqmWa/rxnyYDulF9T0F7tRy1u+TVTmK/M//6VIOye+2zDXg==} engines: {node: '>=20'} - lockfile@1.0.4: - resolution: {integrity: sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA==} - lodash._baseclone@4.5.7: resolution: {integrity: sha512-nOtLg6tdIdD+TehqBv0WI7jbkLaohHhKSwLmS/UXSFWMWWUxdJc9EVtAfD4L0mV15vV+lZVfF4LEo363VdrMBw==} @@ -15497,15 +15295,6 @@ packages: resolution: {integrity: sha512-DDpmn5oLEdCTclEqweOT4U7bEpuoifBMFUXem9sA4turDAZ5tlbrEoWqCorwXey8CaAw44mst5JOQeVNiwtkhw==} engines: {node: '>= 10.13'} - node-fetch@2.6.8: - resolution: {integrity: sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - node-gyp-build-optional-packages@5.2.2: resolution: {integrity: sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==} hasBin: true @@ -15728,10 +15517,6 @@ packages: resolution: {integrity: sha512-IciCE3SY3uE84Ld8WZU23gAPPV9rIYod4F+rc+vJ7h7cwAJt9Vk6TVsK60ry7Uj3SRS3bqRRIGuTp9YVlk6WNA==} engines: {node: ^20.17.0 || >=22.9.0} - npm-package-arg@8.1.5: - resolution: {integrity: sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q==} - engines: {node: '>=10'} - npm-packlist@10.0.4: resolution: {integrity: sha512-uMW73iajD8hiH4ZBxEV3HC+eTnppIqwakjOYuvgddnalIw2lJguKviK1pcUJDlIWm1wSJkchpDZDSVVsZEYRng==} engines: {node: ^20.17.0 || >=22.9.0} @@ -15761,21 +15546,6 @@ packages: resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==} engines: {node: '>=18'} - npmlog@4.1.2: - resolution: {integrity: sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==} - deprecated: This package is no longer supported. - - number-is-nan@1.0.1: - resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} - engines: {node: '>=0.10.0'} - - oauth-sign@0.9.0: - resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==} - - object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - object-hash@3.0.0: resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} engines: {node: '>= 6'} @@ -16055,9 +15825,6 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - performance-now@2.1.0: - resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} - picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -16099,10 +15866,6 @@ packages: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} - postman-request@2.88.1-postman.40: - resolution: {integrity: sha512-uE4AiIqhjtHKp4pj9ei7fkdfNXEX9IqDBlK1plGAQne6y79UUlrTdtYLhwXoO0AMOvqyl9Ar+BU6Eo6P/MPgfg==} - engines: {node: '>= 16'} - preferred-pm@3.1.4: resolution: {integrity: sha512-lEHd+yEm22jXdCphDrkvIJQU66EuLojPPtvZkpKIkiD+l0DMThF/niqZKJSoU8Vl7iuvtmzyMhir9LdVy5WMnA==} engines: {node: '>=10'} @@ -16170,9 +15933,6 @@ packages: proc-output@1.0.9: resolution: {integrity: sha512-XARWwM2pPNU/U8V4OuQNQLyjFqvHk1FRB5sFd1CCyT2vLLfDlLRLE4f6njcvm4Kyek1VzvF8MQRAYK1uLOlZmw==} - process-nextick-args@2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - promise-retry@2.0.1: resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} engines: {node: '>=10'} @@ -16206,9 +15966,6 @@ packages: resolution: {integrity: sha512-lxMEoIL/BQlk2KunFzxwUPwMvjFH7x7cmvzSLsSHpyMXl9FFfLUlfKrYwFc4wx/ZaIxxuXC4n8rjQ1CX/tkXVQ==} engines: {node: '>=20'} - psl@1.15.0: - resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} - pump@3.0.4: resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==} @@ -16230,9 +15987,6 @@ packages: quansync@0.2.11: resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} - querystringify@2.2.0: - resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -16318,9 +16072,6 @@ packages: resolution: {integrity: sha512-7urDNDyx3oJt9NGkymzT3qudju76BoJhT6ICWclx6274zxMeSUOhyiceHscSBk4Lfbs0IYpjOjUwLkaOzrsJdQ==} engines: {node: '>=22.13'} - readable-stream@2.3.8: - resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} - readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -16497,9 +16248,6 @@ packages: resolution: {integrity: sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==} engines: {node: '>=0.4'} - safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -16557,9 +16305,6 @@ packages: resolution: {integrity: sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==} engines: {node: '>= 0.8.0'} - set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -16732,11 +16477,6 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - sshpk@1.18.0: - resolution: {integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==} - engines: {node: '>=0.10.0'} - hasBin: true - ssri@10.0.5: resolution: {integrity: sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -16764,10 +16504,6 @@ packages: stacktracey@2.2.0: resolution: {integrity: sha512-ETyQEz+CzXiLjEbyJqpbp+/T79RQD/6wqFucRBIlVNZfYq2Ay7wbretD4cxpbymZlaPWx58aIhPEY1Cr8DlVvg==} - statuses@2.0.1: - resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} - engines: {node: '>= 0.8'} - statuses@2.0.2: resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} @@ -16776,9 +16512,6 @@ packages: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} - stream-length@1.0.2: - resolution: {integrity: sha512-aI+qKFiwoDV4rsXiS7WRoCt+v2RX1nUj17+KJC5r2gfh5xoSJIfP6Y3Do/HtvesFcTSWthIuJ3l1cvKQY/+nZg==} - streamx@2.25.0: resolution: {integrity: sha512-0nQuG6jf1w+wddNEEXCF4nTg3LtufWINB5eFEN+5TNZW7KWJp6x87+JFL43vaAUPyCfH1wID+mNVyW6OHtFamg==} @@ -16790,10 +16523,6 @@ packages: resolution: {integrity: sha512-QsRZm5AohSUvYxT7jfbim64OjbOMYNJZIqHtUexV72a+LJrmrarvon8j+rZy3RLvAa2+8UIeGz8uRVHpAQRMMQ==} engines: {node: '>=20'} - string-width@1.0.2: - resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} - engines: {node: '>=0.10.0'} - string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -16818,16 +16547,9 @@ packages: resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} engines: {node: '>= 0.4'} - string_decoder@1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - strip-ansi@3.0.1: - resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} - engines: {node: '>=0.10.0'} - strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -16995,9 +16717,6 @@ packages: resolution: {integrity: sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==} hasBin: true - tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - tree-kill@1.2.2: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true @@ -17049,9 +16768,6 @@ packages: resolution: {integrity: sha512-50QV99kCKH5P/Vs4E2Gzp7BopNV+KzTXqWeaxrfu5IQJBOULRsTIS9seSsOVT8ZnGXzCyx55nYWAi4qJzpZKEQ==} engines: {node: ^20.17.0 || >=22.9.0} - tweetnacl@0.14.5: - resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} - typanion@3.14.0: resolution: {integrity: sha512-ZW/lVMRabETuYCd9O9ZvMhAh8GslSqaUjxmK/JLPCh6l73CvLBiuXswj/+7LdnWOgYsQ130FqLzFz5aGT4I3Ug==} @@ -17137,9 +16853,6 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typedarray@0.0.6: - resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - types-ramda@0.31.0: resolution: {integrity: sha512-vaoC35CRC3xvL8Z6HkshDbi6KWM1ezK0LHN0YyxXWUn9HKzBNg/T3xSGlJZjCYspnOD3jE7bcizsp0bUXZDxnQ==} @@ -17226,17 +16939,10 @@ packages: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} - universalify@0.2.0: - resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} - engines: {node: '>= 4.0.0'} - universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} - unix-crypt-td-js@1.1.4: - resolution: {integrity: sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw==} - unlimited-timeout@0.1.0: resolution: {integrity: sha512-D4g+mxFeQGQHzCfnvij+R35ukJ0658Zzudw7j16p4tBBbNasKkKM4SocYxqhwT5xA7a9JYWDzKkEFyMlRi5sng==} engines: {node: '>=20'} @@ -17264,9 +16970,6 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - url-parse@1.5.10: - resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} - utf8-byte-length@1.0.5: resolution: {integrity: sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==} @@ -17277,11 +16980,6 @@ packages: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} - uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). - hasBin: true - uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). @@ -17297,9 +16995,6 @@ packages: validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - validate-npm-package-name@3.0.0: - resolution: {integrity: sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==} - validate-npm-package-name@4.0.0: resolution: {integrity: sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -17319,18 +17014,6 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - verdaccio-audit@10.2.4: - resolution: {integrity: sha512-/0H6/JFVnhHwucUfMRVjL6gtGnB5gr3dDxq93Ja1Y0ob+2jxAfpqNMHg8c6/d/ZyHFf0y4tXzHESDruXCzTiaQ==} - engines: {node: '>=8'} - - verdaccio-htpasswd@10.5.2: - resolution: {integrity: sha512-bO5Wm8w07pWswNvwFWjNEoznuUU37CcfblcrU0Ci8c038EgTu2V47uwh4AyZ4PTK6ps9oxHqA7a1b+83sY0OkA==} - engines: {node: '>=8'} - - verror@1.10.0: - resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} - engines: {'0': node >=0.6.0} - version-selector-type@3.0.0: resolution: {integrity: sha512-PSvMIZS7C1MuVNBXl/CDG2pZq8EXy/NW2dHIdm3bVP5N0PC8utDK8ttXLXj44Gn3J0lQE3U7Mpm1estAOd+eiA==} engines: {node: '>=10.13'} @@ -17356,12 +17039,6 @@ packages: wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} - webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - - whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - which-boxed-primitive@1.1.1: resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} engines: {node: '>= 0.4'} @@ -17406,9 +17083,6 @@ packages: engines: {node: ^20.17.0 || >=22.9.0} hasBin: true - wide-align@1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - widest-line@3.1.0: resolution: {integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==} engines: {node: '>=8'} @@ -17467,10 +17141,6 @@ packages: resolution: {integrity: sha512-uMQTubF/vcu+Wd0b5BGtDmiXePd/+44hUWQz2nZPbs92/BnxRo74tqs+hqDo12RLiEd+CXFKUwxvvIZvtt34Jw==} engines: {node: '>=18'} - write-yaml-file@4.2.0: - resolution: {integrity: sha512-LwyucHy0uhWqbrOkh9cBluZBeNVxzHjDaE9mwepZG3n3ZlbM4v3ndrFw51zW/NXYFFqP+QWZ72ihtLWTh05e4Q==} - engines: {node: '>=10.13'} - write-yaml-file@5.0.0: resolution: {integrity: sha512-FdNA4RyH1L43TlvGG8qOMIfcEczwA5ij+zLXUy3Z83CjxhLvcV7/Q/8pk22wnCgYw7PJhtK+7lhO+qqyT4NdvQ==} engines: {node: '>=16.14'} @@ -19840,21 +19510,6 @@ snapshots: read-yaml-file: 2.1.0 strip-bom: 4.0.0 - '@pnpm/registry-mock@6.0.0(encoding@0.1.13)': - dependencies: - anonymous-npm-registry-client: 0.3.2 - execa: 5.1.1 - fs-extra: 11.3.5 - read-yaml-file: 2.1.0 - rimraf: 3.0.2 - tempy: 1.0.1 - verdaccio-audit: 10.2.4(encoding@0.1.13) - verdaccio-htpasswd: 10.5.2 - write-yaml-file: 4.2.0 - transitivePeerDependencies: - - encoding - - supports-color - '@pnpm/registry.pkg-metadata-filter@1000.1.6(@pnpm/logger@1001.0.1)': dependencies: '@pnpm/logger': 1001.0.1 @@ -20153,25 +19808,6 @@ snapshots: dependencies: yaml: 2.9.0 - '@postman/form-data@3.1.1': - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - - '@postman/tough-cookie@4.1.3-postman.1': - dependencies: - psl: 1.15.0 - punycode: 2.3.1 - universalify: 0.2.0 - url-parse: 1.5.10 - - '@postman/tunnel-agent@0.6.8': - dependencies: - safe-buffer: 5.2.1 - - '@qiwi/npm-types@1.0.3': {} - '@reflink/reflink-darwin-arm64@0.1.19': optional: true @@ -20714,10 +20350,6 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.12.2': optional: true - '@verdaccio/file-locking@10.3.0': - dependencies: - lockfile: 1.0.4 - '@yarnpkg/core@4.5.0(typanion@3.14.0)': dependencies: '@arcanis/slice-ansi': 1.1.1 @@ -20912,12 +20544,6 @@ snapshots: adm-zip@0.5.17: {} - agent-base@6.0.2: - dependencies: - debug: 4.4.3 - transitivePeerDependencies: - - supports-color - agent-base@7.1.4: {} agentkeepalive@4.6.0: @@ -20945,23 +20571,6 @@ snapshots: amaro@1.1.9: {} - anonymous-npm-registry-client@0.3.2: - dependencies: - '@qiwi/npm-types': 1.0.3 - concat-stream: 2.0.0 - graceful-fs: 4.2.11(patch_hash=68ebc232025360cb3dcd3081f4067f4e9fc022ab6b6f71a3230e86c7a5b337d1) - normalize-package-data: 3.0.3 - npm-package-arg: 8.1.5 - once: 1.4.0 - request: postman-request@2.88.1-postman.40 - retry: 0.13.1 - safe-buffer: 5.2.1 - semver: 7.8.1 - slide: 1.1.6 - ssri: 8.0.1 - optionalDependencies: - npmlog: 4.1.2 - ansi-align@3.0.1: dependencies: string-width: 4.2.3 @@ -20981,9 +20590,6 @@ snapshots: dependencies: environment: 1.1.0 - ansi-regex@2.1.1: - optional: true - ansi-regex@3.0.1: {} ansi-regex@5.0.1: {} @@ -21007,19 +20613,8 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.2 - apache-md5@1.1.8: {} - - aproba@1.2.0: - optional: true - archy@1.0.0: {} - are-we-there-yet@1.1.7: - dependencies: - delegates: 1.0.0 - readable-stream: 2.3.8 - optional: true - argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -21057,12 +20652,6 @@ snapshots: dependencies: printable-characters: 1.0.42 - asn1@0.2.6: - dependencies: - safer-buffer: 2.1.2 - - assert-plus@1.0.0: {} - astral-regex@2.0.0: {} async-function@1.0.0: {} @@ -21073,10 +20662,6 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 - aws-sign2@0.7.0: {} - - aws4@1.13.2: {} - b4a@1.8.1: {} babel-jest@30.4.1(@babel/core@7.29.7)(@babel/types@7.29.7): @@ -21173,12 +20758,6 @@ snapshots: baseline-browser-mapping@2.10.32: {} - bcrypt-pbkdf@1.0.2: - dependencies: - tweetnacl: 0.14.5 - - bcryptjs@2.4.3: {} - better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -21210,8 +20789,6 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - bluebird@2.11.0: {} - body-parser@2.2.2: dependencies: bytes: 3.1.2 @@ -21239,10 +20816,6 @@ snapshots: dependencies: fill-range: 7.1.1 - brotli@1.3.3: - dependencies: - base64-js: 1.5.1 - browserslist@4.28.2: dependencies: baseline-browser-mapping: 2.10.32 @@ -21262,8 +20835,6 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - builtins@1.0.3: {} - builtins@5.1.0: dependencies: semver: 7.8.1 @@ -21385,8 +20956,6 @@ snapshots: caniuse-lite@1.0.30001793: {} - caseless@0.12.0: {} - chalk-template@1.1.2: dependencies: chalk: 5.6.2 @@ -21481,9 +21050,6 @@ snapshots: co@4.6.0: {} - code-point-at@1.1.0: - optional: true - collect-v8-coverage@1.0.3: {} color-convert@2.0.1: @@ -21522,13 +21088,6 @@ snapshots: comver-to-semver@2.0.0: {} - concat-stream@2.0.0: - dependencies: - buffer-from: 1.1.2 - inherits: 2.0.4 - readable-stream: 3.6.2 - typedarray: 0.0.6 - concurrently@9.2.1: dependencies: chalk: 4.1.2 @@ -21543,9 +21102,6 @@ snapshots: ini: 1.3.8 proto-list: 1.2.4 - console-control-strings@1.1.0: - optional: true - content-disposition@0.5.4: dependencies: safe-buffer: 5.2.1 @@ -21573,11 +21129,6 @@ snapshots: cookie@0.7.2: {} - core-util-is@1.0.2: {} - - core-util-is@1.0.3: - optional: true - cosmiconfig-typescript-loader@6.3.0(@types/node@22.19.19)(cosmiconfig@9.0.1(typescript@5.9.3))(typescript@5.9.3): dependencies: '@types/node': 22.19.19 @@ -21706,10 +21257,6 @@ snapshots: dependencies: array-find-index: 1.0.2 - dashdash@1.14.1: - dependencies: - assert-plus: 1.0.0 - data-uri-to-buffer@2.0.2: {} data-uri-to-buffer@3.0.1: {} @@ -21811,9 +21358,6 @@ snapshots: delayed-stream@1.0.0: {} - delegates@1.0.0: - optional: true - depd@2.0.0: {} dequal@2.0.3: {} @@ -21872,11 +21416,6 @@ snapshots: each-limit@1.0.0: {} - ecc-jsbn@0.1.2: - dependencies: - jsbn: 0.1.1 - safer-buffer: 2.1.2 - ee-first@1.1.1: {} electron-to-chromium@1.5.361: {} @@ -22315,8 +21854,6 @@ snapshots: extendable-error@0.1.7: {} - extsprintf@1.3.0: {} - fast-deep-equal@3.1.3: {} fast-equals@6.0.0: {} @@ -22461,8 +21998,6 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - forever-agent@0.6.1: {} - form-data@4.0.5: dependencies: asynckit: 0.4.0 @@ -22557,18 +22092,6 @@ snapshots: fuse-shared-library-linux-arm: 1.0.0 optional: true - gauge@2.7.4: - dependencies: - aproba: 1.2.0 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 - string-width: 1.0.2 - strip-ansi: 3.0.1 - wide-align: 1.1.5 - optional: true - generator-function@2.0.1: {} gensequence@8.0.8: {} @@ -22633,10 +22156,6 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 - getpass@0.1.7: - dependencies: - assert-plus: 1.0.0 - ghooks@2.0.4: dependencies: findup: 0.1.5 @@ -22756,13 +22275,6 @@ snapshots: grapheme-splitter@1.0.4: {} - har-schema@2.0.0: {} - - har-validator@5.1.5: - dependencies: - ajv: 6.15.0 - har-schema: 2.0.0 - hard-rejection@2.1.0: {} has-bigints@1.1.0: {} @@ -22785,9 +22297,6 @@ snapshots: dependencies: has-symbols: 1.1.0 - has-unicode@2.0.1: - optional: true - hasown@2.0.3: dependencies: function-bind: 1.1.2 @@ -22820,14 +22329,6 @@ snapshots: http-cache-semantics@4.2.0: {} - http-errors@2.0.0: - dependencies: - depd: 2.0.0 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: 2.0.1 - toidentifier: 1.0.1 - http-errors@2.0.1: dependencies: depd: 2.0.0 @@ -22861,24 +22362,11 @@ snapshots: transitivePeerDependencies: - debug - http-signature@1.3.6: - dependencies: - assert-plus: 1.0.0 - jsprim: 2.0.2 - sshpk: 1.18.0 - http2-wrapper@1.0.3: dependencies: quick-lru: 5.1.1 resolve-alpn: 1.2.1 - https-proxy-agent@5.0.1: - dependencies: - agent-base: 6.0.2 - debug: 4.4.3 - transitivePeerDependencies: - - supports-color - https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.4 @@ -23050,11 +22538,6 @@ snapshots: dependencies: call-bound: 1.0.4 - is-fullwidth-code-point@1.0.0: - dependencies: - number-is-nan: 1.0.1 - optional: true - is-fullwidth-code-point@3.0.0: {} is-fullwidth-code-point@5.1.0: @@ -23180,9 +22663,6 @@ snapshots: dependencies: is-docker: 2.2.1 - isarray@1.0.0: - optional: true - isarray@2.0.5: {} isexe@2.0.0: {} @@ -23191,8 +22671,6 @@ snapshots: isexe@4.0.0: {} - isstream@0.1.2: {} - istanbul-lib-coverage@3.2.2: {} istanbul-lib-instrument@6.0.3(@babel/types@7.29.7): @@ -23703,8 +23181,6 @@ snapshots: argparse: 1.0.10 esprima: 4.0.1 - jsbn@0.1.1: {} - jsdoc-type-pratt-parser@7.2.0: {} jsesc@3.1.0: {} @@ -23719,8 +23195,6 @@ snapshots: json-schema-traverse@1.0.0: {} - json-schema@0.4.0: {} - json-stable-stringify-without-jsonify@1.0.1: {} json-stringify-safe@5.0.1: {} @@ -23739,13 +23213,6 @@ snapshots: jsonparse@1.3.1: {} - jsprim@2.0.2: - dependencies: - assert-plus: 1.0.0 - extsprintf: 1.3.0 - json-schema: 0.4.0 - verror: 1.10.0 - keyv@4.5.4: dependencies: json-buffer: 3.0.1 @@ -23825,10 +23292,6 @@ snapshots: dependencies: p-locate: 6.0.0 - lockfile@1.0.4: - dependencies: - signal-exit: 3.0.7 - lodash._baseclone@4.5.7: {} lodash.assign@4.2.0: {} @@ -24334,12 +23797,6 @@ snapshots: transitivePeerDependencies: - supports-color - node-fetch@2.6.8(encoding@0.1.13): - dependencies: - whatwg-url: 5.0.0 - optionalDependencies: - encoding: 0.1.13 - node-gyp-build-optional-packages@5.2.2: dependencies: detect-libc: 2.1.2 @@ -24462,12 +23919,6 @@ snapshots: semver: 7.8.1 validate-npm-package-name: 7.0.2 - npm-package-arg@8.1.5: - dependencies: - hosted-git-info: 4.1.0 - semver: 7.8.1 - validate-npm-package-name: 3.0.0 - npm-packlist@10.0.4: dependencies: ignore-walk: 8.0.0 @@ -24513,22 +23964,6 @@ snapshots: path-key: 4.0.0 unicorn-magic: 0.3.0 - npmlog@4.1.2: - dependencies: - are-we-there-yet: 1.1.7 - console-control-strings: 1.1.0 - gauge: 2.7.4 - set-blocking: 2.0.0 - optional: true - - number-is-nan@1.0.1: - optional: true - - oauth-sign@0.9.0: {} - - object-assign@4.1.1: - optional: true - object-hash@3.0.0: {} object-inspect@1.13.4: {} @@ -24783,8 +24218,6 @@ snapshots: path-type@4.0.0: {} - performance-now@2.1.0: {} - picocolors@1.1.1: {} picomatch@2.3.2: {} @@ -24809,31 +24242,6 @@ snapshots: possible-typed-array-names@1.1.0: {} - postman-request@2.88.1-postman.40: - dependencies: - '@postman/form-data': 3.1.1 - '@postman/tough-cookie': 4.1.3-postman.1 - '@postman/tunnel-agent': 0.6.8 - aws-sign2: 0.7.0 - aws4: 1.13.2 - brotli: 1.3.3 - caseless: 0.12.0 - combined-stream: 1.0.8 - extend: 3.0.2 - forever-agent: 0.6.1 - har-validator: 5.1.5 - http-signature: 1.3.6 - is-typedarray: 1.0.0 - isstream: 0.1.2 - json-stringify-safe: 5.0.1 - mime-types: 2.1.35 - oauth-sign: 0.9.0 - performance-now: 2.1.0 - qs: 6.15.2 - safe-buffer: 5.2.1 - stream-length: 1.0.2 - uuid: 8.3.2 - preferred-pm@3.1.4: dependencies: find-up: 5.0.0 @@ -24898,9 +24306,6 @@ snapshots: proc-output@1.0.9: {} - process-nextick-args@2.0.1: - optional: true - promise-retry@2.0.1: dependencies: err-code: 2.0.3 @@ -24939,10 +24344,6 @@ snapshots: ps-list@9.0.0: {} - psl@1.15.0: - dependencies: - punycode: 2.3.1 - pump@3.0.4: dependencies: end-of-stream: 1.4.5 @@ -24960,8 +24361,6 @@ snapshots: quansync@0.2.11: {} - querystringify@2.2.0: {} - queue-microtask@1.2.3: {} quick-lru@4.0.1: {} @@ -25052,17 +24451,6 @@ snapshots: js-yaml: '@zkochan/js-yaml@0.0.11' strip-bom: 5.0.0 - readable-stream@2.3.8: - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - optional: true - readable-stream@3.6.2: dependencies: inherits: 2.0.4 @@ -25246,9 +24634,6 @@ snapshots: has-symbols: 1.1.0 isarray: 2.0.5 - safe-buffer@5.1.2: - optional: true - safe-buffer@5.2.1: {} safe-execa@0.1.2: @@ -25332,9 +24717,6 @@ snapshots: transitivePeerDependencies: - supports-color - set-blocking@2.0.0: - optional: true - set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -25532,18 +24914,6 @@ snapshots: sprintf-js@1.0.3: {} - sshpk@1.18.0: - dependencies: - asn1: 0.2.6 - assert-plus: 1.0.0 - bcrypt-pbkdf: 1.0.2 - dashdash: 1.14.1 - ecc-jsbn: 0.1.2 - getpass: 0.1.7 - jsbn: 0.1.1 - safer-buffer: 2.1.2 - tweetnacl: 0.14.5 - ssri@10.0.5: dependencies: minipass: 7.1.3 @@ -25571,8 +24941,6 @@ snapshots: as-table: 1.0.55 get-source: 2.0.12 - statuses@2.0.1: {} - statuses@2.0.2: {} stop-iteration-iterator@1.1.0: @@ -25580,10 +24948,6 @@ snapshots: es-errors: 1.3.0 internal-slot: 1.1.0 - stream-length@1.0.2: - dependencies: - bluebird: 2.11.0 - streamx@2.25.0: dependencies: events-universal: 1.0.1 @@ -25600,13 +24964,6 @@ snapshots: string-length@7.0.1: {} - string-width@1.0.2: - dependencies: - code-point-at: 1.1.0 - is-fullwidth-code-point: 1.0.0 - strip-ansi: 3.0.1 - optional: true - string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -25657,20 +25014,10 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.1.2 - string_decoder@1.1.1: - dependencies: - safe-buffer: 5.1.2 - optional: true - string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 - strip-ansi@3.0.1: - dependencies: - ansi-regex: 2.1.1 - optional: true - strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -25837,8 +25184,6 @@ snapshots: touch@3.1.1: {} - tr46@0.0.3: {} - tree-kill@1.2.2: {} treeify@1.1.0: {} @@ -25885,8 +25230,6 @@ snapshots: transitivePeerDependencies: - supports-color - tweetnacl@0.14.5: {} - typanion@3.14.0: {} type-check@0.4.0: @@ -25969,8 +25312,6 @@ snapshots: dependencies: is-typedarray: 1.0.0 - typedarray@0.0.6: {} - types-ramda@0.31.0: dependencies: ts-toolbelt: 9.6.0 @@ -26060,12 +25401,8 @@ snapshots: universalify@0.1.2: {} - universalify@0.2.0: {} - universalify@2.0.1: {} - unix-crypt-td-js@1.1.4: {} - unlimited-timeout@0.1.0: {} unpipe@1.0.0: {} @@ -26119,19 +25456,12 @@ snapshots: dependencies: punycode: 2.3.1 - url-parse@1.5.10: - dependencies: - querystringify: 2.2.0 - requires-port: 1.0.0 - utf8-byte-length@1.0.5: {} util-deprecate@1.0.2: {} utils-merge@1.0.1: {} - uuid@8.3.2: {} - uuid@9.0.1: {} v8-compile-cache@2.4.0: {} @@ -26147,10 +25477,6 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - validate-npm-package-name@3.0.0: - dependencies: - builtins: 1.0.3 - validate-npm-package-name@4.0.0: dependencies: builtins: 5.1.0 @@ -26165,30 +25491,6 @@ snapshots: vary@1.1.2: {} - verdaccio-audit@10.2.4(encoding@0.1.13): - dependencies: - body-parser: 2.2.2 - express: 4.22.2 - https-proxy-agent: 5.0.1 - node-fetch: 2.6.8(encoding@0.1.13) - transitivePeerDependencies: - - encoding - - supports-color - - verdaccio-htpasswd@10.5.2: - dependencies: - '@verdaccio/file-locking': 10.3.0 - apache-md5: 1.1.8 - bcryptjs: 2.4.3 - http-errors: 2.0.0 - unix-crypt-td-js: 1.1.4 - - verror@1.10.0: - dependencies: - assert-plus: 1.0.0 - core-util-is: 1.0.2 - extsprintf: 1.3.0 - version-selector-type@3.0.0: dependencies: semver: 7.8.1 @@ -26223,13 +25525,6 @@ snapshots: dependencies: defaults: 1.0.4 - webidl-conversions@3.0.1: {} - - whatwg-url@5.0.0: - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - which-boxed-primitive@1.1.1: dependencies: is-bigint: 1.1.0 @@ -26296,11 +25591,6 @@ snapshots: dependencies: isexe: 4.0.0 - wide-align@1.1.5: - dependencies: - string-width: 1.0.2 - optional: true - widest-line@3.1.0: dependencies: string-width: 4.2.3 @@ -26382,11 +25672,6 @@ snapshots: type-fest: 4.41.0 write-json-file: 6.0.0 - write-yaml-file@4.2.0: - dependencies: - js-yaml: '@zkochan/js-yaml@0.0.11' - write-file-atomic: 3.0.3 - write-yaml-file@5.0.0: dependencies: js-yaml: '@zkochan/js-yaml@0.0.11' diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 69ac09f0da..931692b6b8 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -96,7 +96,6 @@ catalog: '@pnpm/os.env.path-extender': ^3.0.1 '@pnpm/patch-package': 0.0.1 '@pnpm/pnpr': 0.0.0-26052601 - '@pnpm/registry-mock': 6.0.0 '@pnpm/semver-diff': ^2.0.0 '@pnpm/tabtab': ^0.5.4 '@pnpm/tgz-fixtures': 0.0.0 @@ -450,14 +449,6 @@ packageExtensions: '@babel/parser': peerDependencies: '@babel/types': '*' - # pnpm's test harness launches `pnpm-registry` (the in-tree Rust - # crate) instead of verdaccio, so `@pnpm/registry-mock`'s verdaccio - # peer is dead weight here. Mark it optional to keep pnpm from - # auto-installing verdaccio + its tree across the workspace. - '@pnpm/registry-mock': - peerDependenciesMeta: - verdaccio: - optional: true jest-circus: dependencies: slash: '3' diff --git a/pnpm/package.json b/pnpm/package.json index 3b64dd7a04..4e1832cdaa 100644 --- a/pnpm/package.json +++ b/pnpm/package.json @@ -117,7 +117,6 @@ "@pnpm/pkg-manifest.reader": "workspace:*", "@pnpm/prepare": "workspace:*", "@pnpm/registry-access.commands": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/releasing.commands": "workspace:*", "@pnpm/shell.path": "workspace:*", "@pnpm/store.cafs": "workspace:*", diff --git a/pnpm/test/configurationalDependencies.test.ts b/pnpm/test/configurationalDependencies.test.ts index 529288190f..09b172c32c 100644 --- a/pnpm/test/configurationalDependencies.test.ts +++ b/pnpm/test/configurationalDependencies.test.ts @@ -4,8 +4,8 @@ import path from 'node:path' import { describe, expect, test } from '@jest/globals' import { readEnvLockfile } from '@pnpm/lockfile.fs' import { prepare } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { getIntegrity } from '@pnpm/testing.registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { readYamlFileSync } from 'read-yaml-file' import { writeJsonFileSync } from 'write-json-file' import { writeYamlFileSync } from 'write-yaml-file' diff --git a/pnpm/test/dlx.ts b/pnpm/test/dlx.ts index b06acbf83b..50d838aff3 100644 --- a/pnpm/test/dlx.ts +++ b/pnpm/test/dlx.ts @@ -6,8 +6,7 @@ import { getConfig } from '@pnpm/config.reader' import { dlx } from '@pnpm/exec.commands' import { readModulesManifest } from '@pnpm/installing.modules-yaml' import { prepare, prepareEmpty } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' -import { addUser } from '@pnpm/testing.registry-mock' +import { addUser, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { BaseManifest } from '@pnpm/types' import PATH_NAME from 'path-name' import { writeYamlFileSync } from 'write-yaml-file' diff --git a/pnpm/test/hooks.ts b/pnpm/test/hooks.ts index 1f48bf1839..a29c4d3029 100644 --- a/pnpm/test/hooks.ts +++ b/pnpm/test/hooks.ts @@ -4,7 +4,7 @@ import path from 'node:path' import { expect, test } from '@jest/globals' import { createHash } from '@pnpm/crypto.hash' import { prepare, preparePackages } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' +import { getIntegrity } from '@pnpm/testing.registry-mock' import type { PackageManifest } from '@pnpm/types' import { loadJsonFileSync } from 'load-json-file' import { writeYamlFileSync } from 'write-yaml-file' diff --git a/pnpm/test/install/configDeps.ts b/pnpm/test/install/configDeps.ts index 5c8aad15fe..c9c9a5e39f 100644 --- a/pnpm/test/install/configDeps.ts +++ b/pnpm/test/install/configDeps.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals' import { readEnvLockfile } from '@pnpm/lockfile.fs' import { prepare } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' +import { getIntegrity } from '@pnpm/testing.registry-mock' import { writeYamlFileSync } from 'write-yaml-file' import { execPnpm, execPnpmSync } from '../utils/index.js' diff --git a/pnpm/test/install/hooks.ts b/pnpm/test/install/hooks.ts index 9a4a09b37f..13c4ee2019 100644 --- a/pnpm/test/install/hooks.ts +++ b/pnpm/test/install/hooks.ts @@ -4,7 +4,7 @@ import path from 'node:path' import { expect, test } from '@jest/globals' import type { LockfileFile } from '@pnpm/lockfile.types' import { prepare, preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { loadJsonFileSync } from 'load-json-file' import { readYamlFileSync } from 'read-yaml-file' import { writeYamlFileSync } from 'write-yaml-file' diff --git a/pnpm/test/install/misc.ts b/pnpm/test/install/misc.ts index 2b62667d89..cd90291095 100644 --- a/pnpm/test/install/misc.ts +++ b/pnpm/test/install/misc.ts @@ -6,10 +6,10 @@ import { STORE_VERSION, WANTED_LOCKFILE } from '@pnpm/constants' import type { LockfileObject } from '@pnpm/lockfile.types' import { readPackageJsonFromDir } from '@pnpm/pkg-manifest.reader' import { prepare, prepareEmpty, preparePackages } from '@pnpm/prepare' -import { getIntegrity } from '@pnpm/registry-mock' import type { PackageFilesIndex } from '@pnpm/store.cafs' import { StoreIndex, storeIndexKey } from '@pnpm/store.index' import { fixtures } from '@pnpm/test-fixtures' +import { getIntegrity } from '@pnpm/testing.registry-mock' import { lexCompare } from '@pnpm/util.lex-comparator' import { readProjectManifest } from '@pnpm/workspace.project-manifest-reader' import { writeProjectManifest } from '@pnpm/workspace.project-manifest-writer' diff --git a/pnpm/test/install/pnpmRegistry.ts b/pnpm/test/install/pnpmRegistry.ts index a69ea245d3..47df680b2f 100644 --- a/pnpm/test/install/pnpmRegistry.ts +++ b/pnpm/test/install/pnpmRegistry.ts @@ -6,7 +6,7 @@ import path from 'node:path' import { afterAll, beforeAll, expect, test } from '@jest/globals' import { WANTED_LOCKFILE } from '@pnpm/constants' import { prepare, preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { loadJsonFileSync } from 'load-json-file' import { createRegistryServer } from 'pnpm-agent' import { writeYamlFileSync } from 'write-yaml-file' diff --git a/pnpm/test/install/sideEffects.ts b/pnpm/test/install/sideEffects.ts index 8a6278e869..0ce485a64c 100644 --- a/pnpm/test/install/sideEffects.ts +++ b/pnpm/test/install/sideEffects.ts @@ -3,7 +3,7 @@ import path from 'node:path' import { expect, test } from '@jest/globals' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { execPnpm } from '../utils/index.js' diff --git a/pnpm/test/utils/execPnpm.ts b/pnpm/test/utils/execPnpm.ts index 2c07ebeecd..8c867310c1 100644 --- a/pnpm/test/utils/execPnpm.ts +++ b/pnpm/test/utils/execPnpm.ts @@ -2,7 +2,7 @@ import type { ChildProcess as NodeChildProcess, StdioOptions } from 'node:child_ import path from 'node:path' import type { Config } from '@pnpm/config.reader' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import crossSpawn from 'cross-spawn' import isWindows from 'is-windows' import { readYamlFileSync } from 'read-yaml-file' diff --git a/pnpm/test/utils/testDefaults.ts b/pnpm/test/utils/testDefaults.ts index 6c49c54254..cfb30d7a6d 100644 --- a/pnpm/test/utils/testDefaults.ts +++ b/pnpm/test/utils/testDefaults.ts @@ -1,6 +1,6 @@ import path from 'node:path' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' export default function testDefaults (opts?: any): any & { storeDir: string } { // eslint-disable-line return { diff --git a/registry-access/commands/package.json b/registry-access/commands/package.json index b544109290..af981c1e88 100644 --- a/registry-access/commands/package.json +++ b/registry-access/commands/package.json @@ -57,10 +57,10 @@ "@pnpm/logger": "workspace:*", "@pnpm/prepare": "workspace:*", "@pnpm/registry-access.commands": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/releasing.commands": "workspace:*", "@pnpm/testing.command-defaults": "workspace:*", "@pnpm/testing.mock-agent": "workspace:*", + "@pnpm/testing.registry-mock": "workspace:*", "@types/ramda": "catalog:", "@types/semver": "catalog:", "execa": "catalog:" diff --git a/registry-access/commands/test/deprecate.ts b/registry-access/commands/test/deprecate.ts index fd1257d2d3..ae2d4735b7 100644 --- a/registry-access/commands/test/deprecate.ts +++ b/registry-access/commands/test/deprecate.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals' import { prepare } from '@pnpm/prepare' import { deprecate, undeprecate } from '@pnpm/registry-access.commands' -import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { publish } from '@pnpm/releasing.commands' import { DEFAULT_OPTS as BASE_OPTS } from '@pnpm/testing.command-defaults' +import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { safeExeca as execa } from 'execa' const DEFAULT_OPTS = { diff --git a/registry-access/commands/test/dist-tag.ts b/registry-access/commands/test/dist-tag.ts index 09b60f3a7a..5fee46410f 100644 --- a/registry-access/commands/test/dist-tag.ts +++ b/registry-access/commands/test/dist-tag.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals' import { prepare } from '@pnpm/prepare' import { distTag } from '@pnpm/registry-access.commands' -import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { publish } from '@pnpm/releasing.commands' import { DEFAULT_OPTS as BASE_OPTS } from '@pnpm/testing.command-defaults' +import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' const DEFAULT_OPTS = { ...BASE_OPTS, diff --git a/registry-access/commands/test/search.ts b/registry-access/commands/test/search.ts index c46a00b946..9351f37d75 100644 --- a/registry-access/commands/test/search.ts +++ b/registry-access/commands/test/search.ts @@ -1,7 +1,7 @@ import { expect, test } from '@jest/globals' import { search } from '@pnpm/registry-access.commands' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { DEFAULT_OPTS } from '@pnpm/testing.command-defaults' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' const REGISTRY_URL = `http://localhost:${REGISTRY_MOCK_PORT}` diff --git a/registry-access/commands/test/unpublish.ts b/registry-access/commands/test/unpublish.ts index 821c47860f..a8ea224b16 100644 --- a/registry-access/commands/test/unpublish.ts +++ b/registry-access/commands/test/unpublish.ts @@ -1,9 +1,9 @@ import { expect, test } from '@jest/globals' import { prepare } from '@pnpm/prepare' import { unpublish } from '@pnpm/registry-access.commands' -import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { publish } from '@pnpm/releasing.commands' import { DEFAULT_OPTS as BASE_OPTS } from '@pnpm/testing.command-defaults' +import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { safeExeca as execa } from 'execa' const DEFAULT_OPTS = { diff --git a/registry-access/commands/tsconfig.json b/registry-access/commands/tsconfig.json index a2d3837007..18d23d640b 100644 --- a/registry-access/commands/tsconfig.json +++ b/registry-access/commands/tsconfig.json @@ -51,6 +51,9 @@ { "path": "../../testing/mock-agent" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../client" } diff --git a/registry/.fixtures/packages/@foo/has-dep-from-same-scope/1.0.0/package.json b/registry/.fixtures/packages/@foo/has-dep-from-same-scope/1.0.0/package.json new file mode 100644 index 0000000000..c4e5170025 --- /dev/null +++ b/registry/.fixtures/packages/@foo/has-dep-from-same-scope/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@foo/has-dep-from-same-scope", + "version": "1.0.0", + "dependencies": { + "@foo/no-deps": "^1.0.0", + "is-negative": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@foo/no-deps/1.0.0/package.json b/registry/.fixtures/packages/@foo/no-deps/1.0.0/package.json new file mode 100644 index 0000000000..a46fb905fd --- /dev/null +++ b/registry/.fixtures/packages/@foo/no-deps/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@foo/no-deps", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@foo/touch-file-one-bin/1.0.0/cli.js b/registry/.fixtures/packages/@foo/touch-file-one-bin/1.0.0/cli.js new file mode 100644 index 0000000000..780d9195ef --- /dev/null +++ b/registry/.fixtures/packages/@foo/touch-file-one-bin/1.0.0/cli.js @@ -0,0 +1,5 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync('touch.txt', 'hello world', 'utf8') + diff --git a/registry/.fixtures/packages/@foo/touch-file-one-bin/1.0.0/package.json b/registry/.fixtures/packages/@foo/touch-file-one-bin/1.0.0/package.json new file mode 100644 index 0000000000..114180820f --- /dev/null +++ b/registry/.fixtures/packages/@foo/touch-file-one-bin/1.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@foo/touch-file-one-bin", + "version": "1.0.0", + "bin": "cli.js" +} diff --git a/registry/.fixtures/packages/@having/scoped-peer/1.0.0/package.json b/registry/.fixtures/packages/@having/scoped-peer/1.0.0/package.json new file mode 100644 index 0000000000..f9d14bca0e --- /dev/null +++ b/registry/.fixtures/packages/@having/scoped-peer/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@having/scoped-peer", + "version": "1.0.0", + "peerDependencies": { + "@scoped/peer": "^1.0.0" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/1.0.0/package.json b/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/1.0.0/package.json new file mode 100644 index 0000000000..966f17a6f1 --- /dev/null +++ b/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/1.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@jsr/pnpm-e2e__bar", + "description": "jsr:@pnpm-e2e/bar", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/1.0.1/package.json b/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/1.0.1/package.json new file mode 100644 index 0000000000..6d059db146 --- /dev/null +++ b/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/1.0.1/package.json @@ -0,0 +1,5 @@ +{ + "name": "@jsr/pnpm-e2e__bar", + "description": "jsr:@pnpm-e2e/bar", + "version": "1.0.1" +} diff --git a/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/1.1.0/package.json b/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/1.1.0/package.json new file mode 100644 index 0000000000..f7bc1d3916 --- /dev/null +++ b/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/1.1.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@jsr/pnpm-e2e__bar", + "description": "jsr:@pnpm-e2e/bar", + "version": "1.1.0" +} diff --git a/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/2.0.0/package.json b/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/2.0.0/package.json new file mode 100644 index 0000000000..780ad8f49f --- /dev/null +++ b/registry/.fixtures/packages/@jsr/pnpm-e2e__bar/2.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@jsr/pnpm-e2e__bar", + "description": "jsr:@pnpm-e2e/bar", + "version": "2.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-with-c/0.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-with-c/0.0.0/package.json new file mode 100644 index 0000000000..91fca1cbfd --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-with-c/0.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/abc-grand-parent-with-c", + "version": "0.0.0", + "dependencies": { + "@pnpm.e2e/abc-parent-with-ab": "^1.0.0", + "@pnpm.e2e/peer-c": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-with-c/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-with-c/1.0.0/package.json new file mode 100644 index 0000000000..4419de1c03 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-with-c/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/abc-grand-parent-with-c", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/abc-parent-with-ab": "^1.0.0", + "@pnpm.e2e/peer-c": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-with-c/1.0.1/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-with-c/1.0.1/package.json new file mode 100644 index 0000000000..eb3b292476 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-with-c/1.0.1/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/abc-grand-parent-with-c", + "version": "1.0.1", + "dependencies": { + "@pnpm.e2e/abc-parent-with-ab": "^1.0.0", + "@pnpm.e2e/peer-c": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-without-c/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-without-c/1.0.0/package.json new file mode 100644 index 0000000000..242fd7899f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent-without-c/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/abc-grand-parent-without-c", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/abc-parent-with-ab": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent/1.0.0/package.json new file mode 100644 index 0000000000..c832fc580a --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-grand-parent/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/abc-grand-parent", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/abc-parent-with-ab": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-optional-peers-meta-only/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-optional-peers-meta-only/1.0.0/package.json new file mode 100644 index 0000000000..abb85d43cd --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-optional-peers-meta-only/1.0.0/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pnpm.e2e/abc-optional-peers-meta-only", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/peer-a": "^1.0.0" + }, + "peerDependenciesMeta": { + "@pnpm.e2e/peer-b": { + "optional": true + }, + "@pnpm.e2e/peer-c": { + "optional": true + } + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-optional-peers-parent/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-optional-peers-parent/1.0.0/package.json new file mode 100644 index 0000000000..84c7dd8947 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-optional-peers-parent/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/abc-optional-peers-parent", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/abc-optional-peers": "1.0.0", + "@pnpm.e2e/peer-a": "^1.0.0", + "@pnpm.e2e/peer-b": "^1.0.0", + "@pnpm.e2e/peer-c": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-optional-peers/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-optional-peers/1.0.0/package.json new file mode 100644 index 0000000000..0569859d24 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-optional-peers/1.0.0/package.json @@ -0,0 +1,17 @@ +{ + "name": "@pnpm.e2e/abc-optional-peers", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/peer-a": "^1.0.0", + "@pnpm.e2e/peer-b": "^1.0.0", + "@pnpm.e2e/peer-c": "^1.0.0" + }, + "peerDependenciesMeta": { + "@pnpm.e2e/peer-b": { + "optional": true + }, + "@pnpm.e2e/peer-c": { + "optional": true + } + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-ab/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-ab/1.0.0/package.json new file mode 100644 index 0000000000..31f2bddc1d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-ab/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/abc-parent-with-ab", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/abc": "^1.0.0", + "is-positive": "1.0.0", + "@pnpm.e2e/peer-a": "^1.0.0", + "@pnpm.e2e/peer-b": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-ab/1.0.1/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-ab/1.0.1/package.json new file mode 100644 index 0000000000..45c63722cf --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-ab/1.0.1/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/abc-parent-with-ab", + "version": "1.0.1", + "dependencies": { + "@pnpm.e2e/abc": "^1.0.0", + "is-positive": "1.0.0", + "@pnpm.e2e/peer-a": "^1.0.0", + "@pnpm.e2e/peer-b": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-ab/1.1.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-ab/1.1.0/package.json new file mode 100644 index 0000000000..6e03aa2ca9 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-ab/1.1.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/abc-parent-with-ab", + "version": "1.1.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-aliases-of-same-pkg/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-aliases-of-same-pkg/1.0.0/package.json new file mode 100644 index 0000000000..e081fa83ff --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-aliases-of-same-pkg/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/abc-parent-with-aliases-of-same-pkg", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/abc": "^1.0.0", + "peer-c3": "npm:@pnpm.e2e/peer-c@1.0.0", + "peer-c2": "npm:@pnpm.e2e/peer-c@1.0.1", + "peer-c1": "npm:@pnpm.e2e/peer-c@2.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-aliases/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-aliases/1.0.0/package.json new file mode 100644 index 0000000000..c2f8fd5140 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-aliases/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/abc-parent-with-aliases", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/abc": "^1.0.0", + "a": "npm:@pnpm.e2e/peer-a@^1.0.0", + "b": "npm:@pnpm.e2e/peer-b@^1.0.0", + "@pnpm.e2e/peer-c": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-missing-peers/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-missing-peers/1.0.0/package.json new file mode 100644 index 0000000000..15d8d6604f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-parent-with-missing-peers/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/abc-parent-with-missing-peers", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/abc": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-regular-deps-is-in-peers/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-regular-deps-is-in-peers/1.0.0/package.json new file mode 100644 index 0000000000..4c250f3115 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-regular-deps-is-in-peers/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/abc-regular-deps-is-in-peers", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/abc-regular-deps": "*" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc-regular-deps/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc-regular-deps/1.0.0/package.json new file mode 100644 index 0000000000..2d9d6b04c8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc-regular-deps/1.0.0/package.json @@ -0,0 +1,9 @@ +{ + "name": "@pnpm.e2e/abc-regular-deps", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/peer-a": "1.0.0", + "@pnpm.e2e/peer-b": "1.0.0", + "@pnpm.e2e/peer-c": "1.0.0" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc/1.0.0/package.json new file mode 100644 index 0000000000..fed8b530b5 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc/1.0.0/package.json @@ -0,0 +1,12 @@ +{ + "name": "@pnpm.e2e/abc", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "100.0.0" + }, + "peerDependencies": { + "@pnpm.e2e/peer-a": "^1.0.0", + "@pnpm.e2e/peer-b": "^1.0.0", + "@pnpm.e2e/peer-c": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/abc/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/abc/2.0.0/package.json new file mode 100644 index 0000000000..b4d0bf3f64 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/abc/2.0.0/package.json @@ -0,0 +1,12 @@ +{ + "name": "@pnpm.e2e/abc", + "version": "2.0.0", + "dependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "100.0.0" + }, + "peerDependencies": { + "@pnpm.e2e/peer-a": "^1.0.0", + "@pnpm.e2e/peer-b": "^1.0.0", + "@pnpm.e2e/peer-c": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/alpha/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/alpha/1.0.0/package.json new file mode 100644 index 0000000000..4ad7a178b9 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/alpha/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/alpha", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/has-alpha-as-peer": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/bar/100.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/bar/100.0.0/package.json new file mode 100644 index 0000000000..4c1061a935 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/bar/100.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/bar", + "version": "100.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/bar/100.1.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/bar/100.1.0/package.json new file mode 100644 index 0000000000..4c6acf032e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/bar/100.1.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/bar", + "version": "100.1.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/beta-version/1.0.0-beta.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/beta-version/1.0.0-beta.0/package.json new file mode 100644 index 0000000000..2b18044879 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/beta-version/1.0.0-beta.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/beta-version", + "version": "1.0.0-beta.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/bravo-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/bravo-dep/1.0.0/package.json new file mode 100644 index 0000000000..e5ca22af16 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/bravo-dep/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/bravo-dep", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/bravo-dep/1.0.1/package.json b/registry/.fixtures/packages/@pnpm.e2e/bravo-dep/1.0.1/package.json new file mode 100644 index 0000000000..3136043a3b --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/bravo-dep/1.0.1/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/bravo-dep", + "version": "1.0.1" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/bravo-dep/1.1.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/bravo-dep/1.1.0/package.json new file mode 100644 index 0000000000..0674dc546e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/bravo-dep/1.1.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/bravo-dep", + "version": "1.1.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/bravo/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/bravo/1.0.0/package.json new file mode 100644 index 0000000000..c18cb59500 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/bravo/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/bravo", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/bravo-dep": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/broken-bin/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/broken-bin/1.0.0/package.json new file mode 100644 index 0000000000..caa3b3cea3 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/broken-bin/1.0.0/package.json @@ -0,0 +1,14 @@ +{ + "name": "@pnpm.e2e/broken-bin", + "version": "1.0.0", + "description": "A package with a bin that does not exist", + "bin": "./index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/broken-bin" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/build-allow-list/1.0.0/list.json b/registry/.fixtures/packages/@pnpm.e2e/build-allow-list/1.0.0/list.json new file mode 100644 index 0000000000..e65c21a90d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/build-allow-list/1.0.0/list.json @@ -0,0 +1,3 @@ +[ + "@pnpm.e2e/install-script-example" +] \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/build-allow-list/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/build-allow-list/1.0.0/package.json new file mode 100644 index 0000000000..5fd4054dbf --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/build-allow-list/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/build-allow-list", + "version": "1.0.0" +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/build-metadata-in-dep-version/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/build-metadata-in-dep-version/1.0.0/index.js new file mode 100644 index 0000000000..42ed3b86b6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/build-metadata-in-dep-version/1.0.0/index.js @@ -0,0 +1 @@ +module.exports = require('dep-of-pkg-with-1-dep') diff --git a/registry/.fixtures/packages/@pnpm.e2e/build-metadata-in-dep-version/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/build-metadata-in-dep-version/1.0.0/package.json new file mode 100644 index 0000000000..8d932c0edf --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/build-metadata-in-dep-version/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/build-metadata-in-dep-version", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/foo": "100.0.0+abcdefg" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/dependency.js b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/dependency.js new file mode 100644 index 0000000000..87133d7de4 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/dependency.js @@ -0,0 +1 @@ +module.exports = require('@pnpm.e2e/circular-deps-2-of-2') diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/index.js b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/index.js new file mode 100644 index 0000000000..6b5a79544f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/index.js @@ -0,0 +1 @@ +module.exports = () => require('./package.json').name diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/mirror.js b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/mirror.js new file mode 100644 index 0000000000..5ee9b822be --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/mirror.js @@ -0,0 +1 @@ +module.exports = require('@pnpm.e2e/circular-deps-2-of-2/dependency') diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/package.json b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/package.json new file mode 100644 index 0000000000..4f84c094d0 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-1-of-2/1.0.2/package.json @@ -0,0 +1,13 @@ +{ + "name": "@pnpm.e2e/circular-deps-1-of-2", + "version": "1.0.2", + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "dependencies": { + "@pnpm.e2e/circular-deps-2-of-2": "1.0.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/circular-deps-1-of-2" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/dependency.js b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/dependency.js new file mode 100644 index 0000000000..0107754f2c --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/dependency.js @@ -0,0 +1 @@ +module.exports = require('@pnpm.e2e/circular-deps-1-of-2') diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/index.js b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/index.js new file mode 100644 index 0000000000..6b5a79544f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/index.js @@ -0,0 +1 @@ +module.exports = () => require('./package.json').name diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/mirror.js b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/mirror.js new file mode 100644 index 0000000000..cde77968d2 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/mirror.js @@ -0,0 +1 @@ +module.exports = require('@pnpm.e2e/circular-deps-1-of-2/dependency') diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/package.json b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/package.json new file mode 100644 index 0000000000..0782a50f47 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-deps-2-of-2/1.0.2/package.json @@ -0,0 +1,13 @@ +{ + "name": "@pnpm.e2e/circular-deps-2-of-2", + "version": "1.0.2", + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "dependencies": { + "@pnpm.e2e/circular-deps-1-of-2": "1.0.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/circular-deps-2-of-2" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-peer-a/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/circular-peer-a/1.0.0/package.json new file mode 100644 index 0000000000..c56c1e55d5 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-peer-a/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/circular-peer-a", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/circular-peer-b": "*" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-peer-b/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/circular-peer-b/1.0.0/package.json new file mode 100644 index 0000000000..09dcd75648 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-peer-b/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/circular-peer-b", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/circular-peer-a": "*" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-peers-1-of-3/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/circular-peers-1-of-3/1.0.0/package.json new file mode 100644 index 0000000000..45781c787a --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-peers-1-of-3/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/circular-peers-1-of-3", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/circular-peers-2-of-3": "*", + "@pnpm.e2e/peer-a": "*" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-peers-2-of-3/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/circular-peers-2-of-3/1.0.0/package.json new file mode 100644 index 0000000000..5b60ce2bfb --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-peers-2-of-3/1.0.0/package.json @@ -0,0 +1,9 @@ +{ + "name": "@pnpm.e2e/circular-peers-2-of-3", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/circular-peers-3-of-3": "*", + "@pnpm.e2e/peer-a": "*", + "@pnpm.e2e/peer-b": "*" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/circular-peers-3-of-3/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/circular-peers-3-of-3/1.0.0/package.json new file mode 100644 index 0000000000..9dbdaae9cb --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/circular-peers-3-of-3/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/circular-peers-3-of-3", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/circular-peers-1-of-3": "*" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/cli-with-node-engine/1.0.0/cli.js b/registry/.fixtures/packages/@pnpm.e2e/cli-with-node-engine/1.0.0/cli.js new file mode 100644 index 0000000000..73edfaabf3 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/cli-with-node-engine/1.0.0/cli.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +import fs from 'node:fs' + +fs.writeFileSync('node-version', process.version, 'utf8') diff --git a/registry/.fixtures/packages/@pnpm.e2e/cli-with-node-engine/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/cli-with-node-engine/1.0.0/package.json new file mode 100644 index 0000000000..2e1d749593 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/cli-with-node-engine/1.0.0/package.json @@ -0,0 +1,19 @@ +{ + "name": "@pnpm.e2e/cli-with-node-engine", + "version": "1.0.0", + "bin": "cli.js", + "type": "module", + "files": [ + "cli.js" + ], + "scripts": { + "postinstall": "node cli.js" + }, + "engines": { + "runtime": { + "name": "node", + "version": "22.19.0", + "onFail": "download" + } + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/complex-circular-peers-a/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/complex-circular-peers-a/1.0.0/package.json new file mode 100644 index 0000000000..2fd4976e82 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/complex-circular-peers-a/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/complex-circular-peers-a", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/complex-circular-peers-b": "*" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/complex-circular-peers-b/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/complex-circular-peers-b/1.0.0/package.json new file mode 100644 index 0000000000..dafdd06034 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/complex-circular-peers-b/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/complex-circular-peers-b", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/complex-circular-peers-a": "*", + "@pnpm.e2e/complex-circular-peers-c": "*" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/complex-circular-peers-c/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/complex-circular-peers-c/1.0.0/package.json new file mode 100644 index 0000000000..ce97262265 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/complex-circular-peers-c/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/complex-circular-peers-c", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/complex-circular-peers-a": "*", + "@pnpm.e2e/complex-circular-peers-b": "*" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/console-log/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/console-log/1.0.0/index.js new file mode 100644 index 0000000000..f481a41097 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/console-log/1.0.0/index.js @@ -0,0 +1,2 @@ +console.log('first line') +console.log('second line') diff --git a/registry/.fixtures/packages/@pnpm.e2e/console-log/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/console-log/1.0.0/package.json new file mode 100644 index 0000000000..6cb370a4cc --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/console-log/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/console-log", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/console-log/2.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/console-log/2.0.0/index.js new file mode 100644 index 0000000000..b52d4e8940 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/console-log/2.0.0/index.js @@ -0,0 +1,3 @@ +console.log('first line') +console.log('second line') +console.log('third line') diff --git a/registry/.fixtures/packages/@pnpm.e2e/console-log/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/console-log/2.0.0/package.json new file mode 100644 index 0000000000..84c1c9e987 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/console-log/2.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/console-log", + "version": "2.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/console-log/3.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/console-log/3.0.0/index.js new file mode 100644 index 0000000000..54b6705b0f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/console-log/3.0.0/index.js @@ -0,0 +1,4 @@ +console.log('first line') +console.log('second line') +console.log('third line') +console.log('fourth line') diff --git a/registry/.fixtures/packages/@pnpm.e2e/console-log/3.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/console-log/3.0.0/package.json new file mode 100644 index 0000000000..3a83e1e990 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/console-log/3.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/console-log", + "version": "3.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/count-to-10/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/count-to-10/1.0.0/package.json new file mode 100644 index 0000000000..7b4646b708 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/count-to-10/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/count-to-10", + "version": "1.0.0", + "scripts": { + "postinstall": "node postinstall" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/count-to-10/1.0.0/postinstall.js b/registry/.fixtures/packages/@pnpm.e2e/count-to-10/1.0.0/postinstall.js new file mode 100644 index 0000000000..d70da19884 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/count-to-10/1.0.0/postinstall.js @@ -0,0 +1,12 @@ +'use strict' + +console.log(1) +console.log(2) +console.log(3) +console.log(4) +console.log(5) +console.error(6) +console.log(7) +console.log(8) +console.log(9) +console.log(10) diff --git a/registry/.fixtures/packages/@pnpm.e2e/darwin-arm64/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/darwin-arm64/1.0.0/package.json new file mode 100644 index 0000000000..fb3912f93d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/darwin-arm64/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/darwin-arm64", + "version": "1.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ] +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/darwin-x64/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/darwin-x64/1.0.0/package.json new file mode 100644 index 0000000000..070dd65932 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/darwin-x64/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/darwin-x64", + "version": "1.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ] +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/deadlock.a/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/deadlock.a/1.0.0/package.json new file mode 100644 index 0000000000..c26fee74ba --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/deadlock.a/1.0.0/package.json @@ -0,0 +1,12 @@ +{ + "name": "@pnpm.e2e/deadlock.a", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/deadlock.b": "1.0.0", + "@pnpm.e2e/deadlock.c": "1.0.0" + }, + "peerDependencies": { + "@pnpm.e2e/deadlock.b": "1.0.0", + "@pnpm.e2e/deadlock.c": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/deadlock.b/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/deadlock.b/1.0.0/package.json new file mode 100644 index 0000000000..9f9c0665a0 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/deadlock.b/1.0.0/package.json @@ -0,0 +1,11 @@ +{ + "name": "@pnpm.e2e/deadlock.b", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/deadlock.c": "1.0.0" + }, + "peerDependencies": { + "@pnpm.e2e/deadlock.a": "*", + "@pnpm.e2e/deadlock.c": "2.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/deadlock.b/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/deadlock.b/2.0.0/package.json new file mode 100644 index 0000000000..f1cc7b6df3 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/deadlock.b/2.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/deadlock.b", + "version": "2.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/deadlock.c/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/deadlock.c/1.0.0/package.json new file mode 100644 index 0000000000..3d6fc7f34b --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/deadlock.c/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/deadlock.c", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/deadlock.a": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/dep-of-optional-pkg/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/dep-of-optional-pkg/1.0.0/package.json new file mode 100644 index 0000000000..a7da947304 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/dep-of-optional-pkg/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/dep-of-optional-pkg", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.0.0/index.js new file mode 100644 index 0000000000..b320ac6e09 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.0.0/index.js @@ -0,0 +1 @@ +module.exports = () => require('./package.json') diff --git a/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.0.0/package.json new file mode 100644 index 0000000000..bb7d7069b3 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/dep-of-pkg-with-1-dep", + "version": "100.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.1.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.1.0/index.js new file mode 100644 index 0000000000..b320ac6e09 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.1.0/index.js @@ -0,0 +1 @@ +module.exports = () => require('./package.json') diff --git a/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.1.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.1.0/package.json new file mode 100644 index 0000000000..49cad29cef --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/100.1.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/dep-of-pkg-with-1-dep", + "version": "100.1.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/101.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/101.0.0/index.js new file mode 100644 index 0000000000..b320ac6e09 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/101.0.0/index.js @@ -0,0 +1 @@ +module.exports = () => require('./package.json') diff --git a/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/101.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/101.0.0/package.json new file mode 100644 index 0000000000..c234b63949 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/dep-of-pkg-with-1-dep/101.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/dep-of-pkg-with-1-dep", + "version": "101.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/dep-of-recursive-with-optional-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/dep-of-recursive-with-optional-peer/1.0.0/package.json new file mode 100644 index 0000000000..7dad9aa647 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/dep-of-recursive-with-optional-peer/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/dep-of-recursive-with-optional-peer", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/recursive-with-optional-peer": "1.0.0", + "@pnpm.e2e/peer-a": "1.0.0" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/depends-on-console-log/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/depends-on-console-log/1.0.0/package.json new file mode 100644 index 0000000000..0ec999506d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/depends-on-console-log/1.0.0/package.json @@ -0,0 +1,9 @@ +{ + "name": "@pnpm.e2e/depends-on-console-log", + "version": "1.0.0", + "dependencies": { + "console-log-1": "npm:@pnpm.e2e/console-log@1.0.0", + "console-log-2": "npm:@pnpm.e2e/console-log@2.0.0", + "console-log-3": "npm:@pnpm.e2e/console-log@3.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/depends-on-pkg-abcd/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/depends-on-pkg-abcd/1.0.0/package.json new file mode 100644 index 0000000000..428ca09a35 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/depends-on-pkg-abcd/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/depends-on-pkg-abcd", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/pkg-a": "1.0.0", + "@pnpm.e2e/pkg-b": "1.0.0", + "@pnpm.e2e/pkg-c": "1.0.0", + "@pnpm.e2e/pkg-d": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/deprecated/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/deprecated/1.0.0/package.json new file mode 100644 index 0000000000..387dae685a --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/deprecated/1.0.0/package.json @@ -0,0 +1,6 @@ +{ + "name": "@pnpm.e2e/deprecated", + "version": "1.0.0", + "homepage": "https://foo.bar/qar", + "deprecated": "This package is deprecated. Lorem ipsum dolor sit amet, consectetur adipiscing elit." +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/exports-pnpmfile/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/exports-pnpmfile/1.0.0/package.json new file mode 100644 index 0000000000..ba09716f4e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/exports-pnpmfile/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/exports-pnpmfile", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/exports-pnpmfile/1.0.0/pnpmfile.cjs b/registry/.fixtures/packages/@pnpm.e2e/exports-pnpmfile/1.0.0/pnpmfile.cjs new file mode 100644 index 0000000000..47aa03380f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/exports-pnpmfile/1.0.0/pnpmfile.cjs @@ -0,0 +1,13 @@ +module.exports = { + hooks: { + readPackage (pkg) { + if (pkg.name === '@pnpm/x') { + if (!pkg.dependencies) { + pkg.dependencies = {} + } + pkg.dependencies['@pnpm/y'] = '1.0.0' + } + return pkg + } + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/external-depend-on-internal-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/external-depend-on-internal-dep/1.0.0/package.json new file mode 100644 index 0000000000..3d2193bd40 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/external-depend-on-internal-dep/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/external-depend-on-internal-dep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/internal-f": "link:packages/f" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/failing-postinstall/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/failing-postinstall/1.0.0/package.json new file mode 100644 index 0000000000..59790ca44e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/failing-postinstall/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/failing-postinstall", + "version": "1.0.0", + "scripts": { + "postinstall": "echo hello && echo world && exit 1" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/foo/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/foo/1.0.0/package.json new file mode 100644 index 0000000000..9f58250a8d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/foo/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/foo", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/foo/1.1.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/foo/1.1.0/package.json new file mode 100644 index 0000000000..1004721980 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/foo/1.1.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/foo", + "version": "1.1.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/foo/1.2.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/foo/1.2.0/package.json new file mode 100644 index 0000000000..889c77e26f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/foo/1.2.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/foo", + "version": "1.2.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/foo/1.3.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/foo/1.3.0/package.json new file mode 100644 index 0000000000..5f3abce42e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/foo/1.3.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/foo", + "version": "1.3.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/foo/100.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/foo/100.0.0/package.json new file mode 100644 index 0000000000..4c4ee7ff45 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/foo/100.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/foo", + "version": "100.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/foo/100.1.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/foo/100.1.0/package.json new file mode 100644 index 0000000000..a54df0d6d7 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/foo/100.1.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/foo", + "version": "100.1.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/foo/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/foo/2.0.0/package.json new file mode 100644 index 0000000000..bbb4fa4809 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/foo/2.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/foo", + "version": "2.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/foobar/100.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/foobar/100.0.0/package.json new file mode 100644 index 0000000000..d115e33360 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/foobar/100.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/foobar", + "version": "100.0.0", + "dependencies": { + "@pnpm.e2e/foo": "^100.0.0" + }, + "optionalDependencies": { + "@pnpm.e2e/bar": "^100.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/foobarqar/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/foobarqar/1.0.0/package.json new file mode 100644 index 0000000000..0d742bc15c --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/foobarqar/1.0.0/package.json @@ -0,0 +1,9 @@ +{ + "name": "@pnpm.e2e/foobarqar", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/foo": "^100.0.0", + "@pnpm.e2e/bar": "100.0.0", + "is-positive": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/foobarqar/1.0.1/package.json b/registry/.fixtures/packages/@pnpm.e2e/foobarqar/1.0.1/package.json new file mode 100644 index 0000000000..d586acf708 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/foobarqar/1.0.1/package.json @@ -0,0 +1,9 @@ +{ + "name": "@pnpm.e2e/foobarqar", + "version": "1.0.1", + "dependencies": { + "@pnpm.e2e/foo": "^100.0.0", + "@pnpm.e2e/bar": "100.0.0", + "@pnpm.e2e/qar": "100.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/for-legacy-node/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/for-legacy-node/1.0.0/package.json new file mode 100644 index 0000000000..cf6aa47c4c --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/for-legacy-node/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/for-legacy-node", + "version": "1.0.0", + "engines": { + "node": "0.10" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/for-legacy-pnpm/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/for-legacy-pnpm/1.0.0/package.json new file mode 100644 index 0000000000..00a97c065d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/for-legacy-pnpm/1.0.0/package.json @@ -0,0 +1,9 @@ +{ + "name": "@pnpm.e2e/for-legacy-pnpm", + "version": "1.0.0", + "publishConfig": { + "engines": { + "pnpm": "0.1.0" + } + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/for-testing-peers-having-bins/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/for-testing-peers-having-bins/1.0.0/package.json new file mode 100644 index 0000000000..8aebddf479 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/for-testing-peers-having-bins/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/for-testing-peers-having-bins", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/pkg-with-peer-having-bin": "*", + "@pnpm.e2e/peer-with-bin": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/for-testing-pnpm-dlx/1.0.0/foo.js b/registry/.fixtures/packages/@pnpm.e2e/for-testing-pnpm-dlx/1.0.0/foo.js new file mode 100644 index 0000000000..2b4f2b470a --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/for-testing-pnpm-dlx/1.0.0/foo.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +const fs = require('fs') + +fs.writeFileSync('foo', '', 'utf8') diff --git a/registry/.fixtures/packages/@pnpm.e2e/for-testing-pnpm-dlx/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/for-testing-pnpm-dlx/1.0.0/package.json new file mode 100644 index 0000000000..a17e7cb9b2 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/for-testing-pnpm-dlx/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/for-testing-pnpm-dlx", + "version": "1.0.0", + "description": "Contains a 'foo' bin for testing pnpm dlx", + "bin": { + "foo": "foo.js" + }, + "author": "Zoltan Kochan", + "license": "MIT" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/for-testing-scoped-peers/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/for-testing-scoped-peers/1.0.0/package.json new file mode 100644 index 0000000000..d06951ee67 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/for-testing-scoped-peers/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/for-testing-scoped-peers", + "version": "1.0.0", + "dependencies": { + "@having/scoped-peer": "*", + "@scoped/peer": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/file.js b/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/file.js new file mode 100644 index 0000000000..e7a8d2a250 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/file.js @@ -0,0 +1,3 @@ +const BASE_NAME = 'node-info.json' +const FULL_PATH = require('path').join(__dirname, BASE_NAME) +module.exports = { BASE_NAME, FULL_PATH } diff --git a/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/generate-node-info.js b/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/generate-node-info.js new file mode 100644 index 0000000000..b513ababa8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/generate-node-info.js @@ -0,0 +1,9 @@ +const fs = require('fs') +const file = require('./file') +const nodeInfo = { + execPath: process.execPath, + versions: process.versions, +} +const json = JSON.stringify(nodeInfo, undefined, 2) + '\n' +console.log(json) +fs.writeFileSync(file.FULL_PATH, json) diff --git a/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/package.json new file mode 100644 index 0000000000..7c44eb82c9 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/package.json @@ -0,0 +1,12 @@ +{ + "name": "@pnpm.e2e/generate-node-info-during-install", + "version": "1.0.0", + "description": "Write a file that contains specs of the Node.js runtime that was used to install this package", + "scripts": { + "install": "node generate-node-info.js" + }, + "index": "read-generated-node-info.js", + "bin": { + "print-generated-node-info": "print-generated-node-info.js" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/print-generated-node-info.js b/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/print-generated-node-info.js new file mode 100755 index 0000000000..9c8cdbd030 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/print-generated-node-info.js @@ -0,0 +1,5 @@ +#! /usr/bin/env node +const fs = require('fs') +const file = require('./file') +const json = fs.readFileSync(file.FULL_PATH, 'utf-8') +console.log(json) diff --git a/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/read-generated-node-info.js b/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/read-generated-node-info.js new file mode 100644 index 0000000000..5d7699b04e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/generate-node-info-during-install/1.0.0/read-generated-node-info.js @@ -0,0 +1,4 @@ +const fs = require('fs') +const file = require('./file') +const json = fs.readFileSync(file.FULL_PATH, 'utf-8') +module.exports = JSON.parse(json) diff --git a/registry/.fixtures/packages/@pnpm.e2e/generated-bins/1.0.0/generateBins.js b/registry/.fixtures/packages/@pnpm.e2e/generated-bins/1.0.0/generateBins.js new file mode 100644 index 0000000000..aa0527a667 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/generated-bins/1.0.0/generateBins.js @@ -0,0 +1,9 @@ +'use strict' +const fs = require('fs') +const path = require('path') + +const bin = path.join(__dirname, 'bin') + +fs.mkdirSync(bin) +fs.writeFileSync(path.join(bin, 'cmd1'), '#!/usr/bin/env node', 'utf8') +fs.writeFileSync(path.join(bin, 'cmd2'), '#!/usr/bin/env node', 'utf8') diff --git a/registry/.fixtures/packages/@pnpm.e2e/generated-bins/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/generated-bins/1.0.0/package.json new file mode 100644 index 0000000000..d0d83ab5a1 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/generated-bins/1.0.0/package.json @@ -0,0 +1,13 @@ +{ + "name": "@pnpm.e2e/generated-bins", + "version": "1.0.0", + "files": [ + "generateBins.js" + ], + "directories": { + "bin": "bin" + }, + "scripts": { + "postinstall": "node generateBins" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-aliased-git-dependency/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/has-aliased-git-dependency/1.0.0/index.js new file mode 100644 index 0000000000..f510ae0180 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-aliased-git-dependency/1.0.0/index.js @@ -0,0 +1 @@ +module.exports = require('say-hi') diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-aliased-git-dependency/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-aliased-git-dependency/1.0.0/package.json new file mode 100644 index 0000000000..ee778e7bc1 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-aliased-git-dependency/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/has-aliased-git-dependency", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/has-say-hi-peer": "^1.0.0", + "say-hi": "github:zkochan/hi#4cdebec76b7b9d1f6e219e06c42d92a6b8ea60cd" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-alpha-as-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-alpha-as-peer/1.0.0/package.json new file mode 100644 index 0000000000..f09c1ede52 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-alpha-as-peer/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/has-alpha-as-peer", + "version": "1.0.0", + "scripts": { + "postinstall": "exit 0" + }, + "peerDependencies": { + "@pnpm.e2e/alpha": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-alpha/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-alpha/1.0.0/package.json new file mode 100644 index 0000000000..b95b0e3411 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-alpha/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-alpha", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/alpha": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-beta-only/1.0.0-beta.1/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-beta-only/1.0.0-beta.1/package.json new file mode 100644 index 0000000000..f206cc9107 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-beta-only/1.0.0-beta.1/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/has-beta-only", + "version": "1.0.0-beta.1" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-bin-and-needs-build/1.0.0/_bin.js b/registry/.fixtures/packages/@pnpm.e2e/has-bin-and-needs-build/1.0.0/_bin.js new file mode 100644 index 0000000000..35d71021e1 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-bin-and-needs-build/1.0.0/_bin.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log('Hello world!') diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-bin-and-needs-build/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-bin-and-needs-build/1.0.0/package.json new file mode 100644 index 0000000000..57c104c8aa --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-bin-and-needs-build/1.0.0/package.json @@ -0,0 +1,16 @@ +{ + "name": "@pnpm.e2e/has-bin-and-needs-build", + "version": "1.0.0", + "bin": "./bin.js", + "files": [ + "postinstall.js", + "_bin.js" + ], + "dependencies": { + "@pnpm.e2e/pre-and-postinstall-scripts-example": "1.0.0", + "@pnpm.e2e/install-script-example": "1.0.0" + }, + "scripts": { + "postinstall": "node postinstall.js" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-bin-and-needs-build/1.0.0/postinstall.js b/registry/.fixtures/packages/@pnpm.e2e/has-bin-and-needs-build/1.0.0/postinstall.js new file mode 100644 index 0000000000..f803c9e435 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-bin-and-needs-build/1.0.0/postinstall.js @@ -0,0 +1,4 @@ +const path = require('path') +const fs = require('fs') + +fs.renameSync(path.join(__dirname, '_bin.js'), path.join(__dirname, 'bin.js')) diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/.gitignore b/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/.gitignore new file mode 100644 index 0000000000..8ceaea7305 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/.gitignore @@ -0,0 +1,2 @@ +build +generated.js \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/.npmignore b/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/.npmignore new file mode 100644 index 0000000000..1aa25756be --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/.npmignore @@ -0,0 +1,2 @@ +generated.js +build \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/binding.gyp b/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/binding.gyp new file mode 100644 index 0000000000..2438c4cf07 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/binding.gyp @@ -0,0 +1,15 @@ +{ + "targets": [ + { + "target_name": "run_js_script", + "actions": [ + { + "action_name": "execute_postinstall", + "inputs": [], + "outputs": ["generated.js"], + "action": ["node", "postinstall.js"] + } + ] + } + ] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/package.json new file mode 100644 index 0000000000..f15fa00184 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-binding-gyp", + "version": "1.0.0", + "os": [ + "this-os-does-not-exist" + ] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/postinstall.js b/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/postinstall.js new file mode 100644 index 0000000000..2f37bc4c10 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-binding-gyp/1.0.0/postinstall.js @@ -0,0 +1,4 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync('generated.js', 'module.exports = function () {}\n', 'utf8') diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-cpu-specified/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-cpu-specified/1.0.0/package.json new file mode 100644 index 0000000000..212828ab06 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-cpu-specified/1.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@pnpm.e2e/has-cpu-specified", + "version": "1.0.0", + "cpu": ["x64", "ia32"] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-default-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-default-peer/1.0.0/package.json new file mode 100644 index 0000000000..e857ed70bb --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-default-peer/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/has-default-peer", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "100.0.0" + }, + "peerDependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "^100.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-different-licenses/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-different-licenses/1.0.0/package.json new file mode 100644 index 0000000000..953465ff44 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-different-licenses/1.0.0/package.json @@ -0,0 +1,6 @@ +{ + "name": "@pnpm.e2e/has-different-licenses", + "version": "1.0.0", + "license": "MIT", + "author": "Some Author" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-different-licenses/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-different-licenses/2.0.0/package.json new file mode 100644 index 0000000000..a7dd779f2f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-different-licenses/2.0.0/package.json @@ -0,0 +1,6 @@ +{ + "name": "@pnpm.e2e/has-different-licenses", + "version": "2.0.0", + "license": "ISC", + "author": "Some Author" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-different-licenses/3.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-different-licenses/3.0.0/package.json new file mode 100644 index 0000000000..88982ebe74 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-different-licenses/3.0.0/package.json @@ -0,0 +1,6 @@ +{ + "name": "@pnpm.e2e/has-different-licenses", + "version": "3.0.0", + "license": "ISC", + "author": "Some Author" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/file.js b/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/file.js new file mode 100644 index 0000000000..e7a8d2a250 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/file.js @@ -0,0 +1,3 @@ +const BASE_NAME = 'node-info.json' +const FULL_PATH = require('path').join(__dirname, BASE_NAME) +module.exports = { BASE_NAME, FULL_PATH } diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/generate-node-info.js b/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/generate-node-info.js new file mode 100644 index 0000000000..b513ababa8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/generate-node-info.js @@ -0,0 +1,9 @@ +const fs = require('fs') +const file = require('./file') +const nodeInfo = { + execPath: process.execPath, + versions: process.versions, +} +const json = JSON.stringify(nodeInfo, undefined, 2) + '\n' +console.log(json) +fs.writeFileSync(file.FULL_PATH, json) diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/package.json new file mode 100644 index 0000000000..9a143d334b --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/package.json @@ -0,0 +1,14 @@ +{ + "name": "@pnpm.e2e/has-execution-env", + "version": "1.0.0", + "description": "The package.json defines a pnpm.executionEnv", + "scripts": { + "install": "node generate-node-info.js" + }, + "index": "read-generated-node-info.js", + "pnpm": { + "executionEnv": { + "nodeVersion": "20.0.0" + } + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/read-generated-node-info.js b/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/read-generated-node-info.js new file mode 100644 index 0000000000..5d7699b04e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-execution-env/1.0.0/read-generated-node-info.js @@ -0,0 +1,4 @@ +const fs = require('fs') +const file = require('./file') +const json = fs.readFileSync(file.FULL_PATH, 'utf-8') +module.exports = JSON.parse(json) diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-failing-postinstall-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-failing-postinstall-dep/1.0.0/package.json new file mode 100644 index 0000000000..0721440d76 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-failing-postinstall-dep/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/has-failing-postinstall-dep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/failing-postinstall": "1.0.0" + } +} + diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-foo-100.0.0-range-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-foo-100.0.0-range-dep/1.0.0/package.json new file mode 100644 index 0000000000..7789077041 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-foo-100.0.0-range-dep/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-foo-100.0.0-range-dep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/foo": "^100.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-foo-100.1.0-dep-1/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-foo-100.1.0-dep-1/1.0.0/package.json new file mode 100644 index 0000000000..ed9c7853bf --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-foo-100.1.0-dep-1/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-foo-100.1.0-dep-1", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/foo": "100.1.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-foo-100.1.0-dep-2/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-foo-100.1.0-dep-2/1.0.0/package.json new file mode 100644 index 0000000000..3f379d87c7 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-foo-100.1.0-dep-2/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/has-foo-100.1.0-dep-2", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/foo": "100.1.0" + } +} + diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-foo-as-dep-and-subdep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-foo-as-dep-and-subdep/1.0.0/package.json new file mode 100644 index 0000000000..f1ef9a0529 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-foo-as-dep-and-subdep/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/has-foo-as-dep-and-subdep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/foo": "100.0.0", + "@pnpm.e2e/requires-any-foo": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-foo100-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-foo100-peer/1.0.0/package.json new file mode 100644 index 0000000000..c3d98cfebd --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-foo100-peer/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-foo100-peer", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/foo": "100" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-foo101-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-foo101-peer/1.0.0/package.json new file mode 100644 index 0000000000..f3fd695ae8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-foo101-peer/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-foo101-peer", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/foo": "101" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-generated-bins-as-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-generated-bins-as-dep/1.0.0/package.json new file mode 100644 index 0000000000..edef5950e1 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-generated-bins-as-dep/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-generated-bins-as-dep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/generated-bins": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-github-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-github-dep/1.0.0/package.json new file mode 100644 index 0000000000..d95e9f8e7a --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-github-dep/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-github-dep", + "version": "1.0.0", + "dependencies": { + "is-positive": "kevva/is-positive" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-github-dep/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-github-dep/2.0.0/package.json new file mode 100644 index 0000000000..c0d5a1bef9 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-github-dep/2.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-github-dep", + "version": "2.0.0", + "dependencies": { + "is-positive": "kevva/is-positive" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-only-as-peer-and-y/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-only-as-peer-and-y/1.0.0/package.json new file mode 100644 index 0000000000..b11f7731f5 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-only-as-peer-and-y/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/has-has-y-peer-only-as-peer-and-y", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/has-y-peer": "^1.0.0" + }, + "dependencies": { + "@pnpm/y": "1.0.0" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-only-as-peer-and-y/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-only-as-peer-and-y/2.0.0/package.json new file mode 100644 index 0000000000..a5236f4557 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-only-as-peer-and-y/2.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/has-has-y-peer-only-as-peer-and-y", + "version": "2.0.0", + "peerDependencies": { + "@pnpm.e2e/has-y-peer": "^1.0.0" + }, + "dependencies": { + "@pnpm/y": "2.0.0" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-only-as-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-only-as-peer/1.0.0/package.json new file mode 100644 index 0000000000..bd2c3a241f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-only-as-peer/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-has-y-peer-only-as-peer", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/has-y-peer": "^1.0.0" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-peer/1.0.0/package.json new file mode 100644 index 0000000000..edb44dab95 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-has-y-peer-peer/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/has-has-y-peer-peer", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/has-y-peer": "^1.0.0", + "@pnpm/y": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-local-dep/1.0.0/local-dep/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-local-dep/1.0.0/local-dep/package.json new file mode 100644 index 0000000000..8fed602d29 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-local-dep/1.0.0/local-dep/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/local-dep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/bravo-dep": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-local-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-local-dep/1.0.0/package.json new file mode 100644 index 0000000000..ddf766f902 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-local-dep/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/has-local-dep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "100.0.0", + "local-dep": "file:./local-dep" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-many-optional-deps/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-many-optional-deps/1.0.0/package.json new file mode 100644 index 0000000000..338809ca45 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-many-optional-deps/1.0.0/package.json @@ -0,0 +1,11 @@ +{ + "name": "@pnpm.e2e/has-many-optional-deps", + "version": "1.0.0", + "optionalDependencies": { + "@pnpm.e2e/darwin-x64": "1.0.0", + "@pnpm.e2e/darwin-arm64": "1.0.0", + "@pnpm.e2e/linux-x64": "1.0.0", + "@pnpm.e2e/linux-arm64": "1.0.0", + "@pnpm.e2e/windows-x64": "1.0.0" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-native-dep/1.0.1/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-native-dep/1.0.1/package.json new file mode 100644 index 0000000000..6e2f29897d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-native-dep/1.0.1/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-native-dep", + "version": "1.0.1", + "dependencies": { + "bcrypt": "3.0.6" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-not-compatible-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-not-compatible-dep/1.0.0/package.json new file mode 100644 index 0000000000..4799dec4cd --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-not-compatible-dep/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-not-compatible-dep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/not-compatible-with-any-os": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-optional-dep-with-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-optional-dep-with-peer/1.0.0/package.json new file mode 100644 index 0000000000..35b5f0f562 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-optional-dep-with-peer/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/has-optional-dep-with-peer", + "version": "1.0.0", + "optionalDependencies": { + "@pnpm.e2e/not-compatible-with-any-os-and-has-peer": "1.0.0", + "@pnpm.e2e/peer-c": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-optional-peer-as-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-optional-peer-as-dep/1.0.0/package.json new file mode 100644 index 0000000000..720945e375 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-optional-peer-as-dep/1.0.0/package.json @@ -0,0 +1,12 @@ +{ + "name": "@pnpm.e2e/has-optional-peer-as-dep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/bravo-dep": "1.0.0" + }, + "peerDependenciesMeta": { + "@pnpm.e2e/bravo-dep": { + "optional": true + } + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-optional-peer-with-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-optional-peer-with-peer/1.0.0/package.json new file mode 100644 index 0000000000..7c4d654324 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-optional-peer-with-peer/1.0.0/package.json @@ -0,0 +1,12 @@ +{ + "name": "@pnpm.e2e/has-optional-peer-with-peer", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/has-y-peer": "*" + }, + "peerDependenciesMeta": { + "@pnpm.e2e/has-y-peer": { + "optional": true + } + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-patch-for-foo/1.0.0/@pnpm.e2e__foo@100.0.0.patch b/registry/.fixtures/packages/@pnpm.e2e/has-patch-for-foo/1.0.0/@pnpm.e2e__foo@100.0.0.patch new file mode 100644 index 0000000000..e0c6197d69 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-patch-for-foo/1.0.0/@pnpm.e2e__foo@100.0.0.patch @@ -0,0 +1,7 @@ +diff --git a/index.js b/index.js +new file mode 100644 +index 0000000000000000000000000000000000000000..1e2e7be215a474d90dd0daf2bc9e368694fec353 +--- /dev/null ++++ b/index.js +@@ -0,0 +1 @@ ++console.log('Hello world!') diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-patch-for-foo/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-patch-for-foo/1.0.0/package.json new file mode 100644 index 0000000000..b465bdf459 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-patch-for-foo/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/has-patch-for-foo", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-patch-for-foo/1.0.0/pnpmfile.cjs b/registry/.fixtures/packages/@pnpm.e2e/has-patch-for-foo/1.0.0/pnpmfile.cjs new file mode 100644 index 0000000000..d85073eca6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-patch-for-foo/1.0.0/pnpmfile.cjs @@ -0,0 +1,13 @@ +const path = require('path') + +module.exports = { + hooks: { + updateConfig (config) { + config.patchedDependencies = { + ...config.patchedDependencies, + '@pnpm.e2e/foo': path.join(__dirname, '@pnpm.e2e__foo@100.0.0.patch'), + } + return config + }, + }, +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-peer-c-in-deps/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-peer-c-in-deps/1.0.0/package.json new file mode 100644 index 0000000000..c2211a46d0 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-peer-c-in-deps/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-peer-c-in-deps", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/peer-c": "2.0.0" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-pkg-with-peer-only/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-pkg-with-peer-only/1.0.0/package.json new file mode 100644 index 0000000000..2bab8306bb --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-pkg-with-peer-only/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/has-pkg-with-peer-only", + "version": "1.0.0", + "dependencies": { + "@scoped/peer": "1.0.0", + "@having/scoped-peer": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-prerelease/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-prerelease/1.0.0/package.json new file mode 100644 index 0000000000..1bf9d4a5e2 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-prerelease/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/has-prerelease", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-prerelease/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-prerelease/2.0.0/package.json new file mode 100644 index 0000000000..10fbcd3ca2 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-prerelease/2.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/has-prerelease", + "version": "2.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-prerelease/3.0.0-rc.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-prerelease/3.0.0-rc.0/package.json new file mode 100644 index 0000000000..2307c6197e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-prerelease/3.0.0-rc.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/has-prerelease", + "version": "3.0.0-rc.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-same-license/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-same-license/1.0.0/package.json new file mode 100644 index 0000000000..8c5b6417cc --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-same-license/1.0.0/package.json @@ -0,0 +1,6 @@ +{ + "name": "@pnpm.e2e/has-same-license", + "version": "1.0.0", + "license": "MIT", + "author": "Some Author" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-same-license/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-same-license/2.0.0/package.json new file mode 100644 index 0000000000..e1c38ed6a4 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-same-license/2.0.0/package.json @@ -0,0 +1,6 @@ +{ + "name": "@pnpm.e2e/has-same-license", + "version": "2.0.0", + "license": "MIT", + "author": "Some Author" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-same-license/3.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-same-license/3.0.0/package.json new file mode 100644 index 0000000000..ac4f581542 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-same-license/3.0.0/package.json @@ -0,0 +1,6 @@ +{ + "name": "@pnpm.e2e/has-same-license", + "version": "3.0.0", + "license": "MIT", + "author": "Some Author" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-say-hi-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-say-hi-peer/1.0.0/package.json new file mode 100644 index 0000000000..789f0c5610 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-say-hi-peer/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-say-hi-peer", + "version": "1.0.0", + "peerDependencies": { + "say-hi": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-tango-as-peer-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-tango-as-peer-dep/1.0.0/package.json new file mode 100644 index 0000000000..061e00213c --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-tango-as-peer-dep/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-tango-as-peer-dep", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/tango": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-untrusted-optional-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-untrusted-optional-dep/1.0.0/package.json new file mode 100644 index 0000000000..d8985c02b6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-untrusted-optional-dep/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-untrusted-optional-dep", + "version": "1.0.0", + "optionalDependencies": { + "@pnpm/e2e.test-provenance": "0.0.5" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/has-y-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/has-y-peer/1.0.0/package.json new file mode 100644 index 0000000000..b2fa0a0c32 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/has-y-peer/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/has-y-peer", + "version": "1.0.0", + "peerDependencies": { + "@pnpm/y": ">=1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin-parent/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin-parent/1.0.0/index.js new file mode 100644 index 0000000000..08101424ae --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin-parent/1.0.0/index.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log('Hello world from hello-world-js-bin-parent!') diff --git a/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin-parent/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin-parent/1.0.0/package.json new file mode 100644 index 0000000000..4e1d2111a0 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin-parent/1.0.0/package.json @@ -0,0 +1,20 @@ +{ + "name": "@pnpm.e2e/hello-world-js-bin-parent", + "version": "1.0.0", + "description": "A package with a hello world js bin", + "bin": { + "hello-world-js-bin": "./index.js" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/hello-world-js-bin-parent" + }, + "dependencies": { + "@pnpm.e2e/hello-world-js-bin": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/0.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/0.0.0/index.js new file mode 100644 index 0000000000..35d71021e1 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/0.0.0/index.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log('Hello world!') diff --git a/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/0.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/0.0.0/package.json new file mode 100644 index 0000000000..f1072f38f3 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/0.0.0/package.json @@ -0,0 +1,14 @@ +{ + "name": "@pnpm.e2e/hello-world-js-bin", + "version": "0.0.0", + "description": "A package with a hello world js bin", + "bin": "./index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/hello-world-js-bin@0.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/1.0.0/index.js new file mode 100644 index 0000000000..35d71021e1 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/1.0.0/index.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log('Hello world!') diff --git a/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/1.0.0/package.json new file mode 100644 index 0000000000..b231c29701 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/hello-world-js-bin/1.0.0/package.json @@ -0,0 +1,14 @@ +{ + "name": "@pnpm.e2e/hello-world-js-bin", + "version": "1.0.0", + "description": "A package with a hello world js bin", + "bin": "./index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/hello-world-js-bin@1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/independent-and-requires-build/1.0.0/create-file.js b/registry/.fixtures/packages/@pnpm.e2e/independent-and-requires-build/1.0.0/create-file.js new file mode 100644 index 0000000000..321a3092a8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/independent-and-requires-build/1.0.0/create-file.js @@ -0,0 +1,4 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync('created-by-postinstall', '', 'utf8') diff --git a/registry/.fixtures/packages/@pnpm.e2e/independent-and-requires-build/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/independent-and-requires-build/1.0.0/package.json new file mode 100644 index 0000000000..174fe0e45e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/independent-and-requires-build/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/independent-and-requires-build", + "version": "1.0.0", + "description": "This package should have no deps and should have a postinstall script", + "scripts": { + "postinstall": "node create-file" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/.gitignore b/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/.gitignore new file mode 100644 index 0000000000..3a9d7537ee --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/.gitignore @@ -0,0 +1 @@ +generated-by-*.js diff --git a/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/.npmignore b/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/.npmignore new file mode 100644 index 0000000000..3a9d7537ee --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/.npmignore @@ -0,0 +1 @@ +generated-by-*.js diff --git a/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/README.md b/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/README.md new file mode 100644 index 0000000000..693ad7ff71 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/README.md @@ -0,0 +1,13 @@ +# install-script-example + +A package that creates a file by an install script + +## Installation + +``` +npm i install-script-example +``` + +# License + +MIT diff --git a/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/create.js b/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/create.js new file mode 100644 index 0000000000..f6e86da695 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/create.js @@ -0,0 +1,4 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync(process.argv[2] + '.js', 'module.exports = function () {}\n', 'utf8') diff --git a/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/package.json new file mode 100644 index 0000000000..9625427188 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/install-script-example/1.0.0/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pnpm.e2e/install-script-example", + "version": "1.0.0", + "description": "A package that creates a file by an install script", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "install": "node create generated-by-install" + }, + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/install-script-example" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/linux-arm64/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/linux-arm64/1.0.0/package.json new file mode 100644 index 0000000000..f0cfd8a6af --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/linux-arm64/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/linux-arm64", + "version": "1.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ] +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/linux-x64/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/linux-x64/1.0.0/package.json new file mode 100644 index 0000000000..f574cf6c95 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/linux-x64/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/linux-x64", + "version": "1.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ] +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/needs-auth/1.0.0/hello.js b/registry/.fixtures/packages/@pnpm.e2e/needs-auth/1.0.0/hello.js new file mode 100755 index 0000000000..1a276901c4 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/needs-auth/1.0.0/hello.js @@ -0,0 +1,3 @@ +#! /usr/bin/env node +const { name } = require('./package.json') +console.log(`hello from ${name}`) diff --git a/registry/.fixtures/packages/@pnpm.e2e/needs-auth/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/needs-auth/1.0.0/index.js new file mode 100644 index 0000000000..37d7332f73 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/needs-auth/1.0.0/index.js @@ -0,0 +1 @@ +module.exports = function () {} diff --git a/registry/.fixtures/packages/@pnpm.e2e/needs-auth/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/needs-auth/1.0.0/package.json new file mode 100644 index 0000000000..2a321ff294 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/needs-auth/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/needs-auth", + "version": "1.0.0", + "bin": { + "hello-from-needs-auth": "./hello.js" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/not-compatible-with-any-os-and-has-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/not-compatible-with-any-os-and-has-peer/1.0.0/package.json new file mode 100644 index 0000000000..e3bfb70e76 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/not-compatible-with-any-os-and-has-peer/1.0.0/package.json @@ -0,0 +1,13 @@ +{ + "name": "@pnpm.e2e/not-compatible-with-any-os-and-has-peer", + "version": "1.0.0", + "os": [ + "this-os-does-not-exist" + ], + "dependencies": { + "@pnpm.e2e/dep-of-optional-pkg": "1.0.0" + }, + "peerDependencies": { + "@pnpm.e2e/peer-c": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/not-compatible-with-any-os/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/not-compatible-with-any-os/1.0.0/package.json new file mode 100644 index 0000000000..1d0b62a3d3 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/not-compatible-with-any-os/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/not-compatible-with-any-os", + "version": "1.0.0", + "os": [ + "this-os-does-not-exist" + ], + "dependencies": { + "@pnpm.e2e/dep-of-optional-pkg": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/not-compatible-with-not-compatible-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/not-compatible-with-not-compatible-dep/1.0.0/package.json new file mode 100644 index 0000000000..36152677f2 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/not-compatible-with-not-compatible-dep/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/not-compatible-with-not-compatible-dep", + "version": "1.0.0", + "os": [ + "this-os-does-not-exist" + ], + "dependencies": { + "@pnpm.e2e/not-compatible-with-any-os": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/only-darwin-arm64/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/only-darwin-arm64/1.0.0/package.json new file mode 100644 index 0000000000..75c722fdef --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/only-darwin-arm64/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/only-darwin-arm64", + "version": "1.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/only-darwin-x64/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/only-darwin-x64/1.0.0/package.json new file mode 100644 index 0000000000..c3eae57516 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/only-darwin-x64/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/only-darwin-x64", + "version": "1.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/only-linux-arm64-glibc/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/only-linux-arm64-glibc/1.0.0/package.json new file mode 100644 index 0000000000..f9972f50fa --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/only-linux-arm64-glibc/1.0.0/package.json @@ -0,0 +1,13 @@ +{ + "name": "@pnpm.e2e/only-linux-arm64-glibc", + "version": "1.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/only-linux-arm64-musl/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/only-linux-arm64-musl/1.0.0/package.json new file mode 100644 index 0000000000..c0b999d158 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/only-linux-arm64-musl/1.0.0/package.json @@ -0,0 +1,13 @@ +{ + "name": "@pnpm.e2e/only-linux-arm64-musl", + "version": "1.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/only-linux-x64-glibc/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/only-linux-x64-glibc/1.0.0/package.json new file mode 100644 index 0000000000..a995c24981 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/only-linux-x64-glibc/1.0.0/package.json @@ -0,0 +1,13 @@ +{ + "name": "@pnpm.e2e/only-linux-x64-glibc", + "version": "1.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/only-linux-x64-musl/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/only-linux-x64-musl/1.0.0/package.json new file mode 100644 index 0000000000..5413e904e8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/only-linux-x64-musl/1.0.0/package.json @@ -0,0 +1,13 @@ +{ + "name": "@pnpm.e2e/only-linux-x64-musl", + "version": "1.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/only-win32-arm64/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/only-win32-arm64/1.0.0/package.json new file mode 100644 index 0000000000..9c0ec79e92 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/only-win32-arm64/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/only-win32-arm64", + "version": "1.0.0", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/only-win32-x64/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/only-win32-x64/1.0.0/package.json new file mode 100644 index 0000000000..76a8b6b59e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/only-win32-x64/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/only-win32-x64", + "version": "1.0.0", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ] +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/parent-of-has-many-optional-deps/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/parent-of-has-many-optional-deps/1.0.0/package.json new file mode 100644 index 0000000000..67aa8f61ce --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/parent-of-has-many-optional-deps/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/parent-of-has-many-optional-deps", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/has-many-optional-deps": "1.0.0" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/parent-of-pkg-with-1-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/parent-of-pkg-with-1-dep/1.0.0/package.json new file mode 100644 index 0000000000..6f0efd3ed8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/parent-of-pkg-with-1-dep/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/parent-of-pkg-with-1-dep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/pkg-with-1-dep": "^100.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/parent-of-pkg-with-events-and-peers/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/parent-of-pkg-with-events-and-peers/1.0.0/package.json new file mode 100644 index 0000000000..143d92016a --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/parent-of-pkg-with-events-and-peers/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/parent-of-pkg-with-events-and-peers", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/pkg-with-events-and-peers": "^1.0.0", + "@pnpm.e2e/peer-c": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/peer-a/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/peer-a/1.0.0/package.json new file mode 100644 index 0000000000..aad8e7ac40 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/peer-a/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/peer-a", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/peer-a/1.0.1/package.json b/registry/.fixtures/packages/@pnpm.e2e/peer-a/1.0.1/package.json new file mode 100644 index 0000000000..dd1ac1cd3b --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/peer-a/1.0.1/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/peer-a", + "version": "1.0.1" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/peer-b/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/peer-b/1.0.0/package.json new file mode 100644 index 0000000000..59352176be --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/peer-b/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/peer-b", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/peer-c/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/peer-c/1.0.0/package.json new file mode 100644 index 0000000000..a4b0299d9d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/peer-c/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/peer-c", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/peer-c/1.0.1/package.json b/registry/.fixtures/packages/@pnpm.e2e/peer-c/1.0.1/package.json new file mode 100644 index 0000000000..fcd017e44e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/peer-c/1.0.1/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/peer-c", + "version": "1.0.1" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/peer-c/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/peer-c/2.0.0/package.json new file mode 100644 index 0000000000..714e357f84 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/peer-c/2.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/peer-c", + "version": "2.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/peer-deps-in-child-pkg/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/peer-deps-in-child-pkg/1.0.0/package.json new file mode 100644 index 0000000000..d65b5feb38 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/peer-deps-in-child-pkg/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/peer-deps-in-child-pkg", + "version": "1.0.0", + "peerDependencies": { + "is-negative": "2.x.x" + }, + "dependencies": { + "is-negative": "kevva/is-negative#2.1.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/peer-of-itself/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/peer-of-itself/1.0.0/package.json new file mode 100644 index 0000000000..3488a1e8e3 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/peer-of-itself/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/peer-of-itself", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/peer-of-itself": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/peer-with-bin/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/peer-with-bin/1.0.0/index.js new file mode 100644 index 0000000000..35d71021e1 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/peer-with-bin/1.0.0/index.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log('Hello world!') diff --git a/registry/.fixtures/packages/@pnpm.e2e/peer-with-bin/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/peer-with-bin/1.0.0/package.json new file mode 100644 index 0000000000..1a264d3b65 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/peer-with-bin/1.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@pnpm.e2e/peer-with-bin", + "version": "1.0.0", + "bin": "./index.js" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-a/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-a/1.0.0/package.json new file mode 100644 index 0000000000..5fdc050238 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-a/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/pkg-a", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-b/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-b/1.0.0/package.json new file mode 100644 index 0000000000..4179ad098c --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-b/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/pkg-b", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-c/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-c/1.0.0/package.json new file mode 100644 index 0000000000..167bdc0d73 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-c/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/pkg-c", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-d/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-d/1.0.0/package.json new file mode 100644 index 0000000000..1bc679b4e6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-d/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/pkg-d", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-that-calls-unlisted-dep-in-hooks/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-calls-unlisted-dep-in-hooks/1.0.0/package.json new file mode 100644 index 0000000000..d2629f2635 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-calls-unlisted-dep-in-hooks/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/pkg-that-calls-unlisted-dep-in-hooks", + "version": "1.0.0", + "scripts": { + "postinstall": "node -e \"process.stdout.write('Hello world!')\" | json-append output.json" + }, + "dependencies": { + "@pnpm.e2e/pkg-that-depends-on-json-append": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-that-depends-on-json-append/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-depends-on-json-append/1.0.0/package.json new file mode 100644 index 0000000000..46d92f9d86 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-depends-on-json-append/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/pkg-that-depends-on-json-append", + "version": "1.0.0", + "dependencies": { + "json-append": "^1.1.1" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-that-installs-slowly/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-installs-slowly/1.0.0/package.json new file mode 100644 index 0000000000..400af6354d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-installs-slowly/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/pkg-that-installs-slowly", + "version": "1.0.0", + "scripts": { + "postinstall": "node postinstall.js" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-that-installs-slowly/1.0.0/postinstall.js b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-installs-slowly/1.0.0/postinstall.js new file mode 100644 index 0000000000..0a8e17c5db --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-installs-slowly/1.0.0/postinstall.js @@ -0,0 +1,2 @@ +'use strict' +setTimeout(_ => _, 2000) diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-that-uses-plugins/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-uses-plugins/1.0.0/index.js new file mode 100644 index 0000000000..9034eaa395 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-uses-plugins/1.0.0/index.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node +'use strict' +console.log('My plugin is', require('@pnpm.e2e/plugin-example/package.json').name) diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-that-uses-plugins/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-uses-plugins/1.0.0/package.json new file mode 100644 index 0000000000..da73857799 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-that-uses-plugins/1.0.0/package.json @@ -0,0 +1,11 @@ +{ + "name": "@pnpm.e2e/pkg-that-uses-plugins", + "version": "1.0.0", + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "bin": "./index.js", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/pkg-that-uses-plugins" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-aliased-dep/100.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-aliased-dep/100.0.0/index.js new file mode 100644 index 0000000000..bb87882f55 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-aliased-dep/100.0.0/index.js @@ -0,0 +1 @@ +module.exports = require('dep') diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-aliased-dep/100.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-aliased-dep/100.0.0/package.json new file mode 100644 index 0000000000..8b82c4a10e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-aliased-dep/100.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/pkg-with-1-aliased-dep", + "version": "100.0.0", + "dependencies": { + "dep": "npm:@pnpm.e2e/dep-of-pkg-with-1-dep@^100.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.0.0/index.js new file mode 100644 index 0000000000..2cc4f9cb7c --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.0.0/index.js @@ -0,0 +1 @@ +module.exports = require('@pnpm.e2e/dep-of-pkg-with-1-dep') diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.0.0/package.json new file mode 100644 index 0000000000..ffdcefe8f8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/pkg-with-1-dep", + "version": "100.0.0", + "dependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "^100.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.1.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.1.0/index.js new file mode 100644 index 0000000000..2cc4f9cb7c --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.1.0/index.js @@ -0,0 +1 @@ +module.exports = require('@pnpm.e2e/dep-of-pkg-with-1-dep') diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.1.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.1.0/package.json new file mode 100644 index 0000000000..692cc7bf09 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-1-dep/100.1.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/pkg-with-1-dep", + "version": "100.1.0", + "dependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "^100.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-accidentally-published-catalog-protocol/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-accidentally-published-catalog-protocol/1.0.0/package.json new file mode 100644 index 0000000000..dc69d02a7d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-accidentally-published-catalog-protocol/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/pkg-with-accidentally-published-catalog-protocol", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/hello-world-js-bin": "catalog:foo" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-false/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-false/1.0.0/package.json new file mode 100644 index 0000000000..1c769fe1b8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-false/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/pkg-with-bundle-dependencies-false", + "version": "1.0.0", + "bundleDependencies": false, + "dependencies": { + "@pnpm.e2e/hello-world-js-bin": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-false/1.0.0/pnpm-workspace.yaml b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-false/1.0.0/pnpm-workspace.yaml new file mode 100644 index 0000000000..babe9e50da --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-false/1.0.0/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +minimumReleaseAge: 0 +nodeLinker: hoisted diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-true/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-true/1.0.0/package.json new file mode 100644 index 0000000000..ddc038c50d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-true/1.0.0/package.json @@ -0,0 +1,11 @@ +{ + "name": "@pnpm.e2e/pkg-with-bundle-dependencies-true", + "version": "1.0.0", + "bundleDependencies": true, + "scripts": { + "prepublishOnly": "pnpm install --ignore-scripts --no-lockfile --node-linker=hoisted" + }, + "dependencies": { + "@pnpm.e2e/hello-world-js-bin": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-true/1.0.0/pnpm-workspace.yaml b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-true/1.0.0/pnpm-workspace.yaml new file mode 100644 index 0000000000..babe9e50da --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies-true/1.0.0/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +minimumReleaseAge: 0 +nodeLinker: hoisted diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies/1.0.0/package.json new file mode 100644 index 0000000000..1a98655491 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies/1.0.0/package.json @@ -0,0 +1,13 @@ +{ + "name": "@pnpm.e2e/pkg-with-bundle-dependencies", + "version": "1.0.0", + "scripts": { + "prepublishOnly": "pnpm install --ignore-scripts --node-linker=hoisted --no-lockfile" + }, + "bundleDependencies": [ + "@pnpm.e2e/hello-world-js-bin" + ], + "dependencies": { + "@pnpm.e2e/hello-world-js-bin": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies/1.0.0/pnpm-workspace.yaml b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies/1.0.0/pnpm-workspace.yaml new file mode 100644 index 0000000000..babe9e50da --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundle-dependencies/1.0.0/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +minimumReleaseAge: 0 +nodeLinker: hoisted diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundled-dependencies/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundled-dependencies/1.0.0/package.json new file mode 100644 index 0000000000..70900859d6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundled-dependencies/1.0.0/package.json @@ -0,0 +1,13 @@ +{ + "name": "@pnpm.e2e/pkg-with-bundled-dependencies", + "version": "1.0.0", + "scripts": { + "prepublishOnly": "pnpm install --ignore-scripts --node-linker=hoisted --no-lockfile" + }, + "bundledDependencies": [ + "@pnpm.e2e/hello-world-js-bin" + ], + "dependencies": { + "@pnpm.e2e/hello-world-js-bin": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundled-dependencies/1.0.0/pnpm-workspace.yaml b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundled-dependencies/1.0.0/pnpm-workspace.yaml new file mode 100644 index 0000000000..babe9e50da --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-bundled-dependencies/1.0.0/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +minimumReleaseAge: 0 +nodeLinker: hoisted diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-directories-bin/1.0.0/bin/pkg-with-directories-bin b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-directories-bin/1.0.0/bin/pkg-with-directories-bin new file mode 100644 index 0000000000..35d71021e1 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-directories-bin/1.0.0/bin/pkg-with-directories-bin @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log('Hello world!') diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-directories-bin/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-directories-bin/1.0.0/package.json new file mode 100644 index 0000000000..8e8cd8a2e6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-directories-bin/1.0.0/package.json @@ -0,0 +1,14 @@ +{ + "name": "@pnpm.e2e/pkg-with-directories-bin", + "version": "1.0.0", + "description": "A package with a bin specified in the directories property", + "directories": { + "bin": "./bin" + }, + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm-registry-mock/tree/master/test/packages/pkg-with-directories-bin" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-duplicated-dep/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-duplicated-dep/1.0.0/index.js new file mode 100644 index 0000000000..42ed3b86b6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-duplicated-dep/1.0.0/index.js @@ -0,0 +1 @@ +module.exports = require('dep-of-pkg-with-1-dep') diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-duplicated-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-duplicated-dep/1.0.0/package.json new file mode 100644 index 0000000000..4f508d9ab6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-duplicated-dep/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/pkg-with-duplicated-dep", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "100.0.0" + }, + "devDependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "100.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/.gitignore b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/.gitignore new file mode 100644 index 0000000000..3a9d7537ee --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/.gitignore @@ -0,0 +1 @@ +generated-by-*.js diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/.npmignore b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/.npmignore new file mode 100644 index 0000000000..3a9d7537ee --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/.npmignore @@ -0,0 +1 @@ +generated-by-*.js diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/README.md b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/README.md new file mode 100644 index 0000000000..9486673a6e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/README.md @@ -0,0 +1,13 @@ +# pre-and-postinstall-scripts-example + +A package that creates files by pre- and postinstall scripts + +## Installation + +``` +npm i pre-and-postinstall-scripts-example +``` + +# License + +MIT diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/create.js b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/create.js new file mode 100644 index 0000000000..f6e86da695 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/create.js @@ -0,0 +1,4 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync(process.argv[2] + '.js', 'module.exports = function () {}\n', 'utf8') diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/package.json new file mode 100644 index 0000000000..4c16e7cfb4 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-events-and-peers/1.0.0/package.json @@ -0,0 +1,22 @@ +{ + "name": "@pnpm.e2e/pkg-with-events-and-peers", + "version": "1.0.0", + "description": "A package that creates files by pre- and postinstall scripts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "preinstall": "hello-world-js-bin && node create generated-by-preinstall", + "postinstall": "hello-world-js-bin && node create generated-by-postinstall" + }, + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/postinstall-example" + }, + "dependencies": { + "@pnpm.e2e/hello-world-js-bin": "1.0.0" + }, + "peerDependencies": { + "@pnpm.e2e/peer-c": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-failing-optional-dependency/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-failing-optional-dependency/1.0.0/package.json new file mode 100644 index 0000000000..68741ee320 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-failing-optional-dependency/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/pkg-with-failing-optional-dependency", + "version": "1.0.0", + "optionalDependencies": { + "@pnpm.e2e/pkg-with-failing-postinstall": "1.0.0" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-failing-optional-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-failing-optional-peer/1.0.0/package.json new file mode 100644 index 0000000000..1740b1911e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-failing-optional-peer/1.0.0/package.json @@ -0,0 +1,12 @@ +{ + "name": "@pnpm.e2e/pkg-with-failing-optional-peer", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/pkg-with-failing-postinstall": "*" + }, + "peerDependenciesMeta": { + "@pnpm.e2e/pkg-with-failing-postinstall": { + "optional": true + } + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-failing-postinstall/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-failing-postinstall/1.0.0/package.json new file mode 100644 index 0000000000..f5632d3d9a --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-failing-postinstall/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/pkg-with-failing-postinstall", + "version": "1.0.0", + "scripts": { + "postinstall": "node this-does-not-exist.js" + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-good-optional/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-good-optional/1.0.0/package.json new file mode 100644 index 0000000000..168368e483 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-good-optional/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/pkg-with-good-optional", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "*" + }, + "optionalDependencies": { + "is-positive": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-optional/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-optional/1.0.0/package.json new file mode 100644 index 0000000000..38ffcec1ba --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-optional/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/pkg-with-optional", + "version": "1.0.0", + "optionalDependencies": { + "@pnpm.e2e/not-compatible-with-any-os": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-peer-having-bin/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-peer-having-bin/1.0.0/package.json new file mode 100644 index 0000000000..77fc16f834 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-peer-having-bin/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/pkg-with-peer-having-bin", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/peer-with-bin": "^1.0.0" + }, + "dependencies": { + "@pnpm.e2e/hello-world-js-bin": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-resolved-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-resolved-peer/1.0.0/package.json new file mode 100644 index 0000000000..aee3c87f12 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-resolved-peer/1.0.0/package.json @@ -0,0 +1,14 @@ +{ + "name": "@pnpm.e2e/pkg-with-resolved-peer", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/peer-b": "*", + "@pnpm.e2e/peer-c": "*" + }, + "dependencies": { + "@pnpm.e2e/peer-c": "^1.0.0" + }, + "optionalDependencies": { + "@pnpm.e2e/peer-b": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pkg-with-tarball-dep-from-registry/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-tarball-dep-from-registry/1.0.0/package.json new file mode 100644 index 0000000000..79ccb6af44 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pkg-with-tarball-dep-from-registry/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/pkg-with-tarball-dep-from-registry", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/dep-of-pkg-with-1-dep": "http://localhost:7769/@pnpm.e2e/dep-of-pkg-with-1-dep/-/dep-of-pkg-with-1-dep-100.0.0.tgz" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/plugin-example/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/plugin-example/1.0.0/package.json new file mode 100644 index 0000000000..9f03bda075 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/plugin-example/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/plugin-example", + "version": "1.0.0", + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/plugin-example" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/postinstall-calls-pnpm/1.0.0/create-file.js b/registry/.fixtures/packages/@pnpm.e2e/postinstall-calls-pnpm/1.0.0/create-file.js new file mode 100644 index 0000000000..321a3092a8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/postinstall-calls-pnpm/1.0.0/create-file.js @@ -0,0 +1,4 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync('created-by-postinstall', '', 'utf8') diff --git a/registry/.fixtures/packages/@pnpm.e2e/postinstall-calls-pnpm/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/postinstall-calls-pnpm/1.0.0/package.json new file mode 100644 index 0000000000..358867a300 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/postinstall-calls-pnpm/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/postinstall-calls-pnpm", + "version": "1.0.0", + "scripts": { + "postinstall": "$npm_execpath run create-file", + "create-file": "node create-file" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/postinstall-requires-is-positive/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/postinstall-requires-is-positive/1.0.0/package.json new file mode 100644 index 0000000000..b5a12f2c84 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/postinstall-requires-is-positive/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/postinstall-requires-is-positive", + "version": "1.0.0", + "scripts": { + "postinstall": "node postinstall.js" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/postinstall-requires-is-positive/1.0.0/postinstall.js b/registry/.fixtures/packages/@pnpm.e2e/postinstall-requires-is-positive/1.0.0/postinstall.js new file mode 100644 index 0000000000..3ca8c8f3a4 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/postinstall-requires-is-positive/1.0.0/postinstall.js @@ -0,0 +1 @@ +require('is-positive') diff --git a/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/.gitignore b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/.gitignore new file mode 100644 index 0000000000..3a9d7537ee --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/.gitignore @@ -0,0 +1 @@ +generated-by-*.js diff --git a/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/.npmignore b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/.npmignore new file mode 100644 index 0000000000..3a9d7537ee --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/.npmignore @@ -0,0 +1 @@ +generated-by-*.js diff --git a/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/README.md b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/README.md new file mode 100644 index 0000000000..9486673a6e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/README.md @@ -0,0 +1,13 @@ +# pre-and-postinstall-scripts-example + +A package that creates files by pre- and postinstall scripts + +## Installation + +``` +npm i pre-and-postinstall-scripts-example +``` + +# License + +MIT diff --git a/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/create.js b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/create.js new file mode 100644 index 0000000000..f6e86da695 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/create.js @@ -0,0 +1,4 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync(process.argv[2] + '.js', 'module.exports = function () {}\n', 'utf8') diff --git a/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/package.json new file mode 100644 index 0000000000..df6f3ca701 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/1.0.0/package.json @@ -0,0 +1,20 @@ +{ + "name": "@pnpm.e2e/pre-and-postinstall-scripts-example", + "version": "1.0.0", + "description": "A package that creates files by pre- and postinstall scripts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "prepare": "node create generated-by-prepare", + "preinstall": "hello-world-js-bin && node create generated-by-preinstall", + "install": "echo Hi", + "postinstall": "hello-world-js-bin && node create generated-by-postinstall" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/postinstall-example" + }, + "dependencies": { + "@pnpm.e2e/hello-world-js-bin": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/.gitignore b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/.gitignore new file mode 100644 index 0000000000..3a9d7537ee --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/.gitignore @@ -0,0 +1 @@ +generated-by-*.js diff --git a/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/.npmignore b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/.npmignore new file mode 100644 index 0000000000..3a9d7537ee --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/.npmignore @@ -0,0 +1 @@ +generated-by-*.js diff --git a/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/README.md b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/README.md new file mode 100644 index 0000000000..9486673a6e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/README.md @@ -0,0 +1,13 @@ +# pre-and-postinstall-scripts-example + +A package that creates files by pre- and postinstall scripts + +## Installation + +``` +npm i pre-and-postinstall-scripts-example +``` + +# License + +MIT diff --git a/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/create.js b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/create.js new file mode 100644 index 0000000000..f6e86da695 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/create.js @@ -0,0 +1,4 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync(process.argv[2] + '.js', 'module.exports = function () {}\n', 'utf8') diff --git a/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/package.json new file mode 100644 index 0000000000..007a0e45f3 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/pre-and-postinstall-scripts-example/2.0.0/package.json @@ -0,0 +1,20 @@ +{ + "name": "@pnpm.e2e/pre-and-postinstall-scripts-example", + "version": "2.0.0", + "description": "A package that creates files by pre- and postinstall scripts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "prepare": "node create generated-by-prepare", + "preinstall": "hello-world-js-bin && node create generated-by-preinstall", + "install": "echo Hi", + "postinstall": "hello-world-js-bin && node create generated-by-postinstall" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/postinstall-example" + }, + "dependencies": { + "@pnpm.e2e/hello-world-js-bin": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/print-node-info/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/print-node-info/1.0.0/index.js new file mode 100755 index 0000000000..a0908608d8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/print-node-info/1.0.0/index.js @@ -0,0 +1,6 @@ +#! /usr/bin/env node +const nodeInfo = { + execPath: process.execPath, + versions: process.versions, +} +console.log(JSON.stringify(nodeInfo, undefined, 2)) diff --git a/registry/.fixtures/packages/@pnpm.e2e/print-node-info/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/print-node-info/1.0.0/package.json new file mode 100644 index 0000000000..0a670591ec --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/print-node-info/1.0.0/package.json @@ -0,0 +1,6 @@ +{ + "name": "@pnpm.e2e/print-node-info", + "version": "1.0.0", + "main": "index.js", + "bin": "index.js" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/print-version/1.0.0/bin.js b/registry/.fixtures/packages/@pnpm.e2e/print-version/1.0.0/bin.js new file mode 100644 index 0000000000..68e8997dd0 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/print-version/1.0.0/bin.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log(require('./package.json').version) diff --git a/registry/.fixtures/packages/@pnpm.e2e/print-version/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/print-version/1.0.0/package.json new file mode 100644 index 0000000000..e324e24b1f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/print-version/1.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@pnpm.e2e/print-version", + "version": "1.0.0", + "bin": "bin.js" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/print-version/2.0.0/bin.js b/registry/.fixtures/packages/@pnpm.e2e/print-version/2.0.0/bin.js new file mode 100644 index 0000000000..68e8997dd0 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/print-version/2.0.0/bin.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log(require('./package.json').version) diff --git a/registry/.fixtures/packages/@pnpm.e2e/print-version/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/print-version/2.0.0/package.json new file mode 100644 index 0000000000..24289e40eb --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/print-version/2.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@pnpm.e2e/print-version", + "version": "2.0.0", + "bin": "bin.js" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/qar/100.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/qar/100.0.0/package.json new file mode 100644 index 0000000000..00d49e3eec --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/qar/100.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/qar", + "version": "100.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/qar/100.1.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/qar/100.1.0/package.json new file mode 100644 index 0000000000..aaa51c2e90 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/qar/100.1.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/qar", + "version": "100.1.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/recursive-with-optional-peer/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/recursive-with-optional-peer/1.0.0/package.json new file mode 100644 index 0000000000..94e07795de --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/recursive-with-optional-peer/1.0.0/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pnpm.e2e/recursive-with-optional-peer", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/dep-of-recursive-with-optional-peer": "1.0.0" + }, + "peerDependencies": { + "@pnpm.e2e/peer-a": "*" + }, + "peerDependenciesMeta": { + "@pnpm.e2e/peer-a": { + "optional": true + } + } +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.a/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.a/1.0.0/package.json new file mode 100644 index 0000000000..a8422d3108 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.a/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/repeat-peers.a", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/repeat-peers.b": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.a/2.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.a/2.0.0/package.json new file mode 100644 index 0000000000..a3a30ffc82 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.a/2.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/repeat-peers.a", + "version": "2.0.0", + "dependencies": { + "@pnpm.e2e/repeat-peers.b": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.b/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.b/1.0.0/package.json new file mode 100644 index 0000000000..2a4a7288e5 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.b/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/repeat-peers.b", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/repeat-peers.c": "1.0.0" + }, + "peerDependencies": { + "@pnpm.e2e/repeat-peers.a": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.c/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.c/1.0.0/package.json new file mode 100644 index 0000000000..765721daf0 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.c/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/repeat-peers.c", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/repeat-peers.d": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.d/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.d/1.0.0/package.json new file mode 100644 index 0000000000..4b163a50d6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.d/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/repeat-peers.d", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/repeat-peers.b": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.x/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.x/1.0.0/package.json new file mode 100644 index 0000000000..b0ceb30a57 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/repeat-peers.x/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/repeat-peers.x", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/repeat-peers.a": "2.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/requires-any-foo/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/requires-any-foo/1.0.0/package.json new file mode 100644 index 0000000000..9e4965ae68 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/requires-any-foo/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/requires-any-foo", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/foo": "*" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/requires-chalk-530/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/requires-chalk-530/1.0.0/package.json new file mode 100644 index 0000000000..4029f1b244 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/requires-chalk-530/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/requires-chalk-530", + "version": "1.0.0", + "dependencies": { + "chalk": "=5.3.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/requires-itself/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/requires-itself/1.0.0/package.json new file mode 100644 index 0000000000..72a98be10e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/requires-itself/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/requires-itself", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/requires-itself": "1.0.0", + "is-positive": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/romeo-dep/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/romeo-dep/1.0.0/package.json new file mode 100644 index 0000000000..cce5a289c6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/romeo-dep/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/romeo-dep", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/romeo-dep/1.1.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/romeo-dep/1.1.0/package.json new file mode 100644 index 0000000000..6e78b8428c --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/romeo-dep/1.1.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/romeo-dep", + "version": "1.1.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/romeo/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/romeo/1.0.0/package.json new file mode 100644 index 0000000000..621a0253b5 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/romeo/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/romeo", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/romeo-dep": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/runs-own-bin/1.0.0/bin.js b/registry/.fixtures/packages/@pnpm.e2e/runs-own-bin/1.0.0/bin.js new file mode 100644 index 0000000000..d78908a248 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/runs-own-bin/1.0.0/bin.js @@ -0,0 +1 @@ +console.log('Hello world') diff --git a/registry/.fixtures/packages/@pnpm.e2e/runs-own-bin/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/runs-own-bin/1.0.0/package.json new file mode 100644 index 0000000000..da97752ecb --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/runs-own-bin/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/runs-own-bin", + "version": "1.0.0", + "bin": "bin.js", + "scripts": { + "postinstall": "runs-own-bin" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/self-file-reference/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/self-file-reference/1.0.0/package.json new file mode 100644 index 0000000000..5448935a89 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/self-file-reference/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/self-file-reference", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/self-file-reference": "link:." + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/self-link-reference/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/self-link-reference/1.0.0/package.json new file mode 100644 index 0000000000..aaa2c24a81 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/self-link-reference/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/self-link-reference", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/self-link-reference": "link:." + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/sh-hello-world/1.0.1/package.json b/registry/.fixtures/packages/@pnpm.e2e/sh-hello-world/1.0.1/package.json new file mode 100644 index 0000000000..c3c9e11f09 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/sh-hello-world/1.0.1/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pnpm.e2e/sh-hello-world", + "version": "1.0.1", + "description": "A package with a hello world bash script", + "bin": "./sh-hello-world.sh", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/sh-hello-world" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/sh-hello-world/1.0.1/sh-hello-world.sh b/registry/.fixtures/packages/@pnpm.e2e/sh-hello-world/1.0.1/sh-hello-world.sh new file mode 100755 index 0000000000..9f3f770bfc --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/sh-hello-world/1.0.1/sh-hello-world.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "Hello, world!" diff --git a/registry/.fixtures/packages/@pnpm.e2e/shell-mock/0.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/shell-mock/0.0.0/index.js new file mode 100644 index 0000000000..a1ebcc36e8 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/shell-mock/0.0.0/index.js @@ -0,0 +1,3 @@ +const fs = require('fs') + +fs.writeFileSync('shell-input.json', JSON.stringify(process.argv.slice(2))) diff --git a/registry/.fixtures/packages/@pnpm.e2e/shell-mock/0.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/shell-mock/0.0.0/package.json new file mode 100644 index 0000000000..d640894167 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/shell-mock/0.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@pnpm.e2e/shell-mock", + "version": "0.0.0", + "bin": "index.js" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/support-different-architectures/1.0.0/bin/get-optional-dependencies.js b/registry/.fixtures/packages/@pnpm.e2e/support-different-architectures/1.0.0/bin/get-optional-dependencies.js new file mode 100755 index 0000000000..65d440b008 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/support-different-architectures/1.0.0/bin/get-optional-dependencies.js @@ -0,0 +1,5 @@ +#! /usr/bin/env node +const { getOptionalDependencies } = require('../index.js') +const object = getOptionalDependencies() +const json = JSON.stringify(object, undefined, 2) +console.log(json) diff --git a/registry/.fixtures/packages/@pnpm.e2e/support-different-architectures/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/support-different-architectures/1.0.0/index.js new file mode 100644 index 0000000000..6c80efc26b --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/support-different-architectures/1.0.0/index.js @@ -0,0 +1,31 @@ +// @ts-check + +function getOptionalDependencies () { + const { optionalDependencies } = require('./package.json') + + /** @type {Record} */ + const installed = {} + + /** @type {string[]} */ + const notInstalled = [] + + for (const packageName in optionalDependencies) { + try { + installed[packageName] = require(`${packageName}/package.json`) + } catch (error) { + if (error.code === 'MODULE_NOT_FOUND') { + notInstalled.push(packageName) + } else { + throw error + } + } + } + + notInstalled.sort() + + return { installed, notInstalled } +} + +module.exports = { + getOptionalDependencies, +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/support-different-architectures/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/support-different-architectures/1.0.0/package.json new file mode 100644 index 0000000000..8412e940c6 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/support-different-architectures/1.0.0/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pnpm.e2e/support-different-architectures", + "version": "1.0.0", + "index": "index.js", + "bin": { + "get-optional-dependencies": "bin/get-optional-dependencies.js" + }, + "optionalDependencies": { + "@pnpm.e2e/only-darwin-arm64": "1.0.0", + "@pnpm.e2e/only-darwin-x64": "1.0.0", + "@pnpm.e2e/only-linux-arm64-glibc": "1.0.0", + "@pnpm.e2e/only-linux-arm64-musl": "1.0.0", + "@pnpm.e2e/only-linux-x64-glibc": "1.0.0", + "@pnpm.e2e/only-linux-x64-musl": "1.0.0", + "@pnpm.e2e/only-win32-arm64": "1.0.0", + "@pnpm.e2e/only-win32-x64": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/symlinks-preserved/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/symlinks-preserved/1.0.0/index.js new file mode 100644 index 0000000000..1713f603ab --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/symlinks-preserved/1.0.0/index.js @@ -0,0 +1,4 @@ +'use strict' +const fs = require('fs') + +module.exports = fs.realpathSync(__filename) !== __filename diff --git a/registry/.fixtures/packages/@pnpm.e2e/symlinks-preserved/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/symlinks-preserved/1.0.0/package.json new file mode 100644 index 0000000000..ab0359075b --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/symlinks-preserved/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/symlinks-preserved", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/tango-tango/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/tango-tango/1.0.0/package.json new file mode 100644 index 0000000000..0f767dc9a7 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/tango-tango/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/tango-tango", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/has-tango-as-peer-dep": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/tango/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/tango/1.0.0/package.json new file mode 100644 index 0000000000..292f912d90 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/tango/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/tango", + "version": "1.0.0", + "dependencies": { + "@pnpm.e2e/has-tango-as-peer-dep": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/test-pnpm-issue219/1.0.3/index.js b/registry/.fixtures/packages/@pnpm.e2e/test-pnpm-issue219/1.0.3/index.js new file mode 100644 index 0000000000..6819a2c83d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/test-pnpm-issue219/1.0.3/index.js @@ -0,0 +1 @@ +module.exports = 'test-pnpm-issue219,' + require('@zkochan/test-pnpm-issue219') diff --git a/registry/.fixtures/packages/@pnpm.e2e/test-pnpm-issue219/1.0.3/package.json b/registry/.fixtures/packages/@pnpm.e2e/test-pnpm-issue219/1.0.3/package.json new file mode 100644 index 0000000000..c2913eb42f --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/test-pnpm-issue219/1.0.3/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pnpm.e2e/test-pnpm-issue219", + "version": "1.0.3", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "dependencies": { + "@zkochan/test-pnpm-issue219": "^1.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/test-pnpm-issue219" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/test-pnpm-peer-deps/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/test-pnpm-peer-deps/1.0.0/package.json new file mode 100644 index 0000000000..514b32fe32 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/test-pnpm-peer-deps/1.0.0/package.json @@ -0,0 +1,11 @@ +{ + "name": "@pnpm.e2e/test-pnpm-peer-deps", + "version": "1.0.0", + "peerDependencies": { + "is-negative": "2.x.x" + }, + "dependencies": { + "is-negative": "2.0.0", + "@pnpm.e2e/peer-deps-in-child-pkg": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/touch-file-good-bin-name/1.0.0/cli.js b/registry/.fixtures/packages/@pnpm.e2e/touch-file-good-bin-name/1.0.0/cli.js new file mode 100644 index 0000000000..780d9195ef --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/touch-file-good-bin-name/1.0.0/cli.js @@ -0,0 +1,5 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync('touch.txt', 'hello world', 'utf8') + diff --git a/registry/.fixtures/packages/@pnpm.e2e/touch-file-good-bin-name/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/touch-file-good-bin-name/1.0.0/package.json new file mode 100644 index 0000000000..c3a03a7089 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/touch-file-good-bin-name/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/touch-file-good-bin-name", + "version": "1.0.0", + "bin": { + "touch-file-good-bin-name": "cli.js", + "tt": "cli.js" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/touch-file-many-bins/1.0.0/cli.js b/registry/.fixtures/packages/@pnpm.e2e/touch-file-many-bins/1.0.0/cli.js new file mode 100644 index 0000000000..780d9195ef --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/touch-file-many-bins/1.0.0/cli.js @@ -0,0 +1,5 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync('touch.txt', 'hello world', 'utf8') + diff --git a/registry/.fixtures/packages/@pnpm.e2e/touch-file-many-bins/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/touch-file-many-bins/1.0.0/package.json new file mode 100644 index 0000000000..8769b47b9c --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/touch-file-many-bins/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/touch-file-many-bins", + "version": "1.0.0", + "bin": { + "t": "cli.js", + "tt": "cli.js" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/touch-file-one-bin/1.0.0/cli.js b/registry/.fixtures/packages/@pnpm.e2e/touch-file-one-bin/1.0.0/cli.js new file mode 100644 index 0000000000..780d9195ef --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/touch-file-one-bin/1.0.0/cli.js @@ -0,0 +1,5 @@ +'use strict' +const fs = require('fs') + +fs.writeFileSync('touch.txt', 'hello world', 'utf8') + diff --git a/registry/.fixtures/packages/@pnpm.e2e/touch-file-one-bin/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/touch-file-one-bin/1.0.0/package.json new file mode 100644 index 0000000000..0c1820e5e1 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/touch-file-one-bin/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/touch-file-one-bin", + "version": "1.0.0", + "bin": { + "t": "cli.js" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/update-config-with-catalogs/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/update-config-with-catalogs/1.0.0/package.json new file mode 100644 index 0000000000..0325ae07b9 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/update-config-with-catalogs/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/update-config-with-catalogs", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/update-config-with-catalogs/1.0.0/pnpmfile.cjs b/registry/.fixtures/packages/@pnpm.e2e/update-config-with-catalogs/1.0.0/pnpmfile.cjs new file mode 100644 index 0000000000..45c8153d24 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/update-config-with-catalogs/1.0.0/pnpmfile.cjs @@ -0,0 +1,12 @@ +module.exports = { + hooks: { + updateConfig (config) { + config.catalogs ??= {} + config.catalogs.default ??= {} + config.catalogs.default['@pnpm.e2e/foo'] = '100.0.0' + config.catalogs.bar ??= {} + config.catalogs.bar['@pnpm.e2e/bar'] = '100.0.0' + return config + }, + }, +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/uses-pkg-with-self-usage/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/uses-pkg-with-self-usage/1.0.0/index.js new file mode 100644 index 0000000000..bdeb37008b --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/uses-pkg-with-self-usage/1.0.0/index.js @@ -0,0 +1 @@ +module.exports = require('babel-runtime/regenerator/runtime') diff --git a/registry/.fixtures/packages/@pnpm.e2e/uses-pkg-with-self-usage/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/uses-pkg-with-self-usage/1.0.0/package.json new file mode 100644 index 0000000000..b6c723436a --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/uses-pkg-with-self-usage/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/uses-pkg-with-self-usage", + "version": "1.0.0", + "dependencies": { + "babel-runtime": "5.8.38" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/using-ajv/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/using-ajv/1.0.0/package.json new file mode 100644 index 0000000000..f2d2b79023 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/using-ajv/1.0.0/package.json @@ -0,0 +1,8 @@ +{ + "name": "@pnpm.e2e/using-ajv", + "version": "1.0.0", + "dependencies": { + "ajv": "4.10.4", + "ajv-keywords": "1.5.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/wants-peer-c-1.0.0/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/wants-peer-c-1.0.0/1.0.0/package.json new file mode 100644 index 0000000000..9d1c68bf90 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/wants-peer-c-1.0.0/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/wants-peer-c-1.0.0", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/peer-c": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/wants-peer-c-1/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/wants-peer-c-1/1.0.0/package.json new file mode 100644 index 0000000000..7caa9810f9 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/wants-peer-c-1/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/wants-peer-c-1", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/peer-c": "1" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/wants-peer-c-2/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/wants-peer-c-2/1.0.0/package.json new file mode 100644 index 0000000000..bb8db37be3 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/wants-peer-c-2/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm.e2e/wants-peer-c-2", + "version": "1.0.0", + "peerDependencies": { + "@pnpm.e2e/peer-c": "2" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/windows-x64/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/windows-x64/1.0.0/package.json new file mode 100644 index 0000000000..bfebe196f9 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/windows-x64/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/windows-x64", + "version": "1.0.0", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ] +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@pnpm.e2e/with-postinstall-a/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/with-postinstall-a/1.0.0/package.json new file mode 100644 index 0000000000..9ad56c9052 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/with-postinstall-a/1.0.0/package.json @@ -0,0 +1,11 @@ +{ + "name": "@pnpm.e2e/with-postinstall-a", + "version": "1.0.0", + "dependencies": { + "json-append": "^1.1.1", + "@pnpm.e2e/with-postinstall-b": "^1.0.0" + }, + "scripts": { + "postinstall": "node -e \"process.stdout.write(Number(new Date()).toString())\" | json-append output.json" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/with-postinstall-b/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/with-postinstall-b/1.0.0/package.json new file mode 100644 index 0000000000..c294818f8e --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/with-postinstall-b/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm.e2e/with-postinstall-b", + "version": "1.0.0", + "dependencies": { + "json-append": "^1.1.1" + }, + "scripts": { + "postinstall": "node -e \"process.stdout.write(Number(new Date()).toString())\" | json-append output.json" + } +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/with-same-file-in-different-cases/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/with-same-file-in-different-cases/1.0.0/package.json new file mode 100644 index 0000000000..c0be8ee44c --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/with-same-file-in-different-cases/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm.e2e/with-same-file-in-different-cases", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm.e2e/write-lifecycle-env/1.0.0/index.js b/registry/.fixtures/packages/@pnpm.e2e/write-lifecycle-env/1.0.0/index.js new file mode 100644 index 0000000000..1b9dd3cbc0 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/write-lifecycle-env/1.0.0/index.js @@ -0,0 +1,13 @@ +#!/usr/bin/env node +'use strict' +const fs = require('fs') +const path = require('path') + +const content = JSON.stringify(process.env, null, 2) +const fn = path.resolve('env.json') + +console.log(`Writing ${fn}...`) + +fs.writeFileSync(fn, content, 'utf8') + +console.log(`Writing ${fn}, done`) diff --git a/registry/.fixtures/packages/@pnpm.e2e/write-lifecycle-env/1.0.0/package.json b/registry/.fixtures/packages/@pnpm.e2e/write-lifecycle-env/1.0.0/package.json new file mode 100644 index 0000000000..a0945cdf1d --- /dev/null +++ b/registry/.fixtures/packages/@pnpm.e2e/write-lifecycle-env/1.0.0/package.json @@ -0,0 +1,12 @@ +{ + "name": "@pnpm.e2e/write-lifecycle-env", + "version": "1.0.0", + "description": "Writes process.env to `env.json` during install stage", + "bin": "index.js", + "main": "index.js", + "scripts": { + "install": "node index" + }, + "author": "Zoltan Kochan", + "license": "MIT" +} diff --git a/registry/.fixtures/packages/@pnpm/plugin-pnpmfile/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/plugin-pnpmfile/1.0.0/package.json new file mode 100644 index 0000000000..a722c4b62b --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/plugin-pnpmfile/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm/plugin-pnpmfile", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm/plugin-pnpmfile/1.0.0/pnpmfile.cjs b/registry/.fixtures/packages/@pnpm/plugin-pnpmfile/1.0.0/pnpmfile.cjs new file mode 100644 index 0000000000..0fbf12c4c5 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/plugin-pnpmfile/1.0.0/pnpmfile.cjs @@ -0,0 +1,8 @@ +module.exports = { + hooks: { + updateConfig: (config) => ({ + ...config, + nodeLinker: 'hoisted', + }), + } +} diff --git a/registry/.fixtures/packages/@pnpm/postinstall-modifies-source/1.0.0/empty-file.txt b/registry/.fixtures/packages/@pnpm/postinstall-modifies-source/1.0.0/empty-file.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/registry/.fixtures/packages/@pnpm/postinstall-modifies-source/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/postinstall-modifies-source/1.0.0/package.json new file mode 100644 index 0000000000..de9cc6dd42 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/postinstall-modifies-source/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm/postinstall-modifies-source", + "version": "1.0.0", + "scripts": { + "postinstall": "node postinstall.js" + } +} diff --git a/registry/.fixtures/packages/@pnpm/postinstall-modifies-source/1.0.0/postinstall.js b/registry/.fixtures/packages/@pnpm/postinstall-modifies-source/1.0.0/postinstall.js new file mode 100644 index 0000000000..826c299a02 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/postinstall-modifies-source/1.0.0/postinstall.js @@ -0,0 +1,4 @@ +const fs = require('fs') +const path = require('path') + +fs.appendFileSync(path.join(__dirname, 'empty-file.txt'), 'hello', 'utf8') diff --git a/registry/.fixtures/packages/@pnpm/x/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/x/1.0.0/package.json new file mode 100644 index 0000000000..3ad8f3332a --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/x/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm/x", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm/xyz-parent-parent-parent-parent/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/xyz-parent-parent-parent-parent/1.0.0/package.json new file mode 100644 index 0000000000..4315dc3631 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/xyz-parent-parent-parent-parent/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm/xyz-parent-parent-parent-parent", + "version": "1.0.0", + "dependencies": { + "@pnpm/xyz-parent-parent-parent": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm/xyz-parent-parent-parent/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/xyz-parent-parent-parent/1.0.0/package.json new file mode 100644 index 0000000000..911591ec34 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/xyz-parent-parent-parent/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm/xyz-parent-parent-parent", + "version": "1.0.0", + "dependencies": { + "@pnpm/xyz-parent-parent": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm/xyz-parent-parent-with-xyz/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/xyz-parent-parent-with-xyz/1.0.0/package.json new file mode 100644 index 0000000000..80d8d02a48 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/xyz-parent-parent-with-xyz/1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "@pnpm/xyz-parent-parent-with-xyz", + "version": "1.0.0", + "dependencies": { + "@pnpm/xyz-parent": "1.0.0", + "@pnpm/x": "1.0.0", + "@pnpm/y": "1.0.0", + "@pnpm/z": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm/xyz-parent-parent/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/xyz-parent-parent/1.0.0/package.json new file mode 100644 index 0000000000..6a44e12ece --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/xyz-parent-parent/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm/xyz-parent-parent", + "version": "1.0.0", + "dependencies": { + "@pnpm/xyz-parent": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm/xyz-parent/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/xyz-parent/1.0.0/package.json new file mode 100644 index 0000000000..8324826b38 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/xyz-parent/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@pnpm/xyz-parent", + "version": "1.0.0", + "dependencies": { + "@pnpm/xyz": "1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm/xyz/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/xyz/1.0.0/package.json new file mode 100644 index 0000000000..9b80babb72 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/xyz/1.0.0/package.json @@ -0,0 +1,9 @@ +{ + "name": "@pnpm/xyz", + "version": "1.0.0", + "peerDependencies": { + "@pnpm/x": "^1.0.0", + "@pnpm/y": "^1.0.0", + "@pnpm/z": "^1.0.0" + } +} diff --git a/registry/.fixtures/packages/@pnpm/y/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/y/1.0.0/package.json new file mode 100644 index 0000000000..72ccc8cd3a --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/y/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm/y", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm/y/2.0.0/package.json b/registry/.fixtures/packages/@pnpm/y/2.0.0/package.json new file mode 100644 index 0000000000..cb65cbf4ff --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/y/2.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm/y", + "version": "2.0.0" +} diff --git a/registry/.fixtures/packages/@pnpm/z/1.0.0/package.json b/registry/.fixtures/packages/@pnpm/z/1.0.0/package.json new file mode 100644 index 0000000000..e0cc8594f0 --- /dev/null +++ b/registry/.fixtures/packages/@pnpm/z/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@pnpm/z", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@private/foo/1.0.0/package.json b/registry/.fixtures/packages/@private/foo/1.0.0/package.json new file mode 100644 index 0000000000..9268f91968 --- /dev/null +++ b/registry/.fixtures/packages/@private/foo/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@private/foo", + "version": "1.0.0" +} diff --git a/registry/.fixtures/packages/@scoped/peer/1.0.0/package.json b/registry/.fixtures/packages/@scoped/peer/1.0.0/package.json new file mode 100644 index 0000000000..2f0776d44d --- /dev/null +++ b/registry/.fixtures/packages/@scoped/peer/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@scoped/peer", + "version": "1.0.0" +} \ No newline at end of file diff --git a/registry/.fixtures/packages/@zkochan/test-pnpm-issue219/1.0.2/index.js b/registry/.fixtures/packages/@zkochan/test-pnpm-issue219/1.0.2/index.js new file mode 100644 index 0000000000..be72717577 --- /dev/null +++ b/registry/.fixtures/packages/@zkochan/test-pnpm-issue219/1.0.2/index.js @@ -0,0 +1 @@ +module.exports = '@zkochan/test-pnpm-issue219' diff --git a/registry/.fixtures/packages/@zkochan/test-pnpm-issue219/1.0.2/package.json b/registry/.fixtures/packages/@zkochan/test-pnpm-issue219/1.0.2/package.json new file mode 100644 index 0000000000..63fb65f821 --- /dev/null +++ b/registry/.fixtures/packages/@zkochan/test-pnpm-issue219/1.0.2/package.json @@ -0,0 +1,15 @@ +{ + "name": "@zkochan/test-pnpm-issue219", + "version": "1.0.2", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Zoltan Kochan (http://kochan.io/)", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/pnpm/pnpm/tree/master/test/packages/zkochan~test-pnpm-issue219" + } +} diff --git a/registry/crates/pnpm-registry-fixtures/Cargo.toml b/registry/crates/pnpm-registry-fixtures/Cargo.toml new file mode 100644 index 0000000000..0827cc6ef3 --- /dev/null +++ b/registry/crates/pnpm-registry-fixtures/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "pnpm-registry-fixtures" +version = "0.0.1" +description = "Build static pnpm-registry storage from shared test package fixtures" +publish = false +authors.workspace = true +edition.workspace = true +homepage.workspace = true +keywords.workspace = true +license.workspace = true +repository.workspace = true + +[dependencies] +base64 = { workspace = true } +clap = { workspace = true } +flate2 = { workspace = true } +node-semver = { workspace = true } +serde_json = { workspace = true } +sha2 = { workspace = true } +tar = { workspace = true } +walkdir = { workspace = true } + +[[bin]] +name = "pnpm-registry-prepare" +path = "src/bin/pnpm-registry-prepare.rs" + +[lints] +workspace = true diff --git a/registry/crates/pnpm-registry-fixtures/src/bin/pnpm-registry-prepare.rs b/registry/crates/pnpm-registry-fixtures/src/bin/pnpm-registry-prepare.rs new file mode 100644 index 0000000000..b7fa077159 --- /dev/null +++ b/registry/crates/pnpm-registry-fixtures/src/bin/pnpm-registry-prepare.rs @@ -0,0 +1,25 @@ +use std::path::PathBuf; + +use clap::Parser; +use pnpm_registry_fixtures::build_storage_at; + +/// Build verdaccio-shaped registry storage from raw package fixtures, so the +/// `pnpm-registry` server can serve them. The pnpm test harness runs this +/// before launching the registry; pacquet's Rust tests build the same storage +/// in-process instead. +#[derive(Debug, Parser)] +#[command(name = "pnpm-registry-prepare", version, about)] +struct Args { + /// Directory of raw package fixtures (`//...`). + #[arg(long)] + packages: PathBuf, + + /// Directory to write the generated storage into (cleared first). + #[arg(long)] + out: PathBuf, +} + +fn main() { + let args = Args::parse(); + build_storage_at(&args.packages, &args.out); +} diff --git a/registry/crates/pnpm-registry-fixtures/src/lib.rs b/registry/crates/pnpm-registry-fixtures/src/lib.rs new file mode 100644 index 0000000000..92846e3166 --- /dev/null +++ b/registry/crates/pnpm-registry-fixtures/src/lib.rs @@ -0,0 +1,503 @@ +use base64::{Engine, engine::general_purpose}; +use flate2::{Compression, write::GzEncoder}; +use node_semver::{Range, Version}; +use serde_json::{Map, Value, json}; +use sha2::{Digest, Sha256, Sha512}; +use std::{ + collections::{BTreeMap, HashMap}, + env, fs, io, + io::Write, + path::{Path, PathBuf}, + sync::{ + OnceLock, + atomic::{AtomicU64, Ordering}, + }, +}; +use walkdir::WalkDir; + +const PACKAGES_DIR: &str = "registry/.fixtures/packages"; +const GENERATED_DIR: &str = "pnpm-registry-fixtures"; +const COMPLETE_FILE: &str = ".complete"; +static TEMP_COUNTER: AtomicU64 = AtomicU64::new(0); + +pub fn ensure_storage() -> &'static Path { + static STORAGE: OnceLock = OnceLock::new(); + STORAGE.get_or_init(|| { + let workspace = workspace_root(); + let packages = workspace.join(PACKAGES_DIR); + let generated = target_dir(&workspace).join(GENERATED_DIR); + let fingerprint = fixture_fingerprint(&packages); + let storage = generated.join("storage").join(&fingerprint); + ensure_storage_for_fingerprint(&packages, &generated, &storage); + storage + }) +} + +pub fn packages_dir() -> PathBuf { + workspace_root().join(PACKAGES_DIR) +} + +/// Build verdaccio-shaped storage from the raw package fixtures in `packages` +/// into `out`, replacing any existing contents. Used by the `pnpm-registry-prepare` +/// binary so the JS test harness can serve the moved fixtures; pacquet's own +/// tests use [`ensure_storage`] (process-global, cached) instead. +pub fn build_storage_at(packages: &Path, out: &Path) { + if out.exists() { + fs::remove_dir_all(out).expect("clear existing registry fixture storage"); + } + fs::create_dir_all(out).expect("create registry fixture storage dir"); + build_storage(packages, out); +} + +fn workspace_root() -> PathBuf { + Path::new(env!("CARGO_MANIFEST_DIR")) + .ancestors() + .nth(3) + .expect("registry fixture crate lives under registry/crates") + .to_path_buf() +} + +fn target_dir(workspace: &Path) -> PathBuf { + env::var_os("CARGO_TARGET_DIR").map(PathBuf::from).unwrap_or_else(|| workspace.join("target")) +} + +fn ensure_storage_for_fingerprint(packages: &Path, generated: &Path, storage: &Path) { + if storage.join(COMPLETE_FILE).exists() { + return; + } + fs::create_dir_all(storage.parent().expect("registry fixture storage has parent")) + .expect("create generated registry fixture storage dir"); + let temp = generated.join(format!( + "storage.tmp.{}.{}", + std::process::id(), + TEMP_COUNTER.fetch_add(1, Ordering::Relaxed), + )); + if temp.exists() { + fs::remove_dir_all(&temp).expect("remove stale temp registry fixture storage"); + } + build_storage(packages, &temp); + fs::write(temp.join(COMPLETE_FILE), "").expect("write registry fixture completion marker"); + match fs::rename(&temp, storage) { + Ok(()) => {} + Err(_) if storage.join(COMPLETE_FILE).exists() => { + fs::remove_dir_all(&temp).expect("remove redundant registry fixture storage"); + } + Err(err) => panic!("publish generated registry fixture storage: {err}"), + } +} + +fn fixture_fingerprint(root: &Path) -> String { + let mut hasher = Sha256::new(); + for entry in fixture_files(root) { + let path = entry.path(); + let relative = path.strip_prefix(root).expect("fixture entry under root"); + hasher.update(relative.to_string_lossy().as_bytes()); + hasher.update([0]); + hasher.update(fs::read(path).expect("read registry fixture for fingerprint")); + hasher.update([0]); + } + format!("{:x}", hasher.finalize()) +} + +fn build_storage(fixtures_root: &Path, storage_root: &Path) { + let mut packages: HashMap = HashMap::new(); + for manifest_path in fixture_manifests(fixtures_root) { + let version = PackageVersion::load(fixtures_root, &manifest_path); + packages + .entry(version.name.clone()) + .or_insert_with(|| Package::new(version.name.clone())) + .versions + .insert(version.version.clone(), version); + } + assert!(!packages.is_empty(), "no registry package fixtures found under {fixtures_root:?}"); + for package in packages.values_mut() { + package.latest = + latest_version(package.versions.keys()).expect("package has at least one version"); + package.write(storage_root); + } +} + +struct Package { + name: String, + latest: String, + versions: BTreeMap, +} + +impl Package { + fn new(name: String) -> Self { + Self { name, latest: String::new(), versions: BTreeMap::new() } + } + + fn write(&self, storage_root: &Path) { + let package_dir = storage_root.join(&self.name); + fs::create_dir_all(&package_dir).expect("create test registry package storage dir"); + for version in self.versions.values() { + fs::write(package_dir.join(&version.tarball_name), &version.tarball) + .expect("write fixture tarball to test registry storage"); + } + fs::write( + package_dir.join("package.json"), + serde_json::to_vec(&self.packument()).expect("serialize fixture packument"), + ) + .expect("write fixture packument to test registry storage"); + } + + fn packument(&self) -> Value { + let versions = self + .versions + .iter() + .map(|(version, package)| (version.clone(), package.packument_manifest.clone())) + .collect(); + json!({ + "name": self.name, + "dist-tags": { "latest": self.latest }, + "versions": Value::Object(versions), + "time": self.times(), + }) + } + + fn times(&self) -> Value { + let mut times = Map::new(); + times.insert("created".to_string(), json!(DEFAULT_PUBLISH_TIME)); + times.insert("modified".to_string(), json!(DEFAULT_PUBLISH_TIME)); + for version in self.versions.keys() { + times.insert(version.clone(), json!(version_publish_time(&self.name, version))); + } + Value::Object(times) + } +} + +// Most fixtures share one old timestamp so `minimumReleaseAge` checks treat them +// as long-published. Packages exercised by time-based resolution tests carry +// distinct per-version times that encode their relative publish order. +const DEFAULT_PUBLISH_TIME: &str = "2022-01-01T00:00:00.000Z"; + +fn version_publish_time(name: &str, version: &str) -> &'static str { + match (name, version) { + ("@pnpm.e2e/bravo", "1.0.0") => "2022-04-01T20:17:46.770Z", + ("@pnpm.e2e/romeo", "1.0.0") => "2022-01-01T20:17:46.770Z", + ("@pnpm.e2e/bravo-dep", "1.0.0") => "2022-02-01T20:17:46.770Z", + ("@pnpm.e2e/bravo-dep", "1.0.1") => "2022-02-22T20:17:46.770Z", + ("@pnpm.e2e/bravo-dep", "1.1.0") => "2022-05-01T20:17:46.770Z", + ("@pnpm.e2e/romeo-dep", "1.0.0") => "2022-03-01T20:17:46.770Z", + ("@pnpm.e2e/romeo-dep", "1.1.0") => "2022-07-01T20:17:46.770Z", + _ => DEFAULT_PUBLISH_TIME, + } +} + +struct PackageVersion { + name: String, + version: String, + packument_manifest: Value, + tarball_name: String, + tarball: Vec, +} + +impl PackageVersion { + fn load(root: &Path, manifest_path: &Path) -> Self { + let package_dir = manifest_path.parent().expect("manifest has parent"); + let manifest_text = fs::read_to_string(manifest_path).expect("read fixture package.json"); + let manifest: Value = + serde_json::from_str(&manifest_text).expect("parse fixture package.json"); + let name = manifest + .get("name") + .and_then(Value::as_str) + .expect("fixture package.json has string name") + .to_string(); + let version = manifest + .get("version") + .and_then(Value::as_str) + .expect("fixture package.json has string version") + .to_string(); + let tarball = build_tarball(root, package_dir, &manifest); + let integrity = + format!("sha512-{}", general_purpose::STANDARD.encode(Sha512::digest(&tarball))); + let tarball_name = format!("{}-{version}.tgz", tarball_basename(&name)); + let tarball_url = format!("http://example.test/{name}/-/{tarball_name}"); + let mut packument_manifest = manifest; + let manifest_object = + packument_manifest.as_object_mut().expect("fixture package.json is an object"); + manifest_object + .insert("dist".to_string(), json!({ "tarball": tarball_url, "integrity": integrity })); + // Verdaccio's abbreviated metadata exposes `bundleDependencies` (no "d"), + // and that is the key pnpm reads, so mirror `bundledDependencies` onto it + // when only the longer spelling is present in the fixture manifest. + if let Some(bundled) = manifest_object.get("bundledDependencies").cloned() { + manifest_object.entry("bundleDependencies").or_insert(bundled); + } + Self { name, version, packument_manifest, tarball_name, tarball } + } +} + +fn fixture_manifests(root: &Path) -> Vec { + fixture_files(root) + .into_iter() + .map(walkdir::DirEntry::into_path) + .filter(|path| { + path.file_name().is_some_and(|name| name == "package.json") + && is_version_dir(path.parent()) + }) + .collect() +} + +// A `package.json` is a package manifest only when it sits directly inside a +// `` directory. Nested manifests (bundled `node_modules`, file +// dependencies like `has-local-dep/local-dep`) are package contents, not +// separate packages. +fn is_version_dir(dir: Option<&Path>) -> bool { + dir.and_then(Path::file_name) + .and_then(|name| name.to_str()) + .is_some_and(|name| Version::parse(name).is_ok()) +} + +fn build_tarball(root: &Path, package_dir: &Path, manifest: &Value) -> Vec { + let name = manifest.get("name").and_then(Value::as_str).unwrap_or_default(); + let gzip = GzEncoder::new(Vec::new(), Compression::default()); + let mut tar = tar::Builder::new(gzip); + for entry in fixture_files(package_dir) { + let relative = entry.path().strip_prefix(package_dir).expect("fixture entry under package"); + let path_in_archive = Path::new("package").join(relative); + let content = fs::read(entry.path()).expect("read fixture file"); + let mode = file_mode(root, entry.path(), &content).expect("read fixture file mode"); + append_file(&mut tar, &path_in_archive, &content, mode); + } + // Files whose names differ only by case cannot coexist in a case-insensitive + // working tree (the default on macOS and Windows), so they are composed into + // the archive here instead of being committed as colliding fixture files. + for (relative, content) in in_memory_files(name) { + let path_in_archive = Path::new("package").join(relative); + append_file(&mut tar, &path_in_archive, content.as_bytes(), 0o644); + } + // pnpm's `publish` copies the workspace-root LICENSE into every package that + // doesn't ship its own; registry-mock published these fixtures that way, so + // reproduce the injected LICENSE here. + if should_inject_root_license(name) && !package_dir.join("LICENSE").exists() { + append_file(&mut tar, Path::new("package/LICENSE"), INJECTED_LICENSE.as_bytes(), 0o644); + } + // `bundleDependencies` packages publish their resolved dependency tree inside + // the tarball's `node_modules`. registry-mock produces this with a + // `prepublishOnly` install; reproduce it here so `node_modules` (gitignored) + // never has to be committed. + for (relative, content, mode) in bundled_node_modules(root, manifest) { + let path_in_archive = Path::new("package").join(relative); + append_file(&mut tar, &path_in_archive, &content, mode); + } + let gzip = tar.into_inner().expect("finish tar archive"); + gzip.finish().expect("finish gzip archive") +} + +const INJECTED_LICENSE: &str = include_str!("../../../../LICENSE"); + +// The bundle-dependency fixtures publish via a `prepublishOnly` install that +// turns each into a self-contained workspace with no root LICENSE to copy, and +// a couple of special fixtures were likewise published without one. Everything +// else receives the injected root LICENSE, matching the registry-mock tarballs. +fn should_inject_root_license(name: &str) -> bool { + !matches!( + name, + "@pnpm.e2e/pkg-with-bundle-dependencies" + | "@pnpm.e2e/pkg-with-bundle-dependencies-true" + | "@pnpm.e2e/pkg-with-bundle-dependencies-false" + | "@pnpm.e2e/pkg-with-bundled-dependencies" + | "@pnpm.e2e/pkg-with-accidentally-published-catalog-protocol", + ) +} + +fn in_memory_files(name: &str) -> &'static [(&'static str, &'static str)] { + match name { + "@pnpm.e2e/with-same-file-in-different-cases" => { + &[("Foo.js", "// Foo.js\n"), ("foo.js", "// foo.js\n")] + } + _ => &[], + } +} + +fn bundled_node_modules(root: &Path, manifest: &Value) -> Vec<(PathBuf, Vec, u32)> { + let mut files = Vec::new(); + for dep in bundled_dependency_names(manifest) { + let spec = manifest + .get("dependencies") + .and_then(|deps| deps.get(&dep)) + .and_then(Value::as_str) + .unwrap_or("*"); + let Some(version) = resolve_fixture_version(root, &dep, spec) else { continue }; + let dep_dir = root.join(&dep).join(&version); + for entry in fixture_files(&dep_dir) { + let relative = entry + .path() + .strip_prefix(&dep_dir) + .expect("bundled dependency entry under dep dir"); + let archive = Path::new("node_modules").join(&dep).join(relative); + let content = fs::read(entry.path()).expect("read bundled dependency file"); + let mode = + file_mode(root, entry.path(), &content).expect("bundled dependency file mode"); + files.push((archive, content, mode)); + } + } + files +} + +fn bundled_dependency_names(manifest: &Value) -> Vec { + let bundled = + manifest.get("bundleDependencies").or_else(|| manifest.get("bundledDependencies")); + match bundled { + Some(Value::Bool(true)) => manifest + .get("dependencies") + .and_then(Value::as_object) + .map(|deps| deps.keys().cloned().collect()) + .unwrap_or_default(), + Some(Value::Array(names)) => { + names.iter().filter_map(|name| name.as_str().map(String::from)).collect() + } + _ => Vec::new(), + } +} + +fn resolve_fixture_version(root: &Path, dep: &str, spec: &str) -> Option { + let range = Range::parse(spec).ok()?; + let mut best: Option<(Version, String)> = None; + for entry in fs::read_dir(root.join(dep)).ok()? { + let raw = entry.ok()?.file_name().to_string_lossy().into_owned(); + let Ok(version) = Version::parse(&raw) else { continue }; + if range.satisfies(&version) && best.as_ref().is_none_or(|(best, _)| version > *best) { + best = Some((version, raw)); + } + } + best.map(|(_, raw)| raw) +} + +fn fixture_files(root: &Path) -> Vec { + let mut entries: Vec<_> = WalkDir::new(root) + .into_iter() + .map(|entry| entry.expect("walk registry package fixtures")) + .filter(|entry| entry.file_type().is_file()) + .collect(); + entries.sort_by(|left, right| left.path().cmp(right.path())); + entries +} + +fn append_file( + tar: &mut tar::Builder, + path_in_archive: &Path, + content: &[u8], + mode: u32, +) { + let mut header = tar::Header::new_gnu(); + header.set_size(content.len() as u64); + header.set_mode(mode); + header.set_cksum(); + tar.append_data(&mut header, path_in_archive, content).expect("append fixture file"); +} + +fn file_mode(root: &Path, source: &Path, content: &[u8]) -> io::Result { + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + let mode = fs::metadata(source)?.permissions().mode() & 0o777; + if mode & 0o111 != 0 { + return Ok(mode); + } + } + let relative = source.strip_prefix(root).expect("fixture source under root"); + if content.starts_with(b"#!") + || relative.components().any(|component| component.as_os_str() == "bin") + { + return Ok(0o755); + } + Ok(0o644) +} + +fn tarball_basename(name: &str) -> String { + name.rsplit('/').next().unwrap_or(name).to_string() +} + +fn latest_version<'a>(versions: impl Iterator) -> Option { + versions + .filter_map(|raw| Version::parse(raw).ok().map(|version| (version, raw.clone()))) + .max_by(|(left, _), (right, _)| left.cmp(right)) + .map(|(_, raw)| raw) +} + +#[cfg(test)] +mod tests { + use super::{ensure_storage, latest_version, packages_dir}; + use std::{collections::BTreeSet, path::Path}; + + fn tarball_entries(tarball: &Path) -> BTreeSet { + let bytes = std::fs::read(tarball).expect("read fixture tarball"); + let mut archive = + tar::Archive::new(flate2::read::GzDecoder::new(std::io::Cursor::new(bytes))); + archive + .entries() + .expect("read tar entries") + .map(|entry| { + entry.expect("read tar entry").path().expect("tar entry path").display().to_string() + }) + .collect() + } + + #[test] + fn latest_version_uses_semver_prerelease_order() { + let versions = + ["1.0.0-beta.2".to_string(), "1.0.0-beta.10".to_string(), "1.0.0".to_string()]; + assert_eq!(latest_version(versions.iter()), Some("1.0.0".to_string())); + } + + #[test] + fn ensure_storage_generates_packuments_and_tarballs() { + let storage = ensure_storage(); + assert!(packages_dir().join("@pnpm.e2e/abc/1.0.0/package.json").exists()); + assert!(storage.join("@pnpm.e2e/abc/package.json").exists()); + assert!(storage.join("@pnpm.e2e/abc/abc-1.0.0.tgz").exists()); + } + + // Both case variants land in the tarball even though a case-insensitive + // working tree cannot hold `Foo.js` and `foo.js` side by side on disk. + #[test] + fn case_colliding_files_are_composed_in_memory() { + let storage = ensure_storage(); + let entries = tarball_entries(&storage.join( + "@pnpm.e2e/with-same-file-in-different-cases/with-same-file-in-different-cases-1.0.0.tgz", + )); + assert!(entries.contains("package/Foo.js"), "{entries:?}"); + assert!(entries.contains("package/foo.js"), "{entries:?}"); + } + + // `bundleDependencies` packages embed the resolved dependency in the + // tarball's `node_modules`, reproduced by the builder so the gitignored + // `node_modules` never needs to be committed. + #[test] + fn bundle_dependencies_embed_node_modules() { + let storage = ensure_storage(); + let bundled = + tarball_entries(&storage.join( + "@pnpm.e2e/pkg-with-bundle-dependencies/pkg-with-bundle-dependencies-1.0.0.tgz", + )); + assert!( + bundled.contains("package/node_modules/@pnpm.e2e/hello-world-js-bin/package.json"), + "{bundled:?}", + ); + + let not_bundled = tarball_entries(&storage.join( + "@pnpm.e2e/pkg-with-bundle-dependencies-false/pkg-with-bundle-dependencies-false-1.0.0.tgz", + )); + assert!( + !not_bundled.iter().any(|entry| entry.contains("node_modules")), + "bundleDependencies:false must not embed node_modules: {not_bundled:?}", + ); + } + + // pnpm publish copies the root LICENSE into each package, except the + // self-contained-workspace fixtures that ship without one. + #[test] + fn root_license_is_injected_except_for_self_contained_workspaces() { + let storage = ensure_storage(); + let abc = tarball_entries(&storage.join("@pnpm.e2e/abc/abc-1.0.0.tgz")); + assert!(abc.contains("package/LICENSE"), "{abc:?}"); + + let bundled = tarball_entries(&storage.join( + "@pnpm.e2e/pkg-with-bundled-dependencies/pkg-with-bundled-dependencies-1.0.0.tgz", + )); + assert!(!bundled.contains("package/LICENSE"), "{bundled:?}"); + } +} diff --git a/registry/crates/pnpm-registry/src/lib.rs b/registry/crates/pnpm-registry/src/lib.rs index 40037e4991..ec48be8680 100644 --- a/registry/crates/pnpm-registry/src/lib.rs +++ b/registry/crates/pnpm-registry/src/lib.rs @@ -26,4 +26,4 @@ pub use config::{ }; pub use error::{RegistryError, Result}; pub use policy::{AccessList, AccessToken, Identity, PackagePolicies, PackagePolicy}; -pub use server::{router, router_with_auth, serve}; +pub use server::{router, router_with_auth, serve, serve_listener}; diff --git a/registry/crates/pnpm-registry/src/main.rs b/registry/crates/pnpm-registry/src/main.rs index 03d5d95e02..effad12190 100644 --- a/registry/crates/pnpm-registry/src/main.rs +++ b/registry/crates/pnpm-registry/src/main.rs @@ -51,6 +51,18 @@ async fn main() -> miette::Result<()> { ) .map_err(|err| miette::miette!("{err}"))?; if let Some(storage) = args.storage { + // The bundled config anchors auth state (htpasswd, tokens.db) next to the + // config, which for the bundled default is the current directory. When a + // caller serves from an explicit --storage dir (tests, benchmarks), keep + // that state inside it so runs never write auth files into the working tree. + if matches!(source, ConfigSource::Bundled) { + if config.auth.htpasswd.file.is_some() { + config.auth.htpasswd.file = Some(storage.join("htpasswd")); + } + if config.auth.tokens.file.is_some() { + config.auth.tokens.file = Some(storage.join("tokens.db")); + } + } config.storage = storage; } if let Some(ttl_secs) = args.packument_ttl_secs { diff --git a/registry/crates/pnpm-registry/src/server.rs b/registry/crates/pnpm-registry/src/server.rs index 0772fd886d..82c895943e 100644 --- a/registry/crates/pnpm-registry/src/server.rs +++ b/registry/crates/pnpm-registry/src/server.rs @@ -148,6 +148,24 @@ pub async fn serve(config: Config) -> crate::error::Result<()> { Ok(()) } +/// Serve on an already-bound listener. +/// +/// Test harnesses can bind to `127.0.0.1:0`, read the OS-assigned +/// address, and then hand that listener here without a bind/drop/rebind +/// race. +pub async fn serve_listener( + config: Config, + listener: tokio::net::TcpListener, +) -> crate::error::Result<()> { + let listen = listener.local_addr()?; + let app = router(config); + tracing::info!(%listen, "pnpm-registry listening"); + axum::serve(NodelayTcpListener(listener), app) + .with_graceful_shutdown(shutdown_signal()) + .await?; + Ok(()) +} + /// Wraps [`tokio::net::TcpListener`] to disable Nagle's algorithm on /// every accepted socket. /// diff --git a/registry/crates/pnpm-registry/tests/auth_publish.rs b/registry/crates/pnpm-registry/tests/auth_publish.rs index d23807513b..fd011c112e 100644 --- a/registry/crates/pnpm-registry/tests/auth_publish.rs +++ b/registry/crates/pnpm-registry/tests/auth_publish.rs @@ -1,7 +1,11 @@ -//! Integration tests for the auth, dist-tag, and publish endpoints -//! added to support migrating `@pnpm/registry-mock` off verdaccio. +//! Integration tests for the auth, dist-tag, and publish endpoints. //! Static-mode (no upstream) to keep the tests hermetic. +// `#[path]` rather than the `tests/common/mod.rs` layout, which the +// Perfectionist dylint forbids. +#[path = "common/storage.rs"] +mod common; + use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4}; use std::path::PathBuf; @@ -95,26 +99,10 @@ async fn adduser_rejects_wrong_password_for_existing_user() { assert_eq!(response.status(), StatusCode::UNAUTHORIZED); } -/// Use the registry-mock storage to verify that the auth policy -/// gates `@pnpm.e2e/needs-auth` correctly. -fn registry_mock_storage() -> Option { - std::env::current_dir().ok()?.ancestors().find_map(|dir| { - let candidate = dir.join( - "pacquet/tasks/registry-mock/node_modules/@pnpm/registry-mock/registry/storage-cache", - ); - candidate.exists().then_some(candidate) - }) -} - #[tokio::test] async fn anonymous_request_to_protected_package_returns_401() { - let Some(storage) = registry_mock_storage() else { - // Storage not populated — skip silently. `static_mode_returns_404_for_unknown_package` - // in the sibling test file already covers static-mode plumbing without depending on - // the fixtures, so we don't lose anything if the fixture is absent. - return; - }; - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); // The fixture publishes @pnpm.e2e/needs-auth — but our access // policy still requires auth for it because the package name // matches the `@pnpm.e2e/needs-auth` policy rule. @@ -127,10 +115,8 @@ async fn anonymous_request_to_protected_package_returns_401() { #[tokio::test] async fn bearer_token_grants_access_to_protected_package() { - let Some(storage) = registry_mock_storage() else { - return; - }; - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let (app, token) = add_user_and_get_token(app, "alice", "secret").await; let response = app @@ -147,10 +133,8 @@ async fn bearer_token_grants_access_to_protected_package() { #[tokio::test] async fn basic_auth_grants_access_to_protected_package() { - let Some(storage) = registry_mock_storage() else { - return; - }; - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let (app, _) = add_user_and_get_token(app, "alice", "secret").await; let basic = BASE64.encode(b"alice:secret"); @@ -724,29 +708,25 @@ async fn publish_accepts_libnpmpublish_scoped_attachment_filename() { #[tokio::test] async fn search_finds_packages_by_substring_in_local_storage() { - let Some(storage) = registry_mock_storage() else { - return; - }; - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let response = app - .oneshot(Request::get("/-/v1/search?text=is-positive&size=20").body(Body::empty()).unwrap()) + .oneshot(Request::get("/-/v1/search?text=no-deps&size=20").body(Body::empty()).unwrap()) .await .unwrap(); assert_eq!(response.status(), StatusCode::OK); let body = body_json(response.into_body()).await; let objects = body["objects"].as_array().expect("objects is array"); - assert!(!objects.is_empty(), "expected is-positive to match the registry-mock fixture"); + assert!(!objects.is_empty(), "expected no-deps to match the storage fixture"); let names: Vec<&str> = objects.iter().map(|object| object["package"]["name"].as_str().unwrap()).collect(); - assert!(names.iter().any(|n| n.contains("is-positive")), "got names: {names:?}"); + assert!(names.iter().any(|n| n.contains("no-deps")), "got names: {names:?}"); } #[tokio::test] async fn search_filters_protected_packages_for_anonymous_callers() { - let Some(storage) = registry_mock_storage() else { - return; - }; - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); // Anonymous: `@pnpm.e2e/needs-auth` matches the access policy // for $authenticated, so search shouldn't surface it. @@ -796,10 +776,8 @@ async fn search_filters_protected_packages_for_anonymous_callers() { #[tokio::test] async fn search_returns_empty_for_made_up_query() { - let Some(storage) = registry_mock_storage() else { - return; - }; - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let response = app .oneshot( Request::get("/-/v1/search?text=zzz-does-not-exist-99999&size=20") diff --git a/registry/crates/pnpm-registry/tests/common/storage.rs b/registry/crates/pnpm-registry/tests/common/storage.rs new file mode 100644 index 0000000000..05320edee2 --- /dev/null +++ b/registry/crates/pnpm-registry/tests/common/storage.rs @@ -0,0 +1,92 @@ +//! Builds a verdaccio-shaped `storage` directory in a `TempDir` for the +//! static-serve tests. The packuments carry the rich publish metadata a real +//! verdaccio/npm registry emits (`_attachments`, `_uplinks`, `_distfiles`, +//! `users`, per-version `_nodeVersion`, `_id`, `contributors`) so the tests can +//! assert that pnpm-registry rewrites tarball URLs and strips those fields in +//! the abbreviated packument form. No real tarball is needed — the bytes are +//! arbitrary; nothing re-hashes them. + +use std::path::Path; + +use serde_json::{Value, json}; +use tempfile::TempDir; + +// Only asserted for pass-through / `sha512-` prefix, never recomputed. +const SHASUM: &str = "a1c3e0c08af5ec17f150b8b9f067bead3d64e472"; +const INTEGRITY: &str = "sha512-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="; +const TIMESTAMP: &str = "2020-01-01T00:00:00.000Z"; + +/// Create a temp storage dir holding `@foo/no-deps` (rich verdaccio metadata) +/// and `@pnpm.e2e/needs-auth` (used by the auth-policy tests). +pub fn build_storage() -> TempDir { + let dir = TempDir::new().expect("create temp storage dir"); + write_package(dir.path(), "@foo/no-deps", "no-deps-1.0.0.tgz", no_deps_packument()); + write_package( + dir.path(), + "@pnpm.e2e/needs-auth", + "needs-auth-1.0.0.tgz", + needs_auth_packument(), + ); + dir +} + +fn write_package(storage: &Path, name: &str, tarball: &str, packument: Value) { + let package_dir = storage.join(name); + std::fs::create_dir_all(&package_dir).expect("create package dir"); + std::fs::write(package_dir.join("package.json"), serde_json::to_vec(&packument).unwrap()) + .expect("write packument"); + std::fs::write(package_dir.join(tarball), format!("fake {name} tarball")) + .expect("write tarball"); +} + +fn no_deps_packument() -> Value { + json!({ + "name": "@foo/no-deps", + "dist-tags": { "latest": "1.0.0" }, + "versions": { + "1.0.0": { + "name": "@foo/no-deps", + "version": "1.0.0", + "_id": "@foo/no-deps@1.0.0", + "_nodeVersion": "25.6.1", + "contributors": [], + "dist": { + // Verdaccio form (scope repeated in the filename); the + // server must rewrite this to the public-url npm form. + "tarball": "http://localhost:4873/@foo/no-deps/-/@foo/no-deps-1.0.0.tgz", + "shasum": SHASUM, + "integrity": INTEGRITY, + }, + }, + }, + "time": { "created": TIMESTAMP, "modified": TIMESTAMP, "1.0.0": TIMESTAMP }, + "users": { "someone": true }, + "_uplinks": {}, + "_distfiles": {}, + "_attachments": { + "@foo/no-deps-1.0.0.tgz": { "content_type": "application/octet-stream", "length": 0 }, + }, + "_rev": "1-0", + "_id": "@foo/no-deps", + "readme": "# no-deps", + }) +} + +fn needs_auth_packument() -> Value { + json!({ + "name": "@pnpm.e2e/needs-auth", + "dist-tags": { "latest": "1.0.0" }, + "versions": { + "1.0.0": { + "name": "@pnpm.e2e/needs-auth", + "version": "1.0.0", + "dist": { + "tarball": "http://localhost:4873/@pnpm.e2e/needs-auth/-/@pnpm.e2e/needs-auth-1.0.0.tgz", + "shasum": SHASUM, + "integrity": INTEGRITY, + }, + }, + }, + "time": { "created": TIMESTAMP, "modified": TIMESTAMP, "1.0.0": TIMESTAMP }, + }) +} diff --git a/registry/crates/pnpm-registry/tests/registry_mock.rs b/registry/crates/pnpm-registry/tests/registry_mock.rs index 4dee6bd049..d6d51c2a7f 100644 --- a/registry/crates/pnpm-registry/tests/registry_mock.rs +++ b/registry/crates/pnpm-registry/tests/registry_mock.rs @@ -1,18 +1,20 @@ -//! End-to-end tests for static-serve mode, sourcing the storage -//! directory from `@pnpm/registry-mock`'s installed copy in the -//! workspace. `@pnpm/registry-mock`'s published npm tarball ships a -//! prepared verdaccio `storage-cache/` (scoped packages under -//! `@foo`, `@pnpm.e2e`, etc.); this exercise asserts that -//! pnpm-registry serves it correctly without any upstream proxy. +//! End-to-end tests for static-serve mode against a synthetic +//! verdaccio-shaped storage built in a `TempDir` (see `common`). The +//! packuments carry the rich publish metadata verdaccio/npm emit +//! (`_attachments`, `_nodeVersion`, `contributors`, …) so these tests +//! assert that pnpm-registry rewrites tarball URLs and abbreviates that +//! format correctly without any upstream proxy. + +// `#[path]` rather than the `tests/common/mod.rs` layout, which the +// Perfectionist dylint forbids. +#[path = "common/storage.rs"] +mod common; use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4}; -use std::path::{Path, PathBuf}; -use std::process::Command; -use std::sync::OnceLock; +use std::path::PathBuf; use axum::body::{Body, to_bytes}; use axum::http::{Request, StatusCode}; -use pipe_trait::Pipe; use serde_json::Value; use tower::ServiceExt; @@ -20,31 +22,6 @@ use pnpm_registry::{Config, router}; const PUBLIC_URL: &str = "http://example.test"; -fn workspace_root() -> &'static Path { - static ROOT: OnceLock = OnceLock::new(); - ROOT.get_or_init(|| { - Command::new(env!("CARGO")) - .arg("locate-project") - .arg("--workspace") - .arg("--message-format=plain") - .output() - .expect("cargo locate-project") - .stdout - .pipe(String::from_utf8) - .expect("utf8 stdout") - .trim_end() - .pipe(Path::new) - .parent() - .expect("parent of root manifest") - .to_path_buf() - }) -} - -fn registry_mock_storage() -> PathBuf { - workspace_root() - .join("pacquet/tasks/registry-mock/node_modules/@pnpm/registry-mock/registry/storage-cache") -} - fn static_config(storage: PathBuf) -> Config { let listen = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, 4873)); let mut config = Config::static_serve(listen, storage); @@ -57,14 +34,9 @@ async fn body_bytes(body: Body) -> Vec { } #[tokio::test] -async fn serves_scoped_packument_from_registry_mock_storage() { - let storage = registry_mock_storage(); - assert!( - storage.join("@foo/no-deps/package.json").exists(), - "registry-mock storage is not populated at {storage:?} — run `pnpm install` first", - ); - - let app = router(static_config(storage)); +async fn serves_scoped_packument_from_storage() { + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let response = app.oneshot(Request::get("/@foo/no-deps").body(Body::empty()).unwrap()).await.unwrap(); @@ -86,18 +58,18 @@ async fn serves_scoped_packument_from_registry_mock_storage() { // through untouched. assert_eq!( doc["versions"]["1.0.0"]["dist"]["shasum"], - "30909ad03bbccde8929f516e4644a62cf7f82785", + "a1c3e0c08af5ec17f150b8b9f067bead3d64e472", ); assert!(doc["versions"]["1.0.0"]["dist"]["integrity"].as_str().unwrap().starts_with("sha512-")); } #[tokio::test] -async fn serves_scoped_tarball_from_registry_mock_storage() { - let storage = registry_mock_storage(); - let on_disk = storage.join("@foo/no-deps/no-deps-1.0.0.tgz"); - let expected_bytes = std::fs::read(&on_disk).expect("registry-mock tarball"); +async fn serves_scoped_tarball_from_storage() { + let storage = common::build_storage(); + let on_disk = storage.path().join("@foo/no-deps/no-deps-1.0.0.tgz"); + let expected_bytes = std::fs::read(&on_disk).expect("fixture tarball"); - let app = router(static_config(storage)); + let app = router(static_config(storage.path().to_path_buf())); let response = app .oneshot(Request::get("/@foo/no-deps/-/no-deps-1.0.0.tgz").body(Body::empty()).unwrap()) @@ -110,7 +82,8 @@ async fn serves_scoped_tarball_from_registry_mock_storage() { #[tokio::test] async fn static_mode_returns_404_for_unknown_package() { - let app = router(static_config(registry_mock_storage())); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let response = app .oneshot(Request::get("/@foo/this-package-does-not-exist").body(Body::empty()).unwrap()) @@ -121,8 +94,8 @@ async fn static_mode_returns_404_for_unknown_package() { #[tokio::test] async fn abbreviated_accept_header_strips_packument() { - let storage = registry_mock_storage(); - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let response = app .oneshot( @@ -177,8 +150,8 @@ async fn abbreviated_accept_header_strips_packument() { #[tokio::test] async fn full_packument_served_when_accept_does_not_request_abbreviated() { - let storage = registry_mock_storage(); - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let response = app .oneshot( @@ -203,8 +176,8 @@ async fn full_packument_served_when_accept_does_not_request_abbreviated() { #[tokio::test] async fn serves_version_manifest_by_dist_tag() { - let storage = registry_mock_storage(); - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let response = app .oneshot(Request::get("/@foo/no-deps/latest").body(Body::empty()).unwrap()) @@ -226,8 +199,8 @@ async fn serves_version_manifest_by_dist_tag() { #[tokio::test] async fn serves_version_manifest_by_literal_version() { - let storage = registry_mock_storage(); - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let response = app .oneshot(Request::get("/@foo/no-deps/1.0.0").body(Body::empty()).unwrap()) @@ -241,8 +214,8 @@ async fn serves_version_manifest_by_literal_version() { #[tokio::test] async fn version_manifest_returns_404_for_unknown_version() { - let storage = registry_mock_storage(); - let app = router(static_config(storage)); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let response = app .oneshot(Request::get("/@foo/no-deps/99.0.0").body(Body::empty()).unwrap()) @@ -253,7 +226,8 @@ async fn version_manifest_returns_404_for_unknown_version() { #[tokio::test] async fn static_mode_returns_404_for_unknown_tarball() { - let app = router(static_config(registry_mock_storage())); + let storage = common::build_storage(); + let app = router(static_config(storage.path().to_path_buf())); let response = app .oneshot(Request::get("/@foo/no-deps/-/no-deps-99.0.0.tgz").body(Body::empty()).unwrap()) diff --git a/releasing/commands/package.json b/releasing/commands/package.json index 1c20a8df52..6b5928f904 100644 --- a/releasing/commands/package.json +++ b/releasing/commands/package.json @@ -96,11 +96,11 @@ "@pnpm/hooks.pnpmfile": "workspace:*", "@pnpm/logger": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/releasing.commands": "workspace:*", "@pnpm/test-fixtures": "workspace:*", "@pnpm/test-ipc-server": "workspace:*", "@pnpm/testing.command-defaults": "workspace:*", + "@pnpm/testing.registry-mock": "workspace:*", "@types/cross-spawn": "catalog:", "@types/is-windows": "catalog:", "@types/libnpmpublish": "catalog:", diff --git a/releasing/commands/test/publish/publish.ts b/releasing/commands/test/publish/publish.ts index dcc450d635..d9e12684aa 100644 --- a/releasing/commands/test/publish/publish.ts +++ b/releasing/commands/test/publish/publish.ts @@ -4,9 +4,9 @@ import path from 'node:path' import { describe, expect, test } from '@jest/globals' import { getCatalogsFromWorkspaceManifest } from '@pnpm/catalogs.config' import { prepare, preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { pack, publish } from '@pnpm/releasing.commands' import { createTestIpcServer } from '@pnpm/test-ipc-server' +import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { isCI } from 'ci-info' import crossSpawn from 'cross-spawn' import { safeExeca as execa } from 'execa' diff --git a/releasing/commands/test/publish/recursivePublish.ts b/releasing/commands/test/publish/recursivePublish.ts index 7690cf065e..4c9efd7352 100644 --- a/releasing/commands/test/publish/recursivePublish.ts +++ b/releasing/commands/test/publish/recursivePublish.ts @@ -4,8 +4,8 @@ import path from 'node:path' import { expect, jest, test } from '@jest/globals' import { streamParser } from '@pnpm/logger' import { preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { publish } from '@pnpm/releasing.commands' +import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import type { ProjectManifest } from '@pnpm/types' import { filterProjectsBySelectorObjectsFromDir } from '@pnpm/workspace.projects-filter' import crossSpawn from 'cross-spawn' diff --git a/releasing/commands/tsconfig.json b/releasing/commands/tsconfig.json index b07c4c1230..9b5873357d 100644 --- a/releasing/commands/tsconfig.json +++ b/releasing/commands/tsconfig.json @@ -114,6 +114,9 @@ { "path": "../../testing/command-defaults" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../../workspace/projects-filter" }, diff --git a/renovate.json b/renovate.json index d8c8ea0882..91022741a1 100644 --- a/renovate.json +++ b/renovate.json @@ -39,7 +39,6 @@ "@pnpm/workspace.project-manifest-reader", "@pnpm/fs.read-modules-dir", "@pnpm/pkg-manifest.reader", - "@pnpm/registry-mock", "@pnpm/installing.deps-resolver", "@pnpm/resolving.resolver-base", "@pnpm/server", diff --git a/store/commands/package.json b/store/commands/package.json index 952b2b92c6..8e1a1a17d8 100644 --- a/store/commands/package.json +++ b/store/commands/package.json @@ -71,9 +71,9 @@ "@pnpm/lockfile.fs": "workspace:*", "@pnpm/logger": "workspace:*", "@pnpm/prepare": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/store.commands": "workspace:*", "@pnpm/store.controller": "workspace:*", + "@pnpm/testing.registry-mock": "workspace:*", "@types/archy": "catalog:", "@types/ramda": "catalog:", "@types/ssri": "catalog:", diff --git a/store/commands/test/store/storeAdd.ts b/store/commands/test/store/storeAdd.ts index 8f899fd15a..153cecac1d 100644 --- a/store/commands/test/store/storeAdd.ts +++ b/store/commands/test/store/storeAdd.ts @@ -5,8 +5,8 @@ import { expect, test } from '@jest/globals' import { assertStore } from '@pnpm/assert-store' import { STORE_VERSION } from '@pnpm/constants' import { tempDir } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { store } from '@pnpm/store.commands' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' test('pnpm store add express@4.16.3', async () => { tempDir() diff --git a/store/commands/test/store/storePath.ts b/store/commands/test/store/storePath.ts index a3ff9521c8..820f494198 100644 --- a/store/commands/test/store/storePath.ts +++ b/store/commands/test/store/storePath.ts @@ -4,8 +4,8 @@ import path from 'node:path' import { expect, test } from '@jest/globals' import { STORE_VERSION } from '@pnpm/constants' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { store } from '@pnpm/store.commands' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' const REGISTRY = `http://localhost:${REGISTRY_MOCK_PORT}/` diff --git a/store/commands/test/store/storePrune.ts b/store/commands/test/store/storePrune.ts index 85da17317a..837a6820cb 100644 --- a/store/commands/test/store/storePrune.ts +++ b/store/commands/test/store/storePrune.ts @@ -6,8 +6,8 @@ import { assertStore } from '@pnpm/assert-store' import { STORE_VERSION } from '@pnpm/constants' import { dlx } from '@pnpm/exec.commands' import { prepare, prepareEmpty } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { store } from '@pnpm/store.commands' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { safeExeca as execa } from 'execa' diff --git a/store/commands/test/store/storeStatus.ts b/store/commands/test/store/storeStatus.ts index 9dd3d76efc..0dd9a1629c 100644 --- a/store/commands/test/store/storeStatus.ts +++ b/store/commands/test/store/storeStatus.ts @@ -4,8 +4,8 @@ import path from 'node:path' import { expect, test } from '@jest/globals' import type { PnpmError } from '@pnpm/error' import { prepare } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { store } from '@pnpm/store.commands' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' import { rimrafSync } from '@zkochan/rimraf' import { safeExeca as execa } from 'execa' import { temporaryDirectory } from 'tempy' diff --git a/store/commands/tsconfig.json b/store/commands/tsconfig.json index feffed23d8..d4eea2c52c 100644 --- a/store/commands/tsconfig.json +++ b/store/commands/tsconfig.json @@ -72,6 +72,9 @@ { "path": "../../resolving/parse-wanted-dependency" }, + { + "path": "../../testing/registry-mock" + }, { "path": "../cafs" }, diff --git a/testing/command-defaults/package.json b/testing/command-defaults/package.json index 7edd897c94..749fcc3309 100644 --- a/testing/command-defaults/package.json +++ b/testing/command-defaults/package.json @@ -32,7 +32,7 @@ "compile": "tsgo --build && pn lint --fix" }, "dependencies": { - "@pnpm/registry-mock": "catalog:" + "@pnpm/testing.registry-mock": "workspace:*" }, "engines": { "node": ">=22.13" diff --git a/testing/command-defaults/src/index.ts b/testing/command-defaults/src/index.ts index 60031a9ca3..299e0c52c1 100644 --- a/testing/command-defaults/src/index.ts +++ b/testing/command-defaults/src/index.ts @@ -1,4 +1,4 @@ -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' export const REGISTRY_URL = `http://localhost:${REGISTRY_MOCK_PORT}` diff --git a/testing/command-defaults/tsconfig.json b/testing/command-defaults/tsconfig.json index c6f0399f60..d55b249724 100644 --- a/testing/command-defaults/tsconfig.json +++ b/testing/command-defaults/tsconfig.json @@ -8,5 +8,9 @@ "src/**/*.ts", "../../__typings__/**/*.d.ts" ], - "references": [] + "references": [ + { + "path": "../registry-mock" + } + ] } diff --git a/testing/registry-mock/package.json b/testing/registry-mock/package.json index 72defcf89d..fe27463f20 100644 --- a/testing/registry-mock/package.json +++ b/testing/registry-mock/package.json @@ -33,8 +33,7 @@ }, "dependencies": { "@pnpm/network.fetch": "workspace:*", - "@pnpm/registry-access.client": "workspace:*", - "@pnpm/registry-mock": "catalog:" + "@pnpm/registry-access.client": "workspace:*" }, "engines": { "node": ">=22.13" diff --git a/testing/registry-mock/src/index.ts b/testing/registry-mock/src/index.ts index e4904601a6..e29862400e 100644 --- a/testing/registry-mock/src/index.ts +++ b/testing/registry-mock/src/index.ts @@ -1,6 +1,14 @@ -import { createFetchFromRegistry } from '@pnpm/network.fetch' -import { addUser as setUser, type AddUserResult, setDistTag } from '@pnpm/registry-access.client' -import { REGISTRY_MOCK_CREDENTIALS, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import fs from 'node:fs' +import path from 'node:path' + +import type { AddUserResult } from '@pnpm/registry-access.client' + +export const REGISTRY_MOCK_PORT = process.env.PNPM_REGISTRY_MOCK_PORT ?? '4873' + +export const REGISTRY_MOCK_CREDENTIALS = { + username: 'username', + password: 'password', +} const REGISTRY_URL = `http://localhost:${REGISTRY_MOCK_PORT}/` @@ -8,22 +16,27 @@ const AUTH_HEADER = `Basic ${Buffer.from( `${REGISTRY_MOCK_CREDENTIALS.username}:${REGISTRY_MOCK_CREDENTIALS.password}` ).toString('base64')}` -const fetchFromRegistry = createFetchFromRegistry({}) - export interface AddDistTagOptions { package: string version: string distTag: string } +// `@pnpm/network.fetch` and `@pnpm/registry-access.client` are imported lazily +// because they transitively load `@pnpm/core-loggers`/`@pnpm/logger`. This module +// is imported (for the constants/getIntegrity) by test helpers that other tests +// pull in statically before calling `jest.unstable_mockModule('@pnpm/logger')`, +// so eagerly loading the logger here would defeat that mock. export async function addDistTag (opts: AddDistTagOptions): Promise { + const { createFetchFromRegistry } = await import('@pnpm/network.fetch') + const { setDistTag } = await import('@pnpm/registry-access.client') await setDistTag({ packageName: opts.package, version: opts.version, distTag: opts.distTag, registryUrl: REGISTRY_URL, authHeader: AUTH_HEADER, - fetchFromRegistry, + fetchFromRegistry: createFetchFromRegistry({}), }) } @@ -34,11 +47,58 @@ export interface AddUserOptions { } export async function addUser (opts: AddUserOptions): Promise { + const { createFetchFromRegistry } = await import('@pnpm/network.fetch') + const { addUser: setUser } = await import('@pnpm/registry-access.client') return setUser({ username: opts.username, password: opts.password, email: opts.email, registryUrl: REGISTRY_URL, - fetch: fetchFromRegistry, + fetch: createFetchFromRegistry({}), }) } + +/** + * Reads a package version's tarball integrity from the registry storage that + * the test harness built from the fixtures. The storage path is published as + * `PNPM_REGISTRY_MOCK_STORAGE` by the with-registry jest globalSetup. + * + * Uplinked packages (proxied from the upstream registry) are written to + * storage lazily on first request, so the read is retried briefly while the + * packument is still being written. + */ +export function getIntegrity (pkgName: string, pkgVersion: string): string { + const storage = process.env.PNPM_REGISTRY_MOCK_STORAGE + if (!storage) { + throw new Error( + 'PNPM_REGISTRY_MOCK_STORAGE is not set — the registry mock storage path is unknown. ' + + 'Tests that call getIntegrity must run under the with-registry jest preset.' + ) + } + const filePath = path.join(storage, pkgName, 'package.json') + const maxRetries = 4 + let delay = 200 // milliseconds + let content: { versions: Record } | undefined + for (let attempt = 1; attempt <= maxRetries; attempt++) { + try { + content = JSON.parse(fs.readFileSync(filePath, 'utf8')) + break + } catch (err: unknown) { + if (attempt === maxRetries || !isTransientReadError(err)) { + throw err + } + Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, delay) + delay *= 2 + } + } + if (!content) { + throw new Error(`Failed to read package.json for ${pkgName}@${pkgVersion} after ${maxRetries} attempts`) + } + return content.versions[pkgVersion].dist.integrity +} + +function isTransientReadError (err: unknown): boolean { + if (!err || typeof err !== 'object') return false + if (err instanceof SyntaxError && err.message.endsWith('Unexpected end of JSON input')) return true + return (err as NodeJS.ErrnoException).code === 'ENOENT' +} diff --git a/testing/temp-store/package.json b/testing/temp-store/package.json index 7afbb11a24..1bab0d4454 100644 --- a/testing/temp-store/package.json +++ b/testing/temp-store/package.json @@ -33,11 +33,11 @@ }, "dependencies": { "@pnpm/installing.client": "workspace:*", - "@pnpm/registry-mock": "catalog:", "@pnpm/resolving.resolver-base": "workspace:*", "@pnpm/store.controller": "workspace:*", "@pnpm/store.controller-types": "workspace:*", - "@pnpm/store.index": "workspace:*" + "@pnpm/store.index": "workspace:*", + "@pnpm/testing.registry-mock": "workspace:*" }, "devDependencies": { "@pnpm/testing.temp-store": "workspace:*" diff --git a/testing/temp-store/src/index.ts b/testing/temp-store/src/index.ts index 9eb0242c77..b4737b29fa 100644 --- a/testing/temp-store/src/index.ts +++ b/testing/temp-store/src/index.ts @@ -1,11 +1,11 @@ import * as path from 'node:path' import { type ClientOptions, createClient } from '@pnpm/installing.client' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import type { ResolutionVerifier } from '@pnpm/resolving.resolver-base' import { createPackageStore, type CreatePackageStoreOptions } from '@pnpm/store.controller' import type { StoreController } from '@pnpm/store.controller-types' import { StoreIndex } from '@pnpm/store.index' +import { REGISTRY_MOCK_PORT } from '@pnpm/testing.registry-mock' const registry = `http://localhost:${REGISTRY_MOCK_PORT}/` diff --git a/testing/temp-store/tsconfig.json b/testing/temp-store/tsconfig.json index 7a4a9928f2..c0a0ad1901 100644 --- a/testing/temp-store/tsconfig.json +++ b/testing/temp-store/tsconfig.json @@ -23,6 +23,9 @@ }, { "path": "../../store/index" + }, + { + "path": "../registry-mock" } ] }