pnpm 7.18.0 → 7.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/.modules.yaml +2 -2
- package/dist/pnpm.cjs +76 -32
- package/package.json +1 -1
|
@@ -7,11 +7,11 @@ included:
|
|
|
7
7
|
injectedDeps: {}
|
|
8
8
|
layoutVersion: 5
|
|
9
9
|
nodeLinker: hoisted
|
|
10
|
-
packageManager: pnpm@7.
|
|
10
|
+
packageManager: pnpm@7.18.1
|
|
11
11
|
pendingBuilds:
|
|
12
12
|
- /node-gyp/9.3.0
|
|
13
13
|
- /encoding/0.1.13
|
|
14
|
-
prunedAt:
|
|
14
|
+
prunedAt: Mon, 12 Dec 2022 12:21:10 GMT
|
|
15
15
|
publicHoistPattern:
|
|
16
16
|
- '*eslint*'
|
|
17
17
|
- '*prettier*'
|
package/dist/pnpm.cjs
CHANGED
|
@@ -3224,7 +3224,7 @@ var require_lib4 = __commonJS({
|
|
|
3224
3224
|
var load_json_file_1 = __importDefault(require_load_json_file());
|
|
3225
3225
|
var defaultManifest = {
|
|
3226
3226
|
name: "pnpm" != null && true ? "pnpm" : "pnpm",
|
|
3227
|
-
version: "7.18.
|
|
3227
|
+
version: "7.18.2" != null && true ? "7.18.2" : "0.0.0"
|
|
3228
3228
|
};
|
|
3229
3229
|
var pkgJson;
|
|
3230
3230
|
if (require.main == null) {
|
|
@@ -44220,14 +44220,15 @@ var require_reportUpdateCheck = __commonJS({
|
|
|
44220
44220
|
var semver_12 = __importDefault(require_semver2());
|
|
44221
44221
|
function reportUpdateCheck(log$, opts) {
|
|
44222
44222
|
return log$.pipe((0, operators_1.take)(1), (0, operators_1.filter)((log2) => semver_12.default.gt(log2.latestVersion, log2.currentVersion)), (0, operators_1.map)((log2) => {
|
|
44223
|
-
const
|
|
44223
|
+
const updateMessage = renderUpdateMessage({
|
|
44224
|
+
currentPkgIsExecutable: detectIfCurrentPkgIsExecutable(opts.process),
|
|
44224
44225
|
latestVersion: log2.latestVersion,
|
|
44225
44226
|
env: opts.env
|
|
44226
44227
|
});
|
|
44227
44228
|
return Rx.of({
|
|
44228
44229
|
msg: (0, boxen_1.default)(`Update available! ${chalk_1.default.red(log2.currentVersion)} \u2192 ${chalk_1.default.green(log2.latestVersion)}.
|
|
44229
44230
|
${chalk_1.default.magenta("Changelog:")} https://github.com/pnpm/pnpm/releases/tag/v${log2.latestVersion}
|
|
44230
|
-
|
|
44231
|
+
${updateMessage}
|
|
44231
44232
|
|
|
44232
44233
|
Follow ${chalk_1.default.magenta("@pnpmjs")} for updates: https://twitter.com/pnpmjs`, {
|
|
44233
44234
|
padding: 1,
|
|
@@ -44240,13 +44241,23 @@ Follow ${chalk_1.default.magenta("@pnpmjs")} for updates: https://twitter.com/pn
|
|
|
44240
44241
|
}));
|
|
44241
44242
|
}
|
|
44242
44243
|
exports2.reportUpdateCheck = reportUpdateCheck;
|
|
44244
|
+
function renderUpdateMessage(opts) {
|
|
44245
|
+
if (opts.currentPkgIsExecutable && opts.env.PNPM_HOME) {
|
|
44246
|
+
return "Run a script from: https://pnpm.io/installation";
|
|
44247
|
+
}
|
|
44248
|
+
const updateCommand = renderUpdateCommand(opts);
|
|
44249
|
+
return `Run "${chalk_1.default.magenta(updateCommand)}" to update.`;
|
|
44250
|
+
}
|
|
44243
44251
|
function renderUpdateCommand(opts) {
|
|
44244
44252
|
if (opts.env.COREPACK_ROOT) {
|
|
44245
44253
|
return `corepack prepare pnpm@${opts.latestVersion} --activate`;
|
|
44246
44254
|
}
|
|
44247
|
-
const pkgName =
|
|
44255
|
+
const pkgName = opts.currentPkgIsExecutable ? "@pnpm/exe" : "pnpm";
|
|
44248
44256
|
return `pnpm add -g ${pkgName}`;
|
|
44249
44257
|
}
|
|
44258
|
+
function detectIfCurrentPkgIsExecutable(process2) {
|
|
44259
|
+
return process2["pkg"] != null;
|
|
44260
|
+
}
|
|
44250
44261
|
}
|
|
44251
44262
|
});
|
|
44252
44263
|
|
|
@@ -44611,6 +44622,7 @@ var require_lib23 = __commonJS({
|
|
|
44611
44622
|
cmd: opts.context.argv[0],
|
|
44612
44623
|
config: opts.context.config,
|
|
44613
44624
|
env: opts.context.env ?? process.env,
|
|
44625
|
+
process: opts.context.process ?? process,
|
|
44614
44626
|
isRecursive: opts.context.config?.["recursive"] === true,
|
|
44615
44627
|
logLevel: opts.reportingOptions?.logLevel,
|
|
44616
44628
|
pnpmConfig: opts.context.config,
|
|
@@ -78661,6 +78673,11 @@ var require_remoteTarballFetcher = __commonJS({
|
|
|
78661
78673
|
}
|
|
78662
78674
|
resolve({ filesIndex });
|
|
78663
78675
|
} catch (err) {
|
|
78676
|
+
if (err["code"] !== "ERR_PNPM_TARBALL_INTEGRITY" && err["code"] !== "ERR_PNPM_BAD_TARBALL_SIZE") {
|
|
78677
|
+
const extractError = new error_1.PnpmError("TARBALL_EXTRACT", `Failed to unpack the tarball from "${url}": ${err.message}`);
|
|
78678
|
+
reject(extractError);
|
|
78679
|
+
return;
|
|
78680
|
+
}
|
|
78664
78681
|
reject(err);
|
|
78665
78682
|
}
|
|
78666
78683
|
});
|
|
@@ -105535,8 +105552,9 @@ var require_audit2 = __commonJS({
|
|
|
105535
105552
|
var lockfile_file_1 = require_lib76();
|
|
105536
105553
|
var table_1 = require_dist13();
|
|
105537
105554
|
var chalk_1 = __importDefault(require_source());
|
|
105555
|
+
var difference_1 = __importDefault(require_difference());
|
|
105538
105556
|
var pick_1 = __importDefault(require_pick());
|
|
105539
|
-
var
|
|
105557
|
+
var pickBy_1 = __importDefault(require_pickBy());
|
|
105540
105558
|
var render_help_1 = __importDefault(require_lib34());
|
|
105541
105559
|
var fix_1 = require_fix();
|
|
105542
105560
|
var AUDIT_LEVEL_NUMBER = {
|
|
@@ -105684,6 +105702,10 @@ ${JSON.stringify(newOverrides, null, 2)}`
|
|
|
105684
105702
|
}
|
|
105685
105703
|
const vulnerabilities = auditReport.metadata.vulnerabilities;
|
|
105686
105704
|
const totalVulnerabilityCount = Object.values(vulnerabilities).reduce((sum, vulnerabilitiesCount) => sum + vulnerabilitiesCount, 0);
|
|
105705
|
+
const ignoreCves = opts.rootProjectManifest?.pnpm?.auditConfig?.ignoreCves;
|
|
105706
|
+
if (ignoreCves) {
|
|
105707
|
+
auditReport.advisories = (0, pickBy_1.default)(({ cves }) => cves.length === 0 || (0, difference_1.default)(cves, ignoreCves).length > 0, auditReport.advisories);
|
|
105708
|
+
}
|
|
105687
105709
|
if (opts.json) {
|
|
105688
105710
|
return {
|
|
105689
105711
|
exitCode: totalVulnerabilityCount > 0 ? 1 : 0,
|
|
@@ -105693,10 +105715,6 @@ ${JSON.stringify(newOverrides, null, 2)}`
|
|
|
105693
105715
|
let output = "";
|
|
105694
105716
|
const auditLevel = AUDIT_LEVEL_NUMBER[opts.auditLevel ?? "low"];
|
|
105695
105717
|
let advisories = Object.values(auditReport.advisories);
|
|
105696
|
-
const ignoreCves = opts.rootProjectManifest?.pnpm?.auditConfig?.ignoreCves;
|
|
105697
|
-
if (ignoreCves) {
|
|
105698
|
-
advisories = advisories.filter(({ cves }) => (0, ramda_1.difference)(cves, ignoreCves).length > 0);
|
|
105699
|
-
}
|
|
105700
105718
|
advisories = advisories.filter(({ severity }) => AUDIT_LEVEL_NUMBER[severity] >= auditLevel).sort((a1, a2) => AUDIT_LEVEL_NUMBER[a2.severity] - AUDIT_LEVEL_NUMBER[a1.severity]);
|
|
105701
105719
|
for (const advisory of advisories) {
|
|
105702
105720
|
output += (0, table_1.table)([
|
|
@@ -123051,6 +123069,8 @@ var require_runLifecycleHook = __commonJS({
|
|
|
123051
123069
|
var core_loggers_1 = require_lib9();
|
|
123052
123070
|
var logger_1 = require_lib6();
|
|
123053
123071
|
var npm_lifecycle_1 = __importDefault(require_npm_lifecycle());
|
|
123072
|
+
var error_1 = require_lib8();
|
|
123073
|
+
var fs_1 = require("fs");
|
|
123054
123074
|
function noop() {
|
|
123055
123075
|
}
|
|
123056
123076
|
async function runLifecycleHook(stage, manifest, opts) {
|
|
@@ -123058,6 +123078,9 @@ var require_runLifecycleHook = __commonJS({
|
|
|
123058
123078
|
const m = { _id: getId(manifest), ...manifest };
|
|
123059
123079
|
m.scripts = { ...m.scripts };
|
|
123060
123080
|
if (stage === "start" && !m.scripts.start) {
|
|
123081
|
+
if (!(0, fs_1.existsSync)("server.js")) {
|
|
123082
|
+
throw new error_1.PnpmError("NO_SCRIPT_OR_SERVER", "Missing script start or file server.js");
|
|
123083
|
+
}
|
|
123061
123084
|
m.scripts.start = "node server.js";
|
|
123062
123085
|
}
|
|
123063
123086
|
if (opts.args?.length && m.scripts?.[stage]) {
|
|
@@ -173887,7 +173910,7 @@ var require_getWantedDependencies = __commonJS({
|
|
|
173887
173910
|
nodeExecPath: opts.nodeExecPath ?? opts.dependenciesMeta[alias]?.node,
|
|
173888
173911
|
pinnedVersion: (0, which_version_is_pinned_1.whichVersionIsPinned)(pref),
|
|
173889
173912
|
pref: updatedPref,
|
|
173890
|
-
raw: `${alias}@${
|
|
173913
|
+
raw: `${alias}@${pref}`
|
|
173891
173914
|
};
|
|
173892
173915
|
});
|
|
173893
173916
|
}
|
|
@@ -178616,7 +178639,7 @@ var require_updateProjectManifest = __commonJS({
|
|
|
178616
178639
|
nodeExecPath: opts.nodeExecPath,
|
|
178617
178640
|
peer: importer["peer"],
|
|
178618
178641
|
pref,
|
|
178619
|
-
saveType:
|
|
178642
|
+
saveType: importer["targetDependenciesField"]
|
|
178620
178643
|
};
|
|
178621
178644
|
}
|
|
178622
178645
|
function getPrefPreferSpecifiedSpec(opts) {
|
|
@@ -178637,13 +178660,22 @@ var require_updateProjectManifest = __commonJS({
|
|
|
178637
178660
|
}
|
|
178638
178661
|
function getPrefPreferSpecifiedExoticSpec(opts) {
|
|
178639
178662
|
const prefix = (0, manifest_utils_1.getPrefix)(opts.alias, opts.name);
|
|
178640
|
-
if (opts.specRaw?.startsWith(`${opts.alias}@${prefix}`)
|
|
178641
|
-
|
|
178663
|
+
if (opts.specRaw?.startsWith(`${opts.alias}@${prefix}`)) {
|
|
178664
|
+
let specWithoutName = opts.specRaw.slice(`${opts.alias}@${prefix}`.length);
|
|
178665
|
+
if (specWithoutName.startsWith("workspace:")) {
|
|
178666
|
+
specWithoutName = specWithoutName.slice(10);
|
|
178667
|
+
if (specWithoutName === "*" || specWithoutName === "^" || specWithoutName === "~") {
|
|
178668
|
+
return specWithoutName;
|
|
178669
|
+
}
|
|
178670
|
+
}
|
|
178642
178671
|
const selector = (0, version_selector_type_1.default)(specWithoutName);
|
|
178643
|
-
if (!
|
|
178672
|
+
if (!selector) {
|
|
178644
178673
|
return opts.specRaw.slice(opts.alias.length + 1);
|
|
178645
178674
|
}
|
|
178646
178675
|
}
|
|
178676
|
+
if (semver_12.default.parse(opts.version)?.prerelease.length) {
|
|
178677
|
+
return `${prefix}${opts.version}`;
|
|
178678
|
+
}
|
|
178647
178679
|
return `${prefix}${(0, manifest_utils_1.createVersionSpec)(opts.version, { pinnedVersion: opts.pinnedVersion, rolling: opts.rolling })}`;
|
|
178648
178680
|
}
|
|
178649
178681
|
}
|
|
@@ -179086,7 +179118,7 @@ var require_parseWantedDependencies = __commonJS({
|
|
|
179086
179118
|
dev: Boolean(opts.dev || alias && !!opts.devDependencies[alias]),
|
|
179087
179119
|
optional: Boolean(opts.optional || alias && !!opts.optionalDependencies[alias]),
|
|
179088
179120
|
pinnedVersion,
|
|
179089
|
-
raw: rawWantedDependency
|
|
179121
|
+
raw: alias && opts.currentPrefs?.[alias]?.startsWith("workspace:") ? `${alias}@${opts.currentPrefs[alias]}` : rawWantedDependency
|
|
179090
179122
|
};
|
|
179091
179123
|
if (pref) {
|
|
179092
179124
|
return {
|
|
@@ -180218,7 +180250,8 @@ var require_createVersionsOverrider = __commonJS({
|
|
|
180218
180250
|
}
|
|
180219
180251
|
let linkFileTarget;
|
|
180220
180252
|
if (override.newPref.startsWith("file:")) {
|
|
180221
|
-
|
|
180253
|
+
const pkgPath = override.newPref.substring(5);
|
|
180254
|
+
linkFileTarget = path_1.default.isAbsolute(pkgPath) ? pkgPath : path_1.default.join(rootDir, pkgPath);
|
|
180222
180255
|
}
|
|
180223
180256
|
return {
|
|
180224
180257
|
...override,
|
|
@@ -181305,7 +181338,7 @@ var require_install = __commonJS({
|
|
|
181305
181338
|
projectsToInstall.push({
|
|
181306
181339
|
pruneDirectDependencies: false,
|
|
181307
181340
|
...project,
|
|
181308
|
-
wantedDependencies: wantedDeps.map((wantedDep) => ({ ...wantedDep, isNew:
|
|
181341
|
+
wantedDependencies: wantedDeps.map((wantedDep) => ({ ...wantedDep, isNew: !currentPrefs[wantedDep.alias], updateSpec: true, nodeExecPath: opts.nodeExecPath }))
|
|
181309
181342
|
});
|
|
181310
181343
|
}
|
|
181311
181344
|
const makePartialCurrentLockfile = !installsOnly && (ctx.existsWantedLockfile && !ctx.existsCurrentLockfile || !ctx.currentLockfileIsUpToDate);
|
|
@@ -182249,7 +182282,7 @@ var require_updateWorkspaceDependencies = __commonJS({
|
|
|
182249
182282
|
if (!workspacePackages[parsed.alias])
|
|
182250
182283
|
throw new error_1.PnpmError("WORKSPACE_PACKAGE_NOT_FOUND", `"${parsed.alias}" not found in the workspace`);
|
|
182251
182284
|
if (!parsed.pref)
|
|
182252
|
-
return `${parsed.alias}@workspace
|
|
182285
|
+
return `${parsed.alias}@workspace:>=0.0.0`;
|
|
182253
182286
|
if (parsed.pref.startsWith("workspace:"))
|
|
182254
182287
|
return spec;
|
|
182255
182288
|
return `${parsed.alias}@workspace:${parsed.pref}`;
|
|
@@ -200278,7 +200311,7 @@ var require_getPkgInfo2 = __commonJS({
|
|
|
200278
200311
|
if (pkg.files.local) {
|
|
200279
200312
|
licenseContents = await (0, promises_1.readFile)(licensePackageFileInfo);
|
|
200280
200313
|
} else {
|
|
200281
|
-
licenseContents = await readLicenseFileFromCafs(opts.cafsDir, licensePackageFileInfo
|
|
200314
|
+
licenseContents = await readLicenseFileFromCafs(opts.cafsDir, licensePackageFileInfo);
|
|
200282
200315
|
}
|
|
200283
200316
|
return {
|
|
200284
200317
|
name: "Unknown",
|
|
@@ -200288,8 +200321,8 @@ var require_getPkgInfo2 = __commonJS({
|
|
|
200288
200321
|
}
|
|
200289
200322
|
return { name: license ?? "Unknown" };
|
|
200290
200323
|
}
|
|
200291
|
-
async function readLicenseFileFromCafs(cafsDir,
|
|
200292
|
-
const fileName = (0, cafs_1.getFilePathByModeInCafs)(cafsDir,
|
|
200324
|
+
async function readLicenseFileFromCafs(cafsDir, { integrity, mode }) {
|
|
200325
|
+
const fileName = (0, cafs_1.getFilePathByModeInCafs)(cafsDir, integrity, mode);
|
|
200293
200326
|
const fileContents = await (0, promises_1.readFile)(fileName);
|
|
200294
200327
|
return fileContents;
|
|
200295
200328
|
}
|
|
@@ -200297,7 +200330,7 @@ var require_getPkgInfo2 = __commonJS({
|
|
|
200297
200330
|
const isPackageWithIntegrity = "integrity" in packageResolution;
|
|
200298
200331
|
let pkgIndexFilePath;
|
|
200299
200332
|
if (isPackageWithIntegrity) {
|
|
200300
|
-
pkgIndexFilePath =
|
|
200333
|
+
pkgIndexFilePath = (0, cafs_1.getFilePathInCafs)(opts.cafsDir, packageResolution.integrity, "index");
|
|
200301
200334
|
} else if (!packageResolution.type && packageResolution.tarball) {
|
|
200302
200335
|
const packageDirInStore = (0, dependency_path_1.depPathToFilename)(depPath.split("_")[0]);
|
|
200303
200336
|
pkgIndexFilePath = path_1.default.join(opts.storeDir, packageDirInStore, "integrity.json");
|
|
@@ -200341,7 +200374,7 @@ var require_getPkgInfo2 = __commonJS({
|
|
|
200341
200374
|
} else {
|
|
200342
200375
|
const packageFileIndex = packageFileIndexInfo.files;
|
|
200343
200376
|
const packageManifestFile = packageFileIndex["package.json"];
|
|
200344
|
-
packageManifestDir =
|
|
200377
|
+
packageManifestDir = (0, cafs_1.getFilePathByModeInCafs)(cafsDir, packageManifestFile.integrity, packageManifestFile.mode);
|
|
200345
200378
|
}
|
|
200346
200379
|
let manifest;
|
|
200347
200380
|
try {
|
|
@@ -200764,7 +200797,9 @@ var require_licenses2 = __commonJS({
|
|
|
200764
200797
|
exports2.completion = completion;
|
|
200765
200798
|
async function handler(opts, params = []) {
|
|
200766
200799
|
if (params.length === 0) {
|
|
200767
|
-
throw new error_1.PnpmError("LICENCES_NO_SUBCOMMAND", "Please specify the subcommand"
|
|
200800
|
+
throw new error_1.PnpmError("LICENCES_NO_SUBCOMMAND", "Please specify the subcommand", {
|
|
200801
|
+
hint: help()
|
|
200802
|
+
});
|
|
200768
200803
|
}
|
|
200769
200804
|
switch (params[0]) {
|
|
200770
200805
|
case "list":
|
|
@@ -201738,6 +201773,10 @@ var require_publish2 = __commonJS({
|
|
|
201738
201773
|
description: "Does everything a publish would do except actually publishing to the registry",
|
|
201739
201774
|
name: "--dry-run"
|
|
201740
201775
|
},
|
|
201776
|
+
{
|
|
201777
|
+
description: "Show information in JSON format",
|
|
201778
|
+
name: "--json"
|
|
201779
|
+
},
|
|
201741
201780
|
{
|
|
201742
201781
|
description: 'Registers the published package with the given tag. By default, the "latest" tag is used.',
|
|
201743
201782
|
name: "--tag <tag>"
|
|
@@ -209781,8 +209820,8 @@ var require_main2 = __commonJS({
|
|
|
209781
209820
|
cmd,
|
|
209782
209821
|
config
|
|
209783
209822
|
});
|
|
209823
|
+
global[exports2.REPORTER_INITIALIZED] = reporterType;
|
|
209784
209824
|
}
|
|
209785
|
-
global[exports2.REPORTER_INITIALIZED] = reporterType;
|
|
209786
209825
|
const selfUpdate = config.global && (cmd === "add" || cmd === "update") && cliParams.includes(cli_meta_1.packageManager.name);
|
|
209787
209826
|
if (selfUpdate) {
|
|
209788
209827
|
await cmd_1.pnpmCmds.server(config, ["stop"]);
|
|
@@ -209926,8 +209965,19 @@ var require_errorHandler = __commonJS({
|
|
|
209926
209965
|
var logger_1 = require_lib6();
|
|
209927
209966
|
var main_1 = require_main2();
|
|
209928
209967
|
function errorHandler(error) {
|
|
209968
|
+
if (error.name != null && error.name !== "pnpm" && !error.name.startsWith("pnpm:")) {
|
|
209969
|
+
try {
|
|
209970
|
+
error.name = "pnpm";
|
|
209971
|
+
} catch {
|
|
209972
|
+
}
|
|
209973
|
+
}
|
|
209929
209974
|
if (!global[main_1.REPORTER_INITIALIZED]) {
|
|
209930
|
-
console.log(
|
|
209975
|
+
console.log(JSON.stringify({
|
|
209976
|
+
error: {
|
|
209977
|
+
code: error.code ?? error.name,
|
|
209978
|
+
message: error.message
|
|
209979
|
+
}
|
|
209980
|
+
}, null, 2));
|
|
209931
209981
|
process.exitCode = 1;
|
|
209932
209982
|
return;
|
|
209933
209983
|
}
|
|
@@ -209935,12 +209985,6 @@ var require_errorHandler = __commonJS({
|
|
|
209935
209985
|
process.exitCode = 1;
|
|
209936
209986
|
return;
|
|
209937
209987
|
}
|
|
209938
|
-
if (error.name != null && error.name !== "pnpm" && !error.name.startsWith("pnpm:")) {
|
|
209939
|
-
try {
|
|
209940
|
-
error.name = "pnpm";
|
|
209941
|
-
} catch {
|
|
209942
|
-
}
|
|
209943
|
-
}
|
|
209944
209988
|
logger_1.logger.error(error, error);
|
|
209945
209989
|
setTimeout(() => process.exit(1), 0);
|
|
209946
209990
|
}
|