{{ message }}
Commit 93c4dc5
authored
module: ensure 'node:'-only modules can access node_modules
This commit allows require() and import to search the
node_modules directories when importing a core module that
must have the node: scheme. This prevents these core modules
from shadowing userland modules with the same name but no
prefix.
PR-URL: #42430
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>1 parent a058cef commit 93c4dc5
4 files changed
Lines changed: 52 additions & 18 deletions
File tree
- lib/internal/modules
- cjs
- esm
- test/parallel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
| 537 | + | |
| 538 | + | |
538 | 539 | | |
539 | 540 | | |
540 | 541 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
853 | 852 | | |
854 | 853 | | |
855 | 854 | | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
| 855 | + | |
| 856 | + | |
861 | 857 | | |
862 | 858 | | |
863 | 859 | | |
| |||
1041 | 1037 | | |
1042 | 1038 | | |
1043 | 1039 | | |
1044 | | - | |
| 1040 | + | |
| 1041 | + | |
1045 | 1042 | | |
1046 | 1043 | | |
1047 | 1044 | | |
| |||

0 commit comments