Commit a75e44d
esm: ensure require.main for CJS top-level loads
PR-URL: #21150
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>1 parent ffc29c1 commit a75e44dCopy full SHA for a75e44d
File tree
Expand file treeCollapse file tree
4 files changed
+14
-12
lines changedOpen diff view settings
Filter options
- lib/internal/modules/esm
- test/es-module
Expand file treeCollapse file tree
4 files changed
+14
-12
lines changedOpen diff view settings
Collapse file
lib/internal/modules/esm/loader.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/loader.js+1-6Lines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
110 | 110 | |
111 | 111 | |
112 | 112 | |
113 | | - |
114 | | - |
115 | | - |
116 | | - |
117 | | - |
118 | | - |
| 113 | + |
119 | 114 | |
120 | 115 | |
121 | 116 | |
|
Collapse file
lib/internal/modules/esm/module_job.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/module_job.js+5-4Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | | - |
| 15 | + |
16 | 16 | |
17 | 17 | |
18 | 18 | |
19 | | - |
| 19 | + |
20 | 20 | |
21 | 21 | |
22 | 22 | |
23 | | - |
| 23 | + |
24 | 24 | |
25 | 25 | |
26 | 26 | |
| ||
82 | 82 | |
83 | 83 | |
84 | 84 | |
85 | | - |
| 85 | + |
| 86 | + |
86 | 87 | |
87 | 88 | |
88 | 89 | |
|
Collapse file
lib/internal/modules/esm/translators.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/translators.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
36 | 36 | |
37 | 37 | |
38 | 38 | |
39 | | - |
| 39 | + |
40 | 40 | |
41 | 41 | |
42 | 42 | |
| ||
51 | 51 | |
52 | 52 | |
53 | 53 | |
54 | | - |
| 54 | + |
55 | 55 | |
56 | 56 | |
57 | 57 | |
|
Collapse file
test/es-module/test-esm-cjs-main.js
Copy file name to clipboard+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
0 commit comments