pnpm 11.2.1 → 11.2.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/pnpm.mjs +56 -13
- package/package.json +1 -1
package/dist/pnpm.mjs
CHANGED
|
@@ -1800,7 +1800,7 @@ var init_lib5 = __esm({
|
|
|
1800
1800
|
"use strict";
|
|
1801
1801
|
defaultManifest = {
|
|
1802
1802
|
name: true ? "pnpm" : "pnpm",
|
|
1803
|
-
version: true ? "11.2.
|
|
1803
|
+
version: true ? "11.2.2" : "0.0.0"
|
|
1804
1804
|
};
|
|
1805
1805
|
pkgJson = defaultManifest;
|
|
1806
1806
|
packageManager = {
|
|
@@ -166517,8 +166517,9 @@ import readline2 from "node:readline";
|
|
|
166517
166517
|
function makeRunPacquet(opts2) {
|
|
166518
166518
|
return async (callOpts) => {
|
|
166519
166519
|
const pacquetBin = resolvePacquetBin(opts2.lockfileDir, opts2.packageName);
|
|
166520
|
-
const
|
|
166521
|
-
const
|
|
166520
|
+
const forwardedFlags = opts2.isInstallCommand ? collectForwardedFlags(opts2.argv) : [];
|
|
166521
|
+
const args = ["--reporter=ndjson", "install", "--frozen-lockfile", "--ignore-manifest-check", ...forwardedFlags];
|
|
166522
|
+
const droppedFlags = opts2.isInstallCommand ? [] : collectDroppedFlags(opts2.argv);
|
|
166522
166523
|
if (droppedFlags.length > 0) {
|
|
166523
166524
|
logger.warn({
|
|
166524
166525
|
message: `The following CLI flags are not forwarded to pacquet and may not be honored: ${droppedFlags.join(" ")}. Move the equivalent settings into pnpm-workspace.yaml (or .npmrc for auth/registry) if pacquet needs them.`,
|
|
@@ -166571,18 +166572,57 @@ function resolvePacquetBin(lockfileDir, packageName) {
|
|
|
166571
166572
|
const pacquetPkg = fs82.realpathSync(path150.join(lockfileDir, "node_modules/.pnpm-config", packageName, "package.json"));
|
|
166572
166573
|
return createRequire7(pacquetPkg).resolve(`@pacquet/${process.platform}-${process.arch}/pacquet${ext}`);
|
|
166573
166574
|
}
|
|
166575
|
+
function collectForwardedFlags(argv2) {
|
|
166576
|
+
const result2 = [];
|
|
166577
|
+
let positionalIdx = 0;
|
|
166578
|
+
for (let i2 = 0; i2 < argv2.original.length; i2++) {
|
|
166579
|
+
const arg = argv2.original[i2];
|
|
166580
|
+
if (positionalIdx < argv2.remain.length && arg === argv2.remain[positionalIdx]) {
|
|
166581
|
+
positionalIdx++;
|
|
166582
|
+
continue;
|
|
166583
|
+
}
|
|
166584
|
+
if (isAlwaysInjected(arg))
|
|
166585
|
+
continue;
|
|
166586
|
+
if (arg.startsWith("--reporter="))
|
|
166587
|
+
continue;
|
|
166588
|
+
if (arg === "--reporter") {
|
|
166589
|
+
i2++;
|
|
166590
|
+
continue;
|
|
166591
|
+
}
|
|
166592
|
+
result2.push(arg);
|
|
166593
|
+
}
|
|
166594
|
+
return result2;
|
|
166595
|
+
}
|
|
166596
|
+
function isAlwaysInjected(arg) {
|
|
166597
|
+
for (const name of ALWAYS_INJECTED_FLAGS) {
|
|
166598
|
+
if (arg === `--${name}` || arg === `--no-${name}`)
|
|
166599
|
+
return true;
|
|
166600
|
+
if (arg.startsWith(`--${name}=`) || arg.startsWith(`--no-${name}=`))
|
|
166601
|
+
return true;
|
|
166602
|
+
}
|
|
166603
|
+
return false;
|
|
166604
|
+
}
|
|
166574
166605
|
function collectDroppedFlags(argv2) {
|
|
166575
|
-
|
|
166606
|
+
const result2 = [];
|
|
166607
|
+
for (let i2 = 0; i2 < argv2.original.length; i2++) {
|
|
166608
|
+
const arg = argv2.original[i2];
|
|
166576
166609
|
if (!arg.startsWith("-"))
|
|
166577
|
-
|
|
166578
|
-
if (arg
|
|
166579
|
-
|
|
166610
|
+
continue;
|
|
166611
|
+
if (isAlwaysInjected(arg))
|
|
166612
|
+
continue;
|
|
166580
166613
|
if (arg.startsWith("--config."))
|
|
166581
|
-
|
|
166582
|
-
|
|
166583
|
-
|
|
166614
|
+
continue;
|
|
166615
|
+
if (arg.startsWith("--reporter="))
|
|
166616
|
+
continue;
|
|
166617
|
+
if (arg === "--reporter") {
|
|
166618
|
+
i2++;
|
|
166619
|
+
continue;
|
|
166620
|
+
}
|
|
166621
|
+
result2.push(arg);
|
|
166622
|
+
}
|
|
166623
|
+
return result2;
|
|
166584
166624
|
}
|
|
166585
|
-
var streamParserWritable;
|
|
166625
|
+
var streamParserWritable, ALWAYS_INJECTED_FLAGS;
|
|
166586
166626
|
var init_runPacquet = __esm({
|
|
166587
166627
|
"../installing/commands/lib/runPacquet.js"() {
|
|
166588
166628
|
"use strict";
|
|
@@ -166590,6 +166630,7 @@ var init_runPacquet = __esm({
|
|
|
166590
166630
|
init_lib3();
|
|
166591
166631
|
init_source2();
|
|
166592
166632
|
streamParserWritable = streamParser;
|
|
166633
|
+
ALWAYS_INJECTED_FLAGS = ["frozen-lockfile", "ignore-manifest-check"];
|
|
166593
166634
|
}
|
|
166594
166635
|
});
|
|
166595
166636
|
|
|
@@ -166629,7 +166670,8 @@ async function installDeps(opts2, params) {
|
|
|
166629
166670
|
const runPacquet = pacquetConfigDepName != null ? makeRunPacquet({
|
|
166630
166671
|
lockfileDir: opts2.lockfileDir ?? opts2.dir,
|
|
166631
166672
|
packageName: pacquetConfigDepName,
|
|
166632
|
-
argv: opts2.argv.original
|
|
166673
|
+
argv: { original: opts2.argv.original, remain: opts2.argv.remain ?? [] },
|
|
166674
|
+
isInstallCommand: opts2.isInstallCommand === true
|
|
166633
166675
|
}) : void 0;
|
|
166634
166676
|
const includeDirect = opts2.includeDirect ?? {
|
|
166635
166677
|
dependencies: true,
|
|
@@ -167626,7 +167668,8 @@ async function handler5(opts2, _params, commands2) {
|
|
|
167626
167668
|
frozenLockfileIfExists: opts2.frozenLockfileIfExists ?? (opts2.ci && !opts2.lockfileOnly && typeof opts2.frozenLockfile === "undefined" && typeof opts2.preferFrozenLockfile === "undefined"),
|
|
167627
167669
|
include,
|
|
167628
167670
|
includeDirect: include,
|
|
167629
|
-
fetchFullMetadata: getFetchFullMetadata(opts2)
|
|
167671
|
+
fetchFullMetadata: getFetchFullMetadata(opts2),
|
|
167672
|
+
isInstallCommand: true
|
|
167630
167673
|
};
|
|
167631
167674
|
if (opts2.resolutionOnly) {
|
|
167632
167675
|
installDepsOptions.lockfileOnly = true;
|