module: fix bad `require.resolve` with option paths for `.` and `..` · nodejs/node@59510ab · GitHub
Skip to content

Commit 59510ab

Browse files
dario-piotrowiczaduh95
authored andcommitted
module: fix bad require.resolve with option paths for . and ..
this change fixes `require.resolve` used with the `paths` option not considering `.` and `..` as relative Fixes: #47000 PR-URL: #56735 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent e1b0f44 commit 59510ab

3 files changed

Lines changed: 61 additions & 17 deletions

File tree

lib/internal/modules/cjs/loader.js

Lines changed: 17 additions & 17 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exports.value = 'relative subdir';
Lines changed: 43 additions & 0 deletions

0 commit comments

Comments
 (0)