Skip to content

Conversation

@erickzhao
Copy link
Member

@erickzhao erickzhao commented Nov 26, 2025

BREAKING CHANGE: this package now requires Node.js 22 and ESM. All @electron/ packages are bumped to their latest major versions.

Closes #3623
Closes #3684

  • Bump engines to Node 22
  • Update @types/node dependencies
  • Upgrade all @electron/ packages to their latest major versions
  • Use type: module in package.json
  • Drop support Rechoir/Interpret configurations
  • Replace ts-node with tsx
  • Remove dependencies on distutils and Python 3.11
  • Replace lodash with lodash-es
  • Upgrade to Vitest 4
  • Get fast tests to pass
  • Get slow tests to pass
  • Re-enable ESLint import plugin with correct ESM parsing
  • Check Forge configuration ESM/CJS compatibility

Split off PRs:

Future improvements:

  • Check if we still need jiti for the configuration loading
  • Check Webpack plugin ESM/CJS compatibility
  • Check Vite plugin ESM/CJS compatibility

@erickzhao erickzhao added the next label Nov 27, 2025
@erickzhao erickzhao changed the title chore: upgrade major versions to Node 22 chore: Node 22 + ESM Dec 2, 2025
@socket-security
Copy link

socket-security bot commented Dec 4, 2025

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@erickzhao erickzhao changed the title chore: Node 22 + ESM feat!: Node 22 + ESM Jan 16, 2026
@PascalPixel
Copy link

You're an absolute legend @erickzhao 🎸

@erickzhao erickzhao marked this pull request as ready for review January 16, 2026 22:58
@erickzhao erickzhao requested a review from a team as a code owner January 16, 2026 22:58
@@ -1,3 +1,4 @@
// eslint-disable-next-line
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we could update .eslintrc.json at line 117 to include .js / .cjs files so that "n/no-unpublished-require": "off" also applies here:

-        "packages/*/*/spec/fixture/**/*.ts"
+        "packages/*/*/spec/fixture/**/*.{ts,js,cjs}"

"version": "1.0.0",
"main": "./src/main.js",
"main": "./src/main.cjs",
"type": "commonjs",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside: do we want to / should we update test fixtures to ESM at some point? That'd enable us to simplify the ESLint config a bit by removing all CJS-related rules.

@@ -1412,7 +1405,7 @@ __metadata:
languageName: unknown
linkType: soft

"@electron/asar@npm:^3.2.1, @electron/asar@npm:^3.2.13, @electron/asar@npm:^3.3.1":
"@electron/asar@npm:^3.2.1":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: looks like electron-winstaller hasn't been updated to ESM, which is why we still depend on an older version of @electron/asar. Do we want to update electron-winstaller before landing this PR so all first-party Forge deps are ESM or is this something that can be addressed later (probably before Forge 8 stable)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants