Skip to content

Commit 945c207

Browse files
fixus: restore return signature of jpsonReader.read
1 parent 841848f commit 945c207

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/internal/modules/package_json_reader.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,13 @@ function read(jsonPath, { base, specifier, isESM } = kEmptyObject) {
107107
specifier == null ? undefined : `${specifier}`,
108108
);
109109

110-
return deserializePackageJSON(jsonPath, parsed);
110+
const result = deserializePackageJSON(jsonPath, parsed);
111+
112+
return {
113+
...result.data,
114+
exists: result.data !== 'none',
115+
pjsonPath: result.path,
116+
};
111117
}
112118

113119
/**

0 commit comments

Comments
 (0)