@pnpm/installing.deps-restorer 1006.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ import type { DependenciesGraph, DepHierarchy } from '@pnpm/deps.graph-builder';
2
+ import { type DepsStateCache } from '@pnpm/deps.graph-hasher';
3
+ import type { StoreController } from '@pnpm/store.controller-types';
4
+ import type { AllowBuild } from '@pnpm/types';
5
+ export declare function linkHoistedModules(storeController: StoreController, graph: DependenciesGraph, prevGraph: DependenciesGraph, hierarchy: DepHierarchy, opts: {
6
+ allowBuild?: AllowBuild;
7
+ depsStateCache: DepsStateCache;
8
+ disableRelinkLocalDirDeps?: boolean;
9
+ force: boolean;
10
+ ignoreScripts: boolean;
11
+ lockfileDir: string;
12
+ preferSymlinkedExecutables?: boolean;
13
+ sideEffectsCacheRead: boolean;
14
+ }): Promise<void>;
@@ -0,0 +1,106 @@
1
+ import path from 'node:path';
2
+ import { linkBins } from '@pnpm/bins.linker';
3
+ import { progressLogger, removalLogger, statsLogger, } from '@pnpm/core-loggers';
4
+ import { calcDepState } from '@pnpm/deps.graph-hasher';
5
+ import { logger } from '@pnpm/logger';
6
+ import { rimraf } from '@zkochan/rimraf';
7
+ import pLimit from 'p-limit';
8
+ import { difference, isEmpty } from 'ramda';
9
+ const limitLinking = pLimit(16);
10
+ export async function linkHoistedModules(storeController, graph, prevGraph, hierarchy, opts) {
11
+ // TODO: remove nested node modules first
12
+ const dirsToRemove = difference(Object.keys(prevGraph), Object.keys(graph));
13
+ statsLogger.debug({
14
+ prefix: opts.lockfileDir,
15
+ removed: dirsToRemove.length,
16
+ });
17
+ // We should avoid removing unnecessary directories while simultaneously adding new ones.
18
+ // Doing so can sometimes lead to a race condition when linking commands to `node_modules/.bin`.
19
+ await Promise.all(dirsToRemove.map((dir) => tryRemoveDir(dir)));
20
+ await Promise.all(Object.entries(hierarchy)
21
+ .map(([parentDir, depsHierarchy]) => {
22
+ function warn(message) {
23
+ logger.info({
24
+ message,
25
+ prefix: parentDir,
26
+ });
27
+ }
28
+ return linkAllPkgsInOrder(storeController, graph, depsHierarchy, parentDir, {
29
+ ...opts,
30
+ warn,
31
+ });
32
+ }));
33
+ }
34
+ async function tryRemoveDir(dir) {
35
+ removalLogger.debug(dir);
36
+ try {
37
+ await rimraf(dir);
38
+ }
39
+ catch (err) { // eslint-disable-line
40
+ /* Just ignoring for now. Not even logging.
41
+ logger.warn({
42
+ error: err,
43
+ message: `Failed to remove "${pathToRemove}"`,
44
+ prefix: lockfileDir,
45
+ })
46
+ */
47
+ }
48
+ }
49
+ async function linkAllPkgsInOrder(storeController, graph, hierarchy, parentDir, opts) {
50
+ const _calcDepState = calcDepState.bind(null, graph, opts.depsStateCache);
51
+ await Promise.all(Object.entries(hierarchy).map(async ([dir, deps]) => {
52
+ const depNode = graph[dir];
53
+ if (depNode.fetching) {
54
+ let filesResponse;
55
+ try {
56
+ filesResponse = (await depNode.fetching()).files;
57
+ }
58
+ catch (err) { // eslint-disable-line
59
+ if (depNode.optional)
60
+ return;
61
+ throw err;
62
+ }
63
+ depNode.requiresBuild = filesResponse.requiresBuild;
64
+ let sideEffectsCacheKey;
65
+ if (opts.sideEffectsCacheRead && filesResponse.sideEffectsMaps && !isEmpty(filesResponse.sideEffectsMaps)) {
66
+ if (opts?.allowBuild?.(depNode.name, depNode.version) !== false) {
67
+ sideEffectsCacheKey = _calcDepState(dir, {
68
+ includeDepGraphHash: !opts.ignoreScripts && depNode.requiresBuild, // true when is built
69
+ patchFileHash: depNode.patch?.hash,
70
+ });
71
+ }
72
+ }
73
+ // Limiting the concurrency here fixes an out of memory error.
74
+ // It is not clear why it helps as importing is also limited inside fs.indexed-pkg-importer.
75
+ // The out of memory error was reproduced on the teambit/bit repository with the "rootComponents" feature turned on
76
+ await limitLinking(async () => {
77
+ const { importMethod, isBuilt } = await storeController.importPackage(depNode.dir, {
78
+ filesResponse,
79
+ force: true,
80
+ disableRelinkLocalDirDeps: opts.disableRelinkLocalDirDeps,
81
+ keepModulesDir: true,
82
+ requiresBuild: depNode.patch != null || depNode.requiresBuild,
83
+ sideEffectsCacheKey,
84
+ });
85
+ if (importMethod) {
86
+ progressLogger.debug({
87
+ method: importMethod,
88
+ requester: opts.lockfileDir,
89
+ status: 'imported',
90
+ to: depNode.dir,
91
+ });
92
+ }
93
+ depNode.isBuilt = isBuilt;
94
+ });
95
+ }
96
+ return linkAllPkgsInOrder(storeController, graph, deps, dir, opts);
97
+ }));
98
+ const modulesDir = path.join(parentDir, 'node_modules');
99
+ const binsDir = path.join(modulesDir, '.bin');
100
+ await linkBins(modulesDir, binsDir, {
101
+ allowExoticManifests: true,
102
+ preferSymlinkedExecutables: opts.preferSymlinkedExecutables,
103
+ warn: opts.warn,
104
+ });
105
+ }
106
+ //# sourceMappingURL=linkHoistedModules.js.map
@@ -0,0 +1,38 @@
1
+ import type { LockfileToDepGraphResult } from '@pnpm/deps.graph-builder';
2
+ import { type HoistingLimits } from '@pnpm/installing.linking.real-hoist';
3
+ import type { IncludedDependencies } from '@pnpm/installing.modules-yaml';
4
+ import type { LockfileObject } from '@pnpm/lockfile.fs';
5
+ import { type PatchGroupRecord } from '@pnpm/patching.config';
6
+ import type { StoreController } from '@pnpm/store.controller-types';
7
+ import type { AllowBuild, Registries, SupportedArchitectures } from '@pnpm/types';
8
+ export interface LockfileToHoistedDepGraphOptions {
9
+ allowBuild?: AllowBuild;
10
+ autoInstallPeers: boolean;
11
+ engineStrict: boolean;
12
+ force: boolean;
13
+ hoistingLimits?: HoistingLimits;
14
+ externalDependencies?: Set<string>;
15
+ importerIds: string[];
16
+ include: IncludedDependencies;
17
+ ignoreScripts: boolean;
18
+ /**
19
+ * When true, skip fetching local dependencies (file: protocol pointing to directories).
20
+ * This is used by `pnpm fetch` which only downloads packages from the registry
21
+ * and doesn't need local packages that won't be available (e.g., in Docker builds).
22
+ */
23
+ ignoreLocalPackages?: boolean;
24
+ currentHoistedLocations?: Record<string, string[]>;
25
+ lockfileDir: string;
26
+ modulesDir?: string;
27
+ nodeVersion: string;
28
+ pnpmVersion: string;
29
+ registries: Registries;
30
+ patchedDependencies?: PatchGroupRecord;
31
+ sideEffectsCacheRead: boolean;
32
+ skipped: Set<string>;
33
+ storeController: StoreController;
34
+ storeDir: string;
35
+ virtualStoreDir: string;
36
+ supportedArchitectures?: SupportedArchitectures;
37
+ }
38
+ export declare function lockfileToHoistedDepGraph(lockfile: LockfileObject, currentLockfile: LockfileObject | null, opts: LockfileToHoistedDepGraphOptions): Promise<LockfileToDepGraphResult>;
@@ -0,0 +1,251 @@
1
+ import path from 'node:path';
2
+ import { packageIsInstallable } from '@pnpm/config.package-is-installable';
3
+ import * as dp from '@pnpm/deps.path';
4
+ import { hoist } from '@pnpm/installing.linking.real-hoist';
5
+ import { nameVerFromPkgSnapshot, packageIdFromSnapshot, pkgSnapshotToResolution, } from '@pnpm/lockfile.utils';
6
+ import { logger } from '@pnpm/logger';
7
+ import { getPatchInfo } from '@pnpm/patching.config';
8
+ import { safeReadPackageJsonFromDir } from '@pnpm/pkg-manifest.reader';
9
+ import { pathExists } from 'path-exists';
10
+ export async function lockfileToHoistedDepGraph(lockfile, currentLockfile, opts) {
11
+ let prevGraph;
12
+ if (currentLockfile?.packages != null) {
13
+ prevGraph = (await _lockfileToHoistedDepGraph(currentLockfile, {
14
+ ...opts,
15
+ force: true,
16
+ skipped: new Set(),
17
+ })).graph;
18
+ }
19
+ else {
20
+ prevGraph = {};
21
+ }
22
+ return {
23
+ ...(await _lockfileToHoistedDepGraph(lockfile, opts)),
24
+ prevGraph,
25
+ };
26
+ }
27
+ async function _lockfileToHoistedDepGraph(lockfile, opts) {
28
+ const tree = hoist(lockfile, {
29
+ hoistingLimits: opts.hoistingLimits,
30
+ externalDependencies: opts.externalDependencies,
31
+ autoInstallPeers: opts.autoInstallPeers,
32
+ });
33
+ const graph = {};
34
+ const modulesDir = path.join(opts.lockfileDir, opts.modulesDir ?? 'node_modules');
35
+ const fetchDepsOpts = {
36
+ ...opts,
37
+ lockfile,
38
+ graph,
39
+ pkgLocationsByDepPath: {},
40
+ injectionTargetsByDepPath: new Map(),
41
+ hoistedLocations: {},
42
+ };
43
+ const hierarchy = {
44
+ [opts.lockfileDir]: await fetchDeps(fetchDepsOpts, modulesDir, tree.dependencies),
45
+ };
46
+ const directDependenciesByImporterId = {
47
+ '.': directDepsMap(Object.keys(hierarchy[opts.lockfileDir]), graph),
48
+ };
49
+ const symlinkedDirectDependenciesByImporterId = { '.': {} };
50
+ await Promise.all(Array.from(tree.dependencies).map(async (rootDep) => {
51
+ const reference = Array.from(rootDep.references)[0];
52
+ if (reference.startsWith('workspace:')) {
53
+ const importerId = reference.replace('workspace:', '');
54
+ const projectDir = path.join(opts.lockfileDir, importerId);
55
+ const modulesDir = path.join(projectDir, 'node_modules');
56
+ const nextHierarchy = (await fetchDeps(fetchDepsOpts, modulesDir, rootDep.dependencies));
57
+ hierarchy[projectDir] = nextHierarchy;
58
+ const importer = lockfile.importers[importerId];
59
+ const importerDir = path.join(opts.lockfileDir, importerId);
60
+ symlinkedDirectDependenciesByImporterId[importerId] = pickLinkedDirectDeps(importer, importerDir, opts.include);
61
+ directDependenciesByImporterId[importerId] = directDepsMap(Object.keys(nextHierarchy), graph);
62
+ }
63
+ }));
64
+ return {
65
+ directDependenciesByImporterId,
66
+ graph,
67
+ hierarchy,
68
+ symlinkedDirectDependenciesByImporterId,
69
+ hoistedLocations: fetchDepsOpts.hoistedLocations,
70
+ injectionTargetsByDepPath: fetchDepsOpts.injectionTargetsByDepPath,
71
+ };
72
+ }
73
+ function directDepsMap(directDepDirs, graph) {
74
+ const acc = {};
75
+ for (const dir of directDepDirs) {
76
+ acc[graph[dir].alias] = dir;
77
+ }
78
+ return acc;
79
+ }
80
+ function pickLinkedDirectDeps(importer, importerDir, include) {
81
+ const rootDeps = {
82
+ ...(include.devDependencies ? importer.devDependencies : {}),
83
+ ...(include.dependencies ? importer.dependencies : {}),
84
+ ...(include.optionalDependencies ? importer.optionalDependencies : {}),
85
+ };
86
+ const directDeps = {};
87
+ for (const alias in rootDeps) {
88
+ const ref = rootDeps[alias];
89
+ if (ref.startsWith('link:')) {
90
+ directDeps[alias] = path.resolve(importerDir, ref.slice(5));
91
+ }
92
+ }
93
+ return directDeps;
94
+ }
95
+ async function fetchDeps(opts, modules, deps) {
96
+ const depHierarchy = {};
97
+ await Promise.all(Array.from(deps).map(async (dep) => {
98
+ const depPath = Array.from(dep.references)[0];
99
+ if (opts.skipped.has(depPath) || depPath.startsWith('workspace:'))
100
+ return;
101
+ const pkgSnapshot = opts.lockfile.packages[depPath];
102
+ if (!pkgSnapshot) {
103
+ // it is a link
104
+ return;
105
+ }
106
+ const { name: pkgName, version: pkgVersion } = nameVerFromPkgSnapshot(depPath, pkgSnapshot);
107
+ const packageId = packageIdFromSnapshot(depPath, pkgSnapshot);
108
+ const pkgIdWithPatchHash = dp.getPkgIdWithPatchHash(depPath);
109
+ const pkg = {
110
+ name: pkgName,
111
+ version: pkgVersion,
112
+ engines: pkgSnapshot.engines,
113
+ cpu: pkgSnapshot.cpu,
114
+ os: pkgSnapshot.os,
115
+ libc: pkgSnapshot.libc,
116
+ };
117
+ if (!opts.force &&
118
+ packageIsInstallable(packageId, pkg, {
119
+ engineStrict: opts.engineStrict,
120
+ lockfileDir: opts.lockfileDir,
121
+ nodeVersion: opts.nodeVersion,
122
+ optional: pkgSnapshot.optional === true,
123
+ supportedArchitectures: opts.supportedArchitectures,
124
+ }) === false) {
125
+ opts.skipped.add(depPath);
126
+ return;
127
+ }
128
+ const isDirectoryDep = 'directory' in pkgSnapshot.resolution && pkgSnapshot.resolution.directory != null;
129
+ if (isDirectoryDep && opts.ignoreLocalPackages) {
130
+ logger.info({
131
+ message: `Skipping local dependency ${pkgName}@${pkgVersion} (file: protocol)`,
132
+ prefix: opts.lockfileDir,
133
+ });
134
+ return;
135
+ }
136
+ const dir = path.join(modules, dep.name);
137
+ const depLocation = path.relative(opts.lockfileDir, dir);
138
+ const resolution = pkgSnapshotToResolution(depPath, pkgSnapshot, opts.registries);
139
+ let fetchResponse;
140
+ // We check for the existence of the package inside node_modules.
141
+ // It will only be missing if the user manually removed it.
142
+ // That shouldn't normally happen but Bit CLI does remove node_modules in component directories:
143
+ // https://github.com/teambit/bit/blob/5e1eed7cd122813ad5ea124df956ee89d661d770/scopes/dependencies/dependency-resolver/dependency-installer.ts#L169
144
+ //
145
+ // We also verify that the package that is present has the expected version.
146
+ // This check is required because there is no guarantee the modules manifest and current lockfile were
147
+ // successfully saved after node_modules was changed during installation.
148
+ const skipFetch = opts.currentHoistedLocations?.[depPath]?.includes(depLocation) &&
149
+ await dirHasPackageJsonWithVersion(path.join(opts.lockfileDir, depLocation), pkgVersion);
150
+ const pkgResolution = {
151
+ id: packageId,
152
+ resolution,
153
+ name: pkgName,
154
+ version: pkgVersion,
155
+ };
156
+ if (skipFetch) {
157
+ const { filesIndexFile } = opts.storeController.getFilesIndexFilePath({
158
+ ignoreScripts: opts.ignoreScripts,
159
+ pkg: pkgResolution,
160
+ });
161
+ fetchResponse = { filesIndexFile };
162
+ }
163
+ else {
164
+ try {
165
+ fetchResponse = opts.storeController.fetchPackage({
166
+ allowBuild: opts.allowBuild,
167
+ force: false,
168
+ lockfileDir: opts.lockfileDir,
169
+ ignoreScripts: opts.ignoreScripts,
170
+ pkg: pkgResolution,
171
+ supportedArchitectures: opts.supportedArchitectures,
172
+ });
173
+ if (fetchResponse instanceof Promise)
174
+ fetchResponse = await fetchResponse;
175
+ }
176
+ catch (err) {
177
+ if (pkgSnapshot.optional)
178
+ return;
179
+ throw err;
180
+ }
181
+ }
182
+ opts.graph[dir] = {
183
+ alias: dep.name,
184
+ children: {},
185
+ depPath,
186
+ pkgIdWithPatchHash,
187
+ dir,
188
+ fetching: fetchResponse.fetching,
189
+ filesIndexFile: fetchResponse.filesIndexFile,
190
+ hasBin: pkgSnapshot.hasBin === true,
191
+ hasBundledDependencies: pkgSnapshot.bundledDependencies != null,
192
+ modules,
193
+ name: pkgName,
194
+ version: pkgVersion,
195
+ optional: !!pkgSnapshot.optional,
196
+ optionalDependencies: new Set(Object.keys(pkgSnapshot.optionalDependencies ?? {})),
197
+ patch: getPatchInfo(opts.patchedDependencies, pkgName, pkgVersion),
198
+ resolution: pkgSnapshot.resolution,
199
+ };
200
+ if (!opts.pkgLocationsByDepPath[depPath]) {
201
+ opts.pkgLocationsByDepPath[depPath] = [];
202
+ }
203
+ opts.pkgLocationsByDepPath[depPath].push(dir);
204
+ // Track directory deps for injected workspace packages
205
+ if ('directory' in pkgSnapshot.resolution && pkgSnapshot.resolution.directory != null) {
206
+ const locations = opts.injectionTargetsByDepPath.get(depPath);
207
+ if (locations) {
208
+ locations.push(dir);
209
+ }
210
+ else {
211
+ opts.injectionTargetsByDepPath.set(depPath, [dir]);
212
+ }
213
+ }
214
+ depHierarchy[dir] = await fetchDeps(opts, path.join(dir, 'node_modules'), dep.dependencies);
215
+ if (!opts.hoistedLocations[depPath]) {
216
+ opts.hoistedLocations[depPath] = [];
217
+ }
218
+ opts.hoistedLocations[depPath].push(depLocation);
219
+ opts.graph[dir].children = getChildren(pkgSnapshot, opts.pkgLocationsByDepPath, opts);
220
+ }));
221
+ return depHierarchy;
222
+ }
223
+ async function dirHasPackageJsonWithVersion(dir, expectedVersion) {
224
+ if (!expectedVersion)
225
+ return pathExists(dir);
226
+ try {
227
+ const manifest = await safeReadPackageJsonFromDir(dir);
228
+ return manifest?.version === expectedVersion;
229
+ }
230
+ catch (err) {
231
+ if (err?.code === 'ENOENT') {
232
+ return pathExists(dir);
233
+ }
234
+ throw err;
235
+ }
236
+ }
237
+ function getChildren(pkgSnapshot, pkgLocationsByDepPath, opts) {
238
+ const allDeps = {
239
+ ...pkgSnapshot.dependencies,
240
+ ...(opts.include.optionalDependencies ? pkgSnapshot.optionalDependencies : {}),
241
+ };
242
+ const children = {};
243
+ for (const [childName, childRef] of Object.entries(allDeps)) {
244
+ const childDepPath = dp.refToRelative(childRef, childName);
245
+ if (childDepPath && pkgLocationsByDepPath[childDepPath]) {
246
+ children[childName] = pkgLocationsByDepPath[childDepPath][0];
247
+ }
248
+ }
249
+ return children;
250
+ }
251
+ //# sourceMappingURL=lockfileToHoistedDepGraph.js.map
package/package.json ADDED
@@ -0,0 +1,108 @@
1
+ {
2
+ "name": "@pnpm/installing.deps-restorer",
3
+ "version": "1006.0.0",
4
+ "description": "Fast installation using only pnpm-lock.yaml",
5
+ "keywords": [
6
+ "pnpm",
7
+ "pnpm11",
8
+ "install",
9
+ "installer"
10
+ ],
11
+ "license": "MIT",
12
+ "funding": "https://opencollective.com/pnpm",
13
+ "repository": "https://github.com/pnpm/pnpm/tree/main/installing/deps-restorer",
14
+ "homepage": "https://github.com/pnpm/pnpm/tree/main/installing/deps-restorer#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/pnpm/pnpm/issues"
17
+ },
18
+ "type": "module",
19
+ "main": "lib/index.js",
20
+ "types": "lib/index.d.ts",
21
+ "exports": {
22
+ ".": "./lib/index.js"
23
+ },
24
+ "files": [
25
+ "lib",
26
+ "!*.map"
27
+ ],
28
+ "directories": {
29
+ "test": "test"
30
+ },
31
+ "dependencies": {
32
+ "@zkochan/rimraf": "^4.0.0",
33
+ "p-limit": "^7.1.0",
34
+ "path-absolute": "^2.0.0",
35
+ "path-exists": "^5.0.0",
36
+ "ramda": "npm:@pnpm/ramda@0.28.1",
37
+ "realpath-missing": "^2.0.0",
38
+ "@pnpm/bins.linker": "1000.2.6",
39
+ "@pnpm/building.policy": "1000.0.0-0",
40
+ "@pnpm/building.during-install": "1000.0.0-0",
41
+ "@pnpm/config.package-is-installable": "1000.0.15",
42
+ "@pnpm/constants": "1001.3.1",
43
+ "@pnpm/deps.graph-builder": "1002.3.0",
44
+ "@pnpm/core-loggers": "1001.0.4",
45
+ "@pnpm/deps.graph-hasher": "1002.0.8",
46
+ "@pnpm/error": "1000.0.5",
47
+ "@pnpm/exec.lifecycle": "1001.0.25",
48
+ "@pnpm/fs.symlink-dependency": "1000.0.12",
49
+ "@pnpm/deps.path": "1001.1.3",
50
+ "@pnpm/installing.linking.direct-dep-linker": "1000.0.12",
51
+ "@pnpm/installing.linking.hoist": "1002.0.8",
52
+ "@pnpm/installing.linking.modules-cleaner": "1001.0.23",
53
+ "@pnpm/installing.linking.real-hoist": "1001.0.20",
54
+ "@pnpm/installing.modules-yaml": "1000.3.6",
55
+ "@pnpm/installing.package-requester": "1008.0.0",
56
+ "@pnpm/lockfile.filtering": "1001.0.21",
57
+ "@pnpm/lockfile.utils": "1003.0.3",
58
+ "@pnpm/lockfile.to-pnp": "1001.0.23",
59
+ "@pnpm/pkg-manifest.reader": "1000.1.2",
60
+ "@pnpm/lockfile.fs": "1001.1.21",
61
+ "@pnpm/store.controller-types": "1004.1.0",
62
+ "@pnpm/patching.config": "1001.0.11",
63
+ "@pnpm/types": "1000.9.0",
64
+ "@pnpm/workspace.project-manifest-reader": "1001.1.4"
65
+ },
66
+ "peerDependencies": {
67
+ "@pnpm/logger": ">=1001.0.0 <1002.0.0",
68
+ "@pnpm/worker": "^1000.3.0"
69
+ },
70
+ "devDependencies": {
71
+ "@jest/globals": "30.0.5",
72
+ "@pnpm/registry-mock": "5.2.4",
73
+ "@types/fs-extra": "^9.0.13",
74
+ "@types/ramda": "0.29.12",
75
+ "concurrently": "9.2.1",
76
+ "isexe": "2.0.0",
77
+ "load-json-file": "^7.0.1",
78
+ "tempy": "3.0.0",
79
+ "write-json-file": "^7.0.0",
80
+ "@pnpm/installing.deps-restorer": "1006.0.0",
81
+ "@pnpm/crypto.object-hasher": "1000.1.0",
82
+ "@pnpm/installing.read-projects-context": "1000.0.24",
83
+ "@pnpm/assert-project": "1000.0.4",
84
+ "@pnpm/logger": "1001.0.1",
85
+ "@pnpm/prepare": "1000.0.4",
86
+ "@pnpm/store.cafs": "1000.0.19",
87
+ "@pnpm/store.path": "1000.0.5",
88
+ "@pnpm/store.index": "1000.0.0-0",
89
+ "@pnpm/test-fixtures": "1000.0.0",
90
+ "@pnpm/testing.temp-store": "1000.0.23",
91
+ "@pnpm/test-ipc-server": "1000.0.0"
92
+ },
93
+ "engines": {
94
+ "node": ">=22.13"
95
+ },
96
+ "jest": {
97
+ "preset": "@pnpm/jest-config/with-registry"
98
+ },
99
+ "scripts": {
100
+ "start": "tsgo --watch",
101
+ "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
102
+ "_test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest",
103
+ "test": "pnpm run compile && pnpm run _test",
104
+ "runPrepareFixtures": "node ../../pnpm/bin/pnpm.mjs i -r -C test/fixtures --no-shared-workspace-lockfile --no-link-workspace-packages --lockfile-only --registry http://localhost:4873/ --ignore-scripts --force --no-strict-peer-dependencies",
105
+ "prepareFixtures": "git clean -fdx test/fixtures && rm -rf \"test/fixtures/*/pnpm-lock.yaml\" && registry-mock prepare && concurrently --success=first --kill-others registry-mock \"pnpm run runPrepareFixtures\"",
106
+ "compile": "tsgo --build && pnpm run lint --fix"
107
+ }
108
+ }