diff options
author | Gar <gar+gh@danger.computer> | 2021-03-23 17:31:42 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-03-23 17:36:33 +0300 |
commit | 1924eb457aea7c93dfaf4a911355a63d84d66eee (patch) | |
tree | 06c062f71b3d3ecc0e8bc87ccb9c2f977142c959 /node_modules/libnpmversion | |
parent | 4fb6e2fd7fbbdb8791b4ccefe0433bd3cb62f0d5 (diff) |
libnpmversion@1.0.12
Diffstat (limited to 'node_modules/libnpmversion')
-rw-r--r-- | node_modules/libnpmversion/lib/index.js | 2 | ||||
-rw-r--r-- | node_modules/libnpmversion/lib/read-json.js | 7 | ||||
-rw-r--r-- | node_modules/libnpmversion/lib/version.js | 2 | ||||
-rw-r--r-- | node_modules/libnpmversion/package.json | 4 |
4 files changed, 11 insertions, 4 deletions
diff --git a/node_modules/libnpmversion/lib/index.js b/node_modules/libnpmversion/lib/index.js index 525d8264e..c3f554834 100644 --- a/node_modules/libnpmversion/lib/index.js +++ b/node_modules/libnpmversion/lib/index.js @@ -1,4 +1,4 @@ -const readJson = require('read-package-json-fast') +const readJson = require('./read-json.js') const version = require('./version.js') const proclog = require('./proc-log.js') diff --git a/node_modules/libnpmversion/lib/read-json.js b/node_modules/libnpmversion/lib/read-json.js new file mode 100644 index 000000000..0a1f64f2f --- /dev/null +++ b/node_modules/libnpmversion/lib/read-json.js @@ -0,0 +1,7 @@ +// 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)) diff --git a/node_modules/libnpmversion/lib/version.js b/node_modules/libnpmversion/lib/version.js index 31e6023f0..0fe1ea621 100644 --- a/node_modules/libnpmversion/lib/version.js +++ b/node_modules/libnpmversion/lib/version.js @@ -4,7 +4,7 @@ const retrieveTag = require('./retrieve-tag.js') const semver = require('semver') const enforceClean = require('./enforce-clean.js') const writeJson = require('./write-json.js') -const readJson = require('read-package-json-fast') +const readJson = require('./read-json.js') const git = require('@npmcli/git') const commit = require('./commit.js') const tag = require('./tag.js') diff --git a/node_modules/libnpmversion/package.json b/node_modules/libnpmversion/package.json index 3d15bbc2f..0135c21e7 100644 --- a/node_modules/libnpmversion/package.json +++ b/node_modules/libnpmversion/package.json @@ -1,6 +1,6 @@ { "name": "libnpmversion", - "version": "1.0.11", + "version": "1.0.12", "main": "lib/index.js", "files": [ "lib/*.js" @@ -30,7 +30,7 @@ "dependencies": { "@npmcli/git": "^2.0.6", "@npmcli/run-script": "^1.8.3", - "read-package-json-fast": "^2.0.1", + "json-parse-even-better-errors": "^2.3.1", "semver": "^7.3.4", "stringify-package": "^1.0.1" } |