Commit f3e3429
module: support main w/o extension, pjson cache
This adds support for ensuring that the top-level main into Node is
supported loading when it has no extension for backwards-compat with
NodeJS bin workflows.
In addition package.json caching is implemented in the module lookup
process.
Backport-PR-URL: #18923
PR-URL: #18728
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>1 parent 50d1233 commit f3e3429Copy full SHA for f3e3429
File tree
Expand file treeCollapse file tree
15 files changed
+216
-133
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- internal
- loader
- process
- src
- test
- fixtures
- es-module-loaders
- es-modules
- parallel
Expand file treeCollapse file tree
15 files changed
+216
-133
lines changedOpen diff view settings
Collapse file
+12-4Lines changed: 12 additions & 4 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
113 | 113 | |
114 | 114 | |
115 | 115 | |
116 | | - |
| 116 | + |
| 117 | + |
117 | 118 | |
118 | | - |
| 119 | + |
| 120 | + |
| 121 | + |
119 | 122 | |
120 | 123 | |
121 | 124 | |
122 | 125 | |
123 | 126 | |
124 | 127 | |
125 | 128 | |
126 | | - |
| 129 | + |
| 130 | + |
| 131 | + |
127 | 132 | |
128 | 133 | |
129 | 134 | |
| ||
152 | 157 | |
153 | 158 | |
154 | 159 | |
155 | | - |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
156 | 164 | |
157 | 165 | |
158 | 166 | |
|
Collapse file
lib/internal/bootstrap_node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap_node.js+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
105 | 105 | |
106 | 106 | |
107 | 107 | |
| 108 | + |
108 | 109 | |
109 | 110 | |
110 | 111 | |
|
Collapse file
lib/internal/loader/DefaultResolve.js
Copy file name to clipboardExpand all lines: lib/internal/loader/DefaultResolve.js+16-5Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
6 | 5 | |
7 | 6 | |
8 | 7 | |
| ||
11 | 10 | |
12 | 11 | |
13 | 12 | |
| 13 | + |
14 | 14 | |
15 | 15 | |
16 | 16 | |
| ||
57 | 57 | |
58 | 58 | |
59 | 59 | |
60 | | - |
| 60 | + |
| 61 | + |
61 | 62 | |
62 | 63 | |
63 | 64 | |
| ||
66 | 67 | |
67 | 68 | |
68 | 69 | |
69 | | - |
| 70 | + |
70 | 71 | |
71 | 72 | |
72 | 73 | |
73 | | - |
| 74 | + |
74 | 75 | |
75 | 76 | |
76 | 77 | |
77 | 78 | |
78 | 79 | |
79 | | - |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
80 | 91 | |
81 | 92 | |
82 | 93 | |
|
Collapse file
lib/internal/loader/Loader.js
Copy file name to clipboardExpand all lines: lib/internal/loader/Loader.js+11-48Lines changed: 11 additions & 48 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | | - |
4 | | - |
5 | 3 | |
6 | | - |
7 | 4 | |
8 | 5 | |
9 | 6 | |
10 | 7 | |
11 | 8 | |
12 | | - |
| 9 | + |
13 | 10 | |
14 | 11 | |
15 | 12 | |
16 | 13 | |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | 14 | |
39 | 15 | |
40 | 16 | |
41 | 17 | |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
| 18 | + |
49 | 19 | |
50 | 20 | |
51 | 21 | |
| ||
71 | 41 | |
72 | 42 | |
73 | 43 | |
74 | | - |
75 | | - |
| 44 | + |
| 45 | + |
| 46 | + |
76 | 47 | |
77 | 48 | |
78 | 49 | |
| ||
93 | 64 | |
94 | 65 | |
95 | 66 | |
96 | | - |
| 67 | + |
97 | 68 | |
98 | 69 | |
99 | 70 | |
| ||
107 | 78 | |
108 | 79 | |
109 | 80 | |
110 | | - |
| 81 | + |
111 | 82 | |
112 | 83 | |
113 | 84 | |
| ||
134 | 105 | |
135 | 106 | |
136 | 107 | |
137 | | - |
138 | | - |
139 | | - |
140 | | - |
141 | | - |
142 | | - |
| 108 | + |
| 109 | + |
| 110 | + |
143 | 111 | |
144 | 112 | |
145 | 113 | |
146 | 114 | |
147 | 115 | |
148 | | - |
149 | | - |
150 | | - |
151 | | - |
152 | | - |
153 | | - |
154 | 116 | |
155 | 117 | |
156 | 118 | |
| 119 | + |
157 | 120 | |
Collapse file
lib/internal/loader/Translators.js
Copy file name to clipboardExpand all lines: lib/internal/loader/Translators.js+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
19 | 19 | |
20 | 20 | |
21 | 21 | |
22 | | - |
| 22 | + |
23 | 23 | |
24 | 24 | |
25 | 25 | |
| ||
62 | 62 | |
63 | 63 | |
64 | 64 | |
65 | | - |
| 65 | + |
66 | 66 | |
67 | 67 | |
68 | 68 | |
| ||
74 | 74 | |
75 | 75 | |
76 | 76 | |
77 | | - |
| 77 | + |
78 | 78 | |
79 | 79 | |
80 | 80 | |
|
Collapse file
lib/internal/process/modules.js
Copy file name to clipboard+47Lines changed: 47 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 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
Collapse file
+8-21Lines changed: 8 additions & 21 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
24 | 24 | |
25 | 25 | |
26 | 26 | |
27 | | - |
28 | 27 | |
29 | 28 | |
30 | 29 | |
| ||
35 | 34 | |
36 | 35 | |
37 | 36 | |
| 37 | + |
38 | 38 | |
39 | 39 | |
40 | 40 | |
| ||
43 | 43 | |
44 | 44 | |
45 | 45 | |
46 | | - |
| 46 | + |
47 | 47 | |
48 | 48 | |
49 | | - |
50 | 49 | |
51 | 50 | |
52 | 51 | |
| ||
444 | 443 | |
445 | 444 | |
446 | 445 | |
447 | | - |
448 | 446 | |
449 | 447 | |
450 | 448 | |
| ||
457 | 455 | |
458 | 456 | |
459 | 457 | |
460 | | - |
461 | | - |
462 | | - |
463 | | - |
464 | | - |
465 | | - |
466 | | - |
467 | | - |
468 | | - |
469 | | - |
470 | | - |
471 | | - |
472 | | - |
473 | | - |
474 | | - |
475 | | - |
| 458 | + |
| 459 | + |
| 460 | + |
| 461 | + |
476 | 462 | |
477 | 463 | |
478 | 464 | |
| ||
575 | 561 | |
576 | 562 | |
577 | 563 | |
578 | | - |
| 564 | + |
| 565 | + |
579 | 566 | |
580 | 567 | |
581 | 568 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
115 | 115 | |
116 | 116 | |
117 | 117 | |
| 118 | + |
118 | 119 | |
119 | 120 | |
120 | 121 | |
|
0 commit comments