module: improve resolve paths validation
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: https://github.com/nodejs/node/issues/27583 PR-URL: https://github.com/nodejs/node/pull/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>
parent
ae749e7a
Please register or sign in to comment