MarshallOfSound

#54166: test: assert that import and require expose the same electron module

Merged
Created: Sep 21, 2026, 4:11:51 AM
Merged: Sep 21, 2026, 3:09:49 PM
5 comments
Target: main

Description of Change

Before: esm-spec only checked that import 'electron' (and electron/main, /common, /renderer, /utility) does not throw. Nothing verified that what ES module code gets back is the same thing require('electron') returns.

After: a new fixture app loads the module through both import() and require() in the main process, a utility process and a non-sandboxed preload, and reports any export that exists on only one side, any export that is not the identical object on both, and a default import that is not the require() exports object. esm-spec asserts the report is empty for each process type.

Checklist

Release Notes

Notes: none


Generated by Claude Code

Backports

42-x-y
Merged
PR Number
#54196
Merged At
Sep 22, 2026, 1:22:17 AM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#54195
Merged At
Sep 21, 2026, 11:40:08 PM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#54194
Merged At
Sep 21, 2026, 11:39:42 PM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#54193
Merged At
Sep 21, 2026, 11:39:00 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron