Skip to content

Commit a447bee

Browse files
Zettenpcj
authored andcommitted
Specify parsing package.json when walking node_modules (#44)
Provide the concrete filename to avoid accidentally loading 'package.js' or similarly-named files.
1 parent 993a258 commit a447bee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

node/internal/parse_yarn_lock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ function printNodeBinary(module, key, path) {
354354
* package json and return it as an object.
355355
*/
356356
function parseNodeModulePackageJson(name) {
357-
const module = require(`../node_modules/${name}/package`);
357+
const module = require(`../node_modules/${name}/package.json`);
358358

359359
// Take this opportunity to cleanup the module.bin entries
360360
// into a new Map called 'executables'

0 commit comments

Comments
 (0)