You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[v18.x backport] Backport import attributes syntax to v18 #51118
When using import attributes, users have two choices:
import "foo" with { ... } is the final syntax that will be included in the language, but it's only supported on Node.js 20+
import "foo" assert { ... } is supported in all LTS Node.js versions, but will likely be removed from the proposal one day
Node.js 18 is supported until April 2025, so this situation will not "solve by itself" for one year and a half.
What is the feature you are proposing to solve the problem?
I'd like to backport the with syntax to Node.js 18. Specifically, this patch: https://chromium-review.googlesource.com/c/v8/v8/+/4705558 (minus the use-counter changes, since they are only useful in Chrome). I'm willing to open a PR for it, but I would need some pointer on how to backport V8 features.
Note that some of the import attribute changes have already been backported to Node.js 18 (#50669). Specifically, the API changes exposed to ESM loaders.
With this extra backport, all maintained LTS versions would have the same degree of support for import attributes.
Activity
nicolo-ribaudo commentedon Mar 18, 2024
Done in #51136