@@ -62,7 +62,7 @@ changes:
62
62
- v17.0.0
63
63
- v16.12.0
64
64
pr-url: https://github.com/nodejs/node/pull/40249
65
- description: Added support for import assertions to the
65
+ description: Added support for import attributes to the
66
66
`importModuleDynamically` parameter.
67
67
- version: v10.6.0
68
68
pr-url: https://github.com/nodejs/node/pull/20300
@@ -103,7 +103,7 @@ changes:
103
103
[ ` ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG ` ] [ ] .
104
104
* ` specifier ` {string} specifier passed to ` import() `
105
105
* ` script ` {vm.Script}
106
- * ` importAssertions ` {Object} The ` "assert " ` value passed to the
106
+ * ` importAttributes ` {Object} The ` "with " ` value passed to the
107
107
[ ` optionsExpression ` ] [ ] optional parameter, or an empty object if no value
108
108
was provided.
109
109
* Returns: {Module Namespace Object|vm.Module} Returning a ` vm.Module ` is
@@ -617,6 +617,14 @@ The identifier of the current module, as set in the constructor.
617
617
618
618
### ` module.link(linker) `
619
619
620
+ <!-- YAML
621
+ changes:
622
+ - version: REPLACEME
623
+ pr-url: https://github.com/nodejs/node/pull/50141
624
+ description: The option `extra.assert` is renamed to `extra.attributes`. The
625
+ former name is still provided for backward compatibility.
626
+ -->
627
+
620
628
* ` linker ` {Function}
621
629
* ` specifier ` {string} The specifier of the requested module:
622
630
``` mjs
@@ -627,15 +635,14 @@ The identifier of the current module, as set in the constructor.
627
635
* ` referencingModule` {vm .Module } The ` Module` object ` link()` is called on.
628
636
629
637
* ` extra` {Object }
630
- * ` assert` {Object } The data from the assertion:
631
- <!-- eslint- skip -->
632
- ` ` ` js
633
- import foo from 'foo' assert { name: 'value' };
634
- // ^^^^^^^^^^^^^^^^^ the assertion
638
+ * ` attributes` {Object } The data from the attribute:
639
+ ` ` ` mjs
640
+ import foo from 'foo' with { name: 'value' };
641
+ // ^^^^^^^^^^^^^^^^^ the attribute
635
642
` ` `
636
- Per ECMA - 262 , hosts are expected to ignore assertions that they do not
637
- support, as opposed to, for example, triggering an error if an
638
- unsupported assertion is present .
643
+ Per ECMA - 262 , hosts are expected to trigger an error if an
644
+ unsupported attribute is present.
645
+ * ` assert ` { Object } Alias for ` extra.attributes ` .
639
646
640
647
* Returns: {vm .Module | Promise }
641
648
* Returns: {Promise }
@@ -734,7 +741,7 @@ changes:
734
741
- v17.0 .0
735
742
- v16.12 .0
736
743
pr- url: https: // github.com/nodejs/node/pull/40249
737
- description: Added support for import assertions to the
744
+ description: Added support for import attributes to the
738
745
` importModuleDynamically` parameter.
739
746
-->
740
747
@@ -767,7 +774,7 @@ changes:
767
774
[` ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG` ][].
768
775
* ` specifier` {string} specifier passed to ` import()`
769
776
* ` module` {vm .Module }
770
- * ` importAssertions ` {Object } The ` "assert "` value passed to the
777
+ * ` importAttributes ` {Object } The ` "with "` value passed to the
771
778
[` optionsExpression` ][] optional parameter, or an empty object if no value
772
779
was provided.
773
780
* Returns: {Module Namespace Object | vm .Module } Returning a ` vm.Module` is
@@ -982,7 +989,7 @@ changes:
982
989
- v17.0.0
983
990
- v16.12.0
984
991
pr-url: https://github.com/nodejs/node/pull/40249
985
- description: Added support for import assertions to the
992
+ description: Added support for import attributes to the
986
993
`importModuleDynamically` parameter.
987
994
- version: v15.9.0
988
995
pr-url: https://github.com/nodejs/node/pull/35431
@@ -1028,7 +1035,7 @@ changes:
1028
1035
[ ` ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG ` ] [ ] .
1029
1036
* ` specifier ` {string} specifier passed to ` import() `
1030
1037
* ` function ` {Function}
1031
- * ` importAssertions ` {Object} The ` "assert " ` value passed to the
1038
+ * ` importAttributes ` {Object} The ` "with " ` value passed to the
1032
1039
[ ` optionsExpression ` ] [ ] optional parameter, or an empty object if no value
1033
1040
was provided.
1034
1041
* Returns: {Module Namespace Object|vm.Module} Returning a ` vm.Module ` is
@@ -1214,7 +1221,7 @@ changes:
1214
1221
- v17.0.0
1215
1222
- v16.12.0
1216
1223
pr-url: https://github.com/nodejs/node/pull/40249
1217
- description: Added support for import assertions to the
1224
+ description: Added support for import attributes to the
1218
1225
`importModuleDynamically` parameter.
1219
1226
- version: v6.3.0
1220
1227
pr-url: https://github.com/nodejs/node/pull/6635
@@ -1254,7 +1261,7 @@ changes:
1254
1261
[ ` ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG ` ] [ ] .
1255
1262
* ` specifier ` {string} specifier passed to ` import() `
1256
1263
* ` script ` {vm.Script}
1257
- * ` importAssertions ` {Object} The ` "assert " ` value passed to the
1264
+ * ` importAttributes ` {Object} The ` "with " ` value passed to the
1258
1265
[ ` optionsExpression ` ] [ ] optional parameter, or an empty object if no value
1259
1266
was provided.
1260
1267
* Returns: {Module Namespace Object|vm.Module} Returning a ` vm.Module ` is
@@ -1294,7 +1301,7 @@ changes:
1294
1301
- v17.0.0
1295
1302
- v16.12.0
1296
1303
pr-url: https://github.com/nodejs/node/pull/40249
1297
- description: Added support for import assertions to the
1304
+ description: Added support for import attributes to the
1298
1305
`importModuleDynamically` parameter.
1299
1306
- version: v14.6.0
1300
1307
pr-url: https://github.com/nodejs/node/pull/34023
@@ -1355,7 +1362,7 @@ changes:
1355
1362
[ ` ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG ` ] [ ] .
1356
1363
* ` specifier ` {string} specifier passed to ` import() `
1357
1364
* ` script ` {vm.Script}
1358
- * ` importAssertions ` {Object} The ` "assert " ` value passed to the
1365
+ * ` importAttributes ` {Object} The ` "with " ` value passed to the
1359
1366
[ ` optionsExpression ` ] [ ] optional parameter, or an empty object if no value
1360
1367
was provided.
1361
1368
* Returns: {Module Namespace Object|vm.Module} Returning a ` vm.Module ` is
@@ -1399,7 +1406,7 @@ changes:
1399
1406
- v17.0.0
1400
1407
- v16.12.0
1401
1408
pr-url: https://github.com/nodejs/node/pull/40249
1402
- description: Added support for import assertions to the
1409
+ description: Added support for import attributes to the
1403
1410
`importModuleDynamically` parameter.
1404
1411
- version: v6.3.0
1405
1412
pr-url: https://github.com/nodejs/node/pull/6635
@@ -1437,7 +1444,7 @@ changes:
1437
1444
[ ` ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG ` ] [ ] .
1438
1445
* ` specifier ` {string} specifier passed to ` import() `
1439
1446
* ` script ` {vm.Script}
1440
- * ` importAssertions ` {Object} The ` "assert " ` value passed to the
1447
+ * ` importAttributes ` {Object} The ` "with " ` value passed to the
1441
1448
[ ` optionsExpression ` ] [ ] optional parameter, or an empty object if no value
1442
1449
was provided.
1443
1450
* Returns: {Module Namespace Object|vm.Module} Returning a ` vm.Module ` is
0 commit comments