pnpm 9.0.6 → 9.1.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.
- package/dist/node_modules/.modules.yaml +2 -2
- package/dist/pnpm.cjs +152 -68
- package/package.json +1 -1
|
@@ -202,9 +202,9 @@ included:
|
|
|
202
202
|
injectedDeps: {}
|
|
203
203
|
layoutVersion: 5
|
|
204
204
|
nodeLinker: hoisted
|
|
205
|
-
packageManager: pnpm@9.0.
|
|
205
|
+
packageManager: pnpm@9.0.6
|
|
206
206
|
pendingBuilds: []
|
|
207
|
-
prunedAt:
|
|
207
|
+
prunedAt: Mon, 29 Apr 2024 14:13:11 GMT
|
|
208
208
|
publicHoistPattern:
|
|
209
209
|
- '*eslint*'
|
|
210
210
|
- '*prettier*'
|
package/dist/pnpm.cjs
CHANGED
|
@@ -3357,7 +3357,7 @@ var require_lib4 = __commonJS({
|
|
|
3357
3357
|
var load_json_file_1 = __importDefault2(require_load_json_file());
|
|
3358
3358
|
var defaultManifest = {
|
|
3359
3359
|
name: true ? "pnpm" : "pnpm",
|
|
3360
|
-
version: true ? "9.0
|
|
3360
|
+
version: true ? "9.1.0-0" : "0.0.0"
|
|
3361
3361
|
};
|
|
3362
3362
|
var pkgJson;
|
|
3363
3363
|
if (require.main == null) {
|
|
@@ -22243,6 +22243,7 @@ var require_lib21 = __commonJS({
|
|
|
22243
22243
|
"use-stderr": Boolean,
|
|
22244
22244
|
"verify-store-integrity": Boolean,
|
|
22245
22245
|
"virtual-store-dir": String,
|
|
22246
|
+
"virtual-store-dir-max-length": Number,
|
|
22246
22247
|
"workspace-concurrency": Number,
|
|
22247
22248
|
"workspace-packages": [String, Array],
|
|
22248
22249
|
"workspace-root": Boolean,
|
|
@@ -22352,7 +22353,8 @@ var require_lib21 = __commonJS({
|
|
|
22352
22353
|
"workspace-concurrency": 4,
|
|
22353
22354
|
"workspace-prefix": opts.workspaceDir,
|
|
22354
22355
|
"embed-readme": false,
|
|
22355
|
-
"registry-supports-time-field": false
|
|
22356
|
+
"registry-supports-time-field": false,
|
|
22357
|
+
"virtual-store-dir-max-length": 120
|
|
22356
22358
|
};
|
|
22357
22359
|
const { config: npmConfig, warnings, failedToLoadBuiltInConfig } = (0, npm_conf_1.default)(cliOptions, rcOptionsTypes, defaultOptions);
|
|
22358
22360
|
const configDir = (0, dirs_1.getConfigDir)(process);
|
|
@@ -112987,14 +112989,13 @@ var require_lib87 = __commonJS({
|
|
|
112987
112989
|
return {};
|
|
112988
112990
|
}
|
|
112989
112991
|
exports2.parse = parse2;
|
|
112990
|
-
|
|
112991
|
-
function depPathToFilename(depPath) {
|
|
112992
|
+
function depPathToFilename(depPath, maxLengthWithoutHash) {
|
|
112992
112993
|
let filename = depPathToFilenameUnescaped(depPath).replace(/[\\/:*?"<>|]/g, "+");
|
|
112993
112994
|
if (filename.includes("(")) {
|
|
112994
112995
|
filename = filename.replace(/\)$/, "").replace(/(\)\()|\(|\)/g, "_");
|
|
112995
112996
|
}
|
|
112996
|
-
if (filename.length >
|
|
112997
|
-
return `${filename.substring(0,
|
|
112997
|
+
if (filename.length > maxLengthWithoutHash || filename !== filename.toLowerCase() && !filename.startsWith("file+")) {
|
|
112998
|
+
return `${filename.substring(0, maxLengthWithoutHash - 27)}_${(0, crypto_base32_hash_1.createBase32Hash)(filename)}`;
|
|
112998
112999
|
}
|
|
112999
113000
|
return filename;
|
|
113000
113001
|
}
|
|
@@ -113140,7 +113141,7 @@ var require_extendProjectsWithTargetDirs = __commonJS({
|
|
|
113140
113141
|
var packageIdFromSnapshot_1 = require_packageIdFromSnapshot();
|
|
113141
113142
|
var nameVerFromPkgSnapshot_1 = require_nameVerFromPkgSnapshot();
|
|
113142
113143
|
function extendProjectsWithTargetDirs(projects, lockfile, ctx) {
|
|
113143
|
-
const getLocalLocations = ctx.pkgLocationsByDepPath != null ? (depPath) => ctx.pkgLocationsByDepPath[depPath] : (depPath, pkgName) => [path_1.default.join(ctx.virtualStoreDir, (0, dependency_path_1.depPathToFilename)(depPath), "node_modules", pkgName)];
|
|
113144
|
+
const getLocalLocations = ctx.pkgLocationsByDepPath != null ? (depPath) => ctx.pkgLocationsByDepPath[depPath] : (depPath, pkgName) => [path_1.default.join(ctx.virtualStoreDir, (0, dependency_path_1.depPathToFilename)(depPath, ctx.virtualStoreDirMaxLength), "node_modules", pkgName)];
|
|
113144
113145
|
const projectsById = Object.fromEntries(projects.map((project) => [project.id, { ...project, targetDirs: [] }]));
|
|
113145
113146
|
Object.entries(lockfile.packages ?? {}).forEach(([depPath, pkg]) => {
|
|
113146
113147
|
if (pkg.resolution?.type !== "directory")
|
|
@@ -114948,6 +114949,9 @@ var require_lib95 = __commonJS({
|
|
|
114948
114949
|
if (!modules.prunedAt) {
|
|
114949
114950
|
modules.prunedAt = (/* @__PURE__ */ new Date()).toUTCString();
|
|
114950
114951
|
}
|
|
114952
|
+
if (!modules.virtualStoreDirMaxLength) {
|
|
114953
|
+
modules.virtualStoreDirMaxLength = 120;
|
|
114954
|
+
}
|
|
114951
114955
|
return modules;
|
|
114952
114956
|
}
|
|
114953
114957
|
exports2.readModulesManifest = readModulesManifest;
|
|
@@ -115095,7 +115099,7 @@ var require_getPkgInfo = __commonJS({
|
|
|
115095
115099
|
if (!version2) {
|
|
115096
115100
|
version2 = opts.ref;
|
|
115097
115101
|
}
|
|
115098
|
-
const fullPackagePath = depPath ? path_1.default.join(opts.virtualStoreDir ?? ".pnpm", (0, dependency_path_1.depPathToFilename)(depPath), "node_modules", name) : path_1.default.join(opts.linkedPathBaseDir, opts.ref.slice(5));
|
|
115102
|
+
const fullPackagePath = depPath ? path_1.default.join(opts.virtualStoreDir ?? ".pnpm", (0, dependency_path_1.depPathToFilename)(depPath, opts.virtualStoreDirMaxLength), "node_modules", name) : path_1.default.join(opts.linkedPathBaseDir, opts.ref.slice(5));
|
|
115099
115103
|
if (version2.startsWith("link:") && opts.rewriteLinkVersionDir) {
|
|
115100
115104
|
version2 = `link:${(0, normalize_path_1.default)(path_1.default.relative(opts.rewriteLinkVersionDir, fullPackagePath))}`;
|
|
115101
115105
|
}
|
|
@@ -115309,7 +115313,8 @@ var require_getTree = __commonJS({
|
|
|
115309
115313
|
registries: opts.registries,
|
|
115310
115314
|
skipped: opts.skipped,
|
|
115311
115315
|
wantedPackages: opts.wantedPackages,
|
|
115312
|
-
virtualStoreDir: opts.virtualStoreDir
|
|
115316
|
+
virtualStoreDir: opts.virtualStoreDir,
|
|
115317
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
115313
115318
|
});
|
|
115314
115319
|
let circular;
|
|
115315
115320
|
const matchedSearched = opts.search?.(packageInfo);
|
|
@@ -115457,7 +115462,8 @@ var require_buildDependenciesHierarchy = __commonJS({
|
|
|
115457
115462
|
search: maybeOpts.search,
|
|
115458
115463
|
skipped: new Set(modules?.skipped ?? []),
|
|
115459
115464
|
modulesDir: maybeOpts.modulesDir,
|
|
115460
|
-
virtualStoreDir: modules?.virtualStoreDir
|
|
115465
|
+
virtualStoreDir: modules?.virtualStoreDir,
|
|
115466
|
+
virtualStoreDirMaxLength: modules?.virtualStoreDirMaxLength ?? maybeOpts.virtualStoreDirMaxLength
|
|
115461
115467
|
};
|
|
115462
115468
|
(await Promise.all(projectPaths.map(async (projectPath) => {
|
|
115463
115469
|
return [
|
|
@@ -115493,7 +115499,8 @@ var require_buildDependenciesHierarchy = __commonJS({
|
|
|
115493
115499
|
search: opts.search,
|
|
115494
115500
|
skipped: opts.skipped,
|
|
115495
115501
|
wantedPackages: wantedLockfile?.packages ?? {},
|
|
115496
|
-
virtualStoreDir: opts.virtualStoreDir
|
|
115502
|
+
virtualStoreDir: opts.virtualStoreDir,
|
|
115503
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
115497
115504
|
});
|
|
115498
115505
|
const parentId = { type: "importer", importerId };
|
|
115499
115506
|
const result2 = {};
|
|
@@ -115511,7 +115518,8 @@ var require_buildDependenciesHierarchy = __commonJS({
|
|
|
115511
115518
|
registries: opts.registries,
|
|
115512
115519
|
skipped: opts.skipped,
|
|
115513
115520
|
wantedPackages: wantedLockfile?.packages ?? {},
|
|
115514
|
-
virtualStoreDir: opts.virtualStoreDir
|
|
115521
|
+
virtualStoreDir: opts.virtualStoreDir,
|
|
115522
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
115515
115523
|
});
|
|
115516
115524
|
let newEntry = null;
|
|
115517
115525
|
const matchedSearched = opts.search?.(packageInfo);
|
|
@@ -116142,7 +116150,8 @@ var require_lib98 = __commonJS({
|
|
|
116142
116150
|
onlyProjects: opts.onlyProjects,
|
|
116143
116151
|
registries: opts.registries,
|
|
116144
116152
|
search,
|
|
116145
|
-
modulesDir: opts.modulesDir
|
|
116153
|
+
modulesDir: opts.modulesDir,
|
|
116154
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
116146
116155
|
})).map(async ([projectPath, buildDependenciesHierarchy]) => {
|
|
116147
116156
|
const entryPkg = await (0, read_project_manifest_1.safeReadProjectManifestOnly)(projectPath) ?? {};
|
|
116148
116157
|
return {
|
|
@@ -116179,7 +116188,8 @@ var require_lib98 = __commonJS({
|
|
|
116179
116188
|
lockfileDir: maybeOpts?.lockfileDir,
|
|
116180
116189
|
onlyProjects: maybeOpts?.onlyProjects,
|
|
116181
116190
|
registries: opts.registries,
|
|
116182
|
-
modulesDir: opts.modulesDir
|
|
116191
|
+
modulesDir: opts.modulesDir,
|
|
116192
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
116183
116193
|
})).map(async ([projectPath, dependenciesHierarchy]) => {
|
|
116184
116194
|
const entryPkg = await (0, read_project_manifest_1.safeReadProjectManifestOnly)(projectPath) ?? {};
|
|
116185
116195
|
return {
|
|
@@ -116286,7 +116296,8 @@ var require_lib99 = __commonJS({
|
|
|
116286
116296
|
return await extendWithDependencyPaths(auditReport, {
|
|
116287
116297
|
lockfile,
|
|
116288
116298
|
lockfileDir: opts.lockfileDir,
|
|
116289
|
-
include: opts.include
|
|
116299
|
+
include: opts.include,
|
|
116300
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
116290
116301
|
});
|
|
116291
116302
|
} catch (err) {
|
|
116292
116303
|
(0, assert_1.default)(util_1.default.types.isNativeError(err));
|
|
@@ -116310,7 +116321,8 @@ var require_lib99 = __commonJS({
|
|
|
116310
116321
|
const searchOpts = {
|
|
116311
116322
|
lockfileDir: opts.lockfileDir,
|
|
116312
116323
|
depth: Infinity,
|
|
116313
|
-
include: opts.include
|
|
116324
|
+
include: opts.include,
|
|
116325
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
116314
116326
|
};
|
|
116315
116327
|
const _searchPackagePaths = searchPackagePaths.bind(null, searchOpts, projectDirs);
|
|
116316
116328
|
await Promise.all(Object.values(advisories).map(async ({ findings, module_name }) => {
|
|
@@ -122257,7 +122269,8 @@ var require_audit2 = __commonJS({
|
|
|
122257
122269
|
minTimeout: opts.fetchRetryMintimeout,
|
|
122258
122270
|
retries: opts.fetchRetries
|
|
122259
122271
|
},
|
|
122260
|
-
timeout: opts.fetchTimeout
|
|
122272
|
+
timeout: opts.fetchTimeout,
|
|
122273
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
122261
122274
|
});
|
|
122262
122275
|
} catch (err) {
|
|
122263
122276
|
if (opts.ignoreRegistryErrors) {
|
|
@@ -130854,7 +130867,8 @@ var require_packageRequester = __commonJS({
|
|
|
130854
130867
|
counter: 0,
|
|
130855
130868
|
concurrency: networkConcurrency
|
|
130856
130869
|
}),
|
|
130857
|
-
storeDir: opts.storeDir
|
|
130870
|
+
storeDir: opts.storeDir,
|
|
130871
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
130858
130872
|
});
|
|
130859
130873
|
const requestPackage = resolveAndFetch.bind(null, {
|
|
130860
130874
|
engineStrict: opts.engineStrict,
|
|
@@ -130870,7 +130884,8 @@ var require_packageRequester = __commonJS({
|
|
|
130870
130884
|
fetchPackageToStore,
|
|
130871
130885
|
getFilesIndexFilePath: getFilesIndexFilePath.bind(null, {
|
|
130872
130886
|
getFilePathInCafs,
|
|
130873
|
-
storeDir: opts.storeDir
|
|
130887
|
+
storeDir: opts.storeDir,
|
|
130888
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
130874
130889
|
}),
|
|
130875
130890
|
requestPackage
|
|
130876
130891
|
});
|
|
@@ -130986,7 +131001,7 @@ var require_packageRequester = __commonJS({
|
|
|
130986
131001
|
};
|
|
130987
131002
|
}
|
|
130988
131003
|
function getFilesIndexFilePath(ctx, opts) {
|
|
130989
|
-
const targetRelative = (0, dependency_path_1.depPathToFilename)(opts.pkg.id);
|
|
131004
|
+
const targetRelative = (0, dependency_path_1.depPathToFilename)(opts.pkg.id, ctx.virtualStoreDirMaxLength);
|
|
130990
131005
|
const target = path_1.default.join(ctx.storeDir, targetRelative);
|
|
130991
131006
|
const filesIndexFile = opts.pkg.resolution.integrity ? ctx.getFilePathInCafs(opts.pkg.resolution.integrity, "index") : path_1.default.join(target, opts.ignoreScripts ? "integrity-not-built.json" : "integrity.json");
|
|
130992
131007
|
return { filesIndexFile, target };
|
|
@@ -131290,7 +131305,8 @@ var require_storeController = __commonJS({
|
|
|
131290
131305
|
ignoreFile: initOpts.ignoreFile,
|
|
131291
131306
|
networkConcurrency: initOpts.networkConcurrency,
|
|
131292
131307
|
storeDir: initOpts.storeDir,
|
|
131293
|
-
verifyStoreIntegrity: initOpts.verifyStoreIntegrity
|
|
131308
|
+
verifyStoreIntegrity: initOpts.verifyStoreIntegrity,
|
|
131309
|
+
virtualStoreDirMaxLength: initOpts.virtualStoreDirMaxLength
|
|
131294
131310
|
});
|
|
131295
131311
|
return {
|
|
131296
131312
|
close: async () => {
|
|
@@ -131455,7 +131471,8 @@ var require_createNewStoreController = __commonJS({
|
|
|
131455
131471
|
packageImportMethod: opts.packageImportMethod,
|
|
131456
131472
|
cacheDir: opts.cacheDir,
|
|
131457
131473
|
storeDir: opts.storeDir,
|
|
131458
|
-
verifyStoreIntegrity: typeof opts.verifyStoreIntegrity === "boolean" ? opts.verifyStoreIntegrity : true
|
|
131474
|
+
verifyStoreIntegrity: typeof opts.verifyStoreIntegrity === "boolean" ? opts.verifyStoreIntegrity : true,
|
|
131475
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
131459
131476
|
}),
|
|
131460
131477
|
dir: opts.storeDir
|
|
131461
131478
|
};
|
|
@@ -132284,7 +132301,8 @@ var require_lib120 = __commonJS({
|
|
|
132284
132301
|
})),
|
|
132285
132302
|
registries: modules?.registries != null ? (0, normalize_registries_1.normalizeRegistries)(modules.registries) : void 0,
|
|
132286
132303
|
rootModulesDir,
|
|
132287
|
-
skipped: new Set(modules?.skipped ?? [])
|
|
132304
|
+
skipped: new Set(modules?.skipped ?? []),
|
|
132305
|
+
virtualStoreDirMaxLength: modules?.virtualStoreDirMaxLength
|
|
132288
132306
|
};
|
|
132289
132307
|
}
|
|
132290
132308
|
exports2.readProjectsContext = readProjectsContext;
|
|
@@ -132959,6 +132977,7 @@ var require_lib121 = __commonJS({
|
|
|
132959
132977
|
registries: opts.registries,
|
|
132960
132978
|
storeDir: opts.storeDir,
|
|
132961
132979
|
virtualStoreDir,
|
|
132980
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
132962
132981
|
confirmModulesPurge: opts.confirmModulesPurge && !ci_info_1.isCI,
|
|
132963
132982
|
forceHoistPattern: opts.forceHoistPattern,
|
|
132964
132983
|
hoistPattern: opts.hoistPattern,
|
|
@@ -133011,6 +133030,7 @@ var require_lib121 = __commonJS({
|
|
|
133011
133030
|
skipped: importersContext.skipped,
|
|
133012
133031
|
storeDir: opts.storeDir,
|
|
133013
133032
|
virtualStoreDir,
|
|
133033
|
+
virtualStoreDirMaxLength: importersContext.virtualStoreDirMaxLength ?? opts.virtualStoreDirMaxLength,
|
|
133014
133034
|
...await (0, readLockfiles_1.readLockfiles)({
|
|
133015
133035
|
autoInstallPeers: opts.autoInstallPeers,
|
|
133016
133036
|
excludeLinksFromLockfile: opts.excludeLinksFromLockfile,
|
|
@@ -133035,6 +133055,13 @@ var require_lib121 = __commonJS({
|
|
|
133035
133055
|
exports2.getContext = getContext;
|
|
133036
133056
|
async function validateModules(modules, projects, opts) {
|
|
133037
133057
|
const rootProject = projects.find(({ id }) => id === ".");
|
|
133058
|
+
if (opts.virtualStoreDirMaxLength !== modules.virtualStoreDirMaxLength) {
|
|
133059
|
+
if (opts.forceNewModules && rootProject != null) {
|
|
133060
|
+
await purgeModulesDirsOfImporter(opts, rootProject);
|
|
133061
|
+
return { purged: true };
|
|
133062
|
+
}
|
|
133063
|
+
throw new error_1.PnpmError("VIRTUAL_STORE_DIR_MAX_LENGTH_DIFF", 'This modules directory was created using a different virtual-store-dir-max-length value. Run "pnpm install" to recreate the modules directory.');
|
|
133064
|
+
}
|
|
133038
133065
|
if (opts.forcePublicHoistPattern && // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
133039
133066
|
!(0, equals_1.default)(modules.publicHoistPattern, opts.publicHoistPattern || void 0)) {
|
|
133040
133067
|
if (opts.forceNewModules && rootProject != null) {
|
|
@@ -133155,6 +133182,7 @@ var require_lib121 = __commonJS({
|
|
|
133155
133182
|
registries: opts.registries,
|
|
133156
133183
|
storeDir: opts.storeDir,
|
|
133157
133184
|
virtualStoreDir,
|
|
133185
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
133158
133186
|
confirmModulesPurge: opts.confirmModulesPurge && !ci_info_1.isCI,
|
|
133159
133187
|
forceHoistPattern: opts.forceHoistPattern,
|
|
133160
133188
|
hoistPattern: opts.hoistPattern,
|
|
@@ -133605,7 +133633,8 @@ var require_implementation2 = __commonJS({
|
|
|
133605
133633
|
registries: ctx.registries,
|
|
133606
133634
|
skipped: Array.from(ctx.skipped),
|
|
133607
133635
|
storeDir: ctx.storeDir,
|
|
133608
|
-
virtualStoreDir: ctx.virtualStoreDir
|
|
133636
|
+
virtualStoreDir: ctx.virtualStoreDir,
|
|
133637
|
+
virtualStoreDirMaxLength: ctx.virtualStoreDirMaxLength
|
|
133609
133638
|
});
|
|
133610
133639
|
}
|
|
133611
133640
|
exports2.rebuildProjects = rebuildProjects;
|
|
@@ -133657,7 +133686,7 @@ var require_implementation2 = __commonJS({
|
|
|
133657
133686
|
const groups = chunks.map((chunk) => chunk.filter((depPath) => ctx.pkgsToRebuild.has(depPath) && !ctx.skipped.has(depPath)).map((depPath) => async () => {
|
|
133658
133687
|
const pkgSnapshot = pkgSnapshots[depPath];
|
|
133659
133688
|
const pkgInfo = (0, lockfile_utils_1.nameVerFromPkgSnapshot)(depPath, pkgSnapshot);
|
|
133660
|
-
const pkgRoots = opts.nodeLinker === "hoisted" ? (ctx.modulesFile?.hoistedLocations?.[depPath] ?? []).map((hoistedLocation) => path_1.default.join(opts.lockfileDir, hoistedLocation)) : [path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath), "node_modules", pkgInfo.name)];
|
|
133689
|
+
const pkgRoots = opts.nodeLinker === "hoisted" ? (ctx.modulesFile?.hoistedLocations?.[depPath] ?? []).map((hoistedLocation) => path_1.default.join(opts.lockfileDir, hoistedLocation)) : [path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath, opts.virtualStoreDirMaxLength), "node_modules", pkgInfo.name)];
|
|
133661
133690
|
if (pkgRoots.length === 0) {
|
|
133662
133691
|
if (pkgSnapshot.optional)
|
|
133663
133692
|
return;
|
|
@@ -133669,7 +133698,7 @@ var require_implementation2 = __commonJS({
|
|
|
133669
133698
|
try {
|
|
133670
133699
|
const extraBinPaths = ctx.extraBinPaths;
|
|
133671
133700
|
if (opts.nodeLinker !== "hoisted") {
|
|
133672
|
-
const modules = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath), "node_modules");
|
|
133701
|
+
const modules = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath, opts.virtualStoreDirMaxLength), "node_modules");
|
|
133673
133702
|
const binPath = path_1.default.join(pkgRoot, "node_modules", ".bin");
|
|
133674
133703
|
await (0, link_bins_1.linkBins)(modules, binPath, { extraNodePaths: ctx.extraNodePaths, warn });
|
|
133675
133704
|
} else {
|
|
@@ -133756,7 +133785,7 @@ var require_implementation2 = __commonJS({
|
|
|
133756
133785
|
await Promise.all(Object.keys(pkgSnapshots).filter((depPath) => !(0, lockfile_utils_1.packageIsIndependent)(pkgSnapshots[depPath])).map(async (depPath) => limitLinking(async () => {
|
|
133757
133786
|
const pkgSnapshot = pkgSnapshots[depPath];
|
|
133758
133787
|
const pkgInfo = (0, lockfile_utils_1.nameVerFromPkgSnapshot)(depPath, pkgSnapshot);
|
|
133759
|
-
const modules = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath), "node_modules");
|
|
133788
|
+
const modules = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath, opts.virtualStoreDirMaxLength), "node_modules");
|
|
133760
133789
|
const binPath = path_1.default.join(modules, pkgInfo.name, "node_modules", ".bin");
|
|
133761
133790
|
return (0, link_bins_1.linkBins)(modules, binPath, { warn });
|
|
133762
133791
|
})));
|
|
@@ -137561,6 +137590,7 @@ var require_lib129 = __commonJS({
|
|
|
137561
137590
|
privateHoistedModulesDir: opts.privateHoistedModulesDir,
|
|
137562
137591
|
publicHoistedModulesDir: opts.publicHoistedModulesDir,
|
|
137563
137592
|
virtualStoreDir: opts.virtualStoreDir,
|
|
137593
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
137564
137594
|
hoistedWorkspacePackages: opts.hoistedWorkspacePackages
|
|
137565
137595
|
});
|
|
137566
137596
|
await linkAllBins(opts.privateHoistedModulesDir, {
|
|
@@ -137686,7 +137716,7 @@ var require_lib129 = __commonJS({
|
|
|
137686
137716
|
let depLocation;
|
|
137687
137717
|
if (pkgSnapshot) {
|
|
137688
137718
|
const pkgName = (0, lockfile_utils_1.nameVerFromPkgSnapshot)(hoistedDepId, pkgSnapshot).name;
|
|
137689
|
-
const modules = path_1.default.join(opts.virtualStoreDir, dp.depPathToFilename(hoistedDepId), "node_modules");
|
|
137719
|
+
const modules = path_1.default.join(opts.virtualStoreDir, dp.depPathToFilename(hoistedDepId, opts.virtualStoreDirMaxLength), "node_modules");
|
|
137690
137720
|
depLocation = path_1.default.join(modules, pkgName);
|
|
137691
137721
|
} else {
|
|
137692
137722
|
if (!opts.lockfile.importers[hoistedDepId]) {
|
|
@@ -140388,7 +140418,7 @@ var require_lib131 = __commonJS({
|
|
|
140388
140418
|
packageStore = /* @__PURE__ */ new Map();
|
|
140389
140419
|
packageRegistry.set(name, packageStore);
|
|
140390
140420
|
}
|
|
140391
|
-
let packageLocation = (0, normalize_path_1.default)(path_1.default.relative(opts.lockfileDir, path_1.default.join(opts.virtualStoreDir, (0, dependency_path_1.depPathToFilename)(relDepPath), "node_modules", name)));
|
|
140421
|
+
let packageLocation = (0, normalize_path_1.default)(path_1.default.relative(opts.lockfileDir, path_1.default.join(opts.virtualStoreDir, (0, dependency_path_1.depPathToFilename)(relDepPath, opts.virtualStoreDirMaxLength), "node_modules", name)));
|
|
140392
140422
|
if (!packageLocation.startsWith("../")) {
|
|
140393
140423
|
packageLocation = `./${packageLocation}`;
|
|
140394
140424
|
}
|
|
@@ -140616,12 +140646,12 @@ var require_prune2 = __commonJS({
|
|
|
140616
140646
|
}
|
|
140617
140647
|
if (opts.pruneVirtualStore !== false) {
|
|
140618
140648
|
const _tryRemovePkg = tryRemovePkg.bind(null, opts.lockfileDir, opts.virtualStoreDir);
|
|
140619
|
-
await Promise.all(orphanDepPaths.map((orphanDepPath) => (0, dependency_path_1.depPathToFilename)(orphanDepPath)).map(async (orphanDepPath) => _tryRemovePkg(orphanDepPath)));
|
|
140649
|
+
await Promise.all(orphanDepPaths.map((orphanDepPath) => (0, dependency_path_1.depPathToFilename)(orphanDepPath, opts.virtualStoreDirMaxLength)).map(async (orphanDepPath) => _tryRemovePkg(orphanDepPath)));
|
|
140620
140650
|
const neededPkgs = /* @__PURE__ */ new Set(["node_modules"]);
|
|
140621
140651
|
for (const depPath of Object.keys(opts.wantedLockfile.packages ?? {})) {
|
|
140622
140652
|
if (opts.skipped.has(depPath))
|
|
140623
140653
|
continue;
|
|
140624
|
-
neededPkgs.add((0, dependency_path_1.depPathToFilename)(depPath));
|
|
140654
|
+
neededPkgs.add((0, dependency_path_1.depPathToFilename)(depPath, opts.virtualStoreDirMaxLength));
|
|
140625
140655
|
}
|
|
140626
140656
|
const availablePkgs = await readVirtualStoreDir(opts.virtualStoreDir, opts.lockfileDir);
|
|
140627
140657
|
await Promise.all(availablePkgs.filter((availablePkg) => !neededPkgs.has(availablePkg)).map(async (orphanDepPath) => _tryRemovePkg(orphanDepPath)));
|
|
@@ -141191,7 +141221,7 @@ var require_lockfileToDepGraph = __commonJS({
|
|
|
141191
141221
|
if (opts.skipped.has(depPath))
|
|
141192
141222
|
return;
|
|
141193
141223
|
const { name: pkgName, version: pkgVersion } = (0, lockfile_utils_1.nameVerFromPkgSnapshot)(depPath, pkgSnapshot);
|
|
141194
|
-
const modules = path_1.default.join(opts.virtualStoreDir, dp.depPathToFilename(depPath), "node_modules");
|
|
141224
|
+
const modules = path_1.default.join(opts.virtualStoreDir, dp.depPathToFilename(depPath, opts.virtualStoreDirMaxLength), "node_modules");
|
|
141195
141225
|
const packageId = (0, lockfile_utils_1.packageIdFromSnapshot)(depPath, pkgSnapshot);
|
|
141196
141226
|
const pkg = {
|
|
141197
141227
|
name: pkgName,
|
|
@@ -141288,7 +141318,8 @@ var require_lockfileToDepGraph = __commonJS({
|
|
|
141288
141318
|
skipped: opts.skipped,
|
|
141289
141319
|
storeController: opts.storeController,
|
|
141290
141320
|
storeDir: opts.storeDir,
|
|
141291
|
-
virtualStoreDir: opts.virtualStoreDir
|
|
141321
|
+
virtualStoreDir: opts.virtualStoreDir,
|
|
141322
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
141292
141323
|
};
|
|
141293
141324
|
for (const [dir, node] of Object.entries(graph)) {
|
|
141294
141325
|
const pkgSnapshot = pkgSnapshotByLocation[dir];
|
|
@@ -141328,7 +141359,7 @@ var require_lockfileToDepGraph = __commonJS({
|
|
|
141328
141359
|
if (ctx.skipped.has(childRelDepPath))
|
|
141329
141360
|
continue;
|
|
141330
141361
|
const pkgName = (0, lockfile_utils_1.nameVerFromPkgSnapshot)(childRelDepPath, childPkgSnapshot).name;
|
|
141331
|
-
children[alias] = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(childRelDepPath), "node_modules", pkgName);
|
|
141362
|
+
children[alias] = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(childRelDepPath, ctx.virtualStoreDirMaxLength), "node_modules", pkgName);
|
|
141332
141363
|
} else if (ref.indexOf("file:") === 0) {
|
|
141333
141364
|
children[alias] = path_1.default.resolve(ctx.lockfileDir, ref.slice(5));
|
|
141334
141365
|
} else if (!ctx.skipped.has(childRelDepPath) && (peerDeps == null || !peerDeps.has(alias))) {
|
|
@@ -173289,6 +173320,7 @@ var require_lib140 = __commonJS({
|
|
|
173289
173320
|
skipped,
|
|
173290
173321
|
storeController: opts.storeController,
|
|
173291
173322
|
virtualStoreDir,
|
|
173323
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
173292
173324
|
wantedLockfile: (0, filter_lockfile_1.filterLockfileByEngine)(wantedLockfile, filterOpts).lockfile
|
|
173293
173325
|
});
|
|
173294
173326
|
removed = removedDepPaths.size;
|
|
@@ -173347,6 +173379,7 @@ var require_lib140 = __commonJS({
|
|
|
173347
173379
|
importerNames,
|
|
173348
173380
|
lockfileDir,
|
|
173349
173381
|
virtualStoreDir,
|
|
173382
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
173350
173383
|
registries: opts.registries
|
|
173351
173384
|
});
|
|
173352
173385
|
}
|
|
@@ -173422,6 +173455,7 @@ var require_lib140 = __commonJS({
|
|
|
173422
173455
|
publicHoistedModulesDir,
|
|
173423
173456
|
publicHoistPattern: opts.publicHoistPattern ?? [],
|
|
173424
173457
|
virtualStoreDir,
|
|
173458
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
173425
173459
|
hoistedWorkspacePackages: opts.hoistWorkspacePackages ? Object.values(opts.allProjects).reduce((hoistedWorkspacePackages, project) => {
|
|
173426
173460
|
if (project.manifest.name && project.id !== ".") {
|
|
173427
173461
|
hoistedWorkspacePackages[project.id] = {
|
|
@@ -173506,7 +173540,8 @@ var require_lib140 = __commonJS({
|
|
|
173506
173540
|
}
|
|
173507
173541
|
const projectsToBeBuilt = (0, lockfile_utils_1.extendProjectsWithTargetDirs)(selectedProjects, wantedLockfile, {
|
|
173508
173542
|
pkgLocationsByDepPath,
|
|
173509
|
-
virtualStoreDir
|
|
173543
|
+
virtualStoreDir,
|
|
173544
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
173510
173545
|
});
|
|
173511
173546
|
if (opts.enableModulesDir !== false) {
|
|
173512
173547
|
const rootProjectDeps = !opts.dedupeDirectDeps ? {} : directDependenciesByImporterId["."] ?? {};
|
|
@@ -173560,7 +173595,8 @@ var require_lib140 = __commonJS({
|
|
|
173560
173595
|
registries: opts.registries,
|
|
173561
173596
|
skipped: Array.from(skipped),
|
|
173562
173597
|
storeDir: opts.storeDir,
|
|
173563
|
-
virtualStoreDir
|
|
173598
|
+
virtualStoreDir,
|
|
173599
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
173564
173600
|
}, {
|
|
173565
173601
|
makeModulesDir: Object.keys(filteredLockfile.packages ?? {}).length > 0
|
|
173566
173602
|
});
|
|
@@ -174688,7 +174724,7 @@ var require_hoistPeers = __commonJS({
|
|
|
174688
174724
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
174689
174725
|
};
|
|
174690
174726
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
174691
|
-
exports2.hoistPeers = void 0;
|
|
174727
|
+
exports2.getHoistableOptionalPeers = exports2.hoistPeers = void 0;
|
|
174692
174728
|
var semver_12 = __importDefault2(require_semver2());
|
|
174693
174729
|
function hoistPeers(missingRequiredPeers, opts) {
|
|
174694
174730
|
const dependencies = {};
|
|
@@ -174711,6 +174747,24 @@ var require_hoistPeers = __commonJS({
|
|
|
174711
174747
|
return dependencies;
|
|
174712
174748
|
}
|
|
174713
174749
|
exports2.hoistPeers = hoistPeers;
|
|
174750
|
+
function getHoistableOptionalPeers(allMissingOptionalPeers, allPreferredVersions) {
|
|
174751
|
+
const optionalDependencies = {};
|
|
174752
|
+
for (const [missingOptionalPeerName, ranges] of Object.entries(allMissingOptionalPeers)) {
|
|
174753
|
+
if (!allPreferredVersions[missingOptionalPeerName])
|
|
174754
|
+
continue;
|
|
174755
|
+
let maxSatisfyingVersion;
|
|
174756
|
+
for (const [version2, specType] of Object.entries(allPreferredVersions[missingOptionalPeerName])) {
|
|
174757
|
+
if (specType === "version" && ranges.every((range) => semver_12.default.satisfies(version2, range)) && (!maxSatisfyingVersion || semver_12.default.gt(version2, maxSatisfyingVersion))) {
|
|
174758
|
+
maxSatisfyingVersion = version2;
|
|
174759
|
+
}
|
|
174760
|
+
}
|
|
174761
|
+
if (maxSatisfyingVersion) {
|
|
174762
|
+
optionalDependencies[missingOptionalPeerName] = maxSatisfyingVersion;
|
|
174763
|
+
}
|
|
174764
|
+
}
|
|
174765
|
+
return optionalDependencies;
|
|
174766
|
+
}
|
|
174767
|
+
exports2.getHoistableOptionalPeers = getHoistableOptionalPeers;
|
|
174714
174768
|
}
|
|
174715
174769
|
});
|
|
174716
174770
|
|
|
@@ -174861,7 +174915,7 @@ var require_resolveDependencies = __commonJS({
|
|
|
174861
174915
|
const pkgAddresses = importerResolutionResult.pkgAddresses;
|
|
174862
174916
|
if (!ctx.hoistPeers)
|
|
174863
174917
|
return pkgAddresses;
|
|
174864
|
-
|
|
174918
|
+
const allMissingOptionalPeers = {};
|
|
174865
174919
|
while (true) {
|
|
174866
174920
|
for (const pkgAddress of importerResolutionResult.pkgAddresses) {
|
|
174867
174921
|
parentPkgAliases[pkgAddress.alias] = true;
|
|
@@ -174877,26 +174931,19 @@ var require_resolveDependencies = __commonJS({
|
|
|
174877
174931
|
}
|
|
174878
174932
|
}
|
|
174879
174933
|
}
|
|
174880
|
-
const
|
|
174881
|
-
|
|
174882
|
-
|
|
174883
|
-
|
|
174884
|
-
|
|
174885
|
-
break;
|
|
174886
|
-
const dependencies = (0, hoistPeers_1.hoistPeers)(missingRequiredPeers, ctx);
|
|
174887
|
-
const nextMissingOptionalPeers = [];
|
|
174888
|
-
const optionalDependencies = {};
|
|
174889
|
-
for (const missingOptionalPeerName of missingOptionalPeerNames) {
|
|
174890
|
-
if (ctx.allPreferredVersions[missingOptionalPeerName]) {
|
|
174891
|
-
optionalDependencies[missingOptionalPeerName] = Object.keys(ctx.allPreferredVersions[missingOptionalPeerName]).join(" || ");
|
|
174892
|
-
} else {
|
|
174893
|
-
nextMissingOptionalPeers.push(missingOptionalPeerName);
|
|
174934
|
+
for (const [missingOptionalPeerName, { range: missingOptionalPeerRange }] of missingOptionalPeers) {
|
|
174935
|
+
if (!allMissingOptionalPeers[missingOptionalPeerName]) {
|
|
174936
|
+
allMissingOptionalPeers[missingOptionalPeerName] = [missingOptionalPeerRange];
|
|
174937
|
+
} else if (!allMissingOptionalPeers[missingOptionalPeerName].includes(missingOptionalPeerRange)) {
|
|
174938
|
+
allMissingOptionalPeers[missingOptionalPeerName].push(missingOptionalPeerRange);
|
|
174894
174939
|
}
|
|
174895
174940
|
}
|
|
174896
|
-
|
|
174897
|
-
|
|
174941
|
+
if (!missingRequiredPeers.length)
|
|
174942
|
+
break;
|
|
174943
|
+
const dependencies = (0, hoistPeers_1.hoistPeers)(missingRequiredPeers, ctx);
|
|
174944
|
+
if (!Object.keys(dependencies).length)
|
|
174898
174945
|
break;
|
|
174899
|
-
const wantedDependencies = (0, getNonDevWantedDependencies_1.getNonDevWantedDependencies)({ dependencies
|
|
174946
|
+
const wantedDependencies = (0, getNonDevWantedDependencies_1.getNonDevWantedDependencies)({ dependencies });
|
|
174900
174947
|
const resolveDependenciesResult = await resolveDependencies(ctx, preferredVersions, wantedDependencies, {
|
|
174901
174948
|
...options,
|
|
174902
174949
|
parentPkgAliases,
|
|
@@ -174909,6 +174956,22 @@ var require_resolveDependencies = __commonJS({
|
|
|
174909
174956
|
};
|
|
174910
174957
|
pkgAddresses.push(...importerResolutionResult.pkgAddresses);
|
|
174911
174958
|
}
|
|
174959
|
+
if (Object.keys(allMissingOptionalPeers).length && ctx.allPreferredVersions) {
|
|
174960
|
+
const optionalDependencies = (0, hoistPeers_1.getHoistableOptionalPeers)(allMissingOptionalPeers, ctx.allPreferredVersions);
|
|
174961
|
+
if (Object.keys(optionalDependencies).length) {
|
|
174962
|
+
const wantedDependencies = (0, getNonDevWantedDependencies_1.getNonDevWantedDependencies)({ optionalDependencies });
|
|
174963
|
+
const resolveDependenciesResult = await resolveDependencies(ctx, preferredVersions, wantedDependencies, {
|
|
174964
|
+
...options,
|
|
174965
|
+
parentPkgAliases,
|
|
174966
|
+
publishedBy
|
|
174967
|
+
});
|
|
174968
|
+
importerResolutionResult = {
|
|
174969
|
+
pkgAddresses: resolveDependenciesResult.pkgAddresses,
|
|
174970
|
+
...filterMissingPeers(await resolveDependenciesResult.resolvingPeers, parentPkgAliases)
|
|
174971
|
+
};
|
|
174972
|
+
pkgAddresses.push(...importerResolutionResult.pkgAddresses);
|
|
174973
|
+
}
|
|
174974
|
+
}
|
|
174912
174975
|
return pkgAddresses;
|
|
174913
174976
|
}, pkgAddressesByImportersWithoutPeers, importers));
|
|
174914
174977
|
return { pkgAddressesByImporters, time };
|
|
@@ -175380,7 +175443,7 @@ var require_resolveDependencies = __commonJS({
|
|
|
175380
175443
|
const depIsLinked = Boolean(
|
|
175381
175444
|
// if package is not in `node_modules/.pnpm-lock.yaml`
|
|
175382
175445
|
// we can safely assume that it doesn't exist in `node_modules`
|
|
175383
|
-
currentLockfileContainsTheDep && currentPkg.depPath && currentPkg.dependencyLockfile && currentPkg.name && await (0, path_exists_1.default)(path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(currentPkg.depPath), "node_modules", currentPkg.name, "package.json"))
|
|
175446
|
+
currentLockfileContainsTheDep && currentPkg.depPath && currentPkg.dependencyLockfile && currentPkg.name && await (0, path_exists_1.default)(path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(currentPkg.depPath, ctx.virtualStoreDirMaxLength), "node_modules", currentPkg.name, "package.json"))
|
|
175384
175447
|
);
|
|
175385
175448
|
if (!options.update && !options.proceed && currentPkg.resolution != null && depIsLinked) {
|
|
175386
175449
|
return null;
|
|
@@ -175806,6 +175869,7 @@ var require_resolveDependencyTree = __commonJS({
|
|
|
175806
175869
|
skipped: wantedToBeSkippedPackageIds,
|
|
175807
175870
|
storeController: opts.storeController,
|
|
175808
175871
|
virtualStoreDir: opts.virtualStoreDir,
|
|
175872
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
175809
175873
|
wantedLockfile: opts.wantedLockfile,
|
|
175810
175874
|
appliedPatches: /* @__PURE__ */ new Set(),
|
|
175811
175875
|
updatedSet: /* @__PURE__ */ new Set(),
|
|
@@ -177188,7 +177252,8 @@ var require_resolvePeers = __commonJS({
|
|
|
177188
177252
|
peerDependencyIssues,
|
|
177189
177253
|
purePkgs: /* @__PURE__ */ new Set(),
|
|
177190
177254
|
rootDir,
|
|
177191
|
-
virtualStoreDir: opts.virtualStoreDir
|
|
177255
|
+
virtualStoreDir: opts.virtualStoreDir,
|
|
177256
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
177192
177257
|
});
|
|
177193
177258
|
if (finishing) {
|
|
177194
177259
|
finishingList.push(finishing);
|
|
@@ -177487,7 +177552,7 @@ var require_resolvePeers = __commonJS({
|
|
|
177487
177552
|
}
|
|
177488
177553
|
const peerDependencies = { ...resolvedPackage.peerDependencies };
|
|
177489
177554
|
if (!ctx.depGraph[depPath] || ctx.depGraph[depPath].depth > node.depth) {
|
|
177490
|
-
const modules = path_1.default.join(ctx.virtualStoreDir, (0, dependency_path_1.depPathToFilename)(depPath), "node_modules");
|
|
177555
|
+
const modules = path_1.default.join(ctx.virtualStoreDir, (0, dependency_path_1.depPathToFilename)(depPath, ctx.virtualStoreDirMaxLength), "node_modules");
|
|
177491
177556
|
const dir = path_1.default.join(modules, resolvedPackage.name);
|
|
177492
177557
|
const transitivePeerDependencies = /* @__PURE__ */ new Set();
|
|
177493
177558
|
for (const unknownPeer of allResolvedPeers.keys()) {
|
|
@@ -178408,6 +178473,7 @@ var require_lib144 = __commonJS({
|
|
|
178408
178473
|
lockfileDir: opts.lockfileDir,
|
|
178409
178474
|
projects: projectsToLink,
|
|
178410
178475
|
virtualStoreDir: opts.virtualStoreDir,
|
|
178476
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
178411
178477
|
resolvePeersFromWorkspaceRoot: Boolean(opts.resolvePeersFromWorkspaceRoot),
|
|
178412
178478
|
resolvedImporters
|
|
178413
178479
|
});
|
|
@@ -180352,7 +180418,8 @@ var require_extendInstallOptions = __commonJS({
|
|
|
180352
180418
|
extendNodePath: true,
|
|
180353
180419
|
ignoreWorkspaceCycles: false,
|
|
180354
180420
|
disallowWorkspaceCycles: false,
|
|
180355
|
-
excludeLinksFromLockfile: false
|
|
180421
|
+
excludeLinksFromLockfile: false,
|
|
180422
|
+
virtualStoreDirMaxLength: 120
|
|
180356
180423
|
};
|
|
180357
180424
|
};
|
|
180358
180425
|
function extendOptions(opts) {
|
|
@@ -180463,6 +180530,7 @@ var require_link3 = __commonJS({
|
|
|
180463
180530
|
skipped: opts.skipped,
|
|
180464
180531
|
storeController: opts.storeController,
|
|
180465
180532
|
virtualStoreDir: opts.virtualStoreDir,
|
|
180533
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
180466
180534
|
wantedLockfile: opts.wantedLockfile
|
|
180467
180535
|
});
|
|
180468
180536
|
core_loggers_1.stageLogger.debug({
|
|
@@ -180546,6 +180614,7 @@ var require_link3 = __commonJS({
|
|
|
180546
180614
|
publicHoistedModulesDir: opts.rootModulesDir,
|
|
180547
180615
|
publicHoistPattern: opts.publicHoistPattern ?? [],
|
|
180548
180616
|
virtualStoreDir: opts.virtualStoreDir,
|
|
180617
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
180549
180618
|
hoistedWorkspacePackages: opts.hoistWorkspacePackages ? projects.reduce((hoistedWorkspacePackages, project) => {
|
|
180550
180619
|
if (project.manifest.name && project.id !== ".") {
|
|
180551
180620
|
hoistedWorkspacePackages[project.id] = {
|
|
@@ -181443,6 +181512,7 @@ Note that in CI environments, this setting is enabled by default.`
|
|
|
181443
181512
|
tag: opts.tag,
|
|
181444
181513
|
updateToLatest: opts.updateToLatest,
|
|
181445
181514
|
virtualStoreDir: ctx.virtualStoreDir,
|
|
181515
|
+
virtualStoreDirMaxLength: ctx.virtualStoreDirMaxLength,
|
|
181446
181516
|
wantedLockfile: ctx.wantedLockfile,
|
|
181447
181517
|
workspacePackages: opts.workspacePackages,
|
|
181448
181518
|
patchedDependencies: opts.patchedDependencies,
|
|
@@ -181505,6 +181575,7 @@ Note that in CI environments, this setting is enabled by default.`
|
|
|
181505
181575
|
skipped: ctx.skipped,
|
|
181506
181576
|
storeController: opts.storeController,
|
|
181507
181577
|
virtualStoreDir: ctx.virtualStoreDir,
|
|
181578
|
+
virtualStoreDirMaxLength: ctx.virtualStoreDirMaxLength,
|
|
181508
181579
|
wantedLockfile: newLockfile,
|
|
181509
181580
|
wantedToBeSkippedPackageIds,
|
|
181510
181581
|
hoistWorkspacePackages: opts.hoistWorkspacePackages
|
|
@@ -181516,6 +181587,7 @@ Note that in CI environments, this setting is enabled by default.`
|
|
|
181516
181587
|
importerNames,
|
|
181517
181588
|
lockfileDir: ctx.lockfileDir,
|
|
181518
181589
|
virtualStoreDir: ctx.virtualStoreDir,
|
|
181590
|
+
virtualStoreDirMaxLength: ctx.virtualStoreDirMaxLength,
|
|
181519
181591
|
registries: ctx.registries
|
|
181520
181592
|
});
|
|
181521
181593
|
}
|
|
@@ -181619,7 +181691,10 @@ Note that in CI environments, this setting is enabled by default.`
|
|
|
181619
181691
|
});
|
|
181620
181692
|
}
|
|
181621
181693
|
}));
|
|
181622
|
-
const projectsWithTargetDirs = (0, lockfile_utils_1.extendProjectsWithTargetDirs)(projects, newLockfile,
|
|
181694
|
+
const projectsWithTargetDirs = (0, lockfile_utils_1.extendProjectsWithTargetDirs)(projects, newLockfile, {
|
|
181695
|
+
virtualStoreDir: ctx.virtualStoreDir,
|
|
181696
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
181697
|
+
});
|
|
181623
181698
|
await Promise.all([
|
|
181624
181699
|
opts.useLockfile && opts.saveLockfile ? (0, lockfile_file_1.writeLockfiles)({
|
|
181625
181700
|
currentLockfile: result2.currentLockfile,
|
|
@@ -181653,7 +181728,8 @@ Note that in CI environments, this setting is enabled by default.`
|
|
|
181653
181728
|
registries: ctx.registries,
|
|
181654
181729
|
skipped: Array.from(ctx.skipped),
|
|
181655
181730
|
storeDir: ctx.storeDir,
|
|
181656
|
-
virtualStoreDir: ctx.virtualStoreDir
|
|
181731
|
+
virtualStoreDir: ctx.virtualStoreDir,
|
|
181732
|
+
virtualStoreDirMaxLength: ctx.virtualStoreDirMaxLength
|
|
181657
181733
|
}, {
|
|
181658
181734
|
makeModulesDir: Object.keys(result2.currentLockfile.packages ?? {}).length > 0
|
|
181659
181735
|
});
|
|
@@ -181795,7 +181871,8 @@ var require_options4 = __commonJS({
|
|
|
181795
181871
|
registries: normalize_registries_1.DEFAULT_REGISTRIES,
|
|
181796
181872
|
storeController: opts.storeController,
|
|
181797
181873
|
storeDir: opts.storeDir,
|
|
181798
|
-
useLockfile: true
|
|
181874
|
+
useLockfile: true,
|
|
181875
|
+
virtualStoreDirMaxLength: 120
|
|
181799
181876
|
};
|
|
181800
181877
|
}
|
|
181801
181878
|
}
|
|
@@ -182005,6 +182082,7 @@ var require_getPeerDependencyIssues = __commonJS({
|
|
|
182005
182082
|
storeController: opts.storeController,
|
|
182006
182083
|
tag: "latest",
|
|
182007
182084
|
virtualStoreDir: ctx.virtualStoreDir,
|
|
182085
|
+
virtualStoreDirMaxLength: ctx.virtualStoreDirMaxLength,
|
|
182008
182086
|
wantedLockfile: ctx.wantedLockfile,
|
|
182009
182087
|
workspacePackages: opts.workspacePackages ?? {},
|
|
182010
182088
|
supportedArchitectures: opts.supportedArchitectures
|
|
@@ -198170,7 +198248,8 @@ var require_list3 = __commonJS({
|
|
|
198170
198248
|
onlyProjects: opts.onlyProjects,
|
|
198171
198249
|
reportAs: opts.parseable ? "parseable" : opts.json ? "json" : "tree",
|
|
198172
198250
|
showExtraneous: false,
|
|
198173
|
-
modulesDir: opts.modulesDir
|
|
198251
|
+
modulesDir: opts.modulesDir,
|
|
198252
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
198174
198253
|
};
|
|
198175
198254
|
return params.length > 0 ? (0, list_1.listForPackages)(params, prefixes, listOpts) : (0, list_1.list)(prefixes, listOpts);
|
|
198176
198255
|
}
|
|
@@ -198564,7 +198643,7 @@ var require_getPkgInfo3 = __commonJS({
|
|
|
198564
198643
|
if (isPackageWithIntegrity) {
|
|
198565
198644
|
pkgIndexFilePath = (0, store_cafs_1.getFilePathInCafs)(opts.cafsDir, packageResolution.integrity, "index");
|
|
198566
198645
|
} else if (!packageResolution.type && packageResolution.tarball) {
|
|
198567
|
-
const packageDirInStore = (0, dependency_path_1.depPathToFilename)((0, dependency_path_1.parse)(id).nonSemverVersion ?? id);
|
|
198646
|
+
const packageDirInStore = (0, dependency_path_1.depPathToFilename)((0, dependency_path_1.parse)(id).nonSemverVersion ?? id, opts.virtualStoreDirMaxLength);
|
|
198568
198647
|
pkgIndexFilePath = path_1.default.join(opts.storeDir, packageDirInStore, "integrity.json");
|
|
198569
198648
|
} else {
|
|
198570
198649
|
throw new error_1.PnpmError("UNSUPPORTED_PACKAGE_TYPE", `Unsupported package resolution type for ${id}`);
|
|
@@ -198589,7 +198668,8 @@ var require_getPkgInfo3 = __commonJS({
|
|
|
198589
198668
|
const packageFileIndexInfo = await readPackageIndexFile(packageResolution, pkg.id, {
|
|
198590
198669
|
cafsDir,
|
|
198591
198670
|
storeDir: opts.storeDir,
|
|
198592
|
-
lockfileDir: opts.dir
|
|
198671
|
+
lockfileDir: opts.dir,
|
|
198672
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength
|
|
198593
198673
|
});
|
|
198594
198674
|
let packageManifestDir;
|
|
198595
198675
|
if (packageFileIndexInfo.local) {
|
|
@@ -198610,7 +198690,7 @@ var require_getPkgInfo3 = __commonJS({
|
|
|
198610
198690
|
}
|
|
198611
198691
|
const modulesDir = opts.modulesDir ?? "node_modules";
|
|
198612
198692
|
const virtualStoreDir = (0, path_absolute_1.default)(opts.virtualStoreDir ?? path_1.default.join(modulesDir, ".pnpm"), opts.dir);
|
|
198613
|
-
const packageModulePath = path_1.default.join(virtualStoreDir, (0, dependency_path_1.depPathToFilename)(pkg.depPath), modulesDir, manifest.name);
|
|
198693
|
+
const packageModulePath = path_1.default.join(virtualStoreDir, (0, dependency_path_1.depPathToFilename)(pkg.depPath, opts.virtualStoreDirMaxLength), modulesDir, manifest.name);
|
|
198614
198694
|
const licenseInfo = await parseLicense({ manifest, files: packageFileIndexInfo }, { cafsDir });
|
|
198615
198695
|
const packageInfo = {
|
|
198616
198696
|
from: manifest.name,
|
|
@@ -198673,6 +198753,7 @@ var require_lockfileToLicenseNodeTree = __commonJS({
|
|
|
198673
198753
|
}, {
|
|
198674
198754
|
storeDir: options.storeDir,
|
|
198675
198755
|
virtualStoreDir: options.virtualStoreDir,
|
|
198756
|
+
virtualStoreDirMaxLength: options.virtualStoreDirMaxLength,
|
|
198676
198757
|
dir: options.dir,
|
|
198677
198758
|
modulesDir: options.modulesDir ?? "node_modules"
|
|
198678
198759
|
});
|
|
@@ -198706,6 +198787,7 @@ var require_lockfileToLicenseNodeTree = __commonJS({
|
|
|
198706
198787
|
const importerDeps = await lockfileToLicenseNode(importerWalker.step, {
|
|
198707
198788
|
storeDir: opts.storeDir,
|
|
198708
198789
|
virtualStoreDir: opts.virtualStoreDir,
|
|
198790
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
198709
198791
|
modulesDir: opts.modulesDir,
|
|
198710
198792
|
dir: opts.dir,
|
|
198711
198793
|
registries: opts.registries,
|
|
@@ -198786,6 +198868,7 @@ var require_licenses = __commonJS({
|
|
|
198786
198868
|
modulesDir: opts.modulesDir,
|
|
198787
198869
|
storeDir: opts.storeDir,
|
|
198788
198870
|
virtualStoreDir: opts.virtualStoreDir,
|
|
198871
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
198789
198872
|
include: opts.include,
|
|
198790
198873
|
registries: opts.registries,
|
|
198791
198874
|
includedImporterIds: opts.includedImporterIds,
|
|
@@ -198968,6 +199051,7 @@ var require_licensesList = __commonJS({
|
|
|
198968
199051
|
lockfileDir: opts.lockfileDir ?? opts.dir,
|
|
198969
199052
|
storeDir,
|
|
198970
199053
|
virtualStoreDir: opts.virtualStoreDir ?? ".",
|
|
199054
|
+
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
|
|
198971
199055
|
modulesDir: opts.modulesDir,
|
|
198972
199056
|
registries: opts.registries,
|
|
198973
199057
|
wantedLockfile: lockfile,
|
|
@@ -209755,9 +209839,9 @@ var require_storeStatus = __commonJS({
|
|
|
209755
209839
|
});
|
|
209756
209840
|
const cafsDir = path_1.default.join(storeDir, "files");
|
|
209757
209841
|
const modified = await (0, p_filter_1.default)(pkgs, async ({ id, integrity, depPath, name }) => {
|
|
209758
|
-
const pkgIndexFilePath = integrity ? (0, store_cafs_1.getFilePathInCafs)(cafsDir, integrity, "index") : path_1.default.join(storeDir, dp.depPathToFilename(id), "integrity.json");
|
|
209842
|
+
const pkgIndexFilePath = integrity ? (0, store_cafs_1.getFilePathInCafs)(cafsDir, integrity, "index") : path_1.default.join(storeDir, dp.depPathToFilename(id, maybeOpts.virtualStoreDirMaxLength), "integrity.json");
|
|
209759
209843
|
const { files } = await (0, load_json_file_1.default)(pkgIndexFilePath);
|
|
209760
|
-
return await dint_1.default.check(path_1.default.join(virtualStoreDir, dp.depPathToFilename(depPath), "node_modules", name), files) === false;
|
|
209844
|
+
return await dint_1.default.check(path_1.default.join(virtualStoreDir, dp.depPathToFilename(depPath, maybeOpts.virtualStoreDirMaxLength), "node_modules", name), files) === false;
|
|
209761
209845
|
}, { concurrency: 8 });
|
|
209762
209846
|
if (reporter != null && typeof reporter === "function") {
|
|
209763
209847
|
logger_1.streamParser.removeListener("data", reporter);
|