-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
[v18.20.5 / next v20.x LTS version] NodeJS should provide some kind of warning when using import assertions as they are non-standard #55869
Comments
Adding a warning is a breaking change, and LTS lines are meant to be non-breaking. |
@RedYetiDev I should have clarified v18.20.4 (previous v18.x release) and v20.18.0 have a warning for both import assertions and import attributes v18.20.5 removes this warning for both cases, I believe the import assertion warning should still be around |
Oh, okay. The removal / addition of a warning is typically semver major, I wonder why it was backported. |
This is probably the cause #55333 |
Yes, likely. |
This is a bit difficult to fix, because V8 doesn't tell us which syntax is being used. Does any of the maintainers have any suggestion? |
We need to reconsider #51631 |
@aduh95 thanks for the PR, just letting you know that a v20.x version will be needed |
@alexsch01 I'm not sure why you ping me to repeat an information that's already in the OP. If you need a 20.x backport, make the PR yourself, or pay someone to do it for you (you can find support links in the README). |
my apologies |
Clarification
v18.20.4 (previous v18.x release) and v20.18.0 have a warning for both import assertions and import attributes
v18.20.5 removes this warning for both cases, I believe the import assertion warning should still be around
Seems to be caused by #55333
Version
v18.20.5
Platform
All
Subsystem
No response
What steps will reproduce the bug?
node --input-type=module -e 'import "data:application/json,{}" assert { type: "json" }'
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior? Why is that the expected behavior?
Regarding [What steps will reproduce the bug?]
It should provide some kind of warning since import assertions (not import attributes) are non-standard
Additional information
This also applies to the next v20.x LTS version
The text was updated successfully, but these errors were encountered: