diff --git a/.changeset/brown-boxes-know.md b/.changeset/brown-boxes-know.md deleted file mode 100644 index 8a89da10784..00000000000 --- a/.changeset/brown-boxes-know.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"app-builder-lib": patch ---- - -fix: add quotation marks around variable in AppArmor profile diff --git a/.changeset/chatty-points-shop.md b/.changeset/chatty-points-shop.md deleted file mode 100644 index 3032075ad30..00000000000 --- a/.changeset/chatty-points-shop.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"app-builder-lib": patch -"builder-util-runtime": patch -"electron-publish": patch ---- - -feat(github): Add `tagNamePrefix` option and deprecate `vPrefixedTagName` diff --git a/.changeset/fuzzy-kings-cry.md b/.changeset/fuzzy-kings-cry.md deleted file mode 100644 index 5c74ec4b78d..00000000000 --- a/.changeset/fuzzy-kings-cry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"electron-updater": patch ---- - -fix: uncaught exception during differential downloading via multipleRangDownloader diff --git a/.changeset/hot-cars-attack.md b/.changeset/hot-cars-attack.md deleted file mode 100644 index fe87412dbc5..00000000000 --- a/.changeset/hot-cars-attack.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"electron-updater": patch ---- - -fix: auto-update powershell script diff --git a/.changeset/long-wasps-divide.md b/.changeset/long-wasps-divide.md deleted file mode 100644 index c1c32596c48..00000000000 --- a/.changeset/long-wasps-divide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"electron-builder": patch ---- - -fix: support option to override `PublishPolicy` in publish command diff --git a/.changeset/lovely-brooms-move.md b/.changeset/lovely-brooms-move.md deleted file mode 100644 index a8bfcce17fb..00000000000 --- a/.changeset/lovely-brooms-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"electron-builder-squirrel-windows": patch ---- - -fix: generate stubExecutableExe and sign it for squirrel.windows using new electron-builder-binaries asset diff --git a/.changeset/lovely-geckos-chew.md b/.changeset/lovely-geckos-chew.md deleted file mode 100644 index 092c4833542..00000000000 --- a/.changeset/lovely-geckos-chew.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"electron-builder-squirrel-windows": patch ---- - -fix(squirrel-windows): update loadingGif handling to prioritize user-defined option diff --git a/.changeset/lovely-moose-worry.md b/.changeset/lovely-moose-worry.md deleted file mode 100644 index bf6d1f133f1..00000000000 --- a/.changeset/lovely-moose-worry.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"builder-util-runtime": minor ---- - -fix: implement industry-standard cross-origin redirect auth handling - -Replace hardcoded service-specific hostname checks with sophisticated cross-origin redirect detection that matches industry standards from Python requests library and Apache HttpClient. - -**Key improvements:** -- **Case-insensitive hostname comparison** for robust origin detection -- **HTTP→HTTPS upgrade allowance** on standard ports (80→443) for backward compatibility -- **Proper default port handling** that treats implicit and explicit default ports as equivalent -- **Standards-compliant cross-origin detection** following RFC specifications - -**Fixes GitHub issue #9207:** GitHub release asset downloads failing with 403 Forbidden when redirected from `api.github.com` to `release-assets.githubusercontent.com` (Azure backend) or other cloud storage services that don't accept GitHub tokens. - -The implementation now handles all cross-origin redirect scenarios while maintaining compatibility with legitimate same-origin redirects and industry-standard HTTP→HTTPS upgrades. diff --git a/.changeset/old-spies-lick.md b/.changeset/old-spies-lick.md deleted file mode 100644 index 98f7829f62e..00000000000 --- a/.changeset/old-spies-lick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"app-builder-lib": patch ---- - -fix(nsis): undefined vars when `customCheckAppRunning` is defined diff --git a/.changeset/pr-9260.md b/.changeset/pr-9260.md deleted file mode 100644 index a7a067bcd49..00000000000 --- a/.changeset/pr-9260.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"app-builder-lib": patch ---- - -fix(app-builder-lib): Change dependency collection to parse from root to better handle monorepos diff --git a/.changeset/rotten-bags-carry.md b/.changeset/rotten-bags-carry.md deleted file mode 100644 index 69300326a76..00000000000 --- a/.changeset/rotten-bags-carry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"electron-builder": patch ---- - -fix: fix argument names mismatch in publish command to make it work diff --git a/.changeset/rude-donuts-bathe.md b/.changeset/rude-donuts-bathe.md deleted file mode 100644 index 4aa1208c641..00000000000 --- a/.changeset/rude-donuts-bathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"app-builder-lib": patch ---- - -fix(yarn): check for dependencies in both projectDir and appDir during installation diff --git a/.changeset/selfish-trees-begin.md b/.changeset/selfish-trees-begin.md deleted file mode 100644 index a8e04fa3d62..00000000000 --- a/.changeset/selfish-trees-begin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"app-builder-lib": patch ---- - -fix(nsis): Fix file associations according to the Windows documentation diff --git a/.changeset/shaggy-garlics-joke.md b/.changeset/shaggy-garlics-joke.md deleted file mode 100644 index 434b3284f02..00000000000 --- a/.changeset/shaggy-garlics-joke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"builder-util": patch ---- - -fix: scrubbing more aggressively anything in the logs that MIGHT be password affiliated (handling spaces in secrets) diff --git a/.changeset/sharp-elephants-shout.md b/.changeset/sharp-elephants-shout.md deleted file mode 100644 index 03464d75b25..00000000000 --- a/.changeset/sharp-elephants-shout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"electron-updater": patch ---- - -fix(electron-updater): do not use quotes when installing update with sudo diff --git a/.changeset/sixty-mice-accept.md b/.changeset/sixty-mice-accept.md deleted file mode 100644 index d9882d0f707..00000000000 --- a/.changeset/sixty-mice-accept.md +++ /dev/null @@ -1,5 +0,0 @@ ---- - ---- - -fix(deps): update dependency form-data to v4.0.4 [security] diff --git a/.changeset/tough-walls-bathe.md b/.changeset/tough-walls-bathe.md deleted file mode 100644 index a4a633f9455..00000000000 --- a/.changeset/tough-walls-bathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"app-builder-lib": patch ---- - -fix detect wrong package manager for two package.json structure diff --git a/CHANGELOG.md b/CHANGELOG.md index 0de8f00caaa..80a3dd93351 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,35 @@ +# [](https://github.com/electron-userland/electron-builder/compare/v26.0.19...v) (2025-08-29) + + +### Bug Fixes + +* add quotation marks around variable in AppArmor profile ([#9231](https://github.com/electron-userland/electron-builder/issues/9231)) ([f262a73](https://github.com/electron-userland/electron-builder/commit/f262a7358dafe189b5d9bf06d7be43478ee35faa)) +* auto-update powershell script for powershell version test with `ConvertTo-Json test` ([#9232](https://github.com/electron-userland/electron-builder/issues/9232)) ([cfc4f36](https://github.com/electron-userland/electron-builder/commit/cfc4f36a5af20fb6c61dc7dfa6202cbc0fd9f201)) +* Change dependency collection to parse from root ([#9260](https://github.com/electron-userland/electron-builder/issues/9260)) ([49c782c](https://github.com/electron-userland/electron-builder/commit/49c782cb838e495f60c4d284df8ab4b56b619da9)) +* correct broken links in builder.ts and cli.md ([#9218](https://github.com/electron-userland/electron-builder/issues/9218)) ([e375149](https://github.com/electron-userland/electron-builder/commit/e37514998a25ada30c4e776e43134d466cac7221)) +* **deps:** update dependency form-data to v4.0.4 [security] ([#9212](https://github.com/electron-userland/electron-builder/issues/9212)) ([7977708](https://github.com/electron-userland/electron-builder/commit/79777089ca2b98c55dd1cabd157ec420994af696)) +* detect wrong package manager for two package.json structure ([#9257](https://github.com/electron-userland/electron-builder/issues/9257)) ([b778686](https://github.com/electron-userland/electron-builder/commit/b778686fb7f9294ec74bcb9a213a7f311a21357e)) +* **electron-updater:** Do not wrap update command when updating with sudo ([#9225](https://github.com/electron-userland/electron-builder/issues/9225)) ([d27ac52](https://github.com/electron-userland/electron-builder/commit/d27ac523bb1581f274c018952d55162315e7a9b8)) +* fix argument names mismatch in publish command to make it work ([#9227](https://github.com/electron-userland/electron-builder/issues/9227)) ([8f0ad06](https://github.com/electron-userland/electron-builder/commit/8f0ad06eae4716b7b753301531241166a7333058)) +* flaky unit tests ([#9251](https://github.com/electron-userland/electron-builder/issues/9251)) ([80f5f83](https://github.com/electron-userland/electron-builder/commit/80f5f83d5f35337853af488d2abe9e6f9187e3d5)) +* generate stubExecutableExe and sign it ([#8959](https://github.com/electron-userland/electron-builder/issues/8959)) ([0ad8f91](https://github.com/electron-userland/electron-builder/commit/0ad8f91cd5478a2063eb9e20df47797c8b42d48c)) +* **nsis:** fix file association ([#9217](https://github.com/electron-userland/electron-builder/issues/9217)) ([e9251f4](https://github.com/electron-userland/electron-builder/commit/e9251f4725f1f7c14c9792f5af8053dde1793d6a)) +* **nsis:** undefined vars when `customCheckAppRunning` is defined ([#9245](https://github.com/electron-userland/electron-builder/issues/9245)) ([3735881](https://github.com/electron-userland/electron-builder/commit/3735881f3259d0638d24fadc75809e5ea76114d7)) +* scrubbing more aggressively anything in the logs ([#9182](https://github.com/electron-userland/electron-builder/issues/9182)) ([c54a060](https://github.com/electron-userland/electron-builder/commit/c54a0609753a11d032f87e727eccbab1f6836081)) +* **squirrel-windows:** update loadingGif handling to prioritize user-defined option ([#9222](https://github.com/electron-userland/electron-builder/issues/9222)) ([9997660](https://github.com/electron-userland/electron-builder/commit/9997660e20cbdaa4ddb01d1c6078dea91097d6f0)) +* strip auth headers for GitHub release assets redirects ([#9211](https://github.com/electron-userland/electron-builder/issues/9211)) ([7c7fd6c](https://github.com/electron-userland/electron-builder/commit/7c7fd6ca240eda72048835f754adac92c4ab4e8c)) +* support option to override publish trigger (`--policy`) in publish command ([#9228](https://github.com/electron-userland/electron-builder/issues/9228)) ([d031eea](https://github.com/electron-userland/electron-builder/commit/d031eeaa7eb282e516471eed2e2a764716999b20)) +* **test:** gitlab related failed cases ([#9221](https://github.com/electron-userland/electron-builder/issues/9221)) ([c6d0ff9](https://github.com/electron-userland/electron-builder/commit/c6d0ff9870457d122f9fde6e10315a975bc696aa)) +* uncaught exception during differential downloading via multipleRangDownloader ([#9248](https://github.com/electron-userland/electron-builder/issues/9248)) ([8cbf079](https://github.com/electron-userland/electron-builder/commit/8cbf079ec20bbc642f9b6c306e3e9141a1fcc385)) +* **yarn:** check for dependencies in both projectDir and appDir during installation ([#9219](https://github.com/electron-userland/electron-builder/issues/9219)) ([cf0ac45](https://github.com/electron-userland/electron-builder/commit/cf0ac45db79e3e3ff1cef3ad931f7272646d1cb1)) + + +### Features + +* **github:** Add `tagNamePrefix` option to github publisher options (deprecates `vPrefixedTagName`) ([#9216](https://github.com/electron-userland/electron-builder/issues/9216)) ([44b2899](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1)) + + + # [](https://github.com/electron-userland/electron-builder/compare/v26.0.18...v) (2025-07-15) diff --git a/packages/app-builder-lib/CHANGELOG.md b/packages/app-builder-lib/CHANGELOG.md index 440097dac0b..e476931145a 100644 --- a/packages/app-builder-lib/CHANGELOG.md +++ b/packages/app-builder-lib/CHANGELOG.md @@ -1,5 +1,30 @@ # app-builder-lib +## 26.0.20 + +### Patch Changes + +- [#9231](https://github.com/electron-userland/electron-builder/pull/9231) [`f262a735`](https://github.com/electron-userland/electron-builder/commit/f262a7358dafe189b5d9bf06d7be43478ee35faa) Thanks [@rastiqdev](https://github.com/rastiqdev)! - fix: add quotation marks around variable in AppArmor profile + +- [#9216](https://github.com/electron-userland/electron-builder/pull/9216) [`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1) Thanks [@taylorhadden](https://github.com/taylorhadden)! - feat(github): Add `tagNamePrefix` option and deprecate `vPrefixedTagName` + +- [#9245](https://github.com/electron-userland/electron-builder/pull/9245) [`3735881f`](https://github.com/electron-userland/electron-builder/commit/3735881f3259d0638d24fadc75809e5ea76114d7) Thanks [@dlon](https://github.com/dlon)! - fix(nsis): undefined vars when `customCheckAppRunning` is defined + +- [#9260](https://github.com/electron-userland/electron-builder/pull/9260) [`49c782cb`](https://github.com/electron-userland/electron-builder/commit/49c782cb838e495f60c4d284df8ab4b56b619da9) Thanks [@Julusian](https://github.com/Julusian)! - fix(app-builder-lib): Change dependency collection to parse from root to better handle monorepos + +- [#9219](https://github.com/electron-userland/electron-builder/pull/9219) [`cf0ac45d`](https://github.com/electron-userland/electron-builder/commit/cf0ac45db79e3e3ff1cef3ad931f7272646d1cb1) Thanks [@beyondkmp](https://github.com/beyondkmp)! - fix(yarn): check for dependencies in both projectDir and appDir during installation + +- [#9217](https://github.com/electron-userland/electron-builder/pull/9217) [`e9251f47`](https://github.com/electron-userland/electron-builder/commit/e9251f4725f1f7c14c9792f5af8053dde1793d6a) Thanks [@sabonerune](https://github.com/sabonerune)! - fix(nsis): Fix file associations according to the Windows documentation + +- [#9257](https://github.com/electron-userland/electron-builder/pull/9257) [`b778686f`](https://github.com/electron-userland/electron-builder/commit/b778686fb7f9294ec74bcb9a213a7f311a21357e) Thanks [@DamonYu6](https://github.com/DamonYu6)! - fix detect wrong package manager for two package.json structure + +- Updated dependencies [[`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`0ad8f91c`](https://github.com/electron-userland/electron-builder/commit/0ad8f91cd5478a2063eb9e20df47797c8b42d48c), [`9997660e`](https://github.com/electron-userland/electron-builder/commit/9997660e20cbdaa4ddb01d1c6078dea91097d6f0), [`7c7fd6ca`](https://github.com/electron-userland/electron-builder/commit/7c7fd6ca240eda72048835f754adac92c4ab4e8c), [`c54a0609`](https://github.com/electron-userland/electron-builder/commit/c54a0609753a11d032f87e727eccbab1f6836081)]: + - builder-util-runtime@9.4.0 + - electron-publish@26.0.20 + - electron-builder-squirrel-windows@26.0.20 + - builder-util@26.0.20 + - dmg-builder@26.0.20 + ## 26.0.19 ### Patch Changes diff --git a/packages/app-builder-lib/package.json b/packages/app-builder-lib/package.json index 7f37d9126f9..2cbbbf12716 100644 --- a/packages/app-builder-lib/package.json +++ b/packages/app-builder-lib/package.json @@ -1,7 +1,7 @@ { "name": "app-builder-lib", "description": "electron-builder lib", - "version": "26.0.19", + "version": "26.0.20", "main": "out/index.js", "files": [ "out", diff --git a/packages/app-builder-lib/scheme.json b/packages/app-builder-lib/scheme.json index 1aa9988c7b9..fe7fe2a2aa2 100644 --- a/packages/app-builder-lib/scheme.json +++ b/packages/app-builder-lib/scheme.json @@ -1578,6 +1578,10 @@ "$ref": "#/definitions/OutgoingHttpHeaders", "description": "Any custom request headers" }, + "tagNamePrefix": { + "description": "If defined, sets the prefix of the tag name that comes before the semver number.\ne.g. \"v\" in \"v1.2.3\" or \"test\" of \"test1.2.3\".\nOverrides `vPrefixedTagName`", + "type": "string" + }, "timeout": { "default": 120000, "description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)", @@ -1603,10 +1607,6 @@ "default": true, "description": "Whether to use `v`-prefixed tag name.", "type": "boolean" - }, - "tagNamePrefix": { - "description": "Sets the prefix of the tag name that comes before the semver number. Overrides vPrefixedTagName.", - "type": "string" } }, "required": [ diff --git a/packages/app-builder-lib/src/node-module-collector/index.ts b/packages/app-builder-lib/src/node-module-collector/index.ts index f5b6a35e297..3dc9969e12e 100644 --- a/packages/app-builder-lib/src/node-module-collector/index.ts +++ b/packages/app-builder-lib/src/node-module-collector/index.ts @@ -27,7 +27,7 @@ export async function getNodeModules(pm: PM, rootDir: string, tempDirManager: Tm } export function detectPackageManager(dirs: string[]): PM { - let pm: PM | null = null; + let pm: PM | null = null for (const dir of dirs) { pm = detectPackageManagerByLockfile(dir) @@ -36,7 +36,7 @@ export function detectPackageManager(dirs: string[]): PM { } } - return detectPackageManagerByEnv('pnpm') || detectPackageManagerByEnv('yarn') || detectPackageManagerByEnv('npm') || PM.NPM + return detectPackageManagerByEnv("pnpm") || detectPackageManagerByEnv("yarn") || detectPackageManagerByEnv("npm") || PM.NPM } export { PM, getPackageManagerCommand } diff --git a/packages/app-builder-lib/src/node-module-collector/packageManager.ts b/packages/app-builder-lib/src/node-module-collector/packageManager.ts index 5835339431c..46390ef6f2c 100644 --- a/packages/app-builder-lib/src/node-module-collector/packageManager.ts +++ b/packages/app-builder-lib/src/node-module-collector/packageManager.ts @@ -42,7 +42,7 @@ export function getPackageManagerCommand(pm: PM) { return resolved } -export function detectPackageManagerByEnv(pm: 'npm' | 'yarn' | 'pnpm'): PM | null { +export function detectPackageManagerByEnv(pm: "npm" | "yarn" | "pnpm"): PM | null { const ua = process.env.npm_config_user_agent ?? "" const execPath = process.env.npm_execpath?.toLowerCase() ?? "" @@ -50,14 +50,14 @@ export function detectPackageManagerByEnv(pm: 'npm' | 'yarn' | 'pnpm'): PM | nul const isBerry = yarnVersion?.startsWith("2.") || yarnVersion?.startsWith("3.") switch (pm) { - case 'pnpm': + case "pnpm": return ua.includes("pnpm") || execPath.includes("pnpm") || process.env.PNPM_HOME ? PM.PNPM : null - case 'yarn': + case "yarn": if (ua.includes("yarn") || execPath.includes("yarn") || process.env.YARN_REGISTRY) { return isBerry || ua.includes("yarn/2") || ua.includes("yarn/3") ? PM.YARN_BERRY : PM.YARN } return null - case 'npm': + case "npm": return ua.includes("npm") || execPath.includes("npm") || process.env.npm_package_json ? PM.NPM : null default: return null @@ -78,7 +78,7 @@ export function detectPackageManagerByLockfile(cwd: string): PM | null { if (detected.length === 1) { if (detected[0] === PM.YARN) { - return detectPackageManagerByEnv('yarn') === PM.YARN_BERRY ? PM.YARN_BERRY : PM.YARN + return detectPackageManagerByEnv("yarn") === PM.YARN_BERRY ? PM.YARN_BERRY : PM.YARN } return detected[0] } diff --git a/packages/app-builder-lib/src/version.ts b/packages/app-builder-lib/src/version.ts index fb783f0f6c8..ca08f7ce323 100644 --- a/packages/app-builder-lib/src/version.ts +++ b/packages/app-builder-lib/src/version.ts @@ -1 +1 @@ -export const PACKAGE_VERSION = "26.0.19" +export const PACKAGE_VERSION = "26.0.20" diff --git a/packages/builder-util-runtime/CHANGELOG.md b/packages/builder-util-runtime/CHANGELOG.md index fec78833c7c..f9f50eadede 100644 --- a/packages/builder-util-runtime/CHANGELOG.md +++ b/packages/builder-util-runtime/CHANGELOG.md @@ -1,5 +1,28 @@ # builder-util-runtime +## 9.4.0 + +### Minor Changes + +- [#9211](https://github.com/electron-userland/electron-builder/pull/9211) [`7c7fd6ca`](https://github.com/electron-userland/electron-builder/commit/7c7fd6ca240eda72048835f754adac92c4ab4e8c) Thanks [@FringeNet](https://github.com/FringeNet)! - fix: implement industry-standard cross-origin redirect auth handling + + Replace hardcoded service-specific hostname checks with sophisticated cross-origin redirect detection that matches industry standards from Python requests library and Apache HttpClient. + + **Key improvements:** + + - **Case-insensitive hostname comparison** for robust origin detection + - **HTTP→HTTPS upgrade allowance** on standard ports (80→443) for backward compatibility + - **Proper default port handling** that treats implicit and explicit default ports as equivalent + - **Standards-compliant cross-origin detection** following RFC specifications + + **Fixes GitHub issue #9207:** GitHub release asset downloads failing with 403 Forbidden when redirected from `api.github.com` to `release-assets.githubusercontent.com` (Azure backend) or other cloud storage services that don't accept GitHub tokens. + + The implementation now handles all cross-origin redirect scenarios while maintaining compatibility with legitimate same-origin redirects and industry-standard HTTP→HTTPS upgrades. + +### Patch Changes + +- [#9216](https://github.com/electron-userland/electron-builder/pull/9216) [`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1) Thanks [@taylorhadden](https://github.com/taylorhadden)! - feat(github): Add `tagNamePrefix` option and deprecate `vPrefixedTagName` + ## 9.3.3 ### Patch Changes diff --git a/packages/builder-util-runtime/package.json b/packages/builder-util-runtime/package.json index 0731d78d95a..9516972e020 100644 --- a/packages/builder-util-runtime/package.json +++ b/packages/builder-util-runtime/package.json @@ -1,6 +1,6 @@ { "name": "builder-util-runtime", - "version": "9.3.3", + "version": "9.4.0", "main": "out/index.js", "author": "Vladimir Krivosheev", "license": "MIT", diff --git a/packages/builder-util-runtime/src/httpExecutor.ts b/packages/builder-util-runtime/src/httpExecutor.ts index facec215fcc..3502ac33351 100644 --- a/packages/builder-util-runtime/src/httpExecutor.ts +++ b/packages/builder-util-runtime/src/httpExecutor.ts @@ -354,7 +354,7 @@ Please double check that your authentication token is correct. Due to security r // Special case: allow http -> https redirect on same host with standard ports // This matches the behavior of Python requests library for backward compatibility // url.port returns an empty string if the port is omitted - // or explicitly set to the default port for a given protocol. + // or explicitly set to the default port for a given protocol. if ( originalUrl.protocol === "http:" && // This can be replaced with `!originalUrl.port`, but for the sake of clarity. diff --git a/packages/builder-util-runtime/src/publishOptions.ts b/packages/builder-util-runtime/src/publishOptions.ts index f4ad8d7ed58..ccaa61bb1b5 100644 --- a/packages/builder-util-runtime/src/publishOptions.ts +++ b/packages/builder-util-runtime/src/publishOptions.ts @@ -156,9 +156,9 @@ export function githubTagPrefix(options: GithubOptions) { return options.tagNamePrefix } if (options.vPrefixedTagName ?? true) { - return 'v' + return "v" } - return '' + return "" } /** diff --git a/packages/builder-util/CHANGELOG.md b/packages/builder-util/CHANGELOG.md index bc657440cfd..d7f99d31e50 100644 --- a/packages/builder-util/CHANGELOG.md +++ b/packages/builder-util/CHANGELOG.md @@ -1,5 +1,14 @@ # builder-util +## 26.0.20 + +### Patch Changes + +- [#9182](https://github.com/electron-userland/electron-builder/pull/9182) [`c54a0609`](https://github.com/electron-userland/electron-builder/commit/c54a0609753a11d032f87e727eccbab1f6836081) Thanks [@mmaietta](https://github.com/mmaietta)! - fix: scrubbing more aggressively anything in the logs that MIGHT be password affiliated (handling spaces in secrets) + +- Updated dependencies [[`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`7c7fd6ca`](https://github.com/electron-userland/electron-builder/commit/7c7fd6ca240eda72048835f754adac92c4ab4e8c)]: + - builder-util-runtime@9.4.0 + ## 26.0.19 ### Patch Changes diff --git a/packages/builder-util/package.json b/packages/builder-util/package.json index c9d4d741305..13247b19133 100644 --- a/packages/builder-util/package.json +++ b/packages/builder-util/package.json @@ -1,6 +1,6 @@ { "name": "builder-util", - "version": "26.0.19", + "version": "26.0.20", "main": "out/util.js", "author": "Vladimir Krivosheev", "license": "MIT", diff --git a/packages/dmg-builder/CHANGELOG.md b/packages/dmg-builder/CHANGELOG.md index 860c828e915..c8e49252c30 100644 --- a/packages/dmg-builder/CHANGELOG.md +++ b/packages/dmg-builder/CHANGELOG.md @@ -1,5 +1,13 @@ # dmg-builder +## 26.0.20 + +### Patch Changes + +- Updated dependencies [[`f262a735`](https://github.com/electron-userland/electron-builder/commit/f262a7358dafe189b5d9bf06d7be43478ee35faa), [`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`3735881f`](https://github.com/electron-userland/electron-builder/commit/3735881f3259d0638d24fadc75809e5ea76114d7), [`49c782cb`](https://github.com/electron-userland/electron-builder/commit/49c782cb838e495f60c4d284df8ab4b56b619da9), [`cf0ac45d`](https://github.com/electron-userland/electron-builder/commit/cf0ac45db79e3e3ff1cef3ad931f7272646d1cb1), [`e9251f47`](https://github.com/electron-userland/electron-builder/commit/e9251f4725f1f7c14c9792f5af8053dde1793d6a), [`c54a0609`](https://github.com/electron-userland/electron-builder/commit/c54a0609753a11d032f87e727eccbab1f6836081), [`b778686f`](https://github.com/electron-userland/electron-builder/commit/b778686fb7f9294ec74bcb9a213a7f311a21357e)]: + - app-builder-lib@26.0.20 + - builder-util@26.0.20 + ## 26.0.19 ### Patch Changes diff --git a/packages/dmg-builder/package.json b/packages/dmg-builder/package.json index 89552cf8194..1cfc3fdc6e3 100644 --- a/packages/dmg-builder/package.json +++ b/packages/dmg-builder/package.json @@ -1,6 +1,6 @@ { "name": "dmg-builder", - "version": "26.0.19", + "version": "26.0.20", "main": "out/dmgUtil.js", "author": "Vladimir Krivosheev", "license": "MIT", diff --git a/packages/electron-builder-squirrel-windows/CHANGELOG.md b/packages/electron-builder-squirrel-windows/CHANGELOG.md index 293e9e7a3c7..8b8ab99a4d7 100644 --- a/packages/electron-builder-squirrel-windows/CHANGELOG.md +++ b/packages/electron-builder-squirrel-windows/CHANGELOG.md @@ -1,5 +1,17 @@ # electron-builder-squirrel-windows +## 26.0.20 + +### Patch Changes + +- [#8959](https://github.com/electron-userland/electron-builder/pull/8959) [`0ad8f91c`](https://github.com/electron-userland/electron-builder/commit/0ad8f91cd5478a2063eb9e20df47797c8b42d48c) Thanks [@beyondkmp](https://github.com/beyondkmp)! - fix: generate stubExecutableExe and sign it for squirrel.windows using new electron-builder-binaries asset + +- [#9222](https://github.com/electron-userland/electron-builder/pull/9222) [`9997660e`](https://github.com/electron-userland/electron-builder/commit/9997660e20cbdaa4ddb01d1c6078dea91097d6f0) Thanks [@beyondkmp](https://github.com/beyondkmp)! - fix(squirrel-windows): update loadingGif handling to prioritize user-defined option + +- Updated dependencies [[`f262a735`](https://github.com/electron-userland/electron-builder/commit/f262a7358dafe189b5d9bf06d7be43478ee35faa), [`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`3735881f`](https://github.com/electron-userland/electron-builder/commit/3735881f3259d0638d24fadc75809e5ea76114d7), [`49c782cb`](https://github.com/electron-userland/electron-builder/commit/49c782cb838e495f60c4d284df8ab4b56b619da9), [`cf0ac45d`](https://github.com/electron-userland/electron-builder/commit/cf0ac45db79e3e3ff1cef3ad931f7272646d1cb1), [`e9251f47`](https://github.com/electron-userland/electron-builder/commit/e9251f4725f1f7c14c9792f5af8053dde1793d6a), [`c54a0609`](https://github.com/electron-userland/electron-builder/commit/c54a0609753a11d032f87e727eccbab1f6836081), [`b778686f`](https://github.com/electron-userland/electron-builder/commit/b778686fb7f9294ec74bcb9a213a7f311a21357e)]: + - app-builder-lib@26.0.20 + - builder-util@26.0.20 + ## 26.0.19 ### Patch Changes diff --git a/packages/electron-builder-squirrel-windows/package.json b/packages/electron-builder-squirrel-windows/package.json index ef2e2729f55..c4aae2604e0 100644 --- a/packages/electron-builder-squirrel-windows/package.json +++ b/packages/electron-builder-squirrel-windows/package.json @@ -1,6 +1,6 @@ { "name": "electron-builder-squirrel-windows", - "version": "26.0.19", + "version": "26.0.20", "main": "out/SquirrelWindowsTarget.js", "author": "Vladimir Krivosheev", "license": "MIT", diff --git a/packages/electron-builder/CHANGELOG.md b/packages/electron-builder/CHANGELOG.md index 765315ec9dc..a24d5b55184 100644 --- a/packages/electron-builder/CHANGELOG.md +++ b/packages/electron-builder/CHANGELOG.md @@ -1,5 +1,19 @@ # electron-builder +## 26.0.20 + +### Patch Changes + +- [#9228](https://github.com/electron-userland/electron-builder/pull/9228) [`d031eeaa`](https://github.com/electron-userland/electron-builder/commit/d031eeaa7eb282e516471eed2e2a764716999b20) Thanks [@choegyumin](https://github.com/choegyumin)! - fix: support option to override `PublishPolicy` in publish command + +- [#9227](https://github.com/electron-userland/electron-builder/pull/9227) [`8f0ad06e`](https://github.com/electron-userland/electron-builder/commit/8f0ad06eae4716b7b753301531241166a7333058) Thanks [@choegyumin](https://github.com/choegyumin)! - fix: fix argument names mismatch in publish command to make it work + +- Updated dependencies [[`f262a735`](https://github.com/electron-userland/electron-builder/commit/f262a7358dafe189b5d9bf06d7be43478ee35faa), [`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`7c7fd6ca`](https://github.com/electron-userland/electron-builder/commit/7c7fd6ca240eda72048835f754adac92c4ab4e8c), [`3735881f`](https://github.com/electron-userland/electron-builder/commit/3735881f3259d0638d24fadc75809e5ea76114d7), [`49c782cb`](https://github.com/electron-userland/electron-builder/commit/49c782cb838e495f60c4d284df8ab4b56b619da9), [`cf0ac45d`](https://github.com/electron-userland/electron-builder/commit/cf0ac45db79e3e3ff1cef3ad931f7272646d1cb1), [`e9251f47`](https://github.com/electron-userland/electron-builder/commit/e9251f4725f1f7c14c9792f5af8053dde1793d6a), [`c54a0609`](https://github.com/electron-userland/electron-builder/commit/c54a0609753a11d032f87e727eccbab1f6836081), [`b778686f`](https://github.com/electron-userland/electron-builder/commit/b778686fb7f9294ec74bcb9a213a7f311a21357e)]: + - app-builder-lib@26.0.20 + - builder-util-runtime@9.4.0 + - builder-util@26.0.20 + - dmg-builder@26.0.20 + ## 26.0.19 ### Patch Changes diff --git a/packages/electron-builder/package.json b/packages/electron-builder/package.json index 2acd7a220a5..1f9636ac3f7 100644 --- a/packages/electron-builder/package.json +++ b/packages/electron-builder/package.json @@ -1,7 +1,7 @@ { "name": "electron-builder", "description": "A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out of the box", - "version": "26.0.19", + "version": "26.0.20", "main": "out/index.js", "files": [ "out" diff --git a/packages/electron-builder/src/builder.ts b/packages/electron-builder/src/builder.ts index d0e9ba1f0d7..295f480bc9b 100644 --- a/packages/electron-builder/src/builder.ts +++ b/packages/electron-builder/src/builder.ts @@ -287,7 +287,8 @@ export function configureBuildCommand(yargs: yargs.Argv): yargs.Argv { alias: ["c"], group: buildGroup, description: - "The path to an electron-builder config. Defaults to `electron-builder.yml` (or `json`, or `json5`, or `js`, or `ts`), see " + chalk.underline("https://www.electron.build/configuration"), + "The path to an electron-builder config. Defaults to `electron-builder.yml` (or `json`, or `json5`, or `js`, or `ts`), see " + + chalk.underline("https://www.electron.build/configuration"), }) .group(["help", "version"], "Other:") .example("electron-builder -mwl", "build for macOS, Windows and Linux") diff --git a/packages/electron-forge-maker-appimage/CHANGELOG.md b/packages/electron-forge-maker-appimage/CHANGELOG.md index 056919711e0..30ad7a9056a 100644 --- a/packages/electron-forge-maker-appimage/CHANGELOG.md +++ b/packages/electron-forge-maker-appimage/CHANGELOG.md @@ -1,5 +1,12 @@ # electron-forge-maker-appimage +## 26.0.20 + +### Patch Changes + +- Updated dependencies [[`f262a735`](https://github.com/electron-userland/electron-builder/commit/f262a7358dafe189b5d9bf06d7be43478ee35faa), [`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`3735881f`](https://github.com/electron-userland/electron-builder/commit/3735881f3259d0638d24fadc75809e5ea76114d7), [`49c782cb`](https://github.com/electron-userland/electron-builder/commit/49c782cb838e495f60c4d284df8ab4b56b619da9), [`cf0ac45d`](https://github.com/electron-userland/electron-builder/commit/cf0ac45db79e3e3ff1cef3ad931f7272646d1cb1), [`e9251f47`](https://github.com/electron-userland/electron-builder/commit/e9251f4725f1f7c14c9792f5af8053dde1793d6a), [`b778686f`](https://github.com/electron-userland/electron-builder/commit/b778686fb7f9294ec74bcb9a213a7f311a21357e)]: + - app-builder-lib@26.0.20 + ## 26.0.19 ### Patch Changes diff --git a/packages/electron-forge-maker-appimage/package.json b/packages/electron-forge-maker-appimage/package.json index 18a1d5a1f0c..cd9722d6725 100644 --- a/packages/electron-forge-maker-appimage/package.json +++ b/packages/electron-forge-maker-appimage/package.json @@ -1,6 +1,6 @@ { "name": "electron-forge-maker-appimage", - "version": "26.0.19", + "version": "26.0.20", "main": "main.js", "author": "Vladimir Krivosheev", "license": "MIT", diff --git a/packages/electron-forge-maker-nsis-web/CHANGELOG.md b/packages/electron-forge-maker-nsis-web/CHANGELOG.md index 12875091977..360f5b7876b 100644 --- a/packages/electron-forge-maker-nsis-web/CHANGELOG.md +++ b/packages/electron-forge-maker-nsis-web/CHANGELOG.md @@ -1,5 +1,12 @@ # electron-forge-maker-nsis-web +## 26.0.20 + +### Patch Changes + +- Updated dependencies [[`f262a735`](https://github.com/electron-userland/electron-builder/commit/f262a7358dafe189b5d9bf06d7be43478ee35faa), [`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`3735881f`](https://github.com/electron-userland/electron-builder/commit/3735881f3259d0638d24fadc75809e5ea76114d7), [`49c782cb`](https://github.com/electron-userland/electron-builder/commit/49c782cb838e495f60c4d284df8ab4b56b619da9), [`cf0ac45d`](https://github.com/electron-userland/electron-builder/commit/cf0ac45db79e3e3ff1cef3ad931f7272646d1cb1), [`e9251f47`](https://github.com/electron-userland/electron-builder/commit/e9251f4725f1f7c14c9792f5af8053dde1793d6a), [`b778686f`](https://github.com/electron-userland/electron-builder/commit/b778686fb7f9294ec74bcb9a213a7f311a21357e)]: + - app-builder-lib@26.0.20 + ## 26.0.19 ### Patch Changes diff --git a/packages/electron-forge-maker-nsis-web/package.json b/packages/electron-forge-maker-nsis-web/package.json index 77b1cfac401..1d67fb98e83 100644 --- a/packages/electron-forge-maker-nsis-web/package.json +++ b/packages/electron-forge-maker-nsis-web/package.json @@ -1,6 +1,6 @@ { "name": "electron-forge-maker-nsis-web", - "version": "26.0.19", + "version": "26.0.20", "main": "main.js", "author": "Vladimir Krivosheev", "license": "MIT", diff --git a/packages/electron-forge-maker-nsis/CHANGELOG.md b/packages/electron-forge-maker-nsis/CHANGELOG.md index 2a8735dfeb5..50a4ec7f826 100644 --- a/packages/electron-forge-maker-nsis/CHANGELOG.md +++ b/packages/electron-forge-maker-nsis/CHANGELOG.md @@ -1,5 +1,12 @@ # electron-forge-maker-nsis +## 26.0.20 + +### Patch Changes + +- Updated dependencies [[`f262a735`](https://github.com/electron-userland/electron-builder/commit/f262a7358dafe189b5d9bf06d7be43478ee35faa), [`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`3735881f`](https://github.com/electron-userland/electron-builder/commit/3735881f3259d0638d24fadc75809e5ea76114d7), [`49c782cb`](https://github.com/electron-userland/electron-builder/commit/49c782cb838e495f60c4d284df8ab4b56b619da9), [`cf0ac45d`](https://github.com/electron-userland/electron-builder/commit/cf0ac45db79e3e3ff1cef3ad931f7272646d1cb1), [`e9251f47`](https://github.com/electron-userland/electron-builder/commit/e9251f4725f1f7c14c9792f5af8053dde1793d6a), [`b778686f`](https://github.com/electron-userland/electron-builder/commit/b778686fb7f9294ec74bcb9a213a7f311a21357e)]: + - app-builder-lib@26.0.20 + ## 26.0.19 ### Patch Changes diff --git a/packages/electron-forge-maker-nsis/package.json b/packages/electron-forge-maker-nsis/package.json index 86eca73b4bb..fca741f4832 100644 --- a/packages/electron-forge-maker-nsis/package.json +++ b/packages/electron-forge-maker-nsis/package.json @@ -1,6 +1,6 @@ { "name": "electron-forge-maker-nsis", - "version": "26.0.19", + "version": "26.0.20", "main": "main.js", "author": "Vladimir Krivosheev", "license": "MIT", diff --git a/packages/electron-forge-maker-snap/CHANGELOG.md b/packages/electron-forge-maker-snap/CHANGELOG.md index 4fd78e8eaf4..f6887f47edb 100644 --- a/packages/electron-forge-maker-snap/CHANGELOG.md +++ b/packages/electron-forge-maker-snap/CHANGELOG.md @@ -1,5 +1,12 @@ # electron-forge-maker-snap +## 26.0.20 + +### Patch Changes + +- Updated dependencies [[`f262a735`](https://github.com/electron-userland/electron-builder/commit/f262a7358dafe189b5d9bf06d7be43478ee35faa), [`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`3735881f`](https://github.com/electron-userland/electron-builder/commit/3735881f3259d0638d24fadc75809e5ea76114d7), [`49c782cb`](https://github.com/electron-userland/electron-builder/commit/49c782cb838e495f60c4d284df8ab4b56b619da9), [`cf0ac45d`](https://github.com/electron-userland/electron-builder/commit/cf0ac45db79e3e3ff1cef3ad931f7272646d1cb1), [`e9251f47`](https://github.com/electron-userland/electron-builder/commit/e9251f4725f1f7c14c9792f5af8053dde1793d6a), [`b778686f`](https://github.com/electron-userland/electron-builder/commit/b778686fb7f9294ec74bcb9a213a7f311a21357e)]: + - app-builder-lib@26.0.20 + ## 26.0.19 ### Patch Changes diff --git a/packages/electron-forge-maker-snap/package.json b/packages/electron-forge-maker-snap/package.json index 4edb4811c07..e7e29de8d49 100644 --- a/packages/electron-forge-maker-snap/package.json +++ b/packages/electron-forge-maker-snap/package.json @@ -1,6 +1,6 @@ { "name": "electron-forge-maker-snap", - "version": "26.0.19", + "version": "26.0.20", "main": "main.js", "author": "Vladimir Krivosheev", "license": "MIT", diff --git a/packages/electron-publish/CHANGELOG.md b/packages/electron-publish/CHANGELOG.md index 3b23028d76a..9cc42275d42 100644 --- a/packages/electron-publish/CHANGELOG.md +++ b/packages/electron-publish/CHANGELOG.md @@ -1,5 +1,15 @@ # electron-publish +## 26.0.20 + +### Patch Changes + +- [#9216](https://github.com/electron-userland/electron-builder/pull/9216) [`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1) Thanks [@taylorhadden](https://github.com/taylorhadden)! - feat(github): Add `tagNamePrefix` option and deprecate `vPrefixedTagName` + +- Updated dependencies [[`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`7c7fd6ca`](https://github.com/electron-userland/electron-builder/commit/7c7fd6ca240eda72048835f754adac92c4ab4e8c), [`c54a0609`](https://github.com/electron-userland/electron-builder/commit/c54a0609753a11d032f87e727eccbab1f6836081)]: + - builder-util-runtime@9.4.0 + - builder-util@26.0.20 + ## 26.0.19 ### Patch Changes diff --git a/packages/electron-publish/package.json b/packages/electron-publish/package.json index dc8760f17c3..cd3c24545cc 100644 --- a/packages/electron-publish/package.json +++ b/packages/electron-publish/package.json @@ -1,6 +1,6 @@ { "name": "electron-publish", - "version": "26.0.19", + "version": "26.0.20", "main": "out/index.js", "author": "Vladimir Krivosheev", "license": "MIT", diff --git a/packages/electron-updater/CHANGELOG.md b/packages/electron-updater/CHANGELOG.md index 0890b388a7d..7d68efc338b 100644 --- a/packages/electron-updater/CHANGELOG.md +++ b/packages/electron-updater/CHANGELOG.md @@ -1,5 +1,18 @@ ## 4.3.0 +## 6.6.8 + +### Patch Changes + +- [#9248](https://github.com/electron-userland/electron-builder/pull/9248) [`8cbf079e`](https://github.com/electron-userland/electron-builder/commit/8cbf079ec20bbc642f9b6c306e3e9141a1fcc385) Thanks [@DamonYu6](https://github.com/DamonYu6)! - fix: uncaught exception during differential downloading via multipleRangDownloader + +- [#9232](https://github.com/electron-userland/electron-builder/pull/9232) [`cfc4f36a`](https://github.com/electron-userland/electron-builder/commit/cfc4f36a5af20fb6c61dc7dfa6202cbc0fd9f201) Thanks [@michalzaq12](https://github.com/michalzaq12)! - fix: auto-update powershell script + +- [#9225](https://github.com/electron-userland/electron-builder/pull/9225) [`d27ac523`](https://github.com/electron-userland/electron-builder/commit/d27ac523bb1581f274c018952d55162315e7a9b8) Thanks [@yannishuber](https://github.com/yannishuber)! - fix(electron-updater): do not use quotes when installing update with sudo + +- Updated dependencies [[`44b28997`](https://github.com/electron-userland/electron-builder/commit/44b28997f15314730d1bb69303a47dc26f7950d1), [`7c7fd6ca`](https://github.com/electron-userland/electron-builder/commit/7c7fd6ca240eda72048835f754adac92c4ab4e8c)]: + - builder-util-runtime@9.4.0 + ## 6.6.7 ### Patch Changes diff --git a/packages/electron-updater/package.json b/packages/electron-updater/package.json index fb7a62ab818..38429eef5fb 100644 --- a/packages/electron-updater/package.json +++ b/packages/electron-updater/package.json @@ -1,6 +1,6 @@ { "name": "electron-updater", - "version": "6.6.7", + "version": "6.6.8", "description": "Cross platform updater for electron applications", "main": "out/main.js", "author": "Vladimir Krivosheev", diff --git a/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts b/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts index c6a104ddfe9..f35f2aa88d3 100644 --- a/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts +++ b/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts @@ -45,59 +45,57 @@ export function verifySignature(publisherNames: Array, unescapedTempUpda const tempUpdateFile = unescapedTempUpdateFile.replace(/'/g, "''") logger.info(`Verifying signature ${tempUpdateFile}`) - execFile(...preparePowerShellExec(`"Get-AuthenticodeSignature -LiteralPath '${tempUpdateFile}' | ConvertTo-Json -Compress"`, 20 * 1000), - (error, stdout, stderr) => { - try { - if (error != null || stderr) { - handleError(logger, error, stderr, reject) - resolve(null) - return + execFile(...preparePowerShellExec(`"Get-AuthenticodeSignature -LiteralPath '${tempUpdateFile}' | ConvertTo-Json -Compress"`, 20 * 1000), (error, stdout, stderr) => { + try { + if (error != null || stderr) { + handleError(logger, error, stderr, reject) + resolve(null) + return + } + const data = parseOut(stdout) + if (data.Status === 0) { + try { + const normlaizedUpdateFilePath = path.normalize(data.Path) + const normalizedTempUpdateFile = path.normalize(unescapedTempUpdateFile) + logger.info(`LiteralPath: ${normlaizedUpdateFilePath}. Update Path: ${normalizedTempUpdateFile}`) + if (normlaizedUpdateFilePath !== normalizedTempUpdateFile) { + handleError(logger, new Error(`LiteralPath of ${normlaizedUpdateFilePath} is different than ${normalizedTempUpdateFile}`), stderr, reject) + resolve(null) + return + } + } catch (error: any) { + logger.warn(`Unable to verify LiteralPath of update asset due to missing data.Path. Skipping this step of validation. Message: ${error.message ?? error.stack}`) } - const data = parseOut(stdout) - if (data.Status === 0) { - try { - const normlaizedUpdateFilePath = path.normalize(data.Path) - const normalizedTempUpdateFile = path.normalize(unescapedTempUpdateFile) - logger.info(`LiteralPath: ${normlaizedUpdateFilePath}. Update Path: ${normalizedTempUpdateFile}`) - if (normlaizedUpdateFilePath !== normalizedTempUpdateFile) { - handleError(logger, new Error(`LiteralPath of ${normlaizedUpdateFilePath} is different than ${normalizedTempUpdateFile}`), stderr, reject) - resolve(null) - return - } - } catch (error: any) { - logger.warn(`Unable to verify LiteralPath of update asset due to missing data.Path. Skipping this step of validation. Message: ${error.message ?? error.stack}`) + const subject = parseDn(data.SignerCertificate.Subject) + let match = false + for (const name of publisherNames) { + const dn = parseDn(name) + if (dn.size) { + // if we have a full DN, compare all values + const allKeys = Array.from(dn.keys()) + match = allKeys.every(key => { + return dn.get(key) === subject.get(key) + }) + } else if (name === subject.get("CN")!) { + logger.warn(`Signature validated using only CN ${name}. Please add your full Distinguished Name (DN) to publisherNames configuration`) + match = true } - const subject = parseDn(data.SignerCertificate.Subject) - let match = false - for (const name of publisherNames) { - const dn = parseDn(name) - if (dn.size) { - // if we have a full DN, compare all values - const allKeys = Array.from(dn.keys()) - match = allKeys.every(key => { - return dn.get(key) === subject.get(key) - }) - } else if (name === subject.get("CN")!) { - logger.warn(`Signature validated using only CN ${name}. Please add your full Distinguished Name (DN) to publisherNames configuration`) - match = true - } - if (match) { - resolve(null) - return - } + if (match) { + resolve(null) + return } } - - const result = `publisherNames: ${publisherNames.join(" | ")}, raw info: ` + JSON.stringify(data, (name, value) => (name === "RawData" ? undefined : value), 2) - logger.warn(`Sign verification failed, installer signed with incorrect certificate: ${result}`) - resolve(result) - } catch (e: any) { - handleError(logger, e, null, reject) - resolve(null) - return } + + const result = `publisherNames: ${publisherNames.join(" | ")}, raw info: ` + JSON.stringify(data, (name, value) => (name === "RawData" ? undefined : value), 2) + logger.warn(`Sign verification failed, installer signed with incorrect certificate: ${result}`) + resolve(result) + } catch (e: any) { + handleError(logger, e, null, reject) + resolve(null) + return } - ) + }) }) }