Repository navigation
Keep the project folder out of app.asar and correct the 5.1.0 notes - #58
Merged
Merged
Conversation
electron-builder normalizes the top-level `files` strings into a
`{ filter: [...] }` file set with its own matcher. The string lists added
under win/mac/linux in 5.1.0 instead became a second matcher made only of
exclusions, which electron-builder starts with `**/*`. Every 5.1.0 build
therefore packed the whole project folder into app.asar: the webpack cache
(207 MB), docs images (79 MB), src/main, src/renderer, test and scripts,
about 300 MB unpacked, so each download grew 57 to 82 MB over 5.0.0.
The per-platform rules move into the top-level list. ${platform} expands to
the build machine's process.platform (each release leg builds on its own
OS), so `!(${platform}-${arch}|${platform}musl-${arch})` keeps exactly the
prebuilds the platform rules kept.
The builder-config test now runs electron-builder's own steps (config
normalization, getMainFileMatchers, getNodeModuleFileMatcher) for each
release leg and fails on the 5.1.0 config; the old test handed the raw JSON
to the node_modules matcher and never saw the second matcher.
verify-packaged-artifacts reads the app.asar header and fails if it holds
anything besides dist, node_modules, package.json and src/shared.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
- Drop "smaller downloads on every platform" from the 5.1.0 summary: every 5.1.0 download is 57 to 82 MB larger than 5.0.0. Record that as a known issue and the fix under Unreleased. - Move Electron 41 -> 45, better-sqlite3 12 -> 13 and the macOS 13 minimum to 5.0.0: the v5.0.0 tag already locked Electron 45.1.0 and better-sqlite3 13.0.3, but its release notes left them out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
filesstrings into a{ filter: [...] }file set with its own matcher. The string lists added underwin,macandlinuxin Close the startup follow-ups' known limitations: driver-version reset, embedding worker, x64 payload, Linux raster #53/Ship only each build's own better-sqlite3 prebuild; fix the e2e first-run wizard race in every spec #54 became a second matcher made only of exclusions, and electron-builder starts such a matcher with**/*. Every 5.1.0 build packed the whole project folder intoapp.asar: the webpack cache (207 MB), docs images (79 MB),src/main,src/renderer,test,scriptsandCLAUDE.md, about 300 MB unpacked. I measured this by reading the asar headers of the published 5.0.0 and 5.1.0 macOS arm64 zips. Every 5.1.0 download is 57 to 82 MB larger than 5.0.0 as a result.${platform}expands to the build machine'sprocess.platform, and each release leg builds on its own OS. So!(${platform}-${arch}|${platform}musl-${arch})keeps exactly the better-sqlite3 prebuilds the platform rules kept, and the@node-llama-cpp/win-!(${arch}|${arch}-*)rule is unchanged.test/electron-builder-config.test.jsnow runs electron-builder's own steps (doMergeConfigs,getMainFileMatchers,getNodeModuleFileMatcher) for each release leg. It fails on the 5.1.0 config and passes on the 5.0.0 config. The old test handed the raw JSON to the node_modules matcher and never saw the second matcher.verify-packaged-artifacts.js, which every release leg runs before upload, now reads theapp.asarheader and fails if it holds anything besidesdist,node_modules,package.jsonandsrc/shared.v5.0.0tag already locked Electron 45.1.0 and better-sqlite3 13.0.3, but its release notes left them out.Scope
Type of Change
Test Plan
Automated
npm run format:check(Prettier on every changed file)npm run lint(ESLint on the changed scripts and tests)npm test:electron-builder-config,verifyPackagedArtifacts,verifyElectronFusesConfig(97 tests), plusverify:electron-fuses-configandcompliance:commercial:verify(the inventory is regenerated and stable on re-run)Test results against older configs: the six release-leg app-file tests and the platform-block test fail on the
v5.1.0config. The app-file tests pass on thev5.0.0config. I checked the newreadAsarHeaderagainst archives built by@electron/asar: an archive with an extradocsfolder fails and a clean one passes.Manual QA
docs/TESTING.md)Manual QA notes:
verify-packaged-artifacts.js, which now fails on a bloatedapp.asar, so the next release run on each platform will check this fix against real artifacts.Checklist
Generated by Claude Code