mirror of
https://github.com/nodejs/node.git
synced 2025-05-17 16:40:19 +00:00

PR-URL: https://github.com/nodejs/node/pull/38254 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 lines
335 B
JavaScript
8 lines
335 B
JavaScript
// can't use read-package-json-fast, because we want to ensure
|
|
// that we make as few changes as possible, even for safety issues.
|
|
const { promisify } = require('util')
|
|
const readFile = promisify(require('fs').readFile)
|
|
const parse = require('json-parse-even-better-errors')
|
|
|
|
module.exports = async path => parse(await readFile(path))
|