Commit 809371a
module: require.resolve.paths returns null with node schema
require.resolve.paths should returns null with builtin module.
when builtin module without `node:` schema, `paths` returns null.
But, it don't return null when builtin module with `node:` schema.
Fixes: #45001
PR-URL: #45147
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>1 parent efe1be4 commit 809371aCopy full SHA for 809371a
File tree
Expand file treeCollapse file tree
2 files changed
+11
-2
lines changedOpen diff view settings
Filter options
- lib/internal/modules/cjs
- test/parallel
Expand file treeCollapse file tree
2 files changed
+11
-2
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+7-2Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
737 | 737 | |
738 | 738 | |
739 | 739 | |
740 | | - |
741 | | - |
| 740 | + |
| 741 | + |
| 742 | + |
| 743 | + |
| 744 | + |
| 745 | + |
| 746 | + |
742 | 747 | |
743 | 748 | |
744 | 749 | |
|
Collapse file
test/parallel/test-require-resolve.js
Copy file name to clipboardExpand all lines: test/parallel/test-require-resolve.js+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
63 | 63 | |
64 | 64 | |
65 | 65 | |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
66 | 70 | |
67 | 71 | |
68 | 72 | |
|
0 commit comments