@pnpm/exe 11.0.0-rc.5 → 11.0.1
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 +156 -69
- package/package.json +10 -10
package/dist/pnpm.mjs
CHANGED
|
@@ -1000,7 +1000,7 @@ var init_lib2 = __esm({
|
|
|
1000
1000
|
"use strict";
|
|
1001
1001
|
defaultManifest = {
|
|
1002
1002
|
name: true ? "pnpm" : "pnpm",
|
|
1003
|
-
version: true ? "11.0.
|
|
1003
|
+
version: true ? "11.0.1" : "0.0.0"
|
|
1004
1004
|
};
|
|
1005
1005
|
pkgJson = defaultManifest;
|
|
1006
1006
|
packageManager = {
|
|
@@ -2090,11 +2090,12 @@ If you think that this is the case, then run "pnpm store prune" and rerun the co
|
|
|
2090
2090
|
});
|
|
2091
2091
|
|
|
2092
2092
|
// ../pkg-manifest/utils/lib/getAllDependenciesFromManifest.js
|
|
2093
|
-
function getAllDependenciesFromManifest(pkg) {
|
|
2093
|
+
function getAllDependenciesFromManifest(pkg, opts2) {
|
|
2094
2094
|
return {
|
|
2095
2095
|
...pkg.devDependencies,
|
|
2096
2096
|
...pkg.dependencies,
|
|
2097
|
-
...pkg.optionalDependencies
|
|
2097
|
+
...pkg.optionalDependencies,
|
|
2098
|
+
...opts2?.autoInstallPeers ? pkg.peerDependencies : {}
|
|
2098
2099
|
};
|
|
2099
2100
|
}
|
|
2100
2101
|
var init_getAllDependenciesFromManifest = __esm({
|
|
@@ -4294,11 +4295,12 @@ function filterDependenciesByType(manifest, include) {
|
|
|
4294
4295
|
...include.optionalDependencies ? manifest.optionalDependencies : {}
|
|
4295
4296
|
};
|
|
4296
4297
|
}
|
|
4297
|
-
function getAllDependenciesFromManifest2(manifest) {
|
|
4298
|
+
function getAllDependenciesFromManifest2(manifest, opts2) {
|
|
4298
4299
|
return {
|
|
4299
4300
|
...manifest.devDependencies,
|
|
4300
4301
|
...manifest.dependencies,
|
|
4301
|
-
...manifest.optionalDependencies
|
|
4302
|
+
...manifest.optionalDependencies,
|
|
4303
|
+
...opts2?.autoInstallPeers ? manifest.peerDependencies : {}
|
|
4302
4304
|
};
|
|
4303
4305
|
}
|
|
4304
4306
|
var init_lib9 = __esm({
|
|
@@ -12176,7 +12178,7 @@ var require_npa = __commonJS({
|
|
|
12176
12178
|
module2.exports.resolve = resolve3;
|
|
12177
12179
|
module2.exports.Result = Result;
|
|
12178
12180
|
var HostedGit2;
|
|
12179
|
-
var
|
|
12181
|
+
var semver51;
|
|
12180
12182
|
var path208;
|
|
12181
12183
|
var validatePackageName2;
|
|
12182
12184
|
var os15;
|
|
@@ -12431,9 +12433,9 @@ var require_npa = __commonJS({
|
|
|
12431
12433
|
const spec = res.rawSpec === "" ? "latest" : res.rawSpec;
|
|
12432
12434
|
res.saveSpec = null;
|
|
12433
12435
|
res.fetchSpec = spec;
|
|
12434
|
-
if (!
|
|
12435
|
-
const version2 =
|
|
12436
|
-
const range =
|
|
12436
|
+
if (!semver51) semver51 = require_semver2();
|
|
12437
|
+
const version2 = semver51.valid(spec, true);
|
|
12438
|
+
const range = semver51.validRange(spec, true);
|
|
12437
12439
|
if (version2) {
|
|
12438
12440
|
res.type = "version";
|
|
12439
12441
|
} else if (range) {
|
|
@@ -22826,7 +22828,7 @@ var require_lib6 = __commonJS({
|
|
|
22826
22828
|
var require_version_selector_type = __commonJS({
|
|
22827
22829
|
"../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/version-selector-type/3.0.0/bb5374a17b8844b39694ff4483fb613e6fef31ded46a26ae6d88676a1b27fe57/node_modules/version-selector-type/index.js"(exports2, module2) {
|
|
22828
22830
|
"use strict";
|
|
22829
|
-
var
|
|
22831
|
+
var semver51 = require_semver2();
|
|
22830
22832
|
module2.exports = (selector) => versionSelectorType3(true, selector);
|
|
22831
22833
|
module2.exports.strict = (selector) => versionSelectorType3(false, selector);
|
|
22832
22834
|
function versionSelectorType3(loose, selector) {
|
|
@@ -22834,13 +22836,13 @@ var require_version_selector_type = __commonJS({
|
|
|
22834
22836
|
throw new TypeError("`selector` should be a string");
|
|
22835
22837
|
}
|
|
22836
22838
|
let normalizedSelector;
|
|
22837
|
-
if (normalizedSelector =
|
|
22839
|
+
if (normalizedSelector = semver51.valid(selector, loose)) {
|
|
22838
22840
|
return {
|
|
22839
22841
|
normalized: normalizedSelector,
|
|
22840
22842
|
type: "version"
|
|
22841
22843
|
};
|
|
22842
22844
|
}
|
|
22843
|
-
if (normalizedSelector =
|
|
22845
|
+
if (normalizedSelector = semver51.validRange(selector, loose)) {
|
|
22844
22846
|
return {
|
|
22845
22847
|
normalized: normalizedSelector,
|
|
22846
22848
|
type: "range"
|
|
@@ -42164,6 +42166,9 @@ function assertValidWorkspaceManifestCatalogs(manifest) {
|
|
|
42164
42166
|
if (Array.isArray(catalog)) {
|
|
42165
42167
|
throw new InvalidWorkspaceManifestError(`Expected named catalog ${catalogName} to be an object, but found - array`);
|
|
42166
42168
|
}
|
|
42169
|
+
if (catalog === null) {
|
|
42170
|
+
throw new InvalidWorkspaceManifestError(`Expected named catalog ${catalogName} to be an object, but found - null`);
|
|
42171
|
+
}
|
|
42167
42172
|
if (typeof catalog !== "object") {
|
|
42168
42173
|
throw new InvalidWorkspaceManifestError(`Expected named catalog ${catalogName} to be an object, but found - ${typeof catalog}`);
|
|
42169
42174
|
}
|
|
@@ -46193,6 +46198,8 @@ async function extractZipToTarget(zipPath, basename2, targetDir, ignoreEntry) {
|
|
|
46193
46198
|
const basenamePrefix = basename2 === "" ? "" : `${basename2}/`;
|
|
46194
46199
|
const testEntry = toStatelessTester(ignoreEntry);
|
|
46195
46200
|
for (const entry of zip.getEntries()) {
|
|
46201
|
+
if (entry.isDirectory)
|
|
46202
|
+
continue;
|
|
46196
46203
|
const entryPath = entry.entryName;
|
|
46197
46204
|
validatePathSecurity(nodeDir, entryPath);
|
|
46198
46205
|
if (testEntry) {
|
|
@@ -156803,7 +156810,7 @@ async function mutateModules(projects, maybeOpts) {
|
|
|
156803
156810
|
});
|
|
156804
156811
|
}
|
|
156805
156812
|
async function installSome(project) {
|
|
156806
|
-
const currentBareSpecifiers = opts2.ignoreCurrentSpecifiers ? {} : getAllDependenciesFromManifest2(project.manifest);
|
|
156813
|
+
const currentBareSpecifiers = opts2.ignoreCurrentSpecifiers ? {} : getAllDependenciesFromManifest2(project.manifest, { autoInstallPeers: opts2.autoInstallPeers });
|
|
156807
156814
|
const optionalDependencies = project.targetDependenciesField ? {} : project.manifest.optionalDependencies ?? {};
|
|
156808
156815
|
const devDependencies = project.targetDependenciesField ? {} : project.manifest.devDependencies ?? {};
|
|
156809
156816
|
if (preferredSpecs == null) {
|
|
@@ -193975,7 +193982,7 @@ function createOverrides(advisories) {
|
|
|
193975
193982
|
continue;
|
|
193976
193983
|
entries.push([`${advisory.module_name}@${advisory.vulnerable_versions}`, caretRangeForPatched(advisory.patched_versions)]);
|
|
193977
193984
|
}
|
|
193978
|
-
return Object.fromEntries(entries);
|
|
193985
|
+
return sortDirectKeys(Object.fromEntries(entries));
|
|
193979
193986
|
}
|
|
193980
193987
|
function caretRangeForPatched(patchedRange) {
|
|
193981
193988
|
const min = import_semver36.default.minVersion(patchedRange);
|
|
@@ -194000,6 +194007,7 @@ var init_fix = __esm({
|
|
|
194000
194007
|
"use strict";
|
|
194001
194008
|
init_lib99();
|
|
194002
194009
|
init_lib140();
|
|
194010
|
+
init_lib76();
|
|
194003
194011
|
import_semver36 = __toESM(require_semver2(), 1);
|
|
194004
194012
|
}
|
|
194005
194013
|
});
|
|
@@ -195664,7 +195672,7 @@ async function walkStep(step2, parentPurl, depTypes, componentsMap, relationship
|
|
|
195664
195672
|
return;
|
|
195665
195673
|
const integrity = pkgSnapshot.resolution.integrity;
|
|
195666
195674
|
const resolution = pkgSnapshotToResolution(depPath, pkgSnapshot, opts2.registries);
|
|
195667
|
-
const tarballUrl = resolution.tarball;
|
|
195675
|
+
const tarballUrl = resolution.tarball ?? gitDownloadUrl(resolution);
|
|
195668
195676
|
let metadata = {};
|
|
195669
195677
|
if (metadataOpts) {
|
|
195670
195678
|
metadata = await getPkgMetadata(depPath, pkgSnapshot, opts2.registries, metadataOpts);
|
|
@@ -195684,6 +195692,13 @@ async function walkStep(step2, parentPurl, depTypes, componentsMap, relationship
|
|
|
195684
195692
|
await walkStep(subStep, purl, depTypes, componentsMap, relationships, opts2, metadataOpts);
|
|
195685
195693
|
}));
|
|
195686
195694
|
}
|
|
195695
|
+
function gitDownloadUrl(resolution) {
|
|
195696
|
+
if (resolution.type !== "git")
|
|
195697
|
+
return void 0;
|
|
195698
|
+
const needsGitPlusPrefix = resolution.repo.includes("://") && !resolution.repo.startsWith("git+");
|
|
195699
|
+
const prefix = needsGitPlusPrefix ? "git+" : "";
|
|
195700
|
+
return `${prefix}${resolution.repo}#${resolution.commit}`;
|
|
195701
|
+
}
|
|
195687
195702
|
var init_collectComponents = __esm({
|
|
195688
195703
|
"../deps/compliance/sbom/lib/collectComponents.js"() {
|
|
195689
195704
|
"use strict";
|
|
@@ -201647,6 +201662,7 @@ async function handler31(opts2, params) {
|
|
|
201647
201662
|
if (isExecutedByCorepack()) {
|
|
201648
201663
|
throw new PnpmError("CANT_SELF_UPDATE_IN_COREPACK", "You should update pnpm with corepack");
|
|
201649
201664
|
}
|
|
201665
|
+
globalInfo("Checking for updates...");
|
|
201650
201666
|
const { resolve: resolve3 } = createResolver2({ ...opts2, configByUri: opts2.configByUri });
|
|
201651
201667
|
const pkgName = "pnpm";
|
|
201652
201668
|
const bareSpecifier = params[0] ?? "latest";
|
|
@@ -201658,26 +201674,47 @@ async function handler31(opts2, params) {
|
|
|
201658
201674
|
if (!resolution?.manifest) {
|
|
201659
201675
|
throw new PnpmError("CANNOT_RESOLVE_PNPM", `Cannot find "${bareSpecifier}" version of pnpm`);
|
|
201660
201676
|
}
|
|
201677
|
+
const targetVersion = resolution.manifest.version;
|
|
201678
|
+
let previousVersion;
|
|
201679
|
+
if (opts2.wantedPackageManager?.name === packageManager.name) {
|
|
201680
|
+
if (opts2.wantedPackageManager.version !== targetVersion) {
|
|
201681
|
+
previousVersion = opts2.wantedPackageManager.version;
|
|
201682
|
+
}
|
|
201683
|
+
} else if (packageManager.version !== targetVersion) {
|
|
201684
|
+
previousVersion = packageManager.version;
|
|
201685
|
+
}
|
|
201686
|
+
const previousMajor = previousVersion != null ? import_semver43.default.coerce(previousVersion)?.major : void 0;
|
|
201687
|
+
const targetMajor = import_semver43.default.major(targetVersion);
|
|
201688
|
+
if (previousMajor != null && targetMajor > previousMajor) {
|
|
201689
|
+
const hint = MAJOR_UPGRADE_HINTS[targetMajor];
|
|
201690
|
+
if (hint)
|
|
201691
|
+
globalWarn(hint);
|
|
201692
|
+
}
|
|
201661
201693
|
if (opts2.wantedPackageManager?.name === packageManager.name) {
|
|
201662
201694
|
if (opts2.wantedPackageManager?.version !== resolution.manifest.version) {
|
|
201663
201695
|
const { manifest, writeProjectManifest: writeProjectManifest2 } = await readProjectManifest(opts2.rootProjectManifestDir);
|
|
201664
201696
|
if (manifest.devEngines?.packageManager) {
|
|
201665
|
-
|
|
201666
|
-
|
|
201667
|
-
|
|
201668
|
-
|
|
201669
|
-
|
|
201670
|
-
|
|
201671
|
-
|
|
201672
|
-
|
|
201673
|
-
|
|
201674
|
-
|
|
201675
|
-
|
|
201676
|
-
|
|
201677
|
-
|
|
201678
|
-
|
|
201679
|
-
|
|
201680
|
-
|
|
201697
|
+
let manifestChanged = false;
|
|
201698
|
+
const legacyPm = manifest.packageManager != null ? parsePackageManager(manifest.packageManager) : void 0;
|
|
201699
|
+
const legacyPinsPnpm = legacyPm?.name === "pnpm" && legacyPm.version != null;
|
|
201700
|
+
const devEnginesPm = manifest.devEngines.packageManager;
|
|
201701
|
+
const pnpmEntry = Array.isArray(devEnginesPm) ? devEnginesPm.find((e) => e.name === "pnpm") : devEnginesPm.name === "pnpm" ? devEnginesPm : void 0;
|
|
201702
|
+
if (pnpmEntry) {
|
|
201703
|
+
const updated = legacyPinsPnpm ? resolution.manifest.version : updateVersionConstraint(pnpmEntry.version, resolution.manifest.version);
|
|
201704
|
+
if (updated !== pnpmEntry.version) {
|
|
201705
|
+
pnpmEntry.version = updated;
|
|
201706
|
+
manifestChanged = true;
|
|
201707
|
+
}
|
|
201708
|
+
}
|
|
201709
|
+
if (legacyPinsPnpm) {
|
|
201710
|
+
const newLegacy = `pnpm@${resolution.manifest.version}`;
|
|
201711
|
+
if (manifest.packageManager !== newLegacy) {
|
|
201712
|
+
manifest.packageManager = newLegacy;
|
|
201713
|
+
manifestChanged = true;
|
|
201714
|
+
}
|
|
201715
|
+
}
|
|
201716
|
+
if (manifestChanged)
|
|
201717
|
+
await writeProjectManifest2(manifest);
|
|
201681
201718
|
const store2 = await createStoreController(opts2);
|
|
201682
201719
|
await resolvePackageManagerIntegrities(resolution.manifest.version, {
|
|
201683
201720
|
registries: opts2.registries,
|
|
@@ -201697,6 +201734,7 @@ async function handler31(opts2, params) {
|
|
|
201697
201734
|
if (resolution.manifest.version === packageManager.version) {
|
|
201698
201735
|
return `The currently active ${packageManager.name} v${packageManager.version} is already "${bareSpecifier}" and doesn't need an update`;
|
|
201699
201736
|
}
|
|
201737
|
+
globalInfo(`Updating pnpm from v${packageManager.version} to v${resolution.manifest.version}...`);
|
|
201700
201738
|
const store = await createStoreController(opts2);
|
|
201701
201739
|
const envLockfile = await resolvePackageManagerIntegrities(resolution.manifest.version, {
|
|
201702
201740
|
registries: opts2.registries,
|
|
@@ -201714,7 +201752,7 @@ async function handler31(opts2, params) {
|
|
|
201714
201752
|
if (alreadyExisted) {
|
|
201715
201753
|
return `The ${bareSpecifier} version, v${resolution.manifest.version}, is already present on the system. It was activated by linking it from ${baseDir}.`;
|
|
201716
201754
|
}
|
|
201717
|
-
return
|
|
201755
|
+
return `Successfully updated pnpm to v${resolution.manifest.version}`;
|
|
201718
201756
|
}
|
|
201719
201757
|
function updateVersionConstraint(current, newVersion) {
|
|
201720
201758
|
if (current == null)
|
|
@@ -201738,7 +201776,7 @@ function versionSpecFromPinned(version2, pinnedVersion) {
|
|
|
201738
201776
|
return version2;
|
|
201739
201777
|
}
|
|
201740
201778
|
}
|
|
201741
|
-
var import_semver43, commandNames31, skipPackageManagerCheck2;
|
|
201779
|
+
var import_semver43, commandNames31, MAJOR_UPGRADE_HINTS, skipPackageManagerCheck2;
|
|
201742
201780
|
var init_selfUpdate = __esm({
|
|
201743
201781
|
"../engine/pm/commands/lib/self-updater/selfUpdate.js"() {
|
|
201744
201782
|
"use strict";
|
|
@@ -201758,6 +201796,9 @@ var init_selfUpdate = __esm({
|
|
|
201758
201796
|
import_semver43 = __toESM(require_semver2(), 1);
|
|
201759
201797
|
init_installPnpm();
|
|
201760
201798
|
commandNames31 = ["self-update"];
|
|
201799
|
+
MAJOR_UPGRADE_HINTS = {
|
|
201800
|
+
11: "pnpm v11 removed or renamed several v10 settings. See https://pnpm.io/11.x/migration for migration instructions."
|
|
201801
|
+
};
|
|
201761
201802
|
skipPackageManagerCheck2 = true;
|
|
201762
201803
|
}
|
|
201763
201804
|
});
|
|
@@ -208116,17 +208157,17 @@ function help34() {
|
|
|
208116
208157
|
],
|
|
208117
208158
|
url: docsUrl("env"),
|
|
208118
208159
|
usages: [
|
|
208119
|
-
"pnpm env use --global
|
|
208160
|
+
"pnpm env use --global 24",
|
|
208120
208161
|
"pnpm env use --global lts",
|
|
208121
|
-
"pnpm env use --global
|
|
208162
|
+
"pnpm env use --global krypton",
|
|
208122
208163
|
"pnpm env use --global latest",
|
|
208123
|
-
"pnpm env use --global rc/
|
|
208164
|
+
"pnpm env use --global rc/24",
|
|
208124
208165
|
"pnpm env list",
|
|
208125
|
-
"pnpm env list
|
|
208166
|
+
"pnpm env list 24",
|
|
208126
208167
|
"pnpm env list lts",
|
|
208127
|
-
"pnpm env list
|
|
208168
|
+
"pnpm env list krypton",
|
|
208128
208169
|
"pnpm env list latest",
|
|
208129
|
-
"pnpm env list rc/
|
|
208170
|
+
"pnpm env list rc/24"
|
|
208130
208171
|
]
|
|
208131
208172
|
});
|
|
208132
208173
|
}
|
|
@@ -223301,7 +223342,7 @@ var require_npa2 = __commonJS({
|
|
|
223301
223342
|
var path208 = isWindows15 ? __require("node:path/win32") : __require("node:path");
|
|
223302
223343
|
var { homedir } = __require("node:os");
|
|
223303
223344
|
var HostedGit2 = require_lib12();
|
|
223304
|
-
var
|
|
223345
|
+
var semver51 = require_semver2();
|
|
223305
223346
|
var validatePackageName2 = require_lib22();
|
|
223306
223347
|
var { log: log3 } = require_lib10();
|
|
223307
223348
|
var hasSlashes = isWindows15 ? /\\|[/]/ : /[/]/;
|
|
@@ -223666,8 +223707,8 @@ var require_npa2 = __commonJS({
|
|
|
223666
223707
|
const spec = res.rawSpec.trim();
|
|
223667
223708
|
res.saveSpec = null;
|
|
223668
223709
|
res.fetchSpec = spec;
|
|
223669
|
-
const version2 =
|
|
223670
|
-
const range =
|
|
223710
|
+
const version2 = semver51.valid(spec, true);
|
|
223711
|
+
const range = semver51.validRange(spec, true);
|
|
223671
223712
|
if (version2) {
|
|
223672
223713
|
res.type = "version";
|
|
223673
223714
|
} else if (range) {
|
|
@@ -225945,9 +225986,9 @@ var require_get_options = __commonJS({
|
|
|
225945
225986
|
// ../../../../setup-pnpm/node_modules/.bin/store/v11/links/@npmcli/fs/5.0.0/4cafda806c7bf4ef531e7305fbcb8288c728be229f52fd03536e072af5fe3626/node_modules/@npmcli/fs/lib/common/node.js
|
|
225946
225987
|
var require_node2 = __commonJS({
|
|
225947
225988
|
"../../../../setup-pnpm/node_modules/.bin/store/v11/links/@npmcli/fs/5.0.0/4cafda806c7bf4ef531e7305fbcb8288c728be229f52fd03536e072af5fe3626/node_modules/@npmcli/fs/lib/common/node.js"(exports2, module2) {
|
|
225948
|
-
var
|
|
225989
|
+
var semver51 = require_semver2();
|
|
225949
225990
|
var satisfies3 = (range) => {
|
|
225950
|
-
return
|
|
225991
|
+
return semver51.satisfies(process.version, range, { includePrerelease: true });
|
|
225951
225992
|
};
|
|
225952
225993
|
module2.exports = {
|
|
225953
225994
|
satisfies: satisfies3
|
|
@@ -235673,7 +235714,7 @@ var require_spawn = __commonJS({
|
|
|
235673
235714
|
// ../../../../setup-pnpm/node_modules/.bin/store/v11/links/@npmcli/git/7.0.2/fcff604bc4ab9d779aa0cb3b1a89e49c8a830d5da2b6bf098a38c578a421b59e/node_modules/@npmcli/git/lib/lines-to-revs.js
|
|
235674
235715
|
var require_lines_to_revs = __commonJS({
|
|
235675
235716
|
"../../../../setup-pnpm/node_modules/.bin/store/v11/links/@npmcli/git/7.0.2/fcff604bc4ab9d779aa0cb3b1a89e49c8a830d5da2b6bf098a38c578a421b59e/node_modules/@npmcli/git/lib/lines-to-revs.js"(exports2, module2) {
|
|
235676
|
-
var
|
|
235717
|
+
var semver51 = require_semver2();
|
|
235677
235718
|
module2.exports = (lines) => finish(lines.reduce(linesToRevsReducer, {
|
|
235678
235719
|
versions: {},
|
|
235679
235720
|
"dist-tags": {},
|
|
@@ -235770,8 +235811,8 @@ var require_lines_to_revs = __commonJS({
|
|
|
235770
235811
|
revs.refs[doc.rawRef] = doc;
|
|
235771
235812
|
if (doc.type === "tag") {
|
|
235772
235813
|
const match = !doc.ref.endsWith("^{}") && doc.ref.match(/v?(\d+\.\d+\.\d+(?:[-+].+)?)$/);
|
|
235773
|
-
if (match &&
|
|
235774
|
-
revs.versions[
|
|
235814
|
+
if (match && semver51.valid(match[1], true)) {
|
|
235815
|
+
revs.versions[semver51.clean(match[1], true)] = doc;
|
|
235775
235816
|
}
|
|
235776
235817
|
}
|
|
235777
235818
|
return revs;
|
|
@@ -236029,7 +236070,7 @@ var require_dev_engines = __commonJS({
|
|
|
236029
236070
|
// ../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/npm-install-checks/8.0.0/8ae449895bd2a6446a641a7633b6e675f92cb82df40fe4e25fb59f55325ac30c/node_modules/npm-install-checks/lib/index.js
|
|
236030
236071
|
var require_lib43 = __commonJS({
|
|
236031
236072
|
"../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/npm-install-checks/8.0.0/8ae449895bd2a6446a641a7633b6e675f92cb82df40fe4e25fb59f55325ac30c/node_modules/npm-install-checks/lib/index.js"(exports2, module2) {
|
|
236032
|
-
var
|
|
236073
|
+
var semver51 = require_semver2();
|
|
236033
236074
|
var currentEnv = require_current_env();
|
|
236034
236075
|
var { checkDevEngines } = require_dev_engines();
|
|
236035
236076
|
var checkEngine2 = (target2, npmVer, nodeVer, force = false) => {
|
|
@@ -236039,8 +236080,8 @@ var require_lib43 = __commonJS({
|
|
|
236039
236080
|
if (!eng) {
|
|
236040
236081
|
return;
|
|
236041
236082
|
}
|
|
236042
|
-
const nodeFail = nodev && eng.node && !
|
|
236043
|
-
const npmFail = npmVer && eng.npm && !
|
|
236083
|
+
const nodeFail = nodev && eng.node && !semver51.satisfies(nodev, eng.node, opt);
|
|
236084
|
+
const npmFail = npmVer && eng.npm && !semver51.satisfies(npmVer, eng.npm, opt);
|
|
236044
236085
|
if (nodeFail || npmFail) {
|
|
236045
236086
|
throw Object.assign(new Error("Unsupported engine"), {
|
|
236046
236087
|
pkgid: target2._id,
|
|
@@ -236167,7 +236208,7 @@ var require_lib45 = __commonJS({
|
|
|
236167
236208
|
"../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/npm-pick-manifest/11.0.3/5ad64713f08c0dadca6f376eb2187b2fbcbe9469fdf3dfe99e5f5010003b82c0/node_modules/npm-pick-manifest/lib/index.js"(exports2, module2) {
|
|
236168
236209
|
"use strict";
|
|
236169
236210
|
var npa11 = require_npa2();
|
|
236170
|
-
var
|
|
236211
|
+
var semver51 = require_semver2();
|
|
236171
236212
|
var { checkEngine: checkEngine2 } = require_lib43();
|
|
236172
236213
|
var normalizeBin = require_lib44();
|
|
236173
236214
|
var engineOk = (manifest, npmVersion, nodeVersion) => {
|
|
@@ -236180,7 +236221,7 @@ var require_lib45 = __commonJS({
|
|
|
236180
236221
|
};
|
|
236181
236222
|
var isBefore = (verTimes, ver, time) => !verTimes || !verTimes[ver] || Date.parse(verTimes[ver]) <= time;
|
|
236182
236223
|
var avoidSemverOpt = { includePrerelease: true, loose: true };
|
|
236183
|
-
var shouldAvoid = (ver, avoid) => avoid &&
|
|
236224
|
+
var shouldAvoid = (ver, avoid) => avoid && semver51.satisfies(ver, avoid, avoidSemverOpt);
|
|
236184
236225
|
var decorateAvoid = (result2, avoid) => result2 && shouldAvoid(result2.version, avoid) ? { ...result2, _shouldAvoid: true } : result2;
|
|
236185
236226
|
var pickManifest = (packument, wanted, opts2) => {
|
|
236186
236227
|
const {
|
|
@@ -236246,13 +236287,13 @@ var require_lib45 = __commonJS({
|
|
|
236246
236287
|
}
|
|
236247
236288
|
}
|
|
236248
236289
|
if (wanted && type4 === "version") {
|
|
236249
|
-
const ver =
|
|
236290
|
+
const ver = semver51.clean(wanted, { loose: true });
|
|
236250
236291
|
const mani = versions[ver] || staged[ver] || restricted[ver];
|
|
236251
236292
|
return isBefore(verTimes, ver, time) ? decorateAvoid(mani, avoid) : null;
|
|
236252
236293
|
}
|
|
236253
236294
|
const range = type4 === "range" ? wanted : "*";
|
|
236254
236295
|
const defaultVer = distTags[defaultTag];
|
|
236255
|
-
if (defaultVer && (range === "*" ||
|
|
236296
|
+
if (defaultVer && (range === "*" || semver51.satisfies(defaultVer, range, { loose: true })) && !restricted[defaultVer] && !shouldAvoid(defaultVer, avoid)) {
|
|
236256
236297
|
const mani = versions[defaultVer];
|
|
236257
236298
|
const ok = mani && isBefore(verTimes, defaultVer, time) && engineOk(mani, npmVersion, nodeVersion) && !mani.deprecated && !staged[defaultVer];
|
|
236258
236299
|
if (ok) {
|
|
@@ -236271,7 +236312,7 @@ var require_lib45 = __commonJS({
|
|
|
236271
236312
|
});
|
|
236272
236313
|
}
|
|
236273
236314
|
const sortSemverOpt = { loose: true };
|
|
236274
|
-
const entries = allEntries.filter(([ver]) =>
|
|
236315
|
+
const entries = allEntries.filter(([ver]) => semver51.satisfies(ver, range, { loose: true })).sort((a2, b) => {
|
|
236275
236316
|
const [vera, mania] = a2;
|
|
236276
236317
|
const [verb, manib] = b;
|
|
236277
236318
|
const notavoida = !shouldAvoid(vera, avoid);
|
|
@@ -236284,7 +236325,7 @@ var require_lib45 = __commonJS({
|
|
|
236284
236325
|
const notdeprb = !manib.deprecated;
|
|
236285
236326
|
const enginea = engineOk(mania, npmVersion, nodeVersion);
|
|
236286
236327
|
const engineb = engineOk(manib, npmVersion, nodeVersion);
|
|
236287
|
-
return notavoidb - notavoida || notrestrb - notrestra || notstageb - notstagea || (notdeprb && engineb) - (notdepra && enginea) || engineb - enginea || notdeprb - notdepra ||
|
|
236328
|
+
return notavoidb - notavoida || notrestrb - notrestra || notstageb - notstagea || (notdeprb && engineb) - (notdepra && enginea) || engineb - enginea || notdeprb - notdepra || semver51.rcompare(vera, verb, sortSemverOpt);
|
|
236288
236329
|
});
|
|
236289
236330
|
return decorateAvoid(entries[0] && entries[0][1], avoid);
|
|
236290
236331
|
};
|
|
@@ -246854,7 +246895,7 @@ var require_publish = __commonJS({
|
|
|
246854
246895
|
var npa11 = require_npa2();
|
|
246855
246896
|
var PackageJson = require_lib47();
|
|
246856
246897
|
var { log: log3 } = require_lib10();
|
|
246857
|
-
var
|
|
246898
|
+
var semver51 = require_semver2();
|
|
246858
246899
|
var { URL: URL7 } = __require("node:url");
|
|
246859
246900
|
var ssri6 = require_lib6();
|
|
246860
246901
|
var ciInfo2 = require_ci_info();
|
|
@@ -246910,7 +246951,7 @@ Remove the 'private' field from the package.json to publish it.`),
|
|
|
246910
246951
|
manifestInput._npmVersion = npmVersion;
|
|
246911
246952
|
}
|
|
246912
246953
|
const manifest = await new PackageJson().fromContent(manifestInput).normalize({ steps }).then((p) => p.content);
|
|
246913
|
-
const version2 =
|
|
246954
|
+
const version2 = semver51.clean(manifest.version);
|
|
246914
246955
|
if (!version2) {
|
|
246915
246956
|
throw Object.assign(
|
|
246916
246957
|
new Error("invalid semver: " + manifest.version),
|
|
@@ -247037,7 +247078,7 @@ var require_unpublish = __commonJS({
|
|
|
247037
247078
|
var { URL: URL7 } = __require("node:url");
|
|
247038
247079
|
var npa11 = require_npa2();
|
|
247039
247080
|
var npmFetch = require_lib39();
|
|
247040
|
-
var
|
|
247081
|
+
var semver51 = require_semver2();
|
|
247041
247082
|
var getPathname = (tarball, registry) => {
|
|
247042
247083
|
const registryUrl = new URL7(registry).pathname.slice(1);
|
|
247043
247084
|
let tarballUrl = new URL7(tarball).pathname.slice(1);
|
|
@@ -247087,7 +247128,7 @@ var require_unpublish = __commonJS({
|
|
|
247087
247128
|
if (latestVer === version2) {
|
|
247088
247129
|
pkg["dist-tags"].latest = Object.keys(
|
|
247089
247130
|
allVersions
|
|
247090
|
-
).sort(
|
|
247131
|
+
).sort(semver51.compareLoose).pop();
|
|
247091
247132
|
}
|
|
247092
247133
|
delete pkg._revisions;
|
|
247093
247134
|
delete pkg._attachments;
|
|
@@ -250384,7 +250425,7 @@ var init_clean = __esm({
|
|
|
250384
250425
|
shorthands19 = {
|
|
250385
250426
|
l: "--lockfile"
|
|
250386
250427
|
};
|
|
250387
|
-
PNPM_HIDDEN_ENTRIES = /* @__PURE__ */ new Set([".bin", ".modules.yaml", ".pnpm"]);
|
|
250428
|
+
PNPM_HIDDEN_ENTRIES = /* @__PURE__ */ new Set([".bin", ".modules.yaml", ".pnpm", ".pnpm-workspace-state-v1.json"]);
|
|
250388
250429
|
}
|
|
250389
250430
|
});
|
|
250390
250431
|
|
|
@@ -268546,6 +268587,50 @@ var init_switchCliVersion = __esm({
|
|
|
268546
268587
|
}
|
|
268547
268588
|
});
|
|
268548
268589
|
|
|
268590
|
+
// lib/syncEnvLockfile.js
|
|
268591
|
+
async function syncEnvLockfile(config, context) {
|
|
268592
|
+
const pm2 = context.wantedPackageManager;
|
|
268593
|
+
if (pm2 == null || pm2.name !== "pnpm" || pm2.version == null)
|
|
268594
|
+
return;
|
|
268595
|
+
if (!shouldPersistLockfile(pm2))
|
|
268596
|
+
return;
|
|
268597
|
+
if (!import_semver53.default.satisfies(packageManager.version, pm2.version, { includePrerelease: true }))
|
|
268598
|
+
return;
|
|
268599
|
+
const envLockfile = await readEnvLockfile(context.rootProjectManifestDir);
|
|
268600
|
+
if (envLockfile == null)
|
|
268601
|
+
return;
|
|
268602
|
+
const lockedVersion = envLockfile.importers["."].packageManagerDependencies?.["pnpm"]?.version;
|
|
268603
|
+
if (lockedVersion == null)
|
|
268604
|
+
return;
|
|
268605
|
+
if (import_semver53.default.satisfies(lockedVersion, pm2.version, { includePrerelease: true }))
|
|
268606
|
+
return;
|
|
268607
|
+
const store = await createStoreController({ ...config, ...context });
|
|
268608
|
+
try {
|
|
268609
|
+
await resolvePackageManagerIntegrities(packageManager.version, {
|
|
268610
|
+
envLockfile,
|
|
268611
|
+
registries: config.registries,
|
|
268612
|
+
rootDir: context.rootProjectManifestDir,
|
|
268613
|
+
storeController: store.ctrl,
|
|
268614
|
+
storeDir: store.dir,
|
|
268615
|
+
save: true
|
|
268616
|
+
});
|
|
268617
|
+
} finally {
|
|
268618
|
+
await store.ctrl.close();
|
|
268619
|
+
}
|
|
268620
|
+
}
|
|
268621
|
+
var import_semver53;
|
|
268622
|
+
var init_syncEnvLockfile = __esm({
|
|
268623
|
+
"lib/syncEnvLockfile.js"() {
|
|
268624
|
+
"use strict";
|
|
268625
|
+
init_lib2();
|
|
268626
|
+
init_lib125();
|
|
268627
|
+
init_lib78();
|
|
268628
|
+
init_lib89();
|
|
268629
|
+
import_semver53 = __toESM(require_semver2(), 1);
|
|
268630
|
+
init_shouldPersistLockfile();
|
|
268631
|
+
}
|
|
268632
|
+
});
|
|
268633
|
+
|
|
268549
268634
|
// lib/main.js
|
|
268550
268635
|
var main_exports = {};
|
|
268551
268636
|
__export(main_exports, {
|
|
@@ -268572,7 +268657,7 @@ async function main4(inputArgv) {
|
|
|
268572
268657
|
process.exitCode = 1;
|
|
268573
268658
|
return;
|
|
268574
268659
|
}
|
|
268575
|
-
if (unknownOptions.size > 0 && !
|
|
268660
|
+
if (unknownOptions.size > 0 && !(cmd && NOT_IMPLEMENTED_COMMAND_SET.has(cmd))) {
|
|
268576
268661
|
printError(formatUnknownOptionsError(unknownOptions), `For help, run: pnpm help${cmd ? ` ${cmd}` : ""}`);
|
|
268577
268662
|
process.exitCode = 1;
|
|
268578
268663
|
return;
|
|
@@ -268594,13 +268679,14 @@ async function main4(inputArgv) {
|
|
|
268594
268679
|
}));
|
|
268595
268680
|
if (!isExecutedByCorepack() && cmd !== "setup" && context.wantedPackageManager != null && !shouldSkipPmHandling(cmd, cliParams)) {
|
|
268596
268681
|
const pm2 = context.wantedPackageManager;
|
|
268597
|
-
if (pm2.onFail
|
|
268598
|
-
|
|
268599
|
-
|
|
268600
|
-
if (cliOptions.global) {
|
|
268682
|
+
if (pm2.onFail !== "ignore") {
|
|
268683
|
+
if (pm2.name === "pnpm" && pm2.onFail === "download") {
|
|
268684
|
+
await switchCliVersion(config, context);
|
|
268685
|
+
} else if (cliOptions.global) {
|
|
268601
268686
|
globalWarn("Using --global skips the package manager check for this project");
|
|
268602
268687
|
} else {
|
|
268603
268688
|
checkPackageManager(pm2);
|
|
268689
|
+
await syncEnvLockfile(config, context);
|
|
268604
268690
|
}
|
|
268605
268691
|
}
|
|
268606
268692
|
}
|
|
@@ -268824,7 +268910,7 @@ function checkPackageManager(pm2) {
|
|
|
268824
268910
|
globalWarn(msg);
|
|
268825
268911
|
} else if (pm2.version) {
|
|
268826
268912
|
const currentPnpmVersion = packageManager.name === "pnpm" ? packageManager.version : void 0;
|
|
268827
|
-
if (currentPnpmVersion && !
|
|
268913
|
+
if (currentPnpmVersion && !import_semver54.default.satisfies(currentPnpmVersion, pm2.version, { includePrerelease: true })) {
|
|
268828
268914
|
const msg = `This project is configured to use ${pm2.version} of pnpm. Your current pnpm is v${currentPnpmVersion}`;
|
|
268829
268915
|
if (shouldError) {
|
|
268830
268916
|
throw new PnpmError("BAD_PM_VERSION", msg, {
|
|
@@ -268836,7 +268922,7 @@ function checkPackageManager(pm2) {
|
|
|
268836
268922
|
}
|
|
268837
268923
|
}
|
|
268838
268924
|
}
|
|
268839
|
-
var import_loud_rejection,
|
|
268925
|
+
var import_loud_rejection, import_semver54, REPORTER_INITIALIZED;
|
|
268840
268926
|
var init_main2 = __esm({
|
|
268841
268927
|
"lib/main.js"() {
|
|
268842
268928
|
"use strict";
|
|
@@ -268850,7 +268936,7 @@ var init_main2 = __esm({
|
|
|
268850
268936
|
init_source2();
|
|
268851
268937
|
import_loud_rejection = __toESM(require_loud_rejection(), 1);
|
|
268852
268938
|
init_es();
|
|
268853
|
-
|
|
268939
|
+
import_semver54 = __toESM(require_semver2(), 1);
|
|
268854
268940
|
init_checkForUpdates();
|
|
268855
268941
|
init_cmd();
|
|
268856
268942
|
init_formatError();
|
|
@@ -268858,6 +268944,7 @@ var init_main2 = __esm({
|
|
|
268858
268944
|
init_parseCliArgs();
|
|
268859
268945
|
init_reporter();
|
|
268860
268946
|
init_switchCliVersion();
|
|
268947
|
+
init_syncEnvLockfile();
|
|
268861
268948
|
if (!global["pnpm__startedAt"]) {
|
|
268862
268949
|
global["pnpm__startedAt"] = Date.now();
|
|
268863
268950
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/exe",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"description": "Fast, disk space efficient package manager",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
"detect-libc": "^2.0.3"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"@pnpm/linux-arm64": "11.0.
|
|
36
|
-
"@pnpm/linux-x64": "11.0.
|
|
37
|
-
"@pnpm/linuxstatic-
|
|
38
|
-
"@pnpm/
|
|
39
|
-
"@pnpm/macos-
|
|
40
|
-
"@pnpm/
|
|
41
|
-
"@pnpm/win-arm64": "11.0.
|
|
42
|
-
"@pnpm/win-x64": "11.0.
|
|
35
|
+
"@pnpm/linux-arm64": "11.0.1",
|
|
36
|
+
"@pnpm/linux-x64": "11.0.1",
|
|
37
|
+
"@pnpm/linuxstatic-arm64": "11.0.1",
|
|
38
|
+
"@pnpm/macos-arm64": "11.0.1",
|
|
39
|
+
"@pnpm/macos-x64": "11.0.1",
|
|
40
|
+
"@pnpm/linuxstatic-x64": "11.0.1",
|
|
41
|
+
"@pnpm/win-arm64": "11.0.1",
|
|
42
|
+
"@pnpm/win-x64": "11.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@jest/globals": "30.3.0",
|
|
46
46
|
"execa": "npm:safe-execa@0.3.0",
|
|
47
|
-
"@pnpm/exe": "11.0.
|
|
47
|
+
"@pnpm/exe": "11.0.1",
|
|
48
48
|
"@pnpm/jest-config": "1100.0.3"
|
|
49
49
|
},
|
|
50
50
|
"jest": {
|