pnpm 10.34.2 → 10.34.4
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 +76 -76
- package/dist/node_modules/.pnpm/lock.yaml +7 -7
- package/dist/node_modules/.pnpm-workspace-state-v1.json +3 -3
- package/dist/node_modules/semver/classes/range.js +9 -0
- package/dist/node_modules/semver/package.json +1 -1
- package/dist/pnpm.cjs +390 -226
- 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.4" : "0.0.0"
|
|
2977
2977
|
};
|
|
2978
2978
|
var pkgJson;
|
|
2979
2979
|
if (require.main == null) {
|
|
@@ -4876,9 +4876,9 @@ var require_config_chain = __commonJS({
|
|
|
4876
4876
|
}
|
|
4877
4877
|
});
|
|
4878
4878
|
|
|
4879
|
-
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
4879
|
+
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
|
|
4880
4880
|
var require_envKeyToSetting = __commonJS({
|
|
4881
|
-
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
4881
|
+
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js"(exports2, module2) {
|
|
4882
4882
|
module2.exports = function(x) {
|
|
4883
4883
|
const colonIndex = x.indexOf(":");
|
|
4884
4884
|
if (colonIndex === -1) {
|
|
@@ -4948,9 +4948,9 @@ var require_dist2 = __commonJS({
|
|
|
4948
4948
|
}
|
|
4949
4949
|
});
|
|
4950
4950
|
|
|
4951
|
-
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
4951
|
+
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/lib/util.js
|
|
4952
4952
|
var require_util = __commonJS({
|
|
4953
|
-
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
4953
|
+
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/lib/util.js"(exports2) {
|
|
4954
4954
|
"use strict";
|
|
4955
4955
|
var fs = require("fs");
|
|
4956
4956
|
var path2 = require("path");
|
|
@@ -5058,9 +5058,9 @@ var require_util = __commonJS({
|
|
|
5058
5058
|
}
|
|
5059
5059
|
});
|
|
5060
5060
|
|
|
5061
|
-
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
5061
|
+
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/lib/types.js
|
|
5062
5062
|
var require_types = __commonJS({
|
|
5063
|
-
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
5063
|
+
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/lib/types.js"(exports2) {
|
|
5064
5064
|
"use strict";
|
|
5065
5065
|
var path2 = require("path");
|
|
5066
5066
|
var Stream = require("stream").Stream;
|
|
@@ -5197,9 +5197,9 @@ var require_types = __commonJS({
|
|
|
5197
5197
|
}
|
|
5198
5198
|
});
|
|
5199
5199
|
|
|
5200
|
-
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
5200
|
+
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/lib/conf.js
|
|
5201
5201
|
var require_conf = __commonJS({
|
|
5202
|
-
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
5202
|
+
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/lib/conf.js"(exports2, module2) {
|
|
5203
5203
|
"use strict";
|
|
5204
5204
|
var { readCAFileSync } = require_dist();
|
|
5205
5205
|
var fs = require("fs");
|
|
@@ -5357,9 +5357,9 @@ var require_conf = __commonJS({
|
|
|
5357
5357
|
}
|
|
5358
5358
|
});
|
|
5359
5359
|
|
|
5360
|
-
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
5360
|
+
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/lib/defaults.js
|
|
5361
5361
|
var require_defaults = __commonJS({
|
|
5362
|
-
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
5362
|
+
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/lib/defaults.js"(exports2) {
|
|
5363
5363
|
"use strict";
|
|
5364
5364
|
var os = require("os");
|
|
5365
5365
|
var path2 = require("path");
|
|
@@ -5525,9 +5525,9 @@ var require_defaults = __commonJS({
|
|
|
5525
5525
|
}
|
|
5526
5526
|
});
|
|
5527
5527
|
|
|
5528
|
-
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
5528
|
+
// ../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/index.js
|
|
5529
5529
|
var require_npm_conf = __commonJS({
|
|
5530
|
-
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.
|
|
5530
|
+
"../node_modules/.pnpm/@pnpm+npm-conf@3.0.3/node_modules/@pnpm/npm-conf/index.js"(exports2, module2) {
|
|
5531
5531
|
"use strict";
|
|
5532
5532
|
var path2 = require("path");
|
|
5533
5533
|
var Conf = require_conf();
|
|
@@ -5551,8 +5551,16 @@ var require_npm_conf = __commonJS({
|
|
|
5551
5551
|
}
|
|
5552
5552
|
conf.addEnv();
|
|
5553
5553
|
conf.loadPrefix();
|
|
5554
|
+
const trustedUserconfig = conf.get("userconfig");
|
|
5555
|
+
const trustedPrefix = conf.get("prefix");
|
|
5556
|
+
if (trustedPrefix) {
|
|
5557
|
+
const etc = path2.resolve(trustedPrefix, "etc");
|
|
5558
|
+
conf.root.globalconfig = path2.resolve(etc, "npmrc");
|
|
5559
|
+
conf.root.globalignorefile = path2.resolve(etc, "npmignore");
|
|
5560
|
+
}
|
|
5561
|
+
const trustedGlobalconfig = conf.get("globalconfig");
|
|
5554
5562
|
const projectConf = path2.resolve(conf.localPrefix, ".npmrc");
|
|
5555
|
-
const userConf =
|
|
5563
|
+
const userConf = trustedUserconfig;
|
|
5556
5564
|
if (!conf.get("global") && projectConf !== userConf) {
|
|
5557
5565
|
warnings.push(conf.addFile(projectConf, "project"));
|
|
5558
5566
|
} else {
|
|
@@ -5562,13 +5570,8 @@ var require_npm_conf = __commonJS({
|
|
|
5562
5570
|
const workspaceConf = path2.resolve(conf.get("workspace-prefix"), ".npmrc");
|
|
5563
5571
|
warnings.push(conf.addFile(workspaceConf, "workspace"));
|
|
5564
5572
|
}
|
|
5565
|
-
warnings.push(conf.addFile(
|
|
5566
|
-
|
|
5567
|
-
const etc = path2.resolve(conf.get("prefix"), "etc");
|
|
5568
|
-
conf.root.globalconfig = path2.resolve(etc, "npmrc");
|
|
5569
|
-
conf.root.globalignorefile = path2.resolve(etc, "npmignore");
|
|
5570
|
-
}
|
|
5571
|
-
warnings.push(conf.addFile(conf.get("globalconfig"), "global"));
|
|
5573
|
+
warnings.push(conf.addFile(trustedUserconfig, "user"));
|
|
5574
|
+
warnings.push(conf.addFile(trustedGlobalconfig, "global"));
|
|
5572
5575
|
conf.loadUser();
|
|
5573
5576
|
const caFile = conf.get("cafile");
|
|
5574
5577
|
if (caFile) {
|
|
@@ -16931,11 +16934,16 @@ var require_dropUntrustedEnvExpansions = __commonJS({
|
|
|
16931
16934
|
function hasEnvPlaceholder(value) {
|
|
16932
16935
|
return /\$\{[^}]+\}/.test(value);
|
|
16933
16936
|
}
|
|
16937
|
+
var DOCS_URL = "https://pnpm.io/npmrc";
|
|
16938
|
+
var SHELL_SAFE_KEY = /^[\w@.:/-]+$/;
|
|
16939
|
+
function configSetExample(key) {
|
|
16940
|
+
return SHELL_SAFE_KEY.test(key) ? ` (for example, run: pnpm config set "${key}" <value>)` : "";
|
|
16941
|
+
}
|
|
16934
16942
|
function warnIgnoredRequestDestinationEnv(filePath, key, warnings) {
|
|
16935
|
-
warnings.push(`Ignored project-level request destination "${key}" in "${filePath}": environment variables are not expanded in repository-
|
|
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}`);
|
|
16936
16944
|
}
|
|
16937
16945
|
function warnIgnoredAuthValueEnv(filePath, key, warnings) {
|
|
16938
|
-
warnings.push(`Ignored project-level auth setting "${key}" in "${filePath}": environment variables are not expanded in repository-controlled registry
|
|
16946
|
+
warnings.push(`Ignored project-level auth setting "${key}" in "${filePath}": environment variables are not expanded in registry credentials that come from a project .npmrc, because that file is committed to the repository and could leak the secret to an attacker-controlled registry. Move this credential to a trusted source that pnpm still expands \u2014 put the line in your user-level ~/.npmrc, or set it with pnpm config set${configSetExample(key)}. See ${DOCS_URL}`);
|
|
16939
16947
|
}
|
|
16940
16948
|
}
|
|
16941
16949
|
});
|
|
@@ -117188,6 +117196,209 @@ var require_lib96 = __commonJS({
|
|
|
117188
117196
|
}
|
|
117189
117197
|
});
|
|
117190
117198
|
|
|
117199
|
+
// ../node_modules/.pnpm/builtins@5.1.0/node_modules/builtins/index.js
|
|
117200
|
+
var require_builtins2 = __commonJS({
|
|
117201
|
+
"../node_modules/.pnpm/builtins@5.1.0/node_modules/builtins/index.js"(exports2, module2) {
|
|
117202
|
+
"use strict";
|
|
117203
|
+
var satisfies = require_satisfies();
|
|
117204
|
+
var permanentModules = [
|
|
117205
|
+
"assert",
|
|
117206
|
+
"buffer",
|
|
117207
|
+
"child_process",
|
|
117208
|
+
"cluster",
|
|
117209
|
+
"console",
|
|
117210
|
+
"constants",
|
|
117211
|
+
"crypto",
|
|
117212
|
+
"dgram",
|
|
117213
|
+
"dns",
|
|
117214
|
+
"domain",
|
|
117215
|
+
"events",
|
|
117216
|
+
"fs",
|
|
117217
|
+
"http",
|
|
117218
|
+
"https",
|
|
117219
|
+
"module",
|
|
117220
|
+
"net",
|
|
117221
|
+
"os",
|
|
117222
|
+
"path",
|
|
117223
|
+
"punycode",
|
|
117224
|
+
"querystring",
|
|
117225
|
+
"readline",
|
|
117226
|
+
"repl",
|
|
117227
|
+
"stream",
|
|
117228
|
+
"string_decoder",
|
|
117229
|
+
"sys",
|
|
117230
|
+
"timers",
|
|
117231
|
+
"tls",
|
|
117232
|
+
"tty",
|
|
117233
|
+
"url",
|
|
117234
|
+
"util",
|
|
117235
|
+
"vm",
|
|
117236
|
+
"zlib"
|
|
117237
|
+
];
|
|
117238
|
+
var versionLockedModules = {
|
|
117239
|
+
freelist: "<6.0.0",
|
|
117240
|
+
v8: ">=1.0.0",
|
|
117241
|
+
process: ">=1.1.0",
|
|
117242
|
+
inspector: ">=8.0.0",
|
|
117243
|
+
async_hooks: ">=8.1.0",
|
|
117244
|
+
http2: ">=8.4.0",
|
|
117245
|
+
perf_hooks: ">=8.5.0",
|
|
117246
|
+
trace_events: ">=10.0.0",
|
|
117247
|
+
worker_threads: ">=12.0.0",
|
|
117248
|
+
"node:test": ">=18.0.0"
|
|
117249
|
+
};
|
|
117250
|
+
var experimentalModules = {
|
|
117251
|
+
worker_threads: ">=10.5.0",
|
|
117252
|
+
wasi: ">=12.16.0",
|
|
117253
|
+
diagnostics_channel: "^14.17.0 || >=15.1.0"
|
|
117254
|
+
};
|
|
117255
|
+
module2.exports = ({ version: version2 = process.version, experimental = false } = {}) => {
|
|
117256
|
+
const builtins = [...permanentModules];
|
|
117257
|
+
for (const [name, semverRange] of Object.entries(versionLockedModules)) {
|
|
117258
|
+
if (version2 === "*" || satisfies(version2, semverRange)) {
|
|
117259
|
+
builtins.push(name);
|
|
117260
|
+
}
|
|
117261
|
+
}
|
|
117262
|
+
if (experimental) {
|
|
117263
|
+
for (const [name, semverRange] of Object.entries(experimentalModules)) {
|
|
117264
|
+
if (!builtins.includes(name) && (version2 === "*" || satisfies(version2, semverRange))) {
|
|
117265
|
+
builtins.push(name);
|
|
117266
|
+
}
|
|
117267
|
+
}
|
|
117268
|
+
}
|
|
117269
|
+
return builtins;
|
|
117270
|
+
};
|
|
117271
|
+
}
|
|
117272
|
+
});
|
|
117273
|
+
|
|
117274
|
+
// ../node_modules/.pnpm/validate-npm-package-name@5.0.0/node_modules/validate-npm-package-name/lib/index.js
|
|
117275
|
+
var require_lib97 = __commonJS({
|
|
117276
|
+
"../node_modules/.pnpm/validate-npm-package-name@5.0.0/node_modules/validate-npm-package-name/lib/index.js"(exports2, module2) {
|
|
117277
|
+
"use strict";
|
|
117278
|
+
var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
|
|
117279
|
+
var builtins = require_builtins2();
|
|
117280
|
+
var blacklist = [
|
|
117281
|
+
"node_modules",
|
|
117282
|
+
"favicon.ico"
|
|
117283
|
+
];
|
|
117284
|
+
function validate2(name) {
|
|
117285
|
+
var warnings = [];
|
|
117286
|
+
var errors = [];
|
|
117287
|
+
if (name === null) {
|
|
117288
|
+
errors.push("name cannot be null");
|
|
117289
|
+
return done(warnings, errors);
|
|
117290
|
+
}
|
|
117291
|
+
if (name === void 0) {
|
|
117292
|
+
errors.push("name cannot be undefined");
|
|
117293
|
+
return done(warnings, errors);
|
|
117294
|
+
}
|
|
117295
|
+
if (typeof name !== "string") {
|
|
117296
|
+
errors.push("name must be a string");
|
|
117297
|
+
return done(warnings, errors);
|
|
117298
|
+
}
|
|
117299
|
+
if (!name.length) {
|
|
117300
|
+
errors.push("name length must be greater than zero");
|
|
117301
|
+
}
|
|
117302
|
+
if (name.match(/^\./)) {
|
|
117303
|
+
errors.push("name cannot start with a period");
|
|
117304
|
+
}
|
|
117305
|
+
if (name.match(/^_/)) {
|
|
117306
|
+
errors.push("name cannot start with an underscore");
|
|
117307
|
+
}
|
|
117308
|
+
if (name.trim() !== name) {
|
|
117309
|
+
errors.push("name cannot contain leading or trailing spaces");
|
|
117310
|
+
}
|
|
117311
|
+
blacklist.forEach(function(blacklistedName) {
|
|
117312
|
+
if (name.toLowerCase() === blacklistedName) {
|
|
117313
|
+
errors.push(blacklistedName + " is a blacklisted name");
|
|
117314
|
+
}
|
|
117315
|
+
});
|
|
117316
|
+
builtins({ version: "*" }).forEach(function(builtin) {
|
|
117317
|
+
if (name.toLowerCase() === builtin) {
|
|
117318
|
+
warnings.push(builtin + " is a core module name");
|
|
117319
|
+
}
|
|
117320
|
+
});
|
|
117321
|
+
if (name.length > 214) {
|
|
117322
|
+
warnings.push("name can no longer contain more than 214 characters");
|
|
117323
|
+
}
|
|
117324
|
+
if (name.toLowerCase() !== name) {
|
|
117325
|
+
warnings.push("name can no longer contain capital letters");
|
|
117326
|
+
}
|
|
117327
|
+
if (/[~'!()*]/.test(name.split("/").slice(-1)[0])) {
|
|
117328
|
+
warnings.push(`name can no longer contain special characters ("~'!()*")`);
|
|
117329
|
+
}
|
|
117330
|
+
if (encodeURIComponent(name) !== name) {
|
|
117331
|
+
var nameMatch = name.match(scopedPackagePattern);
|
|
117332
|
+
if (nameMatch) {
|
|
117333
|
+
var user = nameMatch[1];
|
|
117334
|
+
var pkg = nameMatch[2];
|
|
117335
|
+
if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) {
|
|
117336
|
+
return done(warnings, errors);
|
|
117337
|
+
}
|
|
117338
|
+
}
|
|
117339
|
+
errors.push("name can only contain URL-friendly characters");
|
|
117340
|
+
}
|
|
117341
|
+
return done(warnings, errors);
|
|
117342
|
+
}
|
|
117343
|
+
var done = function(warnings, errors) {
|
|
117344
|
+
var result2 = {
|
|
117345
|
+
validForNewPackages: errors.length === 0 && warnings.length === 0,
|
|
117346
|
+
validForOldPackages: errors.length === 0,
|
|
117347
|
+
warnings,
|
|
117348
|
+
errors
|
|
117349
|
+
};
|
|
117350
|
+
if (!result2.warnings.length) {
|
|
117351
|
+
delete result2.warnings;
|
|
117352
|
+
}
|
|
117353
|
+
if (!result2.errors.length) {
|
|
117354
|
+
delete result2.errors;
|
|
117355
|
+
}
|
|
117356
|
+
return result2;
|
|
117357
|
+
};
|
|
117358
|
+
module2.exports = validate2;
|
|
117359
|
+
}
|
|
117360
|
+
});
|
|
117361
|
+
|
|
117362
|
+
// ../config/deps-installer/lib/assertValidConfigDepName.js
|
|
117363
|
+
var require_assertValidConfigDepName = __commonJS({
|
|
117364
|
+
"../config/deps-installer/lib/assertValidConfigDepName.js"(exports2) {
|
|
117365
|
+
"use strict";
|
|
117366
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
117367
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
117368
|
+
};
|
|
117369
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
117370
|
+
exports2.assertValidConfigDepName = assertValidConfigDepName;
|
|
117371
|
+
var error_1 = require_lib6();
|
|
117372
|
+
var validate_npm_package_name_1 = __importDefault2(require_lib97());
|
|
117373
|
+
function assertValidConfigDepName(name) {
|
|
117374
|
+
if (!(0, validate_npm_package_name_1.default)(name).validForOldPackages) {
|
|
117375
|
+
throw new error_1.PnpmError("INVALID_DEPENDENCY_NAME", `The configDependencies in pnpm-workspace.yaml contains a dependency with an invalid name: ${JSON.stringify(name)}`, {
|
|
117376
|
+
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`."
|
|
117377
|
+
});
|
|
117378
|
+
}
|
|
117379
|
+
}
|
|
117380
|
+
}
|
|
117381
|
+
});
|
|
117382
|
+
|
|
117383
|
+
// ../config/deps-installer/lib/assertValidConfigDepVersion.js
|
|
117384
|
+
var require_assertValidConfigDepVersion = __commonJS({
|
|
117385
|
+
"../config/deps-installer/lib/assertValidConfigDepVersion.js"(exports2) {
|
|
117386
|
+
"use strict";
|
|
117387
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
117388
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
117389
|
+
};
|
|
117390
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
117391
|
+
exports2.assertValidConfigDepVersion = assertValidConfigDepVersion;
|
|
117392
|
+
var error_1 = require_lib6();
|
|
117393
|
+
var semver_12 = __importDefault2(require_semver2());
|
|
117394
|
+
function assertValidConfigDepVersion(name, version2) {
|
|
117395
|
+
if (semver_12.default.valid(version2) == null) {
|
|
117396
|
+
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." });
|
|
117397
|
+
}
|
|
117398
|
+
}
|
|
117399
|
+
}
|
|
117400
|
+
});
|
|
117401
|
+
|
|
117191
117402
|
// ../config/deps-installer/lib/normalizeConfigDeps.js
|
|
117192
117403
|
var require_normalizeConfigDeps = __commonJS({
|
|
117193
117404
|
"../config/deps-installer/lib/normalizeConfigDeps.js"(exports2) {
|
|
@@ -117200,12 +117411,16 @@ var require_normalizeConfigDeps = __commonJS({
|
|
|
117200
117411
|
var get_npm_tarball_url_1 = __importDefault2(require_lib96());
|
|
117201
117412
|
var error_1 = require_lib6();
|
|
117202
117413
|
var pick_registry_for_package_1 = require_lib44();
|
|
117414
|
+
var assertValidConfigDepName_js_1 = require_assertValidConfigDepName();
|
|
117415
|
+
var assertValidConfigDepVersion_js_1 = require_assertValidConfigDepVersion();
|
|
117203
117416
|
function normalizeConfigDeps(configDependencies, opts) {
|
|
117204
117417
|
const deps = {};
|
|
117205
117418
|
for (const [pkgName, pkgSpec] of Object.entries(configDependencies)) {
|
|
117419
|
+
(0, assertValidConfigDepName_js_1.assertValidConfigDepName)(pkgName);
|
|
117206
117420
|
const registry = (0, pick_registry_for_package_1.pickRegistryForPackage)(opts.registries, pkgName);
|
|
117207
117421
|
if (typeof pkgSpec === "object") {
|
|
117208
117422
|
const { version: version2, integrity } = parseIntegrity(pkgName, pkgSpec.integrity);
|
|
117423
|
+
(0, assertValidConfigDepVersion_js_1.assertValidConfigDepVersion)(pkgName, version2);
|
|
117209
117424
|
deps[pkgName] = {
|
|
117210
117425
|
version: version2,
|
|
117211
117426
|
resolution: {
|
|
@@ -117217,6 +117432,7 @@ var require_normalizeConfigDeps = __commonJS({
|
|
|
117217
117432
|
}
|
|
117218
117433
|
if (typeof pkgSpec === "string") {
|
|
117219
117434
|
const { version: version2, integrity } = parseIntegrity(pkgName, pkgSpec);
|
|
117435
|
+
(0, assertValidConfigDepVersion_js_1.assertValidConfigDepVersion)(pkgName, version2);
|
|
117220
117436
|
deps[pkgName] = {
|
|
117221
117437
|
version: version2,
|
|
117222
117438
|
resolution: {
|
|
@@ -124774,7 +124990,7 @@ var require_patchDocument = __commonJS({
|
|
|
124774
124990
|
});
|
|
124775
124991
|
|
|
124776
124992
|
// ../yaml/document-sync/lib/index.js
|
|
124777
|
-
var
|
|
124993
|
+
var require_lib98 = __commonJS({
|
|
124778
124994
|
"../yaml/document-sync/lib/index.js"(exports2) {
|
|
124779
124995
|
"use strict";
|
|
124780
124996
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -124864,7 +125080,7 @@ var require_sort_keys = __commonJS({
|
|
|
124864
125080
|
});
|
|
124865
125081
|
|
|
124866
125082
|
// ../object/key-sorting/lib/index.js
|
|
124867
|
-
var
|
|
125083
|
+
var require_lib99 = __commonJS({
|
|
124868
125084
|
"../object/key-sorting/lib/index.js"(exports2) {
|
|
124869
125085
|
"use strict";
|
|
124870
125086
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -124910,7 +125126,7 @@ var require_lib98 = __commonJS({
|
|
|
124910
125126
|
});
|
|
124911
125127
|
|
|
124912
125128
|
// ../workspace/manifest-writer/lib/index.js
|
|
124913
|
-
var
|
|
125129
|
+
var require_lib100 = __commonJS({
|
|
124914
125130
|
"../workspace/manifest-writer/lib/index.js"(exports2) {
|
|
124915
125131
|
"use strict";
|
|
124916
125132
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -124923,11 +125139,11 @@ var require_lib99 = __commonJS({
|
|
|
124923
125139
|
var util_1 = __importDefault2(require("util"));
|
|
124924
125140
|
var workspace_read_manifest_1 = require_lib22();
|
|
124925
125141
|
var constants_1 = require_lib5();
|
|
124926
|
-
var yaml_document_sync_1 =
|
|
125142
|
+
var yaml_document_sync_1 = require_lib98();
|
|
124927
125143
|
var equals_1 = __importDefault2(require_equals2());
|
|
124928
125144
|
var yaml_1 = __importDefault2(require_dist20());
|
|
124929
125145
|
var write_file_atomic_1 = __importDefault2(require_lib14());
|
|
124930
|
-
var object_key_sorting_1 =
|
|
125146
|
+
var object_key_sorting_1 = require_lib99();
|
|
124931
125147
|
async function writeManifestFile(dir, manifest) {
|
|
124932
125148
|
const manifestStr = manifest.toString({
|
|
124933
125149
|
lineWidth: 0,
|
|
@@ -125106,7 +125322,7 @@ var require_lib99 = __commonJS({
|
|
|
125106
125322
|
});
|
|
125107
125323
|
|
|
125108
125324
|
// ../config/config-writer/lib/index.js
|
|
125109
|
-
var
|
|
125325
|
+
var require_lib101 = __commonJS({
|
|
125110
125326
|
"../config/config-writer/lib/index.js"(exports2) {
|
|
125111
125327
|
"use strict";
|
|
125112
125328
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -125115,7 +125331,7 @@ var require_lib100 = __commonJS({
|
|
|
125115
125331
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
125116
125332
|
exports2.writeSettings = writeSettings;
|
|
125117
125333
|
var read_project_manifest_1 = require_lib17();
|
|
125118
|
-
var workspace_manifest_writer_1 =
|
|
125334
|
+
var workspace_manifest_writer_1 = require_lib100();
|
|
125119
125335
|
var equals_1 = __importDefault2(require_equals2());
|
|
125120
125336
|
async function writeSettings(opts) {
|
|
125121
125337
|
if (opts.rootProjectManifest?.pnpm != null) {
|
|
@@ -125161,169 +125377,6 @@ var require_lib100 = __commonJS({
|
|
|
125161
125377
|
}
|
|
125162
125378
|
});
|
|
125163
125379
|
|
|
125164
|
-
// ../node_modules/.pnpm/builtins@5.1.0/node_modules/builtins/index.js
|
|
125165
|
-
var require_builtins2 = __commonJS({
|
|
125166
|
-
"../node_modules/.pnpm/builtins@5.1.0/node_modules/builtins/index.js"(exports2, module2) {
|
|
125167
|
-
"use strict";
|
|
125168
|
-
var satisfies = require_satisfies();
|
|
125169
|
-
var permanentModules = [
|
|
125170
|
-
"assert",
|
|
125171
|
-
"buffer",
|
|
125172
|
-
"child_process",
|
|
125173
|
-
"cluster",
|
|
125174
|
-
"console",
|
|
125175
|
-
"constants",
|
|
125176
|
-
"crypto",
|
|
125177
|
-
"dgram",
|
|
125178
|
-
"dns",
|
|
125179
|
-
"domain",
|
|
125180
|
-
"events",
|
|
125181
|
-
"fs",
|
|
125182
|
-
"http",
|
|
125183
|
-
"https",
|
|
125184
|
-
"module",
|
|
125185
|
-
"net",
|
|
125186
|
-
"os",
|
|
125187
|
-
"path",
|
|
125188
|
-
"punycode",
|
|
125189
|
-
"querystring",
|
|
125190
|
-
"readline",
|
|
125191
|
-
"repl",
|
|
125192
|
-
"stream",
|
|
125193
|
-
"string_decoder",
|
|
125194
|
-
"sys",
|
|
125195
|
-
"timers",
|
|
125196
|
-
"tls",
|
|
125197
|
-
"tty",
|
|
125198
|
-
"url",
|
|
125199
|
-
"util",
|
|
125200
|
-
"vm",
|
|
125201
|
-
"zlib"
|
|
125202
|
-
];
|
|
125203
|
-
var versionLockedModules = {
|
|
125204
|
-
freelist: "<6.0.0",
|
|
125205
|
-
v8: ">=1.0.0",
|
|
125206
|
-
process: ">=1.1.0",
|
|
125207
|
-
inspector: ">=8.0.0",
|
|
125208
|
-
async_hooks: ">=8.1.0",
|
|
125209
|
-
http2: ">=8.4.0",
|
|
125210
|
-
perf_hooks: ">=8.5.0",
|
|
125211
|
-
trace_events: ">=10.0.0",
|
|
125212
|
-
worker_threads: ">=12.0.0",
|
|
125213
|
-
"node:test": ">=18.0.0"
|
|
125214
|
-
};
|
|
125215
|
-
var experimentalModules = {
|
|
125216
|
-
worker_threads: ">=10.5.0",
|
|
125217
|
-
wasi: ">=12.16.0",
|
|
125218
|
-
diagnostics_channel: "^14.17.0 || >=15.1.0"
|
|
125219
|
-
};
|
|
125220
|
-
module2.exports = ({ version: version2 = process.version, experimental = false } = {}) => {
|
|
125221
|
-
const builtins = [...permanentModules];
|
|
125222
|
-
for (const [name, semverRange] of Object.entries(versionLockedModules)) {
|
|
125223
|
-
if (version2 === "*" || satisfies(version2, semverRange)) {
|
|
125224
|
-
builtins.push(name);
|
|
125225
|
-
}
|
|
125226
|
-
}
|
|
125227
|
-
if (experimental) {
|
|
125228
|
-
for (const [name, semverRange] of Object.entries(experimentalModules)) {
|
|
125229
|
-
if (!builtins.includes(name) && (version2 === "*" || satisfies(version2, semverRange))) {
|
|
125230
|
-
builtins.push(name);
|
|
125231
|
-
}
|
|
125232
|
-
}
|
|
125233
|
-
}
|
|
125234
|
-
return builtins;
|
|
125235
|
-
};
|
|
125236
|
-
}
|
|
125237
|
-
});
|
|
125238
|
-
|
|
125239
|
-
// ../node_modules/.pnpm/validate-npm-package-name@5.0.0/node_modules/validate-npm-package-name/lib/index.js
|
|
125240
|
-
var require_lib101 = __commonJS({
|
|
125241
|
-
"../node_modules/.pnpm/validate-npm-package-name@5.0.0/node_modules/validate-npm-package-name/lib/index.js"(exports2, module2) {
|
|
125242
|
-
"use strict";
|
|
125243
|
-
var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
|
|
125244
|
-
var builtins = require_builtins2();
|
|
125245
|
-
var blacklist = [
|
|
125246
|
-
"node_modules",
|
|
125247
|
-
"favicon.ico"
|
|
125248
|
-
];
|
|
125249
|
-
function validate2(name) {
|
|
125250
|
-
var warnings = [];
|
|
125251
|
-
var errors = [];
|
|
125252
|
-
if (name === null) {
|
|
125253
|
-
errors.push("name cannot be null");
|
|
125254
|
-
return done(warnings, errors);
|
|
125255
|
-
}
|
|
125256
|
-
if (name === void 0) {
|
|
125257
|
-
errors.push("name cannot be undefined");
|
|
125258
|
-
return done(warnings, errors);
|
|
125259
|
-
}
|
|
125260
|
-
if (typeof name !== "string") {
|
|
125261
|
-
errors.push("name must be a string");
|
|
125262
|
-
return done(warnings, errors);
|
|
125263
|
-
}
|
|
125264
|
-
if (!name.length) {
|
|
125265
|
-
errors.push("name length must be greater than zero");
|
|
125266
|
-
}
|
|
125267
|
-
if (name.match(/^\./)) {
|
|
125268
|
-
errors.push("name cannot start with a period");
|
|
125269
|
-
}
|
|
125270
|
-
if (name.match(/^_/)) {
|
|
125271
|
-
errors.push("name cannot start with an underscore");
|
|
125272
|
-
}
|
|
125273
|
-
if (name.trim() !== name) {
|
|
125274
|
-
errors.push("name cannot contain leading or trailing spaces");
|
|
125275
|
-
}
|
|
125276
|
-
blacklist.forEach(function(blacklistedName) {
|
|
125277
|
-
if (name.toLowerCase() === blacklistedName) {
|
|
125278
|
-
errors.push(blacklistedName + " is a blacklisted name");
|
|
125279
|
-
}
|
|
125280
|
-
});
|
|
125281
|
-
builtins({ version: "*" }).forEach(function(builtin) {
|
|
125282
|
-
if (name.toLowerCase() === builtin) {
|
|
125283
|
-
warnings.push(builtin + " is a core module name");
|
|
125284
|
-
}
|
|
125285
|
-
});
|
|
125286
|
-
if (name.length > 214) {
|
|
125287
|
-
warnings.push("name can no longer contain more than 214 characters");
|
|
125288
|
-
}
|
|
125289
|
-
if (name.toLowerCase() !== name) {
|
|
125290
|
-
warnings.push("name can no longer contain capital letters");
|
|
125291
|
-
}
|
|
125292
|
-
if (/[~'!()*]/.test(name.split("/").slice(-1)[0])) {
|
|
125293
|
-
warnings.push(`name can no longer contain special characters ("~'!()*")`);
|
|
125294
|
-
}
|
|
125295
|
-
if (encodeURIComponent(name) !== name) {
|
|
125296
|
-
var nameMatch = name.match(scopedPackagePattern);
|
|
125297
|
-
if (nameMatch) {
|
|
125298
|
-
var user = nameMatch[1];
|
|
125299
|
-
var pkg = nameMatch[2];
|
|
125300
|
-
if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) {
|
|
125301
|
-
return done(warnings, errors);
|
|
125302
|
-
}
|
|
125303
|
-
}
|
|
125304
|
-
errors.push("name can only contain URL-friendly characters");
|
|
125305
|
-
}
|
|
125306
|
-
return done(warnings, errors);
|
|
125307
|
-
}
|
|
125308
|
-
var done = function(warnings, errors) {
|
|
125309
|
-
var result2 = {
|
|
125310
|
-
validForNewPackages: errors.length === 0 && warnings.length === 0,
|
|
125311
|
-
validForOldPackages: errors.length === 0,
|
|
125312
|
-
warnings,
|
|
125313
|
-
errors
|
|
125314
|
-
};
|
|
125315
|
-
if (!result2.warnings.length) {
|
|
125316
|
-
delete result2.warnings;
|
|
125317
|
-
}
|
|
125318
|
-
if (!result2.errors.length) {
|
|
125319
|
-
delete result2.errors;
|
|
125320
|
-
}
|
|
125321
|
-
return result2;
|
|
125322
|
-
};
|
|
125323
|
-
module2.exports = validate2;
|
|
125324
|
-
}
|
|
125325
|
-
});
|
|
125326
|
-
|
|
125327
125380
|
// ../packages/parse-wanted-dependency/lib/index.js
|
|
125328
125381
|
var require_lib102 = __commonJS({
|
|
125329
125382
|
"../packages/parse-wanted-dependency/lib/index.js"(exports2) {
|
|
@@ -125333,7 +125386,7 @@ var require_lib102 = __commonJS({
|
|
|
125333
125386
|
};
|
|
125334
125387
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
125335
125388
|
exports2.parseWantedDependency = parseWantedDependency;
|
|
125336
|
-
var validate_npm_package_name_1 = __importDefault2(
|
|
125389
|
+
var validate_npm_package_name_1 = __importDefault2(require_lib97());
|
|
125337
125390
|
function parseWantedDependency(rawWantedDependency) {
|
|
125338
125391
|
const versionDelimiter = rawWantedDependency.indexOf("@", 1);
|
|
125339
125392
|
if (versionDelimiter !== -1) {
|
|
@@ -125371,7 +125424,7 @@ var require_resolveConfigDeps = __commonJS({
|
|
|
125371
125424
|
exports2.resolveConfigDeps = resolveConfigDeps;
|
|
125372
125425
|
var get_npm_tarball_url_1 = __importDefault2(require_lib96());
|
|
125373
125426
|
var error_1 = require_lib6();
|
|
125374
|
-
var config_config_writer_1 =
|
|
125427
|
+
var config_config_writer_1 = require_lib101();
|
|
125375
125428
|
var fetch_1 = require_lib31();
|
|
125376
125429
|
var npm_resolver_1 = require_lib51();
|
|
125377
125430
|
var network_auth_header_1 = require_lib77();
|
|
@@ -139136,7 +139189,7 @@ var require_sortLockfileKeys = __commonJS({
|
|
|
139136
139189
|
"use strict";
|
|
139137
139190
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
139138
139191
|
exports2.sortLockfileKeys = sortLockfileKeys;
|
|
139139
|
-
var object_key_sorting_1 =
|
|
139192
|
+
var object_key_sorting_1 = require_lib99();
|
|
139140
139193
|
var ORDERED_KEYS = {
|
|
139141
139194
|
resolution: 1,
|
|
139142
139195
|
id: 2,
|
|
@@ -142017,7 +142070,7 @@ var require_approveBuilds = __commonJS({
|
|
|
142017
142070
|
var enquirer_1 = require_enquirer();
|
|
142018
142071
|
var chalk_1 = __importDefault2(require_source());
|
|
142019
142072
|
var plugin_commands_rebuild_1 = require_lib133();
|
|
142020
|
-
var config_config_writer_1 =
|
|
142073
|
+
var config_config_writer_1 = require_lib101();
|
|
142021
142074
|
var getAutomaticallyIgnoredBuilds_js_1 = require_getAutomaticallyIgnoredBuilds();
|
|
142022
142075
|
exports2.commandNames = ["approve-builds"];
|
|
142023
142076
|
function help() {
|
|
@@ -148228,7 +148281,7 @@ var require_fix = __commonJS({
|
|
|
148228
148281
|
};
|
|
148229
148282
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
148230
148283
|
exports2.fix = fix;
|
|
148231
|
-
var config_config_writer_1 =
|
|
148284
|
+
var config_config_writer_1 = require_lib101();
|
|
148232
148285
|
var difference_1 = __importDefault2(require_difference());
|
|
148233
148286
|
async function fix(auditReport, opts) {
|
|
148234
148287
|
const vulnOverrides = createOverrides(Object.values(auditReport.advisories), opts.auditConfig?.ignoreCves);
|
|
@@ -148263,7 +148316,7 @@ var require_ignore2 = __commonJS({
|
|
|
148263
148316
|
};
|
|
148264
148317
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
148265
148318
|
exports2.ignore = ignore;
|
|
148266
|
-
var config_config_writer_1 =
|
|
148319
|
+
var config_config_writer_1 = require_lib101();
|
|
148267
148320
|
var difference_1 = __importDefault2(require_difference());
|
|
148268
148321
|
async function ignore(opts) {
|
|
148269
148322
|
const currentCves = opts?.auditConfig?.ignoreCves ?? [];
|
|
@@ -150907,7 +150960,7 @@ var require_configSet = __commonJS({
|
|
|
150907
150960
|
var error_1 = require_lib6();
|
|
150908
150961
|
var object_property_path_1 = require_lib141();
|
|
150909
150962
|
var run_npm_1 = require_lib142();
|
|
150910
|
-
var workspace_manifest_writer_1 =
|
|
150963
|
+
var workspace_manifest_writer_1 = require_lib100();
|
|
150911
150964
|
var camelcase_1 = __importDefault2(require_camelcase());
|
|
150912
150965
|
var lodash_kebabcase_1 = __importDefault2(require_lodash());
|
|
150913
150966
|
var read_ini_file_1 = require_read_ini_file();
|
|
@@ -151042,7 +151095,7 @@ var require_configList = __commonJS({
|
|
|
151042
151095
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
151043
151096
|
exports2.configList = configList;
|
|
151044
151097
|
var ini_1 = require_ini3();
|
|
151045
|
-
var object_key_sorting_1 =
|
|
151098
|
+
var object_key_sorting_1 = require_lib99();
|
|
151046
151099
|
async function configList(opts) {
|
|
151047
151100
|
const sortedConfig = (0, object_key_sorting_1.sortDirectKeys)(opts.rawConfig);
|
|
151048
151101
|
if (opts.json) {
|
|
@@ -163717,17 +163770,25 @@ var require_safeJoinModulesDir = __commonJS({
|
|
|
163717
163770
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
163718
163771
|
exports2.safeJoinModulesDir = safeJoinModulesDir;
|
|
163719
163772
|
var path_1 = __importDefault2(require("path"));
|
|
163773
|
+
var validate_npm_package_name_1 = __importDefault2(require_lib97());
|
|
163720
163774
|
function safeJoinModulesDir(modulesDir, alias) {
|
|
163775
|
+
if (!(0, validate_npm_package_name_1.default)(alias).validForOldPackages) {
|
|
163776
|
+
throw invalidDependencyNameError(modulesDir, alias);
|
|
163777
|
+
}
|
|
163721
163778
|
const link = path_1.default.join(modulesDir, alias);
|
|
163722
163779
|
const resolvedDir = path_1.default.resolve(modulesDir);
|
|
163723
163780
|
const resolvedLink = path_1.default.resolve(link);
|
|
163724
163781
|
if (resolvedLink === resolvedDir || !resolvedLink.startsWith(resolvedDir + path_1.default.sep)) {
|
|
163725
|
-
|
|
163726
|
-
error.code = "ERR_PNPM_INVALID_DEPENDENCY_NAME";
|
|
163727
|
-
throw error;
|
|
163782
|
+
throw invalidDependencyNameError(modulesDir, alias, resolvedLink);
|
|
163728
163783
|
}
|
|
163729
163784
|
return link;
|
|
163730
163785
|
}
|
|
163786
|
+
function invalidDependencyNameError(modulesDir, alias, resolvedLink) {
|
|
163787
|
+
const detail = resolvedLink ? ` (it resolves to ${resolvedLink})` : "";
|
|
163788
|
+
const error = new Error(`Refusing to place a dependency under ${modulesDir} with the invalid alias ${JSON.stringify(alias)}${detail}`);
|
|
163789
|
+
error.code = "ERR_PNPM_INVALID_DEPENDENCY_NAME";
|
|
163790
|
+
return error;
|
|
163791
|
+
}
|
|
163731
163792
|
}
|
|
163732
163793
|
});
|
|
163733
163794
|
|
|
@@ -163788,12 +163849,16 @@ var require_lib161 = __commonJS({
|
|
|
163788
163849
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
163789
163850
|
};
|
|
163790
163851
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
163791
|
-
exports2.symlinkDirectRootDependency = void 0;
|
|
163852
|
+
exports2.symlinkDirectRootDependency = exports2.safeJoinModulesDir = void 0;
|
|
163792
163853
|
exports2.symlinkDependency = symlinkDependency;
|
|
163793
163854
|
exports2.symlinkDependencySync = symlinkDependencySync;
|
|
163794
163855
|
var core_loggers_1 = require_lib8();
|
|
163795
163856
|
var symlink_dir_1 = __importDefault2(require_dist18());
|
|
163796
163857
|
var safeJoinModulesDir_js_1 = require_safeJoinModulesDir();
|
|
163858
|
+
var safeJoinModulesDir_js_2 = require_safeJoinModulesDir();
|
|
163859
|
+
Object.defineProperty(exports2, "safeJoinModulesDir", { enumerable: true, get: function() {
|
|
163860
|
+
return safeJoinModulesDir_js_2.safeJoinModulesDir;
|
|
163861
|
+
} });
|
|
163797
163862
|
var symlinkDirectRootDependency_js_1 = require_symlinkDirectRootDependency();
|
|
163798
163863
|
Object.defineProperty(exports2, "symlinkDirectRootDependency", { enumerable: true, get: function() {
|
|
163799
163864
|
return symlinkDirectRootDependency_js_1.symlinkDirectRootDependency;
|
|
@@ -165340,6 +165405,7 @@ var require_lockfileToHoistedDepGraph = __commonJS({
|
|
|
165340
165405
|
var package_is_installable_1 = require_lib86();
|
|
165341
165406
|
var patching_config_1 = require_lib162();
|
|
165342
165407
|
var read_package_json_1 = require_lib62();
|
|
165408
|
+
var symlink_dependency_1 = require_lib161();
|
|
165343
165409
|
var real_hoist_1 = require_lib164();
|
|
165344
165410
|
var dp = __importStar3(require_lib87());
|
|
165345
165411
|
async function lockfileToHoistedDepGraph(lockfile, currentLockfile, opts) {
|
|
@@ -165465,7 +165531,7 @@ var require_lockfileToHoistedDepGraph = __commonJS({
|
|
|
165465
165531
|
});
|
|
165466
165532
|
return;
|
|
165467
165533
|
}
|
|
165468
|
-
const dir =
|
|
165534
|
+
const dir = (0, symlink_dependency_1.safeJoinModulesDir)(modules, dep.name);
|
|
165469
165535
|
const depLocation = path_1.default.relative(opts.lockfileDir, dir);
|
|
165470
165536
|
const resolution = (0, lockfile_utils_1.pkgSnapshotToResolution)(depPath, pkgSnapshot, opts.registries);
|
|
165471
165537
|
let fetchResponse;
|
|
@@ -166448,7 +166514,7 @@ var require_validateDependencyAlias = __commonJS({
|
|
|
166448
166514
|
exports2.isValidDependencyAlias = isValidDependencyAlias;
|
|
166449
166515
|
exports2.assertValidDependencyAliases = assertValidDependencyAliases;
|
|
166450
166516
|
var error_1 = require_lib6();
|
|
166451
|
-
var validate_npm_package_name_1 = __importDefault2(
|
|
166517
|
+
var validate_npm_package_name_1 = __importDefault2(require_lib97());
|
|
166452
166518
|
function isValidDependencyAlias(alias) {
|
|
166453
166519
|
return typeof alias === "string" && (0, validate_npm_package_name_1.default)(alias).validForOldPackages;
|
|
166454
166520
|
}
|
|
@@ -175370,7 +175436,7 @@ var require_recursive2 = __commonJS({
|
|
|
175370
175436
|
var pnpmfile_1 = require_lib104();
|
|
175371
175437
|
var sort_packages_1 = require_lib132();
|
|
175372
175438
|
var store_connection_manager_1 = require_lib95();
|
|
175373
|
-
var workspace_manifest_writer_1 =
|
|
175439
|
+
var workspace_manifest_writer_1 = require_lib100();
|
|
175374
175440
|
var core_1 = require_lib172();
|
|
175375
175441
|
var is_subdir_1 = __importDefault2(require_is_subdir());
|
|
175376
175442
|
var mem_1 = __importDefault2(require_dist15());
|
|
@@ -175773,7 +175839,7 @@ var require_installDeps = __commonJS({
|
|
|
175773
175839
|
var core_1 = require_lib172();
|
|
175774
175840
|
var logger_1 = require_lib();
|
|
175775
175841
|
var sort_packages_1 = require_lib132();
|
|
175776
|
-
var workspace_manifest_writer_1 =
|
|
175842
|
+
var workspace_manifest_writer_1 = require_lib100();
|
|
175777
175843
|
var workspace_pkgs_graph_1 = require_lib109();
|
|
175778
175844
|
var workspace_state_1 = require_lib152();
|
|
175779
175845
|
var is_subdir_1 = __importDefault2(require_is_subdir());
|
|
@@ -176072,7 +176138,7 @@ var require_add2 = __commonJS({
|
|
|
176072
176138
|
var render_help_1 = __importDefault2(require_lib111());
|
|
176073
176139
|
var getFetchFullMetadata_js_1 = require_getFetchFullMetadata();
|
|
176074
176140
|
var installDeps_js_1 = require_installDeps();
|
|
176075
|
-
var config_config_writer_1 =
|
|
176141
|
+
var config_config_writer_1 = require_lib101();
|
|
176076
176142
|
exports2.shorthands = {
|
|
176077
176143
|
"save-catalog": "--save-catalog-name=default"
|
|
176078
176144
|
};
|
|
@@ -176982,7 +177048,7 @@ var require_link4 = __commonJS({
|
|
|
176982
177048
|
var path_1 = __importDefault2(require("path"));
|
|
176983
177049
|
var cli_utils_1 = require_lib105();
|
|
176984
177050
|
var common_cli_options_help_1 = require_lib118();
|
|
176985
|
-
var config_config_writer_1 =
|
|
177051
|
+
var config_config_writer_1 = require_lib101();
|
|
176986
177052
|
var config_1 = require_lib24();
|
|
176987
177053
|
var types_1 = require_lib10();
|
|
176988
177054
|
var error_1 = require_lib6();
|
|
@@ -177232,7 +177298,7 @@ var require_remove4 = __commonJS({
|
|
|
177232
177298
|
var error_1 = require_lib6();
|
|
177233
177299
|
var get_context_1 = require_lib127();
|
|
177234
177300
|
var workspace_find_packages_1 = require_lib107();
|
|
177235
|
-
var workspace_manifest_writer_1 =
|
|
177301
|
+
var workspace_manifest_writer_1 = require_lib100();
|
|
177236
177302
|
var manifest_utils_1 = require_lib11();
|
|
177237
177303
|
var store_connection_manager_1 = require_lib95();
|
|
177238
177304
|
var core_1 = require_lib172();
|
|
@@ -200360,7 +200426,7 @@ var require_pack2 = __commonJS({
|
|
|
200360
200426
|
var tar_stream_1 = __importDefault2(require_tar_stream());
|
|
200361
200427
|
var publish_js_1 = require_publish2();
|
|
200362
200428
|
var chalk_1 = __importDefault2(require_source());
|
|
200363
|
-
var validate_npm_package_name_1 = __importDefault2(
|
|
200429
|
+
var validate_npm_package_name_1 = __importDefault2(require_lib97());
|
|
200364
200430
|
var p_limit_12 = __importDefault2(require_p_limit());
|
|
200365
200431
|
var common_cli_options_help_1 = require_lib118();
|
|
200366
200432
|
var sort_packages_1 = require_lib132();
|
|
@@ -201257,7 +201323,7 @@ var require_updatePatchedDependencies = __commonJS({
|
|
|
201257
201323
|
exports2.updatePatchedDependencies = updatePatchedDependencies;
|
|
201258
201324
|
var path_1 = __importDefault2(require("path"));
|
|
201259
201325
|
var normalize_path_1 = __importDefault2(require_normalize_path());
|
|
201260
|
-
var config_config_writer_1 =
|
|
201326
|
+
var config_config_writer_1 = require_lib101();
|
|
201261
201327
|
async function updatePatchedDependencies(patchedDependencies, opts) {
|
|
201262
201328
|
const workspaceDir = opts.workspaceDir ?? opts.rootProjectManifestDir;
|
|
201263
201329
|
for (const [patchName, patchPath] of Object.entries(patchedDependencies)) {
|
|
@@ -201489,6 +201555,23 @@ ${stderr}`);
|
|
|
201489
201555
|
}
|
|
201490
201556
|
});
|
|
201491
201557
|
|
|
201558
|
+
// ../patching/plugin-commands-patching/lib/isSubdirectory.js
|
|
201559
|
+
var require_isSubdirectory = __commonJS({
|
|
201560
|
+
"../patching/plugin-commands-patching/lib/isSubdirectory.js"(exports2) {
|
|
201561
|
+
"use strict";
|
|
201562
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
201563
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
201564
|
+
};
|
|
201565
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
201566
|
+
exports2.isSubdirectory = isSubdirectory;
|
|
201567
|
+
var path_1 = __importDefault2(require("path"));
|
|
201568
|
+
function isSubdirectory(parentDir, childPath, pathUtils = path_1.default) {
|
|
201569
|
+
const relativePath = pathUtils.relative(parentDir, childPath);
|
|
201570
|
+
return relativePath === "" || relativePath !== ".." && !relativePath.startsWith(`..${pathUtils.sep}`) && !pathUtils.isAbsolute(relativePath);
|
|
201571
|
+
}
|
|
201572
|
+
}
|
|
201573
|
+
});
|
|
201574
|
+
|
|
201492
201575
|
// ../patching/plugin-commands-patching/lib/patchRemove.js
|
|
201493
201576
|
var require_patchRemove = __commonJS({
|
|
201494
201577
|
"../patching/plugin-commands-patching/lib/patchRemove.js"(exports2) {
|
|
@@ -201502,8 +201585,8 @@ var require_patchRemove = __commonJS({
|
|
|
201502
201585
|
exports2.cliOptionsTypes = cliOptionsTypes;
|
|
201503
201586
|
exports2.help = help;
|
|
201504
201587
|
exports2.handler = handler;
|
|
201505
|
-
var path_1 = __importDefault2(require("path"));
|
|
201506
201588
|
var promises_1 = __importDefault2(require("fs/promises"));
|
|
201589
|
+
var path_1 = __importDefault2(require("path"));
|
|
201507
201590
|
var cli_utils_1 = require_lib105();
|
|
201508
201591
|
var plugin_commands_installation_1 = require_lib177();
|
|
201509
201592
|
var config_1 = require_lib24();
|
|
@@ -201511,6 +201594,7 @@ var require_patchRemove = __commonJS({
|
|
|
201511
201594
|
var render_help_1 = __importDefault2(require_lib111());
|
|
201512
201595
|
var enquirer_1 = require_enquirer();
|
|
201513
201596
|
var pick_1 = __importDefault2(require_pick());
|
|
201597
|
+
var isSubdirectory_js_1 = require_isSubdirectory();
|
|
201514
201598
|
var updatePatchedDependencies_js_1 = require_updatePatchedDependencies();
|
|
201515
201599
|
function rcOptionsTypes() {
|
|
201516
201600
|
return (0, pick_1.default)([], config_1.types);
|
|
@@ -201528,7 +201612,7 @@ var require_patchRemove = __commonJS({
|
|
|
201528
201612
|
}
|
|
201529
201613
|
async function handler(opts, params) {
|
|
201530
201614
|
let patchesToRemove = params;
|
|
201531
|
-
const patchedDependencies = opts.patchedDependencies
|
|
201615
|
+
const patchedDependencies = { ...opts.patchedDependencies };
|
|
201532
201616
|
if (!params.length) {
|
|
201533
201617
|
const allPatches = Object.keys(patchedDependencies);
|
|
201534
201618
|
if (allPatches.length) {
|
|
@@ -201551,15 +201635,19 @@ var require_patchRemove = __commonJS({
|
|
|
201551
201635
|
throw new error_1.PnpmError("PATCH_NOT_FOUND", `Patch "${patch}" not found in patched dependencies`);
|
|
201552
201636
|
}
|
|
201553
201637
|
}
|
|
201554
|
-
const
|
|
201555
|
-
await Promise.all(patchesToRemove.map(async (patch) => {
|
|
201556
|
-
|
|
201557
|
-
|
|
201558
|
-
|
|
201559
|
-
await promises_1.default.rm(patchFile, { force: true });
|
|
201560
|
-
delete patchedDependencies[patch];
|
|
201638
|
+
const patchRemovalContext = await getPatchRemovalContext(opts);
|
|
201639
|
+
const patchesToRemoveTargets = await Promise.all(patchesToRemove.map(async (patch) => {
|
|
201640
|
+
const patchFile = patchedDependencies[patch];
|
|
201641
|
+
if (patchFile == null) {
|
|
201642
|
+
throw new error_1.PnpmError("PATCH_NOT_FOUND", `Patch "${patch}" not found in patched dependencies`);
|
|
201561
201643
|
}
|
|
201644
|
+
return getPatchRemovalTarget(patch, patchFile, patchRemovalContext);
|
|
201562
201645
|
}));
|
|
201646
|
+
await Promise.all(patchesToRemoveTargets.map(unlinkPatchIfExists));
|
|
201647
|
+
for (const { patch } of patchesToRemoveTargets) {
|
|
201648
|
+
delete patchedDependencies[patch];
|
|
201649
|
+
}
|
|
201650
|
+
const patchesDirs = new Set(patchesToRemoveTargets.map(({ parentDir }) => parentDir));
|
|
201563
201651
|
await Promise.all(Array.from(patchesDirs).map(async (dir) => {
|
|
201564
201652
|
try {
|
|
201565
201653
|
const files = await promises_1.default.readdir(dir);
|
|
@@ -201573,7 +201661,83 @@ var require_patchRemove = __commonJS({
|
|
|
201573
201661
|
...opts,
|
|
201574
201662
|
workspaceDir: opts.workspaceDir ?? opts.rootProjectManifestDir
|
|
201575
201663
|
});
|
|
201576
|
-
return plugin_commands_installation_1.install.handler(
|
|
201664
|
+
return plugin_commands_installation_1.install.handler({
|
|
201665
|
+
...opts,
|
|
201666
|
+
patchedDependencies
|
|
201667
|
+
});
|
|
201668
|
+
}
|
|
201669
|
+
async function getPatchRemovalContext(opts) {
|
|
201670
|
+
const lockfileDir = path_1.default.resolve(opts.lockfileDir ?? opts.dir ?? process.cwd());
|
|
201671
|
+
const realLockfileDir = await promises_1.default.realpath(lockfileDir);
|
|
201672
|
+
const patchesDirSetting = opts.patchesDir ?? "patches";
|
|
201673
|
+
const patchesDir = path_1.default.join(lockfileDir, path_1.default.normalize(patchesDirSetting));
|
|
201674
|
+
if (!(0, isSubdirectory_js_1.isSubdirectory)(lockfileDir, patchesDir)) {
|
|
201675
|
+
throw new error_1.PnpmError("PATCHES_DIR_OUTSIDE_PROJECT", `The configured patches directory is outside the project: ${patchesDirSetting}`);
|
|
201676
|
+
}
|
|
201677
|
+
const realPatchesDir = await realpathIfExists(patchesDir);
|
|
201678
|
+
if (realPatchesDir != null && !(0, isSubdirectory_js_1.isSubdirectory)(realLockfileDir, realPatchesDir)) {
|
|
201679
|
+
throw new error_1.PnpmError("PATCHES_DIR_OUTSIDE_PROJECT", `The configured patches directory is outside the project: ${patchesDirSetting}`);
|
|
201680
|
+
}
|
|
201681
|
+
return {
|
|
201682
|
+
lockfileDir,
|
|
201683
|
+
patchesDir,
|
|
201684
|
+
realPatchesDir
|
|
201685
|
+
};
|
|
201686
|
+
}
|
|
201687
|
+
async function getPatchRemovalTarget(patch, patchFile, ctx) {
|
|
201688
|
+
const targetPath = path_1.default.resolve(ctx.lockfileDir, patchFile);
|
|
201689
|
+
if (targetPath === ctx.patchesDir || !(0, isSubdirectory_js_1.isSubdirectory)(ctx.patchesDir, targetPath)) {
|
|
201690
|
+
throw new error_1.PnpmError("PATCH_FILE_OUTSIDE_PATCHES_DIR", `Patch file "${patchFile}" is outside the configured patches directory`);
|
|
201691
|
+
}
|
|
201692
|
+
const parentDir = path_1.default.dirname(targetPath);
|
|
201693
|
+
const targetStats = await lstatIfExists(targetPath);
|
|
201694
|
+
const realParentDir = await realpathIfExists(parentDir);
|
|
201695
|
+
const realPatchesDir = ctx.realPatchesDir ?? await realpathIfExists(ctx.patchesDir);
|
|
201696
|
+
if (realParentDir != null && realPatchesDir != null && !(0, isSubdirectory_js_1.isSubdirectory)(realPatchesDir, realParentDir)) {
|
|
201697
|
+
throw new error_1.PnpmError("PATCH_FILE_OUTSIDE_PATCHES_DIR", `Patch file "${patchFile}" is outside the configured patches directory`);
|
|
201698
|
+
}
|
|
201699
|
+
if (targetStats?.isDirectory()) {
|
|
201700
|
+
throw new error_1.PnpmError("PATCH_FILE_IS_DIRECTORY", `Patch file "${patchFile}" is a directory`);
|
|
201701
|
+
}
|
|
201702
|
+
return {
|
|
201703
|
+
patch,
|
|
201704
|
+
patchFile,
|
|
201705
|
+
parentDir,
|
|
201706
|
+
targetPath,
|
|
201707
|
+
targetExists: targetStats != null
|
|
201708
|
+
};
|
|
201709
|
+
}
|
|
201710
|
+
async function unlinkPatchIfExists({ targetExists, targetPath }) {
|
|
201711
|
+
if (!targetExists)
|
|
201712
|
+
return;
|
|
201713
|
+
try {
|
|
201714
|
+
await promises_1.default.unlink(targetPath);
|
|
201715
|
+
} catch (err) {
|
|
201716
|
+
if (isErrorWithCode(err, "ENOENT"))
|
|
201717
|
+
return;
|
|
201718
|
+
throw err;
|
|
201719
|
+
}
|
|
201720
|
+
}
|
|
201721
|
+
async function lstatIfExists(targetPath) {
|
|
201722
|
+
try {
|
|
201723
|
+
return await promises_1.default.lstat(targetPath);
|
|
201724
|
+
} catch (err) {
|
|
201725
|
+
if (isErrorWithCode(err, "ENOENT"))
|
|
201726
|
+
return void 0;
|
|
201727
|
+
throw err;
|
|
201728
|
+
}
|
|
201729
|
+
}
|
|
201730
|
+
async function realpathIfExists(targetPath) {
|
|
201731
|
+
try {
|
|
201732
|
+
return await promises_1.default.realpath(targetPath);
|
|
201733
|
+
} catch (err) {
|
|
201734
|
+
if (isErrorWithCode(err, "ENOENT"))
|
|
201735
|
+
return void 0;
|
|
201736
|
+
throw err;
|
|
201737
|
+
}
|
|
201738
|
+
}
|
|
201739
|
+
function isErrorWithCode(err, code) {
|
|
201740
|
+
return typeof err === "object" && err !== null && "code" in err && err.code === code;
|
|
201577
201741
|
}
|
|
201578
201742
|
}
|
|
201579
201743
|
});
|
|
@@ -210964,7 +211128,7 @@ var require_catIndex = __commonJS({
|
|
|
210964
211128
|
exports2.handler = handler;
|
|
210965
211129
|
var client_1 = require_lib79();
|
|
210966
211130
|
var error_1 = require_lib6();
|
|
210967
|
-
var object_key_sorting_1 =
|
|
211131
|
+
var object_key_sorting_1 = require_lib99();
|
|
210968
211132
|
var store_path_1 = require_lib33();
|
|
210969
211133
|
var store_cafs_1 = require_lib80();
|
|
210970
211134
|
var parse_wanted_dependency_1 = require_lib102();
|
|
@@ -211287,7 +211451,7 @@ var require_init2 = __commonJS({
|
|
|
211287
211451
|
var cli_meta_1 = require_lib4();
|
|
211288
211452
|
var config_1 = require_lib24();
|
|
211289
211453
|
var error_1 = require_lib6();
|
|
211290
|
-
var object_key_sorting_1 =
|
|
211454
|
+
var object_key_sorting_1 = require_lib99();
|
|
211291
211455
|
var write_project_manifest_1 = require_lib15();
|
|
211292
211456
|
var pick_1 = __importDefault2(require_pick());
|
|
211293
211457
|
var render_help_1 = __importDefault2(require_lib111());
|