-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Start Node ESM stable version at Node16 #48879
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c0f2882
Remove Node12, add Node16.
DanielRosenwasser 52d1ea5
Accepted baselines.
DanielRosenwasser 1247217
Refactor checking for top-level await, give a better error message in…
DanielRosenwasser c390b79
Accepted baselines.
DanielRosenwasser 8b1e656
Stop erroring on JSON module imports in node ESM since they're no lon…
DanielRosenwasser ce98f0a
Accepted baselines.
DanielRosenwasser fac5ded
More refactoring, do the same checks for for-await loops.
DanielRosenwasser 5305796
Accepted baselines.
DanielRosenwasser 1ca971d
Adjust phrasing to permit for-await on CJS error.
DanielRosenwasser 4c46f26
Accepted baselines.
DanielRosenwasser 830871c
Accepted baselines.
DanielRosenwasser 9d7fae8
Fix lints.
DanielRosenwasser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adjust phrasing to permit for-await on CJS error.
- Loading branch information
commit 1ca971df1e98e8b57922c167a4237863dcbbab21
There are no files selected for viewing
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
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
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.
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.
Actually, this check is wrong and the tests reflect that. Should it be
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.
Normally we still emit warnings of some kind when using experimental features, which would still be in all stable versions of node, at least until nodejs/node#42875 ships in the next version of node 18.
Uh oh!
There was an error while loading. Please reload this page.
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.
So maybe until TLA becomes non-experimental we could issue an error like
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.
On a related note, we should probably remove the experimental warning for json imports in nodenext. Afaik, they've stabilized in node 18. At least the version with the import assertion, anyway. It's contentious among the node maintainers.
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.
The PR is already merged - that seems like a pretty strong sign that it will be stable, 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.
The test wasn't wrong, it was just very confusing because the code was in a CJS file. I've updated the check there.
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.
Yeah, it'll be stable in the next release of node 18, it just hasn't shipped yet, and I don't know if it'll be backported to 16 or not.
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.
At what point do they stop backporting features like that? Maintenance LTS? Is it practical to not create a named moduleResolution target until it solidifies?
Uh oh!
There was an error while loading. Please reload this page.
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.
Changes are backported to LTS versions unless they're somehow breaking from what I understand, while maintenance LTS versions only get security patches. At least I think that's the general policy. (The definition of "breaking" being the somewhat subjective part)