app-builder-lib 27.0.0-alpha.12 → 27.0.0-alpha.13

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.
Files changed (220) hide show
  1. package/dist/asar/asarUtil.js +1 -1
  2. package/dist/asar/asarUtil.js.map +1 -1
  3. package/dist/codeSign/certInfo.d.ts +4 -1
  4. package/dist/codeSign/certInfo.d.ts.map +1 -1
  5. package/dist/codeSign/certInfo.js +5 -3
  6. package/dist/codeSign/certInfo.js.map +1 -1
  7. package/dist/codeSign/forceCodeSigning.d.ts +22 -0
  8. package/dist/codeSign/forceCodeSigning.d.ts.map +1 -0
  9. package/dist/codeSign/forceCodeSigning.js +18 -0
  10. package/dist/codeSign/forceCodeSigning.js.map +1 -0
  11. package/dist/codeSign/mac/macCodeSign.d.ts +13 -1
  12. package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
  13. package/dist/codeSign/mac/macCodeSign.js +29 -2
  14. package/dist/codeSign/mac/macCodeSign.js.map +1 -1
  15. package/dist/codeSign/mac/macSignatureVerifier.d.ts +23 -0
  16. package/dist/codeSign/mac/macSignatureVerifier.d.ts.map +1 -0
  17. package/dist/codeSign/mac/macSignatureVerifier.js +96 -0
  18. package/dist/codeSign/mac/macSignatureVerifier.js.map +1 -0
  19. package/dist/codeSign/win/authenticodeSignature.d.ts +14 -2
  20. package/dist/codeSign/win/authenticodeSignature.d.ts.map +1 -1
  21. package/dist/codeSign/win/authenticodeSignature.js +78 -30
  22. package/dist/codeSign/win/authenticodeSignature.js.map +1 -1
  23. package/dist/codeSign/win/pkcs11SignManager.d.ts.map +1 -1
  24. package/dist/codeSign/win/pkcs11SignManager.js +4 -3
  25. package/dist/codeSign/win/pkcs11SignManager.js.map +1 -1
  26. package/dist/codeSign/win/publisherName.d.ts +31 -0
  27. package/dist/codeSign/win/publisherName.d.ts.map +1 -0
  28. package/dist/codeSign/win/publisherName.js +78 -0
  29. package/dist/codeSign/win/publisherName.js.map +1 -0
  30. package/dist/codeSign/win/signtoolBaseSignManager.d.ts +16 -9
  31. package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
  32. package/dist/codeSign/win/signtoolBaseSignManager.js +46 -35
  33. package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
  34. package/dist/codeSign/win/verifyUpdatePublisher.d.ts.map +1 -1
  35. package/dist/codeSign/win/verifyUpdatePublisher.js +7 -4
  36. package/dist/codeSign/win/verifyUpdatePublisher.js.map +1 -1
  37. package/dist/codeSign/win/windowsSignAzureManager.d.ts +1 -1
  38. package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
  39. package/dist/codeSign/win/windowsSignAzureManager.js +24 -6
  40. package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
  41. package/dist/configuration.d.ts +46 -3
  42. package/dist/configuration.d.ts.map +1 -1
  43. package/dist/configuration.js.map +1 -1
  44. package/dist/electron/mac/asarIntegrityDigest.js +2 -2
  45. package/dist/electron/mac/asarIntegrityDigest.js.map +1 -1
  46. package/dist/electron/mac/electronMacUtils.d.ts +3 -2
  47. package/dist/electron/mac/electronMacUtils.d.ts.map +1 -1
  48. package/dist/electron/mac/electronMacUtils.js +3 -2
  49. package/dist/electron/mac/electronMacUtils.js.map +1 -1
  50. package/dist/fileMatcher.d.ts.map +1 -1
  51. package/dist/fileMatcher.js +4 -2
  52. package/dist/fileMatcher.js.map +1 -1
  53. package/dist/index.d.ts +1 -1
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +4 -3
  56. package/dist/index.js.map +1 -1
  57. package/dist/indexInternal.d.ts +7 -2
  58. package/dist/indexInternal.d.ts.map +1 -1
  59. package/dist/indexInternal.js +6 -2
  60. package/dist/indexInternal.js.map +1 -1
  61. package/dist/linuxPackager.js +1 -1
  62. package/dist/linuxPackager.js.map +1 -1
  63. package/dist/macPackager.d.ts +26 -0
  64. package/dist/macPackager.d.ts.map +1 -1
  65. package/dist/macPackager.js +168 -12
  66. package/dist/macPackager.js.map +1 -1
  67. package/dist/options/PlatformSpecificBuildOptions.d.ts +15 -12
  68. package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
  69. package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
  70. package/dist/options/SquirrelWindowsOptions.d.ts +3 -0
  71. package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -1
  72. package/dist/options/SquirrelWindowsOptions.js.map +1 -1
  73. package/dist/options/macOptions.d.ts +7 -2
  74. package/dist/options/macOptions.d.ts.map +1 -1
  75. package/dist/options/macOptions.js.map +1 -1
  76. package/dist/options/winOptions.d.ts +61 -15
  77. package/dist/options/winOptions.d.ts.map +1 -1
  78. package/dist/options/winOptions.js +20 -0
  79. package/dist/options/winOptions.js.map +1 -1
  80. package/dist/packager.d.ts +1 -0
  81. package/dist/packager.d.ts.map +1 -1
  82. package/dist/packager.js +7 -2
  83. package/dist/packager.js.map +1 -1
  84. package/dist/platformPackager.d.ts +14 -5
  85. package/dist/platformPackager.d.ts.map +1 -1
  86. package/dist/platformPackager.js +44 -13
  87. package/dist/platformPackager.js.map +1 -1
  88. package/dist/publish/PublishManager.d.ts +3 -0
  89. package/dist/publish/PublishManager.d.ts.map +1 -1
  90. package/dist/publish/PublishManager.js +50 -16
  91. package/dist/publish/PublishManager.js.map +1 -1
  92. package/dist/publish/manifestUploadCheck.d.ts +10 -0
  93. package/dist/publish/manifestUploadCheck.d.ts.map +1 -0
  94. package/dist/publish/manifestUploadCheck.js +75 -0
  95. package/dist/publish/manifestUploadCheck.js.map +1 -0
  96. package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
  97. package/dist/publish/updateInfoBuilder.js +51 -17
  98. package/dist/publish/updateInfoBuilder.js.map +1 -1
  99. package/dist/publish/updateManifestVerifier.d.ts +22 -0
  100. package/dist/publish/updateManifestVerifier.d.ts.map +1 -0
  101. package/dist/publish/updateManifestVerifier.js +65 -0
  102. package/dist/publish/updateManifestVerifier.js.map +1 -0
  103. package/dist/targets/ArchiveTarget.d.ts.map +1 -1
  104. package/dist/targets/ArchiveTarget.js +6 -2
  105. package/dist/targets/ArchiveTarget.js.map +1 -1
  106. package/dist/targets/archive.d.ts.map +1 -1
  107. package/dist/targets/archive.js +3 -3
  108. package/dist/targets/archive.js.map +1 -1
  109. package/dist/targets/linux/FlatpakTarget.js +5 -5
  110. package/dist/targets/linux/FlatpakTarget.js.map +1 -1
  111. package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
  112. package/dist/targets/linux/FpmTarget.js +10 -7
  113. package/dist/targets/linux/FpmTarget.js.map +1 -1
  114. package/dist/targets/linux/LinuxTargetHelper.js +1 -1
  115. package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
  116. package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
  117. package/dist/targets/linux/appimage/AppImageTarget.js +6 -1
  118. package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
  119. package/dist/targets/linux/appimage/appImageUtil.js +9 -9
  120. package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
  121. package/dist/targets/linux/flatpakBundle.d.ts.map +1 -1
  122. package/dist/targets/linux/flatpakBundle.js +25 -20
  123. package/dist/targets/linux/flatpakBundle.js.map +1 -1
  124. package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
  125. package/dist/targets/linux/snap/coreLegacy.js +22 -6
  126. package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
  127. package/dist/targets/linux/snap/snapPlugs.d.ts +2 -2
  128. package/dist/targets/linux/snap/snapPlugs.d.ts.map +1 -1
  129. package/dist/targets/linux/snap/snapPlugs.js +1 -1
  130. package/dist/targets/linux/snap/snapPlugs.js.map +1 -1
  131. package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -1
  132. package/dist/targets/linux/snap/snapcraftBuilder.js +19 -17
  133. package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -1
  134. package/dist/targets/mac/MacTargetHelper.d.ts +15 -3
  135. package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
  136. package/dist/targets/mac/MacTargetHelper.js +96 -13
  137. package/dist/targets/mac/MacTargetHelper.js.map +1 -1
  138. package/dist/targets/mac/pkg.d.ts.map +1 -1
  139. package/dist/targets/mac/pkg.js +7 -5
  140. package/dist/targets/mac/pkg.js.map +1 -1
  141. package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
  142. package/dist/targets/win/nsis/NsisTarget.js +8 -2
  143. package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
  144. package/dist/targets/win/nsis/nsisOptions.d.ts +1 -1
  145. package/dist/targets/win/nsis/nsisOptions.js.map +1 -1
  146. package/dist/toolsets/nsis.js +1 -1
  147. package/dist/toolsets/nsis.js.map +1 -1
  148. package/dist/toolsets/wine.d.ts +3 -0
  149. package/dist/toolsets/wine.d.ts.map +1 -1
  150. package/dist/toolsets/wine.js +14 -5
  151. package/dist/toolsets/wine.js.map +1 -1
  152. package/dist/util/appFileCopier.d.ts.map +1 -1
  153. package/dist/util/appFileCopier.js +9 -3
  154. package/dist/util/appFileCopier.js.map +1 -1
  155. package/dist/util/buildOutputVerifier.d.ts +40 -0
  156. package/dist/util/buildOutputVerifier.d.ts.map +1 -0
  157. package/dist/util/buildOutputVerifier.js +420 -0
  158. package/dist/util/buildOutputVerifier.js.map +1 -0
  159. package/dist/util/config/fileOptions.js +2 -2
  160. package/dist/util/config/fileOptions.js.map +1 -1
  161. package/dist/util/config/legacyConfigGuard.d.ts.map +1 -1
  162. package/dist/util/config/legacyConfigGuard.js +2 -2
  163. package/dist/util/config/legacyConfigGuard.js.map +1 -1
  164. package/dist/util/config/legacyOptions.d.ts +9 -2
  165. package/dist/util/config/legacyOptions.d.ts.map +1 -1
  166. package/dist/util/config/legacyOptions.js +8 -2
  167. package/dist/util/config/legacyOptions.js.map +1 -1
  168. package/dist/util/electronGet.d.ts.map +1 -1
  169. package/dist/util/electronGet.js +3 -1
  170. package/dist/util/electronGet.js.map +1 -1
  171. package/dist/util/flags.d.ts.map +1 -1
  172. package/dist/util/flags.js +3 -9
  173. package/dist/util/flags.js.map +1 -1
  174. package/dist/util/mac/macosIconComposer.d.ts.map +1 -1
  175. package/dist/util/mac/macosIconComposer.js +6 -5
  176. package/dist/util/mac/macosIconComposer.js.map +1 -1
  177. package/dist/util/macroExpander.js +1 -1
  178. package/dist/util/macroExpander.js.map +1 -1
  179. package/dist/util/nativeBinaryVerifier.d.ts.map +1 -1
  180. package/dist/util/nativeBinaryVerifier.js +3 -1
  181. package/dist/util/nativeBinaryVerifier.js.map +1 -1
  182. package/dist/util/packageMetadata.js +1 -1
  183. package/dist/util/packageMetadata.js.map +1 -1
  184. package/dist/util/removedEnvVars.d.ts +2 -0
  185. package/dist/util/removedEnvVars.d.ts.map +1 -1
  186. package/dist/util/removedEnvVars.js +15 -1
  187. package/dist/util/removedEnvVars.js.map +1 -1
  188. package/dist/util/streamSpawnToFile.d.ts +3 -1
  189. package/dist/util/streamSpawnToFile.d.ts.map +1 -1
  190. package/dist/util/streamSpawnToFile.js +6 -2
  191. package/dist/util/streamSpawnToFile.js.map +1 -1
  192. package/dist/version.d.ts +1 -1
  193. package/dist/version.js +1 -1
  194. package/dist/version.js.map +1 -1
  195. package/dist/vm/ParallelsVm.d.ts +10 -0
  196. package/dist/vm/ParallelsVm.d.ts.map +1 -1
  197. package/dist/vm/ParallelsVm.js +22 -8
  198. package/dist/vm/ParallelsVm.js.map +1 -1
  199. package/dist/vm/PwshVm.d.ts +0 -1
  200. package/dist/vm/PwshVm.d.ts.map +1 -1
  201. package/dist/vm/PwshVm.js +10 -15
  202. package/dist/vm/PwshVm.js.map +1 -1
  203. package/dist/vm/WineVm.d.ts.map +1 -1
  204. package/dist/vm/WineVm.js +4 -4
  205. package/dist/vm/WineVm.js.map +1 -1
  206. package/dist/vm/vm.d.ts +9 -3
  207. package/dist/vm/vm.d.ts.map +1 -1
  208. package/dist/vm/vm.js +40 -32
  209. package/dist/vm/vm.js.map +1 -1
  210. package/dist/winPackager.d.ts +16 -1
  211. package/dist/winPackager.d.ts.map +1 -1
  212. package/dist/winPackager.js +77 -19
  213. package/dist/winPackager.js.map +1 -1
  214. package/package.json +9 -9
  215. package/scheme.json +497 -23
  216. package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +14 -9
  217. package/dist/vm/MonoVm.d.ts +0 -9
  218. package/dist/vm/MonoVm.d.ts.map +0 -1
  219. package/dist/vm/MonoVm.js +0 -16
  220. package/dist/vm/MonoVm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"fileOptions.js","sourceRoot":"","sources":["../../../src/util/config/fileOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAElF,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAEnH,MAAM,gBAAgB,GAAG,GAAG,oBAAoB,IAAI,mBAAmB,EAAE,CAAA;AAEzE,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC5E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAA2B,EAAE,GAAW;IACxE,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/D,OAAO,UAAU,IAAI,IAAI,IAAI,OAAO,IAAI,UAAU,IAAI,UAAU,CAAC,KAAK,KAAK,SAAS,CAAA;AACtF,CAAC;AAED,0GAA0G;AAC1G,MAAM,iBAAiB,GAAG,qBAAqB,CAAA;AAE/C;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,KAA6B,EAAE,UAAU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BACD,MAAM,IAAI,yBAAyB,CACjC,KAAK,QAAQ,oEAAoE,MAAM,4EAA4E,gBAAgB,EAAE,CACtL,CAAA;gBACH,CAAC;aACF,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidConfigurationError, log } from \"builder-util\"\nimport { DEFAULT_KEYWORD, resolveDefaultKeywordList } from \"builder-util/internal\"\nimport { Nullish } from \"builder-util-runtime\"\nimport { ALL_PLATFORM_KEYS, BREAKING_CHANGES_URL, FILE_OPTION_KEYS, FILE_OPTIONS_ANCHOR } from \"./legacyOptions.js\"\n\nconst FILE_OPTIONS_URL = `${BREAKING_CHANGES_URL}#${FILE_OPTIONS_ANCHOR}`\n\nexport function isPlainObject(value: unknown): value is Record<string, any> {\n return value != null && typeof value === \"object\" && !Array.isArray(value)\n}\n\n/**\n * Whether `holder` sets the flat `key` itself. Only an own data property counts: the read-forwarding accessors that\n * {@link forwardFlatFileOptionReads} installs must not be mistaken for a flat key (nor be read, which would warn).\n */\nexport function hasFlatFileOption(holder: Record<string, any>, key: string): boolean {\n const descriptor = Object.getOwnPropertyDescriptor(holder, key)\n return descriptor != null && \"value\" in descriptor && descriptor.value !== undefined\n}\n\n// An extension is spliced into a `!**/*.{…}` glob, so it may only hold characters that are literal there.\nconst EXTENSION_PATTERN = /^[\\w-]+(\\.[\\w-]+)*$/\n\n/**\n * Validates a `fileOptions.excludedExts` value and returns its entries as `\"default\"`, `\"ext\"` or `\"!ext\"`, without the leading dot. A list\n * of removals only (e.g. `[\"!pdb\"]`) is rejected: a list without \"default\" replaces the default extensions, so it would remove from nothing\n * and exclude no extension at all. `optionPath` names the option in the errors (e.g. `mac.fileOptions.excludedExts`).\n */\nexport function normalizeExcludedExtensions(value: Array<string> | string, optionPath = \"fileOptions.excludedExts\"): Array<string> {\n const entries = (Array.isArray(value) ? value : [value]).map(entry => normalizeExcludedExtension(entry, optionPath))\n if (entries.length > 0 && entries.every(it => it.startsWith(\"!\"))) {\n // a platform list replaces the root one (a mas list also mac's, a masDev list mac's and mas's), so it cannot remove from those either\n const section = optionPath.substring(0, optionPath.indexOf(\".\"))\n const replaced = section === \"masDev\" ? \"the root list, `mac`'s and `mas`'s\" : section === \"mas\" ? \"the root list and `mac`'s\" : \"the root list\"\n const replaces = section === \"fileOptions\" ? \"\" : ` (it replaces ${replaced} rather than removing from ${section === \"mas\" || section === \"masDev\" ? \"them\" : \"it\"})`\n throw new InvalidConfigurationError(\n `\\`${optionPath}\\` ${JSON.stringify(value)} only removes extensions, so it would exclude no extension at all: a list without \"default\" replaces ` +\n `the default extensions${replaces}. List \"default\" too to exclude the default extensions except those, e.g. ${JSON.stringify([DEFAULT_KEYWORD, ...entries])}.`\n )\n }\n return entries\n}\n\n/** Warns, once per list and extension, about the `\"!ext\"` entries of a normalized list (`optionPath`) that remove nothing. */\nfunction warnUnusedRemovals(entries: ReadonlyArray<string>, defaultExtensions: ReadonlyArray<string>, optionPath: string): void {\n const listsDefault = entries.includes(DEFAULT_KEYWORD)\n const listed = [...(listsDefault ? defaultExtensions : []), ...entries.filter(it => it !== DEFAULT_KEYWORD && !it.startsWith(\"!\"))]\n const sameIgnoringCase = (candidates: ReadonlyArray<string>, extension: string) => candidates.find(it => it !== extension && it.toLowerCase() === extension.toLowerCase())\n for (const extension of resolveDefaultKeywordList(entries, defaultExtensions).unusedRemovals) {\n const listedCase = sameIgnoringCase(listed, extension)\n const defaultCase = listsDefault ? undefined : sameIgnoringCase(defaultExtensions, extension)\n const advice =\n listedCase != null\n ? `Extensions are case-sensitive: did you mean \"!${listedCase}\"?`\n : !listsDefault && defaultExtensions.includes(extension)\n ? `List \"default\" too to exclude the default extensions except \"${extension}\".`\n : defaultCase != null\n ? `Extensions are case-sensitive, and the list does not have \"default\": list \"default\" and \"!${defaultCase}\" to exclude the default extensions except \"${defaultCase}\".`\n : \"Remove the entry.\"\n log.once(`excluded-exts-removal:${optionPath}:${extension}`).warn(`\"!${extension}\" in \\`${optionPath}\\` has no effect: \"${extension}\" is not otherwise excluded. ${advice}`)\n }\n}\n\nfunction normalizeExcludedExtension(entry: string, optionPath: string): string {\n const isRemoval = entry.startsWith(\"!\")\n const extension = (isRemoval ? entry.substring(1) : entry).replace(/^\\./, \"\")\n if (extension === DEFAULT_KEYWORD) {\n if (isRemoval) {\n throw new InvalidConfigurationError(`\"${entry}\" in \\`${optionPath}\\` is not supported: leave \"default\" out of the list to not exclude the default extensions.`)\n }\n } else if (!EXTENSION_PATTERN.test(extension)) {\n throw new InvalidConfigurationError(\n `\"${entry}\" in \\`${optionPath}\\` is not a file extension: write the extension without a dot or glob, e.g. \"pdb\", or \"!pdb\" to remove it from the excluded ones.`\n )\n }\n return isRemoval ? `!${extension}` : extension\n}\n\n/**\n * Validates `fileOptions.excludedExts` at the configuration root and in each platform section, so an invalid list fails the build up front\n * rather than only when a target of that platform (e.g. `mas-dev`) is packed, and warns about its `\"!ext\"` entries that remove nothing, naming\n * the section. `defaultExtensions` is the list `\"default\"` stands for. Runs after schema validation.\n */\nexport function validateExcludedExtensionsOptions(config: Record<string, any>, defaultExtensions: ReadonlyArray<string>): void {\n forEachFileOptionsHolder(config, (holder, prefix) => {\n const value = isPlainObject(holder.fileOptions) ? holder.fileOptions.excludedExts : null\n if (value != null) {\n const optionPath = `${prefix}fileOptions.excludedExts`\n warnUnusedRemovals(normalizeExcludedExtensions(value, optionPath), defaultExtensions, optionPath)\n }\n })\n}\n\n/**\n * Sets the `fileOptions.excludedExts` of `merged` (the `deepAssign` of `sources`) to the last non-null value among `sources`. `deepAssign`\n * merges two arrays, but a later configuration's (`extends`) or platform section's (`mac` → `mas` → `masDev`) list replaces an earlier one,\n * so that it can drop an earlier `\"!ext\"` (see `FilesBuildOptions.excludedExts`). The `fileOptions` of `merged` is replaced by a copy, since\n * `deepAssign` may have left it shared with one of `sources`.\n */\nexport function replaceMergedExcludedExts(merged: Record<string, any> | Nullish, sources: ReadonlyArray<Record<string, any> | Nullish>): void {\n if (merged == null || !isPlainObject(merged.fileOptions)) {\n return\n }\n for (let i = sources.length - 1; i >= 0; i--) {\n const fileOptions = sources[i]?.fileOptions\n if (isPlainObject(fileOptions) && fileOptions.excludedExts != null) {\n merged.fileOptions = { ...merged.fileOptions, excludedExts: fileOptions.excludedExts }\n return\n }\n }\n}\n\n/** {@link replaceMergedExcludedExts} for the configuration root and each platform section of `merged`, the `deepAssign` of `configs`. */\nexport function replaceMergedConfigExcludedExts(merged: Record<string, any>, configs: ReadonlyArray<Record<string, any> | Nullish>): void {\n forEachFileOptionsHolder(merged, (holder, prefix) => {\n const platform = prefix.substring(0, prefix.length - 1)\n replaceMergedExcludedExts(\n holder,\n configs.map(it => (platform.length === 0 ? it : it?.[platform]))\n )\n })\n}\n\n/** Calls `fn` for the configuration root and each platform section that is an object. */\nfunction forEachFileOptionsHolder(config: Record<string, any>, fn: (holder: Record<string, any>, prefix: string) => void): void {\n fn(config, \"\")\n for (const platform of ALL_PLATFORM_KEYS) {\n if (isPlainObject(config[platform])) {\n fn(config[platform], `${platform}.`)\n }\n }\n}\n\n/** `mac.files` → `mac.fileOptions.files` */\nfunction nestedPath(flatPath: string): string {\n const dot = flatPath.lastIndexOf(\".\")\n return dot === -1 ? `fileOptions.${flatPath}` : `${flatPath.substring(0, dot)}.fileOptions.${flatPath.substring(dot + 1)}`\n}\n\n/**\n * Returns `config` with flat `files` / `extraResources` / `extraFiles` keys moved into `fileOptions`, at the root\n * and on every platform key, so that schema validation and everything after config loading see only `fileOptions`.\n *\n * The root, each platform section and their `fileOptions` are shallow copies, never the caller's objects: those can be\n * the `config` passed to `build()`, and the merge and {@link forwardFlatFileOptionReads} write into what is returned.\n *\n * Flat keys are applied as their `fileOptions` counterparts and log one warning per process. When a flat key and its `fileOptions`\n * counterpart are both set on the same object, the nested value wins and the flat one is dropped with a warning.\n * A `fileOptions` that is not an object is left alone (flat keys included) for `checkLegacyConfiguration` to report.\n */\nexport function normalizeFileOptions<T extends Record<string, any>>(config: T): T {\n const moved: string[] = []\n const result = copyHolder(config, \"\", moved)\n for (const platform of ALL_PLATFORM_KEYS) {\n if (isPlainObject(result[platform])) {\n result[platform] = copyHolder(result[platform], `${platform}.`, moved)\n }\n }\n\n if (moved.length > 0) {\n log\n .once(\"flat-file-options\")\n .warn(\n `\\`files\\`, \\`extraResources\\` and \\`extraFiles\\` belong under \\`fileOptions\\`. Found [${moved.join(\", \")}] outside it; ` +\n `they are applied as ${moved.map(it => `\\`${nestedPath(it)}\\``).join(\", \")}. ` +\n `Run \\`electron-builder migrate-schema\\` to update the configuration. ${FILE_OPTIONS_URL}`\n )\n }\n return result as T\n}\n\n/** A shallow copy of `holder` (and of its `fileOptions`) with its flat keys moved into `fileOptions`. */\nfunction copyHolder(holder: Record<string, any>, prefix: string, moved: string[]): Record<string, any> {\n // only enumerable properties: the read-forwarding accessors of an already loaded configuration are not copied\n const copy: Record<string, any> = { ...holder }\n const existing = copy.fileOptions\n if (isPlainObject(existing)) {\n copy.fileOptions = { ...existing }\n }\n\n const present = FILE_OPTION_KEYS.filter(key => hasFlatFileOption(copy, key))\n if (present.length === 0 || (existing != null && !isPlainObject(existing))) {\n return copy\n }\n\n const fileOptions: Record<string, any> = copy.fileOptions ?? {}\n for (const key of present) {\n const flatPath = `${prefix}${key}`\n if (fileOptions[key] === undefined) {\n fileOptions[key] = copy[key]\n moved.push(flatPath)\n } else {\n log\n .once(`file-options-conflict:${flatPath}`)\n .warn(\n `\\`${flatPath}\\` and \\`${nestedPath(flatPath)}\\` are both set. \\`${nestedPath(flatPath)}\\` is used and \\`${flatPath}\\` is ignored. ` +\n `Remove \\`${flatPath}\\`, moving any patterns you still need into \\`${nestedPath(flatPath)}\\`. ${FILE_OPTIONS_URL}`\n )\n }\n delete copy[key]\n }\n copy.fileOptions = fileOptions\n return copy\n}\n\n/**\n * Defines `files` / `extraResources` / `extraFiles` on a normalized configuration (root and platform sections, which\n * {@link normalizeFileOptions} made copies of, so a caller's own objects are never decorated) as\n * non-enumerable accessors, so that code reading a flat key (a hook reading `context.packager.config.files`, a\n * `build()` caller reading `buildResult.configuration.extraResources`) gets the `fileOptions` value, with a once-per-key warning.\n *\n * Non-enumerable, so JSON serialization (the effective config), `deepAssign`, spreads and schema validation never see them.\n * Writes throw: a value assigned once file matchers are computed would be silently ignored for the platforms\n * already packed, so the caller is pointed at `fileOptions` instead.\n */\nexport function forwardFlatFileOptionReads(config: Record<string, any>): void {\n forEachFileOptionsHolder(config, (holder, prefix) => {\n for (const key of FILE_OPTION_KEYS) {\n if (Object.prototype.hasOwnProperty.call(holder, key)) {\n continue\n }\n const flatPath = `config.${prefix}${key}`\n const nested = `config.${nestedPath(prefix + key)}`\n Object.defineProperty(holder, key, {\n enumerable: false,\n configurable: true,\n get() {\n log.once(`flat-file-options-read:${flatPath}`).warn(`\\`${flatPath}\\` is not a configuration property; read \\`${nested}\\`. ${FILE_OPTIONS_URL}`)\n const fileOptions = holder.fileOptions\n return isPlainObject(fileOptions) ? fileOptions[key] : undefined\n },\n set() {\n throw new InvalidConfigurationError(\n `\\`${flatPath}\\` is not a configuration property and cannot be assigned; set \\`${nested}\\` instead, before the files are copied (e.g. in a \\`beforePack\\` hook). ${FILE_OPTIONS_URL}`\n )\n },\n })\n }\n })\n}\n"]}
