Skip to content

Commit

Permalink
feat: move to read-package-json-fast
Browse files Browse the repository at this point in the history
This moves away from read-pkg to a much, much lighter package maintained
by the npm team themselves (read-package-json-fast).
  • Loading branch information
43081j committed Jan 30, 2024
1 parent 8c60208 commit 62b8703
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/read-package-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const joinPath = require('path').join
*/
module.exports = function readPackageJson () {
const path = joinPath(process.cwd(), 'package.json')
return import('read-pkg').then(({ readPackage }) => readPackage(path)).then(body => ({
return import('read-package-json-fast').then(({ default: readPackage }) => readPackage(path)).then(body => ({
taskList: Object.keys(body.scripts || {}),
packageInfo: { path, body }
}))
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"memorystream": "^0.3.1",
"minimatch": "^9.0.0",
"pidtree": "^0.6.0",
"read-pkg": "^8.0.0",
"read-package-json-fast": "^3.0.2",
"shell-quote": "^1.7.3"
},
"devDependencies": {
Expand All @@ -42,8 +42,8 @@
"jsdoc": "^4.0.0",
"mocha": "^10.0.0",
"p-queue": "^7.3.4",
"yarn": "^1.12.3",
"standard": "^17.1.0"
"standard": "^17.1.0",
"yarn": "^1.12.3"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 62b8703

Please sign in to comment.