@pnpm/exe 11.0.0-rc.4 → 11.0.0-rc.5
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 +19 -12
- package/package.json +11 -11
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.0-rc.
|
|
1003
|
+
version: true ? "11.0.0-rc.5" : "0.0.0"
|
|
1004
1004
|
};
|
|
1005
1005
|
pkgJson = defaultManifest;
|
|
1006
1006
|
packageManager = {
|
|
@@ -214095,13 +214095,13 @@ function help55() {
|
|
|
214095
214095
|
description: `Pack a CommonJS entry file into a standalone executable for one or more target platforms.
|
|
214096
214096
|
|
|
214097
214097
|
The executable embeds a Node.js binary via the Node.js Single Executable Applications API.
|
|
214098
|
-
Requires Node.js v${MIN_BUILDER_VERSION.major}.${MIN_BUILDER_VERSION.minor}+ to perform the injection. The running Node.js is used when it
|
|
214098
|
+
Requires Node.js v${MIN_BUILDER_VERSION.major}.${MIN_BUILDER_VERSION.minor}+ to perform the injection. SEA blobs are not compatible across Node.js minor releases, so the builder Node.js must match the embedded runtime version exactly. The running Node.js is used when it already matches; otherwise a host-arch Node.js of the embedded runtime version is downloaded automatically.
|
|
214099
214099
|
|
|
214100
214100
|
Defaults for --entry, --target, --runtime, --output-dir, and --output-name can be set in the package.json under "pnpm.app". CLI flags override the config; --target entirely replaces the configured list so you can narrow it at invocation time.`,
|
|
214101
214101
|
url: docsUrl("pack-app"),
|
|
214102
214102
|
usages: [
|
|
214103
214103
|
"pnpm pack-app --entry dist/index.cjs --target linux-x64 --target win32-x64",
|
|
214104
|
-
|
|
214104
|
+
`pnpm pack-app --entry dist/index.cjs --target linux-x64-musl --runtime node@${MIN_BUILDER_VERSION.major}`
|
|
214105
214105
|
],
|
|
214106
214106
|
descriptionLists: [
|
|
214107
214107
|
{
|
|
@@ -214117,7 +214117,7 @@ Defaults for --entry, --target, --runtime, --output-dir, and --output-name can b
|
|
|
214117
214117
|
shortAlias: "-t"
|
|
214118
214118
|
},
|
|
214119
214119
|
{
|
|
214120
|
-
description:
|
|
214120
|
+
description: `Runtime to embed in the output executables, as a "<name>@<version>" spec (e.g. "node@${MIN_BUILDER_VERSION.major}", "node@${MIN_BUILDER_VERSION.major}.${MIN_BUILDER_VERSION.minor}.0"). Only "node" is supported today, and the version must be >= v${MIN_BUILDER_VERSION.major}.${MIN_BUILDER_VERSION.minor} (the minimum that supports --build-sea). Defaults to the running Node.js version.`,
|
|
214121
214121
|
name: "--runtime"
|
|
214122
214122
|
},
|
|
214123
214123
|
{
|
|
@@ -214163,8 +214163,11 @@ async function handler55(opts2, params) {
|
|
|
214163
214163
|
const outputName = validateOutputName(opts2.outputName ?? project.app?.outputName ?? deriveOutputNameFromPackage(project, opts2.dir));
|
|
214164
214164
|
const fetch2 = createFetchFromRegistry(opts2);
|
|
214165
214165
|
const buildRoot = path187.join(opts2.pnpmHomeDir, "pack-app");
|
|
214166
|
-
const builderBin = await resolveBuilderBinary({ fetch: fetch2, nodeDownloadMirrors: opts2.nodeDownloadMirrors, buildRoot });
|
|
214167
214166
|
const resolvedTargetVersion = await resolveVersion(fetch2, requestedNodeSpec, opts2.nodeDownloadMirrors);
|
|
214167
|
+
const builderBin = await resolveBuilderBinary({
|
|
214168
|
+
buildRoot,
|
|
214169
|
+
targetVersion: resolvedTargetVersion
|
|
214170
|
+
});
|
|
214168
214171
|
const results = [];
|
|
214169
214172
|
for (const target2 of targets) {
|
|
214170
214173
|
const embeddedNodeBin = await ensureNodeRuntime({
|
|
@@ -214201,13 +214204,15 @@ async function handler55(opts2, params) {
|
|
|
214201
214204
|
${results.join("\n")}`;
|
|
214202
214205
|
}
|
|
214203
214206
|
async function resolveBuilderBinary(ctx) {
|
|
214204
|
-
if (runningNodeCanBuildSea()) {
|
|
214207
|
+
if (runningNodeCanBuildSea() && process.version === `v${ctx.targetVersion}`) {
|
|
214205
214208
|
return process.execPath;
|
|
214206
214209
|
}
|
|
214207
|
-
|
|
214210
|
+
if (!builderVersionCanBuildSea(ctx.targetVersion)) {
|
|
214211
|
+
throw new PnpmError("PACK_APP_RUNTIME_TOO_OLD", `The embedded runtime "node@${ctx.targetVersion}" is older than Node.js v${MIN_BUILDER_VERSION.major}.${MIN_BUILDER_VERSION.minor}, which is the minimum version that supports --build-sea.`, { hint: `Pass --runtime node@${MIN_BUILDER_VERSION.major}.${MIN_BUILDER_VERSION.minor}.0 (or newer) or set "pnpm.app.runtime" in package.json.` });
|
|
214212
|
+
}
|
|
214208
214213
|
return ensureNodeRuntime({
|
|
214209
214214
|
buildRoot: ctx.buildRoot,
|
|
214210
|
-
version:
|
|
214215
|
+
version: ctx.targetVersion,
|
|
214211
214216
|
platform: process.platform,
|
|
214212
214217
|
arch: process.arch,
|
|
214213
214218
|
// Pin libc to the host's. Otherwise a caller that had set
|
|
@@ -214223,7 +214228,10 @@ function hostLinuxLibc() {
|
|
|
214223
214228
|
return family === "musl" ? "musl" : "glibc";
|
|
214224
214229
|
}
|
|
214225
214230
|
function runningNodeCanBuildSea() {
|
|
214226
|
-
|
|
214231
|
+
return builderVersionCanBuildSea(process.version.slice(1));
|
|
214232
|
+
}
|
|
214233
|
+
function builderVersionCanBuildSea(version2) {
|
|
214234
|
+
const [majorStr, minorStr] = version2.split(".");
|
|
214227
214235
|
const major = Number(majorStr);
|
|
214228
214236
|
const minor = Number(minorStr);
|
|
214229
214237
|
return major > MIN_BUILDER_VERSION.major || major === MIN_BUILDER_VERSION.major && minor >= MIN_BUILDER_VERSION.minor;
|
|
@@ -214282,7 +214290,7 @@ function parseTarget(raw) {
|
|
|
214282
214290
|
function parseRuntime(spec) {
|
|
214283
214291
|
const match = RUNTIME_PATTERN.exec(spec);
|
|
214284
214292
|
if (!match) {
|
|
214285
|
-
throw new PnpmError("PACK_APP_INVALID_RUNTIME", `Invalid runtime "${spec}". Expected format: <name>@<version> (supported runtimes: ${SUPPORTED_RUNTIMES.join(", ")}; e.g. "node
|
|
214293
|
+
throw new PnpmError("PACK_APP_INVALID_RUNTIME", `Invalid runtime "${spec}". Expected format: <name>@<version> (supported runtimes: ${SUPPORTED_RUNTIMES.join(", ")}; e.g. "node@${MIN_BUILDER_VERSION.major}.${MIN_BUILDER_VERSION.minor}.0").`);
|
|
214286
214294
|
}
|
|
214287
214295
|
return { name: match[1], version: match[2] };
|
|
214288
214296
|
}
|
|
@@ -214380,7 +214388,7 @@ async function adHocSignMacBinary(target2, outputFile) {
|
|
|
214380
214388
|
}
|
|
214381
214389
|
throw new PnpmError("PACK_APP_MACOS_SIGN_UNSUPPORTED_HOST", `Cannot ad-hoc sign the macOS binary at ${outputFile} on a ${process.platform} host.`, { hint: 'Build macOS targets on a macOS or Linux host, or re-sign the produced binary yourself with "codesign --sign -" on macOS.' });
|
|
214382
214390
|
}
|
|
214383
|
-
var import_detect_libc5, MIN_BUILDER_VERSION,
|
|
214391
|
+
var import_detect_libc5, MIN_BUILDER_VERSION, SUPPORTED_OS, SUPPORTED_TARGETS, commandNames55, shorthands17, TARGET_PATTERN, SUPPORTED_RUNTIMES, RUNTIME_PATTERN, INVALID_FILENAME_CHARS, RESERVED_WINDOWS_NAME;
|
|
214384
214392
|
var init_packApp = __esm({
|
|
214385
214393
|
"../releasing/commands/lib/pack-app/packApp.js"() {
|
|
214386
214394
|
"use strict";
|
|
@@ -214393,7 +214401,6 @@ var init_packApp = __esm({
|
|
|
214393
214401
|
init_lib24();
|
|
214394
214402
|
init_lib61();
|
|
214395
214403
|
MIN_BUILDER_VERSION = { major: 25, minor: 5 };
|
|
214396
|
-
DEFAULT_BUILDER_SPEC = `>=${MIN_BUILDER_VERSION.major}.${MIN_BUILDER_VERSION.minor}.0 <${MIN_BUILDER_VERSION.major + 1}.0.0`;
|
|
214397
214404
|
SUPPORTED_OS = ["linux", "darwin", "win32"];
|
|
214398
214405
|
SUPPORTED_TARGETS = "linux-x64, linux-x64-musl, linux-arm64, linux-arm64-musl, darwin-x64, darwin-arm64, win32-x64, win32-arm64";
|
|
214399
214406
|
commandNames55 = ["pack-app"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/exe",
|
|
3
|
-
"version": "11.0.0-rc.
|
|
3
|
+
"version": "11.0.0-rc.5",
|
|
4
4
|
"description": "Fast, disk space efficient package manager",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
"detect-libc": "^2.0.3"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"@pnpm/linux-arm64": "11.0.0-rc.
|
|
36
|
-
"@pnpm/linux-x64": "11.0.0-rc.
|
|
37
|
-
"@pnpm/linuxstatic-
|
|
38
|
-
"@pnpm/linuxstatic-
|
|
39
|
-
"@pnpm/macos-arm64": "11.0.0-rc.
|
|
40
|
-
"@pnpm/macos-x64": "11.0.0-rc.
|
|
41
|
-
"@pnpm/win-arm64": "11.0.0-rc.
|
|
42
|
-
"@pnpm/win-x64": "11.0.0-rc.
|
|
35
|
+
"@pnpm/linux-arm64": "11.0.0-rc.5",
|
|
36
|
+
"@pnpm/linux-x64": "11.0.0-rc.5",
|
|
37
|
+
"@pnpm/linuxstatic-x64": "11.0.0-rc.5",
|
|
38
|
+
"@pnpm/linuxstatic-arm64": "11.0.0-rc.5",
|
|
39
|
+
"@pnpm/macos-arm64": "11.0.0-rc.5",
|
|
40
|
+
"@pnpm/macos-x64": "11.0.0-rc.5",
|
|
41
|
+
"@pnpm/win-arm64": "11.0.0-rc.5",
|
|
42
|
+
"@pnpm/win-x64": "11.0.0-rc.5"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@jest/globals": "30.3.0",
|
|
46
46
|
"execa": "npm:safe-execa@0.3.0",
|
|
47
|
-
"@pnpm/
|
|
48
|
-
"@pnpm/
|
|
47
|
+
"@pnpm/exe": "11.0.0-rc.5",
|
|
48
|
+
"@pnpm/jest-config": "1100.0.3"
|
|
49
49
|
},
|
|
50
50
|
"jest": {
|
|
51
51
|
"preset": "@pnpm/jest-config"
|