-
Notifications
You must be signed in to change notification settings - Fork 258
feat!: bump engines requirement to Node 22
#347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
24c032a to
7233aff
Compare
package.json
Outdated
| "prepare": "tsc" | ||
| }, | ||
| "dependencies": { | ||
| "commander": "^5.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would love to upgrade commander in a follow-up PR to align the major versions across all Electron tools that have multiple commands and still need a lib like commander.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only needs an import to be updated, so we can probably just do it in this PR - 0be538d
| import { createRequire } from 'node:module'; | ||
|
|
||
| const require = createRequire(import.meta.url); | ||
|
|
||
| const fs = 'electron' in process.versions ? require('original-fs') : require('node:fs'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this ESM/CommonJS interop thing reminds me that we should test that CommonJS aps run smoothly when upgrading @electron/asar to the next major version in Electron core.
Since require(esm) comes with Node 22, we should be okay in the newest versions of Electron core... right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to update electron to ^34.5.0 (Node 20.19.0) in our devDependencies because we run our Mocha tests on Electron through electron-mocha and that's the first version where require(esm) works without the --experimental-require-module flag — we get ERR_REQUIRE_ESM on lower versions, though we could use Electron 32.1.0 (Node 20.17.0) and up by changing our mocha script to:
"mocha": "NODE_OPTIONS=\"--experimental-require-module\" xvfb-maybe electron-mocha && mocha",So to answer your question, I think Electron core should be able to upgrade to @electron/asar@^4.0.0 as soon as Electron 36 is out and Electron 34 becomes the oldest supported version (it still uses Node 20.x — if we want to wait for Node 22.x we'd need to wait for Electron 37 to be released).
1a6eb23 to
7fa2c75
Compare
BREAKING CHANGE: bumps required Node.js version to >=22.12.0. ESM-only.
|
@erikian, since this PR has been open for a while, can you merge in |
| "noImplicitAny": true, | ||
| "strictNullChecks": true, | ||
| "esModuleInterop": true | ||
| "noUnusedLocals": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: i think @typescript-eslint/no-unused-vars already covers this case?
|
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
BREAKING CHANGE: bumps required Node.js version to
>=22.12.0. ESM-only.