Repository navigation
electron-builder@27.0.0-alpha.16
Pre-releaseMajor Changes
- Fix(publish)!:
github.host,gitlab.hostandkeygen.hostmust be an ASCII host name (punycode for an internationalized name), optionally with a port, and forgitlab.hostoptionally 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 ingithub.host/keygen.host, fails at publish withInvalidConfigurationError. See https://www.electron.build/docs/migration/v27-build-changes#publish-host-must-be-a-host-name#10667027550d—electron-publish - Feat(runtime)!: an
HttpExecutorwithout a cross-origin header policy of its own, such as builder-util'shttpExecutor, 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 asX-Api-Tokentoo, stays on its origin. builder-util'sNodeHttpExecutorwarns once per process, at the first redirect that leaves out headers other than the well-known credential headers (Authorization,Cookie,PRIVATE-TOKEN,X-Api-Keyand 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#1066512bafb3—builder-util,builder-util-runtime
Minor Changes
- Feat: add the optional
blockMapSha512field toUpdateFileInfo. It is not covered by the manifest signature.decodeBlockMapV3andcheckBlockMapV3Headerreject 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#10496d0d4046—builder-util-runtime - Feat(asar): experimental opt-in
asar.stableLayoutthat keeps every packed file ofapp.asarat 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-filegrowthMargin. 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.contentAlignmentnow keeps@electron/asar's de-duplicated files sharing one copy instead of writing each again#104990c8138c—app-builder-lib
Patch Changes
-
Upgrade
minimatchto^11.0.1and@electron/asarto^4.3.2(which moves tominimatch^11.0.1 andglob^14) to pick up the fix for GHSA-g3hv-75wg-m249. Also upgradeejs(used for the MSI project templates) to^7.0.2, which no longer depends onjake, removing theminimatch3 and 5 copies thatjakeandfilelistbrought in.#10539dbc5014—app-builder-lib -
Fix(publish):
electron-builder publish -fworks with a configuration that has apublishlist: 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-cpath without a dot (-c ci/ebconfig) is read as the configuration file, and an absoluteextendspath without a dot given in the options is too, as one with a dot already was#106307fc52ed—electron-builder,app-builder-lib -
Fix(nsis): Update Italian strings for NSIS installers
#1061918720c1—app-builder-lib -
Fix: decode child process output as UTF-8 across chunks. Before, a multi-byte character split between two pipe reads became
�inspawnandspawnAndWriteWithOutputoutput and inExecErrormessages, which could corrupt workspace paths, DMG mount paths andmakensisoutput. After, split characters are decoded correctly.#10625100cf40—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".
#10654476dd91—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 passedcodesign --verifyand 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.appbundle are renamed on disk to their NFD form before signing, which matches what the volume stores and keeps the signature valid regardless ofdmg.filesystem. Opening a file by its precomposed name still works on macOS, but an app that comparesreaddirresults against NFC string literals should normalize both sides (e.g.name.normalize("NFC")).#10466b7f3480—app-builder-lib -
Fix: the
app.asarsanity check now also compares the archive's size with the size its header describes. Before, anapp.asarwith extra or missing bytes passed as long as the entry file andpackage.jsonhad 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 truncatedapp.asarcut inside a file now fails for the same reason. Anapp.asarcut at a file boundary, or right after its header, fails when the cut removespackage.jsonor the entry file; a cut that removes only other files still only logs the warning. Withasar.contentAlignmentset, the archive is also checked against its header before it is rewritten, so alignment refuses it instead of rewriting it.#10547072f05f—app-builder-lib -
Fix: the
app.asarsanity check reads the archive header once per archive instead of once per checked file, and checks the entry file andpackage.jsonagainst 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 thatasar.disableSanityCheckskips the check. Withasar.stableLayoutset, the archive is checked against its header before it is re-laid out too, the same as withasar.contentAlignment.#10547072f05f—app-builder-lib -
Fix(publish):
keygen.hostwith a port (e.g.keygen.example.com:8443) sends the port separately instead of failing withENOTFOUND, a trailing slash ingitlab.hostno longer doubles the slash before/api/v4, and a host name with_(e.g.gitlab_ce:8080) is accepted.#10667027550d—electron-publish -
Fix: a
buildordirectorieskey underextraMetadata(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.#10672afde5b3—app-builder-libAn
emoption passed to thebuild()API gets a targeted error too; both errors name-c/-c.directoriesand link to the build-changes migration page. -
Fix: the build warning about a missing
autoUpdater.crossOriginHeadersnow also covers apps that bundle electron-updater into their own JavaScript, where only an assignment of the property counts#10669ecf9cd9—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
disableWebInstalleris 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-fileno longer prints a link#10671e9481ec—app-builder-lib -
Fix: mask every
cscLink,cscInstallerLinkandpkcs11KeyUri(only the rootcscLinkwas masked), the publishrequestHeadersand the user info (up to the last@, alsouser:password@hostwithout//) and query parameter values of URLs anywhere in a value, inbuilder-effective-config.yaml, the debug log and the publish debug log, and leave the value that failed out of the invalid configuration entry ofbuilder-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 anhttpscertificate 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 asnapcraft.cscLink/SNAP_CSC_LINKvalue read as a path in the error for a missing or unreadable file, which now names only the reason (such asENOENT)#10673d0741a6—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