chore(electron): 34 → 44 (Chromium 132 → 152, Node 20 → 24) - #148
Open
CSSFrancis wants to merge 2 commits into
Open
chore(electron): 34 → 44 (Chromium 132 → 152, Node 20 → 24)#148CSSFrancis wants to merge 2 commits into
CSSFrancis wants to merge 2 commits into
Conversation
Electron 34 is ten majors behind and long past end of life: support covers the latest three majors, so 34.5.8 is the final release of that line and will never be patched again. This carries ~20 Chromium majors of unfixed CVEs in an app that renders HTML figures and fetches example data over the network. Chromium 132 -> 152, Node 20.19 -> 24.18. Pinned EXACTLY in BOTH package.json files, which must agree -- see d70f4fb. The workspace hoists electron out of electron/node_modules, so electron-builder cannot read the installed version, falls back to parsing the spec, and refuses a range. That failure is release-only. Only two API breaks across ten majors, both caught by typecheck: - printToPDF's `marginType` is gone. The 'default' it named is now what you get by omitting `margins` entirely (1cm a side), so the fix is a deletion. - clipboard.writeImage is gone; the module is rearchitected to the W3C shape (MIME-typed ClipboardItems, async). The nativeImage decode stays as the validity check that keeps junk off the user's clipboard. report_export.spec.ts asserted the OS clipboard through readImage(), removed in the same change, so it now asks whether the clipboard holds a non-empty image/png. CI gains an explicit `npx install-electron`: Electron 42 dropped the postinstall binary download, so `npm ci` leaves node_modules/electron/dist empty and the ~100 MB fetch happens lazily on the first require('electron') -- which in CI is inside the first spec that launches the app, where a slow or failed download reads as a mystery test timeout rather than an install failure. Swept the rest of the 35-44 breaking changes against this codebase: Unity and Linux badge/progress APIs, pre-macOS-13 login item attributes, win32-ia32 and linux-armv7l targets, renderer-side clipboard, ANGLE, webRequest filters, setPreloads, webFrame.routingId, desktopCapturer, session extension APIs. None are used here. console-message keeps working -- the WebContents overload still emits the positional arguments, deprecated but present -- but `level` was remapped, so the comment describing it was corrected: 0=verbose 1=info 2=warning 3=error, which makes `level >= 2` warnings-and-errors rather than errors-and-infos. e2e: 422 passed / 12 failed / 22 skipped over the full suite. Two of those failures were real and are fixed here (the clipboard assertion above, plus a stale local Playwright browser cache). The remaining ten reproduce on a quiet machine and are being checked against main before any claim about them.
Under Electron 44 the three cells came back as ['Beta', empty, empty] -- deterministically, 3 runs out of 3, while passing on 34. Not an app bug. Every step of the helper addresses "the last cell", so each is wrong the moment it runs early: a dblclick before the new cell mounts opens the PREVIOUS cell's editor, and returning before the commit renders lets the next call race it. A probe driving the same gestures with waits passes on 44, and the screenshot shows Alpha/Beta/Gamma committed correctly -- the feature works, the assumption that a click had landed by the next line did not. Chromium 152 just changed the timing enough to stop the assumption holding.
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.
Electron 34 is ten majors behind and long past end of life. Support covers the latest three majors, so
34.5.8is the final release of that line and will never be patched again — ~20 Chromium majors of unfixed CVEs in an app that renders HTML figures and fetches example data over the network.Pinned exactly in both
package.jsonfiles, which must agree — see d70f4fb. The workspace hoistselectronout ofelectron/node_modules, so electron-builder can't read the installed version, falls back to parsing the spec, and refuses a range. That failure is release-only and is what killed the v0.4.0 tag build.What actually broke: two APIs
Both caught by typecheck.
printToPDF'smarginTypeis gone. The'default'it named is now what you get by omittingmarginsentirely (1 cm a side), so the fix is a deletion.clipboard.writeImageis gone; the module is rearchitected to the W3C shape — MIME-typedClipboardItems, all methods async. ThenativeImagedecode stays as the validity check that keeps junk off the user's clipboard.CI needs one new step
Electron 42 dropped the postinstall binary download.
npm cinow leavesnode_modules/electron/distempty and the ~100 MB fetch happens lazily on the firstrequire('electron')— which in CI is inside the first spec that launches the app, where a slow or failed download reads as a mystery test timeout.npx install-electronmakes it fail loudly on its own line.Swept, not assumed
Checked every 35→44 breaking change against this codebase: Unity/Linux badge + progress APIs, pre-macOS-13 login-item attributes,
win32-ia32/linux-armv7ltargets, renderer-sideclipboard, ANGLE static linking,webRequestfilters,setPreloads,webFrame.routingId,desktopCapturer, session extension APIs. None are used here.console-messagekeeps working — theWebContentsoverload still emits the positional arguments — butlevelwas remapped, so the comment describing it was wrong and is corrected:0=verbose 1=info 2=warning 3=error, which makeslevel >= 2warnings-and-errors rather than errors-and-infos. Electron now logs a deprecation notice for the positional form; worth migrating before a future major drops it (the shell's own tee already reads either shape).Verification
Full e2e suite: 422 passed / 12 failed / 22 skipped (52 min,
workers: 1). Every failure classified by re-running the same specs onmainwith Electron 34, same machine:clipboard.readImage, removed in v44main/Electron 34Zero application regressions.
The one that looked like a real regression was
report_delete_undo— deterministic, 3/3 on 44, passing on 34. It is a test race: the helper doesclick add → dblclick last cell → fill → Ctrl+Enterwith no waits, and every step addresses "the last cell", so each is wrong if it runs early. A probe driving the identical gestures with waits passes, and the screenshot shows Alpha/Beta/Gamma committing correctly. Helper fixed; 12/12 across three runs.Packaging —
npm run dist:dirproduces a 348 MBSpyDE.appcarrying Electron Framework 44.0.0, no errors. This is the check that would otherwise not run until a tag build.GPU parity —
gpu_image_parity.spec.tspasses withmeanDiff: 0, maxDiff: 2between the WebGPU and Canvas2D renders; screenshots compared by eye and indistinguishable. Worth having across a Chromium 132 → 152 jump.Two things reviewers should know
maintoday on my machine, independent of this PR: the wholeebsd_workflowfile, bothexamples_menutests,fit_from_composition, and theui_fixesRebin click. Some are clearly environmental —examples_menuasserts "Not downloaded" against a dataset I have cached — but I would not assume all of them are. I could not use CI as a baseline:main's last two runs were cancelled by concurrency and the one before failed.spyde/backend/dask_stats.py:113is broken and not touched here.client.run(_trim_process_memory, wait=False)tripsdistributed2026.3.0'sassert wait or is_coro, so every post-batch worker memory trim fails and logs three tracebacks. Only the backend's own local trim runs.is_coroalso satisfies the assert, so anasync defwrapper restores the deliberate fire-and-forget. Worth its own PR.