github electron-userland/electron-builder electron-builder@27.0.0-alpha.16

pre-release59 minutes ago

Major Changes

  • Fix(publish)!: github.host, gitlab.host and keygen.host must be an ASCII host name (punycode for an internationalized name), optionally with a port, and for gitlab.host optionally with a path (a GitLab instance under a relative URL root). A value with user info, a query, a fragment, a backslash, % or an empty path segment, or a path in github.host / keygen.host, fails at publish with InvalidConfigurationError. See https://www.electron.build/docs/migration/v27-build-changes#publish-host-must-be-a-host-name #10667 027550d — electron-publish
  • Feat(runtime)!: an HttpExecutor without a cross-origin header policy of its own, such as builder-util's httpExecutor, sends a redirect to another origin only the headers that carry no credential (Accept, Accept-Encoding, Accept-Language, Cache-Control, Content-Encoding, Content-Language, Content-Length, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Range, If-Unmodified-Since, Pragma, Range, User-Agent); every other header, a custom credential header such as X-Api-Token too, stays on its origin. builder-util's NodeHttpExecutor warns once per process, at the first redirect that leaves out headers other than the well-known credential headers (Authorization, Cookie, PRIVATE-TOKEN, X-Api-Key and the like), naming them and both origins (never a value). electron-updater keeps its own policy (autoUpdater.crossOriginHeaders). https://www.electron.build/docs/migration/v27-developer-changes#builder-util-runtime-default-cross-origin-headers #10665 12bafb3 — builder-util, builder-util-runtime

Minor Changes

  • Feat: add the optional blockMapSha512 field to UpdateFileInfo. It is not covered by the manifest signature. decodeBlockMapV3 and checkBlockMapV3Header reject an empty map (no blocks, or a 0-byte file), a region that is empty or extends past the file, and blocks that do not cover the file #10496 d0d4046 — builder-util-runtime
  • Feat(asar): experimental opt-in asar.stableLayout that keeps every packed file of app.asar at its offset in a previous release's archive (stableLayout.previous), placing new files and files that outgrew their slot into freed slots or after the previous content, with an optional per-file growthMargin. Adding, removing or growing a file then no longer shifts every later file's header offset, so a differential update stops re-downloading most of the asar header. Off by default; the default layout is unchanged. asar.contentAlignment now keeps @electron/asar's de-duplicated files sharing one copy instead of writing each again #10499 0c8138c — app-builder-lib

