diff --git a/packages/pnpm-sync-lib/etc/pnpm-sync-lib.api.md b/packages/pnpm-sync-lib/etc/pnpm-sync-lib.api.md index 4afa25c..11110d7 100644 --- a/packages/pnpm-sync-lib/etc/pnpm-sync-lib.api.md +++ b/packages/pnpm-sync-lib/etc/pnpm-sync-lib.api.md @@ -4,6 +4,9 @@ ```ts +import { Lockfile } from '@pnpm/lockfile-types-pnpm-lock-v6'; +import { LockfileObject } from '@pnpm/lockfile.types-pnpm-lock-v9'; + // @beta (undocumented) export interface IDependencyMeta { // (undocumented) @@ -11,12 +14,7 @@ export interface IDependencyMeta { } // @beta -export interface ILockfile { - // (undocumented) - importers: Record; - lockfileVersion: number | string; - packages: Record; -} +export type ILockfile = Lockfile | LockfileObject; // @beta export interface ILockfileImporter { diff --git a/packages/pnpm-sync-lib/package.json b/packages/pnpm-sync-lib/package.json index 4ee78e3..0e82ee8 100644 --- a/packages/pnpm-sync-lib/package.json +++ b/packages/pnpm-sync-lib/package.json @@ -1,6 +1,6 @@ { "name": "pnpm-sync-lib", - "version": "0.3.2", + "version": "0.3.3", "description": "API library for integrating \"pnpm-sync\" with your toolchain", "repository": { "type": "git", @@ -17,8 +17,11 @@ "test": "heft test --clean" }, "dependencies": { - "@pnpm/dependency-path-2": "npm:@pnpm/dependency-path@^2.1.8", - "@pnpm/dependency-path-5": "npm:@pnpm/dependency-path@^5.1.7", + "@pnpm/dependency-path-pnpm-v10": "npm:@pnpm/dependency-path@^1000.0.9", + "@pnpm/dependency-path-pnpm-v8": "npm:@pnpm/dependency-path@^2.1.8", + "@pnpm/dependency-path-pnpm-v9": "npm:@pnpm/dependency-path@^5.1.7", + "@pnpm/lockfile-types-pnpm-lock-v6": "npm:@pnpm/lockfile-types@^5.1.5", + "@pnpm/lockfile.types-pnpm-lock-v9": "npm:@pnpm/lockfile.types@^1001.0.8", "yaml": "2.4.1" }, "devDependencies": { diff --git a/packages/pnpm-sync-lib/src/interfaces.ts b/packages/pnpm-sync-lib/src/interfaces.ts index 080d36b..d7d2b4d 100644 --- a/packages/pnpm-sync-lib/src/interfaces.ts +++ b/packages/pnpm-sync-lib/src/interfaces.ts @@ -1,3 +1,6 @@ +import { Lockfile as LockfileObjectV6 } from '@pnpm/lockfile-types-pnpm-lock-v6'; +import { LockfileObject as LockfileObjectV9 } from '@pnpm/lockfile.types-pnpm-lock-v9'; + export interface IPnpmSyncCliArgs { prepare: boolean; lockfile: string; @@ -172,20 +175,4 @@ export interface ILockfilePackage { * * @beta */ -export interface ILockfile { - /** - * The version of the `pnpm-lock.yaml` file format. - * - * Example: `6.0` - */ - lockfileVersion: number | string; - importers: Record; - /** - * The `packages` section stores the installation plan for external (non-workspace) - * packages. The key is a `node_modules/.pnpm` version path, which in lockfile version 6 - * encodes the installed package name, package version, and any peer dependency qualifiers. - * - * Example key: `/webpack-filter-warnings-plugin@1.2.1(webpack@4.47.0)` - */ - packages: Record; -} +export type ILockfile = LockfileObjectV6 | LockfileObjectV9; diff --git a/packages/pnpm-sync-lib/src/pnpmSyncPrepare.ts b/packages/pnpm-sync-lib/src/pnpmSyncPrepare.ts index d7b7127..094fe40 100644 --- a/packages/pnpm-sync-lib/src/pnpmSyncPrepare.ts +++ b/packages/pnpm-sync-lib/src/pnpmSyncPrepare.ts @@ -2,8 +2,11 @@ import path from 'path'; import fs from 'fs'; import YAML from 'yaml'; import process from 'node:process'; -import { depPathToFilename as depPathToFilename2 } from '@pnpm/dependency-path-2'; -import { depPathToFilename as depPathToFilename5 } from '@pnpm/dependency-path-5'; +import { depPathToFilename as depPathToFilenameV8 } from '@pnpm/dependency-path-pnpm-v8'; +import { depPathToFilename as depPathToFilenameV9 } from '@pnpm/dependency-path-pnpm-v9'; +import { depPathToFilename as depPathToFilenameV10 } from '@pnpm/dependency-path-pnpm-v10'; +import { ProjectSnapshot as ProjectSnapshotV6 } from '@pnpm/lockfile-types-pnpm-lock-v6'; +import { ProjectSnapshot as ProjectSnapshotV9 } from '@pnpm/lockfile.types-pnpm-lock-v9'; import { ILockfile, @@ -14,7 +17,7 @@ import { IVersionSpecifier, ITargetFolder } from './interfaces'; -import { pnpmSyncGetJsonVersion } from './utilities'; +import { isPnpmV10, isPnpmV8, isPnpmV9, pnpmSyncGetJsonVersion } from './utilities'; /** * @beta @@ -58,6 +61,8 @@ export interface IPnpmSyncPrepareOptions extends IPnpmSyncUpdateFileBaseOptions /** * Environment-provided API to avoid an NPM dependency. * The "pnpm-sync" NPM package provides a reference implementation. + * + * @remarks Use `@pnpm/lockfile-file` for pnpm-lock v6 and `@pnpm/lockfile.fs` for pnpm-lock v9 */ readPnpmLockfile: ( lockfilePath: string, @@ -219,10 +224,9 @@ export async function pnpmSyncPrepareAsync(options: IPnpmSyncPrepareOptions): Pr const pnpmModulesYaml = YAML.parse(fs.readFileSync(`${pnpmModulesYamlPath}/.modules.yaml`, 'utf8')); const pnpmVersion: string | undefined = pnpmModulesYaml?.packageManager?.split('@')[1]; - // currently, only support pnpm v8 and v9 - if (!pnpmVersion || !(pnpmVersion.startsWith('8') || pnpmVersion.startsWith('9'))) { + if (!pnpmVersion || !(isPnpmV8(pnpmVersion) || isPnpmV9(pnpmVersion) || isPnpmV10(pnpmVersion))) { logMessageCallback({ - message: `The pnpm version is not supported; pnpm-sync requires pnpm version 8.x, 9.x`, + message: `The pnpm version is not supported; pnpm-sync requires pnpm version 8.x, 9.x, 10.x`, messageKind: LogMessageKind.ERROR, details: { messageIdentifier: LogMessageIdentifier.PREPARE_ERROR_UNSUPPORTED_PNPM_VERSION, @@ -287,11 +291,18 @@ export async function pnpmSyncPrepareAsync(options: IPnpmSyncPrepareOptions): Pr } const packageDirname = (() => { - if (pnpmVersion.startsWith('8')) { - return depPathToFilename2(injectedDependencyVersion); + if (isPnpmV8(pnpmVersion)) { + return depPathToFilenameV8(injectedDependencyVersion); + } + if (isPnpmV9(pnpmVersion)) { + return depPathToFilenameV9(injectedDependency + '@' + injectedDependencyVersion, 120); } - if (pnpmVersion.startsWith('9')) { - return depPathToFilename5(injectedDependency + '@' + injectedDependencyVersion, 120); + if (isPnpmV10(pnpmVersion)) { + return depPathToFilenameV10( + injectedDependency + '@' + injectedDependencyVersion, + // for v10 default is 120 on Linux/MacOS and 60 on Windows https://pnpm.io/next/settings#virtualstoredirmaxlength + process.platform === 'win32' ? 60 : 120 + ); } return ''; })(); @@ -398,13 +409,16 @@ function processTransitiveInjectedDependency( } } - const { packages: lockfilePackages } = pnpmLockfile; + const { packages: lockfilePackages = {} } = pnpmLockfile; while (potentialTransitiveInjectedDependencyVersionQueue.length > 0) { const transitiveInjectedDependencyVersion: string | undefined = potentialTransitiveInjectedDependencyVersionQueue.shift(); if (transitiveInjectedDependencyVersion) { - const { dependencies, optionalDependencies } = lockfilePackages[transitiveInjectedDependencyVersion]; + // ProjectSnapshots type in pnpm-lock v9 use a branded type as record key, so we need to cast it to Record + const { dependencies, optionalDependencies } = ( + lockfilePackages as unknown as Record + )[transitiveInjectedDependencyVersion]; processInjectedDependencies( dependencies, injectedDependencyToVersion, diff --git a/packages/pnpm-sync-lib/src/utilities.ts b/packages/pnpm-sync-lib/src/utilities.ts index e67277d..b4949d3 100644 --- a/packages/pnpm-sync-lib/src/utilities.ts +++ b/packages/pnpm-sync-lib/src/utilities.ts @@ -37,3 +37,9 @@ async function getFilesInDirectoryHelper(directory: string, returnFileList: ISyn }); } } + +export const isPnpmV8 = (pnpmVersion: string): boolean => pnpmVersion.startsWith('8.'); + +export const isPnpmV9 = (pnpmVersion: string): boolean => pnpmVersion.startsWith('9.'); + +export const isPnpmV10 = (pnpmVersion: string): boolean => pnpmVersion.startsWith('10.'); diff --git a/packages/pnpm-sync/package.json b/packages/pnpm-sync/package.json index 982e964..a0af8e3 100644 --- a/packages/pnpm-sync/package.json +++ b/packages/pnpm-sync/package.json @@ -1,6 +1,6 @@ { "name": "pnpm-sync", - "version": "0.3.2", + "version": "0.3.3", "description": "Recopy injected dependencies whenever a project is rebuilt in your PNPM workspace", "keywords": [ "rush", @@ -27,17 +27,18 @@ "directory": "packages/pnpm-sync" }, "license": "MIT", + "bin": { + "pnpm-sync": "bin/pnpm-sync.js" + }, "scripts": { "build": "heft build --clean", - "test": "heft test --clean", "lint": "eslint src/**", - "prepublishOnly": "heft build --clean" - }, - "bin": { - "pnpm-sync": "bin/pnpm-sync.js" + "prepublishOnly": "heft build --clean", + "test": "heft test --clean" }, "dependencies": { - "@pnpm/lockfile-file": "~8.1.4", + "@pnpm/lockfile-file-pnpm-lock-v6": "npm:@pnpm/lockfile-file@~8.1.4", + "@pnpm/lockfile.fs-pnpm-lock-v9": "npm:@pnpm/lockfile.fs@^1001.1.11", "@pnpm/logger": "~5.0.0", "@rushstack/node-core-library": "^3.61.0", "@rushstack/package-extractor": "^0.6.12", @@ -46,12 +47,12 @@ }, "devDependencies": { "@rushstack/eslint-config": "^3.6.2", - "@rushstack/heft": "^0.64.3", "@rushstack/eslint-patch": "^1.7.2", + "@rushstack/heft": "^0.64.3", "@rushstack/heft-node-rig": "^2.4.5", "@types/heft-jest": "1.0.6", "@types/node": "18.17.15", - "typescript": "~5.3.3", - "eslint": "~8.7.0" + "eslint": "~8.7.0", + "typescript": "~5.3.3" } } diff --git a/packages/pnpm-sync/src/start.ts b/packages/pnpm-sync/src/start.ts index 10abf3f..4697770 100644 --- a/packages/pnpm-sync/src/start.ts +++ b/packages/pnpm-sync/src/start.ts @@ -1,14 +1,9 @@ import { Command } from 'commander'; -import { - type ILockfile, - type ILockfilePackage, - pnpmSyncCopyAsync, - pnpmSyncPrepareAsync, - type ILogMessageCallbackOptions -} from 'pnpm-sync-lib'; +import { pnpmSyncCopyAsync, pnpmSyncPrepareAsync, type ILogMessageCallbackOptions } from 'pnpm-sync-lib'; import { FileSystem, Async } from '@rushstack/node-core-library'; import { PackageExtractor } from '@rushstack/package-extractor'; -import { readWantedLockfile, Lockfile } from '@pnpm/lockfile-file'; +import { readWantedLockfile as readWantedLockfileV6 } from '@pnpm/lockfile-file-pnpm-lock-v6'; +import { readWantedLockfile as readWantedLockfileV9 } from '@pnpm/lockfile.fs-pnpm-lock-v9'; const program: Command = new Command(); @@ -83,22 +78,19 @@ program ) => { const pnpmLockFolder = lockfilePath.slice(0, lockfilePath.length - 'pnpm-lock.yaml'.length); - const lockfile: Lockfile | null = await readWantedLockfile(pnpmLockFolder, options); + const lockfileV6 = await readWantedLockfileV6(pnpmLockFolder, options); - if (lockfile === null) { - return undefined; - } else { - const lockfilePackages: Record = lockfile.packages as Record< - string, - ILockfilePackage - >; - const result: ILockfile = { - lockfileVersion: lockfile.lockfileVersion, - importers: lockfile.importers, - packages: lockfilePackages - }; - return result; + if (lockfileV6?.lockfileVersion.toString().startsWith('6')) { + return lockfileV6; } + + const lockfileV9 = await readWantedLockfileV9(pnpmLockFolder, options); + + if (lockfileV9?.lockfileVersion.toString().startsWith('9')) { + return lockfileV9; + } + + return undefined; }, logMessageCallback: logMessage }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ad43937..d1ee50d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,9 +10,12 @@ importers: packages/pnpm-sync: dependencies: - '@pnpm/lockfile-file': - specifier: ~8.1.4 - version: 8.1.7(@pnpm/logger@5.0.0) + '@pnpm/lockfile-file-pnpm-lock-v6': + specifier: npm:@pnpm/lockfile-file@~8.1.4 + version: /@pnpm/lockfile-file@8.1.7(@pnpm/logger@5.0.0) + '@pnpm/lockfile.fs-pnpm-lock-v9': + specifier: npm:@pnpm/lockfile.fs@^1001.1.11 + version: /@pnpm/lockfile.fs@1001.1.13(@pnpm/logger@5.0.0) '@pnpm/logger': specifier: ~5.0.0 version: 5.0.0 @@ -56,12 +59,21 @@ importers: packages/pnpm-sync-lib: dependencies: - '@pnpm/dependency-path-2': + '@pnpm/dependency-path-pnpm-v10': + specifier: npm:@pnpm/dependency-path@^1000.0.9 + version: /@pnpm/dependency-path@1000.0.9 + '@pnpm/dependency-path-pnpm-v8': specifier: npm:@pnpm/dependency-path@^2.1.8 version: /@pnpm/dependency-path@2.1.8 - '@pnpm/dependency-path-5': + '@pnpm/dependency-path-pnpm-v9': specifier: npm:@pnpm/dependency-path@^5.1.7 version: /@pnpm/dependency-path@5.1.7 + '@pnpm/lockfile-types-pnpm-lock-v6': + specifier: npm:@pnpm/lockfile-types@^5.1.5 + version: /@pnpm/lockfile-types@5.1.5 + '@pnpm/lockfile.types-pnpm-lock-v9': + specifier: npm:@pnpm/lockfile.types@^1001.0.8 + version: /@pnpm/lockfile.types@1001.0.8 yaml: specifier: 2.4.1 version: 2.4.1 @@ -158,9 +170,12 @@ importers: tests/pnpm-sync-api-test: dependencies: - '@pnpm/lockfile-file': - specifier: ~8.1.4 - version: 8.1.7(@pnpm/logger@5.0.0) + '@pnpm/lockfile-file-pnpm-lock-v6': + specifier: npm:@pnpm/lockfile-file@~8.1.4 + version: /@pnpm/lockfile-file@8.1.7(@pnpm/logger@5.0.0) + '@pnpm/lockfile.fs-pnpm-lock-v9': + specifier: npm:@pnpm/lockfile.fs@^1001.1.11 + version: /@pnpm/lockfile.fs@1001.1.13(@pnpm/logger@5.0.0) '@pnpm/logger': specifier: ~5.0.0 version: 5.0.0 @@ -170,6 +185,9 @@ importers: '@rushstack/package-extractor': specifier: ^0.6.12 version: 0.6.26(@types/node@18.17.15) + execa: + specifier: ^9.6.0 + version: 9.6.0 pnpm-sync-lib: specifier: workspace:* version: link:../../packages/pnpm-sync-lib @@ -199,6 +217,12 @@ importers: specifier: ~5.3.3 version: 5.3.3 + tests/test-fixtures/pnpm-v10: {} + + tests/test-fixtures/pnpm-v8: {} + + tests/test-fixtures/pnpm-v9: {} + tests/test-fixtures/sample-app1: dependencies: '@tiktok-service/api-demo-sample-lib1': @@ -981,6 +1005,11 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.0 + /@pnpm/constants@1001.1.0: + resolution: {integrity: sha512-xb9dfSGi1qfUKY3r4Zy9JdC9+ZeaDxwfE7HrrGIEsBVY1hvIn6ntbR7A97z3nk44yX7vwbINNf9sizTp0WEtEw==} + engines: {node: '>=18.12'} + dev: false + /@pnpm/constants@7.1.1: resolution: {integrity: sha512-31pZqMtjwV+Vaq7MaPrT1EoDFSYwye3dp6BiHIGRJmVThCQwySRKM7hCvqqI94epNkqFAAYoWrNynWoRYosGdw==} engines: {node: '>=16.14'} @@ -1001,11 +1030,34 @@ packages: rfc4648: 1.5.3 dev: false + /@pnpm/crypto.hash@1000.1.1: + resolution: {integrity: sha512-lb5kwXaOXdIW/4bkLLmtM9HEVRvp2eIvp+TrdawcPoaptgA/5f0/sRG0P52BF8dFqeNDj+1tGdqH89WQEqJnxA==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/crypto.polyfill': 1000.1.0 + '@pnpm/graceful-fs': 1000.0.0 + ssri: 10.0.5 + dev: false + /@pnpm/crypto.polyfill@1.0.0: resolution: {integrity: sha512-WbmsqqcUXKKaAF77ox1TQbpZiaQcr26myuMUu+WjUtoWYgD3VP6iKYEvSx35SZ6G2L316lu+pv+40A2GbWJc1w==} engines: {node: '>=18.12'} dev: false + /@pnpm/crypto.polyfill@1000.1.0: + resolution: {integrity: sha512-tNe7a6U4rCpxLMBaR0SIYTdjxGdL0Vwb3G1zY8++sPtHSvy7qd54u8CIB0Z+Y6t5tc9pNYMYCMwhE/wdSY7ltg==} + engines: {node: '>=18.12'} + dev: false + + /@pnpm/dependency-path@1000.0.9: + resolution: {integrity: sha512-0AhabApfiq3EEYeed5HKQEU3ftkrfyKTNgkMH9esGdp2yc+62Zu7eWFf8WW6IGyitDQPLWGYjSEWDC9Bvv8nPg==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/crypto.hash': 1000.1.1 + '@pnpm/types': 1000.6.0 + semver: 7.7.2 + dev: false + /@pnpm/dependency-path@2.1.8: resolution: {integrity: sha512-ywBaTjy0iSEF7lH3DlF8UXrdL2bw4AQFV2tTOeNeY7wc1W5CE+RHSJhf9MXBYcZPesqGRrPiU7Pimj3l05L9VA==} engines: {node: '>=16.14'} @@ -1013,7 +1065,7 @@ packages: '@pnpm/crypto.base32-hash': 2.0.0 '@pnpm/types': 9.4.2 encode-registry: 3.0.1 - semver: 7.5.4 + semver: 7.7.2 dev: false /@pnpm/dependency-path@5.1.7: @@ -1030,6 +1082,13 @@ packages: engines: {node: '>=10.16'} dev: false + /@pnpm/error@1000.0.2: + resolution: {integrity: sha512-2SfE4FFL73rE1WVIoESbqlj4sLy5nWW4M/RVdHvCRJPjlQHa9MH7m7CVJM204lz6I+eHoB+E7rL3zmpJR5wYnQ==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/constants': 1001.1.0 + dev: false + /@pnpm/error@5.0.2: resolution: {integrity: sha512-0TEm+tWNYm+9uh6DSKyRbv8pv/6b4NL0PastLvMxIoqZbBZ5Zj1cYi332R9xsSUi31ZOsu2wpgn/bC7DA9hrjg==} engines: {node: '>=16.14'} @@ -1044,6 +1103,20 @@ packages: execa: /safe-execa@0.1.2 dev: false + /@pnpm/git-utils@1000.0.0: + resolution: {integrity: sha512-W6isNTNgB26n6dZUgwCw6wly+uHQ2Zh5QiRKY1HHMbLAlsnZOxsSNGnuS9euKWHxDftvPfU7uR8XB5x95T5zPQ==} + engines: {node: '>=18.12'} + dependencies: + execa: /safe-execa@0.1.2 + dev: false + + /@pnpm/graceful-fs@1000.0.0: + resolution: {integrity: sha512-RvMEliAmcfd/4UoaYQ93DLQcFeqit78jhYmeJJVPxqFGmj0jEcb9Tu0eAOXr7tGP3eJHpgvPbTU4o6pZ1bJhxg==} + engines: {node: '>=18.12'} + dependencies: + graceful-fs: 4.2.11 + dev: false + /@pnpm/link-bins@5.3.25: resolution: {integrity: sha512-9Xq8lLNRHFDqvYPXPgaiKkZ4rtdsm7izwM/cUsFDc5IMnG0QYIVBXQbgwhz2UvjUotbJrvfKLJaCfA3NGBnLDg==} engines: {node: '>=10.16'} @@ -1096,6 +1169,64 @@ packages: '@pnpm/types': 9.4.2 dev: false + /@pnpm/lockfile.fs@1001.1.13(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-UjBRPvL/ok2UXPsB9HUKDUZaigs3SHuspmAoB9kXQfDLuC7mAQeC7rLpqcEn1E/IVgxGekBDKAmzmm/NEoFpow==} + engines: {node: '>=18.12'} + peerDependencies: + '@pnpm/logger': '>=1001.0.0 <1002.0.0' + dependencies: + '@pnpm/constants': 1001.1.0 + '@pnpm/dependency-path': 1000.0.9 + '@pnpm/error': 1000.0.2 + '@pnpm/git-utils': 1000.0.0 + '@pnpm/lockfile.merger': 1001.0.8 + '@pnpm/lockfile.types': 1001.0.8 + '@pnpm/lockfile.utils': 1001.0.12 + '@pnpm/logger': 5.0.0 + '@pnpm/object.key-sorting': 1000.0.1 + '@pnpm/types': 1000.6.0 + '@zkochan/rimraf': 3.0.2 + comver-to-semver: 1.0.0 + js-yaml: /@zkochan/js-yaml@0.0.7 + normalize-path: 3.0.0 + ramda: /@pnpm/ramda@0.28.1 + semver: 7.7.2 + strip-bom: 4.0.0 + write-file-atomic: 5.0.1 + dev: false + + /@pnpm/lockfile.merger@1001.0.8: + resolution: {integrity: sha512-oB9ABNyxn2yiCr7fGfhrZw2ANXjs9IW9F0y+MyKlryNFHgEsw7972WKOtb1zMRozLg1tU0i+hSLt/Bh8imuTIg==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/lockfile.types': 1001.0.8 + '@pnpm/types': 1000.6.0 + comver-to-semver: 1.0.0 + ramda: /@pnpm/ramda@0.28.1 + semver: 7.7.2 + dev: false + + /@pnpm/lockfile.types@1001.0.8: + resolution: {integrity: sha512-rKecvWutX7aZPFNyXGnGtiwfmnPRiQyG6AWQ1Ad0djWKbPeccg0s9B7cJqCJ4nEnwzhEvw9UtuofBkU/O0L+bQ==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/patching.types': 1000.1.0 + '@pnpm/types': 1000.6.0 + dev: false + + /@pnpm/lockfile.utils@1001.0.12: + resolution: {integrity: sha512-8+jo/Qqn6tmwsGhaHaG1TVaqLzWzrr86RtF1Bi+GlwBrgVj+JkrymWAxcH9aKNEP2es6hJSVe3+71pTx/g1yhg==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/dependency-path': 1000.0.9 + '@pnpm/lockfile.types': 1001.0.8 + '@pnpm/pick-fetcher': 1000.0.1 + '@pnpm/resolver-base': 1004.0.0 + '@pnpm/types': 1000.6.0 + get-npm-tarball-url: 2.1.0 + ramda: /@pnpm/ramda@0.28.1 + dev: false + /@pnpm/logger@5.0.0: resolution: {integrity: sha512-YfcB2QrX+Wx1o6LD1G2Y2fhDhOix/bAY/oAnMpHoNLsKkWIRbt1oKLkIFvxBMzLwAEPqnYWguJrYC+J6i4ywbw==} engines: {node: '>=12.17'} @@ -1114,6 +1245,14 @@ packages: semver: 7.5.4 dev: false + /@pnpm/object.key-sorting@1000.0.1: + resolution: {integrity: sha512-YTJCXyUGOrJuj4QqhSKqZa1vlVAm82h1/uw00ZmD/kL2OViggtyUwWyIe62kpwWVPwEYixfGjfvaFKVJy2mjzA==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/util.lex-comparator': 3.0.2 + sort-keys: 4.2.0 + dev: false + /@pnpm/package-bins@4.1.0: resolution: {integrity: sha512-57/ioGYLBbVRR80Ux9/q2i3y8Q+uQADc3c+Yse8jr/60YLOi3jcWz13e2Jy+ANYtZI258Qc5wk2X077rp0Ly/Q==} engines: {node: '>=10.16'} @@ -1123,6 +1262,16 @@ packages: is-subdir: 1.2.0 dev: false + /@pnpm/patching.types@1000.1.0: + resolution: {integrity: sha512-Zib2ysLctRnWM4KXXlljR44qSKwyEqYmLk+8VPBDBEK3l5Gp5mT3N4ix9E4qjYynvFqahumsxzOfxOYQhUGMGw==} + engines: {node: '>=18.12'} + dev: false + + /@pnpm/pick-fetcher@1000.0.1: + resolution: {integrity: sha512-ETF8ZC6lCLbDzMBUX7kX7srn6Wbqsk/m4ecszRJewtXl3ugQkLw1SA1B6FTPc37EJDPjBShmmKrZF2zMXa6uUA==} + engines: {node: '>=18.12'} + dev: false + /@pnpm/ramda@0.28.1: resolution: {integrity: sha512-zcAG+lvU0fMziNeGXpPyCyCJYp5ZVrPElEE4t14jAmViaihohocZ+dDkcRIyAomox8pQsuZnv1EyHR+pOhmUWw==} dev: false @@ -1162,6 +1311,18 @@ packages: strip-bom: 4.0.0 dev: false + /@pnpm/resolver-base@1004.0.0: + resolution: {integrity: sha512-hPCwGIDJBRBSojFhyoLFEmzd3TGL4NiFqaDNufdjIr+nK5FhyAPwWEJwCNm4/cHtk91aDkJ3qOpIk9RbdQwC3A==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/types': 1000.6.0 + dev: false + + /@pnpm/types@1000.6.0: + resolution: {integrity: sha512-6PsMNe98VKPGcg6LnXSW/LE3YfJ77nj+bPKiRjYRWAQLZ+xXjEQRaR0dAuyjCmchlv4wR/hpnMVRS21/fCod5w==} + engines: {node: '>=18.12'} + dev: false + /@pnpm/types@12.2.0: resolution: {integrity: sha512-5RtwWhX39j89/Tmyv2QSlpiNjErA357T/8r1Dkg+2lD3P7RuS7Xi2tChvmOC3VlezEFNcWnEGCOeKoGRkDuqFA==} engines: {node: '>=18.12'} @@ -1182,6 +1343,11 @@ packages: engines: {node: '>=12.22.0'} dev: false + /@pnpm/util.lex-comparator@3.0.2: + resolution: {integrity: sha512-blFO4Ws97tWv/SNE6N39ZdGmZBrocXnBOfVp0ln4kELmns4pGPZizqyRtR8EjfOLMLstbmNCTReBoDvLz1isVg==} + engines: {node: '>=18.12'} + dev: false + /@pnpm/write-project-manifest@1.1.7: resolution: {integrity: sha512-OLkDZSqkA1mkoPNPvLFXyI6fb0enCuFji6Zfditi/CLAo9kmIhQFmEUDu4krSB8i908EljG8YwL5Xjxzm5wsWA==} engines: {node: '>=10.16'} @@ -1482,10 +1648,19 @@ packages: string-argv: 0.3.2 dev: true + /@sec-ant/readable-stream@0.4.1: + resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} + dev: false + /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true + /@sindresorhus/merge-streams@4.0.0: + resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} + engines: {node: '>=18'} + dev: false + /@sinonjs/commons@3.0.1: resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} dependencies: @@ -1759,6 +1934,13 @@ packages: argparse: 2.0.1 dev: false + /@zkochan/js-yaml@0.0.7: + resolution: {integrity: sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: false + /@zkochan/rimraf@2.1.3: resolution: {integrity: sha512-mCfR3gylCzPC+iqdxEA6z5SxJeOgzgbwmyxanKriIne5qZLswDe/M43aD3p5MNzwzXRhbZg/OX+MpES6Zk1a6A==} engines: {node: '>=12.10'} @@ -1766,6 +1948,11 @@ packages: rimraf: 3.0.2 dev: false + /@zkochan/rimraf@3.0.2: + resolution: {integrity: sha512-GBf4ua7ogWTr7fATnzk/JLowZDBnBJMm8RkMaC/KcvxZ9gxbMWix0/jImd815LmqKyIHZ7h7lADRddGMdGBuCA==} + engines: {node: '>=18.12'} + dev: false + /@zkochan/which@2.0.3: resolution: {integrity: sha512-C1ReN7vt2/2O0fyTsx5xnbQuxBrmG5NMSbcIkPKCCfCTJgpZBsuRYzFXHj3nVq8vTfK7vxHUmzfCpSHgO7j4rg==} engines: {node: '>= 8'} @@ -2202,6 +2389,15 @@ packages: shebang-command: 2.0.0 which: 2.0.2 + /cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: false + /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2580,6 +2776,24 @@ packages: signal-exit: 3.0.7 strip-final-newline: 2.0.0 + /execa@9.6.0: + resolution: {integrity: sha512-jpWzZ1ZhwUmeWRhS7Qv3mhpOhLfwI+uAX4e5fOcXqwMR7EcJ0pj2kV1CVzHVMX/LphnKWD3LObjZCoJ71lKpHw==} + engines: {node: ^18.19.0 || >=20.5.0} + dependencies: + '@sindresorhus/merge-streams': 4.0.0 + cross-spawn: 7.0.6 + figures: 6.1.0 + get-stream: 9.0.1 + human-signals: 8.0.1 + is-plain-obj: 4.1.0 + is-stream: 4.0.1 + npm-run-path: 6.0.0 + pretty-ms: 9.2.0 + signal-exit: 4.1.0 + strip-final-newline: 4.0.0 + yoctocolors: 2.1.1 + dev: false + /exit@0.1.2: resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} engines: {node: '>= 0.8.0'} @@ -2632,6 +2846,13 @@ packages: bser: 2.1.1 dev: true + /figures@6.1.0: + resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} + engines: {node: '>=18'} + dependencies: + is-unicode-supported: 2.1.0 + dev: false + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -2743,6 +2964,11 @@ packages: hasown: 2.0.0 dev: true + /get-npm-tarball-url@2.1.0: + resolution: {integrity: sha512-ro+DiMu5DXgRBabqXupW38h7WPZ9+Ad8UjwhvsmmN8w1sU7ab0nzAXvVZ4kqYg57OrqomRtJvepX5/xvFKNtjA==} + engines: {node: '>=12.17'} + dev: false + /get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} @@ -2752,6 +2978,14 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + /get-stream@9.0.1: + resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} + engines: {node: '>=18'} + dependencies: + '@sec-ant/readable-stream': 0.4.1 + is-stream: 4.0.1 + dev: false + /get-symbol-description@1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} @@ -2897,6 +3131,11 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + /human-signals@8.0.1: + resolution: {integrity: sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==} + engines: {node: '>=18.18.0'} + dev: false + /ignore-walk@3.0.4: resolution: {integrity: sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==} dependencies: @@ -3062,6 +3301,11 @@ packages: engines: {node: '>=8'} dev: false + /is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + dev: false + /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -3084,6 +3328,11 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} + /is-stream@4.0.1: + resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} + engines: {node: '>=18'} + dev: false + /is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -3116,6 +3365,11 @@ packages: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: false + /is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} + engines: {node: '>=18'} + dev: false + /is-weakmap@2.0.1: resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==} dev: true @@ -3912,6 +4166,11 @@ packages: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: false + /minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + dev: false + /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -3959,7 +4218,7 @@ packages: dependencies: hosted-git-info: 4.1.0 is-core-module: 2.13.1 - semver: 7.5.4 + semver: 7.7.2 validate-npm-package-license: 3.0.4 dev: false @@ -3994,6 +4253,14 @@ packages: dependencies: path-key: 3.1.1 + /npm-run-path@6.0.0: + resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==} + engines: {node: '>=18'} + dependencies: + path-key: 4.0.0 + unicorn-magic: 0.3.0 + dev: false + /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -4142,6 +4409,11 @@ packages: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 + /parse-ms@4.0.0: + resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} + engines: {node: '>=18'} + dev: false + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -4154,6 +4426,11 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + /path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + dev: false + /path-name@1.0.0: resolution: {integrity: sha512-/dcAb5vMXH0f51yvMuSUqFpxUcA8JelbRmE5mW/p4CUJxrNgK24IkstnV7ENtg2IDGBOu6izKTG6eilbnbNKWQ==} dev: false @@ -4203,6 +4480,13 @@ packages: react-is: 18.2.0 dev: true + /pretty-ms@9.2.0: + resolution: {integrity: sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==} + engines: {node: '>=18'} + dependencies: + parse-ms: 4.0.0 + dev: false + /pretty-quick@4.0.0(prettier@3.2.5): resolution: {integrity: sha512-M+2MmeufXb/M7Xw3Afh1gxcYpj+sK0AxEfnfF958ktFeAyi5MsKY5brymVURQLgPLV1QaF5P4pb2oFJ54H3yzQ==} engines: {node: '>=14'} @@ -4554,6 +4838,13 @@ packages: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: true + /ssri@10.0.5: + resolution: {integrity: sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + minipass: 7.1.2 + dev: false + /stack-utils@2.0.6: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} @@ -4634,6 +4925,11 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} + /strip-final-newline@4.0.0: + resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==} + engines: {node: '>=18'} + dev: false + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -4822,6 +5118,11 @@ packages: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true + /unicorn-magic@0.3.0: + resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==} + engines: {node: '>=18'} + dev: false + /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -4993,6 +5294,11 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + /yoctocolors@2.1.1: + resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==} + engines: {node: '>=18'} + dev: false + /z-schema@5.0.5: resolution: {integrity: sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==} engines: {node: '>=8.0.0'} diff --git a/tests/pnpm-sync-api-test/.eslintrc.js b/tests/pnpm-sync-api-test/.eslintrc.cjs similarity index 100% rename from tests/pnpm-sync-api-test/.eslintrc.js rename to tests/pnpm-sync-api-test/.eslintrc.cjs diff --git a/tests/pnpm-sync-api-test/package.json b/tests/pnpm-sync-api-test/package.json index 2cf5247..1bdb660 100644 --- a/tests/pnpm-sync-api-test/package.json +++ b/tests/pnpm-sync-api-test/package.json @@ -3,27 +3,30 @@ "version": "0.2.0", "description": "Test cases for pnpm-sync-lib", "license": "MIT", + "type": "module", + "main": "lib/index.js", "scripts": { "build": "heft build --clean", - "test": "heft test --clean", - "lint": "eslint src/**" + "lint": "eslint src/**", + "test": "NODE_OPTIONS=--experimental-vm-modules heft test --clean" }, - "main": "lib/index.js", "dependencies": { - "@pnpm/lockfile-file": "~8.1.4", + "@pnpm/lockfile-file-pnpm-lock-v6": "npm:@pnpm/lockfile-file@~8.1.4", + "@pnpm/lockfile.fs-pnpm-lock-v9": "npm:@pnpm/lockfile.fs@^1001.1.11", "@pnpm/logger": "~5.0.0", "@rushstack/node-core-library": "^3.61.0", "@rushstack/package-extractor": "^0.6.12", + "execa": "^9.6.0", "pnpm-sync-lib": "workspace:*" }, "devDependencies": { "@rushstack/eslint-config": "^3.6.2", - "@rushstack/heft": "^0.64.3", "@rushstack/eslint-patch": "^1.7.2", + "@rushstack/heft": "^0.64.3", "@rushstack/heft-node-rig": "^2.4.5", "@types/heft-jest": "1.0.6", "@types/node": "18.17.15", - "typescript": "~5.3.3", - "eslint": "~8.7.0" + "eslint": "~8.7.0", + "typescript": "~5.3.3" } } diff --git a/tests/pnpm-sync-api-test/src/test/__snapshots__/pnpmMultiVersion.test.ts.snap b/tests/pnpm-sync-api-test/src/test/__snapshots__/pnpmMultiVersion.test.ts.snap new file mode 100644 index 0000000..cbdaef2 --- /dev/null +++ b/tests/pnpm-sync-api-test/src/test/__snapshots__/pnpmMultiVersion.test.ts.snap @@ -0,0 +1,145 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`pnpm multi version test pnpm v8 1`] = ` +Array [ + Object { + "details": Object { + "dotPnpmFolder": "/pnpm-sync/tests/test-fixtures/pnpm-v8/node_modules/.pnpm", + "lockfilePath": "/pnpm-sync/tests/test-fixtures/pnpm-v8/pnpm-lock.yaml", + "messageIdentifier": "prepare-starting", + }, + "message": "Starting...", + "messageKind": "verbose", + }, + Object { + "details": Object { + "messageIdentifier": "prepare-writing-file", + "pnpmSyncJsonPath": "/pnpm-sync/tests/test-fixtures/pnpm-v8/packages/sample-lib1/node_modules/.pnpm-sync.json", + "sourceProjectFolder": "/pnpm-sync/tests/test-fixtures/pnpm-v8/packages/sample-lib1", + }, + "message": "Writing...", + "messageKind": "verbose", + }, + Object { + "details": Object { + "dotPnpmFolder": "/pnpm-sync/tests/test-fixtures/pnpm-v8/node_modules/.pnpm", + "executionTimeInMs": "[TIMING]", + "lockfilePath": "/pnpm-sync/tests/test-fixtures/pnpm-v8/pnpm-lock.yaml", + "messageIdentifier": "prepare-finishing", + }, + "message": "Regenerated...", + "messageKind": "info", + }, +] +`; + +exports[`pnpm multi version test pnpm v8 2`] = ` +Object { + "postbuildInjectedCopy": Object { + "sourceFolder": "..", + "targetFolders": Array [ + Object { + "folderPath": "../../../node_modules/.pnpm/file+packages+sample-lib1_@rushstack+eslint-patch@1.11.0_@rushstack+node-core-library@5.13.1__erd7quj6pkdyrimanex2flseii/node_modules/sample-lib1", + }, + Object { + "folderPath": "../../../node_modules/.pnpm/file+packages+sample-lib1_@rushstack+eslint-patch@1.11.0_@rushstack+node-core-library@5.13.1__bpmmrb36cawsk5lk5xjymvbs2e/node_modules/sample-lib1", + }, + ], + }, + "version": "0.3.3", +} +`; + +exports[`pnpm multi version test pnpm v9 1`] = ` +Array [ + Object { + "details": Object { + "dotPnpmFolder": "/pnpm-sync/tests/test-fixtures/pnpm-v9/node_modules/.pnpm", + "lockfilePath": "/pnpm-sync/tests/test-fixtures/pnpm-v9/pnpm-lock.yaml", + "messageIdentifier": "prepare-starting", + }, + "message": "Starting...", + "messageKind": "verbose", + }, + Object { + "details": Object { + "messageIdentifier": "prepare-writing-file", + "pnpmSyncJsonPath": "/pnpm-sync/tests/test-fixtures/pnpm-v9/packages/sample-lib1/node_modules/.pnpm-sync.json", + "sourceProjectFolder": "/pnpm-sync/tests/test-fixtures/pnpm-v9/packages/sample-lib1", + }, + "message": "Writing...", + "messageKind": "verbose", + }, + Object { + "details": Object { + "dotPnpmFolder": "/pnpm-sync/tests/test-fixtures/pnpm-v9/node_modules/.pnpm", + "executionTimeInMs": "[TIMING]", + "lockfilePath": "/pnpm-sync/tests/test-fixtures/pnpm-v9/pnpm-lock.yaml", + "messageIdentifier": "prepare-finishing", + }, + "message": "Regenerated...", + "messageKind": "info", + }, +] +`; + +exports[`pnpm multi version test pnpm v9 2`] = ` +Object { + "postbuildInjectedCopy": Object { + "sourceFolder": "..", + "targetFolders": Array [ + Object { + "folderPath": "../../../node_modules/.pnpm/sample-lib1@file+packages+sample-lib1_@rushstack+eslint-patch@1.11.0_@rushstack+node-core-lib_jde5jrdqngnzmj5pih5jgr6htu/node_modules/sample-lib1", + }, + ], + }, + "version": "0.3.3", +} +`; + +exports[`pnpm multi version test pnpm v10 1`] = ` +Array [ + Object { + "details": Object { + "dotPnpmFolder": "/pnpm-sync/tests/test-fixtures/pnpm-v10/node_modules/.pnpm", + "lockfilePath": "/pnpm-sync/tests/test-fixtures/pnpm-v10/pnpm-lock.yaml", + "messageIdentifier": "prepare-starting", + }, + "message": "Starting...", + "messageKind": "verbose", + }, + Object { + "details": Object { + "messageIdentifier": "prepare-writing-file", + "pnpmSyncJsonPath": "/pnpm-sync/tests/test-fixtures/pnpm-v10/packages/sample-lib1/node_modules/.pnpm-sync.json", + "sourceProjectFolder": "/pnpm-sync/tests/test-fixtures/pnpm-v10/packages/sample-lib1", + }, + "message": "Writing...", + "messageKind": "verbose", + }, + Object { + "details": Object { + "dotPnpmFolder": "/pnpm-sync/tests/test-fixtures/pnpm-v10/node_modules/.pnpm", + "executionTimeInMs": "[TIMING]", + "lockfilePath": "/pnpm-sync/tests/test-fixtures/pnpm-v10/pnpm-lock.yaml", + "messageIdentifier": "prepare-finishing", + }, + "message": "Regenerated...", + "messageKind": "info", + }, +] +`; + +exports[`pnpm multi version test pnpm v10 2`] = ` +Object { + "postbuildInjectedCopy": Object { + "sourceFolder": "..", + "targetFolders": Array [ + Object { + "folderPath": "../../../node_modules/.pnpm/sample-lib1@file+packages+sample-lib1_@rushstack+eslint-patch@1.11.0_@rushstack+node-co_1e4bcf53d5aa94d05e51dfd3fe5a8859/node_modules/sample-lib1", + }, + ], + }, + "version": "0.3.3", +} +`; diff --git a/tests/pnpm-sync-api-test/src/test/pnpmMultiVersion.test.ts b/tests/pnpm-sync-api-test/src/test/pnpmMultiVersion.test.ts new file mode 100644 index 0000000..c253bec --- /dev/null +++ b/tests/pnpm-sync-api-test/src/test/pnpmMultiVersion.test.ts @@ -0,0 +1,48 @@ +import path from 'node:path'; +import { execa } from 'execa'; +import { FileSystem } from '@rushstack/node-core-library'; +import { ILogMessageCallbackOptions, pnpmSyncPrepareAsync } from 'pnpm-sync-lib'; +import { __dirname, readPnpmLockfile, scrubLog } from './testUtilities.js'; + +describe('pnpm multi version test', () => { + it.each(['8', '9', '10'])('pnpm v%s', async (version) => { + const logs: ILogMessageCallbackOptions[] = []; + const projectDir = path.join(__dirname, '..', '..', '..', 'test-fixtures', `pnpm-v${version}`); + + // Clean the project directory by removing all untracked files and directories + await execa({ cwd: projectDir })`git clean -xdf`; + // Install dependencies using the specified pnpm version via corepack + await execa({ cwd: projectDir })`corepack pnpm i`; + + await pnpmSyncPrepareAsync({ + lockfilePath: path.join(projectDir, 'pnpm-lock.yaml'), + dotPnpmFolder: path.join(projectDir, 'node_modules', '.pnpm'), + ensureFolderAsync: FileSystem.ensureFolderAsync, + readPnpmLockfile, + logMessageCallback: (options: ILogMessageCallbackOptions): void => { + logs.push(options); + } + }); + + expect(logs.map((x) => scrubLog(x))).toMatchSnapshot(); + + const pnpmSyncJSONFile = path.join( + projectDir, + 'packages', + 'sample-lib1', + 'node_modules', + '.pnpm-sync.json' + ); + const pnpmSyncJSON = JSON.parse(FileSystem.readFile(pnpmSyncJSONFile)); + + // Verify that the configuration matches the expected snapshot + expect(pnpmSyncJSON).toMatchSnapshot(); + + // Verify that all target folders specified in the configuration exist + expect(() => { + for (const targetFolder of pnpmSyncJSON.postbuildInjectedCopy.targetFolders) { + FileSystem.exists(targetFolder.folderPath); + } + }).not.toThrow(); + }); +}); diff --git a/tests/pnpm-sync-api-test/src/test/pnpmSyncCopy.test.ts b/tests/pnpm-sync-api-test/src/test/pnpmSyncCopy.test.ts index 53db0b2..f471406 100644 --- a/tests/pnpm-sync-api-test/src/test/pnpmSyncCopy.test.ts +++ b/tests/pnpm-sync-api-test/src/test/pnpmSyncCopy.test.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import path from 'path'; import { Async, FileSystem } from '@rushstack/node-core-library'; import { PackageExtractor } from '@rushstack/package-extractor'; -import { readPnpmLockfile, scrubLog } from './testUtilities'; +import { readPnpmLockfile, scrubLog } from './testUtilities.js'; import { ILogMessageCallbackOptions, pnpmSyncGetJsonVersion, diff --git a/tests/pnpm-sync-api-test/src/test/pnpmSyncPrepare.test.ts b/tests/pnpm-sync-api-test/src/test/pnpmSyncPrepare.test.ts index 4e1fd13..25f029a 100644 --- a/tests/pnpm-sync-api-test/src/test/pnpmSyncPrepare.test.ts +++ b/tests/pnpm-sync-api-test/src/test/pnpmSyncPrepare.test.ts @@ -7,7 +7,7 @@ import { LogMessageIdentifier, pnpmSyncGetJsonVersion } from 'pnpm-sync-lib'; -import { readPnpmLockfile, scrubLog } from './testUtilities'; +import { readPnpmLockfile, scrubLog } from './testUtilities.js'; const pnpmSyncLibVersion: string = pnpmSyncGetJsonVersion(); @@ -176,7 +176,7 @@ Array [ Object { "details": Object { "actualVersion": "incompatible-version", - "expectedVersion": "0.3.2", + "expectedVersion": "0.3.3", "messageIdentifier": "prepare-replacing-file", "pnpmSyncJsonPath": "/pnpm-sync/tests/test-fixtures/sample-lib1/node_modules/.pnpm-sync.json", "sourceProjectFolder": "/pnpm-sync/tests/test-fixtures/sample-lib1", diff --git a/tests/pnpm-sync-api-test/src/test/testUtilities.ts b/tests/pnpm-sync-api-test/src/test/testUtilities.ts index 13fcdc6..5d6c6e0 100644 --- a/tests/pnpm-sync-api-test/src/test/testUtilities.ts +++ b/tests/pnpm-sync-api-test/src/test/testUtilities.ts @@ -1,7 +1,11 @@ import path from 'path'; -import { Lockfile, readWantedLockfile } from '@pnpm/lockfile-file'; +import { readWantedLockfile as readWantedLockfileV6 } from '@pnpm/lockfile-file-pnpm-lock-v6'; +import { readWantedLockfile as readWantedLockfileV9 } from '@pnpm/lockfile.fs-pnpm-lock-v9'; import { Path } from '@rushstack/node-core-library'; -import type { ILockfile, ILockfilePackage } from 'pnpm-sync-lib'; +import type { ILockfile } from 'pnpm-sync-lib'; +import { fileURLToPath } from 'url'; + +export const __dirname = path.dirname(fileURLToPath(import.meta.url)); export async function readPnpmLockfile( lockfilePath: string, @@ -10,22 +14,19 @@ export async function readPnpmLockfile( } ): Promise { const pnpmLockFolder = path.dirname(lockfilePath); - const lockfile: Lockfile | null = await readWantedLockfile(pnpmLockFolder, options); - - if (lockfile === null) { - return undefined; - } else { - const lockfilePackages: Record = lockfile.packages as Record< - string, - ILockfilePackage - >; - const result: ILockfile = { - lockfileVersion: lockfile.lockfileVersion, - importers: lockfile.importers, - packages: lockfilePackages - }; - return result; + const lockfileV6 = await readWantedLockfileV6(pnpmLockFolder, options); + + if (lockfileV6?.lockfileVersion.toString().startsWith('6')) { + return lockfileV6; + } + + const lockfileV9 = await readWantedLockfileV9(pnpmLockFolder, options); + + if (lockfileV9?.lockfileVersion.toString().startsWith('9')) { + return lockfileV9; } + + return undefined; } // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/tests/pnpm-sync-api-test/tsconfig.json b/tests/pnpm-sync-api-test/tsconfig.json index 22f94ca..f1b6566 100644 --- a/tests/pnpm-sync-api-test/tsconfig.json +++ b/tests/pnpm-sync-api-test/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "./node_modules/@rushstack/heft-node-rig/profiles/default/tsconfig-base.json", "compilerOptions": { - "types": ["heft-jest", "node"] + "types": ["heft-jest", "node"], + "module": "nodenext", + "moduleResolution": "nodenext" } } diff --git a/tests/test-fixtures/README.md b/tests/test-fixtures/README.md new file mode 100644 index 0000000..33b7cb9 --- /dev/null +++ b/tests/test-fixtures/README.md @@ -0,0 +1,110 @@ +# Test Fixtures Guide + +This directory contains test fixtures for the pnpm-sync project, providing various workspace configurations and sample projects to test different scenarios and pnpm versions. + +## Directory Structure Overview + +### PNPM Version-Specific Workspaces + +The `pnpm-vX` directories contain complete workspace setups for testing different versions of pnpm: + +Each pnpm version directory contains: +- `package.json` - Root workspace configuration with specific pnpm version +- `pnpm-workspace.yaml` - Workspace package definitions +- `pnpm-lock.yaml` - Version-specific lockfile format +- `apps/` - Sample applications (sample-app1, sample-app2) +- `packages/` - Sample libraries designed for testing complex dependency scenarios + - `sample-lib1` - A React component library with extensive peer dependencies configuration, specifically designed to trigger pnpm's dependency path hashing logic. + +## How to Add New Test Fixtures + +### Adding a New PNPM Version Workspace + +1. **Copy existing pnpm version directory**: + ```bash + # Copy from an existing pnpm-vX directory as template + cp -r pnpm-v9 pnpm-vX + cd pnpm-vX + ``` + +2. **Set the target pnpm version using [`corepack`](https://github.com/nodejs/corepack)**: + ```bash + # Use corepack to set and record the specific pnpm version + corepack use pnpm@X.Y.Z + ``` + This command will: + - Install the specified pnpm version if not already available + - Update the `packageManager` field in `package.json` automatically + - Ensure the workspace uses the exact pnpm version for testing + +3. **Verify the version configuration**: + ```bash + # Check that package.json has been updated correctly + cat package.json | grep packageManager + # Should show: "packageManager": "pnpm@X.Y.Z+sha512..." + + # Verify pnpm version + corepack pnpm --version + ``` + +4. **Update workspace name** (if needed): + ```json + { + "name": "pnpm-vX-workspace", + "version": "0.0.0", + "packageManager": "pnpm@X.Y.Z+sha512..." // Auto-updated by corepack + } + ``` + +5. **Regenerate lockfile with new pnpm version**: + ```bash + # Remove old lockfile and regenerate with new pnpm version + rm pnpm-lock.yaml + corepack pnpm install + ``` + +6. **Add version to test suite**: + Update the test file to include the new version: + ```typescript + // tests/pnpm-sync-api-test/src/test/pnpmMultiVersion.test.ts + it.each(['8', '9', '10', 'X'])('pnpm v%s', async (version) => { + ``` + +7. **Run tests to verify**: + ```bash + # Navigate to test directory and run the multi-version test + cd ../../pnpm-sync-api-test + npm test + ``` + +### Important Notes + +- **Corepack Advantage**: Using `corepack use pnpm@X.Y.Z` ensures the `packageManager` field is automatically updated with the correct SHA512 hash, eliminating manual errors. +- **Version Consistency**: This approach guarantees that the directory name, package.json configuration, and actual pnpm binary version are all synchronized. +- **Test Integration**: Always add the new version to the test suite to ensure it's covered in CI/CD pipelines. +- **Lockfile Regeneration**: The lockfile format may differ between pnpm versions, so regeneration is essential for accurate testing. + + +### Best Practices + +1. **Naming Convention**: Use descriptive names that indicate the purpose (e.g., `pnpm-v11.1.2`, `sample-complex-app`) + +2. **Version Consistency**: Ensure package manager versions in package.json match the directory name + +3. **Dependency Injection**: Use `dependenciesMeta.injected: true` for workspace dependencies that should be injected + +4. **TypeScript Configuration**: Extend base configurations rather than duplicating settings + +5. **Documentation**: Update this README when adding new fixtures with their specific purpose + +## Usage in Tests + +These fixtures are used by the pnpm-sync test suite to: +- Verify cross-version compatibility +- Test workspace dependency resolution +- Validate dependency injection behavior +- Test migration scenarios between pnpm versions +- Ensure proper handling of different project structures + +Each fixture represents a specific test scenario and should be maintained to reflect real-world usage patterns. + \ No newline at end of file diff --git a/tests/test-fixtures/pnpm-v10/apps/sample-app1/package.json b/tests/test-fixtures/pnpm-v10/apps/sample-app1/package.json new file mode 100644 index 0000000..013a40a --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/apps/sample-app1/package.json @@ -0,0 +1,22 @@ +{ + "name": "sample-app1", + "version": "0.0.0", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "sample-lib1": "workspace:*" + }, + "devDependencies": { + "typescript": "^5.8.3" + }, + "dependenciesMeta": { + "sample-lib1": { + "injected": true + } + } +} diff --git a/tests/test-fixtures/pnpm-v10/apps/sample-app1/src/index.tsx b/tests/test-fixtures/pnpm-v10/apps/sample-app1/src/index.tsx new file mode 100644 index 0000000..7c8fcfa --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/apps/sample-app1/src/index.tsx @@ -0,0 +1,8 @@ +import { Lib1Component } from 'sample-lib1'; + +export const App1Component = () => ( +
+ {'I am from sample-app1.'} + +
+); diff --git a/tests/test-fixtures/pnpm-v10/apps/sample-app1/tsconfig.json b/tests/test-fixtures/pnpm-v10/apps/sample-app1/tsconfig.json new file mode 100644 index 0000000..73a2bf7 --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/apps/sample-app1/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig.app.base.json", + "compilerOptions": {}, + "include": ["src"] +} diff --git a/tests/test-fixtures/pnpm-v10/apps/sample-app2/package.json b/tests/test-fixtures/pnpm-v10/apps/sample-app2/package.json new file mode 100644 index 0000000..58ef1b9 --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/apps/sample-app2/package.json @@ -0,0 +1,22 @@ +{ + "name": "sample-app2", + "version": "0.0.0", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", + "react": "^17.0.0", + "react-dom": "^17.0.0", + "sample-lib1": "workspace:*" + }, + "devDependencies": { + "typescript": "^5.8.3" + }, + "dependenciesMeta": { + "sample-lib1": { + "injected": true + } + } +} diff --git a/tests/test-fixtures/pnpm-v10/apps/sample-app2/src/index.tsx b/tests/test-fixtures/pnpm-v10/apps/sample-app2/src/index.tsx new file mode 100644 index 0000000..4420f9d --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/apps/sample-app2/src/index.tsx @@ -0,0 +1,8 @@ +import { Lib1Component } from 'sample-lib1'; + +export const App2Component = () => ( +
+ {'I am from sample-app2.'} + +
+); diff --git a/tests/test-fixtures/pnpm-v10/apps/sample-app2/tsconfig.json b/tests/test-fixtures/pnpm-v10/apps/sample-app2/tsconfig.json new file mode 100644 index 0000000..73a2bf7 --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/apps/sample-app2/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig.app.base.json", + "compilerOptions": {}, + "include": ["src"] +} diff --git a/tests/test-fixtures/pnpm-v10/package.json b/tests/test-fixtures/pnpm-v10/package.json new file mode 100644 index 0000000..2bd5629 --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/package.json @@ -0,0 +1,5 @@ +{ + "name": "pnpm-v10-workspace", + "version": "0.0.0", + "packageManager": "pnpm@10.12.1+sha512.f0dda8580f0ee9481c5c79a1d927b9164f2c478e90992ad268bbb2465a736984391d6333d2c327913578b2804af33474ca554ba29c04a8b13060a717675ae3ac" +} diff --git a/tests/test-fixtures/pnpm-v10/packages/sample-lib1/package.json b/tests/test-fixtures/pnpm-v10/packages/sample-lib1/package.json new file mode 100644 index 0000000..072e368 --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/packages/sample-lib1/package.json @@ -0,0 +1,34 @@ +{ + "name": "sample-lib1", + "version": "0.0.0", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsc" + }, + "dependencies": {}, + "devDependencies": { + "@rushstack/eslint-patch": "^1.11.0", + "@rushstack/node-core-library": "^5.13.0", + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "typescript": "^5.8.3" + }, + "peerDependencies": { + "@rushstack/eslint-patch": "*", + "@rushstack/node-core-library": "*", + "@types/react": "17 || 18", + "@types/react-dom": "17 || 18", + "react": "17 || 18", + "react-dom": "17 || 18" + } +} diff --git a/tests/test-fixtures/pnpm-v10/packages/sample-lib1/src/index.tsx b/tests/test-fixtures/pnpm-v10/packages/sample-lib1/src/index.tsx new file mode 100644 index 0000000..bb307a4 --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/packages/sample-lib1/src/index.tsx @@ -0,0 +1 @@ +export const Lib1Component = () =>
{'I am from sample-lib1'}
; diff --git a/tests/test-fixtures/pnpm-v10/packages/sample-lib1/tsconfig.json b/tests/test-fixtures/pnpm-v10/packages/sample-lib1/tsconfig.json new file mode 100644 index 0000000..368af83 --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/packages/sample-lib1/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../tsconfig.lib.base.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["src"] +} diff --git a/tests/test-fixtures/pnpm-v10/pnpm-lock.yaml b/tests/test-fixtures/pnpm-v10/pnpm-lock.yaml new file mode 100644 index 0000000..bdecd34 --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/pnpm-lock.yaml @@ -0,0 +1,446 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: {} + + apps/sample-app1: + dependencies: + '@types/react': + specifier: ^18.0.0 + version: 18.3.23 + '@types/react-dom': + specifier: ^18.0.0 + version: 18.3.7(@types/react@18.3.23) + react: + specifier: ^18.0.0 + version: 18.3.1 + react-dom: + specifier: ^18.0.0 + version: 18.3.1(react@18.3.1) + sample-lib1: + specifier: workspace:* + version: link:../../packages/sample-lib1 + dependenciesMeta: + sample-lib1: + injected: true + devDependencies: + typescript: + specifier: ^5.8.3 + version: 5.8.3 + + apps/sample-app2: + dependencies: + '@types/react': + specifier: ^17.0.0 + version: 17.0.87 + '@types/react-dom': + specifier: ^17.0.0 + version: 17.0.26(@types/react@17.0.87) + react: + specifier: ^17.0.0 + version: 17.0.2 + react-dom: + specifier: ^17.0.0 + version: 17.0.2(react@17.0.2) + sample-lib1: + specifier: workspace:* + version: file:packages/sample-lib1(@rushstack/eslint-patch@1.11.0)(@rushstack/node-core-library@5.13.1(@types/node@22.15.30))(@types/react-dom@17.0.26(@types/react@17.0.87))(@types/react@17.0.87)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) + dependenciesMeta: + sample-lib1: + injected: true + devDependencies: + typescript: + specifier: ^5.8.3 + version: 5.8.3 + + packages/sample-lib1: + devDependencies: + '@rushstack/eslint-patch': + specifier: ^1.11.0 + version: 1.11.0 + '@rushstack/node-core-library': + specifier: ^5.13.0 + version: 5.13.1(@types/node@22.15.30) + '@types/react': + specifier: ^18.0.0 + version: 18.3.23 + '@types/react-dom': + specifier: ^18.0.0 + version: 18.3.7(@types/react@18.3.23) + react: + specifier: ^18.0.0 + version: 18.3.1 + react-dom: + specifier: ^18.0.0 + version: 18.3.1(react@18.3.1) + typescript: + specifier: ^5.8.3 + version: 5.8.3 + +packages: + + '@rushstack/eslint-patch@1.11.0': + resolution: {integrity: sha512-zxnHvoMQVqewTJr/W4pKjF0bMGiKJv1WX7bSrkl46Hg0QjESbzBROWK0Wg4RphzSOS5Jiy7eFimmM3UgMrMZbQ==} + + '@rushstack/node-core-library@5.13.1': + resolution: {integrity: sha512-5yXhzPFGEkVc9Fu92wsNJ9jlvdwz4RNb2bMso+/+TH0nMm1jDDDsOIf4l8GAkPxGuwPw5DH24RliWVfSPhlW/Q==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + + '@types/node@22.15.30': + resolution: {integrity: sha512-6Q7lr06bEHdlfplU6YRbgG1SFBdlsfNC4/lX+SkhiTs0cpJkOElmWls8PxDFv4yY/xKb8Y6SO0OmSX4wgqTZbA==} + + '@types/prop-types@15.7.14': + resolution: {integrity: sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==} + + '@types/react-dom@17.0.26': + resolution: {integrity: sha512-Z+2VcYXJwOqQ79HreLU/1fyQ88eXSSFh6I3JdrEHQIfYSI0kCQpTGvOrbE6jFGGYXKsHuwY9tBa/w5Uo6KzrEg==} + peerDependencies: + '@types/react': ^17.0.0 + + '@types/react-dom@18.3.7': + resolution: {integrity: sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==} + peerDependencies: + '@types/react': ^18.0.0 + + '@types/react@17.0.87': + resolution: {integrity: sha512-wpg9AbtJ6agjA+BKYmhG6dRWEU/2DHYwMzCaBzsz137ft6IyuqZ5fI4ic1DWL4DrI03Zy78IyVE6ucrXl0mu4g==} + + '@types/react@18.3.23': + resolution: {integrity: sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==} + + '@types/scheduler@0.16.8': + resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} + + ajv-draft-04@1.0.0: + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} + peerDependencies: + ajv: ^8.5.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv@8.13.0: + resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} + + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fs-extra@11.3.0: + resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} + engines: {node: '>=14.14'} + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + import-lazy@4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} + + is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} + engines: {node: '>= 0.4'} + + jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + + loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + + lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + react-dom@17.0.2: + resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} + peerDependencies: + react: 17.0.2 + + react-dom@18.3.1: + resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + peerDependencies: + react: ^18.3.1 + + react@17.0.2: + resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} + engines: {node: '>=0.10.0'} + + react@18.3.1: + resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} + hasBin: true + + sample-lib1@file:packages/sample-lib1: + resolution: {directory: packages/sample-lib1, type: directory} + peerDependencies: + '@rushstack/eslint-patch': '*' + '@rushstack/node-core-library': '*' + '@types/react': 17 || 18 + '@types/react-dom': 17 || 18 + react: 17 || 18 + react-dom: 17 || 18 + + scheduler@0.20.2: + resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} + + scheduler@0.23.2: + resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + + semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + +snapshots: + + '@rushstack/eslint-patch@1.11.0': {} + + '@rushstack/node-core-library@5.13.1(@types/node@22.15.30)': + dependencies: + ajv: 8.13.0 + ajv-draft-04: 1.0.0(ajv@8.13.0) + ajv-formats: 3.0.1(ajv@8.13.0) + fs-extra: 11.3.0 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.10 + semver: 7.5.4 + optionalDependencies: + '@types/node': 22.15.30 + + '@types/node@22.15.30': + dependencies: + undici-types: 6.21.0 + optional: true + + '@types/prop-types@15.7.14': {} + + '@types/react-dom@17.0.26(@types/react@17.0.87)': + dependencies: + '@types/react': 17.0.87 + + '@types/react-dom@18.3.7(@types/react@18.3.23)': + dependencies: + '@types/react': 18.3.23 + + '@types/react@17.0.87': + dependencies: + '@types/prop-types': 15.7.14 + '@types/scheduler': 0.16.8 + csstype: 3.1.3 + + '@types/react@18.3.23': + dependencies: + '@types/prop-types': 15.7.14 + csstype: 3.1.3 + + '@types/scheduler@0.16.8': {} + + ajv-draft-04@1.0.0(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + + ajv-formats@3.0.1(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + + ajv@8.13.0: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + + csstype@3.1.3: {} + + fast-deep-equal@3.1.3: {} + + fs-extra@11.3.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + function-bind@1.1.2: {} + + graceful-fs@4.2.11: {} + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + import-lazy@4.0.0: {} + + is-core-module@2.16.1: + dependencies: + hasown: 2.0.2 + + jju@1.4.0: {} + + js-tokens@4.0.0: {} + + json-schema-traverse@1.0.0: {} + + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + + loose-envify@1.4.0: + dependencies: + js-tokens: 4.0.0 + + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + + object-assign@4.1.1: {} + + path-parse@1.0.7: {} + + punycode@2.3.1: {} + + react-dom@17.0.2(react@17.0.2): + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react: 17.0.2 + scheduler: 0.20.2 + + react-dom@18.3.1(react@18.3.1): + dependencies: + loose-envify: 1.4.0 + react: 18.3.1 + scheduler: 0.23.2 + + react@17.0.2: + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + + react@18.3.1: + dependencies: + loose-envify: 1.4.0 + + require-from-string@2.0.2: {} + + resolve@1.22.10: + dependencies: + is-core-module: 2.16.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + sample-lib1@file:packages/sample-lib1(@rushstack/eslint-patch@1.11.0)(@rushstack/node-core-library@5.13.1(@types/node@22.15.30))(@types/react-dom@17.0.26(@types/react@17.0.87))(@types/react@17.0.87)(react-dom@17.0.2(react@17.0.2))(react@17.0.2): + dependencies: + '@rushstack/eslint-patch': 1.11.0 + '@rushstack/node-core-library': 5.13.1(@types/node@22.15.30) + '@types/react': 17.0.87 + '@types/react-dom': 17.0.26(@types/react@17.0.87) + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + + scheduler@0.20.2: + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + + scheduler@0.23.2: + dependencies: + loose-envify: 1.4.0 + + semver@7.5.4: + dependencies: + lru-cache: 6.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + typescript@5.8.3: {} + + undici-types@6.21.0: + optional: true + + universalify@2.0.1: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + yallist@4.0.0: {} diff --git a/tests/test-fixtures/pnpm-v10/pnpm-workspace.yaml b/tests/test-fixtures/pnpm-v10/pnpm-workspace.yaml new file mode 100644 index 0000000..e9b0dad --- /dev/null +++ b/tests/test-fixtures/pnpm-v10/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +packages: + - 'apps/*' + - 'packages/*' diff --git a/tests/test-fixtures/pnpm-v8/apps/sample-app1/package.json b/tests/test-fixtures/pnpm-v8/apps/sample-app1/package.json new file mode 100644 index 0000000..013a40a --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/apps/sample-app1/package.json @@ -0,0 +1,22 @@ +{ + "name": "sample-app1", + "version": "0.0.0", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "sample-lib1": "workspace:*" + }, + "devDependencies": { + "typescript": "^5.8.3" + }, + "dependenciesMeta": { + "sample-lib1": { + "injected": true + } + } +} diff --git a/tests/test-fixtures/pnpm-v8/apps/sample-app1/src/index.tsx b/tests/test-fixtures/pnpm-v8/apps/sample-app1/src/index.tsx new file mode 100644 index 0000000..7c8fcfa --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/apps/sample-app1/src/index.tsx @@ -0,0 +1,8 @@ +import { Lib1Component } from 'sample-lib1'; + +export const App1Component = () => ( +
+ {'I am from sample-app1.'} + +
+); diff --git a/tests/test-fixtures/pnpm-v8/apps/sample-app1/tsconfig.json b/tests/test-fixtures/pnpm-v8/apps/sample-app1/tsconfig.json new file mode 100644 index 0000000..73a2bf7 --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/apps/sample-app1/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig.app.base.json", + "compilerOptions": {}, + "include": ["src"] +} diff --git a/tests/test-fixtures/pnpm-v8/apps/sample-app2/package.json b/tests/test-fixtures/pnpm-v8/apps/sample-app2/package.json new file mode 100644 index 0000000..58ef1b9 --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/apps/sample-app2/package.json @@ -0,0 +1,22 @@ +{ + "name": "sample-app2", + "version": "0.0.0", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", + "react": "^17.0.0", + "react-dom": "^17.0.0", + "sample-lib1": "workspace:*" + }, + "devDependencies": { + "typescript": "^5.8.3" + }, + "dependenciesMeta": { + "sample-lib1": { + "injected": true + } + } +} diff --git a/tests/test-fixtures/pnpm-v8/apps/sample-app2/src/index.tsx b/tests/test-fixtures/pnpm-v8/apps/sample-app2/src/index.tsx new file mode 100644 index 0000000..4420f9d --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/apps/sample-app2/src/index.tsx @@ -0,0 +1,8 @@ +import { Lib1Component } from 'sample-lib1'; + +export const App2Component = () => ( +
+ {'I am from sample-app2.'} + +
+); diff --git a/tests/test-fixtures/pnpm-v8/apps/sample-app2/tsconfig.json b/tests/test-fixtures/pnpm-v8/apps/sample-app2/tsconfig.json new file mode 100644 index 0000000..73a2bf7 --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/apps/sample-app2/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig.app.base.json", + "compilerOptions": {}, + "include": ["src"] +} diff --git a/tests/test-fixtures/pnpm-v8/package.json b/tests/test-fixtures/pnpm-v8/package.json new file mode 100644 index 0000000..37d0011 --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/package.json @@ -0,0 +1,5 @@ +{ + "name": "pnpm-v8-workspace", + "version": "0.0.0", + "packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81" +} diff --git a/tests/test-fixtures/pnpm-v8/packages/sample-lib1/package.json b/tests/test-fixtures/pnpm-v8/packages/sample-lib1/package.json new file mode 100644 index 0000000..072e368 --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/packages/sample-lib1/package.json @@ -0,0 +1,34 @@ +{ + "name": "sample-lib1", + "version": "0.0.0", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsc" + }, + "dependencies": {}, + "devDependencies": { + "@rushstack/eslint-patch": "^1.11.0", + "@rushstack/node-core-library": "^5.13.0", + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "typescript": "^5.8.3" + }, + "peerDependencies": { + "@rushstack/eslint-patch": "*", + "@rushstack/node-core-library": "*", + "@types/react": "17 || 18", + "@types/react-dom": "17 || 18", + "react": "17 || 18", + "react-dom": "17 || 18" + } +} diff --git a/tests/test-fixtures/pnpm-v8/packages/sample-lib1/src/index.tsx b/tests/test-fixtures/pnpm-v8/packages/sample-lib1/src/index.tsx new file mode 100644 index 0000000..bb307a4 --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/packages/sample-lib1/src/index.tsx @@ -0,0 +1 @@ +export const Lib1Component = () =>
{'I am from sample-lib1'}
; diff --git a/tests/test-fixtures/pnpm-v8/packages/sample-lib1/tsconfig.json b/tests/test-fixtures/pnpm-v8/packages/sample-lib1/tsconfig.json new file mode 100644 index 0000000..368af83 --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/packages/sample-lib1/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../tsconfig.lib.base.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["src"] +} diff --git a/tests/test-fixtures/pnpm-v8/pnpm-lock.yaml b/tests/test-fixtures/pnpm-v8/pnpm-lock.yaml new file mode 100644 index 0000000..aa676ab --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/pnpm-lock.yaml @@ -0,0 +1,373 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: {} + + apps/sample-app1: + dependencies: + '@types/react': + specifier: ^18.0.0 + version: 18.3.23 + '@types/react-dom': + specifier: ^18.0.0 + version: 18.3.7(@types/react@18.3.23) + react: + specifier: ^18.0.0 + version: 18.3.1 + react-dom: + specifier: ^18.0.0 + version: 18.3.1(react@18.3.1) + sample-lib1: + specifier: workspace:* + version: file:packages/sample-lib1(@rushstack/eslint-patch@1.11.0)(@rushstack/node-core-library@5.13.1)(@types/react-dom@18.3.7)(@types/react@18.3.23)(react-dom@18.3.1)(react@18.3.1) + devDependencies: + typescript: + specifier: ^5.8.3 + version: 5.8.3 + dependenciesMeta: + sample-lib1: + injected: true + + apps/sample-app2: + dependencies: + '@types/react': + specifier: ^17.0.0 + version: 17.0.87 + '@types/react-dom': + specifier: ^17.0.0 + version: 17.0.26(@types/react@17.0.87) + react: + specifier: ^17.0.0 + version: 17.0.2 + react-dom: + specifier: ^17.0.0 + version: 17.0.2(react@17.0.2) + sample-lib1: + specifier: workspace:* + version: file:packages/sample-lib1(@rushstack/eslint-patch@1.11.0)(@rushstack/node-core-library@5.13.1)(@types/react-dom@17.0.26)(@types/react@17.0.87)(react-dom@17.0.2)(react@17.0.2) + devDependencies: + typescript: + specifier: ^5.8.3 + version: 5.8.3 + dependenciesMeta: + sample-lib1: + injected: true + + packages/sample-lib1: + devDependencies: + '@rushstack/eslint-patch': + specifier: ^1.11.0 + version: 1.11.0 + '@rushstack/node-core-library': + specifier: ^5.13.0 + version: 5.13.1 + '@types/react': + specifier: ^18.0.0 + version: 18.3.23 + '@types/react-dom': + specifier: ^18.0.0 + version: 18.3.7(@types/react@18.3.23) + react: + specifier: ^18.0.0 + version: 18.3.1 + react-dom: + specifier: ^18.0.0 + version: 18.3.1(react@18.3.1) + typescript: + specifier: ^5.8.3 + version: 5.8.3 + +packages: + + /@rushstack/eslint-patch@1.11.0: + resolution: {integrity: sha512-zxnHvoMQVqewTJr/W4pKjF0bMGiKJv1WX7bSrkl46Hg0QjESbzBROWK0Wg4RphzSOS5Jiy7eFimmM3UgMrMZbQ==} + + /@rushstack/node-core-library@5.13.1: + resolution: {integrity: sha512-5yXhzPFGEkVc9Fu92wsNJ9jlvdwz4RNb2bMso+/+TH0nMm1jDDDsOIf4l8GAkPxGuwPw5DH24RliWVfSPhlW/Q==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + ajv: 8.13.0 + ajv-draft-04: 1.0.0(ajv@8.13.0) + ajv-formats: 3.0.1(ajv@8.13.0) + fs-extra: 11.3.0 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.10 + semver: 7.5.4 + + /@types/prop-types@15.7.14: + resolution: {integrity: sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==} + + /@types/react-dom@17.0.26(@types/react@17.0.87): + resolution: {integrity: sha512-Z+2VcYXJwOqQ79HreLU/1fyQ88eXSSFh6I3JdrEHQIfYSI0kCQpTGvOrbE6jFGGYXKsHuwY9tBa/w5Uo6KzrEg==} + peerDependencies: + '@types/react': ^17.0.0 + dependencies: + '@types/react': 17.0.87 + dev: false + + /@types/react-dom@18.3.7(@types/react@18.3.23): + resolution: {integrity: sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==} + peerDependencies: + '@types/react': ^18.0.0 + dependencies: + '@types/react': 18.3.23 + + /@types/react@17.0.87: + resolution: {integrity: sha512-wpg9AbtJ6agjA+BKYmhG6dRWEU/2DHYwMzCaBzsz137ft6IyuqZ5fI4ic1DWL4DrI03Zy78IyVE6ucrXl0mu4g==} + dependencies: + '@types/prop-types': 15.7.14 + '@types/scheduler': 0.16.8 + csstype: 3.1.3 + dev: false + + /@types/react@18.3.23: + resolution: {integrity: sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==} + dependencies: + '@types/prop-types': 15.7.14 + csstype: 3.1.3 + + /@types/scheduler@0.16.8: + resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} + dev: false + + /ajv-draft-04@1.0.0(ajv@8.13.0): + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} + peerDependencies: + ajv: ^8.5.0 + peerDependenciesMeta: + ajv: + optional: true + dependencies: + ajv: 8.13.0 + + /ajv-formats@3.0.1(ajv@8.13.0): + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + dependencies: + ajv: 8.13.0 + + /ajv@8.13.0: + resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + + /csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + /fs-extra@11.3.0: + resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + /hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + + /import-lazy@4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} + + /is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} + engines: {node: '>= 0.4'} + dependencies: + hasown: 2.0.2 + + /jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + + /js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + /json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + + /loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + dependencies: + js-tokens: 4.0.0 + + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + + /object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + dev: false + + /path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + /react-dom@17.0.2(react@17.0.2): + resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} + peerDependencies: + react: 17.0.2 + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react: 17.0.2 + scheduler: 0.20.2 + dev: false + + /react-dom@18.3.1(react@18.3.1): + resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + peerDependencies: + react: ^18.3.1 + dependencies: + loose-envify: 1.4.0 + react: 18.3.1 + scheduler: 0.23.2 + + /react@17.0.2: + resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} + engines: {node: '>=0.10.0'} + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + dev: false + + /react@18.3.1: + resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + engines: {node: '>=0.10.0'} + dependencies: + loose-envify: 1.4.0 + + /require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + /resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} + hasBin: true + dependencies: + is-core-module: 2.16.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + /scheduler@0.20.2: + resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + dev: false + + /scheduler@0.23.2: + resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + dependencies: + loose-envify: 1.4.0 + + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + + /supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + /typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.3.1 + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + + file:packages/sample-lib1(@rushstack/eslint-patch@1.11.0)(@rushstack/node-core-library@5.13.1)(@types/react-dom@17.0.26)(@types/react@17.0.87)(react-dom@17.0.2)(react@17.0.2): + resolution: {directory: packages/sample-lib1, type: directory} + id: file:packages/sample-lib1 + name: sample-lib1 + peerDependencies: + '@rushstack/eslint-patch': '*' + '@rushstack/node-core-library': '*' + '@types/react': 17 || 18 + '@types/react-dom': 17 || 18 + react: 17 || 18 + react-dom: 17 || 18 + dependencies: + '@rushstack/eslint-patch': 1.11.0 + '@rushstack/node-core-library': 5.13.1 + '@types/react': 17.0.87 + '@types/react-dom': 17.0.26(@types/react@17.0.87) + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + dev: false + + file:packages/sample-lib1(@rushstack/eslint-patch@1.11.0)(@rushstack/node-core-library@5.13.1)(@types/react-dom@18.3.7)(@types/react@18.3.23)(react-dom@18.3.1)(react@18.3.1): + resolution: {directory: packages/sample-lib1, type: directory} + id: file:packages/sample-lib1 + name: sample-lib1 + peerDependencies: + '@rushstack/eslint-patch': '*' + '@rushstack/node-core-library': '*' + '@types/react': 17 || 18 + '@types/react-dom': 17 || 18 + react: 17 || 18 + react-dom: 17 || 18 + dependencies: + '@rushstack/eslint-patch': 1.11.0 + '@rushstack/node-core-library': 5.13.1 + '@types/react': 18.3.23 + '@types/react-dom': 18.3.7(@types/react@18.3.23) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + dev: false diff --git a/tests/test-fixtures/pnpm-v8/pnpm-workspace.yaml b/tests/test-fixtures/pnpm-v8/pnpm-workspace.yaml new file mode 100644 index 0000000..e9b0dad --- /dev/null +++ b/tests/test-fixtures/pnpm-v8/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +packages: + - 'apps/*' + - 'packages/*' diff --git a/tests/test-fixtures/pnpm-v9/apps/sample-app1/package.json b/tests/test-fixtures/pnpm-v9/apps/sample-app1/package.json new file mode 100644 index 0000000..013a40a --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/apps/sample-app1/package.json @@ -0,0 +1,22 @@ +{ + "name": "sample-app1", + "version": "0.0.0", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "sample-lib1": "workspace:*" + }, + "devDependencies": { + "typescript": "^5.8.3" + }, + "dependenciesMeta": { + "sample-lib1": { + "injected": true + } + } +} diff --git a/tests/test-fixtures/pnpm-v9/apps/sample-app1/src/index.tsx b/tests/test-fixtures/pnpm-v9/apps/sample-app1/src/index.tsx new file mode 100644 index 0000000..7c8fcfa --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/apps/sample-app1/src/index.tsx @@ -0,0 +1,8 @@ +import { Lib1Component } from 'sample-lib1'; + +export const App1Component = () => ( +
+ {'I am from sample-app1.'} + +
+); diff --git a/tests/test-fixtures/pnpm-v9/apps/sample-app1/tsconfig.json b/tests/test-fixtures/pnpm-v9/apps/sample-app1/tsconfig.json new file mode 100644 index 0000000..73a2bf7 --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/apps/sample-app1/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig.app.base.json", + "compilerOptions": {}, + "include": ["src"] +} diff --git a/tests/test-fixtures/pnpm-v9/apps/sample-app2/package.json b/tests/test-fixtures/pnpm-v9/apps/sample-app2/package.json new file mode 100644 index 0000000..58ef1b9 --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/apps/sample-app2/package.json @@ -0,0 +1,22 @@ +{ + "name": "sample-app2", + "version": "0.0.0", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", + "react": "^17.0.0", + "react-dom": "^17.0.0", + "sample-lib1": "workspace:*" + }, + "devDependencies": { + "typescript": "^5.8.3" + }, + "dependenciesMeta": { + "sample-lib1": { + "injected": true + } + } +} diff --git a/tests/test-fixtures/pnpm-v9/apps/sample-app2/src/index.tsx b/tests/test-fixtures/pnpm-v9/apps/sample-app2/src/index.tsx new file mode 100644 index 0000000..4420f9d --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/apps/sample-app2/src/index.tsx @@ -0,0 +1,8 @@ +import { Lib1Component } from 'sample-lib1'; + +export const App2Component = () => ( +
+ {'I am from sample-app2.'} + +
+); diff --git a/tests/test-fixtures/pnpm-v9/apps/sample-app2/tsconfig.json b/tests/test-fixtures/pnpm-v9/apps/sample-app2/tsconfig.json new file mode 100644 index 0000000..73a2bf7 --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/apps/sample-app2/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig.app.base.json", + "compilerOptions": {}, + "include": ["src"] +} diff --git a/tests/test-fixtures/pnpm-v9/package.json b/tests/test-fixtures/pnpm-v9/package.json new file mode 100644 index 0000000..3ca3fda --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/package.json @@ -0,0 +1,5 @@ +{ + "name": "pnpm-v9-workspace", + "version": "0.0.0", + "packageManager": "pnpm@9.14.4+sha512.c8180b3fbe4e4bca02c94234717896b5529740a6cbadf19fa78254270403ea2f27d4e1d46a08a0f56c89b63dc8ebfd3ee53326da720273794e6200fcf0d184ab" +} diff --git a/tests/test-fixtures/pnpm-v9/packages/sample-lib1/package.json b/tests/test-fixtures/pnpm-v9/packages/sample-lib1/package.json new file mode 100644 index 0000000..072e368 --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/packages/sample-lib1/package.json @@ -0,0 +1,34 @@ +{ + "name": "sample-lib1", + "version": "0.0.0", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsc" + }, + "dependencies": {}, + "devDependencies": { + "@rushstack/eslint-patch": "^1.11.0", + "@rushstack/node-core-library": "^5.13.0", + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "typescript": "^5.8.3" + }, + "peerDependencies": { + "@rushstack/eslint-patch": "*", + "@rushstack/node-core-library": "*", + "@types/react": "17 || 18", + "@types/react-dom": "17 || 18", + "react": "17 || 18", + "react-dom": "17 || 18" + } +} diff --git a/tests/test-fixtures/pnpm-v9/packages/sample-lib1/src/index.tsx b/tests/test-fixtures/pnpm-v9/packages/sample-lib1/src/index.tsx new file mode 100644 index 0000000..bb307a4 --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/packages/sample-lib1/src/index.tsx @@ -0,0 +1 @@ +export const Lib1Component = () =>
{'I am from sample-lib1'}
; diff --git a/tests/test-fixtures/pnpm-v9/packages/sample-lib1/tsconfig.json b/tests/test-fixtures/pnpm-v9/packages/sample-lib1/tsconfig.json new file mode 100644 index 0000000..368af83 --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/packages/sample-lib1/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../tsconfig.lib.base.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["src"] +} diff --git a/tests/test-fixtures/pnpm-v9/pnpm-lock.yaml b/tests/test-fixtures/pnpm-v9/pnpm-lock.yaml new file mode 100644 index 0000000..81b806b --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/pnpm-lock.yaml @@ -0,0 +1,446 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: {} + + apps/sample-app1: + dependencies: + '@types/react': + specifier: ^18.0.0 + version: 18.3.23 + '@types/react-dom': + specifier: ^18.0.0 + version: 18.3.7(@types/react@18.3.23) + react: + specifier: ^18.0.0 + version: 18.3.1 + react-dom: + specifier: ^18.0.0 + version: 18.3.1(react@18.3.1) + sample-lib1: + specifier: workspace:* + version: link:../../packages/sample-lib1 + devDependencies: + typescript: + specifier: ^5.8.3 + version: 5.8.3 + dependenciesMeta: + sample-lib1: + injected: true + + apps/sample-app2: + dependencies: + '@types/react': + specifier: ^17.0.0 + version: 17.0.87 + '@types/react-dom': + specifier: ^17.0.0 + version: 17.0.26(@types/react@17.0.87) + react: + specifier: ^17.0.0 + version: 17.0.2 + react-dom: + specifier: ^17.0.0 + version: 17.0.2(react@17.0.2) + sample-lib1: + specifier: workspace:* + version: file:packages/sample-lib1(@rushstack/eslint-patch@1.11.0)(@rushstack/node-core-library@5.13.1(@types/node@22.15.30))(@types/react-dom@17.0.26(@types/react@17.0.87))(@types/react@17.0.87)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) + devDependencies: + typescript: + specifier: ^5.8.3 + version: 5.8.3 + dependenciesMeta: + sample-lib1: + injected: true + + packages/sample-lib1: + devDependencies: + '@rushstack/eslint-patch': + specifier: ^1.11.0 + version: 1.11.0 + '@rushstack/node-core-library': + specifier: ^5.13.0 + version: 5.13.1(@types/node@22.15.30) + '@types/react': + specifier: ^18.0.0 + version: 18.3.23 + '@types/react-dom': + specifier: ^18.0.0 + version: 18.3.7(@types/react@18.3.23) + react: + specifier: ^18.0.0 + version: 18.3.1 + react-dom: + specifier: ^18.0.0 + version: 18.3.1(react@18.3.1) + typescript: + specifier: ^5.8.3 + version: 5.8.3 + +packages: + + '@rushstack/eslint-patch@1.11.0': + resolution: {integrity: sha512-zxnHvoMQVqewTJr/W4pKjF0bMGiKJv1WX7bSrkl46Hg0QjESbzBROWK0Wg4RphzSOS5Jiy7eFimmM3UgMrMZbQ==} + + '@rushstack/node-core-library@5.13.1': + resolution: {integrity: sha512-5yXhzPFGEkVc9Fu92wsNJ9jlvdwz4RNb2bMso+/+TH0nMm1jDDDsOIf4l8GAkPxGuwPw5DH24RliWVfSPhlW/Q==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + + '@types/node@22.15.30': + resolution: {integrity: sha512-6Q7lr06bEHdlfplU6YRbgG1SFBdlsfNC4/lX+SkhiTs0cpJkOElmWls8PxDFv4yY/xKb8Y6SO0OmSX4wgqTZbA==} + + '@types/prop-types@15.7.14': + resolution: {integrity: sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==} + + '@types/react-dom@17.0.26': + resolution: {integrity: sha512-Z+2VcYXJwOqQ79HreLU/1fyQ88eXSSFh6I3JdrEHQIfYSI0kCQpTGvOrbE6jFGGYXKsHuwY9tBa/w5Uo6KzrEg==} + peerDependencies: + '@types/react': ^17.0.0 + + '@types/react-dom@18.3.7': + resolution: {integrity: sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==} + peerDependencies: + '@types/react': ^18.0.0 + + '@types/react@17.0.87': + resolution: {integrity: sha512-wpg9AbtJ6agjA+BKYmhG6dRWEU/2DHYwMzCaBzsz137ft6IyuqZ5fI4ic1DWL4DrI03Zy78IyVE6ucrXl0mu4g==} + + '@types/react@18.3.23': + resolution: {integrity: sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==} + + '@types/scheduler@0.16.8': + resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} + + ajv-draft-04@1.0.0: + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} + peerDependencies: + ajv: ^8.5.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv@8.13.0: + resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} + + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fs-extra@11.3.0: + resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} + engines: {node: '>=14.14'} + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + import-lazy@4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} + + is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} + engines: {node: '>= 0.4'} + + jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + + loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + + lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + react-dom@17.0.2: + resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} + peerDependencies: + react: 17.0.2 + + react-dom@18.3.1: + resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + peerDependencies: + react: ^18.3.1 + + react@17.0.2: + resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} + engines: {node: '>=0.10.0'} + + react@18.3.1: + resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} + hasBin: true + + sample-lib1@file:packages/sample-lib1: + resolution: {directory: packages/sample-lib1, type: directory} + peerDependencies: + '@rushstack/eslint-patch': '*' + '@rushstack/node-core-library': '*' + '@types/react': 17 || 18 + '@types/react-dom': 17 || 18 + react: 17 || 18 + react-dom: 17 || 18 + + scheduler@0.20.2: + resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} + + scheduler@0.23.2: + resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + + semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + +snapshots: + + '@rushstack/eslint-patch@1.11.0': {} + + '@rushstack/node-core-library@5.13.1(@types/node@22.15.30)': + dependencies: + ajv: 8.13.0 + ajv-draft-04: 1.0.0(ajv@8.13.0) + ajv-formats: 3.0.1(ajv@8.13.0) + fs-extra: 11.3.0 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.10 + semver: 7.5.4 + optionalDependencies: + '@types/node': 22.15.30 + + '@types/node@22.15.30': + dependencies: + undici-types: 6.21.0 + optional: true + + '@types/prop-types@15.7.14': {} + + '@types/react-dom@17.0.26(@types/react@17.0.87)': + dependencies: + '@types/react': 17.0.87 + + '@types/react-dom@18.3.7(@types/react@18.3.23)': + dependencies: + '@types/react': 18.3.23 + + '@types/react@17.0.87': + dependencies: + '@types/prop-types': 15.7.14 + '@types/scheduler': 0.16.8 + csstype: 3.1.3 + + '@types/react@18.3.23': + dependencies: + '@types/prop-types': 15.7.14 + csstype: 3.1.3 + + '@types/scheduler@0.16.8': {} + + ajv-draft-04@1.0.0(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + + ajv-formats@3.0.1(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + + ajv@8.13.0: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + + csstype@3.1.3: {} + + fast-deep-equal@3.1.3: {} + + fs-extra@11.3.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + function-bind@1.1.2: {} + + graceful-fs@4.2.11: {} + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + import-lazy@4.0.0: {} + + is-core-module@2.16.1: + dependencies: + hasown: 2.0.2 + + jju@1.4.0: {} + + js-tokens@4.0.0: {} + + json-schema-traverse@1.0.0: {} + + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + + loose-envify@1.4.0: + dependencies: + js-tokens: 4.0.0 + + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + + object-assign@4.1.1: {} + + path-parse@1.0.7: {} + + punycode@2.3.1: {} + + react-dom@17.0.2(react@17.0.2): + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react: 17.0.2 + scheduler: 0.20.2 + + react-dom@18.3.1(react@18.3.1): + dependencies: + loose-envify: 1.4.0 + react: 18.3.1 + scheduler: 0.23.2 + + react@17.0.2: + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + + react@18.3.1: + dependencies: + loose-envify: 1.4.0 + + require-from-string@2.0.2: {} + + resolve@1.22.10: + dependencies: + is-core-module: 2.16.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + sample-lib1@file:packages/sample-lib1(@rushstack/eslint-patch@1.11.0)(@rushstack/node-core-library@5.13.1(@types/node@22.15.30))(@types/react-dom@17.0.26(@types/react@17.0.87))(@types/react@17.0.87)(react-dom@17.0.2(react@17.0.2))(react@17.0.2): + dependencies: + '@rushstack/eslint-patch': 1.11.0 + '@rushstack/node-core-library': 5.13.1(@types/node@22.15.30) + '@types/react': 17.0.87 + '@types/react-dom': 17.0.26(@types/react@17.0.87) + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + + scheduler@0.20.2: + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + + scheduler@0.23.2: + dependencies: + loose-envify: 1.4.0 + + semver@7.5.4: + dependencies: + lru-cache: 6.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + typescript@5.8.3: {} + + undici-types@6.21.0: + optional: true + + universalify@2.0.1: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + yallist@4.0.0: {} diff --git a/tests/test-fixtures/pnpm-v9/pnpm-workspace.yaml b/tests/test-fixtures/pnpm-v9/pnpm-workspace.yaml new file mode 100644 index 0000000..e9b0dad --- /dev/null +++ b/tests/test-fixtures/pnpm-v9/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +packages: + - 'apps/*' + - 'packages/*' diff --git a/tests/test-fixtures/tsconfig.app.base.json b/tests/test-fixtures/tsconfig.app.base.json new file mode 100644 index 0000000..8718efb --- /dev/null +++ b/tests/test-fixtures/tsconfig.app.base.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "module": "esnext", + "target": "esnext", + "strict": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "bundler", + "jsx": "react-jsx", + "noEmit": true + } +} diff --git a/tests/test-fixtures/tsconfig.lib.base.json b/tests/test-fixtures/tsconfig.lib.base.json new file mode 100644 index 0000000..e61abd5 --- /dev/null +++ b/tests/test-fixtures/tsconfig.lib.base.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "module": "esnext", + "target": "esnext", + "strict": true, + "declaration": true, + "esModuleInterop": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "bundler", + "jsx": "react-jsx" + } +}