Commit 8530577
committed
esm: fix inconsistency of importAssertion between resolve and load hook
As the [documentation](https://nodejs.org/docs/latest/api/module.html#customization-hooks:~:text=The%20property%20context.importAssertions%20is%20replaced%20with%20context.importAttributes.%20Using%20the%20old%20name%20is%20still%20supported%20and%20will%20emit%20an%20experimental%20warning.) says, the `context.importAssertion` should be still supported and emit a warning. This is true for the load hook, but not correct for the context of resolve hook.
This PR is tring to fix the inconsistency.1 parent f98d9c1 commit 8530577
File tree
2 files changed
+8
-3
lines changed- lib/internal/modules/esm
- test/es-module
2 files changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | | - | |
| 30 | + | |
26 | 31 | | |
27 | | - | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
0 commit comments