@@ -270,13 +270,9 @@ changes:
270270 description: Switch from Import Assertions to Import Attributes.
271271-->
272272
273- > Stability: 1.1 - Active development
274-
275- > This feature was previously named "Import assertions", and using the ` assert `
276- > keyword instead of ` with ` . Any uses in code of the prior ` assert ` keyword
277- > should be updated to use ` with ` instead.
273+ > Stability: 2 - Stable
278274
279- The [ Import Attributes proposal ] [ ] adds an inline syntax for module import
275+ [ Import attributes ] [ Import Attributes MDN ] are an inline syntax for module import
280276statements to pass on more information alongside the module specifier.
281277
282278``` js
@@ -286,13 +282,14 @@ const { default: barData } =
286282 await import (' ./bar.json' , { with: { type: ' json' } });
287283```
288284
289- Node.js supports the following ` type ` values, for which the attribute is
290- mandatory:
285+ Node.js only supports the ` type ` attribute, for which it supports the following values:
291286
292287| Attribute ` type ` | Needed for |
293288| ---------------- | ---------------- |
294289| ` 'json' ` | [ JSON modules] [ ] |
295290
291+ The ` type: 'json' ` attribute is mandatory when importing JSON modules.
292+
296293## Built-in modules
297294
298295[ Built-in modules] [ ] provide named exports of their public API. A
@@ -631,7 +628,7 @@ separate cache.
631628
632629## JSON modules
633630
634- > Stability: 1 - Experimental
631+ > Stability: 2 - Stable
635632
636633JSON files can be referenced by ` import` :
637634
@@ -1101,7 +1098,7 @@ resolution for ESM specifiers is [commonjs-extension-resolution-loader][].
11011098[Dynamic ` import()` ]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import
11021099[ES Module Integration Proposal for WebAssembly]: https://github.com/webassembly/esm-integration
11031100[Import Attributes]: #import-attributes
1104- [Import Attributes proposal ]: https://github.com/tc39/proposal- import-attributes
1101+ [Import Attributes MDN ]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/ import/with
11051102[JSON modules]: #json-modules
11061103[Loading ECMAScript modules using ` require()` ]: modules.md#loading-ecmascript-modules-using-require
11071104[Module customization hooks]: module.md#customization-hooks
0 commit comments