@@ -251,14 +251,10 @@ changes:
251251 description: Switch from Import Assertions to Import Attributes.
252252-->
253253
254- > Stability: 1.1 - Active development
255-
256- > This feature was previously named "Import assertions", and using the ` assert `
257- > keyword instead of ` with ` . Any uses in code of the prior ` assert ` keyword
258- > should be updated to use ` with ` instead.
254+ > Stability: 2 - Stable
259255
260- The [ Import Attributes proposal ] [ ] adds an inline syntax for module import
261- statements to pass on more information alongside the module specifier.
256+ [ Import attributes ] [ Import Attributes MDN ] are an inline syntax for module
257+ import statements to pass on more information alongside the module specifier.
262258
263259``` js
264260import fooData from ' ./foo.json' with { type : 'json ' };
@@ -267,13 +263,15 @@ const { default: barData } =
267263 await import (' ./bar.json' , { with: { type: ' json' } });
268264```
269265
270- Node.js supports the following ` type ` values , for which the attribute is
271- mandatory :
266+ Node.js only supports the ` type ` attribute , for which it supports the following
267+ values :
272268
273269| Attribute ` type ` | Needed for |
274270| ---------------- | ---------------- |
275271| ` 'json' ` | [ JSON modules] [ ] |
276272
273+ The ` type: 'json' ` attribute is mandatory when importing JSON modules.
274+
277275## Builtin modules
278276
279277[ Core modules] [ ] provide named exports of their public API. A
@@ -552,7 +550,7 @@ separate cache.
552550
553551## JSON modules
554552
555- > Stability: 1 - Experimental
553+ > Stability: 2 - Stable
556554
557555JSON files can be referenced by `import`:
558556
@@ -1090,7 +1088,7 @@ success!
10901088[Dynamic ` import ()` ]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import
10911089[ES Module Integration Proposal for WebAssembly]: https://github.com/webassembly/esm-integration
10921090[Import Attributes]: #import-attributes
1093- [Import Attributes proposal ]: https://github.com/tc39/proposal- import-attributes
1091+ [Import Attributes MDN ]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/ import/with
10941092[JSON modules]: #json-modules
10951093[Module customization hooks]: module.md#customization-hooks
10961094[Node.js Module Resolution And Loading Algorithm]: #resolution-algorithm-specification
0 commit comments