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

[v18.x backport] Backport import attributes syntax to v18 #51118

Closed
nicolo-ribaudo opened this issue Dec 11, 2023 · 1 comment
Closed

[v18.x backport] Backport import attributes syntax to v18 #51118

nicolo-ribaudo opened this issue Dec 11, 2023 · 1 comment
Labels
feature request Issues that request new features to be added to Node.js. v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.

Comments

@nicolo-ribaudo
Copy link
Contributor

nicolo-ribaudo commented Dec 11, 2023

What is the problem this feature will solve?

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.

What alternatives have you considered?

No response

@nicolo-ribaudo nicolo-ribaudo added the feature request Issues that request new features to be added to Node.js. label Dec 11, 2023
@juanarbol juanarbol added the v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch. label Dec 19, 2023
@nicolo-ribaudo
Copy link
Contributor Author

Done in #51136

chefjackson added a commit to pancakeswap/pancake-frontend that referenced this issue May 8, 2024
nodejs/node#51118
https://github.com/nodejs/node/releases/tag/v18.20.0

<!--
Before opening a pull request, please read the [contributing
guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md)
first
-->


<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the minimum required Node version to `>=18.20.0`.

### Detailed summary
- Updated the minimum required Node version in `package.json` from
`>=18.0.0` to `>=18.20.0`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.
Projects
None yet
Development

No branches or pull requests

2 participants