Commit 6014429
module: handle empty require.resolve() options
If require.resolve() is passed an options object, but
the paths option is not present, then use the default
require.resolve() paths.
PR-URL: #28078
Fixes: #28077
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent a0c5b58 commit 6014429Copy full SHA for 6014429
File tree
Expand file treeCollapse file tree
2 files changed
+9
-1
lines changedOpen diff view settings
Filter options
- lib/internal/modules/cjs
- test/fixtures
Expand file treeCollapse file tree
2 files changed
+9
-1
lines changedOpen diff view settings
Collapse file
lib/internal/modules/cjs/loader.js
Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/loader.js+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
599 | 599 | |
600 | 600 | |
601 | 601 | |
602 | | - |
| 602 | + |
| 603 | + |
| 604 | + |
603 | 605 | |
604 | 606 | |
605 | 607 | |
|
Collapse file
test/fixtures/require-resolve.js
Copy file name to clipboardExpand all lines: test/fixtures/require-resolve.js+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
92 | 92 | |
93 | 93 | |
94 | 94 | |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
0 commit comments