app-builder-lib 27.0.0-alpha.10 → 27.0.0-alpha.12
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/asar/asarAlign.d.ts +35 -0
- package/dist/asar/asarAlign.d.ts.map +1 -0
- package/dist/asar/asarAlign.js +149 -0
- package/dist/asar/asarAlign.js.map +1 -0
- package/dist/asar/asarUtil.d.ts +15 -1
- package/dist/asar/asarUtil.d.ts.map +1 -1
- package/dist/asar/asarUtil.js +111 -61
- package/dist/asar/asarUtil.js.map +1 -1
- package/dist/codeSign/win/authenticodeSignature.d.ts +71 -0
- package/dist/codeSign/win/authenticodeSignature.d.ts.map +1 -0
- package/dist/codeSign/win/authenticodeSignature.js +241 -0
- package/dist/codeSign/win/authenticodeSignature.js.map +1 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts +11 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.js +36 -16
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
- package/dist/codeSign/win/verifyUpdatePublisher.d.ts +25 -0
- package/dist/codeSign/win/verifyUpdatePublisher.d.ts.map +1 -0
- package/dist/codeSign/win/verifyUpdatePublisher.js +98 -0
- package/dist/codeSign/win/verifyUpdatePublisher.js.map +1 -0
- package/dist/configuration.d.ts +16 -13
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js.map +1 -1
- package/dist/electron/ElectronFramework.d.ts +15 -0
- package/dist/electron/ElectronFramework.d.ts.map +1 -1
- package/dist/electron/ElectronFramework.js +33 -2
- package/dist/electron/ElectronFramework.js.map +1 -1
- package/dist/electron/mac/asarIntegrityDigest.d.ts +10 -0
- package/dist/electron/mac/asarIntegrityDigest.d.ts.map +1 -0
- package/dist/electron/mac/asarIntegrityDigest.js +122 -0
- package/dist/electron/mac/asarIntegrityDigest.js.map +1 -0
- package/dist/electron/mac/electronMac.js +1 -28
- package/dist/electron/mac/electronMac.js.map +1 -1
- package/dist/electron/mac/electronMacUtils.d.ts +8 -0
- package/dist/electron/mac/electronMacUtils.d.ts.map +1 -1
- package/dist/electron/mac/electronMacUtils.js +36 -0
- package/dist/electron/mac/electronMacUtils.js.map +1 -1
- package/dist/fileMatcher.d.ts +47 -12
- package/dist/fileMatcher.d.ts.map +1 -1
- package/dist/fileMatcher.js +150 -45
- package/dist/fileMatcher.js.map +1 -1
- package/dist/forge-maker.d.ts +64 -0
- package/dist/forge-maker.d.ts.map +1 -1
- package/dist/forge-maker.js +104 -2
- package/dist/forge-maker.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/indexInternal.d.ts +5 -3
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +5 -3
- package/dist/indexInternal.js.map +1 -1
- package/dist/macPackager.d.ts +6 -0
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +48 -2
- package/dist/macPackager.js.map +1 -1
- package/dist/options/FuseOptionsV1.d.ts +4 -0
- package/dist/options/FuseOptionsV1.d.ts.map +1 -1
- package/dist/options/FuseOptionsV1.js.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.d.ts +166 -8
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/dist/options/SnapOptions.d.ts +36 -15
- package/dist/options/SnapOptions.d.ts.map +1 -1
- package/dist/options/SnapOptions.js.map +1 -1
- package/dist/options/linuxOptions.d.ts +53 -18
- package/dist/options/linuxOptions.d.ts.map +1 -1
- package/dist/options/linuxOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +15 -1
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +7 -4
- package/dist/options/winOptions.d.ts.map +1 -1
- package/dist/options/winOptions.js.map +1 -1
- package/dist/packager.d.ts +2 -0
- package/dist/packager.d.ts.map +1 -1
- package/dist/packager.js +6 -0
- package/dist/packager.js.map +1 -1
- package/dist/platformPackager.d.ts +11 -4
- package/dist/platformPackager.d.ts.map +1 -1
- package/dist/platformPackager.js +53 -18
- package/dist/platformPackager.js.map +1 -1
- package/dist/presets/rectCra.js +3 -1
- package/dist/presets/rectCra.js.map +1 -1
- package/dist/publish/PublishManager.d.ts +6 -1
- package/dist/publish/PublishManager.d.ts.map +1 -1
- package/dist/publish/PublishManager.js +80 -58
- package/dist/publish/PublishManager.js.map +1 -1
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
- package/dist/publish/updateInfoBuilder.js +8 -10
- package/dist/publish/updateInfoBuilder.js.map +1 -1
- package/dist/targets/ArchiveTarget.d.ts.map +1 -1
- package/dist/targets/ArchiveTarget.js +7 -1
- package/dist/targets/ArchiveTarget.js.map +1 -1
- package/dist/targets/archive.d.ts +12 -0
- package/dist/targets/archive.d.ts.map +1 -1
- package/dist/targets/archive.js +17 -3
- package/dist/targets/archive.js.map +1 -1
- package/dist/targets/blockmap/blockmap.d.ts +3 -2
- package/dist/targets/blockmap/blockmap.d.ts.map +1 -1
- package/dist/targets/blockmap/blockmap.js +3 -2
- package/dist/targets/blockmap/blockmap.js.map +1 -1
- package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -1
- package/dist/targets/differentialUpdateInfoBuilder.js +4 -0
- package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -1
- package/dist/targets/linux/FlatpakTarget.d.ts +17 -0
- package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -1
- package/dist/targets/linux/FlatpakTarget.js +238 -48
- package/dist/targets/linux/FlatpakTarget.js.map +1 -1
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
- package/dist/targets/linux/FpmTarget.js +10 -14
- package/dist/targets/linux/FpmTarget.js.map +1 -1
- package/dist/targets/linux/LinuxTargetHelper.d.ts +1 -3
- package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -1
- package/dist/targets/linux/LinuxTargetHelper.js +45 -20
- package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.js +5 -1
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
- package/dist/targets/linux/appimage/appImageUtil.d.ts +3 -1
- package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -1
- package/dist/targets/linux/appimage/appImageUtil.js +2 -2
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
- package/dist/targets/linux/appimage/appLauncher.d.ts +6 -0
- package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -1
- package/dist/targets/linux/appimage/appLauncher.js +13 -9
- package/dist/targets/linux/appimage/appLauncher.js.map +1 -1
- package/dist/targets/linux/flatpakBundle.d.ts +43 -0
- package/dist/targets/linux/flatpakBundle.d.ts.map +1 -0
- package/dist/targets/linux/flatpakBundle.js +210 -0
- package/dist/targets/linux/flatpakBundle.js.map +1 -0
- package/dist/targets/linux/snap/core24.d.ts +0 -18
- package/dist/targets/linux/snap/core24.d.ts.map +1 -1
- package/dist/targets/linux/snap/core24.js +29 -100
- package/dist/targets/linux/snap/core24.js.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.d.ts +7 -0
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.js +25 -6
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
- package/dist/targets/linux/snap/snapPlugs.d.ts +76 -0
- package/dist/targets/linux/snap/snapPlugs.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapPlugs.js +242 -0
- package/dist/targets/linux/snap/snapPlugs.js.map +1 -0
- package/dist/targets/mac/MacTargetHelper.d.ts +6 -0
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +47 -3
- package/dist/targets/mac/MacTargetHelper.js.map +1 -1
- package/dist/targets/mac/pkg.d.ts.map +1 -1
- package/dist/targets/mac/pkg.js +1 -0
- package/dist/targets/mac/pkg.js.map +1 -1
- package/dist/targets/win/nsis/Defines.d.ts +1 -0
- package/dist/targets/win/nsis/Defines.d.ts.map +1 -1
- package/dist/targets/win/nsis/Defines.js.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.d.ts +8 -1
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.js +36 -5
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
- package/dist/targets/win/nsis/nsisOptions.d.ts +6 -4
- package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisOptions.js.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.js +7 -2
- package/dist/targets/win/nsis/nsisUtil.js.map +1 -1
- package/dist/targets/win/winAppUtil.d.ts +2 -2
- package/dist/targets/win/winAppUtil.d.ts.map +1 -1
- package/dist/targets/win/winAppUtil.js +5 -3
- package/dist/targets/win/winAppUtil.js.map +1 -1
- package/dist/toolsets/appimage.d.ts.map +1 -1
- package/dist/toolsets/appimage.js +19 -19
- package/dist/toolsets/appimage.js.map +1 -1
- package/dist/toolsets/nsis.js +1 -1
- package/dist/toolsets/nsis.js.map +1 -1
- package/dist/toolsets/winCodeSign.d.ts +14 -1
- package/dist/toolsets/winCodeSign.d.ts.map +1 -1
- package/dist/toolsets/winCodeSign.js +14 -1
- package/dist/toolsets/winCodeSign.js.map +1 -1
- package/dist/util/AppFileWalker.js +9 -1
- package/dist/util/AppFileWalker.js.map +1 -1
- package/dist/util/appFileCopier.d.ts +15 -2
- package/dist/util/appFileCopier.d.ts.map +1 -1
- package/dist/util/appFileCopier.js +30 -20
- package/dist/util/appFileCopier.js.map +1 -1
- package/dist/util/config/config.d.ts +1 -1
- package/dist/util/config/config.d.ts.map +1 -1
- package/dist/util/config/config.js +42 -19
- package/dist/util/config/config.js.map +1 -1
- package/dist/util/config/fileOptions.d.ts +52 -0
- package/dist/util/config/fileOptions.d.ts.map +1 -0
- package/dist/util/config/fileOptions.js +210 -0
- package/dist/util/config/fileOptions.js.map +1 -0
- package/dist/util/config/legacyConfigGuard.d.ts.map +1 -1
- package/dist/util/config/legacyConfigGuard.js +31 -4
- package/dist/util/config/legacyConfigGuard.js.map +1 -1
- package/dist/util/config/legacyOptions.d.ts +11 -0
- package/dist/util/config/legacyOptions.d.ts.map +1 -1
- package/dist/util/config/legacyOptions.js +36 -10
- package/dist/util/config/legacyOptions.js.map +1 -1
- package/dist/util/electronGet.d.ts +13 -0
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +40 -17
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/removedEnvVars.d.ts +25 -0
- package/dist/util/removedEnvVars.d.ts.map +1 -0
- package/dist/util/removedEnvVars.js +54 -0
- package/dist/util/removedEnvVars.js.map +1 -0
- package/dist/util/trustedSourceRoots.d.ts +59 -0
- package/dist/util/trustedSourceRoots.d.ts.map +1 -0
- package/dist/util/trustedSourceRoots.js +127 -0
- package/dist/util/trustedSourceRoots.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +18 -17
- package/scheme.json +421 -436
- package/templates/nsis/include/installer.nsh +11 -8
- package/templates/nsis/installSection.nsh +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacyConfigGuard.js","sourceRoot":"","sources":["../../../src/util/config/legacyConfigGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAE7D,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAA;AAEpH;;;;;;;;;;;GAWG;AAEH,MAAM,sBA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import { BREAKING_CHANGES_URL, formatLegacyOptionMessage, RESOLVED_LEGACY_CONFIG_OPTIONS } from \"./legacyOptions.js\"\n\n/**\n * Build-time guard for configurations still written against v26.\n *\n * Almost every removed key is already rejected by `scheme.json` (`additionalProperties: false`), but\n * ajv can only say \"has an unknown property 'identity'\" — it cannot say the option moved to\n * `mac.sign.identity`. This pass runs *before* schema validation so the targeted message wins, and it\n * aggregates every legacy key into a single error: a config with a dozen moved mac options should\n * not take a dozen build attempts to fix.\n *\n * Nothing here rejects a value a valid v27 config can contain — every guarded path is covered by a\n * test asserting the v27 schema rejects it too.\n */\n\nconst PLATFORMS_WITH_PUBLISH = [\"mac\", \"win\", \"linux\"] as const\n\n/** v26 `snap` options that belong under the base-named sub-key in v27, not directly on `snapcraft`. */\nconst SNAPCRAFT_BASE_LEVEL_KEYS = new Set([\n \"confinement\",\n \"grade\",\n \"stagePackages\",\n \"buildPackages\",\n \"plugs\",\n \"slots\",\n \"after\",\n \"environment\",\n \"hooks\",\n \"layout\",\n \"appPartStage\",\n \"assumes\",\n \"autoStart\",\n \"summary\",\n \"title\",\n \"compression\",\n \"allowNativeWayland\",\n \"useTemplateApp\",\n])\n\nconst SNAPCRAFT_BASES = [\"core18\", \"core20\", \"core22\", \"core24\", \"custom\"]\n\nfunction docLink(anchor: string): string {\n return ` ${BREAKING_CHANGES_URL}#${anchor}`\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, any> {\n return value != null && typeof value === \"object\" && !Array.isArray(value)\n}\n\n/** Resolves `path` against `config`, returning the holding object or null when any segment is missing. */\nfunction resolveParent(config: Record<string, any>, path: readonly string[]): Record<string, any> | null {\n let node: Record<string, any> = config\n for (const segment of path) {\n const next = node[segment]\n if (!isPlainObject(next)) {\n return null\n }\n node = next\n }\n return node\n}\n\n/** Collects the legacy keys present anywhere in the config, using the shared mapping table. */\nfunction collectLegacyKeys(config: Record<string, any>, errors: string[], warnings: string[]): void {\n for (const option of RESOLVED_LEGACY_CONFIG_OPTIONS) {\n const parent = resolveParent(config, option.parentPath)\n if (parent == null || !(option.key in parent)) {\n continue\n }\n const message = formatLegacyOptionMessage(option)\n if (option.severity === \"error\") {\n errors.push(message)\n } else {\n warnings.push(message)\n }\n }\n}\n\n/**\n * `mac.sign` is a single union in v27, so a custom signer and an options bag can no longer coexist.\n * The sibling fields are already reported by `collectLegacyKeys`; this adds the union explanation so\n * the user knows the two forms are mutually exclusive rather than assuming a mechanical move works.\n */\nfunction checkMacCustomSigner(config: Record<string, any>, errors: string[]): void {\n for (const platform of [\"mac\", \"mas\", \"masDev\"] as const) {\n const platformConfig = config[platform]\n if (!isPlainObject(platformConfig)) {\n continue\n }\n const sign = platformConfig.sign\n if (typeof sign !== \"string\" && typeof sign !== \"function\") {\n continue\n }\n const legacySiblings = RESOLVED_LEGACY_CONFIG_OPTIONS.filter(o => o.parentPath.length === 1 && o.parentPath[0] === platform && o.key in platformConfig).map(o => o.key)\n if (legacySiblings.length === 0) {\n continue\n }\n errors.push(\n `\\`${platform}.sign\\` is a custom signing function or module path, and \\`${platform}\\` also sets [${legacySiblings.join(\", \")}].\\n` +\n ` In v27 \\`${platform}.sign\\` is a single union — a custom signer cannot carry signing options alongside it.\\n` +\n ` Either keep the custom signer and read those options inside it, or drop it and use an ElectronSignOptions object.\\n` +\n docLink(\"macos-signing-macsign\")\n )\n }\n}\n\n/**\n * `win.sign` is a discriminated union in v27. Without `type`, ajv reports one\n * \"unknown property\" error per union branch and never mentions the missing discriminator.\n */\nfunction checkWinSignDiscriminator(config: Record<string, any>, errors: string[]): void {\n const sign = config.win?.sign\n if (!isPlainObject(sign) || \"type\" in sign) {\n return\n }\n errors.push(\n \"`win.sign` is missing its `type` discriminator.\\n\" +\n ' v27 types `win.sign` as a union: `type: \"signtool\" | \"hsm\" | \"pkcs11\" | \"azure\"`.\\n' +\n ' A config migrated from `win.signtoolOptions` needs `type: \"signtool\"`; one from `win.azureSignOptions` needs `type: \"azure\"`.\\n' +\n docLink(\"windows-signing-winsign\")\n )\n}\n\n/**\n * `snapcraft.base` is required, but because `snapcraft` is `anyOf[SnapcraftOptions, null]` the ajv\n * output collapses to \"configuration.snapcraft should be one of these: null\" — which reads as an\n * instruction to null out the config.\n */\nfunction checkSnapcraftShape(config: Record<string, any>, errors: string[]): void {\n const snapcraft = config.snapcraft\n if (!isPlainObject(snapcraft)) {\n return\n }\n if (!(\"base\" in snapcraft)) {\n errors.push(\n \"`snapcraft` is missing the required `base` field.\\n\" +\n ` Set it to one of ${SNAPCRAFT_BASES.map(b => `\"${b}\"`).join(\" | \")} and nest that base's options under a matching sub-key, ` +\n 'e.g. `{ \"snapcraft\": { \"base\": \"core22\", \"core22\": { … } } }`.\\n' +\n docLink(\"snap-snapcraft\")\n )\n return\n }\n const flatKeys = Object.keys(snapcraft).filter(k => SNAPCRAFT_BASE_LEVEL_KEYS.has(k))\n if (flatKeys.length > 0) {\n errors.push(\n `\\`snapcraft\\` sets [${flatKeys.join(\", \")}] directly, but in v27 those belong under the base-named sub-key.\\n` +\n ` Move them under \\`snapcraft.${snapcraft.base}\\`, e.g. \\`{ \"snapcraft\": { \"base\": \"${snapcraft.base}\", \"${snapcraft.base}\": { \"${flatKeys[0]}\": … } } }\\`.\\n` +\n docLink(\"snap-snapcraft\")\n )\n }\n}\n\n/**\n * `vPrefixedTagName` was removed from GitHub publish options only — GitLab still supports it, so the\n * check has to discriminate on `provider` rather than on the key name.\n */\nfunction checkPublishEntries(config: Record<string, any>, errors: string[]): void {\n const check = (value: unknown, label: string) => {\n if (value == null) {\n return\n }\n for (const entry of Array.isArray(value) ? value : [value]) {\n if (!isPlainObject(entry) || entry.provider !== \"github\" || !(\"vPrefixedTagName\" in entry)) {\n continue\n }\n const suggested = entry.vPrefixedTagName === false ? '\"\"' : '\"v\"'\n errors.push(\n `\\`${label}.vPrefixedTagName\\` was removed from the GitHub publish options in v27.\\n` +\n ` Use \\`tagNamePrefix: ${suggested}\\` instead (it defaults to \"v\", so you can drop the key entirely to keep the default).\\n` +\n \" This applies to GitHub only — GitLab's `vPrefixedTagName` is unchanged.\\n\" +\n \" Run `electron-builder migrate-schema` to update your configuration automatically.\\n\" +\n docLink(\"githuboptions-gitlaboptions-vprefixedtagname\")\n )\n }\n }\n check(config.publish, \"publish\")\n for (const platform of PLATFORMS_WITH_PUBLISH) {\n check(config[platform]?.publish, `${platform}.publish`)\n }\n}\n\n/**\n * Throws a single aggregated {@link InvalidConfigurationError} naming every v26 option found, and\n * warns about the ones that are merely discouraged. Runs before schema validation.\n */\nexport function checkLegacyConfiguration(config: Configuration): void {\n const raw = config as unknown as Record<string, any>\n const errors: string[] = []\n const warnings: string[] = []\n\n collectLegacyKeys(raw, errors, warnings)\n checkMacCustomSigner(raw, errors)\n checkWinSignDiscriminator(raw, errors)\n checkSnapcraftShape(raw, errors)\n checkPublishEntries(raw, errors)\n\n for (const warning of warnings) {\n log.warn(warning)\n }\n\n if (errors.length === 0) {\n return\n }\n\n const header =\n errors.length === 1\n ? \"Your configuration uses an option that was removed in electron-builder v27:\"\n : `Your configuration uses ${errors.length} options that were removed in electron-builder v27:`\n const message = [header, \"\", ...errors.map(e => `• ${e}`), \"\", `Full list of breaking changes: ${BREAKING_CHANGES_URL}`].join(\"\\n\")\n log.error(null, \"invalid configuration\")\n throw new InvalidConfigurationError(message)\n}\n"]}
|
|
1
|
+
{"version":3,"file":"legacyConfigGuard.js","sourceRoot":"","sources":["../../../src/util/config/legacyConfigGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAE7D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAA;AAE9K;;;;;;;;;;;GAWG;AAEH,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,K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,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAqB;IAC5D,MAAM,GAAG,GAAG,MAAwC,CAAA;IACpD,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,MAAM,QAAQ,GAAa,EAAE,CAAA;IAE7B,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;IACxC,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IACjC,yBAAyB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IACtC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IAChC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IAChC,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IAElC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACnB,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAM;IACR,CAAC;IAED,MAAM,MAAM,GACV,MAAM,CAAC,MAAM,KAAK,CAAC;QACjB,CAAC,CAAC,6EAA6E;QAC/E,CAAC,CAAC,2BAA2B,MAAM,CAAC,MAAM,qDAAqD,CAAA;IACnG,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,kCAAkC,oBAAoB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACnI,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA;IACxC,MAAM,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAA;AAC9C,CAAC","sourcesContent":["import { InvalidConfigurationError, log } from \"builder-util\"\nimport { Configuration } from \"../../configuration.js\"\nimport { hasFlatFileOption, isPlainObject } from \"./fileOptions.js\"\nimport { ALL_PLATFORM_KEYS, BREAKING_CHANGES_URL, FILE_OPTION_KEYS, FILE_OPTIONS_ANCHOR, formatLegacyOptionMessage, RESOLVED_LEGACY_CONFIG_OPTIONS } from \"./legacyOptions.js\"\n\n/**\n * Build-time guard for configurations still written against v26.\n *\n * Almost every removed key is already rejected by `scheme.json` (`additionalProperties: false`), but\n * ajv can only say \"has an unknown property 'identity'\" — it cannot say the option moved to\n * `mac.sign.identity`. This pass runs *before* schema validation so the targeted message wins, and it\n * aggregates every legacy key into a single error: a config with a dozen moved mac options should\n * not take a dozen build attempts to fix.\n *\n * Nothing here rejects a value a valid v27 config can contain — every guarded path is covered by a\n * test asserting the v27 schema rejects it too.\n */\n\nconst PLATFORMS_WITH_PUBLISH = [\"mac\", \"win\", \"linux\"] as const\n\n/** v26 `snap` options that belong under the base-named sub-key in v27, not directly on `snapcraft`. */\nconst SNAPCRAFT_BASE_LEVEL_KEYS = new Set([\n \"confinement\",\n \"grade\",\n \"stagePackages\",\n \"buildPackages\",\n \"plugs\",\n \"slots\",\n \"after\",\n \"environment\",\n \"hooks\",\n \"layout\",\n \"appPartStage\",\n \"assumes\",\n \"autoStart\",\n \"summary\",\n \"title\",\n \"compression\",\n \"allowNativeWayland\",\n \"useTemplateApp\",\n])\n\nconst SNAPCRAFT_BASES = [\"core18\", \"core20\", \"core22\", \"core24\", \"custom\"]\n\nfunction docLink(anchor: string): string {\n return ` ${BREAKING_CHANGES_URL}#${anchor}`\n}\n\n/** Resolves `path` against `config`, returning the holding object or null when any segment is missing. */\nfunction resolveParent(config: Record<string, any>, path: readonly string[]): Record<string, any> | null {\n let node: Record<string, any> = config\n for (const segment of path) {\n const next = node[segment]\n if (!isPlainObject(next)) {\n return null\n }\n node = next\n }\n return node\n}\n\n/** Collects the legacy keys present anywhere in the config, using the shared mapping table. */\nfunction collectLegacyKeys(config: Record<string, any>, errors: string[], warnings: string[]): void {\n for (const option of RESOLVED_LEGACY_CONFIG_OPTIONS) {\n const parent = resolveParent(config, option.parentPath)\n if (parent == null || !(option.key in parent)) {\n continue\n }\n const message = formatLegacyOptionMessage(option)\n if (option.severity === \"error\") {\n errors.push(message)\n } else {\n warnings.push(message)\n }\n }\n}\n\n/**\n * `mac.sign` is a single union in v27, so a custom signer and an options bag can no longer coexist.\n * The sibling fields are already reported by `collectLegacyKeys`; this adds the union explanation so\n * the user knows the two forms are mutually exclusive rather than assuming a mechanical move works.\n */\nfunction checkMacCustomSigner(config: Record<string, any>, errors: string[]): void {\n for (const platform of [\"mac\", \"mas\", \"masDev\"] as const) {\n const platformConfig = config[platform]\n if (!isPlainObject(platformConfig)) {\n continue\n }\n const sign = platformConfig.sign\n if (typeof sign !== \"string\" && typeof sign !== \"function\") {\n continue\n }\n const legacySiblings = RESOLVED_LEGACY_CONFIG_OPTIONS.filter(o => o.parentPath.length === 1 && o.parentPath[0] === platform && o.key in platformConfig).map(o => o.key)\n if (legacySiblings.length === 0) {\n continue\n }\n errors.push(\n `\\`${platform}.sign\\` is a custom signing function or module path, and \\`${platform}\\` also sets [${legacySiblings.join(\", \")}].\\n` +\n ` In v27 \\`${platform}.sign\\` is a single union — a custom signer cannot carry signing options alongside it.\\n` +\n ` Either keep the custom signer and read those options inside it, or drop it and use an ElectronSignOptions object.\\n` +\n docLink(\"macos-signing-macsign\")\n )\n }\n}\n\n/**\n * `win.sign` is a discriminated union in v27. Without `type`, ajv reports one\n * \"unknown property\" error per union branch and never mentions the missing discriminator.\n */\nfunction checkWinSignDiscriminator(config: Record<string, any>, errors: string[]): void {\n const sign = config.win?.sign\n if (!isPlainObject(sign) || \"type\" in sign) {\n return\n }\n errors.push(\n \"`win.sign` is missing its `type` discriminator.\\n\" +\n ' v27 types `win.sign` as a union: `type: \"signtool\" | \"hsm\" | \"pkcs11\" | \"azure\"`.\\n' +\n ' A config migrated from `win.signtoolOptions` needs `type: \"signtool\"`; one from `win.azureSignOptions` needs `type: \"azure\"`.\\n' +\n docLink(\"windows-signing-winsign\")\n )\n}\n\n/**\n * `snapcraft.base` is required, but because `snapcraft` is `anyOf[SnapcraftOptions, null]` the ajv\n * output collapses to \"configuration.snapcraft should be one of these: null\" — which reads as an\n * instruction to null out the config.\n */\nfunction checkSnapcraftShape(config: Record<string, any>, errors: string[]): void {\n const snapcraft = config.snapcraft\n if (!isPlainObject(snapcraft)) {\n return\n }\n if (!(\"base\" in snapcraft)) {\n errors.push(\n \"`snapcraft` is missing the required `base` field.\\n\" +\n ` Set it to one of ${SNAPCRAFT_BASES.map(b => `\"${b}\"`).join(\" | \")} and nest that base's options under a matching sub-key, ` +\n 'e.g. `{ \"snapcraft\": { \"base\": \"core22\", \"core22\": { … } } }`.\\n' +\n docLink(\"snap-snapcraft\")\n )\n return\n }\n const flatKeys = Object.keys(snapcraft).filter(k => SNAPCRAFT_BASE_LEVEL_KEYS.has(k))\n if (flatKeys.length > 0) {\n errors.push(\n `\\`snapcraft\\` sets [${flatKeys.join(\", \")}] directly, but in v27 those belong under the base-named sub-key.\\n` +\n ` Move them under \\`snapcraft.${snapcraft.base}\\`, e.g. \\`{ \"snapcraft\": { \"base\": \"${snapcraft.base}\", \"${snapcraft.base}\": { \"${flatKeys[0]}\": … } } }\\`.\\n` +\n docLink(\"snap-snapcraft\")\n )\n }\n}\n\n/**\n * `vPrefixedTagName` was removed from GitHub publish options only — GitLab still supports it, so the\n * check has to discriminate on `provider` rather than on the key name.\n */\nfunction checkPublishEntries(config: Record<string, any>, errors: string[]): void {\n const check = (value: unknown, label: string) => {\n if (value == null) {\n return\n }\n for (const entry of Array.isArray(value) ? value : [value]) {\n if (!isPlainObject(entry) || entry.provider !== \"github\" || !(\"vPrefixedTagName\" in entry)) {\n continue\n }\n const suggested = entry.vPrefixedTagName === false ? '\"\"' : '\"v\"'\n errors.push(\n `\\`${label}.vPrefixedTagName\\` was removed from the GitHub publish options in v27.\\n` +\n ` Use \\`tagNamePrefix: ${suggested}\\` instead (it defaults to \"v\", so you can drop the key entirely to keep the default).\\n` +\n \" This applies to GitHub only — GitLab's `vPrefixedTagName` is unchanged.\\n\" +\n \" Run `electron-builder migrate-schema` to update your configuration automatically.\\n\" +\n docLink(\"githuboptions-gitlaboptions-vprefixedtagname\")\n )\n }\n }\n check(config.publish, \"publish\")\n for (const platform of PLATFORMS_WITH_PUBLISH) {\n check(config[platform]?.publish, `${platform}.publish`)\n }\n}\n\n/**\n * `fileOptions` is an object holding the `files` / `extraResources` / `extraFiles` lists. Writing the `files` list itself\n * there (`\"fileOptions\": [\"dist/**\"]`) is an easy mistake when moving a `files` key into it by hand, and ajv only reports\n * that `fileOptions` \"should be object\". `normalizeFileOptions` leaves the flat keys next to such a value in place, so\n * they are named here too.\n */\nfunction checkFileOptionsShape(config: Record<string, any>, errors: string[]): void {\n const check = (holder: Record<string, any>, prefix: string) => {\n const value = holder.fileOptions\n if (value == null || isPlainObject(value)) {\n return\n }\n const flatKeys = FILE_OPTION_KEYS.filter(key => hasFlatFileOption(holder, key)).map(key => `${prefix}${key}`)\n const files = Array.isArray(value) || typeof value === \"string\" ? JSON.stringify(value) : '[\"**/*\"]'\n errors.push(\n `\\`${prefix}fileOptions\\` must be an object holding \\`files\\`, \\`extraResources\\` and/or \\`extraFiles\\`, not ${Array.isArray(value) ? \"an array\" : `a ${typeof value}`}` +\n (flatKeys.length > 0 ? ` (the configuration also sets [${flatKeys.join(\", \")}], which belong inside it)` : \"\") +\n \".\\n\" +\n ` e.g. \\`${prefix}fileOptions: { files: ${files} }\\`.\\n` +\n \" Run `electron-builder migrate-schema` (with `--config <path>` if your config file has another name) to move flat `files` / `extraResources` / `extraFiles` keys into it automatically.\\n\" +\n docLink(FILE_OPTIONS_ANCHOR)\n )\n }\n check(config, \"\")\n for (const platform of ALL_PLATFORM_KEYS) {\n if (isPlainObject(config[platform])) {\n check(config[platform], `${platform}.`)\n }\n }\n}\n\n/**\n * Throws a single aggregated {@link InvalidConfigurationError} naming every v26 option found, and\n * warns about the ones that are merely discouraged. Runs before schema validation.\n */\nexport function checkLegacyConfiguration(config: Configuration): void {\n const raw = config as unknown as Record<string, any>\n const errors: string[] = []\n const warnings: string[] = []\n\n collectLegacyKeys(raw, errors, warnings)\n checkMacCustomSigner(raw, errors)\n checkWinSignDiscriminator(raw, errors)\n checkSnapcraftShape(raw, errors)\n checkPublishEntries(raw, errors)\n checkFileOptionsShape(raw, errors)\n\n for (const warning of warnings) {\n log.warn(warning)\n }\n\n if (errors.length === 0) {\n return\n }\n\n const header =\n errors.length === 1\n ? \"Your configuration uses an option that was removed in electron-builder v27:\"\n : `Your configuration uses ${errors.length} options that were removed in electron-builder v27:`\n const message = [header, \"\", ...errors.map(e => `• ${e}`), \"\", `Full list of breaking changes: ${BREAKING_CHANGES_URL}`].join(\"\\n\")\n log.error(null, \"invalid configuration\")\n throw new InvalidConfigurationError(message)\n}\n"]}
|
|
@@ -35,6 +35,17 @@ export declare const NSIS_CONFIG_KEYS: readonly ["nsis", "nsisWeb", "portable"];
|
|
|
35
35
|
/** Every platform key that accepted the shared per-platform options in v26. */
|
|
36
36
|
export declare const ALL_PLATFORM_KEYS: readonly ["mac", "mas", "masDev", "win", "linux"];
|
|
37
37
|
export declare const BREAKING_CHANGES_URL = "https://www.electron.build/docs/migration/v27-breaking-changes";
|
|
38
|
+
/**
|
|
39
|
+
* File-copy options nested under `fileOptions`, at the configuration root and on every platform key
|
|
40
|
+
* (`files` → `fileOptions.files`, `mac.extraResources` → `mac.fileOptions.extraResources`, …).
|
|
41
|
+
*
|
|
42
|
+
* Unlike the options in {@link LEGACY_CONFIG_OPTIONS}, flat keys are not rejected: they are normalized into
|
|
43
|
+
* `fileOptions` with a warning when the configuration is loaded, before validation, although the types and the
|
|
44
|
+
* schema only have `fileOptions`.
|
|
45
|
+
*/
|
|
46
|
+
export declare const FILE_OPTION_KEYS: readonly ["files", "extraResources", "extraFiles"];
|
|
47
|
+
/** Anchor of the `fileOptions` entry within the breaking-changes page. */
|
|
48
|
+
export declare const FILE_OPTIONS_ANCHOR = "file-options-fileoptions";
|
|
38
49
|
export interface LegacyConfigOption {
|
|
39
50
|
/** The removed key itself. */
|
|
40
51
|
readonly key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacyOptions.d.ts","sourceRoot":"","sources":["../../../src/util/config/legacyOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,wGAAwG;AACxG,eAAO,MAAM,eAAe,kPAclB,CAAA;AAEV;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,+BAAgC,CAAA;AAEpE,yFAAyF;AACzF,eAAO,MAAM,oBAAoB,4DAA6D,CAAA;AAE9F;;;GAGG;AACH,eAAO,MAAM,kBAAkB,aAU7B,CAAA;AAEF,6GAA6G;AAC7G,eAAO,MAAM,yBAAyB,wGAAyG,CAAA;AAE/I,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,mCAAoC,CAAA;AAElE,sHAAsH;AACtH,eAAO,MAAM,gBAAgB,0CAA2C,CAAA;AAExE,+EAA+E;AAC/E,eAAO,MAAM,iBAAiB,mDAAoD,CAAA;AAElF,eAAO,MAAM,oBAAoB,mEAAmE,CAAA;AAEpG,MAAM,WAAW,kBAAkB;IACjC,8BAA8B;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,wEAAwE;IACxE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IAC9B,+EAA+E;IAC/E,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAA;IACnC,uFAAuF;IACvF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,+CAA+C;IAC/C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C,EAAE,MAAM,CAAA;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAeD,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EAyT9D,CAAA;AAED,kFAAkF;AAClF,MAAM,WAAW,0BAA2B,SAAQ,kBAAkB;IACpE,iDAAiD;IACjD,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;IACtC,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAcD,+EAA+E;AAC/E,eAAO,MAAM,8BAA8B,EAAE,SAAS,0BAA0B,EAAmC,CAAA;AAEnH;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,0BAA0B,GAAG,MAAM,CAmBpF"}
|
|
@@ -59,15 +59,28 @@ export const NSIS_CONFIG_KEYS = ["nsis", "nsisWeb", "portable"];
|
|
|
59
59
|
/** Every platform key that accepted the shared per-platform options in v26. */
|
|
60
60
|
export const ALL_PLATFORM_KEYS = ["mac", "mas", "masDev", "win", "linux"];
|
|
61
61
|
export const BREAKING_CHANGES_URL = "https://www.electron.build/docs/migration/v27-breaking-changes";
|
|
62
|
+
/**
|
|
63
|
+
* File-copy options nested under `fileOptions`, at the configuration root and on every platform key
|
|
64
|
+
* (`files` → `fileOptions.files`, `mac.extraResources` → `mac.fileOptions.extraResources`, …).
|
|
65
|
+
*
|
|
66
|
+
* Unlike the options in {@link LEGACY_CONFIG_OPTIONS}, flat keys are not rejected: they are normalized into
|
|
67
|
+
* `fileOptions` with a warning when the configuration is loaded, before validation, although the types and the
|
|
68
|
+
* schema only have `fileOptions`.
|
|
69
|
+
*/
|
|
70
|
+
export const FILE_OPTION_KEYS = ["files", "extraResources", "extraFiles"];
|
|
71
|
+
/** Anchor of the `fileOptions` entry within the breaking-changes page. */
|
|
72
|
+
export const FILE_OPTIONS_ANCHOR = "file-options-fileoptions";
|
|
62
73
|
const MAC_SIGN_ANCHOR = "macos-signing-macsign";
|
|
63
74
|
const ASAR_ANCHOR = "asar-options-asar";
|
|
64
75
|
const NATIVE_MODULES_ANCHOR = "native-module-options-nativemodules";
|
|
65
76
|
const ELECTRON_GET_ANCHOR = "electrondownload-electronget";
|
|
66
77
|
const WIN_SIGN_ANCHOR = "windows-signing-winsign";
|
|
67
|
-
const CUSTOM_NSIS_ANCHOR = "
|
|
68
|
-
const TOOLSETS_NSIS_DETAIL = "Set a custom NSIS bundle via `toolsets.nsis: { url, checksum, version }`.
|
|
69
|
-
"
|
|
70
|
-
"
|
|
78
|
+
const CUSTOM_NSIS_ANCHOR = "customnsisbinary-and-customnsisresources-replaced-by-toolsetsnsis";
|
|
79
|
+
const TOOLSETS_NSIS_DETAIL = "Set a custom NSIS bundle via `toolsets.nsis: { url, checksum, version }`. " +
|
|
80
|
+
"This is not a rename. The artifacts provided by `.customNsisBinary` & `.customNsisResources` have been merged into one toolset. " +
|
|
81
|
+
"To continue using custom NSIS binary/resources in your build see (https://www.electron.build/docs/toolsets#custom-nsis-bundle-layout). " +
|
|
82
|
+
"For a complete migration guide from `.customNsisBinary` & `.customNsisResources` to " +
|
|
83
|
+
"the new `toolsets.nsis` bundle see (https://www.electron.build/docs/migration/v26-to-v27#step-4-custom-nsis-migration-guide).";
|
|
71
84
|
export const LEGACY_CONFIG_OPTIONS = [
|
|
72
85
|
// ── Removed outright ──────────────────────────────────────────────────────
|
|
73
86
|
{
|
|
@@ -108,7 +121,7 @@ export const LEGACY_CONFIG_OPTIONS = [
|
|
|
108
121
|
replacement: null,
|
|
109
122
|
autoMigrated: true,
|
|
110
123
|
severity: "error",
|
|
111
|
-
detail: 'To keep a default-excluded file, name it concretely in a `files` glob instead — e.g. `"files": ["**/*", "**/*.obj"]`.',
|
|
124
|
+
detail: 'To keep a default-excluded file, name it concretely in a `fileOptions.files` glob instead — e.g. `"fileOptions": { "files": ["**/*", "**/*.obj"] }`.',
|
|
112
125
|
anchor: "disabledefaultignoredfiles",
|
|
113
126
|
},
|
|
114
127
|
{
|
|
@@ -153,6 +166,18 @@ export const LEGACY_CONFIG_OPTIONS = [
|
|
|
153
166
|
{ key: "disableAsarIntegrity", replacement: "asar.disableIntegrity", autoMigrated: true, severity: "error", anchor: ASAR_ANCHOR },
|
|
154
167
|
// ── Renamed / restructured: misc root ─────────────────────────────────────
|
|
155
168
|
{ key: "helper-bundle-id", replacement: "mac.helperBundleId", autoMigrated: true, severity: "error", anchor: "buildhelper-bundle-id" },
|
|
169
|
+
{
|
|
170
|
+
key: "includePdb",
|
|
171
|
+
replacement: "fileOptions.excludedExts",
|
|
172
|
+
autoMigrated: true,
|
|
173
|
+
severity: "error",
|
|
174
|
+
detail: "`.pdb` symbol files are now one of the extensions excluded by default, so the boolean is replaced by the list of excluded extensions. " +
|
|
175
|
+
'`includePdb: true` becomes `"fileOptions": { "excludedExts": ["default", "!pdb"] }` (the default extensions except `pdb`; on the command line, ' +
|
|
176
|
+
"repeat the flag: `-c.fileOptions.excludedExts=default -c.fileOptions.excludedExts=!pdb`, single-quoting the second one in an interactive bash or zsh); " +
|
|
177
|
+
"`includePdb: false` was the default: where it overrides an `includePdb: true` from another layer (an `extends` parent, or the config file for a `-c` / programmatic value), " +
|
|
178
|
+
'set `"fileOptions": { "excludedExts": ["default"] }` in its place (on the command line, `-c.fileOptions.excludedExts=default`), otherwise remove it.',
|
|
179
|
+
anchor: "includepdb-fileoptionsexcludedexts",
|
|
180
|
+
},
|
|
156
181
|
{
|
|
157
182
|
key: "noMsi",
|
|
158
183
|
parent: ["squirrelWindows"],
|
|
@@ -296,10 +321,11 @@ export const LEGACY_CONFIG_OPTIONS = [
|
|
|
296
321
|
replacement: section === "portable" ? "toolsets.nsis" : `\`toolsets.nsis\` and \`${section}.installerDebugLogging\``,
|
|
297
322
|
autoMigrated: false,
|
|
298
323
|
severity: "error",
|
|
299
|
-
detail:
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
324
|
+
detail: `Custom NSIS binaries now come from the \`toolsets.nsis\` bundle. ${TOOLSETS_NSIS_DETAIL} ` +
|
|
325
|
+
(section === "portable"
|
|
326
|
+
? "Property `debugLogging` never had an effect on portable targets and has no equivalent. "
|
|
327
|
+
: `Property \`debugLogging\` is now \`${section}.installerDebugLogging\` (which needs a log-enabled NSIS bundle). `) +
|
|
328
|
+
`\`electron-builder migrate-schema\` moves \`debugLogging\` but cannot convert \`url\` / \`checksum\` / \`version\`.`,
|
|
303
329
|
anchor: CUSTOM_NSIS_ANCHOR,
|
|
304
330
|
},
|
|
305
331
|
{
|
|
@@ -308,7 +334,7 @@ export const LEGACY_CONFIG_OPTIONS = [
|
|
|
308
334
|
replacement: "toolsets.nsis",
|
|
309
335
|
autoMigrated: false,
|
|
310
336
|
severity: "error",
|
|
311
|
-
detail: `
|
|
337
|
+
detail: `Custom NSIS resources now come from the \`toolsets.nsis\` bundle. ${TOOLSETS_NSIS_DETAIL}`,
|
|
312
338
|
anchor: CUSTOM_NSIS_ANCHOR,
|
|
313
339
|
},
|
|
314
340
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacyOptions.js","sourceRoot":"","sources":["../../../src/util/config/legacyOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,wGAAwG;AACxG,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,UAAU;IACV,cAAc;IACd,qBAAqB;IACrB,yBAAyB;IACzB,qBAAqB;IACrB,MAAM;IACN,UAAU;IACV,cAAc;IACd,iBAAiB;IACjB,cAAc;IACd,qBAAqB;IACrB,WAAW;IACX,qBAAqB;CACb,CAAA;AAEV;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,kBAAkB,CAAU,CAAA;AAEpE,yFAAyF;AACzF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,YAAY,EAAE,iBAAiB,EAAE,cAAc,CAAU,CAAA;AAE9F;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB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AED,+EAA+E;AAC/E,MAAM,CAAC,MAAM,8BAA8B,GAA0C,OAAO,CAAC,qBAAqB,CAAC,CAAA;AAEnH;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAkC;IAC1E,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,IAAI,MAAM,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,QAAQ,yCAAyC,CAAC,CAAA;IAC3E,CAAC;SAAM,CAAC;QACN,qGAAqG;QACrG,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC;YAClD,CAAC,CAAC,MAAM,CAAC,WAAW;YACpB,CAAC,CAAC,KAAK,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAA;QAC7G,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,QAAQ,sBAAsB,WAAW,2BAA2B,CAAC,CAAA;IAC9F,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;IAClC,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,qFAAqF,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,KAAK,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;IACxD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC","sourcesContent":["/**\n * Single source of truth for the v26 → v27 configuration migration.\n *\n * Two consumers read this table and must never drift apart:\n * - `checkLegacyConfiguration` (this package) — the build-time guard that tells a user who upgraded\n * without reading the migration guide exactly which key moved where.\n * - `electron-builder migrate-schema` (the `electron-builder` package) — the opt-in rewriter.\n *\n * The migrator lives in a package that depends on this one, so the table has to live here for both\n * to share it. Keeping the field lists in one place is not cosmetic: `gatekeeperAssess` was moved\n * into `mac.sign` by the migrator while the schema rejected it there, producing configs that failed\n * validation on the next build.\n */\n\n/** macOS signing fields that moved from the platform root into the `sign` (ElectronSignOptions) bag. */\nexport const MAC_SIGN_FIELDS = [\n \"identity\",\n \"entitlements\",\n \"entitlementsInherit\",\n \"entitlementsLoginHelper\",\n \"provisioningProfile\",\n \"type\",\n \"binaries\",\n \"requirements\",\n \"hardenedRuntime\",\n \"strictVerify\",\n \"preAutoEntitlements\",\n \"timestamp\",\n \"additionalArguments\",\n] as const\n\n/**\n * macOS signing fields that were removed outright rather than moved under `sign`.\n * `@electron/osx-sign` 2.x dropped the `spctl --assess` step, so there is no `sign.gatekeeperAssess`\n * to migrate to — `ElectronSignOptions` omits it and the schema rejects it.\n */\nexport const MAC_SIGN_REMOVED_FIELDS = [\"gatekeeperAssess\"] as const\n\n/** Universal-build fields that moved from the platform root into the `universal` bag. */\nexport const MAC_UNIVERSAL_FIELDS = [\"mergeASARs\", \"singleArchFiles\", \"x64ArchFiles\"] as const\n\n/**\n * Azure Trusted Signing typed fields in v27 (everything else is an extra key → `additionalMetadata`).\n * `type` is included so it is not mistakenly moved to `additionalMetadata` if already present.\n */\nexport const AZURE_KNOWN_FIELDS = new Set([\n \"type\",\n \"endpoint\",\n \"codeSigningAccountName\",\n \"certificateProfileName\",\n \"publisherName\",\n \"fileDigest\",\n \"timestampRfc3161\",\n \"timestampDigest\",\n \"additionalMetadata\",\n])\n\n/** `electronDownload` fields with no equivalent in the v27 `ElectronGetOptions` (@electron/get v5) shape. */\nexport const ELECTRON_DOWNLOAD_DROPPED = [\"cache\", \"customDir\", \"customFilename\", \"strictSSL\", \"platform\", \"arch\", \"version\", \"force\"] as const\n\n/** Platform keys that accept the macOS signing/universal options. */\nexport const MAC_PLATFORM_KEYS = [\"mac\", \"mas\", \"masDev\"] as const\n\n/** Config sections typed as `CommonNsisOptions`, which accepted `customNsisBinary` / `customNsisResources` in v26. */\nexport const NSIS_CONFIG_KEYS = [\"nsis\", \"nsisWeb\", \"portable\"] as const\n\n/** Every platform key that accepted the shared per-platform options in v26. */\nexport const ALL_PLATFORM_KEYS = [\"mac\", \"mas\", \"masDev\", \"win\", \"linux\"] as const\n\nexport const BREAKING_CHANGES_URL = \"https://www.electron.build/docs/migration/v27-breaking-changes\"\n\nexport interface LegacyConfigOption {\n /** The removed key itself. */\n readonly key: string\n /** Path to the object holding `key`. Empty = the configuration root. */\n readonly parent?: readonly string[]\n /**\n * When set, `parent` is ignored and one entry is generated per platform key:\n * `\"mac\"` → mac/mas/masDev, `\"all\"` → those plus win/linux.\n */\n readonly scope?: \"mac\" | \"all\"\n /** The v27 form, or `null` when the option was removed with no replacement. */\n readonly replacement: string | null\n /** True when `electron-builder migrate-schema` rewrites this automatically. */\n readonly autoMigrated: boolean\n readonly severity: \"error\" | \"warn\"\n /** Extra sentence appended to the message — inverted polarity, lost behaviour, etc. */\n readonly detail?: string\n /** Anchor within the breaking-changes page. */\n readonly anchor: string\n}\n\nconst MAC_SIGN_ANCHOR = \"macos-signing-macsign\"\nconst ASAR_ANCHOR = \"asar-options-asar\"\nconst NATIVE_MODULES_ANCHOR = \"native-module-options-nativemodules\"\nconst ELECTRON_GET_ANCHOR = \"electrondownload-electronget\"\nconst WIN_SIGN_ANCHOR = \"windows-signing-winsign\"\nconst CUSTOM_NSIS_ANCHOR = \"nsiscustomnsisbinary-toolsetsnsis\"\nconst TOOLSETS_NSIS_DETAIL =\n \"Set a custom NSIS bundle via `toolsets.nsis: { url, checksum, version }`. The v26 checksum (base64 SHA-512) works unchanged, as does a SHA-256 hex \" +\n \"(https://www.electron.build/docs/toolsets#custom-toolset-checksum), but it is not a rename: the bundle must contain the \" +\n \"NSIS plugins (`plugins/` or `windows/Plugins/`), which v26 read from a separate resources bundle (https://www.electron.build/docs/toolsets#custom-nsis-bundle-layout).\"\n\nexport const LEGACY_CONFIG_OPTIONS: readonly LegacyConfigOption[] = [\n // ── Removed outright ──────────────────────────────────────────────────────\n {\n key: \"electronCompile\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"electron-compile is unmaintained (no release since 2019). Compile your sources with electron-vite, esbuild, or webpack before packaging.\",\n anchor: \"electroncompile\",\n },\n {\n key: \"framework\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: 'Electron is the only supported framework — \"electron\" was and remains the default. `proton` / `proton-native` and `libui` support was removed.',\n anchor: \"framework-nodeversion-launchuiversion\",\n },\n {\n key: \"nodeVersion\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"It only applied to libui-based frameworks and never affected Electron builds.\",\n anchor: \"framework-nodeversion-launchuiversion\",\n },\n {\n key: \"launchUiVersion\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"It only applied to libui-based frameworks on Windows.\",\n anchor: \"framework-nodeversion-launchuiversion\",\n },\n {\n key: \"disableDefaultIgnoredFiles\",\n scope: \"all\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: 'To keep a default-excluded file, name it concretely in a `files` glob instead — e.g. `\"files\": [\"**/*\", \"**/*.obj\"]`.',\n anchor: \"disabledefaultignoredfiles\",\n },\n {\n key: \"systemIntegration\",\n parent: [\"appImage\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"Desktop integration is handled automatically by AppImageLauncher.\",\n anchor: \"appimagesystemintegration\",\n },\n {\n key: \"syncDesktopName\",\n parent: [\"linux\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail:\n \"The behaviour it gated is now always on: the installed .desktop filename is always derived from `desktopName` (falling back to executableName). \" +\n \"If you relied on the old filename, set `desktopName` explicitly to control it.\",\n anchor: \"linuxsyncdesktopname-always-synced\",\n },\n\n // ── Renamed / restructured: native modules ────────────────────────────────\n {\n key: \"npmSkipBuildFromSource\",\n replacement: \"nativeModules.buildDependenciesFromSource\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"Note the value is INVERTED — `npmSkipBuildFromSource: true` becomes `nativeModules.buildDependenciesFromSource: false`.\",\n anchor: \"npmskipbuildfromsource\",\n },\n { key: \"buildDependenciesFromSource\", replacement: \"nativeModules.buildDependenciesFromSource\", autoMigrated: true, severity: \"error\", anchor: NATIVE_MODULES_ANCHOR },\n { key: \"nodeGypRebuild\", replacement: \"nativeModules.nodeGypRebuild\", autoMigrated: true, severity: \"error\", anchor: NATIVE_MODULES_ANCHOR },\n { key: \"npmRebuild\", replacement: \"nativeModules.npmRebuild\", autoMigrated: true, severity: \"error\", anchor: NATIVE_MODULES_ANCHOR },\n { key: \"nativeRebuilder\", replacement: \"nativeModules.rebuildMode\", autoMigrated: true, severity: \"error\", anchor: NATIVE_MODULES_ANCHOR },\n\n // ── Renamed / restructured: asar ──────────────────────────────────────────\n { key: \"asarUnpack\", scope: \"all\", replacement: \"asar.unpack\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"asarUnpack\", replacement: \"asar.unpack\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"asar-unpack\", replacement: \"asar.unpack\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"asar-unpack-dir\", replacement: \"asar.unpack\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"unpackDir\", parent: [\"asar\"], replacement: \"asar.unpack\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"disableSanityCheckAsar\", replacement: \"asar.disableSanityCheck\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"disableAsarIntegrity\", replacement: \"asar.disableIntegrity\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n\n // ── Renamed / restructured: misc root ─────────────────────────────────────\n { key: \"helper-bundle-id\", replacement: \"mac.helperBundleId\", autoMigrated: true, severity: \"error\", anchor: \"buildhelper-bundle-id\" },\n {\n key: \"noMsi\",\n parent: [\"squirrelWindows\"],\n replacement: \"squirrelWindows.msi\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"Note the value is INVERTED — `noMsi: true` becomes `msi: false`.\",\n anchor: \"squirrelwindowsnomsi\",\n },\n {\n key: \"customSquirrelVendorDir\",\n parent: [\"squirrelWindows\"],\n replacement: \"toolsets.squirrel\",\n autoMigrated: false,\n severity: \"error\",\n detail:\n \"The bundle layout differs: a custom `toolsets.squirrel` bundle (a `ToolsetCustom` object) must contain an `electron-winstaller/vendor/` subtree, \" +\n \"whereas `customSquirrelVendorDir` pointed at the vendor files directly. Remove the key to use the default Squirrel bundle.\",\n anchor: \"squirrelwindowscustomsquirrelvendordir\",\n },\n {\n key: \"snap\",\n replacement: \"snapcraft\",\n autoMigrated: true,\n severity: \"error\",\n detail: 'The new shape needs an explicit `base` with per-base options nested under it, e.g. `{ \"snapcraft\": { \"base\": \"core22\", \"core22\": { … } } }`.',\n anchor: \"snap-snapcraft\",\n },\n\n // ── Renamed / restructured: electronDownload → electronGet ────────────────\n {\n key: \"electronDownload\",\n replacement: \"electronGet\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"The shape also changed to match @electron/get v5: `mirror` → `mirrorOptions.mirror`, `isVerifyChecksum: false` → `unsafelyDisableChecksums: true`.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"isVerifyChecksum\",\n parent: [\"electronGet\"],\n replacement: \"electronGet.unsafelyDisableChecksums\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"Note the value is INVERTED — `isVerifyChecksum: false` becomes `unsafelyDisableChecksums: true`.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"mirror\",\n parent: [\"electronGet\"],\n replacement: \"electronGet.mirrorOptions.mirror\",\n autoMigrated: true,\n severity: \"error\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"cache\",\n parent: [\"electronGet\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"It is intentionally not exposed as a config key — set the `ELECTRON_BUILDER_CACHE` environment variable instead.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"customDir\",\n parent: [\"electronGet\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"Use `electronDist` to stage a custom Electron build.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"customFilename\",\n parent: [\"electronGet\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"Use `electronDist` to stage a custom Electron build.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"strictSSL\",\n parent: [\"electronGet\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"@electron/get v5 downloads via `fetch`, which has no equivalent option.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"force\",\n parent: [\"electronGet\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"@electron/get v5 has no equivalent. Clear the cache directory (or point `ELECTRON_BUILDER_CACHE` at a fresh path) to force a re-download.\",\n anchor: \"electrongetoptionsforce-removed\",\n },\n\n // ── Windows signing ───────────────────────────────────────────────────────\n {\n key: \"signtoolOptions\",\n parent: [\"win\"],\n replacement: 'win.sign with `type: \"signtool\"`',\n autoMigrated: true,\n severity: \"error\",\n detail: \"All fields move verbatim; add the `type` discriminator.\",\n anchor: WIN_SIGN_ANCHOR,\n },\n {\n key: \"azureSignOptions\",\n parent: [\"win\"],\n replacement: 'win.sign with `type: \"azure\"`',\n autoMigrated: true,\n severity: \"error\",\n detail: \"Fields move verbatim; any extra keys that used the old index signature move into `additionalMetadata`.\",\n anchor: WIN_SIGN_ANCHOR,\n },\n {\n key: \"signExecutable\",\n parent: [\"win\"],\n replacement: \"win.sign: false\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"Only the `false` case has an equivalent (it disables signing; resource editing still runs). `signExecutable: true` was the default — delete it.\",\n anchor: \"winsignexecutable-winsignandeditexecutable-removed\",\n },\n {\n key: \"signAndEditExecutable\",\n parent: [\"win\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"Resource editing always runs in v27. To skip signing only, set `win.sign: false`; there is no equivalent that also skips resource editing.\",\n anchor: \"winsignexecutable-winsignandeditexecutable-removed\",\n },\n\n // ── NSIS: custom bundles moved to toolsets.nsis ───────────────────────────\n ...NSIS_CONFIG_KEYS.flatMap((section): LegacyConfigOption[] => [\n {\n key: \"customNsisBinary\",\n parent: [section],\n replacement: section === \"portable\" ? \"toolsets.nsis\" : `\\`toolsets.nsis\\` and \\`${section}.installerDebugLogging\\``,\n autoMigrated: false,\n severity: \"error\",\n detail:\n (section === \"portable\"\n ? \"Its `debugLogging` never had an effect on portable targets and has no equivalent. \"\n : `Its \\`debugLogging\\` is now \\`${section}.installerDebugLogging\\` (which needs a log-enabled NSIS bundle). `) +\n `${TOOLSETS_NSIS_DETAIL} \\`electron-builder migrate-schema\\` moves \\`debugLogging\\` but cannot convert \\`url\\` / \\`checksum\\` / \\`version\\`.`,\n anchor: CUSTOM_NSIS_ANCHOR,\n },\n {\n key: \"customNsisResources\",\n parent: [section],\n replacement: \"toolsets.nsis\",\n autoMigrated: false,\n severity: \"error\",\n detail: `The NSIS plugins now come from the \\`toolsets.nsis\\` bundle. Remove the key to use the default plugins. ${TOOLSETS_NSIS_DETAIL}`,\n anchor: CUSTOM_NSIS_ANCHOR,\n },\n ]),\n\n // ── Programmatic PackagerOptions leaking into the config object ───────────\n {\n key: \"devMetadata\",\n replacement: null,\n autoMigrated: false,\n severity: \"error\",\n detail: \"Put build configuration at the configuration root instead.\",\n anchor: \"devmetadata-extrametadata-programmatic-packageroptions\",\n },\n\n // ── macOS signing: one entry per moved field, per platform key ────────────\n ...MAC_SIGN_FIELDS.map((field): LegacyConfigOption => ({\n key: field,\n scope: \"mac\",\n replacement: `sign.${field}`,\n autoMigrated: true,\n severity: \"error\",\n anchor: MAC_SIGN_ANCHOR,\n })),\n {\n key: \"signIgnore\",\n scope: \"mac\",\n replacement: \"sign.ignore\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"Renamed to the @electron/osx-sign canonical name.\",\n anchor: MAC_SIGN_ANCHOR,\n },\n ...MAC_SIGN_REMOVED_FIELDS.map((field): LegacyConfigOption => ({\n key: field,\n scope: \"mac\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"@electron/osx-sign 2.x removed the `spctl --assess` step entirely, so there is no `sign.gatekeeperAssess` to move it to.\",\n anchor: MAC_SIGN_ANCHOR,\n })),\n ...MAC_UNIVERSAL_FIELDS.map((field): LegacyConfigOption => ({\n key: field,\n scope: \"mac\",\n replacement: `universal.${field}`,\n autoMigrated: true,\n severity: \"error\",\n anchor: \"macuniversal\",\n })),\n]\n\n/** A `LegacyConfigOption` with its `scope` expanded to a concrete parent path. */\nexport interface ResolvedLegacyConfigOption extends LegacyConfigOption {\n /** Concrete path of the object holding `key`. */\n readonly parentPath: readonly string[]\n /** Dot-joined `parentPath` + `key`, as it appears in a user's config. */\n readonly fullPath: string\n}\n\nfunction resolve(options: readonly LegacyConfigOption[]): readonly ResolvedLegacyConfigOption[] {\n const resolved: ResolvedLegacyConfigOption[] = []\n for (const option of options) {\n const parents: Array<readonly string[]> =\n option.scope === \"mac\" ? MAC_PLATFORM_KEYS.map(p => [p]) : option.scope === \"all\" ? ALL_PLATFORM_KEYS.map(p => [p]) : [option.parent ?? []]\n for (const parentPath of parents) {\n resolved.push({ ...option, parentPath, fullPath: [...parentPath, option.key].join(\".\") })\n }\n }\n return resolved\n}\n\n/** `LEGACY_CONFIG_OPTIONS` with every `scope` expanded into concrete paths. */\nexport const RESOLVED_LEGACY_CONFIG_OPTIONS: readonly ResolvedLegacyConfigOption[] = resolve(LEGACY_CONFIG_OPTIONS)\n\n/**\n * Renders the user-facing message for a single legacy option.\n *\n * A scoped option's `replacement` is relative to its platform key (`sign.identity`), so it is\n * prefixed with the resolved parent to read as the user wrote it (`mac.sign.identity`).\n */\nexport function formatLegacyOptionMessage(option: ResolvedLegacyConfigOption): string {\n const lines: string[] = []\n if (option.replacement == null) {\n lines.push(`\\`${option.fullPath}\\` was removed in electron-builder v27.`)\n } else {\n // A replacement containing a space is prose (\"win.sign with `type: \\\"signtool\\\"`\") — leave it as-is.\n const replacement = option.replacement.includes(\" \")\n ? option.replacement\n : `\\`${option.scope == null ? option.replacement : [...option.parentPath, option.replacement].join(\".\")}\\``\n lines.push(`\\`${option.fullPath}\\` was replaced by ${replacement} in electron-builder v27.`)\n }\n if (option.detail != null) {\n lines.push(` ${option.detail}`)\n }\n if (option.autoMigrated) {\n lines.push(\" Run `electron-builder migrate-schema` to update your configuration automatically.\")\n }\n lines.push(` ${BREAKING_CHANGES_URL}#${option.anchor}`)\n return lines.join(\"\\n\")\n}\n"]}
|
|
1
|
+
{"version":3,"file":"legacyOptions.js","sourceRoot":"","sources":["../../../src/util/config/legacyOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,wGAAwG;AACxG,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,UAAU;IACV,cAAc;IACd,qBAAqB;IACrB,yBAAyB;IACzB,qBAAqB;IACrB,MAAM;IACN,UAAU;IACV,cAAc;IACd,iBAAiB;IACjB,cAAc;IACd,qBAAqB;IACrB,WAAW;IACX,qBAAqB;CACb,CAAA;AAEV;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,kBAAkB,CAAU,CAAA;AAEpE,yFAAyF;AACzF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,YAAY,EAAE,iBAAiB,EAAE,cAAc,CAAU,CAAA;AAE9F;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACxC,MAAM;IACN,UAAU;IACV,wBAAwB;I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AC,IAAI,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;IAClC,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,qFAAqF,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,KAAK,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;IACxD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC","sourcesContent":["/**\n * Single source of truth for the v26 → v27 configuration migration.\n *\n * Two consumers read this table and must never drift apart:\n * - `checkLegacyConfiguration` (this package) — the build-time guard that tells a user who upgraded\n * without reading the migration guide exactly which key moved where.\n * - `electron-builder migrate-schema` (the `electron-builder` package) — the opt-in rewriter.\n *\n * The migrator lives in a package that depends on this one, so the table has to live here for both\n * to share it. Keeping the field lists in one place is not cosmetic: `gatekeeperAssess` was moved\n * into `mac.sign` by the migrator while the schema rejected it there, producing configs that failed\n * validation on the next build.\n */\n\n/** macOS signing fields that moved from the platform root into the `sign` (ElectronSignOptions) bag. */\nexport const MAC_SIGN_FIELDS = [\n \"identity\",\n \"entitlements\",\n \"entitlementsInherit\",\n \"entitlementsLoginHelper\",\n \"provisioningProfile\",\n \"type\",\n \"binaries\",\n \"requirements\",\n \"hardenedRuntime\",\n \"strictVerify\",\n \"preAutoEntitlements\",\n \"timestamp\",\n \"additionalArguments\",\n] as const\n\n/**\n * macOS signing fields that were removed outright rather than moved under `sign`.\n * `@electron/osx-sign` 2.x dropped the `spctl --assess` step, so there is no `sign.gatekeeperAssess`\n * to migrate to — `ElectronSignOptions` omits it and the schema rejects it.\n */\nexport const MAC_SIGN_REMOVED_FIELDS = [\"gatekeeperAssess\"] as const\n\n/** Universal-build fields that moved from the platform root into the `universal` bag. */\nexport const MAC_UNIVERSAL_FIELDS = [\"mergeASARs\", \"singleArchFiles\", \"x64ArchFiles\"] as const\n\n/**\n * Azure Trusted Signing typed fields in v27 (everything else is an extra key → `additionalMetadata`).\n * `type` is included so it is not mistakenly moved to `additionalMetadata` if already present.\n */\nexport const AZURE_KNOWN_FIELDS = new Set([\n \"type\",\n \"endpoint\",\n \"codeSigningAccountName\",\n \"certificateProfileName\",\n \"publisherName\",\n \"fileDigest\",\n \"timestampRfc3161\",\n \"timestampDigest\",\n \"additionalMetadata\",\n])\n\n/** `electronDownload` fields with no equivalent in the v27 `ElectronGetOptions` (@electron/get v5) shape. */\nexport const ELECTRON_DOWNLOAD_DROPPED = [\"cache\", \"customDir\", \"customFilename\", \"strictSSL\", \"platform\", \"arch\", \"version\", \"force\"] as const\n\n/** Platform keys that accept the macOS signing/universal options. */\nexport const MAC_PLATFORM_KEYS = [\"mac\", \"mas\", \"masDev\"] as const\n\n/** Config sections typed as `CommonNsisOptions`, which accepted `customNsisBinary` / `customNsisResources` in v26. */\nexport const NSIS_CONFIG_KEYS = [\"nsis\", \"nsisWeb\", \"portable\"] as const\n\n/** Every platform key that accepted the shared per-platform options in v26. */\nexport const ALL_PLATFORM_KEYS = [\"mac\", \"mas\", \"masDev\", \"win\", \"linux\"] as const\n\nexport const BREAKING_CHANGES_URL = \"https://www.electron.build/docs/migration/v27-breaking-changes\"\n\n/**\n * File-copy options nested under `fileOptions`, at the configuration root and on every platform key\n * (`files` → `fileOptions.files`, `mac.extraResources` → `mac.fileOptions.extraResources`, …).\n *\n * Unlike the options in {@link LEGACY_CONFIG_OPTIONS}, flat keys are not rejected: they are normalized into\n * `fileOptions` with a warning when the configuration is loaded, before validation, although the types and the\n * schema only have `fileOptions`.\n */\nexport const FILE_OPTION_KEYS = [\"files\", \"extraResources\", \"extraFiles\"] as const\n\n/** Anchor of the `fileOptions` entry within the breaking-changes page. */\nexport const FILE_OPTIONS_ANCHOR = \"file-options-fileoptions\"\n\nexport interface LegacyConfigOption {\n /** The removed key itself. */\n readonly key: string\n /** Path to the object holding `key`. Empty = the configuration root. */\n readonly parent?: readonly string[]\n /**\n * When set, `parent` is ignored and one entry is generated per platform key:\n * `\"mac\"` → mac/mas/masDev, `\"all\"` → those plus win/linux.\n */\n readonly scope?: \"mac\" | \"all\"\n /** The v27 form, or `null` when the option was removed with no replacement. */\n readonly replacement: string | null\n /** True when `electron-builder migrate-schema` rewrites this automatically. */\n readonly autoMigrated: boolean\n readonly severity: \"error\" | \"warn\"\n /** Extra sentence appended to the message — inverted polarity, lost behaviour, etc. */\n readonly detail?: string\n /** Anchor within the breaking-changes page. */\n readonly anchor: string\n}\n\nconst MAC_SIGN_ANCHOR = \"macos-signing-macsign\"\nconst ASAR_ANCHOR = \"asar-options-asar\"\nconst NATIVE_MODULES_ANCHOR = \"native-module-options-nativemodules\"\nconst ELECTRON_GET_ANCHOR = \"electrondownload-electronget\"\nconst WIN_SIGN_ANCHOR = \"windows-signing-winsign\"\nconst CUSTOM_NSIS_ANCHOR = \"customnsisbinary-and-customnsisresources-replaced-by-toolsetsnsis\"\nconst TOOLSETS_NSIS_DETAIL =\n \"Set a custom NSIS bundle via `toolsets.nsis: { url, checksum, version }`. \" +\n \"This is not a rename. The artifacts provided by `.customNsisBinary` & `.customNsisResources` have been merged into one toolset. \" +\n \"To continue using custom NSIS binary/resources in your build see (https://www.electron.build/docs/toolsets#custom-nsis-bundle-layout). \" +\n \"For a complete migration guide from `.customNsisBinary` & `.customNsisResources` to \" +\n \"the new `toolsets.nsis` bundle see (https://www.electron.build/docs/migration/v26-to-v27#step-4-custom-nsis-migration-guide).\"\n\nexport const LEGACY_CONFIG_OPTIONS: readonly LegacyConfigOption[] = [\n // ── Removed outright ──────────────────────────────────────────────────────\n {\n key: \"electronCompile\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"electron-compile is unmaintained (no release since 2019). Compile your sources with electron-vite, esbuild, or webpack before packaging.\",\n anchor: \"electroncompile\",\n },\n {\n key: \"framework\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: 'Electron is the only supported framework — \"electron\" was and remains the default. `proton` / `proton-native` and `libui` support was removed.',\n anchor: \"framework-nodeversion-launchuiversion\",\n },\n {\n key: \"nodeVersion\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"It only applied to libui-based frameworks and never affected Electron builds.\",\n anchor: \"framework-nodeversion-launchuiversion\",\n },\n {\n key: \"launchUiVersion\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"It only applied to libui-based frameworks on Windows.\",\n anchor: \"framework-nodeversion-launchuiversion\",\n },\n {\n key: \"disableDefaultIgnoredFiles\",\n scope: \"all\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: 'To keep a default-excluded file, name it concretely in a `fileOptions.files` glob instead — e.g. `\"fileOptions\": { \"files\": [\"**/*\", \"**/*.obj\"] }`.',\n anchor: \"disabledefaultignoredfiles\",\n },\n {\n key: \"systemIntegration\",\n parent: [\"appImage\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"Desktop integration is handled automatically by AppImageLauncher.\",\n anchor: \"appimagesystemintegration\",\n },\n {\n key: \"syncDesktopName\",\n parent: [\"linux\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail:\n \"The behaviour it gated is now always on: the installed .desktop filename is always derived from `desktopName` (falling back to executableName). \" +\n \"If you relied on the old filename, set `desktopName` explicitly to control it.\",\n anchor: \"linuxsyncdesktopname-always-synced\",\n },\n\n // ── Renamed / restructured: native modules ────────────────────────────────\n {\n key: \"npmSkipBuildFromSource\",\n replacement: \"nativeModules.buildDependenciesFromSource\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"Note the value is INVERTED — `npmSkipBuildFromSource: true` becomes `nativeModules.buildDependenciesFromSource: false`.\",\n anchor: \"npmskipbuildfromsource\",\n },\n { key: \"buildDependenciesFromSource\", replacement: \"nativeModules.buildDependenciesFromSource\", autoMigrated: true, severity: \"error\", anchor: NATIVE_MODULES_ANCHOR },\n { key: \"nodeGypRebuild\", replacement: \"nativeModules.nodeGypRebuild\", autoMigrated: true, severity: \"error\", anchor: NATIVE_MODULES_ANCHOR },\n { key: \"npmRebuild\", replacement: \"nativeModules.npmRebuild\", autoMigrated: true, severity: \"error\", anchor: NATIVE_MODULES_ANCHOR },\n { key: \"nativeRebuilder\", replacement: \"nativeModules.rebuildMode\", autoMigrated: true, severity: \"error\", anchor: NATIVE_MODULES_ANCHOR },\n\n // ── Renamed / restructured: asar ──────────────────────────────────────────\n { key: \"asarUnpack\", scope: \"all\", replacement: \"asar.unpack\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"asarUnpack\", replacement: \"asar.unpack\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"asar-unpack\", replacement: \"asar.unpack\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"asar-unpack-dir\", replacement: \"asar.unpack\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"unpackDir\", parent: [\"asar\"], replacement: \"asar.unpack\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"disableSanityCheckAsar\", replacement: \"asar.disableSanityCheck\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n { key: \"disableAsarIntegrity\", replacement: \"asar.disableIntegrity\", autoMigrated: true, severity: \"error\", anchor: ASAR_ANCHOR },\n\n // ── Renamed / restructured: misc root ─────────────────────────────────────\n { key: \"helper-bundle-id\", replacement: \"mac.helperBundleId\", autoMigrated: true, severity: \"error\", anchor: \"buildhelper-bundle-id\" },\n {\n key: \"includePdb\",\n replacement: \"fileOptions.excludedExts\",\n autoMigrated: true,\n severity: \"error\",\n detail:\n \"`.pdb` symbol files are now one of the extensions excluded by default, so the boolean is replaced by the list of excluded extensions. \" +\n '`includePdb: true` becomes `\"fileOptions\": { \"excludedExts\": [\"default\", \"!pdb\"] }` (the default extensions except `pdb`; on the command line, ' +\n \"repeat the flag: `-c.fileOptions.excludedExts=default -c.fileOptions.excludedExts=!pdb`, single-quoting the second one in an interactive bash or zsh); \" +\n \"`includePdb: false` was the default: where it overrides an `includePdb: true` from another layer (an `extends` parent, or the config file for a `-c` / programmatic value), \" +\n 'set `\"fileOptions\": { \"excludedExts\": [\"default\"] }` in its place (on the command line, `-c.fileOptions.excludedExts=default`), otherwise remove it.',\n anchor: \"includepdb-fileoptionsexcludedexts\",\n },\n {\n key: \"noMsi\",\n parent: [\"squirrelWindows\"],\n replacement: \"squirrelWindows.msi\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"Note the value is INVERTED — `noMsi: true` becomes `msi: false`.\",\n anchor: \"squirrelwindowsnomsi\",\n },\n {\n key: \"customSquirrelVendorDir\",\n parent: [\"squirrelWindows\"],\n replacement: \"toolsets.squirrel\",\n autoMigrated: false,\n severity: \"error\",\n detail:\n \"The bundle layout differs: a custom `toolsets.squirrel` bundle (a `ToolsetCustom` object) must contain an `electron-winstaller/vendor/` subtree, \" +\n \"whereas `customSquirrelVendorDir` pointed at the vendor files directly. Remove the key to use the default Squirrel bundle.\",\n anchor: \"squirrelwindowscustomsquirrelvendordir\",\n },\n {\n key: \"snap\",\n replacement: \"snapcraft\",\n autoMigrated: true,\n severity: \"error\",\n detail: 'The new shape needs an explicit `base` with per-base options nested under it, e.g. `{ \"snapcraft\": { \"base\": \"core22\", \"core22\": { … } } }`.',\n anchor: \"snap-snapcraft\",\n },\n\n // ── Renamed / restructured: electronDownload → electronGet ────────────────\n {\n key: \"electronDownload\",\n replacement: \"electronGet\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"The shape also changed to match @electron/get v5: `mirror` → `mirrorOptions.mirror`, `isVerifyChecksum: false` → `unsafelyDisableChecksums: true`.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"isVerifyChecksum\",\n parent: [\"electronGet\"],\n replacement: \"electronGet.unsafelyDisableChecksums\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"Note the value is INVERTED — `isVerifyChecksum: false` becomes `unsafelyDisableChecksums: true`.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"mirror\",\n parent: [\"electronGet\"],\n replacement: \"electronGet.mirrorOptions.mirror\",\n autoMigrated: true,\n severity: \"error\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"cache\",\n parent: [\"electronGet\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"It is intentionally not exposed as a config key — set the `ELECTRON_BUILDER_CACHE` environment variable instead.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"customDir\",\n parent: [\"electronGet\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"Use `electronDist` to stage a custom Electron build.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"customFilename\",\n parent: [\"electronGet\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"Use `electronDist` to stage a custom Electron build.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"strictSSL\",\n parent: [\"electronGet\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"@electron/get v5 downloads via `fetch`, which has no equivalent option.\",\n anchor: ELECTRON_GET_ANCHOR,\n },\n {\n key: \"force\",\n parent: [\"electronGet\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"@electron/get v5 has no equivalent. Clear the cache directory (or point `ELECTRON_BUILDER_CACHE` at a fresh path) to force a re-download.\",\n anchor: \"electrongetoptionsforce-removed\",\n },\n\n // ── Windows signing ───────────────────────────────────────────────────────\n {\n key: \"signtoolOptions\",\n parent: [\"win\"],\n replacement: 'win.sign with `type: \"signtool\"`',\n autoMigrated: true,\n severity: \"error\",\n detail: \"All fields move verbatim; add the `type` discriminator.\",\n anchor: WIN_SIGN_ANCHOR,\n },\n {\n key: \"azureSignOptions\",\n parent: [\"win\"],\n replacement: 'win.sign with `type: \"azure\"`',\n autoMigrated: true,\n severity: \"error\",\n detail: \"Fields move verbatim; any extra keys that used the old index signature move into `additionalMetadata`.\",\n anchor: WIN_SIGN_ANCHOR,\n },\n {\n key: \"signExecutable\",\n parent: [\"win\"],\n replacement: \"win.sign: false\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"Only the `false` case has an equivalent (it disables signing; resource editing still runs). `signExecutable: true` was the default — delete it.\",\n anchor: \"winsignexecutable-winsignandeditexecutable-removed\",\n },\n {\n key: \"signAndEditExecutable\",\n parent: [\"win\"],\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"Resource editing always runs in v27. To skip signing only, set `win.sign: false`; there is no equivalent that also skips resource editing.\",\n anchor: \"winsignexecutable-winsignandeditexecutable-removed\",\n },\n\n // ── NSIS: custom bundles moved to toolsets.nsis ───────────────────────────\n ...NSIS_CONFIG_KEYS.flatMap((section): LegacyConfigOption[] => [\n {\n key: \"customNsisBinary\",\n parent: [section],\n replacement: section === \"portable\" ? \"toolsets.nsis\" : `\\`toolsets.nsis\\` and \\`${section}.installerDebugLogging\\``,\n autoMigrated: false,\n severity: \"error\",\n detail:\n `Custom NSIS binaries now come from the \\`toolsets.nsis\\` bundle. ${TOOLSETS_NSIS_DETAIL} ` +\n (section === \"portable\"\n ? \"Property `debugLogging` never had an effect on portable targets and has no equivalent. \"\n : `Property \\`debugLogging\\` is now \\`${section}.installerDebugLogging\\` (which needs a log-enabled NSIS bundle). `) +\n `\\`electron-builder migrate-schema\\` moves \\`debugLogging\\` but cannot convert \\`url\\` / \\`checksum\\` / \\`version\\`.`,\n anchor: CUSTOM_NSIS_ANCHOR,\n },\n {\n key: \"customNsisResources\",\n parent: [section],\n replacement: \"toolsets.nsis\",\n autoMigrated: false,\n severity: \"error\",\n detail: `Custom NSIS resources now come from the \\`toolsets.nsis\\` bundle. ${TOOLSETS_NSIS_DETAIL}`,\n anchor: CUSTOM_NSIS_ANCHOR,\n },\n ]),\n\n // ── Programmatic PackagerOptions leaking into the config object ───────────\n {\n key: \"devMetadata\",\n replacement: null,\n autoMigrated: false,\n severity: \"error\",\n detail: \"Put build configuration at the configuration root instead.\",\n anchor: \"devmetadata-extrametadata-programmatic-packageroptions\",\n },\n\n // ── macOS signing: one entry per moved field, per platform key ────────────\n ...MAC_SIGN_FIELDS.map((field): LegacyConfigOption => ({\n key: field,\n scope: \"mac\",\n replacement: `sign.${field}`,\n autoMigrated: true,\n severity: \"error\",\n anchor: MAC_SIGN_ANCHOR,\n })),\n {\n key: \"signIgnore\",\n scope: \"mac\",\n replacement: \"sign.ignore\",\n autoMigrated: true,\n severity: \"error\",\n detail: \"Renamed to the @electron/osx-sign canonical name.\",\n anchor: MAC_SIGN_ANCHOR,\n },\n ...MAC_SIGN_REMOVED_FIELDS.map((field): LegacyConfigOption => ({\n key: field,\n scope: \"mac\",\n replacement: null,\n autoMigrated: true,\n severity: \"error\",\n detail: \"@electron/osx-sign 2.x removed the `spctl --assess` step entirely, so there is no `sign.gatekeeperAssess` to move it to.\",\n anchor: MAC_SIGN_ANCHOR,\n })),\n ...MAC_UNIVERSAL_FIELDS.map((field): LegacyConfigOption => ({\n key: field,\n scope: \"mac\",\n replacement: `universal.${field}`,\n autoMigrated: true,\n severity: \"error\",\n anchor: \"macuniversal\",\n })),\n]\n\n/** A `LegacyConfigOption` with its `scope` expanded to a concrete parent path. */\nexport interface ResolvedLegacyConfigOption extends LegacyConfigOption {\n /** Concrete path of the object holding `key`. */\n readonly parentPath: readonly string[]\n /** Dot-joined `parentPath` + `key`, as it appears in a user's config. */\n readonly fullPath: string\n}\n\nfunction resolve(options: readonly LegacyConfigOption[]): readonly ResolvedLegacyConfigOption[] {\n const resolved: ResolvedLegacyConfigOption[] = []\n for (const option of options) {\n const parents: Array<readonly string[]> =\n option.scope === \"mac\" ? MAC_PLATFORM_KEYS.map(p => [p]) : option.scope === \"all\" ? ALL_PLATFORM_KEYS.map(p => [p]) : [option.parent ?? []]\n for (const parentPath of parents) {\n resolved.push({ ...option, parentPath, fullPath: [...parentPath, option.key].join(\".\") })\n }\n }\n return resolved\n}\n\n/** `LEGACY_CONFIG_OPTIONS` with every `scope` expanded into concrete paths. */\nexport const RESOLVED_LEGACY_CONFIG_OPTIONS: readonly ResolvedLegacyConfigOption[] = resolve(LEGACY_CONFIG_OPTIONS)\n\n/**\n * Renders the user-facing message for a single legacy option.\n *\n * A scoped option's `replacement` is relative to its platform key (`sign.identity`), so it is\n * prefixed with the resolved parent to read as the user wrote it (`mac.sign.identity`).\n */\nexport function formatLegacyOptionMessage(option: ResolvedLegacyConfigOption): string {\n const lines: string[] = []\n if (option.replacement == null) {\n lines.push(`\\`${option.fullPath}\\` was removed in electron-builder v27.`)\n } else {\n // A replacement containing a space is prose (\"win.sign with `type: \\\"signtool\\\"`\") — leave it as-is.\n const replacement = option.replacement.includes(\" \")\n ? option.replacement\n : `\\`${option.scope == null ? option.replacement : [...option.parentPath, option.replacement].join(\".\")}\\``\n lines.push(`\\`${option.fullPath}\\` was replaced by ${replacement} in electron-builder v27.`)\n }\n if (option.detail != null) {\n lines.push(` ${option.detail}`)\n }\n if (option.autoMigrated) {\n lines.push(\" Run `electron-builder migrate-schema` to update your configuration automatically.\")\n }\n lines.push(` ${BREAKING_CHANGES_URL}#${option.anchor}`)\n return lines.join(\"\\n\")\n}\n"]}
|
|
@@ -34,6 +34,19 @@ export declare function reinitializeProxy(): void;
|
|
|
34
34
|
* `TypeError: fetch failed` wrapper.
|
|
35
35
|
*/
|
|
36
36
|
export declare function shouldRetryDownloadError(e: any): boolean;
|
|
37
|
+
export interface RetryDownloadOptions {
|
|
38
|
+
readonly label?: string;
|
|
39
|
+
readonly callerSignal?: AbortSignal | null;
|
|
40
|
+
readonly attemptTimeoutMs?: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Runs a download with the transient-error retries. Each attempt gets its own `AbortSignal.timeout()` capping
|
|
44
|
+
* its total duration: a shared one stays aborted once it fires, so any later attempt would fail immediately.
|
|
45
|
+
* An attempt that hits that cap, or that undici drops as silent, is retried once. A caller-supplied signal is
|
|
46
|
+
* passed through as is, and its abort is final.
|
|
47
|
+
* Exported for tests.
|
|
48
|
+
*/
|
|
49
|
+
export declare function retryDownload<T>(download: (signal: AbortSignal) => Promise<T>, options?: RetryDownloadOptions): Promise<T>;
|
|
37
50
|
/**
|
|
38
51
|
* Copies a remote artifact to a specific output path on disk.
|
|
39
52
|
* Unlike downloadBuilderToolset, this does not extract archives — it copies the raw file.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"electronGet.d.ts","sourceRoot":"","sources":["../../src/util/electronGet.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,+BAA+B,EAE/B,aAAa,EACd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAa,QAAQ,EAAgB,MAAM,sBAAsB,CAAA;AAgBxE,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAC9C,+BAA+B,EAC7B,UAAU,GACV,MAAM,GACN,SAAS,GACT,cAAc,GACd,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,YAAY,GACZ,WAAW,GACX,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,eAAe,CAClB;IACC,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,gBAAgB,GAAG,eAAe,CAAC,CAAA;CACtF;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;IACnC,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAQ7D;AAMD,eAAO,MAAM,6BAA6B,sCAOzC,CAAA;AAKD,wBAAsB,yBAAyB,CAAC,OAAO,EAAE;IAAE,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAAC,mBAAmB,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,MAAM,CAAC,CAGnG;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAShG;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAclE"}
|
package/dist/util/electronGet.js
CHANGED
|
@@ -275,6 +275,38 @@ export function shouldRetryDownloadError(e) {
|
|
|
275
275
|
const code = typeof e.code === "string" ? e.code : typeof e.cause?.code === "string" ? e.cause.code : undefined;
|
|
276
276
|
return code != null && TRANSIENT_DOWNLOAD_ERROR_CODES.has(code);
|
|
277
277
|
}
|
|
278
|
+
const DOWNLOAD_ATTEMPT_TIMEOUT_MS = 10 * 60 * 1000;
|
|
279
|
+
/** undici gives up on a silent connection after its own headersTimeout/bodyTimeout (300s by default). */
|
|
280
|
+
const STALLED_DOWNLOAD_ERROR_CODES = new Set(["UND_ERR_HEADERS_TIMEOUT", "UND_ERR_BODY_TIMEOUT"]);
|
|
281
|
+
/**
|
|
282
|
+
* Runs a download with the transient-error retries. Each attempt gets its own `AbortSignal.timeout()` capping
|
|
283
|
+
* its total duration: a shared one stays aborted once it fires, so any later attempt would fail immediately.
|
|
284
|
+
* An attempt that hits that cap, or that undici drops as silent, is retried once. A caller-supplied signal is
|
|
285
|
+
* passed through as is, and its abort is final.
|
|
286
|
+
* Exported for tests.
|
|
287
|
+
*/
|
|
288
|
+
export function retryDownload(download, options = {}) {
|
|
289
|
+
const { label, callerSignal, attemptTimeoutMs = DOWNLOAD_ATTEMPT_TIMEOUT_MS } = options;
|
|
290
|
+
let timedOut = false;
|
|
291
|
+
return retry(() => download(callerSignal ?? AbortSignal.timeout(attemptTimeoutMs)), {
|
|
292
|
+
retries: 3,
|
|
293
|
+
interval: 2000,
|
|
294
|
+
backoff: 2000,
|
|
295
|
+
shouldRetry: e => {
|
|
296
|
+
// our own timeout abort is a DOMException with a numeric `code`, which shouldRetryDownloadError never matches
|
|
297
|
+
const reason = callerSignal == null && e?.name === "TimeoutError" ? "TimeoutError" : STALLED_DOWNLOAD_ERROR_CODES.has(e?.cause?.code) ? e.cause.code : null;
|
|
298
|
+
if (reason == null) {
|
|
299
|
+
return shouldRetryDownloadError(e);
|
|
300
|
+
}
|
|
301
|
+
if (timedOut) {
|
|
302
|
+
return false;
|
|
303
|
+
}
|
|
304
|
+
timedOut = true;
|
|
305
|
+
log.warn({ label, reason }, "download timed out, retrying");
|
|
306
|
+
return true;
|
|
307
|
+
},
|
|
308
|
+
});
|
|
309
|
+
}
|
|
278
310
|
async function downloadArtifactToFile(config, label) {
|
|
279
311
|
// Serialize concurrent downloads of the same artifact across vitest workers to prevent @electron/get's
|
|
280
312
|
// non-atomic putFileInCache (remove + move) from racing with a concurrent reader.
|
|
@@ -303,7 +335,6 @@ async function downloadArtifactToFile(config, label) {
|
|
|
303
335
|
// initializeProxy() wires that up from HTTP(S)_PROXY/NO_PROXY env vars (replaces the got proxy agent).
|
|
304
336
|
initializeProxyOnce();
|
|
305
337
|
const downloadOptions = {
|
|
306
|
-
signal: AbortSignal.timeout(10 * 60 * 1000), // prevent indefinite hang on stalled connections
|
|
307
338
|
...config.downloadOptions,
|
|
308
339
|
getProgressCallback: info => {
|
|
309
340
|
// @electron/get passes downloadOptions (including this callback) to its internal
|
|
@@ -332,20 +363,17 @@ async function downloadArtifactToFile(config, label) {
|
|
|
332
363
|
return Promise.resolve();
|
|
333
364
|
},
|
|
334
365
|
};
|
|
335
|
-
const
|
|
366
|
+
const callerSignal = config.downloadOptions?.signal;
|
|
367
|
+
// every call gets a fresh timeout signal, to prevent an indefinite hang on stalled connections
|
|
368
|
+
const withSignal = (signal = callerSignal ?? AbortSignal.timeout(DOWNLOAD_ATTEMPT_TIMEOUT_MS)) => ({ ...config, downloadOptions: { ...downloadOptions, signal } });
|
|
336
369
|
try {
|
|
337
370
|
let filePath;
|
|
338
371
|
try {
|
|
339
|
-
filePath = await
|
|
340
|
-
retries: 3,
|
|
341
|
-
interval: 2000,
|
|
342
|
-
backoff: 2000,
|
|
343
|
-
shouldRetry: shouldRetryDownloadError,
|
|
344
|
-
});
|
|
372
|
+
filePath = await retryDownload(signal => get.downloadArtifact(withSignal(signal)), { label, callerSignal });
|
|
345
373
|
}
|
|
346
374
|
catch (err) {
|
|
347
375
|
if (typeof err?.message === "string" && err.message.includes("dest already exists")) {
|
|
348
|
-
filePath = await get.downloadArtifact(
|
|
376
|
+
filePath = await get.downloadArtifact(withSignal());
|
|
349
377
|
}
|
|
350
378
|
else {
|
|
351
379
|
throw err;
|
|
@@ -353,7 +381,7 @@ async function downloadArtifactToFile(config, label) {
|
|
|
353
381
|
}
|
|
354
382
|
if (!(await exists(filePath))) {
|
|
355
383
|
log.warn({ filePath, label }, "cached artifact missing from disk; retrying with cache write");
|
|
356
|
-
filePath = await get.downloadArtifact({ ...
|
|
384
|
+
filePath = await get.downloadArtifact({ ...withSignal(), cacheMode: ElectronDownloadCacheMode.WriteOnly });
|
|
357
385
|
}
|
|
358
386
|
if (!state.bar && lastLoggedMilestone === -1) {
|
|
359
387
|
log.info({ label }, "using cached artifact");
|
|
@@ -567,8 +595,6 @@ export function resolveBuilderBinaryUrl(releaseName, filenameWithExt, baseUrl, o
|
|
|
567
595
|
* Downloads a generic artifact (.tar.gz or .zip) from a GitHub release.
|
|
568
596
|
* Used for electron-builder-binaries tools (appimage, etc.).
|
|
569
597
|
*/
|
|
570
|
-
/** Toolsets already announced this process, so a multi-target build logs each one once. */
|
|
571
|
-
const announcedToolsets = new Set();
|
|
572
598
|
/**
|
|
573
599
|
* Every `toolsets.*` property now defaults to "latest", which resolves to a newer bundle than v26
|
|
574
600
|
* pinned (NSIS 3.0.4.1 -> 3.12, winCodeSign 2.6.0 -> 1.3.0, Wine 4.0.1 -> 11.0, AppImage FUSE2 ->
|
|
@@ -577,11 +603,8 @@ const announcedToolsets = new Set();
|
|
|
577
603
|
* bundle had no trace in the build log tying it to the toolset.
|
|
578
604
|
*/
|
|
579
605
|
function announceToolsetVersion(releaseName) {
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
}
|
|
583
|
-
announcedToolsets.add(releaseName);
|
|
584
|
-
log.info({ toolset: releaseName }, "using toolset");
|
|
606
|
+
// once per toolset per process, so a multi-target build logs each one once
|
|
607
|
+
log.once(`toolset:${releaseName}`).info({ toolset: releaseName }, "using toolset");
|
|
585
608
|
}
|
|
586
609
|
export async function downloadBuilderToolset(options) {
|
|
587
610
|
const { releaseName, filenameWithExt, checksums, githubOrgRepo = "electron-userland/electron-builder-binaries", overrideUrl } = options;
|