Repository navigation
chore(desktop): upgrade to Electron 45 and electron-builder 26 [SAP-4716] - #1278
antoine-berger wants to merge 7 commits into
Conversation
…AP-4716] - electron 33.4.11 -> 45.2.1 (exact pin, matched by electronVersion), electron-builder 25 -> 26.18.0, electron-updater ^6.8.11, @electron/rebuild ^4.2.1, @types/node ^24, engines.node >=22.12. - Drop the @electron/rebuild override (app-builder-lib 26 brings v4) and the unused @electron/notarize; raise the plist 3.1.1 @xmldom/xmldom line. - Electron 44+ needs macOS 13: set mac.minimumSystemVersion and stamp the matching floor into the mac update manifests so older Macs keep the current build instead of updating into one they cannot launch. - pack.mjs writes packageManager into the deploy dir so electron-builder 26 does not fall back to npm and drop esbuild's platform binary. - Tests pin the Electron version pair and the macOS floor, and run the real electron-updater check against a stamped manifest. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…4716] Electron 43+ opens the dialog in Downloads when no defaultPath is given. Default to the parent of the last chosen folder, else the home dir; a hint from the page still wins. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…6 [SAP-4716] Correct the node-gyp, Python pin, Linux node-pty and electron install comments, document the macOS 13 floor and the deploy packageManager, and add the changeset. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit details
Tip 🎯 Customize your risk assessments
✅ Automatic approvals, with your rules
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
|
/devin review |
…nts [SAP-4716] - pack.mjs --mac rejects any --publish other than never: electron-builder uploads latest-mac.yml before it returns, so a self-publishing mac build would ship the manifest before the minimumSystemVersion stamp. - Correct the deploy packageManager, xmldom override, node-pty install script and Python pin comments, and the mac-minimum test header. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…-publish [SAP-4716] electron-builder's yargs accepts the publish flag under aliases, grouped short options and repeats, so a deny-list cannot be complete. A mac build now accepts only -c.<key> config overrides, the only passthrough the release run uses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…-4716] electron-builder also accepts --macos, -m and -o for mac, which skipped pack.mjs's mac branch and so the manifest stamp. pack.mjs now accepts only --linux, --mac or --win (or none, for the host) and -c.<key> overrides on every platform, checked before it deploys or builds anything. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reads package.json, pnpm-lock.yaml and pnpm-workspace.yaml and fails if a re-resolve, merge or revert brings back an older Electron or builder chain. Floors rather than equalities, so later upgrades stay green. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Primary change type
Problem and motivation
Agent Studio (
@sapiom/harness-desktop) still ships Electron 33, which is long out of upstream support, and packages with electron-builder 25. This moves the desktop app to the current stable Electron and electron-builder lines.Summary and scope
electron33.4.11 -> 45.2.1 (exact pin;electronVersioninelectron-builder.ymlmatches),electron-builder25 -> 26.18.0,electron-updater^6.8.11,@electron/rebuild^4.2.1,@types/node^24,engines.node>=22.12 (Electron 45's own requirement).@electron/notarize(unused) removed.pnpm-workspace.yaml: the@electron/rebuildoverride is gone (app-builder-lib 26 already depends on v4, the override would now downgrade it); one scoped override raises the@xmldom/xmldom0.9 line that pnpm otherwise keeps locked.mac.minimumSystemVersion: "13.0"sets the bundle plist, andpack.mjs --macstamps the matching Darwin floor (minimumSystemVersion: 22.0.0) intolatest-mac.yml/beta-mac.yml. Installed apps' electron-updater reads that field, so a Mac on 11/12 keeps 0.4.x instead of auto-updating into a build it cannot launch (src/main/mac-minimum.ts).pack.mjsaccepts only--linux,--macor--win(or none, for the host) and-c.<key>passthrough args (the release run passes-c.mac.notarize=true), checked before it does any work (scripts/pack-args.mjs). electron-builder uploadslatest-mac.ymlbefore it returns and also accepts other mac and publish flag spellings, so anything else could ship or keep the manifest unstamped. The release job keeps uploading the stamped files.defaultPathis given. The picker now defaults to the parent of the last chosen folder, else the home dir; a page hint still wins. The sender gate is unchanged.packageManager/ lockfile / env. Thepnpm deploydir has neither, so it fell back to npm, which left esbuild's platform binary out of the package (deploy-bundlesmoke check failed).pack.mjsnow copies the rootpackageManagerinto the deploypackage.json.CLAUDE.mdcorrections (Python pin rationale, Linux node-pty compiles, no rebuild override, macOS floor), and a changeset.Out of scope: runner and Python pins stay as they are (only their comments change); no Intel/universal mac target; preload sandboxing.
Related work
Related issue or discussion: SAP-4716 (internal tracker)
Validation
macOS and Windows packaging are only exercised by
desktop-release.yml, which runs frommain; the release run after merge is the proof for those two (macOS smoke + stampedlatest-mac.yml, Windows packaging).Tests and documentation
src/main/electron-version.test.ts: the Electron devDependency is an exact pin, equalselectronVersion, and the macOS floor agrees betweenelectron-builder.ymlandmac-minimum.ts.src/main/mac-minimum.test.ts: manifest stamping (append / replace / idempotent / no-manifest throws), plus the real installed electron-updatercheckIfUpdateSupportedagainst a stamped manifest: rejects Darwin 20/21 (macOS 11/12), accepts 22/24.src/main/pack-args.test.ts: the argv allowlist (host default, config overrides pass, every other platform or publish spelling refused), andpack.mjsitself spawned with a mac alias or a publish flag exits 1 before it deploys anything.src/main/dependency-pins.test.ts: dependency floors inpackage.json,pnpm-lock.yamlandpnpm-workspace.yaml(exact Electron >= 45.2.1 and locked at that version, builder chain floors, Node >= 22.12, no notarize, no rebuild override); floors so later upgrades stay green.src/main/dialogs.test.ts: picker default path sequence (home, last parent, cancel keeps it, hint wins).packages/harness-desktop/CLAUDE.mdanddesktop-release.ymlcomments updated.Compatibility and release impact
@sapiom/harness-desktopminor).Security
will follow the
Security Policy for
private reporting.
AI assistance
Claude Code researched the Electron 34-45 and electron-builder 26 breaking changes, wrote the changes and tests, and ran the validation above (including the packaged Linux build and smoke in disposable containers). Independent review and local E2E follow before this leaves draft.
Checklist
CONTRIBUTING.md, and this contribution follows the direct-PR or issue-first policy.any N/A checks above.
🤖 Generated with Claude Code