pnpm 9.7.1 → 9.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/.modules.yaml +5 -5
- package/dist/pnpm.cjs +388 -78
- package/dist/worker.js +18 -8
- package/package.json +3 -1
|
@@ -17,8 +17,8 @@ hoistedLocations:
|
|
|
17
17
|
- node_modules/aggregate-error
|
|
18
18
|
ansi-regex@5.0.1:
|
|
19
19
|
- node_modules/string-width-cjs/node_modules/ansi-regex
|
|
20
|
-
- node_modules/strip-ansi-cjs/node_modules/ansi-regex
|
|
21
20
|
- node_modules/wrap-ansi-cjs/node_modules/ansi-regex
|
|
21
|
+
- node_modules/strip-ansi-cjs/node_modules/ansi-regex
|
|
22
22
|
ansi-regex@6.0.1:
|
|
23
23
|
- node_modules/ansi-regex
|
|
24
24
|
ansi-styles@4.3.0:
|
|
@@ -113,10 +113,10 @@ hoistedLocations:
|
|
|
113
113
|
minipass-sized@1.0.3:
|
|
114
114
|
- node_modules/minipass-sized
|
|
115
115
|
minipass@3.3.6:
|
|
116
|
-
- node_modules/fs-minipass/node_modules/minipass
|
|
117
116
|
- node_modules/minizlib/node_modules/minipass
|
|
118
|
-
- node_modules/minipass
|
|
117
|
+
- node_modules/fs-minipass/node_modules/minipass
|
|
119
118
|
- node_modules/minipass-pipeline/node_modules/minipass
|
|
119
|
+
- node_modules/minipass-flush/node_modules/minipass
|
|
120
120
|
- node_modules/minipass-sized/node_modules/minipass
|
|
121
121
|
minipass@5.0.0:
|
|
122
122
|
- node_modules/tar/node_modules/minipass
|
|
@@ -202,9 +202,9 @@ included:
|
|
|
202
202
|
injectedDeps: {}
|
|
203
203
|
layoutVersion: 5
|
|
204
204
|
nodeLinker: hoisted
|
|
205
|
-
packageManager: pnpm@9.
|
|
205
|
+
packageManager: pnpm@9.8.0
|
|
206
206
|
pendingBuilds: []
|
|
207
|
-
prunedAt:
|
|
207
|
+
prunedAt: Mon, 26 Aug 2024 15:35:33 GMT
|
|
208
208
|
publicHoistPattern:
|
|
209
209
|
- '*eslint*'
|
|
210
210
|
- '*prettier*'
|
package/dist/pnpm.cjs
CHANGED
|
@@ -7640,11 +7640,12 @@ var require_lib5 = __commonJS({
|
|
|
7640
7640
|
exports2.packageManager = void 0;
|
|
7641
7641
|
exports2.detectIfCurrentPkgIsExecutable = detectIfCurrentPkgIsExecutable;
|
|
7642
7642
|
exports2.isExecutedByCorepack = isExecutedByCorepack;
|
|
7643
|
+
exports2.getCurrentPackageName = getCurrentPackageName;
|
|
7643
7644
|
var path_1 = __importDefault2(require("path"));
|
|
7644
7645
|
var load_json_file_1 = __importDefault2(require_load_json_file());
|
|
7645
7646
|
var defaultManifest = {
|
|
7646
7647
|
name: true ? "pnpm" : "pnpm",
|
|
7647
|
-
version: true ? "9.
|
|
7648
|
+
version: true ? "9.9.0" : "0.0.0"
|
|
7648
7649
|
};
|
|
7649
7650
|
var pkgJson;
|
|
7650
7651
|
if (require.main == null) {
|
|
@@ -7672,6 +7673,28 @@ var require_lib5 = __commonJS({
|
|
|
7672
7673
|
function isExecutedByCorepack(env = process.env) {
|
|
7673
7674
|
return env.COREPACK_ROOT != null;
|
|
7674
7675
|
}
|
|
7676
|
+
function getCurrentPackageName(proc = process) {
|
|
7677
|
+
return detectIfCurrentPkgIsExecutable(proc) ? getExePackageName(proc) : "pnpm";
|
|
7678
|
+
}
|
|
7679
|
+
function getExePackageName(proc) {
|
|
7680
|
+
return `@pnpm/${normalizePlatformName(proc)}-${normalizeArchName(proc)}`;
|
|
7681
|
+
}
|
|
7682
|
+
function normalizePlatformName(proc) {
|
|
7683
|
+
switch (proc.platform) {
|
|
7684
|
+
case "win32":
|
|
7685
|
+
return "win";
|
|
7686
|
+
case "darwin":
|
|
7687
|
+
return "macos";
|
|
7688
|
+
default:
|
|
7689
|
+
return proc.platform;
|
|
7690
|
+
}
|
|
7691
|
+
}
|
|
7692
|
+
function normalizeArchName(proc) {
|
|
7693
|
+
if (proc.platform === "win32" && proc.arch === "ia32") {
|
|
7694
|
+
return "x86";
|
|
7695
|
+
}
|
|
7696
|
+
return proc.arch;
|
|
7697
|
+
}
|
|
7675
7698
|
}
|
|
7676
7699
|
});
|
|
7677
7700
|
|
|
@@ -41984,13 +42007,13 @@ Follow ${chalk_1.default.magenta("@pnpmjs")} for updates: https://x.com/pnpmjs`,
|
|
|
41984
42007
|
}));
|
|
41985
42008
|
}
|
|
41986
42009
|
function renderUpdateMessage(opts) {
|
|
41987
|
-
if (opts.currentPkgIsExecutable && opts.env.PNPM_HOME) {
|
|
41988
|
-
return "Run a script from: https://pnpm.io/installation";
|
|
41989
|
-
}
|
|
41990
42010
|
const updateCommand = renderUpdateCommand(opts);
|
|
41991
42011
|
return `Run "${chalk_1.default.magenta(updateCommand)}" to update.`;
|
|
41992
42012
|
}
|
|
41993
42013
|
function renderUpdateCommand(opts) {
|
|
42014
|
+
if (opts.env.PNPM_HOME) {
|
|
42015
|
+
return "pnpm self-update";
|
|
42016
|
+
}
|
|
41994
42017
|
if ((0, cli_meta_1.isExecutedByCorepack)(opts.env)) {
|
|
41995
42018
|
return `corepack install -g pnpm@${opts.latestVersion}`;
|
|
41996
42019
|
}
|
|
@@ -42783,6 +42806,7 @@ var require_checkPlatform = __commonJS({
|
|
|
42783
42806
|
if (typeof list === "string") {
|
|
42784
42807
|
list = [list];
|
|
42785
42808
|
}
|
|
42809
|
+
list = list.filter((value2) => typeof value2 === "string");
|
|
42786
42810
|
if (list.length === 1 && list[0] === "any") {
|
|
42787
42811
|
return true;
|
|
42788
42812
|
}
|
|
@@ -103001,9 +103025,9 @@ var require_groupBy2 = __commonJS({
|
|
|
103001
103025
|
}
|
|
103002
103026
|
});
|
|
103003
103027
|
|
|
103004
|
-
// ../node_modules/.pnpm/symlink-dir@6.0.
|
|
103028
|
+
// ../node_modules/.pnpm/symlink-dir@6.0.2/node_modules/symlink-dir/dist/index.js
|
|
103005
103029
|
var require_dist14 = __commonJS({
|
|
103006
|
-
"../node_modules/.pnpm/symlink-dir@6.0.
|
|
103030
|
+
"../node_modules/.pnpm/symlink-dir@6.0.2/node_modules/symlink-dir/dist/index.js"(exports2, module2) {
|
|
103007
103031
|
"use strict";
|
|
103008
103032
|
var betterPathResolve = require_better_path_resolve();
|
|
103009
103033
|
var fs_1 = require("fs");
|
|
@@ -103027,6 +103051,7 @@ var require_dist14 = __commonJS({
|
|
|
103027
103051
|
return forceSymlink(target, path2, opts);
|
|
103028
103052
|
}
|
|
103029
103053
|
async function forceSymlink(target, path2, opts) {
|
|
103054
|
+
let initialErr;
|
|
103030
103055
|
try {
|
|
103031
103056
|
await fs_1.promises.symlink(target, path2, symlinkType);
|
|
103032
103057
|
return { reused: false };
|
|
@@ -103043,9 +103068,7 @@ var require_dist14 = __commonJS({
|
|
|
103043
103068
|
return { reused: false };
|
|
103044
103069
|
case "EEXIST":
|
|
103045
103070
|
case "EISDIR":
|
|
103046
|
-
|
|
103047
|
-
throw err;
|
|
103048
|
-
}
|
|
103071
|
+
initialErr = err;
|
|
103049
103072
|
break;
|
|
103050
103073
|
default:
|
|
103051
103074
|
throw err;
|
|
@@ -103055,6 +103078,9 @@ var require_dist14 = __commonJS({
|
|
|
103055
103078
|
try {
|
|
103056
103079
|
linkString = await fs_1.promises.readlink(path2);
|
|
103057
103080
|
} catch (err) {
|
|
103081
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.overwrite) === false) {
|
|
103082
|
+
throw initialErr;
|
|
103083
|
+
}
|
|
103058
103084
|
const parentDir = pathLib.dirname(path2);
|
|
103059
103085
|
let warn;
|
|
103060
103086
|
if (opts === null || opts === void 0 ? void 0 : opts.renameTried) {
|
|
@@ -103073,6 +103099,9 @@ var require_dist14 = __commonJS({
|
|
|
103073
103099
|
if (target === linkString) {
|
|
103074
103100
|
return { reused: true };
|
|
103075
103101
|
}
|
|
103102
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.overwrite) === false) {
|
|
103103
|
+
throw initialErr;
|
|
103104
|
+
}
|
|
103076
103105
|
await fs_1.promises.unlink(path2);
|
|
103077
103106
|
return await forceSymlink(target, path2, opts);
|
|
103078
103107
|
}
|
|
@@ -103089,10 +103118,12 @@ var require_dist14 = __commonJS({
|
|
|
103089
103118
|
symlinkDir2.sync = sync;
|
|
103090
103119
|
})(symlinkDir || (symlinkDir = {}));
|
|
103091
103120
|
function forceSymlinkSync(target, path2, opts) {
|
|
103121
|
+
let initialErr;
|
|
103092
103122
|
try {
|
|
103093
103123
|
(0, fs_1.symlinkSync)(target, path2, symlinkType);
|
|
103094
103124
|
return { reused: false };
|
|
103095
103125
|
} catch (err) {
|
|
103126
|
+
initialErr = err;
|
|
103096
103127
|
switch (err.code) {
|
|
103097
103128
|
case "ENOENT":
|
|
103098
103129
|
try {
|
|
@@ -103105,9 +103136,6 @@ var require_dist14 = __commonJS({
|
|
|
103105
103136
|
return { reused: false };
|
|
103106
103137
|
case "EEXIST":
|
|
103107
103138
|
case "EISDIR":
|
|
103108
|
-
if ((opts === null || opts === void 0 ? void 0 : opts.overwrite) === false) {
|
|
103109
|
-
throw err;
|
|
103110
|
-
}
|
|
103111
103139
|
break;
|
|
103112
103140
|
default:
|
|
103113
103141
|
throw err;
|
|
@@ -103117,6 +103145,9 @@ var require_dist14 = __commonJS({
|
|
|
103117
103145
|
try {
|
|
103118
103146
|
linkString = (0, fs_1.readlinkSync)(path2);
|
|
103119
103147
|
} catch (err) {
|
|
103148
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.overwrite) === false) {
|
|
103149
|
+
throw initialErr;
|
|
103150
|
+
}
|
|
103120
103151
|
const parentDir = pathLib.dirname(path2);
|
|
103121
103152
|
let warn;
|
|
103122
103153
|
if (opts === null || opts === void 0 ? void 0 : opts.renameTried) {
|
|
@@ -103135,6 +103166,9 @@ var require_dist14 = __commonJS({
|
|
|
103135
103166
|
if (target === linkString) {
|
|
103136
103167
|
return { reused: true };
|
|
103137
103168
|
}
|
|
103169
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.overwrite) === false) {
|
|
103170
|
+
throw initialErr;
|
|
103171
|
+
}
|
|
103138
103172
|
(0, fs_1.unlinkSync)(path2);
|
|
103139
103173
|
return forceSymlinkSync(target, path2, opts);
|
|
103140
103174
|
}
|
|
@@ -190246,12 +190280,13 @@ var require_resolvePeers = __commonJS({
|
|
|
190246
190280
|
}
|
|
190247
190281
|
}
|
|
190248
190282
|
const newParentPkgs = toPkgByName(parentPkgNodes);
|
|
190283
|
+
const _parentPkgsMatch = parentPkgsMatch.bind(null, ctx.dependenciesTree);
|
|
190249
190284
|
for (const [newParentPkgName, newParentPkg] of Object.entries(newParentPkgs)) {
|
|
190250
190285
|
if (parentPkgs[newParentPkgName]) {
|
|
190251
|
-
if (parentPkgs[newParentPkgName]
|
|
190286
|
+
if (!_parentPkgsMatch(parentPkgs[newParentPkgName], newParentPkg)) {
|
|
190252
190287
|
newParentPkg.occurrence = parentPkgs[newParentPkgName].occurrence + 1;
|
|
190288
|
+
parentPkgs[newParentPkgName] = newParentPkg;
|
|
190253
190289
|
}
|
|
190254
|
-
parentPkgs[newParentPkgName] = newParentPkg;
|
|
190255
190290
|
} else {
|
|
190256
190291
|
parentPkgs[newParentPkgName] = newParentPkg;
|
|
190257
190292
|
}
|
|
@@ -190412,6 +190447,18 @@ var require_resolvePeers = __commonJS({
|
|
|
190412
190447
|
}
|
|
190413
190448
|
}
|
|
190414
190449
|
}
|
|
190450
|
+
function parentPkgsMatch(dependenciesTree, currentParentPkg, newParentPkg) {
|
|
190451
|
+
if (currentParentPkg.version !== newParentPkg.version || currentParentPkg.alias !== newParentPkg.alias) {
|
|
190452
|
+
return false;
|
|
190453
|
+
}
|
|
190454
|
+
const currentParentResolvedPkg = currentParentPkg.nodeId && dependenciesTree.get(currentParentPkg.nodeId)?.resolvedPackage;
|
|
190455
|
+
if (currentParentResolvedPkg == null)
|
|
190456
|
+
return true;
|
|
190457
|
+
const newParentResolvedPkg = newParentPkg.nodeId && dependenciesTree.get(newParentPkg.nodeId)?.resolvedPackage;
|
|
190458
|
+
if (newParentResolvedPkg == null)
|
|
190459
|
+
return true;
|
|
190460
|
+
return currentParentResolvedPkg.name === newParentResolvedPkg.name;
|
|
190461
|
+
}
|
|
190415
190462
|
function findHit(ctx, parentPkgs, pkgIdWithPatchHash) {
|
|
190416
190463
|
const cacheItems = ctx.peersCache.get(pkgIdWithPatchHash);
|
|
190417
190464
|
if (!cacheItems)
|
|
@@ -195406,12 +195453,16 @@ var require_recursive2 = __commonJS({
|
|
|
195406
195453
|
}
|
|
195407
195454
|
function getAllProjects(manifestsByPath, allProjectsGraph, sort) {
|
|
195408
195455
|
const chunks = sort !== false ? (0, sort_packages_1.sortPackages)(allProjectsGraph) : [Object.keys(allProjectsGraph).sort()];
|
|
195409
|
-
return chunks.map((prefixes, buildIndex) => prefixes.map((rootDir) =>
|
|
195410
|
-
|
|
195411
|
-
|
|
195412
|
-
|
|
195413
|
-
|
|
195414
|
-
|
|
195456
|
+
return chunks.map((prefixes, buildIndex) => prefixes.map((rootDir) => {
|
|
195457
|
+
const { rootDirRealPath, modulesDir } = allProjectsGraph[rootDir].package;
|
|
195458
|
+
return {
|
|
195459
|
+
buildIndex,
|
|
195460
|
+
manifest: manifestsByPath[rootDir].manifest,
|
|
195461
|
+
rootDir,
|
|
195462
|
+
rootDirRealPath,
|
|
195463
|
+
modulesDir
|
|
195464
|
+
};
|
|
195465
|
+
})).flat();
|
|
195415
195466
|
}
|
|
195416
195467
|
function getManifestsByPath(projects) {
|
|
195417
195468
|
return projects.reduce((manifestsByPath, { rootDir, manifest, writeProjectManifest }) => {
|
|
@@ -216889,6 +216940,10 @@ var require_deploy = __commonJS({
|
|
|
216889
216940
|
await fs_1.default.promises.mkdir(deployDir, { recursive: true });
|
|
216890
216941
|
const includeOnlyPackageFiles = !opts.deployAllFiles;
|
|
216891
216942
|
await copyProject(deployedDir, deployDir, { includeOnlyPackageFiles });
|
|
216943
|
+
const deployedProject = opts.allProjects?.find(({ rootDir }) => rootDir === deployedDir);
|
|
216944
|
+
if (deployedProject) {
|
|
216945
|
+
deployedProject.modulesDir = path_1.default.relative(deployedDir, path_1.default.join(deployDir, "node_modules"));
|
|
216946
|
+
}
|
|
216892
216947
|
await plugin_commands_installation_1.install.handler({
|
|
216893
216948
|
...opts,
|
|
216894
216949
|
confirmModulesPurge: false,
|
|
@@ -216910,7 +216965,7 @@ var require_deploy = __commonJS({
|
|
|
216910
216965
|
preferFrozenLockfile: false,
|
|
216911
216966
|
saveLockfile: false,
|
|
216912
216967
|
virtualStoreDir: path_1.default.join(deployDir, "node_modules/.pnpm"),
|
|
216913
|
-
modulesDir: path_1.default.relative(
|
|
216968
|
+
modulesDir: path_1.default.relative(opts.workspaceDir, path_1.default.join(deployDir, "node_modules")),
|
|
216914
216969
|
rawLocalConfig: {
|
|
216915
216970
|
...opts.rawLocalConfig,
|
|
216916
216971
|
// This is a workaround to prevent frozen install in CI envs.
|
|
@@ -216970,6 +217025,263 @@ var require_lib164 = __commonJS({
|
|
|
216970
217025
|
}
|
|
216971
217026
|
});
|
|
216972
217027
|
|
|
217028
|
+
// ../node_modules/.pnpm/@pnpm+logger@5.2.0/node_modules/@pnpm/logger/lib/logger.js
|
|
217029
|
+
var require_logger3 = __commonJS({
|
|
217030
|
+
"../node_modules/.pnpm/@pnpm+logger@5.2.0/node_modules/@pnpm/logger/lib/logger.js"(exports2) {
|
|
217031
|
+
"use strict";
|
|
217032
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
217033
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
217034
|
+
};
|
|
217035
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
217036
|
+
exports2.globalInfo = exports2.globalWarn = exports2.logger = void 0;
|
|
217037
|
+
var bole_1 = __importDefault2(require_bole());
|
|
217038
|
+
bole_1.default.setFastTime();
|
|
217039
|
+
exports2.logger = (0, bole_1.default)("pnpm");
|
|
217040
|
+
var globalLogger = (0, bole_1.default)("pnpm:global");
|
|
217041
|
+
function globalWarn(message2) {
|
|
217042
|
+
globalLogger.warn(message2);
|
|
217043
|
+
}
|
|
217044
|
+
exports2.globalWarn = globalWarn;
|
|
217045
|
+
function globalInfo(message2) {
|
|
217046
|
+
globalLogger.info(message2);
|
|
217047
|
+
}
|
|
217048
|
+
exports2.globalInfo = globalInfo;
|
|
217049
|
+
}
|
|
217050
|
+
});
|
|
217051
|
+
|
|
217052
|
+
// ../node_modules/.pnpm/@pnpm+logger@5.2.0/node_modules/@pnpm/logger/lib/streamParser.js
|
|
217053
|
+
var require_streamParser2 = __commonJS({
|
|
217054
|
+
"../node_modules/.pnpm/@pnpm+logger@5.2.0/node_modules/@pnpm/logger/lib/streamParser.js"(exports2) {
|
|
217055
|
+
"use strict";
|
|
217056
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
217057
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
217058
|
+
};
|
|
217059
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
217060
|
+
exports2.createStreamParser = exports2.streamParser = void 0;
|
|
217061
|
+
var bole_1 = __importDefault2(require_bole());
|
|
217062
|
+
var ndjson_1 = __importDefault2(require_ndjson());
|
|
217063
|
+
exports2.streamParser = createStreamParser();
|
|
217064
|
+
function createStreamParser() {
|
|
217065
|
+
const sp = ndjson_1.default.parse();
|
|
217066
|
+
bole_1.default.output([
|
|
217067
|
+
{
|
|
217068
|
+
level: "debug",
|
|
217069
|
+
stream: sp
|
|
217070
|
+
}
|
|
217071
|
+
]);
|
|
217072
|
+
return sp;
|
|
217073
|
+
}
|
|
217074
|
+
exports2.createStreamParser = createStreamParser;
|
|
217075
|
+
}
|
|
217076
|
+
});
|
|
217077
|
+
|
|
217078
|
+
// ../node_modules/.pnpm/@pnpm+logger@5.2.0/node_modules/@pnpm/logger/lib/writeToConsole.js
|
|
217079
|
+
var require_writeToConsole2 = __commonJS({
|
|
217080
|
+
"../node_modules/.pnpm/@pnpm+logger@5.2.0/node_modules/@pnpm/logger/lib/writeToConsole.js"(exports2) {
|
|
217081
|
+
"use strict";
|
|
217082
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
217083
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
217084
|
+
};
|
|
217085
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
217086
|
+
exports2.writeToConsole = void 0;
|
|
217087
|
+
var bole_1 = __importDefault2(require_bole());
|
|
217088
|
+
function writeToConsole() {
|
|
217089
|
+
bole_1.default.output([
|
|
217090
|
+
{
|
|
217091
|
+
level: "debug",
|
|
217092
|
+
stream: process.stdout
|
|
217093
|
+
}
|
|
217094
|
+
]);
|
|
217095
|
+
}
|
|
217096
|
+
exports2.writeToConsole = writeToConsole;
|
|
217097
|
+
}
|
|
217098
|
+
});
|
|
217099
|
+
|
|
217100
|
+
// ../node_modules/.pnpm/@pnpm+logger@5.2.0/node_modules/@pnpm/logger/lib/index.js
|
|
217101
|
+
var require_lib165 = __commonJS({
|
|
217102
|
+
"../node_modules/.pnpm/@pnpm+logger@5.2.0/node_modules/@pnpm/logger/lib/index.js"(exports2) {
|
|
217103
|
+
"use strict";
|
|
217104
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
217105
|
+
exports2.writeToConsole = exports2.streamParser = exports2.createStreamParser = exports2.globalWarn = exports2.globalInfo = exports2.logger = void 0;
|
|
217106
|
+
var logger_1 = require_logger3();
|
|
217107
|
+
Object.defineProperty(exports2, "logger", { enumerable: true, get: function() {
|
|
217108
|
+
return logger_1.logger;
|
|
217109
|
+
} });
|
|
217110
|
+
Object.defineProperty(exports2, "globalInfo", { enumerable: true, get: function() {
|
|
217111
|
+
return logger_1.globalInfo;
|
|
217112
|
+
} });
|
|
217113
|
+
Object.defineProperty(exports2, "globalWarn", { enumerable: true, get: function() {
|
|
217114
|
+
return logger_1.globalWarn;
|
|
217115
|
+
} });
|
|
217116
|
+
var streamParser_1 = require_streamParser2();
|
|
217117
|
+
Object.defineProperty(exports2, "createStreamParser", { enumerable: true, get: function() {
|
|
217118
|
+
return streamParser_1.createStreamParser;
|
|
217119
|
+
} });
|
|
217120
|
+
Object.defineProperty(exports2, "streamParser", { enumerable: true, get: function() {
|
|
217121
|
+
return streamParser_1.streamParser;
|
|
217122
|
+
} });
|
|
217123
|
+
var writeToConsole_1 = require_writeToConsole2();
|
|
217124
|
+
Object.defineProperty(exports2, "writeToConsole", { enumerable: true, get: function() {
|
|
217125
|
+
return writeToConsole_1.writeToConsole;
|
|
217126
|
+
} });
|
|
217127
|
+
}
|
|
217128
|
+
});
|
|
217129
|
+
|
|
217130
|
+
// ../tools/path/lib/index.js
|
|
217131
|
+
var require_lib166 = __commonJS({
|
|
217132
|
+
"../tools/path/lib/index.js"(exports2) {
|
|
217133
|
+
"use strict";
|
|
217134
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
217135
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
217136
|
+
};
|
|
217137
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
217138
|
+
exports2.getToolDirPath = getToolDirPath;
|
|
217139
|
+
var path_1 = __importDefault2(require("path"));
|
|
217140
|
+
function getToolDirPath(opts) {
|
|
217141
|
+
return path_1.default.join(opts.pnpmHomeDir, ".tools", opts.tool.name.replaceAll("/", "+"), opts.tool.version);
|
|
217142
|
+
}
|
|
217143
|
+
}
|
|
217144
|
+
});
|
|
217145
|
+
|
|
217146
|
+
// ../tools/plugin-commands-self-updater/lib/selfUpdate.js
|
|
217147
|
+
var require_selfUpdate = __commonJS({
|
|
217148
|
+
"../tools/plugin-commands-self-updater/lib/selfUpdate.js"(exports2) {
|
|
217149
|
+
"use strict";
|
|
217150
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
217151
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
217152
|
+
};
|
|
217153
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
217154
|
+
exports2.commandNames = void 0;
|
|
217155
|
+
exports2.rcOptionsTypes = rcOptionsTypes;
|
|
217156
|
+
exports2.cliOptionsTypes = cliOptionsTypes;
|
|
217157
|
+
exports2.help = help;
|
|
217158
|
+
exports2.handler = handler;
|
|
217159
|
+
var fs_1 = __importDefault2(require("fs"));
|
|
217160
|
+
var path_1 = __importDefault2(require("path"));
|
|
217161
|
+
var cli_utils_1 = require_lib35();
|
|
217162
|
+
var cli_meta_1 = require_lib5();
|
|
217163
|
+
var client_1 = require_lib90();
|
|
217164
|
+
var pick_registry_for_package_1 = require_lib91();
|
|
217165
|
+
var config_1 = require_lib23();
|
|
217166
|
+
var error_1 = require_lib7();
|
|
217167
|
+
var logger_1 = require_lib165();
|
|
217168
|
+
var plugin_commands_installation_1 = require_lib163();
|
|
217169
|
+
var read_project_manifest_1 = require_lib17();
|
|
217170
|
+
var tools_path_1 = require_lib166();
|
|
217171
|
+
var link_bins_1 = require_lib72();
|
|
217172
|
+
var pick_1 = __importDefault2(require_pick());
|
|
217173
|
+
var render_help_1 = __importDefault2(require_lib46());
|
|
217174
|
+
function rcOptionsTypes() {
|
|
217175
|
+
return (0, pick_1.default)([], config_1.types);
|
|
217176
|
+
}
|
|
217177
|
+
function cliOptionsTypes() {
|
|
217178
|
+
return {
|
|
217179
|
+
...rcOptionsTypes()
|
|
217180
|
+
};
|
|
217181
|
+
}
|
|
217182
|
+
exports2.commandNames = ["self-update"];
|
|
217183
|
+
function help() {
|
|
217184
|
+
return (0, render_help_1.default)({
|
|
217185
|
+
description: "Updates pnpm to the latest version",
|
|
217186
|
+
descriptionLists: [],
|
|
217187
|
+
url: (0, cli_utils_1.docsUrl)("self-update"),
|
|
217188
|
+
usages: []
|
|
217189
|
+
});
|
|
217190
|
+
}
|
|
217191
|
+
async function handler(opts) {
|
|
217192
|
+
if ((0, cli_meta_1.isExecutedByCorepack)()) {
|
|
217193
|
+
throw new error_1.PnpmError("CANT_SELF_UPDATE_IN_COREPACK", "You should update pnpm with corepack");
|
|
217194
|
+
}
|
|
217195
|
+
const { resolve } = (0, client_1.createResolver)({ ...opts, authConfig: opts.rawConfig });
|
|
217196
|
+
const pkgName = "pnpm";
|
|
217197
|
+
const resolution = await resolve({ alias: pkgName, pref: "latest" }, {
|
|
217198
|
+
lockfileDir: opts.lockfileDir ?? opts.dir,
|
|
217199
|
+
preferredVersions: {},
|
|
217200
|
+
projectDir: opts.dir,
|
|
217201
|
+
registry: (0, pick_registry_for_package_1.pickRegistryForPackage)(opts.registries, pkgName, "latest")
|
|
217202
|
+
});
|
|
217203
|
+
if (!resolution?.manifest) {
|
|
217204
|
+
throw new error_1.PnpmError("CANNOT_RESOLVE_PNPM", "Cannot find latest version of pnpm");
|
|
217205
|
+
}
|
|
217206
|
+
if (resolution.manifest.version === cli_meta_1.packageManager.version) {
|
|
217207
|
+
return `The currently active ${cli_meta_1.packageManager.name} v${cli_meta_1.packageManager.version} is already "latest" and doesn't need an update`;
|
|
217208
|
+
}
|
|
217209
|
+
if (opts.wantedPackageManager?.name === cli_meta_1.packageManager.name && opts.managePackageManagerVersions) {
|
|
217210
|
+
const { manifest, writeProjectManifest } = await (0, read_project_manifest_1.readProjectManifest)(opts.rootProjectManifestDir);
|
|
217211
|
+
manifest.packageManager = `pnpm@${resolution.manifest.version}`;
|
|
217212
|
+
await writeProjectManifest(manifest);
|
|
217213
|
+
return `The current project has been updated to use pnpm v${resolution.manifest.version}`;
|
|
217214
|
+
}
|
|
217215
|
+
const currentPkgName = (0, cli_meta_1.getCurrentPackageName)();
|
|
217216
|
+
const dir = (0, tools_path_1.getToolDirPath)({
|
|
217217
|
+
pnpmHomeDir: opts.pnpmHomeDir,
|
|
217218
|
+
tool: {
|
|
217219
|
+
name: currentPkgName,
|
|
217220
|
+
version: resolution.manifest.version
|
|
217221
|
+
}
|
|
217222
|
+
});
|
|
217223
|
+
if (fs_1.default.existsSync(dir)) {
|
|
217224
|
+
await (0, link_bins_1.linkBins)(path_1.default.join(dir, opts.modulesDir ?? "node_modules"), opts.pnpmHomeDir, {
|
|
217225
|
+
warn: logger_1.globalWarn
|
|
217226
|
+
});
|
|
217227
|
+
return `The latest version, v${resolution.manifest.version}, is already present on the system. It was activated by linking it from ${dir}.`;
|
|
217228
|
+
}
|
|
217229
|
+
fs_1.default.mkdirSync(dir, { recursive: true });
|
|
217230
|
+
fs_1.default.writeFileSync(path_1.default.join(dir, "package.json"), "{}");
|
|
217231
|
+
await plugin_commands_installation_1.add.handler({
|
|
217232
|
+
...opts,
|
|
217233
|
+
dir,
|
|
217234
|
+
lockfileDir: dir,
|
|
217235
|
+
bin: opts.pnpmHomeDir
|
|
217236
|
+
}, [`${currentPkgName}@${resolution.manifest.version}`]);
|
|
217237
|
+
return void 0;
|
|
217238
|
+
}
|
|
217239
|
+
}
|
|
217240
|
+
});
|
|
217241
|
+
|
|
217242
|
+
// ../tools/plugin-commands-self-updater/lib/index.js
|
|
217243
|
+
var require_lib167 = __commonJS({
|
|
217244
|
+
"../tools/plugin-commands-self-updater/lib/index.js"(exports2) {
|
|
217245
|
+
"use strict";
|
|
217246
|
+
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
217247
|
+
if (k2 === void 0)
|
|
217248
|
+
k2 = k;
|
|
217249
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
217250
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
217251
|
+
desc = { enumerable: true, get: function() {
|
|
217252
|
+
return m[k];
|
|
217253
|
+
} };
|
|
217254
|
+
}
|
|
217255
|
+
Object.defineProperty(o, k2, desc);
|
|
217256
|
+
} : function(o, m, k, k2) {
|
|
217257
|
+
if (k2 === void 0)
|
|
217258
|
+
k2 = k;
|
|
217259
|
+
o[k2] = m[k];
|
|
217260
|
+
});
|
|
217261
|
+
var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
|
|
217262
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
217263
|
+
} : function(o, v) {
|
|
217264
|
+
o["default"] = v;
|
|
217265
|
+
});
|
|
217266
|
+
var __importStar3 = exports2 && exports2.__importStar || function(mod) {
|
|
217267
|
+
if (mod && mod.__esModule)
|
|
217268
|
+
return mod;
|
|
217269
|
+
var result2 = {};
|
|
217270
|
+
if (mod != null) {
|
|
217271
|
+
for (var k in mod)
|
|
217272
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
217273
|
+
__createBinding3(result2, mod, k);
|
|
217274
|
+
}
|
|
217275
|
+
__setModuleDefault3(result2, mod);
|
|
217276
|
+
return result2;
|
|
217277
|
+
};
|
|
217278
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
217279
|
+
exports2.selfUpdate = void 0;
|
|
217280
|
+
var selfUpdate = __importStar3(require_selfUpdate());
|
|
217281
|
+
exports2.selfUpdate = selfUpdate;
|
|
217282
|
+
}
|
|
217283
|
+
});
|
|
217284
|
+
|
|
216973
217285
|
// ../reviewing/plugin-commands-listing/lib/recursive.js
|
|
216974
217286
|
var require_recursive3 = __commonJS({
|
|
216975
217287
|
"../reviewing/plugin-commands-listing/lib/recursive.js"(exports2) {
|
|
@@ -217345,7 +217657,7 @@ For example: pnpm why babel-* eslint-*`,
|
|
|
217345
217657
|
});
|
|
217346
217658
|
|
|
217347
217659
|
// ../reviewing/plugin-commands-listing/lib/index.js
|
|
217348
|
-
var
|
|
217660
|
+
var require_lib168 = __commonJS({
|
|
217349
217661
|
"../reviewing/plugin-commands-listing/lib/index.js"(exports2) {
|
|
217350
217662
|
"use strict";
|
|
217351
217663
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -217804,7 +218116,7 @@ var require_licenses = __commonJS({
|
|
|
217804
218116
|
});
|
|
217805
218117
|
|
|
217806
218118
|
// ../reviewing/license-scanner/lib/index.js
|
|
217807
|
-
var
|
|
218119
|
+
var require_lib169 = __commonJS({
|
|
217808
218120
|
"../reviewing/license-scanner/lib/index.js"(exports2) {
|
|
217809
218121
|
"use strict";
|
|
217810
218122
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -217967,7 +218279,7 @@ var require_licensesList = __commonJS({
|
|
|
217967
218279
|
var store_path_1 = require_lib81();
|
|
217968
218280
|
var constants_1 = require_lib6();
|
|
217969
218281
|
var lockfile_fs_1 = require_lib99();
|
|
217970
|
-
var license_scanner_1 =
|
|
218282
|
+
var license_scanner_1 = require_lib169();
|
|
217971
218283
|
var outputRenderer_1 = require_outputRenderer();
|
|
217972
218284
|
async function licensesList(opts) {
|
|
217973
218285
|
const lockfile = await (0, lockfile_fs_1.readWantedLockfile)(opts.lockfileDir ?? opts.dir, {
|
|
@@ -218109,7 +218421,7 @@ var require_licenses2 = __commonJS({
|
|
|
218109
218421
|
});
|
|
218110
218422
|
|
|
218111
218423
|
// ../reviewing/plugin-commands-licenses/lib/index.js
|
|
218112
|
-
var
|
|
218424
|
+
var require_lib170 = __commonJS({
|
|
218113
218425
|
"../reviewing/plugin-commands-licenses/lib/index.js"(exports2) {
|
|
218114
218426
|
"use strict";
|
|
218115
218427
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -218655,7 +218967,7 @@ ${details}`;
|
|
|
218655
218967
|
});
|
|
218656
218968
|
|
|
218657
218969
|
// ../reviewing/plugin-commands-outdated/lib/index.js
|
|
218658
|
-
var
|
|
218970
|
+
var require_lib171 = __commonJS({
|
|
218659
218971
|
"../reviewing/plugin-commands-outdated/lib/index.js"(exports2) {
|
|
218660
218972
|
"use strict";
|
|
218661
218973
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -218746,7 +219058,7 @@ var require_overridePublishConfig = __commonJS({
|
|
|
218746
219058
|
});
|
|
218747
219059
|
|
|
218748
219060
|
// ../pkg-manifest/exportable-manifest/lib/index.js
|
|
218749
|
-
var
|
|
219061
|
+
var require_lib172 = __commonJS({
|
|
218750
219062
|
"../pkg-manifest/exportable-manifest/lib/index.js"(exports2) {
|
|
218751
219063
|
"use strict";
|
|
218752
219064
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -220451,7 +220763,7 @@ var require_pack3 = __commonJS({
|
|
|
220451
220763
|
var error_1 = require_lib7();
|
|
220452
220764
|
var config_1 = require_lib23();
|
|
220453
220765
|
var cli_utils_1 = require_lib35();
|
|
220454
|
-
var exportable_manifest_1 =
|
|
220766
|
+
var exportable_manifest_1 = require_lib172();
|
|
220455
220767
|
var fs_packlist_1 = require_lib74();
|
|
220456
220768
|
var package_bins_1 = require_lib47();
|
|
220457
220769
|
var fast_glob_1 = __importDefault2(require_out4());
|
|
@@ -220619,7 +220931,7 @@ var require_pack3 = __commonJS({
|
|
|
220619
220931
|
});
|
|
220620
220932
|
|
|
220621
220933
|
// ../releasing/plugin-commands-publishing/lib/index.js
|
|
220622
|
-
var
|
|
220934
|
+
var require_lib173 = __commonJS({
|
|
220623
220935
|
"../releasing/plugin-commands-publishing/lib/index.js"(exports2) {
|
|
220624
220936
|
"use strict";
|
|
220625
220937
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -221048,7 +221360,6 @@ var require_stateFile = __commonJS({
|
|
|
221048
221360
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
221049
221361
|
exports2.readEditDirState = readEditDirState;
|
|
221050
221362
|
exports2.writeEditDirState = writeEditDirState;
|
|
221051
|
-
exports2.deleteEditDirState = deleteEditDirState;
|
|
221052
221363
|
var fs_1 = __importDefault2(require("fs"));
|
|
221053
221364
|
var path_1 = __importDefault2(require("path"));
|
|
221054
221365
|
var util_1 = __importDefault2(require("util"));
|
|
@@ -221069,12 +221380,6 @@ var require_stateFile = __commonJS({
|
|
|
221069
221380
|
};
|
|
221070
221381
|
});
|
|
221071
221382
|
}
|
|
221072
|
-
function deleteEditDirState(opts) {
|
|
221073
|
-
modifyStateFile(opts.modulesDir, (state) => {
|
|
221074
|
-
const key = createEditDirKey(opts);
|
|
221075
|
-
delete state[key];
|
|
221076
|
-
});
|
|
221077
|
-
}
|
|
221078
221383
|
function modifyStateFile(modulesDir, modifyState) {
|
|
221079
221384
|
const filePath = getStateFilePath(modulesDir);
|
|
221080
221385
|
let state = readStateFile(modulesDir);
|
|
@@ -221184,7 +221489,7 @@ var require_patch2 = __commonJS({
|
|
|
221184
221489
|
await (0, writePackage_1.writePackage)(patchedDep, editDir, opts);
|
|
221185
221490
|
(0, stateFile_1.writeEditDirState)({
|
|
221186
221491
|
editDir,
|
|
221187
|
-
modulesDir: opts.modulesDir ?? "node_modules",
|
|
221492
|
+
modulesDir: path_1.default.join(opts.dir, opts.modulesDir ?? "node_modules"),
|
|
221188
221493
|
patchedPkg: params[0],
|
|
221189
221494
|
applyToAll: patchedDep.applyToAll
|
|
221190
221495
|
});
|
|
@@ -221297,7 +221602,7 @@ var require_patchCommit = __commonJS({
|
|
|
221297
221602
|
const editDir = path_1.default.resolve(opts.dir, userDir);
|
|
221298
221603
|
const stateValue = (0, stateFile_1.readEditDirState)({
|
|
221299
221604
|
editDir,
|
|
221300
|
-
modulesDir: opts.modulesDir ?? "node_modules"
|
|
221605
|
+
modulesDir: path_1.default.join(opts.dir, opts.modulesDir ?? "node_modules")
|
|
221301
221606
|
});
|
|
221302
221607
|
if (!stateValue) {
|
|
221303
221608
|
throw new error_1.PnpmError("INVALID_PATCH_DIR", `${userDir} is not a valid patch directory`, {
|
|
@@ -221320,10 +221625,6 @@ var require_patchCommit = __commonJS({
|
|
|
221320
221625
|
}
|
|
221321
221626
|
const srcDir = tempy_1.default.directory();
|
|
221322
221627
|
await (0, writePackage_1.writePackage)((0, parse_wanted_dependency_1.parseWantedDependency)(gitTarballUrl ? `${patchedPkgManifest.name}@${gitTarballUrl}` : nameAndVersion), srcDir, opts);
|
|
221323
|
-
(0, stateFile_1.deleteEditDirState)({
|
|
221324
|
-
editDir,
|
|
221325
|
-
modulesDir: opts.modulesDir ?? "node_modules"
|
|
221326
|
-
});
|
|
221327
221628
|
const patchedPkgDir = await preparePkgFilesForDiff(userDir);
|
|
221328
221629
|
const patchContent = await diffFolders(srcDir, patchedPkgDir);
|
|
221329
221630
|
if (patchedPkgDir !== userDir) {
|
|
@@ -221526,7 +221827,7 @@ var require_patchRemove = __commonJS({
|
|
|
221526
221827
|
});
|
|
221527
221828
|
|
|
221528
221829
|
// ../patching/plugin-commands-patching/lib/index.js
|
|
221529
|
-
var
|
|
221830
|
+
var require_lib174 = __commonJS({
|
|
221530
221831
|
"../patching/plugin-commands-patching/lib/index.js"(exports2) {
|
|
221531
221832
|
"use strict";
|
|
221532
221833
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -221573,7 +221874,7 @@ var require_lib171 = __commonJS({
|
|
|
221573
221874
|
});
|
|
221574
221875
|
|
|
221575
221876
|
// ../env/path/lib/index.js
|
|
221576
|
-
var
|
|
221877
|
+
var require_lib175 = __commonJS({
|
|
221577
221878
|
"../env/path/lib/index.js"(exports2) {
|
|
221578
221879
|
"use strict";
|
|
221579
221880
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -221605,7 +221906,7 @@ var require_makeEnv = __commonJS({
|
|
|
221605
221906
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
221606
221907
|
exports2.makeEnv = makeEnv;
|
|
221607
221908
|
var error_1 = require_lib7();
|
|
221608
|
-
var env_path_1 =
|
|
221909
|
+
var env_path_1 = require_lib175();
|
|
221609
221910
|
var path_1 = __importDefault2(require("path"));
|
|
221610
221911
|
function makeEnv(opts) {
|
|
221611
221912
|
for (const prependPath of opts.prependPaths) {
|
|
@@ -223225,7 +223526,7 @@ var require_exec = __commonJS({
|
|
|
223225
223526
|
var sort_packages_1 = require_lib128();
|
|
223226
223527
|
var execa_1 = __importDefault2(require_lib18());
|
|
223227
223528
|
var p_limit_12 = __importDefault2(require_p_limit());
|
|
223228
|
-
var env_path_1 =
|
|
223529
|
+
var env_path_1 = require_lib175();
|
|
223229
223530
|
var pick_1 = __importDefault2(require_pick());
|
|
223230
223531
|
var render_help_1 = __importDefault2(require_lib46());
|
|
223231
223532
|
var existsInDir_1 = require_existsInDir();
|
|
@@ -223641,7 +223942,7 @@ var require_test2 = __commonJS({
|
|
|
223641
223942
|
});
|
|
223642
223943
|
|
|
223643
223944
|
// ../exec/plugin-commands-script-runners/lib/index.js
|
|
223644
|
-
var
|
|
223945
|
+
var require_lib176 = __commonJS({
|
|
223645
223946
|
"../exec/plugin-commands-script-runners/lib/index.js"(exports2) {
|
|
223646
223947
|
"use strict";
|
|
223647
223948
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -224310,7 +224611,7 @@ var require_server = __commonJS({
|
|
|
224310
224611
|
});
|
|
224311
224612
|
|
|
224312
224613
|
// ../store/plugin-commands-server/lib/index.js
|
|
224313
|
-
var
|
|
224614
|
+
var require_lib177 = __commonJS({
|
|
224314
224615
|
"../store/plugin-commands-server/lib/index.js"(exports2) {
|
|
224315
224616
|
"use strict";
|
|
224316
224617
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -228168,7 +228469,7 @@ var require_string_prototype2 = __commonJS({
|
|
|
228168
228469
|
});
|
|
228169
228470
|
|
|
228170
228471
|
// ../node_modules/.pnpm/safe-execa@0.1.1/node_modules/safe-execa/lib/index.js
|
|
228171
|
-
var
|
|
228472
|
+
var require_lib178 = __commonJS({
|
|
228172
228473
|
"../node_modules/.pnpm/safe-execa@0.1.1/node_modules/safe-execa/lib/index.js"(exports2) {
|
|
228173
228474
|
"use strict";
|
|
228174
228475
|
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
@@ -228221,7 +228522,7 @@ var require_path_extender_windows = __commonJS({
|
|
|
228221
228522
|
var error_1 = require_lib53();
|
|
228222
228523
|
var string_prototype_matchall_1 = __importDefault2(require_string_prototype2());
|
|
228223
228524
|
var path_1 = require("path");
|
|
228224
|
-
var safe_execa_1 = __importDefault2(
|
|
228525
|
+
var safe_execa_1 = __importDefault2(require_lib178());
|
|
228225
228526
|
var BadEnvVariableError = class extends error_1.PnpmError {
|
|
228226
228527
|
constructor({ envName, wantedValue, currentValue }) {
|
|
228227
228528
|
super("BAD_ENV_FOUND", `Currently '${envName}' is set to '${wantedValue}'`);
|
|
@@ -228526,7 +228827,7 @@ source ${report.configFile.path}
|
|
|
228526
228827
|
});
|
|
228527
228828
|
|
|
228528
228829
|
// ../packages/plugin-commands-setup/lib/index.js
|
|
228529
|
-
var
|
|
228830
|
+
var require_lib179 = __commonJS({
|
|
228530
228831
|
"../packages/plugin-commands-setup/lib/index.js"(exports2) {
|
|
228531
228832
|
"use strict";
|
|
228532
228833
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -229497,7 +229798,7 @@ var require_store = __commonJS({
|
|
|
229497
229798
|
});
|
|
229498
229799
|
|
|
229499
229800
|
// ../store/plugin-commands-store/lib/index.js
|
|
229500
|
-
var
|
|
229801
|
+
var require_lib180 = __commonJS({
|
|
229501
229802
|
"../store/plugin-commands-store/lib/index.js"(exports2) {
|
|
229502
229803
|
"use strict";
|
|
229503
229804
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -229752,7 +230053,7 @@ var require_findHash = __commonJS({
|
|
|
229752
230053
|
});
|
|
229753
230054
|
|
|
229754
230055
|
// ../store/plugin-commands-store-inspecting/lib/index.js
|
|
229755
|
-
var
|
|
230056
|
+
var require_lib181 = __commonJS({
|
|
229756
230057
|
"../store/plugin-commands-store-inspecting/lib/index.js"(exports2) {
|
|
229757
230058
|
"use strict";
|
|
229758
230059
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -229928,7 +230229,7 @@ ${JSON.stringify(packageJson, null, 2)}`;
|
|
|
229928
230229
|
});
|
|
229929
230230
|
|
|
229930
230231
|
// ../packages/plugin-commands-init/lib/index.js
|
|
229931
|
-
var
|
|
230232
|
+
var require_lib182 = __commonJS({
|
|
229932
230233
|
"../packages/plugin-commands-init/lib/index.js"(exports2) {
|
|
229933
230234
|
"use strict";
|
|
229934
230235
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -230014,7 +230315,7 @@ var require_shorthands = __commonJS({
|
|
|
230014
230315
|
});
|
|
230015
230316
|
|
|
230016
230317
|
// ../cli/parse-cli-args/lib/index.js
|
|
230017
|
-
var
|
|
230318
|
+
var require_lib183 = __commonJS({
|
|
230018
230319
|
"../cli/parse-cli-args/lib/index.js"(exports2) {
|
|
230019
230320
|
"use strict";
|
|
230020
230321
|
var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -230219,7 +230520,7 @@ var require_parseCliArgs = __commonJS({
|
|
|
230219
230520
|
"use strict";
|
|
230220
230521
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
230221
230522
|
exports2.parseCliArgs = parseCliArgs;
|
|
230222
|
-
var parse_cli_args_1 =
|
|
230523
|
+
var parse_cli_args_1 = require_lib183();
|
|
230223
230524
|
var cmd_1 = require_cmd();
|
|
230224
230525
|
var shorthands_1 = require_shorthands();
|
|
230225
230526
|
var RENAMED_OPTIONS = {
|
|
@@ -230495,7 +230796,7 @@ var require_installTest = __commonJS({
|
|
|
230495
230796
|
exports2.handler = handler;
|
|
230496
230797
|
var cli_utils_1 = require_lib35();
|
|
230497
230798
|
var plugin_commands_installation_1 = require_lib163();
|
|
230498
|
-
var plugin_commands_script_runners_1 =
|
|
230799
|
+
var plugin_commands_script_runners_1 = require_lib176();
|
|
230499
230800
|
var render_help_1 = __importDefault2(require_lib46());
|
|
230500
230801
|
exports2.cliOptionsTypes = plugin_commands_installation_1.install.cliOptionsTypes;
|
|
230501
230802
|
exports2.rcOptionsTypes = plugin_commands_installation_1.install.rcOptionsTypes;
|
|
@@ -230744,18 +231045,19 @@ var require_cmd = __commonJS({
|
|
|
230744
231045
|
var plugin_commands_env_1 = require_lib82();
|
|
230745
231046
|
var plugin_commands_deploy_1 = require_lib164();
|
|
230746
231047
|
var plugin_commands_installation_1 = require_lib163();
|
|
230747
|
-
var
|
|
230748
|
-
var
|
|
230749
|
-
var
|
|
230750
|
-
var
|
|
230751
|
-
var
|
|
231048
|
+
var tools_plugin_commands_self_updater_1 = require_lib167();
|
|
231049
|
+
var plugin_commands_listing_1 = require_lib168();
|
|
231050
|
+
var plugin_commands_licenses_1 = require_lib170();
|
|
231051
|
+
var plugin_commands_outdated_1 = require_lib171();
|
|
231052
|
+
var plugin_commands_publishing_1 = require_lib173();
|
|
231053
|
+
var plugin_commands_patching_1 = require_lib174();
|
|
230752
231054
|
var plugin_commands_rebuild_1 = require_lib129();
|
|
230753
|
-
var plugin_commands_script_runners_1 =
|
|
230754
|
-
var plugin_commands_server_1 =
|
|
230755
|
-
var plugin_commands_setup_1 =
|
|
230756
|
-
var plugin_commands_store_1 =
|
|
230757
|
-
var plugin_commands_store_inspecting_1 =
|
|
230758
|
-
var plugin_commands_init_1 =
|
|
231055
|
+
var plugin_commands_script_runners_1 = require_lib176();
|
|
231056
|
+
var plugin_commands_server_1 = require_lib177();
|
|
231057
|
+
var plugin_commands_setup_1 = require_lib179();
|
|
231058
|
+
var plugin_commands_store_1 = require_lib180();
|
|
231059
|
+
var plugin_commands_store_inspecting_1 = require_lib181();
|
|
231060
|
+
var plugin_commands_init_1 = require_lib182();
|
|
230759
231061
|
var pick_1 = __importDefault2(require_pick());
|
|
230760
231062
|
var shorthands_1 = require_shorthands();
|
|
230761
231063
|
var parseCliArgs_1 = require_parseCliArgs();
|
|
@@ -230802,6 +231104,7 @@ var require_cmd = __commonJS({
|
|
|
230802
231104
|
plugin_commands_installation_1.fetch,
|
|
230803
231105
|
plugin_commands_completion_1.generateCompletion,
|
|
230804
231106
|
plugin_commands_installation_1.importCommand,
|
|
231107
|
+
tools_plugin_commands_self_updater_1.selfUpdate,
|
|
230805
231108
|
plugin_commands_init_1.init,
|
|
230806
231109
|
plugin_commands_installation_1.install,
|
|
230807
231110
|
installTest,
|
|
@@ -231009,7 +231312,8 @@ var require_switchCliVersion = __commonJS({
|
|
|
231009
231312
|
var path_1 = __importDefault2(require("path"));
|
|
231010
231313
|
var logger_1 = require_lib();
|
|
231011
231314
|
var cli_meta_1 = require_lib5();
|
|
231012
|
-
var env_path_1 =
|
|
231315
|
+
var env_path_1 = require_lib175();
|
|
231316
|
+
var tools_path_1 = require_lib166();
|
|
231013
231317
|
var cross_spawn_1 = __importDefault2(require_cross_spawn());
|
|
231014
231318
|
var semver_12 = __importDefault2(require_semver2());
|
|
231015
231319
|
var cmd_1 = require_cmd();
|
|
@@ -231021,8 +231325,14 @@ var require_switchCliVersion = __commonJS({
|
|
|
231021
231325
|
(0, logger_1.globalWarn)(`Cannot switch to pnpm@${pm.version}: "${pm.version}" is not a valid version`);
|
|
231022
231326
|
return;
|
|
231023
231327
|
}
|
|
231024
|
-
const pkgName = (0, cli_meta_1.
|
|
231025
|
-
const dir =
|
|
231328
|
+
const pkgName = (0, cli_meta_1.getCurrentPackageName)();
|
|
231329
|
+
const dir = (0, tools_path_1.getToolDirPath)({
|
|
231330
|
+
pnpmHomeDir: config.pnpmHomeDir,
|
|
231331
|
+
tool: {
|
|
231332
|
+
name: pkgName,
|
|
231333
|
+
version: pm.version
|
|
231334
|
+
}
|
|
231335
|
+
});
|
|
231026
231336
|
if (!fs_1.default.existsSync(dir)) {
|
|
231027
231337
|
fs_1.default.mkdirSync(dir, { recursive: true });
|
|
231028
231338
|
fs_1.default.writeFileSync(path_1.default.join(dir, "package.json"), "{}");
|
|
@@ -231043,11 +231353,6 @@ var require_switchCliVersion = __commonJS({
|
|
|
231043
231353
|
});
|
|
231044
231354
|
process.exit(status ?? 0);
|
|
231045
231355
|
}
|
|
231046
|
-
function getExePackageName() {
|
|
231047
|
-
const platform = process.platform === "win32" ? "win" : process.platform === "darwin" ? "macos" : process.platform;
|
|
231048
|
-
const arch = platform === "win" && process.arch === "ia32" ? "x86" : process.arch;
|
|
231049
|
-
return `@pnpm/${platform}-${arch}`;
|
|
231050
|
-
}
|
|
231051
231356
|
}
|
|
231052
231357
|
});
|
|
231053
231358
|
|
|
@@ -231136,7 +231441,7 @@ var require_main3 = __commonJS({
|
|
|
231136
231441
|
checkUnknownSetting: false,
|
|
231137
231442
|
ignoreNonAuthSettingsFromLocal: isDlxCommand
|
|
231138
231443
|
});
|
|
231139
|
-
if (!(0, cli_meta_1.isExecutedByCorepack)() && config.wantedPackageManager != null) {
|
|
231444
|
+
if (!(0, cli_meta_1.isExecutedByCorepack)() && cmd !== "setup" && config.wantedPackageManager != null) {
|
|
231140
231445
|
if (config.managePackageManagerVersions) {
|
|
231141
231446
|
await (0, switchCliVersion_1.switchCliVersion)(config);
|
|
231142
231447
|
} else {
|
|
@@ -231284,7 +231589,12 @@ var require_main3 = __commonJS({
|
|
|
231284
231589
|
if ("webcontainer" in process.versions) {
|
|
231285
231590
|
(0, logger_1.globalWarn)("Automatic installation of different Node.js versions is not supported in WebContainer");
|
|
231286
231591
|
} else {
|
|
231287
|
-
config.extraBinPaths = (await (0, plugin_commands_env_1.prepareExecutionEnv)(config, {
|
|
231592
|
+
config.extraBinPaths = (await (0, plugin_commands_env_1.prepareExecutionEnv)(config, {
|
|
231593
|
+
extraBinPaths: config.extraBinPaths,
|
|
231594
|
+
executionEnv: {
|
|
231595
|
+
nodeVersion: config.useNodeVersion
|
|
231596
|
+
}
|
|
231597
|
+
})).extraBinPaths;
|
|
231288
231598
|
config.nodeVersion = config.useNodeVersion;
|
|
231289
231599
|
}
|
|
231290
231600
|
}
|
package/dist/worker.js
CHANGED
|
@@ -10972,9 +10972,9 @@ var require_better_path_resolve = __commonJS({
|
|
|
10972
10972
|
}
|
|
10973
10973
|
});
|
|
10974
10974
|
|
|
10975
|
-
// ../node_modules/.pnpm/symlink-dir@6.0.
|
|
10975
|
+
// ../node_modules/.pnpm/symlink-dir@6.0.2/node_modules/symlink-dir/dist/index.js
|
|
10976
10976
|
var require_dist3 = __commonJS({
|
|
10977
|
-
"../node_modules/.pnpm/symlink-dir@6.0.
|
|
10977
|
+
"../node_modules/.pnpm/symlink-dir@6.0.2/node_modules/symlink-dir/dist/index.js"(exports2, module2) {
|
|
10978
10978
|
"use strict";
|
|
10979
10979
|
var betterPathResolve = require_better_path_resolve();
|
|
10980
10980
|
var fs_12 = require("fs");
|
|
@@ -10998,6 +10998,7 @@ var require_dist3 = __commonJS({
|
|
|
10998
10998
|
return forceSymlink(target, path, opts);
|
|
10999
10999
|
}
|
|
11000
11000
|
async function forceSymlink(target, path, opts) {
|
|
11001
|
+
let initialErr;
|
|
11001
11002
|
try {
|
|
11002
11003
|
await fs_12.promises.symlink(target, path, symlinkType);
|
|
11003
11004
|
return { reused: false };
|
|
@@ -11014,9 +11015,7 @@ var require_dist3 = __commonJS({
|
|
|
11014
11015
|
return { reused: false };
|
|
11015
11016
|
case "EEXIST":
|
|
11016
11017
|
case "EISDIR":
|
|
11017
|
-
|
|
11018
|
-
throw err;
|
|
11019
|
-
}
|
|
11018
|
+
initialErr = err;
|
|
11020
11019
|
break;
|
|
11021
11020
|
default:
|
|
11022
11021
|
throw err;
|
|
@@ -11026,6 +11025,9 @@ var require_dist3 = __commonJS({
|
|
|
11026
11025
|
try {
|
|
11027
11026
|
linkString = await fs_12.promises.readlink(path);
|
|
11028
11027
|
} catch (err) {
|
|
11028
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.overwrite) === false) {
|
|
11029
|
+
throw initialErr;
|
|
11030
|
+
}
|
|
11029
11031
|
const parentDir = pathLib.dirname(path);
|
|
11030
11032
|
let warn;
|
|
11031
11033
|
if (opts === null || opts === void 0 ? void 0 : opts.renameTried) {
|
|
@@ -11044,6 +11046,9 @@ var require_dist3 = __commonJS({
|
|
|
11044
11046
|
if (target === linkString) {
|
|
11045
11047
|
return { reused: true };
|
|
11046
11048
|
}
|
|
11049
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.overwrite) === false) {
|
|
11050
|
+
throw initialErr;
|
|
11051
|
+
}
|
|
11047
11052
|
await fs_12.promises.unlink(path);
|
|
11048
11053
|
return await forceSymlink(target, path, opts);
|
|
11049
11054
|
}
|
|
@@ -11060,10 +11065,12 @@ var require_dist3 = __commonJS({
|
|
|
11060
11065
|
symlinkDir2.sync = sync;
|
|
11061
11066
|
})(symlinkDir || (symlinkDir = {}));
|
|
11062
11067
|
function forceSymlinkSync(target, path, opts) {
|
|
11068
|
+
let initialErr;
|
|
11063
11069
|
try {
|
|
11064
11070
|
(0, fs_12.symlinkSync)(target, path, symlinkType);
|
|
11065
11071
|
return { reused: false };
|
|
11066
11072
|
} catch (err) {
|
|
11073
|
+
initialErr = err;
|
|
11067
11074
|
switch (err.code) {
|
|
11068
11075
|
case "ENOENT":
|
|
11069
11076
|
try {
|
|
@@ -11076,9 +11083,6 @@ var require_dist3 = __commonJS({
|
|
|
11076
11083
|
return { reused: false };
|
|
11077
11084
|
case "EEXIST":
|
|
11078
11085
|
case "EISDIR":
|
|
11079
|
-
if ((opts === null || opts === void 0 ? void 0 : opts.overwrite) === false) {
|
|
11080
|
-
throw err;
|
|
11081
|
-
}
|
|
11082
11086
|
break;
|
|
11083
11087
|
default:
|
|
11084
11088
|
throw err;
|
|
@@ -11088,6 +11092,9 @@ var require_dist3 = __commonJS({
|
|
|
11088
11092
|
try {
|
|
11089
11093
|
linkString = (0, fs_12.readlinkSync)(path);
|
|
11090
11094
|
} catch (err) {
|
|
11095
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.overwrite) === false) {
|
|
11096
|
+
throw initialErr;
|
|
11097
|
+
}
|
|
11091
11098
|
const parentDir = pathLib.dirname(path);
|
|
11092
11099
|
let warn;
|
|
11093
11100
|
if (opts === null || opts === void 0 ? void 0 : opts.renameTried) {
|
|
@@ -11106,6 +11113,9 @@ var require_dist3 = __commonJS({
|
|
|
11106
11113
|
if (target === linkString) {
|
|
11107
11114
|
return { reused: true };
|
|
11108
11115
|
}
|
|
11116
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.overwrite) === false) {
|
|
11117
|
+
throw initialErr;
|
|
11118
|
+
}
|
|
11109
11119
|
(0, fs_12.unlinkSync)(path);
|
|
11110
11120
|
return forceSymlinkSync(target, path, opts);
|
|
11111
11121
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pnpm",
|
|
3
3
|
"description": "Fast, disk space efficient package manager",
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.9.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"pnpm": "bin/pnpm.cjs",
|
|
7
7
|
"pnpx": "bin/pnpx.cjs"
|
|
@@ -73,6 +73,8 @@
|
|
|
73
73
|
"@pnpm/tabtab": "catalog:",
|
|
74
74
|
"@pnpm/test-fixtures": "workspace:*",
|
|
75
75
|
"@pnpm/test-ipc-server": "workspace:*",
|
|
76
|
+
"@pnpm/tools.path": "workspace:*",
|
|
77
|
+
"@pnpm/tools.plugin-commands-self-updater": "workspace:*",
|
|
76
78
|
"@pnpm/types": "workspace:*",
|
|
77
79
|
"@pnpm/worker": "workspace:*",
|
|
78
80
|
"@pnpm/workspace.find-packages": "workspace:*",
|