Commit 3743406
esm: consolidate ESM loader hooks
doc: update ESM hook examples
esm: fix unsafe primordial
doc: fix ESM example linting
esm: allow source of type ArrayBuffer
doc: update ESM hook changelog to include resolve format
esm: allow all ArrayBuffers and TypedArrays for load hook source
doc: tidy code & API docs
doc: convert ESM source table header from Title Case to Sentence case
doc: add detailed explanation for getPackageType
esm: add caveat that ESMLoader::import() must NOT be renamed
esm: tidy code declaration of getFormat protocolHandlers
doc: correct ESM doc link (bad conflict resolution)
doc: update ESM hook limitation for CJS
esm: tweak preload description
doc: update ESM getPackageType() example explanation
PR-URL: #37468
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>1 parent 1ef2cf8 commit 3743406Copy full SHA for 3743406
File tree
Expand file treeCollapse file tree
46 files changed
+971
-545
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- internal
- modules
- cjs
- esm
- process
- test
- es-module
- fixtures
- es-module-loaders
- es-modules
- message
- parallel
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Expand file treeCollapse file tree
46 files changed
+971
-545
lines changedOpen diff view settings
Collapse file
+163-149Lines changed: 163 additions & 149 deletions
- Display the source diff
- Display the rich diff
Large diffs are not rendered by default.
Collapse file
lib/internal/modules/cjs/loader.js
Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/loader.js+5-5Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
981 | 981 | |
982 | 982 | |
983 | 983 | |
984 | | - |
| 984 | + |
985 | 985 | |
986 | 986 | |
987 | 987 | |
988 | 988 | |
989 | 989 | |
990 | | - |
991 | | - |
| 990 | + |
| 991 | + |
992 | 992 | |
993 | 993 | |
994 | 994 | |
| ||
1022 | 1022 | |
1023 | 1023 | |
1024 | 1024 | |
1025 | | - |
| 1025 | + |
1026 | 1026 | |
1027 | 1027 | |
1028 | 1028 | |
| ||
1037 | 1037 | |
1038 | 1038 | |
1039 | 1039 | |
1040 | | - |
| 1040 | + |
1041 | 1041 | |
1042 | 1042 | |
1043 | 1043 | |
|
Collapse file
lib/internal/modules/esm/get_format.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/get_format.js+23-13Lines changed: 23 additions & 13 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
| 3 | + |
| 4 | + |
| 5 | + |
3 | 6 | |
4 | | - |
5 | 7 | |
6 | 8 | |
7 | 9 | |
| ||
36 | 38 | |
37 | 39 | |
38 | 40 | |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
43 | | - |
44 | | - |
| 41 | + |
| 42 | + |
45 | 43 | |
46 | 44 | |
47 | 45 | |
48 | | - |
| 46 | + |
49 | 47 | |
50 | 48 | |
51 | 49 | |
52 | 50 | |
53 | 51 | |
54 | 52 | |
55 | | - |
56 | | - |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
57 | 57 | |
58 | 58 | |
| 59 | + |
59 | 60 | |
60 | 61 | |
61 | 62 | |
| ||
71 | 72 | |
72 | 73 | |
73 | 74 | |
74 | | - |
75 | | - |
76 | | - |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
77 | 87 | |
78 | 88 | |
79 | 89 | |
|
Collapse file
lib/internal/modules/esm/get_source.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/get_source.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
40 | 40 | |
41 | 41 | |
42 | 42 | |
43 | | - |
| 43 | + |
44 | 44 | |
45 | 45 | |
Collapse file
lib/internal/modules/esm/load.js
Copy file name to clipboard+32Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
0 commit comments