module: improve resolve paths validation by cjihrig · Pull Request #27613 · nodejs/node

@cjihrig mentioned this pull request

May 8, 2019

BridgeAR

@cjihrig

This commit adds input validation to require.resolve()'s
paths option. Prior to this change, passing in a non-array
value lead to a misleading 'module not found' error.

Refs: nodejs#27583

@Trott Trott added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

May 10, 2019

Trott pushed a commit to Trott/io.js that referenced this pull request

May 10, 2019
This commit adds input validation to require.resolve()'s
paths option. Prior to this change, passing in a non-array
value lead to a misleading 'module not found' error.

Refs: nodejs#27583

PR-URL: nodejs#27613
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

targos pushed a commit that referenced this pull request

May 11, 2019
This commit adds input validation to require.resolve()'s
paths option. Prior to this change, passing in a non-array
value lead to a misleading 'module not found' error.

Refs: #27583

PR-URL: #27613
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>