1
+ {"version":3,"file":"fileOptions.js","sourceRoot":"","sources":["../../../src/util/config/fileOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAElF,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAEjH,MAAM,gBAAgB,GAAG,GAAG,kBAAkB,IAAI,mBAAmB,EAAE,CAAA;AAEvE,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,KAAK,IAAI,IAAI,IAAI,OAAO,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AG,CAAC,EAAE,CAAA;YACnD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;gBACjC,UAAU,EAAE,KAAK;gBACjB,YAAY,EAAE,IAAI;gBAClB,GAAG;oBACD,GAAG,CAAC,IAAI,CAAC,0BAA0B,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,QAAQ,8CAA8C,MAAM,OAAO,gBAAgB,EAAE,CAAC,CAAA;oBAC/I,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAA;oBACtC,OAAO,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;gBAClE,CAAC;gBACD,GAAG;oBACD,MAAM,IAAI,yBAAyB,CACjC,KAAK,QAAQ,oEAAoE,MAAM,4EAA4E,gBAAgB,EAAE,CACtL,CAAA;gBACH,CAAC;aACF,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidConfigurationError, log } from \"builder-util\"\nimport { DEFAULT_KEYWORD, resolveDefaultKeywordList } from \"builder-util/internal\"\nimport { Nullish } from \"builder-util-runtime\"\nimport { ALL_PLATFORM_KEYS, CONFIG_CHANGES_URL, FILE_OPTION_KEYS, FILE_OPTIONS_ANCHOR } from \"./legacyOptions.js\"\n\nconst FILE_OPTIONS_URL = `${CONFIG_CHANGES_URL}#${FILE_OPTIONS_ANCHOR}`\n\nexport function isPlainObject(value: unknown): value is Record<string, any> {\n return value != null && typeof value === \"object\" && !Array.isArray(value)\n}\n\n/**\n * Whether `holder` sets the flat `key` itself. Only an own data property counts: the read-forwarding accessors that\n * {@link forwardFlatFileOptionReads} installs must not be mistaken for a flat key (nor be read, which would warn).\n */\nexport function hasFlatFileOption(holder: Record<string, any>, key: string): boolean {\n const descriptor = Object.getOwnPropertyDescriptor(holder, key)\n return descriptor != null && \"value\" in descriptor && descriptor.value !== undefined\n}\n\n// An extension is spliced into a `!**/*.{…}` glob, so it may only hold characters that are literal there.\nconst EXTENSION_PATTERN = /^[\\w-]+(\\.[\\w-]+)*$/\n\n/**\n * Validates a `fileOptions.excludedExts` value and returns its entries as `\"default\"`, `\"ext\"` or `\"!ext\"`, without the leading dot. A list\n * of removals only (e.g. `[\"!pdb\"]`) is rejected: a list without \"default\" replaces the default extensions, so it would remove from nothing\n * and exclude no extension at all. `optionPath` names the option in the errors (e.g. `mac.fileOptions.excludedExts`).\n */\nexport function normalizeExcludedExtensions(value: Array<string> | string, optionPath = \"fileOptions.excludedExts\"): Array<string> {\n const entries = (Array.isArray(value) ? value : [value]).map(entry => normalizeExcludedExtension(entry, optionPath))\n if (entries.length > 0 && entries.every(it => it.startsWith(\"!\"))) {\n // a platform list replaces the root one (a mas list also mac's, a masDev list mac's and mas's), so it cannot remove from those either\n const section = optionPath.substring(0, optionPath.indexOf(\".\"))\n const replaced = section === \"masDev\" ? \"the root list, `mac`'s and `mas`'s\" : section === \"mas\" ? \"the root list and `mac`'s\" : \"the root list\"\n const replaces = section === \"fileOptions\" ? \"\" : ` (it replaces ${replaced} rather than removing from ${section === \"mas\" || section === \"masDev\" ? \"them\" : \"it\"})`\n throw new InvalidConfigurationError(\n `\\`${optionPath}\\` ${JSON.stringify(value)} only removes extensions, so it would exclude no extension at all: a list without \"default\" replaces ` +\n `the default extensions${replaces}. List \"default\" too to exclude the default extensions except those, e.g. ${JSON.stringify([DEFAULT_KEYWORD, ...entries])}.`\n )\n }\n return entries\n}\n\n/** Warns, once per list and extension, about the `\"!ext\"` entries of a normalized list (`optionPath`) that remove nothing. */\nfunction warnUnusedRemovals(entries: ReadonlyArray<string>, defaultExtensions: ReadonlyArray<string>, optionPath: string): void {\n const listsDefault = entries.includes(DEFAULT_KEYWORD)\n const listed = [...(listsDefault ? defaultExtensions : []), ...entries.filter(it => it !== DEFAULT_KEYWORD && !it.startsWith(\"!\"))]\n const sameIgnoringCase = (candidates: ReadonlyArray<string>, extension: string) => candidates.find(it => it !== extension && it.toLowerCase() === extension.toLowerCase())\n for (const extension of resolveDefaultKeywordList(entries, defaultExtensions).unusedRemovals) {\n const listedCase = sameIgnoringCase(listed, extension)\n const defaultCase = listsDefault ? undefined : sameIgnoringCase(defaultExtensions, extension)\n const advice =\n listedCase != null\n ? `Extensions are case-sensitive: did you mean \"!${listedCase}\"?`\n : !listsDefault && defaultExtensions.includes(extension)\n ? `List \"default\" too to exclude the default extensions except \"${extension}\".`\n : defaultCase != null\n ? `Extensions are case-sensitive, and the list does not have \"default\": list \"default\" and \"!${defaultCase}\" to exclude the default extensions except \"${defaultCase}\".`\n : \"Remove the entry.\"\n log.once(`excluded-exts-removal:${optionPath}:${extension}`).warn(`\"!${extension}\" in \\`${optionPath}\\` has no effect: \"${extension}\" is not otherwise excluded. ${advice}`)\n }\n}\n\nfunction normalizeExcludedExtension(entry: string, optionPath: string): string {\n const isRemoval = entry.startsWith(\"!\")\n const extension = (isRemoval ? entry.substring(1) : entry).replace(/^\\./, \"\")\n if (extension === DEFAULT_KEYWORD) {\n if (isRemoval) {\n throw new InvalidConfigurationError(`\"${entry}\" in \\`${optionPath}\\` is not supported: leave \"default\" out of the list to not exclude the default extensions.`)\n }\n } else if (!EXTENSION_PATTERN.test(extension)) {\n throw new InvalidConfigurationError(\n `\"${entry}\" in \\`${optionPath}\\` is not a file extension: write the extension without a dot or glob, e.g. \"pdb\", or \"!pdb\" to remove it from the excluded ones.`\n )\n }\n return isRemoval ? `!${extension}` : extension\n}\n\n/**\n * Validates `fileOptions.excludedExts` at the configuration root and in each platform section, so an invalid list fails the build up front\n * rather than only when a target of that platform (e.g. `mas-dev`) is packed, and warns about its `\"!ext\"` entries that remove nothing, naming\n * the section. `defaultExtensions` is the list `\"default\"` stands for. Runs after schema validation.\n */\nexport function validateExcludedExtensionsOptions(config: Record<string, any>, defaultExtensions: ReadonlyArray<string>): void {\n forEachFileOptionsHolder(config, (holder, prefix) => {\n const value = isPlainObject(holder.fileOptions) ? holder.fileOptions.excludedExts : null\n if (value != null) {\n const optionPath = `${prefix}fileOptions.excludedExts`\n warnUnusedRemovals(normalizeExcludedExtensions(value, optionPath), defaultExtensions, optionPath)\n }\n })\n}\n\n/**\n * Sets the `fileOptions.excludedExts` of `merged` (the `deepAssign` of `sources`) to the last non-null value among `sources`. `deepAssign`\n * merges two arrays, but a later configuration's (`extends`) or platform section's (`mac` → `mas` → `masDev`) list replaces an earlier one,\n * so that it can drop an earlier `\"!ext\"` (see `FilesBuildOptions.excludedExts`). The `fileOptions` of `merged` is replaced by a copy, since\n * `deepAssign` may have left it shared with one of `sources`.\n */\nexport function replaceMergedExcludedExts(merged: Record<string, any> | Nullish, sources: ReadonlyArray<Record<string, any> | Nullish>): void {\n if (merged == null || !isPlainObject(merged.fileOptions)) {\n return\n }\n for (let i = sources.length - 1; i >= 0; i--) {\n const fileOptions = sources[i]?.fileOptions\n if (isPlainObject(fileOptions) && fileOptions.excludedExts != null) {\n merged.fileOptions = { ...merged.fileOptions, excludedExts: fileOptions.excludedExts }\n return\n }\n }\n}\n\n/** {@link replaceMergedExcludedExts} for the configuration root and each platform section of `merged`, the `deepAssign` of `configs`. */\nexport function replaceMergedConfigExcludedExts(merged: Record<string, any>, configs: ReadonlyArray<Record<string, any> | Nullish>): void {\n forEachFileOptionsHolder(merged, (holder, prefix) => {\n const platform = prefix.substring(0, prefix.length - 1)\n replaceMergedExcludedExts(\n holder,\n configs.map(it => (platform.length === 0 ? it : it?.[platform]))\n )\n })\n}\n\n/** Calls `fn` for the configuration root and each platform section that is an object. */\nfunction forEachFileOptionsHolder(config: Record<string, any>, fn: (holder: Record<string, any>, prefix: string) => void): void {\n fn(config, \"\")\n for (const platform of ALL_PLATFORM_KEYS) {\n if (isPlainObject(config[platform])) {\n fn(config[platform], `${platform}.`)\n }\n }\n}\n\n/** `mac.files` → `mac.fileOptions.files` */\nfunction nestedPath(flatPath: string): string {\n const dot = flatPath.lastIndexOf(\".\")\n return dot === -1 ? `fileOptions.${flatPath}` : `${flatPath.substring(0, dot)}.fileOptions.${flatPath.substring(dot + 1)}`\n}\n\n/**\n * Returns `config` with flat `files` / `extraResources` / `extraFiles` keys moved into `fileOptions`, at the root\n * and on every platform key, so that schema validation and everything after config loading see only `fileOptions`.\n *\n * The root, each platform section and their `fileOptions` are shallow copies, never the caller's objects: those can be\n * the `config` passed to `build()`, and the merge and {@link forwardFlatFileOptionReads} write into what is returned.\n *\n * Flat keys are applied as their `fileOptions` counterparts and log one warning per process. When a flat key and its `fileOptions`\n * counterpart are both set on the same object, the nested value wins and the flat one is dropped with a warning.\n * A `fileOptions` that is not an object is left alone (flat keys included) for `checkLegacyConfiguration` to report.\n */\nexport function normalizeFileOptions<T extends Record<string, any>>(config: T): T {\n const moved: string[] = []\n const result = copyHolder(config, \"\", moved)\n for (const platform of ALL_PLATFORM_KEYS) {\n if (isPlainObject(result[platform])) {\n result[platform] = copyHolder(result[platform], `${platform}.`, moved)\n }\n }\n\n if (moved.length > 0) {\n log\n .once(\"flat-file-options\")\n .warn(\n `\\`files\\`, \\`extraResources\\` and \\`extraFiles\\` belong under \\`fileOptions\\`. Found [${moved.join(\", \")}] outside it; ` +\n `they are applied as ${moved.map(it => `\\`${nestedPath(it)}\\``).join(\", \")}. ` +\n `Run \\`electron-builder migrate-schema\\` to update the configuration. ${FILE_OPTIONS_URL}`\n )\n }\n return result as T\n}\n\n/** A shallow copy of `holder` (and of its `fileOptions`) with its flat keys moved into `fileOptions`. */\nfunction copyHolder(holder: Record<string, any>, prefix: string, moved: string[]): Record<string, any> {\n // only enumerable properties: the read-forwarding accessors of an already loaded configuration are not copied\n const copy: Record<string, any> = { ...holder }\n const existing = copy.fileOptions\n if (isPlainObject(existing)) {\n copy.fileOptions = { ...existing }\n }\n\n const present = FILE_OPTION_KEYS.filter(key => hasFlatFileOption(copy, key))\n if (present.length === 0 || (existing != null && !isPlainObject(existing))) {\n return copy\n }\n\n const fileOptions: Record<string, any> = copy.fileOptions ?? {}\n for (const key of present) {\n const flatPath = `${prefix}${key}`\n if (fileOptions[key] === undefined) {\n fileOptions[key] = copy[key]\n moved.push(flatPath)\n } else {\n log\n .once(`file-options-conflict:${flatPath}`)\n .warn(\n `\\`${flatPath}\\` and \\`${nestedPath(flatPath)}\\` are both set. \\`${nestedPath(flatPath)}\\` is used and \\`${flatPath}\\` is ignored. ` +\n `Remove \\`${flatPath}\\`, moving any patterns you still need into \\`${nestedPath(flatPath)}\\`. ${FILE_OPTIONS_URL}`\n )\n }\n delete copy[key]\n }\n copy.fileOptions = fileOptions\n return copy\n}\n\n/**\n * Defines `files` / `extraResources` / `extraFiles` on a normalized configuration (root and platform sections, which\n * {@link normalizeFileOptions} made copies of, so a caller's own objects are never decorated) as\n * non-enumerable accessors, so that code reading a flat key (a hook reading `context.packager.config.files`, a\n * `build()` caller reading `buildResult.configuration.extraResources`) gets the `fileOptions` value, with a once-per-key warning.\n *\n * Non-enumerable, so JSON serialization (the effective config), `deepAssign`, spreads and schema validation never see them.\n * Writes throw: a value assigned once file matchers are computed would be silently ignored for the platforms\n * already packed, so the caller is pointed at `fileOptions` instead.\n */\nexport function forwardFlatFileOptionReads(config: Record<string, any>): void {\n forEachFileOptionsHolder(config, (holder, prefix) => {\n for (const key of FILE_OPTION_KEYS) {\n if (Object.prototype.hasOwnProperty.call(holder, key)) {\n continue\n }\n const flatPath = `config.${prefix}${key}`\n const nested = `config.${nestedPath(prefix + key)}`\n Object.defineProperty(holder, key, {\n enumerable: false,\n configurable: true,\n get() {\n log.once(`flat-file-options-read:${flatPath}`).warn(`\\`${flatPath}\\` is not a configuration property; read \\`${nested}\\`. ${FILE_OPTIONS_URL}`)\n const fileOptions = holder.fileOptions\n return isPlainObject(fileOptions) ? fileOptions[key] : undefined\n },\n set() {\n throw new InvalidConfigurationError(\n `\\`${flatPath}\\` is not a configuration property and cannot be assigned; set \\`${nested}\\` instead, before the files are copied (e.g. in a \\`beforePack\\` hook). ${FILE_OPTIONS_URL}`\n )\n },\n })\n }\n })\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"legacyConfigGuard.d.ts","sourceRoot":"","sources":["../../../src/util/config/legacyConfigGuard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAkNtD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CA2BpE"}
1
+ {"version":3,"file":"legacyConfigGuard.d.ts","sourceRoot":"","sources":["../../../src/util/config/legacyConfigGuard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AA0NtD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CA2BpE"}
@@ -1,6 +1,6 @@
1
1
  import { InvalidConfigurationError, log } from "builder-util";
2
2
  import { hasFlatFileOption, isPlainObject } from "./fileOptions.js";
3
- import { ALL_PLATFORM_KEYS, BREAKING_CHANGES_URL, FILE_OPTION_KEYS, FILE_OPTIONS_ANCHOR, formatLegacyOptionMessage, RESOLVED_LEGACY_CONFIG_OPTIONS } from "./legacyOptions.js";
3
+ import { ALL_PLATFORM_KEYS, BREAKING_CHANGES_URL, CONFIG_CHANGES_URL, FILE_OPTION_KEYS, FILE_OPTIONS_ANCHOR, formatLegacyOptionMessage, RESOLVED_LEGACY_CONFIG_OPTIONS, } from "./legacyOptions.js";
4
4
  /**
5
5
  * Build-time guard for configurations still written against v26.
6
6
  *
@@ -37,7 +37,7 @@ const SNAPCRAFT_BASE_LEVEL_KEYS = new Set([
37
37
  ]);
38
38
  const SNAPCRAFT_BASES = ["core18", "core20", "core22", "core24", "custom"];
39
39
  function docLink(anchor) {
40
- return ` ${BREAKING_CHANGES_URL}#${anchor}`;
40
+ return ` ${CONFIG_CHANGES_URL}#${anchor}`;
41
41
  }
42
42
  /** Resolves `path` against `config`, returning the holding object or null when any segment is missing. */
43
43
  function resolveParent(config, path) {
@@ -1 +1 @@
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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"]}
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,EACL,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACh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ACxC,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 {\n ALL_PLATFORM_KEYS,\n BREAKING_CHANGES_URL,\n CONFIG_CHANGES_URL,\n FILE_OPTION_KEYS,\n FILE_OPTIONS_ANCHOR,\n formatLegacyOptionMessage,\n RESOLVED_LEGACY_CONFIG_OPTIONS,\n} 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 ` ${CONFIG_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"]}
@@ -34,7 +34,12 @@ export declare const MAC_PLATFORM_KEYS: readonly ["mac", "mas", "masDev"];
34
34
  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
+ /** Overview of the v27 breaking changes. Each change is documented on one of the category pages below. */
37
38
  export declare const BREAKING_CHANGES_URL = "https://www.electron.build/docs/migration/v27-breaking-changes";
39
+ export declare const CONFIG_CHANGES_URL = "https://www.electron.build/docs/migration/v27-config-changes";
40
+ export declare const BUILD_CHANGES_URL = "https://www.electron.build/docs/migration/v27-build-changes";
41
+ export declare const RUNTIME_CHANGES_URL = "https://www.electron.build/docs/migration/v27-runtime-changes";
42
+ export declare const DEVELOPER_CHANGES_URL = "https://www.electron.build/docs/migration/v27-developer-changes";
38
43
  /**
39
44
  * File-copy options nested under `fileOptions`, at the configuration root and on every platform key
40
45
  * (`files` → `fileOptions.files`, `mac.extraResources` → `mac.fileOptions.extraResources`, …).
@@ -44,7 +49,7 @@ export declare const BREAKING_CHANGES_URL = "https://www.electron.build/docs/mig
44
49
  * schema only have `fileOptions`.
45
50
  */
46
51
  export declare const FILE_OPTION_KEYS: readonly ["files", "extraResources", "extraFiles"];
47
- /** Anchor of the `fileOptions` entry within the breaking-changes page. */
52
+ /** Anchor of the `fileOptions` entry within the config-changes page. */
48
53
  export declare const FILE_OPTIONS_ANCHOR = "file-options-fileoptions";
49
54
  export interface LegacyConfigOption {
50
55
  /** The removed key itself. */
@@ -63,8 +68,10 @@ export interface LegacyConfigOption {
63
68
  readonly severity: "error" | "warn";
64
69
  /** Extra sentence appended to the message — inverted polarity, lost behaviour, etc. */
65
70
  readonly detail?: string;
66
- /** Anchor within the breaking-changes page. */
71
+ /** Anchor within the config-changes page, or within `docsUrl` when set. */
67
72
  readonly anchor: string;
73
+ /** Page holding `anchor` when it is not the config-changes page. */
74
+ readonly docsUrl?: string;
68
75
  }
69
76
  export declare const LEGACY_CONFIG_OPTIONS: readonly LegacyConfigOption[];
70
77
  /** A `LegacyConfigOption` with its `scope` expanded to a concrete parent path. */
@@ -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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AAE,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,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,oEAAoE;IACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAeD,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EA0T9D,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"}
@@ -58,7 +58,12 @@ export const MAC_PLATFORM_KEYS = ["mac", "mas", "masDev"];
58
58
  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
+ /** Overview of the v27 breaking changes. Each change is documented on one of the category pages below. */
61
62
  export const BREAKING_CHANGES_URL = "https://www.electron.build/docs/migration/v27-breaking-changes";
63
+ export const CONFIG_CHANGES_URL = "https://www.electron.build/docs/migration/v27-config-changes";
64
+ export const BUILD_CHANGES_URL = "https://www.electron.build/docs/migration/v27-build-changes";
65
+ export const RUNTIME_CHANGES_URL = "https://www.electron.build/docs/migration/v27-runtime-changes";
66
+ export const DEVELOPER_CHANGES_URL = "https://www.electron.build/docs/migration/v27-developer-changes";
62
67
  /**
63
68
  * File-copy options nested under `fileOptions`, at the configuration root and on every platform key
64
69
  * (`files` → `fileOptions.files`, `mac.extraResources` → `mac.fileOptions.extraResources`, …).
@@ -68,7 +73,7 @@ export const BREAKING_CHANGES_URL = "https://www.electron.build/docs/migration/v
68
73
  * schema only have `fileOptions`.
69
74
  */
70
75
  export const FILE_OPTION_KEYS = ["files", "extraResources", "extraFiles"];
71
- /** Anchor of the `fileOptions` entry within the breaking-changes page. */
76
+ /** Anchor of the `fileOptions` entry within the config-changes page. */
72
77
  export const FILE_OPTIONS_ANCHOR = "file-options-fileoptions";
73
78
  const MAC_SIGN_ANCHOR = "macos-signing-macsign";
74
79
  const ASAR_ANCHOR = "asar-options-asar";
@@ -346,6 +351,7 @@ export const LEGACY_CONFIG_OPTIONS = [
346
351
  severity: "error",
347
352
  detail: "Put build configuration at the configuration root instead.",
348
353
  anchor: "devmetadata-extrametadata-programmatic-packageroptions",
354
+ docsUrl: DEVELOPER_CHANGES_URL,
349
355
  },
350
356
  // ── macOS signing: one entry per moved field, per platform key ────────────
351
357
  ...MAC_SIGN_FIELDS.map((field) => ({
@@ -419,7 +425,7 @@ export function formatLegacyOptionMessage(option) {
419
425
  if (option.autoMigrated) {
420
426
  lines.push(" Run `electron-builder migrate-schema` to update your configuration automatically.");
421
427
  }
422
- lines.push(` ${BREAKING_CHANGES_URL}#${option.anchor}`);
428
+ lines.push(` ${option.docsUrl ?? CONFIG_CHANGES_URL}#${option.anchor}`);
423
429
  return lines.join("\n");
424
430
  }
425
431
  //# sourceMappingURL=legacyOptions.js.map
@@ -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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,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\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"]}
1
+ {"version":3,"file":"legacyOptions.js","sourceRoot":"","sources":["../../../src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ers 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\n/** Overview of the v27 breaking changes. Each change is documented on one of the category pages below. */\nexport const BREAKING_CHANGES_URL = \"https://www.electron.build/docs/migration/v27-breaking-changes\"\nexport const CONFIG_CHANGES_URL = \"https://www.electron.build/docs/migration/v27-config-changes\"\nexport const BUILD_CHANGES_URL = \"https://www.electron.build/docs/migration/v27-build-changes\"\nexport const RUNTIME_CHANGES_URL = \"https://www.electron.build/docs/migration/v27-runtime-changes\"\nexport const DEVELOPER_CHANGES_URL = \"https://www.electron.build/docs/migration/v27-developer-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 config-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 config-changes page, or within `docsUrl` when set. */\n readonly anchor: string\n /** Page holding `anchor` when it is not the config-changes page. */\n readonly docsUrl?: 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 docsUrl: DEVELOPER_CHANGES_URL,\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(` ${option.docsUrl ?? CONFIG_CHANGES_URL}#${option.anchor}`)\n return lines.join(\"\\n\")\n}\n"]}
@@ -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,eA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DD,wBAAsB,sBAAsB,CAAC,OAAO,EAAE;IACpD,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,OAAO,CAAC,MAAM,CAAC,CA0ClB;AA8ID;;;GAGG;AACH,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,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"}
@@ -15,6 +15,7 @@ import * as unzipper from "unzipper";
15
15
  import { getPath7za } from "../toolsets/7zip.js";
16
16
  import { checksumMismatchMessage, parseChecksum, verifyFileChecksum } from "./checksum.js";
17
17
  import { CacheState, cleanupCacheDirectory, computeCacheMetadata, readCacheStateFile, validateCacheDirectory, writeCacheState } from "./cacheState.js";
18
+ import { BUILD_CHANGES_URL } from "./config/legacyOptions.js";
18
19
  export function hashUrlSafe(input, length = 6) {
19
20
  let hash = 5381;
20
21
  for (let i = 0; i < input.length; i++) {
@@ -602,9 +603,10 @@ export function resolveBuilderBinaryUrl(releaseName, filenameWithExt, baseUrl, o
602
603
  * debug level, and on a warm cache it printed nothing at all — so a regression introduced by a new
603
604
  * bundle had no trace in the build log tying it to the toolset.
604
605
  */
606
+ const TOOLSET_DEFAULTS_DOCS = `${BUILD_CHANGES_URL}#toolset-defaults-resolve-to-latest-newest-bundle`;
605
607
  function announceToolsetVersion(releaseName) {
606
608
  // once per toolset per process, so a multi-target build logs each one once
607
- log.once(`toolset:${releaseName}`).info({ toolset: releaseName }, "using toolset");
609
+ log.once(`toolset:${releaseName}`).info({ toolset: releaseName, docs: TOOLSET_DEFAULTS_DOCS }, "using toolset");
608
610
  }
609
611
  export async function downloadBuilderToolset(options) {
610
612
  const { releaseName, filenameWithExt, checksums, githubOrgRepo = "electron-userland/electron-builder-binaries", overrideUrl } = options;