module: use kNodeModulesRE to detect node_modules · nodejs/node@cf8701c · GitHub
Skip to content

Commit cf8701c

Browse files
joyeecheungmarco-ippolito
authored andcommitted
module: use kNodeModulesRE to detect node_modules
This is faster and more consistent with other places using the regular expression to detect node_modules. PR-URL: #55243 Backport-PR-URL: #56927 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Refs: #52697
1 parent 64ce95b commit cf8701c

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

lib/internal/modules/esm/load.js

Lines changed: 3 additions & 1 deletion

lib/internal/util.js

Lines changed: 6 additions & 1 deletion

0 commit comments

Comments
 (0)