Skip to content

Commit 77fdd44

Browse files
committed
Update to read-pkg 8
1 parent 421a7fd commit 77fdd44

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/read-package-json.js

lib/read-package-json.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/**
23
* @module read-package-json
34
* @author Toru Nagashima
@@ -11,7 +12,6 @@
1112
//------------------------------------------------------------------------------
1213

1314
const joinPath = require("path").join
14-
const readPkg = require("read-pkg")
1515

1616
//------------------------------------------------------------------------------
1717
// Public Interface
@@ -24,7 +24,7 @@ const readPkg = require("read-pkg")
2424
*/
2525
module.exports = function readPackageJson() {
2626
const path = joinPath(process.cwd(), "package.json")
27-
return readPkg(path).then(body => ({
27+
return import('read-pkg').then(({ readPackage }) => readPackage (path)).then(body => ({
2828
taskList: Object.keys(body.scripts || {}),
2929
packageInfo: { path, body },
3030
}))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"memorystream": "^0.3.1",
3636
"minimatch": "^9.0.0",
3737
"pidtree": "^0.6.0",
38-
"read-pkg": "^5.2.0",
38+
"read-pkg": "^8.0.0",
3939
"shell-quote": "^1.7.3"
4040
},
4141
"devDependencies": {

0 commit comments

Comments
 (0)