Skip to content

Conversation

@nicolo-ribaudo
Copy link
Contributor

Summary

Node.js backported this feature from 21 to 20.10

Test results and supporting details

Documents/misc/node-import-attributes via ⬢ v20.10.0 
➜ node --version
v20.10.0

Documents/misc/node-import-attributes via ⬢ v20.10.0 
➜ bat index.mjs a.json
───────┬────────────────────────────────────────────────────────────────────────
       │ File: index.mjs
───────┼────────────────────────────────────────────────────────────────────────
   1   │ import x from "./a.json" with { type: "json" }
   2   │ console.log(x);
   3   │ 
───────┴────────────────────────────────────────────────────────────────────────
───────┬────────────────────────────────────────────────────────────────────────
       │ File: a.json
───────┼────────────────────────────────────────────────────────────────────────
   1   │ 3
───────┴────────────────────────────────────────────────────────────────────────

Documents/misc/node-import-attributes via ⬢ v20.10.0 
➜ node index.mjs
3
(node:25522) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

Related issues

@github-actions github-actions bot added the data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript label Dec 1, 2023
@github-actions github-actions bot added the data:browsers Data about browsers (versions, release dates, etc). This data is used for validation. label Dec 11, 2023
Copy link
Contributor

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

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

Confirmed via release notes and the corresponding Node.js pull request.

@queengooborg queengooborg merged commit 984a8ec into mdn:main Dec 11, 2023
@nicolo-ribaudo nicolo-ribaudo deleted the patch-1 branch December 11, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:browsers Data about browsers (versions, release dates, etc). This data is used for validation. data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants