electron-builder 27.0.0-alpha.10 → 27.0.0-alpha.11
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/builder.d.ts.map +1 -1
- package/dist/builder.js +5 -5
- package/dist/builder.js.map +1 -1
- package/dist/cli/migrate-schema-programmatic.d.ts.map +1 -1
- package/dist/cli/migrate-schema-programmatic.js +44 -3
- package/dist/cli/migrate-schema-programmatic.js.map +1 -1
- package/dist/cli/migrate-schema.d.ts +4 -0
- package/dist/cli/migrate-schema.d.ts.map +1 -1
- package/dist/cli/migrate-schema.js +53 -5
- package/dist/cli/migrate-schema.js.map +1 -1
- package/package.json +6 -6
package/dist/builder.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwD,eAAe,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAEjH,OAAO,EAAE,IAAI,EAAuB,MAAM,cAAc,CAAA;AAGxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEtD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,wBAAgB,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAQjD;AAED,MAAM,WAAW,YAAa,SAAQ,eAAe,EAAE,cAAc;CAAG;AAExE,MAAM,WAAW,UAAW,SAAQ,eAAe,EAAE,cAAc;IACjE,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,GAAG,CAAC,EAAE,OAAO,CAAA;CACd;AAED,eAAe;AACf,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,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,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAGrE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAiFnE"}
|
package/dist/builder.js
CHANGED
|
@@ -162,19 +162,19 @@ export function coerceTypes(host) {
|
|
|
162
162
|
}
|
|
163
163
|
return host;
|
|
164
164
|
}
|
|
165
|
-
/** Emitted once per process — createTargets is called per invocation, not per platform. */
|
|
166
|
-
let archAllWarningEmitted = false;
|
|
167
165
|
/**
|
|
168
166
|
* `arch: "all"` dropped ia32 in v27. The build stays green and simply produces no 32-bit artifact
|
|
169
167
|
* (plus an unexpected arm64 one), so the only evidence is a missing file in dist — nothing ties that
|
|
170
168
|
* back to the upgrade.
|
|
171
169
|
*/
|
|
172
170
|
function warnAboutArchAllExpansion(platforms) {
|
|
173
|
-
if (
|
|
171
|
+
if (!platforms.some(platform => platform !== Platform.MAC)) {
|
|
174
172
|
return;
|
|
175
173
|
}
|
|
176
|
-
|
|
177
|
-
log
|
|
174
|
+
// once per process — createTargets is called per invocation, not per platform
|
|
175
|
+
log
|
|
176
|
+
.once("arch-all-expansion")
|
|
177
|
+
.warn({ expandsTo: "x64, arm64", previously: "x64, ia32", solution: "request ia32 explicitly (--ia32 / Arch.ia32) with electronVersion <= 43.x if you still ship 32-bit builds" }, 'arch "all" no longer includes ia32. Electron 44 removed Windows ia32 builds and Linux ia32 zips ended at Electron 19, so the old expansion produced broken builds on current Electron. ' +
|
|
178
178
|
"See https://www.electron.build/docs/migration/v27-breaking-changes#arch-all-now-expands-to-x64-and-arm64-32-bit-fails-fast-on-electron-44");
|
|
179
179
|
}
|
|
180
180
|
export function createTargets(platforms, type, arch) {
|
package/dist/builder.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,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AE,CAAC,IAAI,CAAC;QACb,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,iEAAiE;KAC/E,CAAC;SACD,MAAM,CAAC,YAAY,EAAE;QACpB,KAAK,EAAE,CAAC,SAAS,CAAC;QAClB,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,uEAAuE;KACrF,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,KAAK,EAAE,CAAC,GAAG,CAAC;QACZ,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,4HAA4H;YAC5H,KAAK,CAAC,SAAS,CAAC,0CAA0C,CAAC;KAC9D,CAAC;SACD,KAAK,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC;SACpC,OAAO,CAAC,uBAAuB,EAAE,oCAAoC,CAAC;SACtE,OAAO,CAAC,qCAAqC,EAAE,gCAAgC,CAAC;SAChF,OAAO,CAAC,gCAAgC,EAAE,yBAAyB,CAAC;SACpE,OAAO,CAAC,2CAA2C,EAAE,0CAA0C,CAAC;SAChG,OAAO,CAAC,8CAA8C,EAAE,oCAAoC,CAAC,CAAA;AAClG,CAAC","sourcesContent":["import { build as _build, Configuration, DIR_TARGET, Packager, PackagerOptions, Platform } from \"app-builder-lib\"\nimport { addTargetsForPlatform } from \"app-builder-lib/internal\"\nimport { Arch, archFromString, log } from \"builder-util\"\nimport { deepAssign } from \"builder-util-runtime\"\nimport chalk from \"chalk\"\nimport type { PublishOptions } from \"electron-publish\"\nimport { hideBin } from \"yargs/helpers\"\nimport * as yargs from \"yargs\"\n\nexport function createYargs(): yargs.Argv<unknown> {\n // In ESM, yargs.default is the factory function; call it to create an instance.\n // In CJS, yargs.default is already an Argv singleton.\n const factory = (yargs as any).default ?? yargs\n const instance = typeof factory?.parserConfiguration === \"function\" ? factory : factory(hideBin(process.argv))\n return (instance as unknown as yargs.Argv<unknown>).parserConfiguration({\n \"camel-case-expansion\": false,\n })\n}\n\nexport interface BuildOptions extends PackagerOptions, PublishOptions {}\n\nexport interface CliOptions extends PackagerOptions, PublishOptions {\n x64?: boolean\n ia32?: boolean\n armv7l?: boolean\n arm64?: boolean\n universal?: boolean\n\n dir?: boolean\n}\n\n/** @private */\nexport function normalizeOptions(args: CliOptions): BuildOptions {\n if (args.targets != null) {\n return args\n }\n\n const targets = new Map<Platform, Map<Arch, Array<string>>>()\n\n function processTargets(platform: Platform, types: Array<string>) {\n function commonArch(currentIfNotSpecified: boolean): Array<Arch> {\n const result = Array<Arch>()\n if (args.x64) {\n result.push(Arch.x64)\n }\n if (args.armv7l) {\n result.push(Arch.armv7l)\n }\n if (args.arm64) {\n result.push(Arch.arm64)\n }\n if (args.ia32) {\n result.push(Arch.ia32)\n }\n if (args.universal) {\n result.push(Arch.universal)\n }\n\n return result.length === 0 && currentIfNotSpecified ? [archFromString(process.arch)] : result\n }\n\n addTargetsForPlatform(targets, platform, types, commonArch, archToType => {\n const defaultTargetValue = args.dir ? [DIR_TARGET] : []\n for (const arch of commonArch(args.dir === true)) {\n archToType.set(arch, defaultTargetValue)\n }\n })\n }\n\n if (args.mac != null) {\n processTargets(Platform.MAC, args.mac)\n }\n\n if (args.linux != null) {\n processTargets(Platform.LINUX, args.linux)\n }\n\n if (args.win != null) {\n processTargets(Platform.WINDOWS, args.win)\n }\n\n if (targets.size === 0) {\n processTargets(Platform.current(), [])\n }\n\n const result: any = { ...args }\n result.targets = targets\n\n delete result.dir\n delete result.mac\n delete result.linux\n delete result.win\n\n const r = result\n delete r.m\n delete r.o\n delete r.l\n delete r.w\n delete r.windows\n delete r.macos\n delete r.$0\n delete r._\n delete r.version\n delete r.help\n delete r.c\n delete r.p\n delete r.pd\n\n delete result.ia32\n delete result.x64\n delete result.armv7l\n delete result.arm64\n delete result.universal\n\n let config = result.config\n\n // config is array when combining dot-notation values with a config file value\n // https://github.com/electron-userland/electron-builder/issues/2016\n if (Array.isArray(config)) {\n const newConfig: Configuration = {}\n for (const configItem of config) {\n if (typeof configItem === \"object\") {\n deepAssign(newConfig, configItem)\n } else if (typeof configItem === \"string\") {\n newConfig.extends = configItem\n }\n }\n\n config = newConfig\n result.config = newConfig\n }\n\n // AJV cannot coerce \"null\" string to null if string is also allowed (because null string is a valid value)\n if (config != null && typeof config !== \"string\") {\n if (config.extraMetadata != null) {\n coerceTypes(config.extraMetadata)\n }\n\n // mac.sign / mac.universal are nested option bags holding booleans and the signing identity\n // (e.g. sign.identity, sign.hardenedRuntime, universal.mergeASARs). coerceValue recurses into the\n // objects (so `-c.mac.sign.identity=null` disables code signing) and also handles `-c.mac.sign=null`.\n if (config.mac != null) {\n coerceValue(config.mac, \"sign\")\n coerceValue(config.mac, \"universal\")\n }\n\n // `-c.updateManifest=false` is the signing opt-out and arrives as the string \"false\"; ajv does not write a\n // coerced value back out of an `anyOf` branch, so without this the opt-out is silently ignored and the build\n // fails demanding a signing key. coerceValue recurses into objects, so `-c.updateManifest.signingKeyFile=...`\n // still works. (`mas` / `masDev` are omitted on purpose - PlatformPackager never reads updateManifest there.)\n coerceValue(config, \"updateManifest\")\n for (const platform of [\"mac\", \"win\", \"linux\"]) {\n const platformConfig = config[platform]\n if (platformConfig != null && typeof platformConfig === \"object\") {\n coerceValue(platformConfig, \"updateManifest\")\n }\n }\n\n // fix Boolean type by coerceTypes\n if (config.nsis != null) {\n coerceTypes(config.nsis)\n }\n if (config.nsisWeb != null) {\n coerceTypes(config.nsisWeb)\n }\n }\n\n if (\"project\" in r && !(\"projectDir\" in result)) {\n result.projectDir = r.project\n }\n delete r.project\n\n return result as BuildOptions\n}\n\nfunction coerceValue(host: any, key: string): void {\n const value = host[key]\n if (value === \"true\") {\n host[key] = true\n } else if (value === \"false\") {\n host[key] = false\n } else if (value === \"null\") {\n host[key] = null\n } else if (key === \"version\" && typeof value === \"number\") {\n host[key] = value.toString()\n } else if (value != null && typeof value === \"object\") {\n coerceTypes(value)\n }\n}\n\n/** @private */\nexport function coerceTypes(host: any): any {\n for (const key of Object.getOwnPropertyNames(host)) {\n coerceValue(host, key)\n }\n return host\n}\n\n/** Emitted once per process — createTargets is called per invocation, not per platform. */\nlet archAllWarningEmitted = false\n\n/**\n * `arch: \"all\"` dropped ia32 in v27. The build stays green and simply produces no 32-bit artifact\n * (plus an unexpected arm64 one), so the only evidence is a missing file in dist — nothing ties that\n * back to the upgrade.\n */\nfunction warnAboutArchAllExpansion(platforms: Array<Platform>): void {\n if (archAllWarningEmitted || !platforms.some(platform => platform !== Platform.MAC)) {\n return\n }\n archAllWarningEmitted = true\n log.warn(\n { expandsTo: \"x64, arm64\", previously: \"x64, ia32\", solution: \"request ia32 explicitly (--ia32 / Arch.ia32) with electronVersion <= 43.x if you still ship 32-bit builds\" },\n 'arch \"all\" no longer includes ia32. Electron 44 removed Windows ia32 builds and Linux ia32 zips ended at Electron 19, so the old expansion produced broken builds on current Electron. ' +\n \"See https://www.electron.build/docs/migration/v27-breaking-changes#arch-all-now-expands-to-x64-and-arm64-32-bit-fails-fast-on-electron-44\"\n )\n}\n\nexport function createTargets(platforms: Array<Platform>, type?: string | null, arch?: string | null): Map<Platform, Map<Arch, Array<string>>> {\n const targets = new Map<Platform, Map<Arch, Array<string>>>()\n if (arch === \"all\") {\n warnAboutArchAllExpansion(platforms)\n }\n for (const platform of platforms) {\n const archs =\n // BREAKING: since Electron 44 removed Windows ia32 and Linux armv7l builds (and linux-ia32 zips ended at Electron 19),\n // \"all\" expands to x64 + arm64 on non-mac platforms instead of x64 + ia32. Request ia32 explicitly to build it (Electron <= 43 only).\n arch === \"all\" ? (platform === Platform.MAC ? [Arch.x64, Arch.arm64, Arch.universal] : [Arch.x64, Arch.arm64]) : [archFromString(arch == null ? process.arch : arch)]\n const archToType = new Map<Arch, Array<string>>()\n targets.set(platform, archToType)\n\n for (const arch of archs) {\n archToType.set(arch, type == null ? [] : [type])\n }\n }\n return targets\n}\n\nexport function build(rawOptions?: CliOptions): Promise<Array<string>> {\n const buildOptions = normalizeOptions(rawOptions || {})\n return _build(buildOptions, new Packager(buildOptions))\n}\n\n/**\n * @private\n */\nexport function configureBuildCommand(yargs: yargs.Argv): yargs.Argv {\n const publishGroup = \"Publishing:\"\n const buildGroup = \"Building:\"\n return yargs\n .option(\"mac\", {\n group: buildGroup,\n alias: [\"m\", \"o\", \"macos\"],\n description: `Build for macOS, accepts target list (see ${chalk.underline(\"https://www.electron.build/mac\")}).`,\n type: \"array\",\n })\n .option(\"linux\", {\n group: buildGroup,\n alias: \"l\",\n description: `Build for Linux, accepts target list (see ${chalk.underline(\"https://www.electron.build/linux\")})`,\n type: \"array\",\n })\n .option(\"win\", {\n group: buildGroup,\n alias: [\"w\", \"windows\"],\n description: `Build for Windows, accepts target list (see ${chalk.underline(\"https://www.electron.build/win\")})`,\n type: \"array\",\n })\n .option(\"x64\", {\n group: buildGroup,\n description: \"Build for x64\",\n type: \"boolean\",\n })\n .option(\"ia32\", {\n group: buildGroup,\n description: \"Build for ia32\",\n type: \"boolean\",\n })\n .option(\"armv7l\", {\n group: buildGroup,\n description: \"Build for armv7l\",\n type: \"boolean\",\n })\n .option(\"arm64\", {\n group: buildGroup,\n description: \"Build for arm64\",\n type: \"boolean\",\n })\n .option(\"universal\", {\n group: buildGroup,\n description: \"Build for universal\",\n type: \"boolean\",\n })\n .option(\"dir\", {\n group: buildGroup,\n description: \"Build unpacked dir. Useful to test.\",\n type: \"boolean\",\n })\n .option(\"publish\", {\n group: publishGroup,\n alias: \"p\",\n description: `Publish artifacts, see ${chalk.underline(\"https://www.electron.build/publish\")}`,\n choices: [\"onTag\", \"onTagOrDraft\", \"always\", \"never\", undefined as any],\n })\n .option(\"prepackaged\", {\n alias: [\"pd\"],\n group: buildGroup,\n description: \"The path to prepackaged app (to pack in a distributable format)\",\n })\n .option(\"projectDir\", {\n alias: [\"project\"],\n group: buildGroup,\n description: \"The path to project directory. Defaults to current working directory.\",\n })\n .option(\"config\", {\n alias: [\"c\"],\n group: buildGroup,\n description:\n \"The path to an electron-builder config. Defaults to `electron-builder.yml` (or `json`, or `json5`, or `js`, or `ts`), see \" +\n chalk.underline(\"https://www.electron.build/configuration\"),\n })\n .group([\"help\", \"version\"], \"Other:\")\n .example(\"electron-builder -mwl\", \"build for macOS, Windows and Linux\")\n .example(\"electron-builder --linux deb tar.xz\", \"build deb and tar.xz for Linux\")\n .example(\"electron-builder --win --arm64\", \"build for Windows arm64\")\n .example(\"electron-builder -c.extraMetadata.foo=bar\", \"set package.json property `foo` to `bar`\")\n .example(\"electron-builder --config.nsis.unicode=false\", \"configure unicode options for NSIS\")\n}\n"]}
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAiB,UAAU,EAAE,QAAQ,EAAmB,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACjH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,UAAU,WAAW;IACzB,gFAAgF;IAChF,sDAAsD;IACtD,MAAM,OAAO,GAAI,KAAa,CAAC,OAAO,IAAI,KAAK,CAAA;IAC/C,MAAM,QAAQ,GAAG,OAAO,OAAO,EAAE,mBAAmB,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;IAC9G,OAAQ,QAA2C,CAAC,mBAAmB,CAAC;QACtE,sBAAsB,EAAE,KAAK;KAC9B,CAAC,CAAA;AACJ,CAAC;AAcD,eAAe;AACf,MAAM,UAAU,gBAAgB,CAAC,IAAgB;IAC/C,IA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,EAAE,UAAU;QACjB,WAAW,EAAE,qCAAqC;QAClD,IAAI,EAAE,SAAS;KAChB,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,0BAA0B,KAAK,CAAC,SAAS,CAAC,oCAAoC,CAAC,EAAE;QAC9F,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAgB,CAAC;KACxE,CAAC;SACD,MAAM,CAAC,aAAa,EAAE;QACrB,KAAK,EAAE,CAAC,IAAI,CAAC;QACb,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,iEAAiE;KAC/E,CAAC;SACD,MAAM,CAAC,YAAY,EAAE;QACpB,KAAK,EAAE,CAAC,SAAS,CAAC;QAClB,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,uEAAuE;KACrF,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,KAAK,EAAE,CAAC,GAAG,CAAC;QACZ,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,4HAA4H;YAC5H,KAAK,CAAC,SAAS,CAAC,0CAA0C,CAAC;KAC9D,CAAC;SACD,KAAK,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC;SACpC,OAAO,CAAC,uBAAuB,EAAE,oCAAoC,CAAC;SACtE,OAAO,CAAC,qCAAqC,EAAE,gCAAgC,CAAC;SAChF,OAAO,CAAC,gCAAgC,EAAE,yBAAyB,CAAC;SACpE,OAAO,CAAC,2CAA2C,EAAE,0CAA0C,CAAC;SAChG,OAAO,CAAC,8CAA8C,EAAE,oCAAoC,CAAC,CAAA;AAClG,CAAC","sourcesContent":["import { build as _build, Configuration, DIR_TARGET, Packager, PackagerOptions, Platform } from \"app-builder-lib\"\nimport { addTargetsForPlatform } from \"app-builder-lib/internal\"\nimport { Arch, archFromString, log } from \"builder-util\"\nimport { deepAssign } from \"builder-util-runtime\"\nimport chalk from \"chalk\"\nimport type { PublishOptions } from \"electron-publish\"\nimport { hideBin } from \"yargs/helpers\"\nimport * as yargs from \"yargs\"\n\nexport function createYargs(): yargs.Argv<unknown> {\n // In ESM, yargs.default is the factory function; call it to create an instance.\n // In CJS, yargs.default is already an Argv singleton.\n const factory = (yargs as any).default ?? yargs\n const instance = typeof factory?.parserConfiguration === \"function\" ? factory : factory(hideBin(process.argv))\n return (instance as unknown as yargs.Argv<unknown>).parserConfiguration({\n \"camel-case-expansion\": false,\n })\n}\n\nexport interface BuildOptions extends PackagerOptions, PublishOptions {}\n\nexport interface CliOptions extends PackagerOptions, PublishOptions {\n x64?: boolean\n ia32?: boolean\n armv7l?: boolean\n arm64?: boolean\n universal?: boolean\n\n dir?: boolean\n}\n\n/** @private */\nexport function normalizeOptions(args: CliOptions): BuildOptions {\n if (args.targets != null) {\n return args\n }\n\n const targets = new Map<Platform, Map<Arch, Array<string>>>()\n\n function processTargets(platform: Platform, types: Array<string>) {\n function commonArch(currentIfNotSpecified: boolean): Array<Arch> {\n const result = Array<Arch>()\n if (args.x64) {\n result.push(Arch.x64)\n }\n if (args.armv7l) {\n result.push(Arch.armv7l)\n }\n if (args.arm64) {\n result.push(Arch.arm64)\n }\n if (args.ia32) {\n result.push(Arch.ia32)\n }\n if (args.universal) {\n result.push(Arch.universal)\n }\n\n return result.length === 0 && currentIfNotSpecified ? [archFromString(process.arch)] : result\n }\n\n addTargetsForPlatform(targets, platform, types, commonArch, archToType => {\n const defaultTargetValue = args.dir ? [DIR_TARGET] : []\n for (const arch of commonArch(args.dir === true)) {\n archToType.set(arch, defaultTargetValue)\n }\n })\n }\n\n if (args.mac != null) {\n processTargets(Platform.MAC, args.mac)\n }\n\n if (args.linux != null) {\n processTargets(Platform.LINUX, args.linux)\n }\n\n if (args.win != null) {\n processTargets(Platform.WINDOWS, args.win)\n }\n\n if (targets.size === 0) {\n processTargets(Platform.current(), [])\n }\n\n const result: any = { ...args }\n result.targets = targets\n\n delete result.dir\n delete result.mac\n delete result.linux\n delete result.win\n\n const r = result\n delete r.m\n delete r.o\n delete r.l\n delete r.w\n delete r.windows\n delete r.macos\n delete r.$0\n delete r._\n delete r.version\n delete r.help\n delete r.c\n delete r.p\n delete r.pd\n\n delete result.ia32\n delete result.x64\n delete result.armv7l\n delete result.arm64\n delete result.universal\n\n let config = result.config\n\n // config is array when combining dot-notation values with a config file value\n // https://github.com/electron-userland/electron-builder/issues/2016\n if (Array.isArray(config)) {\n const newConfig: Configuration = {}\n for (const configItem of config) {\n if (typeof configItem === \"object\") {\n deepAssign(newConfig, configItem)\n } else if (typeof configItem === \"string\") {\n newConfig.extends = configItem\n }\n }\n\n config = newConfig\n result.config = newConfig\n }\n\n // AJV cannot coerce \"null\" string to null if string is also allowed (because null string is a valid value)\n if (config != null && typeof config !== \"string\") {\n if (config.extraMetadata != null) {\n coerceTypes(config.extraMetadata)\n }\n\n // mac.sign / mac.universal are nested option bags holding booleans and the signing identity\n // (e.g. sign.identity, sign.hardenedRuntime, universal.mergeASARs). coerceValue recurses into the\n // objects (so `-c.mac.sign.identity=null` disables code signing) and also handles `-c.mac.sign=null`.\n if (config.mac != null) {\n coerceValue(config.mac, \"sign\")\n coerceValue(config.mac, \"universal\")\n }\n\n // `-c.updateManifest=false` is the signing opt-out and arrives as the string \"false\"; ajv does not write a\n // coerced value back out of an `anyOf` branch, so without this the opt-out is silently ignored and the build\n // fails demanding a signing key. coerceValue recurses into objects, so `-c.updateManifest.signingKeyFile=...`\n // still works. (`mas` / `masDev` are omitted on purpose - PlatformPackager never reads updateManifest there.)\n coerceValue(config, \"updateManifest\")\n for (const platform of [\"mac\", \"win\", \"linux\"]) {\n const platformConfig = config[platform]\n if (platformConfig != null && typeof platformConfig === \"object\") {\n coerceValue(platformConfig, \"updateManifest\")\n }\n }\n\n // fix Boolean type by coerceTypes\n if (config.nsis != null) {\n coerceTypes(config.nsis)\n }\n if (config.nsisWeb != null) {\n coerceTypes(config.nsisWeb)\n }\n }\n\n if (\"project\" in r && !(\"projectDir\" in result)) {\n result.projectDir = r.project\n }\n delete r.project\n\n return result as BuildOptions\n}\n\nfunction coerceValue(host: any, key: string): void {\n const value = host[key]\n if (value === \"true\") {\n host[key] = true\n } else if (value === \"false\") {\n host[key] = false\n } else if (value === \"null\") {\n host[key] = null\n } else if (key === \"version\" && typeof value === \"number\") {\n host[key] = value.toString()\n } else if (value != null && typeof value === \"object\") {\n coerceTypes(value)\n }\n}\n\n/** @private */\nexport function coerceTypes(host: any): any {\n for (const key of Object.getOwnPropertyNames(host)) {\n coerceValue(host, key)\n }\n return host\n}\n\n/**\n * `arch: \"all\"` dropped ia32 in v27. The build stays green and simply produces no 32-bit artifact\n * (plus an unexpected arm64 one), so the only evidence is a missing file in dist — nothing ties that\n * back to the upgrade.\n */\nfunction warnAboutArchAllExpansion(platforms: Array<Platform>): void {\n if (!platforms.some(platform => platform !== Platform.MAC)) {\n return\n }\n // once per process — createTargets is called per invocation, not per platform\n log\n .once(\"arch-all-expansion\")\n .warn(\n { expandsTo: \"x64, arm64\", previously: \"x64, ia32\", solution: \"request ia32 explicitly (--ia32 / Arch.ia32) with electronVersion <= 43.x if you still ship 32-bit builds\" },\n 'arch \"all\" no longer includes ia32. Electron 44 removed Windows ia32 builds and Linux ia32 zips ended at Electron 19, so the old expansion produced broken builds on current Electron. ' +\n \"See https://www.electron.build/docs/migration/v27-breaking-changes#arch-all-now-expands-to-x64-and-arm64-32-bit-fails-fast-on-electron-44\"\n )\n}\n\nexport function createTargets(platforms: Array<Platform>, type?: string | null, arch?: string | null): Map<Platform, Map<Arch, Array<string>>> {\n const targets = new Map<Platform, Map<Arch, Array<string>>>()\n if (arch === \"all\") {\n warnAboutArchAllExpansion(platforms)\n }\n for (const platform of platforms) {\n const archs =\n // BREAKING: since Electron 44 removed Windows ia32 and Linux armv7l builds (and linux-ia32 zips ended at Electron 19),\n // \"all\" expands to x64 + arm64 on non-mac platforms instead of x64 + ia32. Request ia32 explicitly to build it (Electron <= 43 only).\n arch === \"all\" ? (platform === Platform.MAC ? [Arch.x64, Arch.arm64, Arch.universal] : [Arch.x64, Arch.arm64]) : [archFromString(arch == null ? process.arch : arch)]\n const archToType = new Map<Arch, Array<string>>()\n targets.set(platform, archToType)\n\n for (const arch of archs) {\n archToType.set(arch, type == null ? [] : [type])\n }\n }\n return targets\n}\n\nexport function build(rawOptions?: CliOptions): Promise<Array<string>> {\n const buildOptions = normalizeOptions(rawOptions || {})\n return _build(buildOptions, new Packager(buildOptions))\n}\n\n/**\n * @private\n */\nexport function configureBuildCommand(yargs: yargs.Argv): yargs.Argv {\n const publishGroup = \"Publishing:\"\n const buildGroup = \"Building:\"\n return yargs\n .option(\"mac\", {\n group: buildGroup,\n alias: [\"m\", \"o\", \"macos\"],\n description: `Build for macOS, accepts target list (see ${chalk.underline(\"https://www.electron.build/mac\")}).`,\n type: \"array\",\n })\n .option(\"linux\", {\n group: buildGroup,\n alias: \"l\",\n description: `Build for Linux, accepts target list (see ${chalk.underline(\"https://www.electron.build/linux\")})`,\n type: \"array\",\n })\n .option(\"win\", {\n group: buildGroup,\n alias: [\"w\", \"windows\"],\n description: `Build for Windows, accepts target list (see ${chalk.underline(\"https://www.electron.build/win\")})`,\n type: \"array\",\n })\n .option(\"x64\", {\n group: buildGroup,\n description: \"Build for x64\",\n type: \"boolean\",\n })\n .option(\"ia32\", {\n group: buildGroup,\n description: \"Build for ia32\",\n type: \"boolean\",\n })\n .option(\"armv7l\", {\n group: buildGroup,\n description: \"Build for armv7l\",\n type: \"boolean\",\n })\n .option(\"arm64\", {\n group: buildGroup,\n description: \"Build for arm64\",\n type: \"boolean\",\n })\n .option(\"universal\", {\n group: buildGroup,\n description: \"Build for universal\",\n type: \"boolean\",\n })\n .option(\"dir\", {\n group: buildGroup,\n description: \"Build unpacked dir. Useful to test.\",\n type: \"boolean\",\n })\n .option(\"publish\", {\n group: publishGroup,\n alias: \"p\",\n description: `Publish artifacts, see ${chalk.underline(\"https://www.electron.build/publish\")}`,\n choices: [\"onTag\", \"onTagOrDraft\", \"always\", \"never\", undefined as any],\n })\n .option(\"prepackaged\", {\n alias: [\"pd\"],\n group: buildGroup,\n description: \"The path to prepackaged app (to pack in a distributable format)\",\n })\n .option(\"projectDir\", {\n alias: [\"project\"],\n group: buildGroup,\n description: \"The path to project directory. Defaults to current working directory.\",\n })\n .option(\"config\", {\n alias: [\"c\"],\n group: buildGroup,\n description:\n \"The path to an electron-builder config. Defaults to `electron-builder.yml` (or `json`, or `json5`, or `js`, or `ts`), see \" +\n chalk.underline(\"https://www.electron.build/configuration\"),\n })\n .group([\"help\", \"version\"], \"Other:\")\n .example(\"electron-builder -mwl\", \"build for macOS, Windows and Linux\")\n .example(\"electron-builder --linux deb tar.xz\", \"build deb and tar.xz for Linux\")\n .example(\"electron-builder --win --arm64\", \"build for Windows arm64\")\n .example(\"electron-builder -c.extraMetadata.foo=bar\", \"set package.json property `foo` to `bar`\")\n .example(\"electron-builder --config.nsis.unicode=false\", \"configure unicode options for NSIS\")\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-schema-programmatic.d.ts","sourceRoot":"","sources":["../../src/cli/migrate-schema-programmatic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrate-schema-programmatic.d.ts","sourceRoot":"","sources":["../../src/cli/migrate-schema-programmatic.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAQ1D,wBAAgB,cAAc,IAAI,GAAG,GAAG,IAAI,CAU3C;AAED,MAAM,MAAM,2BAA2B,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,CAAA;AAE9E,MAAM,WAAW,2BAA2B;IAC1C,8FAA8F;IAC9F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,CAAA;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;IAC3B,8GAA8G;IAC9G,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAA;IAC5C,oFAAoF;IACpF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CACpC;AAQD;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,2BAA2B,CAoB3G"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { NSIS_CONFIG_KEYS } from "app-builder-lib/internal";
|
|
2
|
+
import { ALL_PLATFORM_KEYS, FILE_OPTION_KEYS, NSIS_CONFIG_KEYS } from "app-builder-lib/internal";
|
|
3
3
|
import * as path from "path";
|
|
4
|
-
import { ASAR_PLATFORM_KEYS, AZURE_KNOWN_FIELDS, ELECTRON_DOWNLOAD_DROPPED, FEED_QUERY_ADVISORY, isLegacyElectronDownloadKey, legacyKeyMessage, MAC_ENTITLEMENTS_ADVISORY, MAC_NULL_MEANS_UNSET_FIELDS, MAC_SIGN_FIELDS, MAC_SIGN_REMOVED_FIELDS, MAC_UNIVERSAL_FIELDS, normalizeTargetName, NSIS_PER_MACHINE_UPDATE_ADVISORY, NSIS_WEB_ADVISORY, PORTABLE_DEBUG_LOGGING_DROPPED, SNAP_BASES, SNAP_CORE24_UNSUPPORTED, WIN_SIGN_HOOK_PUBLISHER_NAME_ADVISORY, } from "./migrate-schema.js";
|
|
4
|
+
import { ASAR_PLATFORM_KEYS, AZURE_KNOWN_FIELDS, ELECTRON_DOWNLOAD_DROPPED, FEED_QUERY_ADVISORY, fileOptionsChange, fileOptionsConflictWarning, isLegacyElectronDownloadKey, legacyKeyMessage, MAC_ENTITLEMENTS_ADVISORY, MAC_NULL_MEANS_UNSET_FIELDS, MAC_SIGN_FIELDS, MAC_SIGN_REMOVED_FIELDS, MAC_UNIVERSAL_FIELDS, normalizeTargetName, NSIS_PER_MACHINE_UPDATE_ADVISORY, NSIS_WEB_ADVISORY, PORTABLE_DEBUG_LOGGING_DROPPED, SNAP_BASES, SNAP_CORE24_UNSUPPORTED, WIN_SIGN_HOOK_PUBLISHER_NAME_ADVISORY, } from "./migrate-schema.js";
|
|
5
5
|
const _require = createRequire(import.meta.url);
|
|
6
6
|
// `typescript` is intentionally NOT a dependency of electron-builder — it is loaded lazily (same
|
|
7
7
|
// pattern as js-yaml/json5/toml) and the feature degrades to manual steps when it is unavailable.
|
|
@@ -279,7 +279,7 @@ class ConfigCodemod {
|
|
|
279
279
|
this.indentUnit = this.detectIndentUnit(root);
|
|
280
280
|
this.ruleRemoveKeys(root, ["electronCompile"], "removed electronCompile (unsupported since v27; migrate to electron-vite, esbuild, or webpack)");
|
|
281
281
|
this.ruleRemoveKeys(root, ["framework", "nodeVersion", "launchUiVersion"], key => `removed ${key} (Electron is the only supported framework in v27)`);
|
|
282
|
-
const disableDefaultIgnoredFilesDesc = "removed disableDefaultIgnoredFiles (in v27, include a default-excluded file via an explicit `files` glob, e.g. `**/*.obj`)";
|
|
282
|
+
const disableDefaultIgnoredFilesDesc = "removed disableDefaultIgnoredFiles (in v27, include a default-excluded file via an explicit `fileOptions.files` glob, e.g. `**/*.obj`)";
|
|
283
283
|
this.ruleRemoveKeys(root, ["disableDefaultIgnoredFiles"], disableDefaultIgnoredFilesDesc);
|
|
284
284
|
// mas/masDev are MacConfiguration-derived, so they accept the (now-removed) key too.
|
|
285
285
|
for (const platform of ["mac", "mas", "masDev", "win", "linux"]) {
|
|
@@ -323,6 +323,13 @@ class ConfigCodemod {
|
|
|
323
323
|
}
|
|
324
324
|
this.ruleElectronDownload(root);
|
|
325
325
|
this.ruleToolsets(root);
|
|
326
|
+
this.ruleFileOptions(root, "");
|
|
327
|
+
for (const platform of ALL_PLATFORM_KEYS) {
|
|
328
|
+
const p = this.getObjectProp(root, platform);
|
|
329
|
+
if (p != null) {
|
|
330
|
+
this.ruleFileOptions(p, `${platform}.`);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
326
333
|
this.ruleNsisWebAdvisory(root);
|
|
327
334
|
this.ruleMacEntitlementsAdvisory(root);
|
|
328
335
|
this.ruleNsisPerMachineAdvisory(root);
|
|
@@ -1206,6 +1213,40 @@ class ConfigCodemod {
|
|
|
1206
1213
|
this.warnings.push(`${name}.universal already exists but is not an object literal; move ${present.join(", ")} into it manually.`);
|
|
1207
1214
|
}
|
|
1208
1215
|
}
|
|
1216
|
+
/** Mirrors migrateConfig's `migrateFileOptions`: flat `files` / `extraResources` / `extraFiles` → `fileOptions`. */
|
|
1217
|
+
ruleFileOptions(holder, prefix) {
|
|
1218
|
+
const present = FILE_OPTION_KEYS.filter(key => this.getProp(holder, key) != null);
|
|
1219
|
+
if (present.length === 0) {
|
|
1220
|
+
return;
|
|
1221
|
+
}
|
|
1222
|
+
const fileOptionsProp = this.getProp(holder, "fileOptions");
|
|
1223
|
+
const existing = this.getObjectProp(holder, "fileOptions");
|
|
1224
|
+
const isNull = fileOptionsProp != null && existing == null && this.propValue(holder, "fileOptions")?.kind === this.ts.SyntaxKind.NullKeyword;
|
|
1225
|
+
if (fileOptionsProp != null && existing == null && !isNull) {
|
|
1226
|
+
this.warnings.push(`${prefix}fileOptions is not an object literal; move ${present.map(key => prefix + key).join(", ")} into it manually.`);
|
|
1227
|
+
return;
|
|
1228
|
+
}
|
|
1229
|
+
const sources = [];
|
|
1230
|
+
for (const key of present) {
|
|
1231
|
+
const prop = this.getProp(holder, key);
|
|
1232
|
+
const conflict = existing != null && this.getProp(existing, key) != null;
|
|
1233
|
+
if (conflict) {
|
|
1234
|
+
this.removeProp(prop);
|
|
1235
|
+
this.warnings.push(fileOptionsConflictWarning(prefix, key));
|
|
1236
|
+
}
|
|
1237
|
+
else {
|
|
1238
|
+
sources.push({ prop });
|
|
1239
|
+
}
|
|
1240
|
+
this.changes.push(fileOptionsChange(prefix, key, conflict));
|
|
1241
|
+
}
|
|
1242
|
+
if (sources.length > 0) {
|
|
1243
|
+
if (isNull) {
|
|
1244
|
+
// replaced by the object moveInto creates
|
|
1245
|
+
this.removeProp(fileOptionsProp);
|
|
1246
|
+
}
|
|
1247
|
+
this.moveInto(holder, "fileOptions", sources, [], /* treatNullAsAbsent */ true);
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1209
1250
|
ruleElectronDownload(root) {
|
|
1210
1251
|
const ts = this.ts;
|
|
1211
1252
|
let sourceKey = "electronDownload";
|