Skip to content
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

[babel 8] Require Node.js ^18.20.0 || ^20.10.0 || >=21.0.0 #16457

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Apr 29, 2024

Q                       A
Major: Breaking Change? Yes
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link babel/website#2888
Any Dependency Changes?
License MIT

In this PR we drop Node.js 16 support for Babel 8. Node.js 16 has reached end-of-life on Sept. 11th 2023. The Node.js 18 requirement is also bumped to 18.20.0, which supports fs.readdir(... { recursive: true }), the --import node flag, the esm equivalent of --require and the import attributes. The first feature will be used in babel-cli and the second one may potentially benefit babel-node.

The Node.js 20 requirement is also bumped to 20.10.0 for import attributes support.

For references here are node requirements of other popular tools, we are not the first one to drop Node.js 16 so it should probably be fine.

eslint: ^18.18.0 || ^20.9.0 || >=21.1.0
jest ^16.10.0 || ^18.12.0 || >=20.0.0
prettier >= 18
typescript-eslint ^18.18.0 || >=20.0.0

@JLHwung JLHwung added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release PR: Needs Docs labels Apr 29, 2024
@babel-bot
Copy link
Collaborator

babel-bot commented Apr 29, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/56793

@nicolo-ribaudo
Copy link
Member

Let's do 18.20 which supports import attributes 🙏

@JLHwung JLHwung changed the title [babel 8] Require Node.js ^18.18.0 || >=20.0.0 [babel 8] Require Node.js ^18.20.0 || >=20.0.0 Apr 29, 2024
@JLHwung JLHwung changed the title [babel 8] Require Node.js ^18.20.0 || >=20.0.0 [babel 8] Require Node.js ^18.20.0 || ^20.10.0 || >=21.0.0 Apr 29, 2024
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Node.js 18 reaches end of life today, but I think it's good to still support it for the time being.

@JLHwung
Copy link
Contributor Author

JLHwung commented Apr 30, 2024

(🤫We are still in 2024)

Node.js 18 will reach EOL on 2025-04-30.

Copy link
Member

@liuxingbaoyu liuxingbaoyu left a comment

Choose a reason for hiding this comment

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

Although I personally like ^14, it's fine for now.

@JLHwung JLHwung merged commit 71c247a into babel:main Apr 30, 2024
51 checks passed
@JLHwung JLHwung deleted the babel-8-node-18 branch April 30, 2024 14:25
@nicolo-ribaudo
Copy link
Member

@liuxingbaoyu When we dropped 14 the motivation against dropping it was that a serious memory leak (jestjs/jest#11956 (comment)) was preventing people from upgrading to Node.js 16+. However, that bug has then been fixed in Node.js 20 (nodejs/node#49950) and backported to 18 (nodejs/node#51004).

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jul 31, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants