pnpm 10.34.3 → 10.34.5
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 +57 -57
- package/dist/node_modules/.pnpm/lock.yaml +27 -27
- package/dist/node_modules/.pnpm-workspace-state-v1.json +3 -3
- package/dist/node_modules/brace-expansion/.tap/processinfo/8b906b8c-e21f-40b5-8c0d-214d8c2682c5.json +719 -0
- package/dist/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
- package/dist/node_modules/brace-expansion/dist/commonjs/index.js +263 -0
- package/dist/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -0
- package/dist/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/dist/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -0
- package/dist/node_modules/brace-expansion/dist/esm/index.js +259 -0
- package/dist/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
- package/dist/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/dist/node_modules/brace-expansion/index.js +29 -17
- package/dist/node_modules/brace-expansion/package.json +1 -1
- package/dist/node_modules/p-map/index.js +2 -1
- package/dist/node_modules/p-map/package.json +1 -1
- package/dist/node_modules/picomatch/lib/parse.js +39 -9
- package/dist/node_modules/picomatch/lib/picomatch.js +14 -2
- package/dist/node_modules/picomatch/package.json +3 -2
- package/dist/node_modules/semver/classes/range.js +6 -2
- package/dist/node_modules/semver/package.json +1 -1
- package/dist/node_modules/tar/dist/commonjs/header.d.ts.map +1 -1
- package/dist/node_modules/tar/dist/commonjs/header.js +5 -4
- package/dist/node_modules/tar/dist/commonjs/header.js.map +1 -1
- package/dist/node_modules/tar/dist/commonjs/index.min.js +3 -3
- package/dist/node_modules/tar/dist/commonjs/index.min.js.map +3 -3
- package/dist/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +1 -1
- package/dist/node_modules/tar/dist/commonjs/normalize-windows-path.js +2 -2
- package/dist/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +1 -1
- package/dist/node_modules/tar/dist/commonjs/options.d.ts.map +1 -1
- package/dist/node_modules/tar/dist/commonjs/options.js.map +1 -1
- package/dist/node_modules/tar/dist/commonjs/parse.d.ts.map +1 -1
- package/dist/node_modules/tar/dist/commonjs/parse.js +39 -4
- package/dist/node_modules/tar/dist/commonjs/parse.js.map +1 -1
- package/dist/node_modules/tar/dist/commonjs/pax.js +30 -6
- package/dist/node_modules/tar/dist/commonjs/pax.js.map +1 -1
- package/dist/node_modules/tar/dist/commonjs/unpack.js +2 -2
- package/dist/node_modules/tar/dist/commonjs/unpack.js.map +1 -1
- package/dist/node_modules/tar/dist/esm/header.d.ts.map +1 -1
- package/dist/node_modules/tar/dist/esm/header.js +5 -4
- package/dist/node_modules/tar/dist/esm/header.js.map +1 -1
- package/dist/node_modules/tar/dist/esm/index.min.js +3 -3
- package/dist/node_modules/tar/dist/esm/index.min.js.map +3 -3
- package/dist/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -1
- package/dist/node_modules/tar/dist/esm/normalize-windows-path.js +2 -2
- package/dist/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -1
- package/dist/node_modules/tar/dist/esm/options.d.ts.map +1 -1
- package/dist/node_modules/tar/dist/esm/options.js.map +1 -1
- package/dist/node_modules/tar/dist/esm/parse.d.ts.map +1 -1
- package/dist/node_modules/tar/dist/esm/parse.js +39 -4
- package/dist/node_modules/tar/dist/esm/parse.js.map +1 -1
- package/dist/node_modules/tar/dist/esm/pax.js +30 -6
- package/dist/node_modules/tar/dist/esm/pax.js.map +1 -1
- package/dist/node_modules/tar/dist/esm/unpack.js +2 -2
- package/dist/node_modules/tar/dist/esm/unpack.js.map +1 -1
- package/dist/node_modules/tar/package.json +1 -1
- package/dist/pnpm.cjs +598 -345
- package/dist/worker.js +1303 -10
- package/package.json +1 -1
package/dist/pnpm.cjs
CHANGED
|
@@ -2973,7 +2973,7 @@ var require_lib4 = __commonJS({
|
|
|
2973
2973
|
var load_json_file_1 = __importDefault2(require_load_json_file());
|
|
2974
2974
|
var defaultManifest = {
|
|
2975
2975
|
name: true ? "pnpm" : "pnpm",
|
|
2976
|
-
version: true ? "10.34.
|
|
2976
|
+
version: true ? "10.34.5" : "0.0.0"
|
|
2977
2977
|
};
|
|
2978
2978
|
var pkgJson;
|
|
2979
2979
|
if (require.main == null) {
|
|
@@ -16935,8 +16935,9 @@ var require_dropUntrustedEnvExpansions = __commonJS({
|
|
|
16935
16935
|
return /\$\{[^}]+\}/.test(value);
|
|
16936
16936
|
}
|
|
16937
16937
|
var DOCS_URL = "https://pnpm.io/npmrc";
|
|
16938
|
+
var SHELL_SAFE_KEY = /^[\w@.:/-]+$/;
|
|
16938
16939
|
function configSetExample(key) {
|
|
16939
|
-
return
|
|
16940
|
+
return SHELL_SAFE_KEY.test(key) ? ` (for example, run: pnpm config set "${key}" <value>)` : "";
|
|
16940
16941
|
}
|
|
16941
16942
|
function warnIgnoredRequestDestinationEnv(filePath, key, warnings) {
|
|
16942
16943
|
warnings.push(`Ignored project-level request destination "${key}" in "${filePath}": environment variables are not expanded in registry or proxy URLs that come from a project .npmrc, because that file is committed to the repository and a malicious value could redirect requests or leak secrets. Move this setting to a trusted source that pnpm still expands \u2014 put it in your user-level ~/.npmrc, or set it with pnpm config set${configSetExample(key)}. If the value is not secret, you can also write it literally in the project .npmrc. See ${DOCS_URL}`);
|
|
@@ -18362,7 +18363,7 @@ var require_getOptionsFromRootManifest = __commonJS({
|
|
|
18362
18363
|
}
|
|
18363
18364
|
return settings;
|
|
18364
18365
|
}
|
|
18365
|
-
var REQUEST_DESTINATION_SCALAR_KEYS = /* @__PURE__ */ new Set(["registry"]);
|
|
18366
|
+
var REQUEST_DESTINATION_SCALAR_KEYS = /* @__PURE__ */ new Set(["registry", "httpProxy", "httpsProxy", "noProxy", "proxy", "noproxy"]);
|
|
18366
18367
|
function replaceEnvInSettings(settings) {
|
|
18367
18368
|
const newSettings = {};
|
|
18368
18369
|
for (const [key, value] of Object.entries(settings)) {
|
|
@@ -61551,6 +61552,10 @@ var require_nodeReleaseKeys = __commonJS({
|
|
|
61551
61552
|
{
|
|
61552
61553
|
fingerprint: "5BE8A3F6C8A5C01D106C0AD820B1A390B168D356",
|
|
61553
61554
|
armoredKey: "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmDMEaGA63BYJKwYBBAHaRw8BAQdAo/yU+MutacFmmn0CEX495goNrBxR24235XLM\ncvHYjfq0L0FudG9pbmUgZHUgSGFtZWwgPGR1aGFtZWxhbnRvaW5lMTk5NUBnbWFp\nbC5jb20+iI4EExYKADYWIQRb6KP2yKXAHRBsCtggsaOQsWjTVgUCaGA63AIbAwQL\nCQgHBBUKCQgFFgIDAQACHgUCF4AACgkQILGjkLFo01afgwEA/sLHqsj7ml2vyDoT\nKDPE8n9a80ZOh14OfnlOe0cCZA8BAMEOOk7QFI69DIlV1nMiqcFCqQFoSzBU2LkI\nR17p/j4NtDNBbnRvaW5lIGR1IEhhbWVsIDxhbnRvaW5lLmR1aGFtZWxAcGxhdGZv\ncm1hdGljLmRldj6IjgQTFgoANhYhBFvoo/bIpcAdEGwK2CCxo5CxaNNWBQJpsCMx\nAhsDBAsJCAcEFQoJCAUWAgMBAAIeAQIXgAAKCRAgsaOQsWjTVr/sAPwIBsG8g6ND\nzoNRTX1wPKBvfZg1NP7tYCyM5sxQfrpuLAEA05AhG4xBILfhL/f0pqR5jXfxg6gz\nT6WfeVeS6zeHZwe4OARoYDrcEgorBgEEAZdVAQUBAQdAQVmtih8AO3ryBQMR/22x\nWHVKLjAbCiH2cMxNH+iy1RQDAQgHiHgEGBYKACAWIQRb6KP2yKXAHRBsCtggsaOQ\nsWjTVgUCaGA63AIbDAAKCRAgsaOQsWjTVu8oAP9Bc+QY+9FikX3YvMgWAqiDlVOy\no0y6UIZGBMSQlF80wAD/d34LqtVIVe9oe5NO3xA75+6Ew8tGeAjUq/ovagr5dAU=\n=JsVv\n-----END PGP PUBLIC KEY BLOCK-----\n"
|
|
61555
|
+
},
|
|
61556
|
+
{
|
|
61557
|
+
fingerprint: "655F3B5C1FB3FA8D1A0CA6BDE4A7D232B936D2FD",
|
|
61558
|
+
armoredKey: "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmDMEakIjcxYJKwYBBAHaRw8BAQdAYRFWvBCAd9dDjKTePuAvvzAWxhvojAXco0m4\n2AMh/MC0H1N0ZXdhcnQgWCBBZGRpc29uIDxzeGFAaWJtLmNvbT6ImQQTFgoAQRYh\nBGVfO1wfs/qNGgymveSn0jK5NtL9BQJqQiNzAhsDBQkDwmcABQsJCAcCAiICBhUK\nCQgLAgQWAgMBAh4HAheAAAoJEOSn0jK5NtL9FOEBAMpIjknm4fnEQvTmIlzy0kDu\nVplF4HR78+lBef2i4590AP9i82wtP4pH1/vynoSBMkCauFIPmF1c9MYLFF0f53zq\nArg4BGpCI3MSCisGAQQBl1UBBQEBB0AVa1WJ4P8ir/M7NaCGrX7PDs0QU9qzpzme\na5TZ44b/YgMBCAeIfgQYFgoAJhYhBGVfO1wfs/qNGgymveSn0jK5NtL9BQJqQiNz\nAhsMBQkDwmcAAAoJEOSn0jK5NtL9EzYA/Arr4hbKLaU6OUjAVbH7HGLEl0HSvxE8\n5lEgWfuNbqOtAQCF9UT0wQEfiIj2R358Ce62zV43w2yaD8Xu0M/S+hz8AQ==\n=DcLq\n-----END PGP PUBLIC KEY BLOCK-----\n"
|
|
61554
61559
|
}
|
|
61555
61560
|
];
|
|
61556
61561
|
}
|
|
@@ -117195,6 +117200,209 @@ var require_lib96 = __commonJS({
|
|
|
117195
117200
|
}
|
|
117196
117201
|
});
|
|
117197
117202
|
|
|
117203
|
+
// ../node_modules/.pnpm/builtins@5.1.0/node_modules/builtins/index.js
|
|
117204
|
+
var require_builtins2 = __commonJS({
|
|
117205
|
+
"../node_modules/.pnpm/builtins@5.1.0/node_modules/builtins/index.js"(exports2, module2) {
|
|
117206
|
+
"use strict";
|
|
117207
|
+
var satisfies = require_satisfies();
|
|
117208
|
+
var permanentModules = [
|
|
117209
|
+
"assert",
|
|
117210
|
+
"buffer",
|
|
117211
|
+
"child_process",
|
|
117212
|
+
"cluster",
|
|
117213
|
+
"console",
|
|
117214
|
+
"constants",
|
|
117215
|
+
"crypto",
|
|
117216
|
+
"dgram",
|
|
117217
|
+
"dns",
|
|
117218
|
+
"domain",
|
|
117219
|
+
"events",
|
|
117220
|
+
"fs",
|
|
117221
|
+
"http",
|
|
117222
|
+
"https",
|
|
117223
|
+
"module",
|
|
117224
|
+
"net",
|
|
117225
|
+
"os",
|
|
117226
|
+
"path",
|
|
117227
|
+
"punycode",
|
|
117228
|
+
"querystring",
|
|
117229
|
+
"readline",
|
|
117230
|
+
"repl",
|
|
117231
|
+
"stream",
|
|
117232
|
+
"string_decoder",
|
|
117233
|
+
"sys",
|
|
117234
|
+
"timers",
|
|
117235
|
+
"tls",
|
|
117236
|
+
"tty",
|
|
117237
|
+
"url",
|
|
117238
|
+
"util",
|
|
117239
|
+
"vm",
|
|
117240
|
+
"zlib"
|
|
117241
|
+
];
|
|
117242
|
+
var versionLockedModules = {
|
|
117243
|
+
freelist: "<6.0.0",
|
|
117244
|
+
v8: ">=1.0.0",
|
|
117245
|
+
process: ">=1.1.0",
|
|
117246
|
+
inspector: ">=8.0.0",
|
|
117247
|
+
async_hooks: ">=8.1.0",
|
|
117248
|
+
http2: ">=8.4.0",
|
|
117249
|
+
perf_hooks: ">=8.5.0",
|
|
117250
|
+
trace_events: ">=10.0.0",
|
|
117251
|
+
worker_threads: ">=12.0.0",
|
|
117252
|
+
"node:test": ">=18.0.0"
|
|
117253
|
+
};
|
|
117254
|
+
var experimentalModules = {
|
|
117255
|
+
worker_threads: ">=10.5.0",
|
|
117256
|
+
wasi: ">=12.16.0",
|
|
117257
|
+
diagnostics_channel: "^14.17.0 || >=15.1.0"
|
|
117258
|
+
};
|
|
117259
|
+
module2.exports = ({ version: version2 = process.version, experimental = false } = {}) => {
|
|
117260
|
+
const builtins = [...permanentModules];
|
|
117261
|
+
for (const [name, semverRange] of Object.entries(versionLockedModules)) {
|
|
117262
|
+
if (version2 === "*" || satisfies(version2, semverRange)) {
|
|
117263
|
+
builtins.push(name);
|
|
117264
|
+
}
|
|
117265
|
+
}
|
|
117266
|
+
if (experimental) {
|
|
117267
|
+
for (const [name, semverRange] of Object.entries(experimentalModules)) {
|
|
117268
|
+
if (!builtins.includes(name) && (version2 === "*" || satisfies(version2, semverRange))) {
|
|
117269
|
+
builtins.push(name);
|
|
117270
|
+
}
|
|
117271
|
+
}
|
|
117272
|
+
}
|
|
117273
|
+
return builtins;
|
|
117274
|
+
};
|
|
117275
|
+
}
|
|
117276
|
+
});
|
|
117277
|
+
|
|
117278
|
+
// ../node_modules/.pnpm/validate-npm-package-name@5.0.0/node_modules/validate-npm-package-name/lib/index.js
|
|
117279
|
+
var require_lib97 = __commonJS({
|
|
117280
|
+
"../node_modules/.pnpm/validate-npm-package-name@5.0.0/node_modules/validate-npm-package-name/lib/index.js"(exports2, module2) {
|
|
117281
|
+
"use strict";
|
|
117282
|
+
var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
|
|
117283
|
+
var builtins = require_builtins2();
|
|
117284
|
+
var blacklist = [
|
|
117285
|
+
"node_modules",
|
|
117286
|
+
"favicon.ico"
|
|
117287
|
+
];
|
|
117288
|
+
function validate2(name) {
|
|
117289
|
+
var warnings = [];
|
|
117290
|
+
var errors = [];
|
|
117291
|
+
if (name === null) {
|
|
117292
|
+
errors.push("name cannot be null");
|
|
117293
|
+
return done(warnings, errors);
|
|
117294
|
+
}
|
|
117295
|
+
if (name === void 0) {
|
|
117296
|
+
errors.push("name cannot be undefined");
|
|
117297
|
+
return done(warnings, errors);
|
|
117298
|
+
}
|
|
117299
|
+
if (typeof name !== "string") {
|
|
117300
|
+
errors.push("name must be a string");
|
|
117301
|
+
return done(warnings, errors);
|
|
117302
|
+
}
|
|
117303
|
+
if (!name.length) {
|
|
117304
|
+
errors.push("name length must be greater than zero");
|
|
117305
|
+
}
|
|
117306
|
+
if (name.match(/^\./)) {
|
|
117307
|
+
errors.push("name cannot start with a period");
|
|
117308
|
+
}
|
|
117309
|
+
if (name.match(/^_/)) {
|
|
117310
|
+
errors.push("name cannot start with an underscore");
|
|
117311
|
+
}
|
|
117312
|
+
if (name.trim() !== name) {
|
|
117313
|
+
errors.push("name cannot contain leading or trailing spaces");
|
|
117314
|
+
}
|
|
117315
|
+
blacklist.forEach(function(blacklistedName) {
|
|
117316
|
+
if (name.toLowerCase() === blacklistedName) {
|
|
117317
|
+
errors.push(blacklistedName + " is a blacklisted name");
|
|
117318
|
+
}
|
|
117319
|
+
});
|
|
117320
|
+
builtins({ version: "*" }).forEach(function(builtin) {
|
|
117321
|
+
if (name.toLowerCase() === builtin) {
|
|
117322
|
+
warnings.push(builtin + " is a core module name");
|
|
117323
|
+
}
|
|
117324
|
+
});
|
|
117325
|
+
if (name.length > 214) {
|
|
117326
|
+
warnings.push("name can no longer contain more than 214 characters");
|
|
117327
|
+
}
|
|
117328
|
+
if (name.toLowerCase() !== name) {
|
|
117329
|
+
warnings.push("name can no longer contain capital letters");
|
|
117330
|
+
}
|
|
117331
|
+
if (/[~'!()*]/.test(name.split("/").slice(-1)[0])) {
|
|
117332
|
+
warnings.push(`name can no longer contain special characters ("~'!()*")`);
|
|
117333
|
+
}
|
|
117334
|
+
if (encodeURIComponent(name) !== name) {
|
|
117335
|
+
var nameMatch = name.match(scopedPackagePattern);
|
|
117336
|
+
if (nameMatch) {
|
|
117337
|
+
var user = nameMatch[1];
|
|
117338
|
+
var pkg = nameMatch[2];
|
|
117339
|
+
if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) {
|
|
117340
|
+
return done(warnings, errors);
|
|
117341
|
+
}
|
|
117342
|
+
}
|
|
117343
|
+
errors.push("name can only contain URL-friendly characters");
|
|
117344
|
+
}
|
|
117345
|
+
return done(warnings, errors);
|
|
117346
|
+
}
|
|
117347
|
+
var done = function(warnings, errors) {
|
|
117348
|
+
var result2 = {
|
|
117349
|
+
validForNewPackages: errors.length === 0 && warnings.length === 0,
|
|
117350
|
+
validForOldPackages: errors.length === 0,
|
|
117351
|
+
warnings,
|
|
117352
|
+
errors
|
|
117353
|
+
};
|
|
117354
|
+
if (!result2.warnings.length) {
|
|
117355
|
+
delete result2.warnings;
|
|
117356
|
+
}
|
|
117357
|
+
if (!result2.errors.length) {
|
|
117358
|
+
delete result2.errors;
|
|
117359
|
+
}
|
|
117360
|
+
return result2;
|
|
117361
|
+
};
|
|
117362
|
+
module2.exports = validate2;
|
|
117363
|
+
}
|
|
117364
|
+
});
|
|
117365
|
+
|
|
117366
|
+
// ../config/deps-installer/lib/assertValidConfigDepName.js
|
|
117367
|
+
var require_assertValidConfigDepName = __commonJS({
|
|
117368
|
+
"../config/deps-installer/lib/assertValidConfigDepName.js"(exports2) {
|
|
117369
|
+
"use strict";
|
|
117370
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
117371
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
117372
|
+
};
|
|
117373
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
117374
|
+
exports2.assertValidConfigDepName = assertValidConfigDepName;
|
|
117375
|
+
var error_1 = require_lib6();
|
|
117376
|
+
var validate_npm_package_name_1 = __importDefault2(require_lib97());
|
|
117377
|
+
function assertValidConfigDepName(name) {
|
|
117378
|
+
if (!(0, validate_npm_package_name_1.default)(name).validForOldPackages) {
|
|
117379
|
+
throw new error_1.PnpmError("INVALID_DEPENDENCY_NAME", `The configDependencies in pnpm-workspace.yaml contains a dependency with an invalid name: ${JSON.stringify(name)}`, {
|
|
117380
|
+
hint: "A dependency name must be a valid npm package name \u2014 a single `name` or `@scope/name` consisting of URL-friendly characters, with no leading `.` or `_`, and not equal to reserved names such as `node_modules`."
|
|
117381
|
+
});
|
|
117382
|
+
}
|
|
117383
|
+
}
|
|
117384
|
+
}
|
|
117385
|
+
});
|
|
117386
|
+
|
|
117387
|
+
// ../config/deps-installer/lib/assertValidConfigDepVersion.js
|
|
117388
|
+
var require_assertValidConfigDepVersion = __commonJS({
|
|
117389
|
+
"../config/deps-installer/lib/assertValidConfigDepVersion.js"(exports2) {
|
|
117390
|
+
"use strict";
|
|
117391
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
117392
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
117393
|
+
};
|
|
117394
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
117395
|
+
exports2.assertValidConfigDepVersion = assertValidConfigDepVersion;
|
|
117396
|
+
var error_1 = require_lib6();
|
|
117397
|
+
var semver_12 = __importDefault2(require_semver2());
|
|
117398
|
+
function assertValidConfigDepVersion(name, version2) {
|
|
117399
|
+
if (semver_12.default.valid(version2) == null) {
|
|
117400
|
+
throw new error_1.PnpmError("INVALID_CONFIG_DEP_VERSION", `The config dependency "${name}" has an invalid version "${version2}"`, { hint: "A config dependency version must be an exact semver version." });
|
|
117401
|
+
}
|
|
117402
|
+
}
|
|
117403
|
+
}
|
|
117404
|
+
});
|
|
117405
|
+
|
|
117198
117406
|
// ../config/deps-installer/lib/normalizeConfigDeps.js
|
|
117199
117407
|
var require_normalizeConfigDeps = __commonJS({
|
|
117200
117408
|
"../config/deps-installer/lib/normalizeConfigDeps.js"(exports2) {
|
|
@@ -117207,12 +117415,16 @@ var require_normalizeConfigDeps = __commonJS({
|
|
|
117207
117415
|
var get_npm_tarball_url_1 = __importDefault2(require_lib96());
|
|
117208
117416
|
var error_1 = require_lib6();
|
|
117209
117417
|
var pick_registry_for_package_1 = require_lib44();
|
|
117418
|
+
var assertValidConfigDepName_js_1 = require_assertValidConfigDepName();
|
|
117419
|
+
var assertValidConfigDepVersion_js_1 = require_assertValidConfigDepVersion();
|
|
117210
117420
|
function normalizeConfigDeps(configDependencies, opts) {
|
|
117211
117421
|
const deps = {};
|
|
117212
117422
|
for (const [pkgName, pkgSpec] of Object.entries(configDependencies)) {
|
|
117423
|
+
(0, assertValidConfigDepName_js_1.assertValidConfigDepName)(pkgName);
|
|
117213
117424
|
const registry = (0, pick_registry_for_package_1.pickRegistryForPackage)(opts.registries, pkgName);
|
|
117214
117425
|
if (typeof pkgSpec === "object") {
|
|
117215
117426
|
const { version: version2, integrity } = parseIntegrity(pkgName, pkgSpec.integrity);
|
|
117427
|
+
(0, assertValidConfigDepVersion_js_1.assertValidConfigDepVersion)(pkgName, version2);
|
|
117216
117428
|
deps[pkgName] = {
|
|
117217
117429
|
version: version2,
|
|
117218
117430
|
resolution: {
|
|
@@ -117224,6 +117436,7 @@ var require_normalizeConfigDeps = __commonJS({
|
|
|
117224
117436
|
}
|
|
117225
117437
|
if (typeof pkgSpec === "string") {
|
|
117226
117438
|
const { version: version2, integrity } = parseIntegrity(pkgName, pkgSpec);
|
|
117439
|
+
(0, assertValidConfigDepVersion_js_1.assertValidConfigDepVersion)(pkgName, version2);
|
|
117227
117440
|
deps[pkgName] = {
|
|
117228
117441
|
version: version2,
|
|
117229
117442
|
resolution: {
|
|
@@ -124781,7 +124994,7 @@ var require_patchDocument = __commonJS({
|
|
|
124781
124994
|
});
|
|
124782
124995
|
|
|
124783
124996
|
// ../yaml/document-sync/lib/index.js
|
|
124784
|
-
var
|
|
124997
|
+
var require_lib98 = __commonJS({
|
|
124785
124998
|
"../yaml/document-sync/lib/index.js"(exports2) {
|
|
124786
124999
|
"use strict";
|
|
124787
125000
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -124871,7 +125084,7 @@ var require_sort_keys = __commonJS({
|
|
|
124871
125084
|
});
|
|
124872
125085
|
|
|
124873
125086
|
// ../object/key-sorting/lib/index.js
|
|
124874
|
-
var
|
|
125087
|
+
var require_lib99 = __commonJS({
|
|
124875
125088
|
"../object/key-sorting/lib/index.js"(exports2) {
|
|
124876
125089
|
"use strict";
|
|
124877
125090
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -124917,7 +125130,7 @@ var require_lib98 = __commonJS({
|
|
|
124917
125130
|
});
|
|
124918
125131
|
|
|
124919
125132
|
// ../workspace/manifest-writer/lib/index.js
|
|
124920
|
-
var
|
|
125133
|
+
var require_lib100 = __commonJS({
|
|
124921
125134
|
"../workspace/manifest-writer/lib/index.js"(exports2) {
|
|
124922
125135
|
"use strict";
|
|
124923
125136
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -124930,11 +125143,11 @@ var require_lib99 = __commonJS({
|
|
|
124930
125143
|
var util_1 = __importDefault2(require("util"));
|
|
124931
125144
|
var workspace_read_manifest_1 = require_lib22();
|
|
124932
125145
|
var constants_1 = require_lib5();
|
|
124933
|
-
var yaml_document_sync_1 =
|
|
125146
|
+
var yaml_document_sync_1 = require_lib98();
|
|
124934
125147
|
var equals_1 = __importDefault2(require_equals2());
|
|
124935
125148
|
var yaml_1 = __importDefault2(require_dist20());
|
|
124936
125149
|
var write_file_atomic_1 = __importDefault2(require_lib14());
|
|
124937
|
-
var object_key_sorting_1 =
|
|
125150
|
+
var object_key_sorting_1 = require_lib99();
|
|
124938
125151
|
async function writeManifestFile(dir, manifest) {
|
|
124939
125152
|
const manifestStr = manifest.toString({
|
|
124940
125153
|
lineWidth: 0,
|
|
@@ -125113,7 +125326,7 @@ var require_lib99 = __commonJS({
|
|
|
125113
125326
|
});
|
|
125114
125327
|
|
|
125115
125328
|
// ../config/config-writer/lib/index.js
|
|
125116
|
-
var
|
|
125329
|
+
var require_lib101 = __commonJS({
|
|
125117
125330
|
"../config/config-writer/lib/index.js"(exports2) {
|
|
125118
125331
|
"use strict";
|
|
125119
125332
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -125122,7 +125335,7 @@ var require_lib100 = __commonJS({
|
|
|
125122
125335
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
125123
125336
|
exports2.writeSettings = writeSettings;
|
|
125124
125337
|
var read_project_manifest_1 = require_lib17();
|
|
125125
|
-
var workspace_manifest_writer_1 =
|
|
125338
|
+
var workspace_manifest_writer_1 = require_lib100();
|
|
125126
125339
|
var equals_1 = __importDefault2(require_equals2());
|
|
125127
125340
|
async function writeSettings(opts) {
|
|
125128
125341
|
if (opts.rootProjectManifest?.pnpm != null) {
|
|
@@ -125168,169 +125381,6 @@ var require_lib100 = __commonJS({
|
|
|
125168
125381
|
}
|
|
125169
125382
|
});
|
|
125170
125383
|
|
|
125171
|
-
// ../node_modules/.pnpm/builtins@5.1.0/node_modules/builtins/index.js
|
|
125172
|
-
var require_builtins2 = __commonJS({
|
|
125173
|
-
"../node_modules/.pnpm/builtins@5.1.0/node_modules/builtins/index.js"(exports2, module2) {
|
|
125174
|
-
"use strict";
|
|
125175
|
-
var satisfies = require_satisfies();
|
|
125176
|
-
var permanentModules = [
|
|
125177
|
-
"assert",
|
|
125178
|
-
"buffer",
|
|
125179
|
-
"child_process",
|
|
125180
|
-
"cluster",
|
|
125181
|
-
"console",
|
|
125182
|
-
"constants",
|
|
125183
|
-
"crypto",
|
|
125184
|
-
"dgram",
|
|
125185
|
-
"dns",
|
|
125186
|
-
"domain",
|
|
125187
|
-
"events",
|
|
125188
|
-
"fs",
|
|
125189
|
-
"http",
|
|
125190
|
-
"https",
|
|
125191
|
-
"module",
|
|
125192
|
-
"net",
|
|
125193
|
-
"os",
|
|
125194
|
-
"path",
|
|
125195
|
-
"punycode",
|
|
125196
|
-
"querystring",
|
|
125197
|
-
"readline",
|
|
125198
|
-
"repl",
|
|
125199
|
-
"stream",
|
|
125200
|
-
"string_decoder",
|
|
125201
|
-
"sys",
|
|
125202
|
-
"timers",
|
|
125203
|
-
"tls",
|
|
125204
|
-
"tty",
|
|
125205
|
-
"url",
|
|
125206
|
-
"util",
|
|
125207
|
-
"vm",
|
|
125208
|
-
"zlib"
|
|
125209
|
-
];
|
|
125210
|
-
var versionLockedModules = {
|
|
125211
|
-
freelist: "<6.0.0",
|
|
125212
|
-
v8: ">=1.0.0",
|
|
125213
|
-
process: ">=1.1.0",
|
|
125214
|
-
inspector: ">=8.0.0",
|
|
125215
|
-
async_hooks: ">=8.1.0",
|
|
125216
|
-
http2: ">=8.4.0",
|
|
125217
|
-
perf_hooks: ">=8.5.0",
|
|
125218
|
-
trace_events: ">=10.0.0",
|
|
125219
|
-
worker_threads: ">=12.0.0",
|
|
125220
|
-
"node:test": ">=18.0.0"
|
|
125221
|
-
};
|
|
125222
|
-
var experimentalModules = {
|
|
125223
|
-
worker_threads: ">=10.5.0",
|
|
125224
|
-
wasi: ">=12.16.0",
|
|
125225
|
-
diagnostics_channel: "^14.17.0 || >=15.1.0"
|
|
125226
|
-
};
|
|
125227
|
-
module2.exports = ({ version: version2 = process.version, experimental = false } = {}) => {
|
|
125228
|
-
const builtins = [...permanentModules];
|
|
125229
|
-
for (const [name, semverRange] of Object.entries(versionLockedModules)) {
|
|
125230
|
-
if (version2 === "*" || satisfies(version2, semverRange)) {
|
|
125231
|
-
builtins.push(name);
|
|
125232
|
-
}
|
|
125233
|
-
}
|
|
125234
|
-
if (experimental) {
|
|
125235
|
-
for (const [name, semverRange] of Object.entries(experimentalModules)) {
|
|
125236
|
-
if (!builtins.includes(name) && (version2 === "*" || satisfies(version2, semverRange))) {
|
|
125237
|
-
builtins.push(name);
|
|
125238
|
-
}
|
|
125239
|
-
}
|
|
125240
|
-
}
|
|
125241
|
-
return builtins;
|
|
125242
|
-
};
|
|
125243
|
-
}
|
|
125244
|
-
});
|
|
125245
|
-
|
|
125246
|
-
// ../node_modules/.pnpm/validate-npm-package-name@5.0.0/node_modules/validate-npm-package-name/lib/index.js
|
|
125247
|
-
var require_lib101 = __commonJS({
|
|
125248
|
-
"../node_modules/.pnpm/validate-npm-package-name@5.0.0/node_modules/validate-npm-package-name/lib/index.js"(exports2, module2) {
|
|
125249
|
-
"use strict";
|
|
125250
|
-
var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
|
|
125251
|
-
var builtins = require_builtins2();
|
|
125252
|
-
var blacklist = [
|
|
125253
|
-
"node_modules",
|
|
125254
|
-
"favicon.ico"
|
|
125255
|
-
];
|
|
125256
|
-
function validate2(name) {
|
|
125257
|
-
var warnings = [];
|
|
125258
|
-
var errors = [];
|
|
125259
|
-
if (name === null) {
|
|
125260
|
-
errors.push("name cannot be null");
|
|
125261
|
-
return done(warnings, errors);
|
|
125262
|
-
}
|
|
125263
|
-
if (name === void 0) {
|
|
125264
|
-
errors.push("name cannot be undefined");
|
|
125265
|
-
return done(warnings, errors);
|
|
125266
|
-
}
|
|
125267
|
-
if (typeof name !== "string") {
|
|
125268
|
-
errors.push("name must be a string");
|
|
125269
|
-
return done(warnings, errors);
|
|
125270
|
-
}
|
|
125271
|
-
if (!name.length) {
|
|
125272
|
-
errors.push("name length must be greater than zero");
|
|
125273
|
-
}
|
|
125274
|
-
if (name.match(/^\./)) {
|
|
125275
|
-
errors.push("name cannot start with a period");
|
|
125276
|
-
}
|
|
125277
|
-
if (name.match(/^_/)) {
|
|
125278
|
-
errors.push("name cannot start with an underscore");
|
|
125279
|
-
}
|
|
125280
|
-
if (name.trim() !== name) {
|
|
125281
|
-
errors.push("name cannot contain leading or trailing spaces");
|
|
125282
|
-
}
|
|
125283
|
-
blacklist.forEach(function(blacklistedName) {
|
|
125284
|
-
if (name.toLowerCase() === blacklistedName) {
|
|
125285
|
-
errors.push(blacklistedName + " is a blacklisted name");
|
|
125286
|
-
}
|
|
125287
|
-
});
|
|
125288
|
-
builtins({ version: "*" }).forEach(function(builtin) {
|
|
125289
|
-
if (name.toLowerCase() === builtin) {
|
|
125290
|
-
warnings.push(builtin + " is a core module name");
|
|
125291
|
-
}
|
|
125292
|
-
});
|
|
125293
|
-
if (name.length > 214) {
|
|
125294
|
-
warnings.push("name can no longer contain more than 214 characters");
|
|
125295
|
-
}
|
|
125296
|
-
if (name.toLowerCase() !== name) {
|
|
125297
|
-
warnings.push("name can no longer contain capital letters");
|
|
125298
|
-
}
|
|
125299
|
-
if (/[~'!()*]/.test(name.split("/").slice(-1)[0])) {
|
|
125300
|
-
warnings.push(`name can no longer contain special characters ("~'!()*")`);
|
|
125301
|
-
}
|
|
125302
|
-
if (encodeURIComponent(name) !== name) {
|
|
125303
|
-
var nameMatch = name.match(scopedPackagePattern);
|
|
125304
|
-
if (nameMatch) {
|
|
125305
|
-
var user = nameMatch[1];
|
|
125306
|
-
var pkg = nameMatch[2];
|
|
125307
|
-
if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) {
|
|
125308
|
-
return done(warnings, errors);
|
|
125309
|
-
}
|
|
125310
|
-
}
|
|
125311
|
-
errors.push("name can only contain URL-friendly characters");
|
|
125312
|
-
}
|
|
125313
|
-
return done(warnings, errors);
|
|
125314
|
-
}
|
|
125315
|
-
var done = function(warnings, errors) {
|
|
125316
|
-
var result2 = {
|
|
125317
|
-
validForNewPackages: errors.length === 0 && warnings.length === 0,
|
|
125318
|
-
validForOldPackages: errors.length === 0,
|
|
125319
|
-
warnings,
|
|
125320
|
-
errors
|
|
125321
|
-
};
|
|
125322
|
-
if (!result2.warnings.length) {
|
|
125323
|
-
delete result2.warnings;
|
|
125324
|
-
}
|
|
125325
|
-
if (!result2.errors.length) {
|
|
125326
|
-
delete result2.errors;
|
|
125327
|
-
}
|
|
125328
|
-
return result2;
|
|
125329
|
-
};
|
|
125330
|
-
module2.exports = validate2;
|
|
125331
|
-
}
|
|
125332
|
-
});
|
|
125333
|
-
|
|
125334
125384
|
// ../packages/parse-wanted-dependency/lib/index.js
|
|
125335
125385
|
var require_lib102 = __commonJS({
|
|
125336
125386
|
"../packages/parse-wanted-dependency/lib/index.js"(exports2) {
|
|
@@ -125340,7 +125390,7 @@ var require_lib102 = __commonJS({
|
|
|
125340
125390
|
};
|
|
125341
125391
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
125342
125392
|
exports2.parseWantedDependency = parseWantedDependency;
|
|
125343
|
-
var validate_npm_package_name_1 = __importDefault2(
|
|
125393
|
+
var validate_npm_package_name_1 = __importDefault2(require_lib97());
|
|
125344
125394
|
function parseWantedDependency(rawWantedDependency) {
|
|
125345
125395
|
const versionDelimiter = rawWantedDependency.indexOf("@", 1);
|
|
125346
125396
|
if (versionDelimiter !== -1) {
|
|
@@ -125378,7 +125428,7 @@ var require_resolveConfigDeps = __commonJS({
|
|
|
125378
125428
|
exports2.resolveConfigDeps = resolveConfigDeps;
|
|
125379
125429
|
var get_npm_tarball_url_1 = __importDefault2(require_lib96());
|
|
125380
125430
|
var error_1 = require_lib6();
|
|
125381
|
-
var config_config_writer_1 =
|
|
125431
|
+
var config_config_writer_1 = require_lib101();
|
|
125382
125432
|
var fetch_1 = require_lib31();
|
|
125383
125433
|
var npm_resolver_1 = require_lib51();
|
|
125384
125434
|
var network_auth_header_1 = require_lib77();
|
|
@@ -139086,6 +139136,7 @@ var require_lib120 = __commonJS({
|
|
|
139086
139136
|
deps: _calcDepGraphHash(/* @__PURE__ */ new Set(), depPath)
|
|
139087
139137
|
};
|
|
139088
139138
|
const hexDigest = (0, crypto_object_hasher_1.hashObjectWithoutSorting)(state, { encoding: "hex" });
|
|
139139
|
+
assertNoPathTraversal(version2);
|
|
139089
139140
|
const prefix = name.startsWith("@") ? "" : "@/";
|
|
139090
139141
|
yield {
|
|
139091
139142
|
hash: `${prefix}${name}/${version2}/${hexDigest}`,
|
|
@@ -139093,6 +139144,13 @@ var require_lib120 = __commonJS({
|
|
|
139093
139144
|
};
|
|
139094
139145
|
}
|
|
139095
139146
|
}
|
|
139147
|
+
function assertNoPathTraversal(version2) {
|
|
139148
|
+
if (version2.split(/[/\\]/).includes("..")) {
|
|
139149
|
+
const error = new Error(`Refusing to build a virtual-store path with the traversal version segment ${JSON.stringify(version2)}`);
|
|
139150
|
+
error.code = "ERR_PNPM_INVALID_DEPENDENCY_NAME";
|
|
139151
|
+
throw error;
|
|
139152
|
+
}
|
|
139153
|
+
}
|
|
139096
139154
|
function lockfileToDepGraph(lockfile) {
|
|
139097
139155
|
const graph = {};
|
|
139098
139156
|
if (lockfile.packages != null) {
|
|
@@ -139143,7 +139201,7 @@ var require_sortLockfileKeys = __commonJS({
|
|
|
139143
139201
|
"use strict";
|
|
139144
139202
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
139145
139203
|
exports2.sortLockfileKeys = sortLockfileKeys;
|
|
139146
|
-
var object_key_sorting_1 =
|
|
139204
|
+
var object_key_sorting_1 = require_lib99();
|
|
139147
139205
|
var ORDERED_KEYS = {
|
|
139148
139206
|
resolution: 1,
|
|
139149
139207
|
id: 2,
|
|
@@ -142024,7 +142082,7 @@ var require_approveBuilds = __commonJS({
|
|
|
142024
142082
|
var enquirer_1 = require_enquirer();
|
|
142025
142083
|
var chalk_1 = __importDefault2(require_source());
|
|
142026
142084
|
var plugin_commands_rebuild_1 = require_lib133();
|
|
142027
|
-
var config_config_writer_1 =
|
|
142085
|
+
var config_config_writer_1 = require_lib101();
|
|
142028
142086
|
var getAutomaticallyIgnoredBuilds_js_1 = require_getAutomaticallyIgnoredBuilds();
|
|
142029
142087
|
exports2.commandNames = ["approve-builds"];
|
|
142030
142088
|
function help() {
|
|
@@ -148235,7 +148293,7 @@ var require_fix = __commonJS({
|
|
|
148235
148293
|
};
|
|
148236
148294
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
148237
148295
|
exports2.fix = fix;
|
|
148238
|
-
var config_config_writer_1 =
|
|
148296
|
+
var config_config_writer_1 = require_lib101();
|
|
148239
148297
|
var difference_1 = __importDefault2(require_difference());
|
|
148240
148298
|
async function fix(auditReport, opts) {
|
|
148241
148299
|
const vulnOverrides = createOverrides(Object.values(auditReport.advisories), opts.auditConfig?.ignoreCves);
|
|
@@ -148270,7 +148328,7 @@ var require_ignore2 = __commonJS({
|
|
|
148270
148328
|
};
|
|
148271
148329
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
148272
148330
|
exports2.ignore = ignore;
|
|
148273
|
-
var config_config_writer_1 =
|
|
148331
|
+
var config_config_writer_1 = require_lib101();
|
|
148274
148332
|
var difference_1 = __importDefault2(require_difference());
|
|
148275
148333
|
async function ignore(opts) {
|
|
148276
148334
|
const currentCves = opts?.auditConfig?.ignoreCves ?? [];
|
|
@@ -150914,7 +150972,7 @@ var require_configSet = __commonJS({
|
|
|
150914
150972
|
var error_1 = require_lib6();
|
|
150915
150973
|
var object_property_path_1 = require_lib141();
|
|
150916
150974
|
var run_npm_1 = require_lib142();
|
|
150917
|
-
var workspace_manifest_writer_1 =
|
|
150975
|
+
var workspace_manifest_writer_1 = require_lib100();
|
|
150918
150976
|
var camelcase_1 = __importDefault2(require_camelcase());
|
|
150919
150977
|
var lodash_kebabcase_1 = __importDefault2(require_lodash());
|
|
150920
150978
|
var read_ini_file_1 = require_read_ini_file();
|
|
@@ -151049,7 +151107,7 @@ var require_configList = __commonJS({
|
|
|
151049
151107
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
151050
151108
|
exports2.configList = configList;
|
|
151051
151109
|
var ini_1 = require_ini3();
|
|
151052
|
-
var object_key_sorting_1 =
|
|
151110
|
+
var object_key_sorting_1 = require_lib99();
|
|
151053
151111
|
async function configList(opts) {
|
|
151054
151112
|
const sortedConfig = (0, object_key_sorting_1.sortDirectKeys)(opts.rawConfig);
|
|
151055
151113
|
if (opts.json) {
|
|
@@ -159847,8 +159905,124 @@ var require_lib157 = __commonJS({
|
|
|
159847
159905
|
}
|
|
159848
159906
|
});
|
|
159849
159907
|
|
|
159850
|
-
// ../
|
|
159908
|
+
// ../fs/symlink-dependency/lib/safeJoinModulesDir.js
|
|
159909
|
+
var require_safeJoinModulesDir = __commonJS({
|
|
159910
|
+
"../fs/symlink-dependency/lib/safeJoinModulesDir.js"(exports2) {
|
|
159911
|
+
"use strict";
|
|
159912
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
159913
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
159914
|
+
};
|
|
159915
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
159916
|
+
exports2.safeJoinModulesDir = safeJoinModulesDir;
|
|
159917
|
+
var path_1 = __importDefault2(require("path"));
|
|
159918
|
+
var validate_npm_package_name_1 = __importDefault2(require_lib97());
|
|
159919
|
+
function safeJoinModulesDir(modulesDir, alias) {
|
|
159920
|
+
if (!(0, validate_npm_package_name_1.default)(alias).validForOldPackages) {
|
|
159921
|
+
throw invalidDependencyNameError(modulesDir, alias);
|
|
159922
|
+
}
|
|
159923
|
+
const link = path_1.default.join(modulesDir, alias);
|
|
159924
|
+
const resolvedDir = path_1.default.resolve(modulesDir);
|
|
159925
|
+
const resolvedLink = path_1.default.resolve(link);
|
|
159926
|
+
if (resolvedLink === resolvedDir || !resolvedLink.startsWith(resolvedDir + path_1.default.sep)) {
|
|
159927
|
+
throw invalidDependencyNameError(modulesDir, alias, resolvedLink);
|
|
159928
|
+
}
|
|
159929
|
+
return link;
|
|
159930
|
+
}
|
|
159931
|
+
function invalidDependencyNameError(modulesDir, alias, resolvedLink) {
|
|
159932
|
+
const detail = resolvedLink ? ` (it resolves to ${resolvedLink})` : "";
|
|
159933
|
+
const error = new Error(`Refusing to place a dependency under ${modulesDir} with the invalid alias ${JSON.stringify(alias)}${detail}`);
|
|
159934
|
+
error.code = "ERR_PNPM_INVALID_DEPENDENCY_NAME";
|
|
159935
|
+
return error;
|
|
159936
|
+
}
|
|
159937
|
+
}
|
|
159938
|
+
});
|
|
159939
|
+
|
|
159940
|
+
// ../fs/symlink-dependency/lib/symlinkDirectRootDependency.js
|
|
159941
|
+
var require_symlinkDirectRootDependency = __commonJS({
|
|
159942
|
+
"../fs/symlink-dependency/lib/symlinkDirectRootDependency.js"(exports2) {
|
|
159943
|
+
"use strict";
|
|
159944
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
159945
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
159946
|
+
};
|
|
159947
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
159948
|
+
exports2.symlinkDirectRootDependency = symlinkDirectRootDependency;
|
|
159949
|
+
var fs_1 = require("fs");
|
|
159950
|
+
var util_1 = __importDefault2(require("util"));
|
|
159951
|
+
var core_loggers_1 = require_lib8();
|
|
159952
|
+
var symlink_dir_1 = __importDefault2(require_dist18());
|
|
159953
|
+
var safeJoinModulesDir_js_1 = require_safeJoinModulesDir();
|
|
159954
|
+
var DEP_TYPE_BY_DEPS_FIELD_NAME = {
|
|
159955
|
+
dependencies: "prod",
|
|
159956
|
+
devDependencies: "dev",
|
|
159957
|
+
optionalDependencies: "optional"
|
|
159958
|
+
};
|
|
159959
|
+
async function symlinkDirectRootDependency(dependencyLocation, destModulesDir, importAs, opts) {
|
|
159960
|
+
let destModulesDirReal;
|
|
159961
|
+
try {
|
|
159962
|
+
destModulesDirReal = await fs_1.promises.realpath(destModulesDir);
|
|
159963
|
+
} catch (err) {
|
|
159964
|
+
if (util_1.default.types.isNativeError(err) && "code" in err && err.code === "ENOENT") {
|
|
159965
|
+
await fs_1.promises.mkdir(destModulesDir, { recursive: true });
|
|
159966
|
+
destModulesDirReal = await fs_1.promises.realpath(destModulesDir);
|
|
159967
|
+
} else {
|
|
159968
|
+
throw err;
|
|
159969
|
+
}
|
|
159970
|
+
}
|
|
159971
|
+
const dest = (0, safeJoinModulesDir_js_1.safeJoinModulesDir)(destModulesDirReal, importAs);
|
|
159972
|
+
const { reused } = await (0, symlink_dir_1.default)(dependencyLocation, dest);
|
|
159973
|
+
if (reused)
|
|
159974
|
+
return;
|
|
159975
|
+
core_loggers_1.rootLogger.debug({
|
|
159976
|
+
added: {
|
|
159977
|
+
dependencyType: opts.fromDependenciesField && DEP_TYPE_BY_DEPS_FIELD_NAME[opts.fromDependenciesField],
|
|
159978
|
+
linkedFrom: dependencyLocation,
|
|
159979
|
+
name: importAs,
|
|
159980
|
+
realName: opts.linkedPackage.name,
|
|
159981
|
+
version: opts.linkedPackage.version
|
|
159982
|
+
},
|
|
159983
|
+
prefix: opts.prefix
|
|
159984
|
+
});
|
|
159985
|
+
}
|
|
159986
|
+
}
|
|
159987
|
+
});
|
|
159988
|
+
|
|
159989
|
+
// ../fs/symlink-dependency/lib/index.js
|
|
159851
159990
|
var require_lib158 = __commonJS({
|
|
159991
|
+
"../fs/symlink-dependency/lib/index.js"(exports2) {
|
|
159992
|
+
"use strict";
|
|
159993
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
159994
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
159995
|
+
};
|
|
159996
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
159997
|
+
exports2.symlinkDirectRootDependency = exports2.safeJoinModulesDir = void 0;
|
|
159998
|
+
exports2.symlinkDependency = symlinkDependency;
|
|
159999
|
+
exports2.symlinkDependencySync = symlinkDependencySync;
|
|
160000
|
+
var core_loggers_1 = require_lib8();
|
|
160001
|
+
var symlink_dir_1 = __importDefault2(require_dist18());
|
|
160002
|
+
var safeJoinModulesDir_js_1 = require_safeJoinModulesDir();
|
|
160003
|
+
var safeJoinModulesDir_js_2 = require_safeJoinModulesDir();
|
|
160004
|
+
Object.defineProperty(exports2, "safeJoinModulesDir", { enumerable: true, get: function() {
|
|
160005
|
+
return safeJoinModulesDir_js_2.safeJoinModulesDir;
|
|
160006
|
+
} });
|
|
160007
|
+
var symlinkDirectRootDependency_js_1 = require_symlinkDirectRootDependency();
|
|
160008
|
+
Object.defineProperty(exports2, "symlinkDirectRootDependency", { enumerable: true, get: function() {
|
|
160009
|
+
return symlinkDirectRootDependency_js_1.symlinkDirectRootDependency;
|
|
160010
|
+
} });
|
|
160011
|
+
async function symlinkDependency(dependencyRealLocation, destModulesDir, importAs) {
|
|
160012
|
+
const link = (0, safeJoinModulesDir_js_1.safeJoinModulesDir)(destModulesDir, importAs);
|
|
160013
|
+
core_loggers_1.linkLogger.debug({ target: dependencyRealLocation, link });
|
|
160014
|
+
return (0, symlink_dir_1.default)(dependencyRealLocation, link);
|
|
160015
|
+
}
|
|
160016
|
+
function symlinkDependencySync(dependencyRealLocation, destModulesDir, importAs) {
|
|
160017
|
+
const link = (0, safeJoinModulesDir_js_1.safeJoinModulesDir)(destModulesDir, importAs);
|
|
160018
|
+
core_loggers_1.linkLogger.debug({ target: dependencyRealLocation, link });
|
|
160019
|
+
return symlink_dir_1.default.sync(dependencyRealLocation, link);
|
|
160020
|
+
}
|
|
160021
|
+
}
|
|
160022
|
+
});
|
|
160023
|
+
|
|
160024
|
+
// ../node_modules/.pnpm/@yarnpkg+pnp@4.0.8/node_modules/@yarnpkg/pnp/lib/index.js
|
|
160025
|
+
var require_lib159 = __commonJS({
|
|
159852
160026
|
"../node_modules/.pnpm/@yarnpkg+pnp@4.0.8/node_modules/@yarnpkg/pnp/lib/index.js"(exports2) {
|
|
159853
160027
|
"use strict";
|
|
159854
160028
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -163319,7 +163493,7 @@ ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)}
|
|
|
163319
163493
|
});
|
|
163320
163494
|
|
|
163321
163495
|
// ../lockfile/lockfile-to-pnp/lib/index.js
|
|
163322
|
-
var
|
|
163496
|
+
var require_lib160 = __commonJS({
|
|
163323
163497
|
"../lockfile/lockfile-to-pnp/lib/index.js"(exports2) {
|
|
163324
163498
|
"use strict";
|
|
163325
163499
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -163331,8 +163505,9 @@ var require_lib159 = __commonJS({
|
|
|
163331
163505
|
var fs_1 = require("fs");
|
|
163332
163506
|
var path_1 = __importDefault2(require("path"));
|
|
163333
163507
|
var lockfile_utils_1 = require_lib122();
|
|
163508
|
+
var symlink_dependency_1 = require_lib158();
|
|
163334
163509
|
var dependency_path_1 = require_lib87();
|
|
163335
|
-
var pnp_1 =
|
|
163510
|
+
var pnp_1 = require_lib159();
|
|
163336
163511
|
var normalize_path_1 = __importDefault2(require_normalize_path());
|
|
163337
163512
|
async function writePnpFile(lockfile, opts) {
|
|
163338
163513
|
const packageRegistry = lockfileToPackageRegistry(lockfile, opts);
|
|
@@ -163389,7 +163564,8 @@ var require_lib159 = __commonJS({
|
|
|
163389
163564
|
packageStore = /* @__PURE__ */ new Map();
|
|
163390
163565
|
packageRegistry.set(name, packageStore);
|
|
163391
163566
|
}
|
|
163392
|
-
|
|
163567
|
+
const pkgModulesDir = path_1.default.join(opts.virtualStoreDir, (0, dependency_path_1.depPathToFilename)(relDepPath, opts.virtualStoreDirMaxLength), "node_modules");
|
|
163568
|
+
let packageLocation = (0, normalize_path_1.default)(path_1.default.relative(opts.lockfileDir, (0, symlink_dependency_1.safeJoinModulesDir)(pkgModulesDir, name)));
|
|
163393
163569
|
if (!packageLocation.startsWith("../")) {
|
|
163394
163570
|
packageLocation = `./${packageLocation}`;
|
|
163395
163571
|
}
|
|
@@ -163702,7 +163878,7 @@ var require_prune2 = __commonJS({
|
|
|
163702
163878
|
});
|
|
163703
163879
|
|
|
163704
163880
|
// ../pkg-manager/modules-cleaner/lib/index.js
|
|
163705
|
-
var
|
|
163881
|
+
var require_lib161 = __commonJS({
|
|
163706
163882
|
"../pkg-manager/modules-cleaner/lib/index.js"(exports2) {
|
|
163707
163883
|
"use strict";
|
|
163708
163884
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -163714,110 +163890,6 @@ var require_lib160 = __commonJS({
|
|
|
163714
163890
|
}
|
|
163715
163891
|
});
|
|
163716
163892
|
|
|
163717
|
-
// ../fs/symlink-dependency/lib/safeJoinModulesDir.js
|
|
163718
|
-
var require_safeJoinModulesDir = __commonJS({
|
|
163719
|
-
"../fs/symlink-dependency/lib/safeJoinModulesDir.js"(exports2) {
|
|
163720
|
-
"use strict";
|
|
163721
|
-
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
163722
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
163723
|
-
};
|
|
163724
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
163725
|
-
exports2.safeJoinModulesDir = safeJoinModulesDir;
|
|
163726
|
-
var path_1 = __importDefault2(require("path"));
|
|
163727
|
-
function safeJoinModulesDir(modulesDir, alias) {
|
|
163728
|
-
const link = path_1.default.join(modulesDir, alias);
|
|
163729
|
-
const resolvedDir = path_1.default.resolve(modulesDir);
|
|
163730
|
-
const resolvedLink = path_1.default.resolve(link);
|
|
163731
|
-
if (resolvedLink === resolvedDir || !resolvedLink.startsWith(resolvedDir + path_1.default.sep)) {
|
|
163732
|
-
const error = new Error(`Refusing to symlink dependency outside ${modulesDir}: alias ${JSON.stringify(alias)} resolves to ${resolvedLink}`);
|
|
163733
|
-
error.code = "ERR_PNPM_INVALID_DEPENDENCY_NAME";
|
|
163734
|
-
throw error;
|
|
163735
|
-
}
|
|
163736
|
-
return link;
|
|
163737
|
-
}
|
|
163738
|
-
}
|
|
163739
|
-
});
|
|
163740
|
-
|
|
163741
|
-
// ../fs/symlink-dependency/lib/symlinkDirectRootDependency.js
|
|
163742
|
-
var require_symlinkDirectRootDependency = __commonJS({
|
|
163743
|
-
"../fs/symlink-dependency/lib/symlinkDirectRootDependency.js"(exports2) {
|
|
163744
|
-
"use strict";
|
|
163745
|
-
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
163746
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
163747
|
-
};
|
|
163748
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
163749
|
-
exports2.symlinkDirectRootDependency = symlinkDirectRootDependency;
|
|
163750
|
-
var fs_1 = require("fs");
|
|
163751
|
-
var util_1 = __importDefault2(require("util"));
|
|
163752
|
-
var core_loggers_1 = require_lib8();
|
|
163753
|
-
var symlink_dir_1 = __importDefault2(require_dist18());
|
|
163754
|
-
var safeJoinModulesDir_js_1 = require_safeJoinModulesDir();
|
|
163755
|
-
var DEP_TYPE_BY_DEPS_FIELD_NAME = {
|
|
163756
|
-
dependencies: "prod",
|
|
163757
|
-
devDependencies: "dev",
|
|
163758
|
-
optionalDependencies: "optional"
|
|
163759
|
-
};
|
|
163760
|
-
async function symlinkDirectRootDependency(dependencyLocation, destModulesDir, importAs, opts) {
|
|
163761
|
-
let destModulesDirReal;
|
|
163762
|
-
try {
|
|
163763
|
-
destModulesDirReal = await fs_1.promises.realpath(destModulesDir);
|
|
163764
|
-
} catch (err) {
|
|
163765
|
-
if (util_1.default.types.isNativeError(err) && "code" in err && err.code === "ENOENT") {
|
|
163766
|
-
await fs_1.promises.mkdir(destModulesDir, { recursive: true });
|
|
163767
|
-
destModulesDirReal = await fs_1.promises.realpath(destModulesDir);
|
|
163768
|
-
} else {
|
|
163769
|
-
throw err;
|
|
163770
|
-
}
|
|
163771
|
-
}
|
|
163772
|
-
const dest = (0, safeJoinModulesDir_js_1.safeJoinModulesDir)(destModulesDirReal, importAs);
|
|
163773
|
-
const { reused } = await (0, symlink_dir_1.default)(dependencyLocation, dest);
|
|
163774
|
-
if (reused)
|
|
163775
|
-
return;
|
|
163776
|
-
core_loggers_1.rootLogger.debug({
|
|
163777
|
-
added: {
|
|
163778
|
-
dependencyType: opts.fromDependenciesField && DEP_TYPE_BY_DEPS_FIELD_NAME[opts.fromDependenciesField],
|
|
163779
|
-
linkedFrom: dependencyLocation,
|
|
163780
|
-
name: importAs,
|
|
163781
|
-
realName: opts.linkedPackage.name,
|
|
163782
|
-
version: opts.linkedPackage.version
|
|
163783
|
-
},
|
|
163784
|
-
prefix: opts.prefix
|
|
163785
|
-
});
|
|
163786
|
-
}
|
|
163787
|
-
}
|
|
163788
|
-
});
|
|
163789
|
-
|
|
163790
|
-
// ../fs/symlink-dependency/lib/index.js
|
|
163791
|
-
var require_lib161 = __commonJS({
|
|
163792
|
-
"../fs/symlink-dependency/lib/index.js"(exports2) {
|
|
163793
|
-
"use strict";
|
|
163794
|
-
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
163795
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
163796
|
-
};
|
|
163797
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
163798
|
-
exports2.symlinkDirectRootDependency = void 0;
|
|
163799
|
-
exports2.symlinkDependency = symlinkDependency;
|
|
163800
|
-
exports2.symlinkDependencySync = symlinkDependencySync;
|
|
163801
|
-
var core_loggers_1 = require_lib8();
|
|
163802
|
-
var symlink_dir_1 = __importDefault2(require_dist18());
|
|
163803
|
-
var safeJoinModulesDir_js_1 = require_safeJoinModulesDir();
|
|
163804
|
-
var symlinkDirectRootDependency_js_1 = require_symlinkDirectRootDependency();
|
|
163805
|
-
Object.defineProperty(exports2, "symlinkDirectRootDependency", { enumerable: true, get: function() {
|
|
163806
|
-
return symlinkDirectRootDependency_js_1.symlinkDirectRootDependency;
|
|
163807
|
-
} });
|
|
163808
|
-
async function symlinkDependency(dependencyRealLocation, destModulesDir, importAs) {
|
|
163809
|
-
const link = (0, safeJoinModulesDir_js_1.safeJoinModulesDir)(destModulesDir, importAs);
|
|
163810
|
-
core_loggers_1.linkLogger.debug({ target: dependencyRealLocation, link });
|
|
163811
|
-
return (0, symlink_dir_1.default)(dependencyRealLocation, link);
|
|
163812
|
-
}
|
|
163813
|
-
function symlinkDependencySync(dependencyRealLocation, destModulesDir, importAs) {
|
|
163814
|
-
const link = (0, safeJoinModulesDir_js_1.safeJoinModulesDir)(destModulesDir, importAs);
|
|
163815
|
-
core_loggers_1.linkLogger.debug({ target: dependencyRealLocation, link });
|
|
163816
|
-
return symlink_dir_1.default.sync(dependencyRealLocation, link);
|
|
163817
|
-
}
|
|
163818
|
-
}
|
|
163819
|
-
});
|
|
163820
|
-
|
|
163821
163893
|
// ../pkg-manager/headless/lib/linkHoistedModules.js
|
|
163822
163894
|
var require_linkHoistedModules = __commonJS({
|
|
163823
163895
|
"../pkg-manager/headless/lib/linkHoistedModules.js"(exports2) {
|
|
@@ -164240,6 +164312,7 @@ var require_lockfileToDepGraph = __commonJS({
|
|
|
164240
164312
|
var logger_1 = require_lib();
|
|
164241
164313
|
var package_is_installable_1 = require_lib86();
|
|
164242
164314
|
var patching_config_1 = require_lib162();
|
|
164315
|
+
var symlink_dependency_1 = require_lib158();
|
|
164243
164316
|
var dp = __importStar3(require_lib87());
|
|
164244
164317
|
var path_exists_1 = __importDefault2(require_path_exists2());
|
|
164245
164318
|
var equals_1 = __importDefault2(require_equals2());
|
|
@@ -164325,7 +164398,7 @@ var require_lockfileToDepGraph = __commonJS({
|
|
|
164325
164398
|
const depIsPresent = !isDirectoryDep && currentPackages[depPath] && (0, equals_1.default)(currentPackages[depPath].dependencies, pkgSnapshot.dependencies);
|
|
164326
164399
|
const depIntegrityIsUnchanged = isIntegrityEqual(pkgSnapshot.resolution, currentPackages[depPath]?.resolution);
|
|
164327
164400
|
const modules = path_1.default.join(opts.virtualStoreDir, dirNameInVirtualStore, "node_modules");
|
|
164328
|
-
const dir =
|
|
164401
|
+
const dir = (0, symlink_dependency_1.safeJoinModulesDir)(modules, pkgName);
|
|
164329
164402
|
locationByDepPath[depPath] = dir;
|
|
164330
164403
|
if (isDirectoryDep) {
|
|
164331
164404
|
injectionTargetsByDepPath.set(depPath, [dir]);
|
|
@@ -165347,6 +165420,7 @@ var require_lockfileToHoistedDepGraph = __commonJS({
|
|
|
165347
165420
|
var package_is_installable_1 = require_lib86();
|
|
165348
165421
|
var patching_config_1 = require_lib162();
|
|
165349
165422
|
var read_package_json_1 = require_lib62();
|
|
165423
|
+
var symlink_dependency_1 = require_lib158();
|
|
165350
165424
|
var real_hoist_1 = require_lib164();
|
|
165351
165425
|
var dp = __importStar3(require_lib87());
|
|
165352
165426
|
async function lockfileToHoistedDepGraph(lockfile, currentLockfile, opts) {
|
|
@@ -165472,7 +165546,7 @@ var require_lockfileToHoistedDepGraph = __commonJS({
|
|
|
165472
165546
|
});
|
|
165473
165547
|
return;
|
|
165474
165548
|
}
|
|
165475
|
-
const dir =
|
|
165549
|
+
const dir = (0, symlink_dependency_1.safeJoinModulesDir)(modules, dep.name);
|
|
165476
165550
|
const depLocation = path_1.default.relative(opts.lockfileDir, dir);
|
|
165477
165551
|
const resolution = (0, lockfile_utils_1.pkgSnapshotToResolution)(depPath, pkgSnapshot, opts.registries);
|
|
165478
165552
|
let fetchResponse;
|
|
@@ -165588,7 +165662,7 @@ var require_linkDirectDeps = __commonJS({
|
|
|
165588
165662
|
var fs_1 = __importDefault2(require("fs"));
|
|
165589
165663
|
var path_1 = __importDefault2(require("path"));
|
|
165590
165664
|
var core_loggers_1 = require_lib8();
|
|
165591
|
-
var symlink_dependency_1 =
|
|
165665
|
+
var symlink_dependency_1 = require_lib158();
|
|
165592
165666
|
var omit_1 = __importDefault2(require_omit());
|
|
165593
165667
|
var read_modules_dir_1 = require_lib69();
|
|
165594
165668
|
var rimraf_1 = __importDefault2(require_rimraf());
|
|
@@ -165763,15 +165837,15 @@ var require_lib166 = __commonJS({
|
|
|
165763
165837
|
var lifecycle_1 = require_lib72();
|
|
165764
165838
|
var link_bins_1 = require_lib70();
|
|
165765
165839
|
var lockfile_fs_1 = require_lib124();
|
|
165766
|
-
var lockfile_to_pnp_1 =
|
|
165840
|
+
var lockfile_to_pnp_1 = require_lib160();
|
|
165767
165841
|
var lockfile_utils_1 = require_lib122();
|
|
165768
165842
|
var extendProjectsWithTargetDirs_js_1 = require_extendProjectsWithTargetDirs();
|
|
165769
165843
|
var logger_1 = require_lib();
|
|
165770
|
-
var modules_cleaner_1 =
|
|
165844
|
+
var modules_cleaner_1 = require_lib161();
|
|
165771
165845
|
var modules_yaml_1 = require_lib117();
|
|
165772
165846
|
var read_package_json_1 = require_lib62();
|
|
165773
165847
|
var read_project_manifest_1 = require_lib17();
|
|
165774
|
-
var symlink_dependency_1 =
|
|
165848
|
+
var symlink_dependency_1 = require_lib158();
|
|
165775
165849
|
var types_1 = require_lib10();
|
|
165776
165850
|
var dp = __importStar3(require_lib87());
|
|
165777
165851
|
var worker_1 = require_lib74();
|
|
@@ -166455,7 +166529,7 @@ var require_validateDependencyAlias = __commonJS({
|
|
|
166455
166529
|
exports2.isValidDependencyAlias = isValidDependencyAlias;
|
|
166456
166530
|
exports2.assertValidDependencyAliases = assertValidDependencyAliases;
|
|
166457
166531
|
var error_1 = require_lib6();
|
|
166458
|
-
var validate_npm_package_name_1 = __importDefault2(
|
|
166532
|
+
var validate_npm_package_name_1 = __importDefault2(require_lib97());
|
|
166459
166533
|
function isValidDependencyAlias(alias) {
|
|
166460
166534
|
return typeof alias === "string" && (0, validate_npm_package_name_1.default)(alias).validForOldPackages;
|
|
166461
166535
|
}
|
|
@@ -170039,6 +170113,7 @@ var require_resolvePeers = __commonJS({
|
|
|
170039
170113
|
var semver_12 = __importDefault2(require_semver2());
|
|
170040
170114
|
var semverUtils = __importStar3(require_semverUtils());
|
|
170041
170115
|
var dependency_path_1 = require_lib87();
|
|
170116
|
+
var symlink_dependency_1 = require_lib158();
|
|
170042
170117
|
var partition_1 = __importDefault2(require_partition4());
|
|
170043
170118
|
var pick_1 = __importDefault2(require_pick());
|
|
170044
170119
|
var mergePeers_js_1 = require_mergePeers();
|
|
@@ -170422,7 +170497,7 @@ var require_resolvePeers = __commonJS({
|
|
|
170422
170497
|
const peerDependencies = { ...resolvedPackage.peerDependencies };
|
|
170423
170498
|
if (!ctx.depGraph[depPath] || ctx.depGraph[depPath].depth > node.depth) {
|
|
170424
170499
|
const modules = path_1.default.join(ctx.virtualStoreDir, (0, dependency_path_1.depPathToFilename)(depPath, ctx.virtualStoreDirMaxLength), "node_modules");
|
|
170425
|
-
const dir =
|
|
170500
|
+
const dir = (0, symlink_dependency_1.safeJoinModulesDir)(modules, resolvedPackage.name);
|
|
170426
170501
|
const transitivePeerDependencies = /* @__PURE__ */ new Set();
|
|
170427
170502
|
for (const unknownPeer of allResolvedPeers.keys()) {
|
|
170428
170503
|
if (!peerDependencies[unknownPeer]) {
|
|
@@ -171348,6 +171423,7 @@ var require_lib169 = __commonJS({
|
|
|
171348
171423
|
var manifest_utils_1 = require_lib11();
|
|
171349
171424
|
var patching_config_1 = require_lib162();
|
|
171350
171425
|
var read_package_json_1 = require_lib62();
|
|
171426
|
+
var symlink_dependency_1 = require_lib158();
|
|
171351
171427
|
var types_1 = require_lib10();
|
|
171352
171428
|
var difference_1 = __importDefault2(require_difference());
|
|
171353
171429
|
var zipWith_1 = __importDefault2(require_zipWith2());
|
|
@@ -171647,7 +171723,7 @@ var require_lib169 = __commonJS({
|
|
|
171647
171723
|
const node = graph[depPath];
|
|
171648
171724
|
Object.assign(node, {
|
|
171649
171725
|
modules,
|
|
171650
|
-
dir:
|
|
171726
|
+
dir: (0, symlink_dependency_1.safeJoinModulesDir)(modules, node.name)
|
|
171651
171727
|
});
|
|
171652
171728
|
}
|
|
171653
171729
|
return graph;
|
|
@@ -173182,8 +173258,8 @@ var require_link3 = __commonJS({
|
|
|
173182
173258
|
var pkg_manager_direct_dep_linker_1 = require_lib165();
|
|
173183
173259
|
var hoist_1 = require_lib157();
|
|
173184
173260
|
var logger_1 = require_lib();
|
|
173185
|
-
var modules_cleaner_1 =
|
|
173186
|
-
var symlink_dependency_1 =
|
|
173261
|
+
var modules_cleaner_1 = require_lib161();
|
|
173262
|
+
var symlink_dependency_1 = require_lib158();
|
|
173187
173263
|
var worker_1 = require_lib74();
|
|
173188
173264
|
var p_limit_12 = __importDefault2(require_p_limit());
|
|
173189
173265
|
var path_exists_1 = __importDefault2(require_path_exists2());
|
|
@@ -173988,7 +174064,7 @@ var require_install = __commonJS({
|
|
|
173988
174064
|
var lifecycle_1 = require_lib72();
|
|
173989
174065
|
var link_bins_1 = require_lib70();
|
|
173990
174066
|
var lockfile_fs_1 = require_lib124();
|
|
173991
|
-
var lockfile_to_pnp_1 =
|
|
174067
|
+
var lockfile_to_pnp_1 = require_lib160();
|
|
173992
174068
|
var lockfile_verification_1 = require_lib147();
|
|
173993
174069
|
var lockfile_preferred_versions_1 = require_lib167();
|
|
173994
174070
|
var logger_1 = require_lib();
|
|
@@ -175377,7 +175453,7 @@ var require_recursive2 = __commonJS({
|
|
|
175377
175453
|
var pnpmfile_1 = require_lib104();
|
|
175378
175454
|
var sort_packages_1 = require_lib132();
|
|
175379
175455
|
var store_connection_manager_1 = require_lib95();
|
|
175380
|
-
var workspace_manifest_writer_1 =
|
|
175456
|
+
var workspace_manifest_writer_1 = require_lib100();
|
|
175381
175457
|
var core_1 = require_lib172();
|
|
175382
175458
|
var is_subdir_1 = __importDefault2(require_is_subdir());
|
|
175383
175459
|
var mem_1 = __importDefault2(require_dist15());
|
|
@@ -175780,7 +175856,7 @@ var require_installDeps = __commonJS({
|
|
|
175780
175856
|
var core_1 = require_lib172();
|
|
175781
175857
|
var logger_1 = require_lib();
|
|
175782
175858
|
var sort_packages_1 = require_lib132();
|
|
175783
|
-
var workspace_manifest_writer_1 =
|
|
175859
|
+
var workspace_manifest_writer_1 = require_lib100();
|
|
175784
175860
|
var workspace_pkgs_graph_1 = require_lib109();
|
|
175785
175861
|
var workspace_state_1 = require_lib152();
|
|
175786
175862
|
var is_subdir_1 = __importDefault2(require_is_subdir());
|
|
@@ -176079,7 +176155,7 @@ var require_add2 = __commonJS({
|
|
|
176079
176155
|
var render_help_1 = __importDefault2(require_lib111());
|
|
176080
176156
|
var getFetchFullMetadata_js_1 = require_getFetchFullMetadata();
|
|
176081
176157
|
var installDeps_js_1 = require_installDeps();
|
|
176082
|
-
var config_config_writer_1 =
|
|
176158
|
+
var config_config_writer_1 = require_lib101();
|
|
176083
176159
|
exports2.shorthands = {
|
|
176084
176160
|
"save-catalog": "--save-catalog-name=default"
|
|
176085
176161
|
};
|
|
@@ -176989,7 +177065,7 @@ var require_link4 = __commonJS({
|
|
|
176989
177065
|
var path_1 = __importDefault2(require("path"));
|
|
176990
177066
|
var cli_utils_1 = require_lib105();
|
|
176991
177067
|
var common_cli_options_help_1 = require_lib118();
|
|
176992
|
-
var config_config_writer_1 =
|
|
177068
|
+
var config_config_writer_1 = require_lib101();
|
|
176993
177069
|
var config_1 = require_lib24();
|
|
176994
177070
|
var types_1 = require_lib10();
|
|
176995
177071
|
var error_1 = require_lib6();
|
|
@@ -177239,7 +177315,7 @@ var require_remove4 = __commonJS({
|
|
|
177239
177315
|
var error_1 = require_lib6();
|
|
177240
177316
|
var get_context_1 = require_lib127();
|
|
177241
177317
|
var workspace_find_packages_1 = require_lib107();
|
|
177242
|
-
var workspace_manifest_writer_1 =
|
|
177318
|
+
var workspace_manifest_writer_1 = require_lib100();
|
|
177243
177319
|
var manifest_utils_1 = require_lib11();
|
|
177244
177320
|
var store_connection_manager_1 = require_lib95();
|
|
177245
177321
|
var core_1 = require_lib172();
|
|
@@ -191849,6 +191925,7 @@ var require_verifyPnpmEngineIdentity = __commonJS({
|
|
|
191849
191925
|
var lockfile_fs_1 = require_lib124();
|
|
191850
191926
|
var network_auth_header_1 = require_lib77();
|
|
191851
191927
|
var pick_registry_for_package_1 = require_lib44();
|
|
191928
|
+
var semver_12 = __importDefault2(require_semver2());
|
|
191852
191929
|
var npmSigningKeys_js_1 = require_npmSigningKeys();
|
|
191853
191930
|
function getNpmSigningKeys() {
|
|
191854
191931
|
return npmSigningKeys_js_1.NPM_SIGNING_KEYS.map((k) => ({ ...k }));
|
|
@@ -191879,8 +191956,8 @@ var require_verifyPnpmEngineIdentity = __commonJS({
|
|
|
191879
191956
|
}
|
|
191880
191957
|
function collectEnginePackagesToVerify(lockfile, stageDir, targetPkgName, version2, registries) {
|
|
191881
191958
|
const toVerify = [engineComponentToVerify(lockfile, registries, targetPkgName, version2)];
|
|
191882
|
-
if (targetPkgName === "@pnpm/exe") {
|
|
191883
|
-
const optionalDeps = lockfile.packages?.[
|
|
191959
|
+
if (targetPkgName === "@pnpm/exe" || semver_12.default.major(version2) >= 12) {
|
|
191960
|
+
const optionalDeps = lockfile.packages?.[`${targetPkgName}@${version2}`]?.optionalDependencies ?? {};
|
|
191884
191961
|
for (const [name, platformVersion] of Object.entries(optionalDeps)) {
|
|
191885
191962
|
if (!fs_1.default.existsSync(path_1.default.join(stageDir, "node_modules", name)))
|
|
191886
191963
|
continue;
|
|
@@ -192016,6 +192093,10 @@ var require_installPnpmToTools = __commonJS({
|
|
|
192016
192093
|
};
|
|
192017
192094
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
192018
192095
|
exports2.installPnpmToTools = installPnpmToTools;
|
|
192096
|
+
exports2.pnpmPackageNameToInstall = pnpmPackageNameToInstall;
|
|
192097
|
+
exports2.linkExePlatformBinary = linkExePlatformBinary;
|
|
192098
|
+
exports2.exePlatformPkgDirNames = exePlatformPkgDirNames;
|
|
192099
|
+
exports2.safeWrapperBinNames = safeWrapperBinNames;
|
|
192019
192100
|
var fs_1 = __importDefault2(require("fs"));
|
|
192020
192101
|
var path_1 = __importDefault2(require("path"));
|
|
192021
192102
|
var cli_meta_1 = require_lib4();
|
|
@@ -192029,8 +192110,8 @@ var require_installPnpmToTools = __commonJS({
|
|
|
192029
192110
|
var verifyPnpmEngineIdentity_js_1 = require_verifyPnpmEngineIdentity();
|
|
192030
192111
|
async function installPnpmToTools(pnpmVersion, opts) {
|
|
192031
192112
|
const currentPkgName = (0, cli_meta_1.getCurrentPackageName)();
|
|
192032
|
-
const targetPkgName =
|
|
192033
|
-
if (targetPkgName !== currentPkgName) {
|
|
192113
|
+
const targetPkgName = pnpmPackageNameToInstall(pnpmVersion, currentPkgName);
|
|
192114
|
+
if (targetPkgName !== currentPkgName && semver_12.default.major(pnpmVersion) < 12) {
|
|
192034
192115
|
(0, logger_1.globalWarn)(`Switching from @pnpm/exe to the "pnpm" npm package because @pnpm/exe v${pnpmVersion} no longer ships a binary for Intel macOS (darwin-x64). The new "pnpm" install requires Node.js to be available on PATH. See https://github.com/pnpm/pnpm/issues/11423.`);
|
|
192035
192116
|
}
|
|
192036
192117
|
const dir = (0, tools_path_1.getToolDirPath)({
|
|
@@ -192084,10 +192165,10 @@ var require_installPnpmToTools = __commonJS({
|
|
|
192084
192165
|
pnpm_config_pm_on_fail: "ignore"
|
|
192085
192166
|
}
|
|
192086
192167
|
});
|
|
192087
|
-
if (targetPkgName === "@pnpm/exe") {
|
|
192088
|
-
linkExePlatformBinary(stage);
|
|
192089
|
-
}
|
|
192090
192168
|
await (0, verifyPnpmEngineIdentity_js_1.verifyPnpmEngineIdentity)(stage, targetPkgName, pnpmVersion, opts);
|
|
192169
|
+
if (targetPkgName === "@pnpm/exe" || semver_12.default.major(pnpmVersion) >= 12) {
|
|
192170
|
+
linkExePlatformBinary(stage, targetPkgName);
|
|
192171
|
+
}
|
|
192091
192172
|
symlink_dir_1.default.sync(stage, dir);
|
|
192092
192173
|
} catch (err) {
|
|
192093
192174
|
try {
|
|
@@ -192102,16 +192183,85 @@ var require_installPnpmToTools = __commonJS({
|
|
|
192102
192183
|
binDir
|
|
192103
192184
|
};
|
|
192104
192185
|
}
|
|
192105
|
-
function
|
|
192106
|
-
const
|
|
192107
|
-
|
|
192108
|
-
|
|
192109
|
-
|
|
192110
|
-
|
|
192111
|
-
|
|
192186
|
+
function pnpmPackageNameToInstall(pnpmVersion, currentPkgName) {
|
|
192187
|
+
const major = semver_12.default.major(pnpmVersion);
|
|
192188
|
+
if (major >= 12)
|
|
192189
|
+
return "pnpm";
|
|
192190
|
+
if (currentPkgName === "@pnpm/exe" && process.platform === "darwin" && process.arch === "x64" && major >= 11) {
|
|
192191
|
+
return "pnpm";
|
|
192192
|
+
}
|
|
192193
|
+
return currentPkgName;
|
|
192194
|
+
}
|
|
192195
|
+
function linkExePlatformBinary(stageDir, wrapperPkgName) {
|
|
192196
|
+
const wrapperDir = path_1.default.join(stageDir, "node_modules", ...wrapperPkgName.split("/"));
|
|
192197
|
+
if (!fs_1.default.existsSync(wrapperDir))
|
|
192198
|
+
return;
|
|
192199
|
+
const scopeDir = path_1.default.join(stageDir, "node_modules", "@pnpm");
|
|
192200
|
+
const isWin = process.platform === "win32";
|
|
192201
|
+
const executable = isWin ? "pnpm.exe" : "pnpm";
|
|
192202
|
+
let src;
|
|
192203
|
+
for (const dirName of exePlatformPkgDirNames(process.platform, process.arch)) {
|
|
192204
|
+
const candidate = path_1.default.join(scopeDir, dirName, executable);
|
|
192205
|
+
if (fs_1.default.existsSync(candidate)) {
|
|
192206
|
+
src = candidate;
|
|
192207
|
+
break;
|
|
192208
|
+
}
|
|
192209
|
+
}
|
|
192210
|
+
if (src == null)
|
|
192112
192211
|
return;
|
|
192113
|
-
|
|
192114
|
-
|
|
192212
|
+
if (!isWin) {
|
|
192213
|
+
forceLink(src, path_1.default.join(wrapperDir, "pnpm"));
|
|
192214
|
+
return;
|
|
192215
|
+
}
|
|
192216
|
+
const wrapperPkgJsonPath = path_1.default.join(wrapperDir, "package.json");
|
|
192217
|
+
const wrapperPkg = JSON.parse(fs_1.default.readFileSync(wrapperPkgJsonPath, "utf8"));
|
|
192218
|
+
const bin = typeof wrapperPkg.bin === "object" && wrapperPkg.bin != null ? wrapperPkg.bin : { pnpm: "pnpm" };
|
|
192219
|
+
for (const name of safeWrapperBinNames(wrapperDir, bin)) {
|
|
192220
|
+
forceLink(src, path_1.default.join(wrapperDir, `${name}.exe`));
|
|
192221
|
+
forceLink(src, path_1.default.join(wrapperDir, name));
|
|
192222
|
+
bin[name] = `${name}.exe`;
|
|
192223
|
+
}
|
|
192224
|
+
wrapperPkg.bin = bin;
|
|
192225
|
+
const tempPkgJsonPath = `${wrapperPkgJsonPath}.pnpm-tmp`;
|
|
192226
|
+
try {
|
|
192227
|
+
fs_1.default.writeFileSync(tempPkgJsonPath, JSON.stringify(wrapperPkg, null, 2));
|
|
192228
|
+
fs_1.default.renameSync(tempPkgJsonPath, wrapperPkgJsonPath);
|
|
192229
|
+
} catch (err) {
|
|
192230
|
+
try {
|
|
192231
|
+
fs_1.default.rmSync(tempPkgJsonPath, { force: true });
|
|
192232
|
+
} catch {
|
|
192233
|
+
}
|
|
192234
|
+
throw err;
|
|
192235
|
+
}
|
|
192236
|
+
}
|
|
192237
|
+
function exePlatformPkgDirNames(platform, arch) {
|
|
192238
|
+
switch (platform) {
|
|
192239
|
+
case "win32": {
|
|
192240
|
+
const legacyArch = arch === "ia32" ? "x86" : arch;
|
|
192241
|
+
return [`win-${legacyArch}`, `exe.win32-${arch}`];
|
|
192242
|
+
}
|
|
192243
|
+
case "darwin":
|
|
192244
|
+
return [`macos-${arch}`, `exe.darwin-${arch}`];
|
|
192245
|
+
case "linux":
|
|
192246
|
+
return [
|
|
192247
|
+
`linux-${arch}`,
|
|
192248
|
+
// legacy glibc
|
|
192249
|
+
`linuxstatic-${arch}`,
|
|
192250
|
+
// legacy musl
|
|
192251
|
+
`exe.linux-${arch}`,
|
|
192252
|
+
// v12 glibc
|
|
192253
|
+
`exe.linux-${arch}-musl`
|
|
192254
|
+
// v12 musl
|
|
192255
|
+
];
|
|
192256
|
+
default:
|
|
192257
|
+
return [`${platform}-${arch}`, `exe.${platform}-${arch}`];
|
|
192258
|
+
}
|
|
192259
|
+
}
|
|
192260
|
+
function safeWrapperBinNames(wrapperDir, bin) {
|
|
192261
|
+
const resolvedWrapperDir = path_1.default.resolve(wrapperDir);
|
|
192262
|
+
return Object.keys(bin).filter((name) => path_1.default.dirname(path_1.default.resolve(wrapperDir, name)) === resolvedWrapperDir);
|
|
192263
|
+
}
|
|
192264
|
+
function forceLink(src, dest) {
|
|
192115
192265
|
try {
|
|
192116
192266
|
fs_1.default.unlinkSync(dest);
|
|
192117
192267
|
} catch (err) {
|
|
@@ -192121,13 +192271,6 @@ var require_installPnpmToTools = __commonJS({
|
|
|
192121
192271
|
}
|
|
192122
192272
|
fs_1.default.linkSync(src, dest);
|
|
192123
192273
|
fs_1.default.chmodSync(dest, 493);
|
|
192124
|
-
if (platform === "win") {
|
|
192125
|
-
const exePkgJsonPath = path_1.default.join(exePkgDir, "package.json");
|
|
192126
|
-
const exePkg = JSON.parse(fs_1.default.readFileSync(exePkgJsonPath, "utf8"));
|
|
192127
|
-
fs_1.default.writeFileSync(path_1.default.join(exePkgDir, "pnpm"), "This file intentionally left blank");
|
|
192128
|
-
exePkg.bin.pnpm = "pnpm.exe";
|
|
192129
|
-
fs_1.default.writeFileSync(exePkgJsonPath, JSON.stringify(exePkg, null, 2));
|
|
192130
|
-
}
|
|
192131
192274
|
}
|
|
192132
192275
|
}
|
|
192133
192276
|
});
|
|
@@ -192276,13 +192419,25 @@ var require_lib181 = __commonJS({
|
|
|
192276
192419
|
return result2;
|
|
192277
192420
|
};
|
|
192278
192421
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
192279
|
-
exports2.selfUpdate = exports2.verifyPnpmEngineIdentity = exports2.getNpmSigningKeys = exports2.installPnpmToTools = void 0;
|
|
192422
|
+
exports2.selfUpdate = exports2.verifyPnpmEngineIdentity = exports2.getNpmSigningKeys = exports2.safeWrapperBinNames = exports2.exePlatformPkgDirNames = exports2.linkExePlatformBinary = exports2.pnpmPackageNameToInstall = exports2.installPnpmToTools = void 0;
|
|
192280
192423
|
var selfUpdate = __importStar3(require_selfUpdate());
|
|
192281
192424
|
exports2.selfUpdate = selfUpdate;
|
|
192282
192425
|
var installPnpmToTools_js_1 = require_installPnpmToTools();
|
|
192283
192426
|
Object.defineProperty(exports2, "installPnpmToTools", { enumerable: true, get: function() {
|
|
192284
192427
|
return installPnpmToTools_js_1.installPnpmToTools;
|
|
192285
192428
|
} });
|
|
192429
|
+
Object.defineProperty(exports2, "pnpmPackageNameToInstall", { enumerable: true, get: function() {
|
|
192430
|
+
return installPnpmToTools_js_1.pnpmPackageNameToInstall;
|
|
192431
|
+
} });
|
|
192432
|
+
Object.defineProperty(exports2, "linkExePlatformBinary", { enumerable: true, get: function() {
|
|
192433
|
+
return installPnpmToTools_js_1.linkExePlatformBinary;
|
|
192434
|
+
} });
|
|
192435
|
+
Object.defineProperty(exports2, "exePlatformPkgDirNames", { enumerable: true, get: function() {
|
|
192436
|
+
return installPnpmToTools_js_1.exePlatformPkgDirNames;
|
|
192437
|
+
} });
|
|
192438
|
+
Object.defineProperty(exports2, "safeWrapperBinNames", { enumerable: true, get: function() {
|
|
192439
|
+
return installPnpmToTools_js_1.safeWrapperBinNames;
|
|
192440
|
+
} });
|
|
192286
192441
|
var verifyPnpmEngineIdentity_js_1 = require_verifyPnpmEngineIdentity();
|
|
192287
192442
|
Object.defineProperty(exports2, "getNpmSigningKeys", { enumerable: true, get: function() {
|
|
192288
192443
|
return verifyPnpmEngineIdentity_js_1.getNpmSigningKeys;
|
|
@@ -200367,7 +200522,7 @@ var require_pack2 = __commonJS({
|
|
|
200367
200522
|
var tar_stream_1 = __importDefault2(require_tar_stream());
|
|
200368
200523
|
var publish_js_1 = require_publish2();
|
|
200369
200524
|
var chalk_1 = __importDefault2(require_source());
|
|
200370
|
-
var validate_npm_package_name_1 = __importDefault2(
|
|
200525
|
+
var validate_npm_package_name_1 = __importDefault2(require_lib97());
|
|
200371
200526
|
var p_limit_12 = __importDefault2(require_p_limit());
|
|
200372
200527
|
var common_cli_options_help_1 = require_lib118();
|
|
200373
200528
|
var sort_packages_1 = require_lib132();
|
|
@@ -201264,7 +201419,7 @@ var require_updatePatchedDependencies = __commonJS({
|
|
|
201264
201419
|
exports2.updatePatchedDependencies = updatePatchedDependencies;
|
|
201265
201420
|
var path_1 = __importDefault2(require("path"));
|
|
201266
201421
|
var normalize_path_1 = __importDefault2(require_normalize_path());
|
|
201267
|
-
var config_config_writer_1 =
|
|
201422
|
+
var config_config_writer_1 = require_lib101();
|
|
201268
201423
|
async function updatePatchedDependencies(patchedDependencies, opts) {
|
|
201269
201424
|
const workspaceDir = opts.workspaceDir ?? opts.rootProjectManifestDir;
|
|
201270
201425
|
for (const [patchName, patchPath] of Object.entries(patchedDependencies)) {
|
|
@@ -201496,6 +201651,23 @@ ${stderr}`);
|
|
|
201496
201651
|
}
|
|
201497
201652
|
});
|
|
201498
201653
|
|
|
201654
|
+
// ../patching/plugin-commands-patching/lib/isSubdirectory.js
|
|
201655
|
+
var require_isSubdirectory = __commonJS({
|
|
201656
|
+
"../patching/plugin-commands-patching/lib/isSubdirectory.js"(exports2) {
|
|
201657
|
+
"use strict";
|
|
201658
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
201659
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
201660
|
+
};
|
|
201661
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
201662
|
+
exports2.isSubdirectory = isSubdirectory;
|
|
201663
|
+
var path_1 = __importDefault2(require("path"));
|
|
201664
|
+
function isSubdirectory(parentDir, childPath, pathUtils = path_1.default) {
|
|
201665
|
+
const relativePath = pathUtils.relative(parentDir, childPath);
|
|
201666
|
+
return relativePath === "" || relativePath !== ".." && !relativePath.startsWith(`..${pathUtils.sep}`) && !pathUtils.isAbsolute(relativePath);
|
|
201667
|
+
}
|
|
201668
|
+
}
|
|
201669
|
+
});
|
|
201670
|
+
|
|
201499
201671
|
// ../patching/plugin-commands-patching/lib/patchRemove.js
|
|
201500
201672
|
var require_patchRemove = __commonJS({
|
|
201501
201673
|
"../patching/plugin-commands-patching/lib/patchRemove.js"(exports2) {
|
|
@@ -201509,8 +201681,8 @@ var require_patchRemove = __commonJS({
|
|
|
201509
201681
|
exports2.cliOptionsTypes = cliOptionsTypes;
|
|
201510
201682
|
exports2.help = help;
|
|
201511
201683
|
exports2.handler = handler;
|
|
201512
|
-
var path_1 = __importDefault2(require("path"));
|
|
201513
201684
|
var promises_1 = __importDefault2(require("fs/promises"));
|
|
201685
|
+
var path_1 = __importDefault2(require("path"));
|
|
201514
201686
|
var cli_utils_1 = require_lib105();
|
|
201515
201687
|
var plugin_commands_installation_1 = require_lib177();
|
|
201516
201688
|
var config_1 = require_lib24();
|
|
@@ -201518,6 +201690,7 @@ var require_patchRemove = __commonJS({
|
|
|
201518
201690
|
var render_help_1 = __importDefault2(require_lib111());
|
|
201519
201691
|
var enquirer_1 = require_enquirer();
|
|
201520
201692
|
var pick_1 = __importDefault2(require_pick());
|
|
201693
|
+
var isSubdirectory_js_1 = require_isSubdirectory();
|
|
201521
201694
|
var updatePatchedDependencies_js_1 = require_updatePatchedDependencies();
|
|
201522
201695
|
function rcOptionsTypes() {
|
|
201523
201696
|
return (0, pick_1.default)([], config_1.types);
|
|
@@ -201535,7 +201708,7 @@ var require_patchRemove = __commonJS({
|
|
|
201535
201708
|
}
|
|
201536
201709
|
async function handler(opts, params) {
|
|
201537
201710
|
let patchesToRemove = params;
|
|
201538
|
-
const patchedDependencies = opts.patchedDependencies
|
|
201711
|
+
const patchedDependencies = { ...opts.patchedDependencies };
|
|
201539
201712
|
if (!params.length) {
|
|
201540
201713
|
const allPatches = Object.keys(patchedDependencies);
|
|
201541
201714
|
if (allPatches.length) {
|
|
@@ -201558,15 +201731,19 @@ var require_patchRemove = __commonJS({
|
|
|
201558
201731
|
throw new error_1.PnpmError("PATCH_NOT_FOUND", `Patch "${patch}" not found in patched dependencies`);
|
|
201559
201732
|
}
|
|
201560
201733
|
}
|
|
201561
|
-
const
|
|
201562
|
-
await Promise.all(patchesToRemove.map(async (patch) => {
|
|
201563
|
-
|
|
201564
|
-
|
|
201565
|
-
|
|
201566
|
-
await promises_1.default.rm(patchFile, { force: true });
|
|
201567
|
-
delete patchedDependencies[patch];
|
|
201734
|
+
const patchRemovalContext = await getPatchRemovalContext(opts);
|
|
201735
|
+
const patchesToRemoveTargets = await Promise.all(patchesToRemove.map(async (patch) => {
|
|
201736
|
+
const patchFile = patchedDependencies[patch];
|
|
201737
|
+
if (patchFile == null) {
|
|
201738
|
+
throw new error_1.PnpmError("PATCH_NOT_FOUND", `Patch "${patch}" not found in patched dependencies`);
|
|
201568
201739
|
}
|
|
201740
|
+
return getPatchRemovalTarget(patch, patchFile, patchRemovalContext);
|
|
201569
201741
|
}));
|
|
201742
|
+
await Promise.all(patchesToRemoveTargets.map(unlinkPatchIfExists));
|
|
201743
|
+
for (const { patch } of patchesToRemoveTargets) {
|
|
201744
|
+
delete patchedDependencies[patch];
|
|
201745
|
+
}
|
|
201746
|
+
const patchesDirs = new Set(patchesToRemoveTargets.map(({ parentDir }) => parentDir));
|
|
201570
201747
|
await Promise.all(Array.from(patchesDirs).map(async (dir) => {
|
|
201571
201748
|
try {
|
|
201572
201749
|
const files = await promises_1.default.readdir(dir);
|
|
@@ -201580,7 +201757,83 @@ var require_patchRemove = __commonJS({
|
|
|
201580
201757
|
...opts,
|
|
201581
201758
|
workspaceDir: opts.workspaceDir ?? opts.rootProjectManifestDir
|
|
201582
201759
|
});
|
|
201583
|
-
return plugin_commands_installation_1.install.handler(
|
|
201760
|
+
return plugin_commands_installation_1.install.handler({
|
|
201761
|
+
...opts,
|
|
201762
|
+
patchedDependencies
|
|
201763
|
+
});
|
|
201764
|
+
}
|
|
201765
|
+
async function getPatchRemovalContext(opts) {
|
|
201766
|
+
const lockfileDir = path_1.default.resolve(opts.lockfileDir ?? opts.dir ?? process.cwd());
|
|
201767
|
+
const realLockfileDir = await promises_1.default.realpath(lockfileDir);
|
|
201768
|
+
const patchesDirSetting = opts.patchesDir ?? "patches";
|
|
201769
|
+
const patchesDir = path_1.default.join(lockfileDir, path_1.default.normalize(patchesDirSetting));
|
|
201770
|
+
if (!(0, isSubdirectory_js_1.isSubdirectory)(lockfileDir, patchesDir)) {
|
|
201771
|
+
throw new error_1.PnpmError("PATCHES_DIR_OUTSIDE_PROJECT", `The configured patches directory is outside the project: ${patchesDirSetting}`);
|
|
201772
|
+
}
|
|
201773
|
+
const realPatchesDir = await realpathIfExists(patchesDir);
|
|
201774
|
+
if (realPatchesDir != null && !(0, isSubdirectory_js_1.isSubdirectory)(realLockfileDir, realPatchesDir)) {
|
|
201775
|
+
throw new error_1.PnpmError("PATCHES_DIR_OUTSIDE_PROJECT", `The configured patches directory is outside the project: ${patchesDirSetting}`);
|
|
201776
|
+
}
|
|
201777
|
+
return {
|
|
201778
|
+
lockfileDir,
|
|
201779
|
+
patchesDir,
|
|
201780
|
+
realPatchesDir
|
|
201781
|
+
};
|
|
201782
|
+
}
|
|
201783
|
+
async function getPatchRemovalTarget(patch, patchFile, ctx) {
|
|
201784
|
+
const targetPath = path_1.default.resolve(ctx.lockfileDir, patchFile);
|
|
201785
|
+
if (targetPath === ctx.patchesDir || !(0, isSubdirectory_js_1.isSubdirectory)(ctx.patchesDir, targetPath)) {
|
|
201786
|
+
throw new error_1.PnpmError("PATCH_FILE_OUTSIDE_PATCHES_DIR", `Patch file "${patchFile}" is outside the configured patches directory`);
|
|
201787
|
+
}
|
|
201788
|
+
const parentDir = path_1.default.dirname(targetPath);
|
|
201789
|
+
const targetStats = await lstatIfExists(targetPath);
|
|
201790
|
+
const realParentDir = await realpathIfExists(parentDir);
|
|
201791
|
+
const realPatchesDir = ctx.realPatchesDir ?? await realpathIfExists(ctx.patchesDir);
|
|
201792
|
+
if (realParentDir != null && realPatchesDir != null && !(0, isSubdirectory_js_1.isSubdirectory)(realPatchesDir, realParentDir)) {
|
|
201793
|
+
throw new error_1.PnpmError("PATCH_FILE_OUTSIDE_PATCHES_DIR", `Patch file "${patchFile}" is outside the configured patches directory`);
|
|
201794
|
+
}
|
|
201795
|
+
if (targetStats?.isDirectory()) {
|
|
201796
|
+
throw new error_1.PnpmError("PATCH_FILE_IS_DIRECTORY", `Patch file "${patchFile}" is a directory`);
|
|
201797
|
+
}
|
|
201798
|
+
return {
|
|
201799
|
+
patch,
|
|
201800
|
+
patchFile,
|
|
201801
|
+
parentDir,
|
|
201802
|
+
targetPath,
|
|
201803
|
+
targetExists: targetStats != null
|
|
201804
|
+
};
|
|
201805
|
+
}
|
|
201806
|
+
async function unlinkPatchIfExists({ targetExists, targetPath }) {
|
|
201807
|
+
if (!targetExists)
|
|
201808
|
+
return;
|
|
201809
|
+
try {
|
|
201810
|
+
await promises_1.default.unlink(targetPath);
|
|
201811
|
+
} catch (err) {
|
|
201812
|
+
if (isErrorWithCode(err, "ENOENT"))
|
|
201813
|
+
return;
|
|
201814
|
+
throw err;
|
|
201815
|
+
}
|
|
201816
|
+
}
|
|
201817
|
+
async function lstatIfExists(targetPath) {
|
|
201818
|
+
try {
|
|
201819
|
+
return await promises_1.default.lstat(targetPath);
|
|
201820
|
+
} catch (err) {
|
|
201821
|
+
if (isErrorWithCode(err, "ENOENT"))
|
|
201822
|
+
return void 0;
|
|
201823
|
+
throw err;
|
|
201824
|
+
}
|
|
201825
|
+
}
|
|
201826
|
+
async function realpathIfExists(targetPath) {
|
|
201827
|
+
try {
|
|
201828
|
+
return await promises_1.default.realpath(targetPath);
|
|
201829
|
+
} catch (err) {
|
|
201830
|
+
if (isErrorWithCode(err, "ENOENT"))
|
|
201831
|
+
return void 0;
|
|
201832
|
+
throw err;
|
|
201833
|
+
}
|
|
201834
|
+
}
|
|
201835
|
+
function isErrorWithCode(err, code) {
|
|
201836
|
+
return typeof err === "object" && err !== null && "code" in err && err.code === code;
|
|
201584
201837
|
}
|
|
201585
201838
|
}
|
|
201586
201839
|
});
|
|
@@ -210971,7 +211224,7 @@ var require_catIndex = __commonJS({
|
|
|
210971
211224
|
exports2.handler = handler;
|
|
210972
211225
|
var client_1 = require_lib79();
|
|
210973
211226
|
var error_1 = require_lib6();
|
|
210974
|
-
var object_key_sorting_1 =
|
|
211227
|
+
var object_key_sorting_1 = require_lib99();
|
|
210975
211228
|
var store_path_1 = require_lib33();
|
|
210976
211229
|
var store_cafs_1 = require_lib80();
|
|
210977
211230
|
var parse_wanted_dependency_1 = require_lib102();
|
|
@@ -211294,7 +211547,7 @@ var require_init2 = __commonJS({
|
|
|
211294
211547
|
var cli_meta_1 = require_lib4();
|
|
211295
211548
|
var config_1 = require_lib24();
|
|
211296
211549
|
var error_1 = require_lib6();
|
|
211297
|
-
var object_key_sorting_1 =
|
|
211550
|
+
var object_key_sorting_1 = require_lib99();
|
|
211298
211551
|
var write_project_manifest_1 = require_lib15();
|
|
211299
211552
|
var pick_1 = __importDefault2(require_pick());
|
|
211300
211553
|
var render_help_1 = __importDefault2(require_lib111());
|