Patch Changes

  • Upgrade minimatch to ^11.0.1 and @electron/asar to ^4.3.2 (which moves to minimatch ^11.0.1 and glob ^14) to pick up the fix for GHSA-g3hv-75wg-m249. Also upgrade ejs (used for the MSI project templates) to ^7.0.2, which no longer depends on jake, removing the minimatch 3 and 5 copies that jake and filelist brought in. #10539 dbc5014 — app-builder-lib

  • Fix(publish): electron-builder publish -f works with a configuration that has a publish list: it loaded the configuration and then had it merged into the same file again, which failed validation (JSON, YAML) or crashed with "Converting circular structure to JSON" (a JS config). A -c path without a dot (-c ci/ebconfig) is read as the configuration file, and an absolute extends path without a dot given in the options is too, as one with a dot already was #10630 7fc52ed — electron-builder, app-builder-lib

  • Fix(nsis): Update Italian strings for NSIS installers #10619 18720c1 — app-builder-lib

  • Fix: decode child process output as UTF-8 across chunks. Before, a multi-byte character split between two pipe reads became � in spawn and spawnAndWriteWithOutput output and in ExecError messages, which could corrupt workspace paths, DMG mount paths and makensis output. After, split characters are decoded correctly. #10625 100cf40 — builder-util

  • Fix: parallel builds that take turns on electron-builder's shared cross-process locks (the toolset lock that Squirrel.Windows and MSI hold for a whole installer build, and the signtool and icons locks) wait up to about 60 minutes for the lock instead of giving up after about 8 minutes while other builds still hold it. A crashed holder's lock is still taken over after 2 minutes. When the wait does run out, the error names the lock file instead of proper-lockfile's bare "Lock file is already being held". #10654 476dd91 — app-builder-lib

  • Fix(mac): normalize bundle file names to NFD before code signing. Before, a bundle entry carrying a precomposed (NFC) non-ASCII name — 설명서.txt, café.txt, a nested 앱 Helper.app — was sealed under that name, and the HFS+ volume in a DMG rewrote it to the decomposed (NFD) form, so every such file became a missing sealed resource and macOS refused to launch the app with "the application is damaged". It passed codesign --verify and notarization on the build machine, so it only ever surfaced for whoever installed the app. Now, non-ASCII file and directory names inside the signed .app bundle are renamed on disk to their NFD form before signing, which matches what the volume stores and keeps the signature valid regardless of dmg.filesystem. Opening a file by its precomposed name still works on macOS, but an app that compares readdir results against NFC string literals should normalize both sides (e.g. name.normalize("NFC")). #10466 b7f3480 — app-builder-lib

  • Fix: the app.asar sanity check now also compares the archive's size with the size its header describes. Before, an app.asar with extra or missing bytes passed as long as the entry file and package.json had a non-zero size in the header. After, an archive with extra bytes past what its header describes fails the build and names both byte counts. A header that describes more bytes than the file has (such as asarmor's default bloat patch, whose entries point far past the end of the file) only logs a warning, and the build goes on, unless the file has bytes after its last entry that fits in it. A truncated app.asar cut inside a file now fails for the same reason. An app.asar cut at a file boundary, or right after its header, fails when the cut removes package.json or the entry file; a cut that removes only other files still only logs the warning. With asar.contentAlignment set, the archive is also checked against its header before it is rewritten, so alignment refuses it instead of rewriting it. #10547 072f05f — app-builder-lib

  • Fix: the app.asar sanity check reads the archive header once per archive instead of once per checked file, and checks the entry file and package.json against a header read from the archive on disk, so a build to the same output path earlier in the same process cannot fail it. The warning for a header that describes more bytes than the archive has is logged once per process and says that afterPack hooks that patch the header (such as asarmor) cause it, and that asar.disableSanityCheck skips the check. With asar.stableLayout set, the archive is checked against its header before it is re-laid out too, the same as with asar.contentAlignment. #10547 072f05f — app-builder-lib

  • Fix(publish): keygen.host with a port (e.g. keygen.example.com:8443) sends the port separately instead of failing with ENOTFOUND, a trailing slash in gitlab.host no longer doubles the slash before /api/v4, and a host name with _ (e.g. gitlab_ce:8080) is accepted. #10667 027550d — electron-publish

  • Fix: a build or directories key under extraMetadata (in the config or via -c.extraMetadata.*) fails the build again, as in v26; the 27.0.0 alphas silently dropped or shipped it, or failed with a misleading package.json error. #10672 afde5b3 — app-builder-lib

    An em option passed to the build() API gets a targeted error too; both errors name -c / -c.directories and link to the build-changes migration page.

  • Fix: the build warning about a missing autoUpdater.crossOriginHeaders now also covers apps that bundle electron-updater into their own JavaScript, where only an assignment of the property counts #10669 ecf9cd9 — app-builder-lib

  • Fix: end the unsigned-manifest, invalid-signature and missing web-package checksum errors, the no-key warning and the warning for a full installer downloaded while disableWebInstaller is set to false (logged once per updater instance) with a migration-doc link; the nsis-web installer's abort for an update started without --package-file no longer prints a link #10671 e9481ec — app-builder-lib

  • Fix: mask every cscLink, cscInstallerLink and pkcs11KeyUri (only the root cscLink was masked), the publish requestHeaders and the user info (up to the last @, also user:password@host without //) and query parameter values of URLs anywhere in a value, in builder-effective-config.yaml, the debug log and the publish debug log, and leave the value that failed out of the invalid configuration entry of builder-debug.yml; name a downloaded certificate link without its user info or query in its warning and in the error of a failed download; download an https certificate link directly to a temporary file, not into the download cache, sending its user info as HTTP Basic authentication; and never show a certificate link or a snapcraft.cscLink / SNAP_CSC_LINK value read as a path in the error for a missing or unreadable file, which now names only the reason (such as ENOENT) #10673 d0741a6 — app-builder-lib, builder-util

Full Changelog: https://github.com/electron-userland/electron-builder/compare/electron-builder@27.0.0-alpha.15...electron-builder@27.0.0-alpha.16

Don't miss a new electron-builder release

NewReleases is sending notifications on new releases.