chore: bump electron 42 header version for msvc compatibility#318587
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Follow-up to the Electron 42 update (PR #316661). Instead of preinstall-time patching of the cppgc/heap.h header (which didn't run early enough for root node_modules), this PR bumps the Electron headers npm target to 42.3.0, which already contains the MSVC-compatible upstream fix, and removes the custom header patching machinery.
Changes:
- Bump
.npmrcheaders target from42.2.0to42.3.0and hardcode the Electron runtime version inbuild/lib/electron.tsto42.2.0. - Remove the local
cppgc/heap.hcustom header and the related explanatory comment inbuild/npm/preinstall.ts. - Drop the now-unnecessary explicit
node build/npm/preinstall.tsinvocation from all Windows CI pipelines and the PR workflow; bumpbuild/.cachesalt.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .npmrc | Bumps Electron headers target to 42.3.0. |
| build/lib/electron.ts | Decouples headers target from runtime by hardcoding electronVersion = '42.2.0'. |
| build/npm/preinstall.ts | Drops the comment referencing the removed cppgc/heap.h patch. |
| build/npm/gyp/custom-headers/cppgc/heap.h | Deletes the custom MSVC-compatible header now obsoleted by 42.3.0. |
| build/azure-pipelines/win32/steps/product-build-win32-compile.yml | Removes explicit pre-install header-patch step. |
| build/azure-pipelines/win32/sdl-scan-win32.yml | Removes explicit pre-install header-patch step. |
| build/azure-pipelines/win32/product-build-win32-node-modules.yml | Removes explicit pre-install header-patch step. |
| .github/workflows/pr-node-modules.yml | Removes explicit pre-install header-patch step. |
| build/.cachesalt | Bumps cache salt to invalidate caches built against the prior header set. |
TylerLeonhardt
approved these changes
May 28, 2026
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.
Followup to #316661
Bump only npm target to 42.3.0 that contains electron/electron@0e1fe29
The current preinstall header patching doesn't work for root node_modules due to order of lifecycle script invocation.