File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change
1
+ lib /read-package-json.js
Original file line number Diff line number Diff line change
1
+
1
2
/**
2
3
* @module read-package-json
3
4
* @author Toru Nagashima
11
12
//------------------------------------------------------------------------------
12
13
13
14
const joinPath = require ( "path" ) . join
14
- const readPkg = require ( "read-pkg" )
15
15
16
16
//------------------------------------------------------------------------------
17
17
// Public Interface
@@ -24,7 +24,7 @@ const readPkg = require("read-pkg")
24
24
*/
25
25
module . exports = function readPackageJson ( ) {
26
26
const path = joinPath ( process . cwd ( ) , "package.json" )
27
- return readPkg ( path ) . then ( body => ( {
27
+ return import ( 'read-pkg' ) . then ( ( { readPackage } ) => readPackage ( path ) ) . then ( body => ( {
28
28
taskList : Object . keys ( body . scripts || { } ) ,
29
29
packageInfo : { path, body } ,
30
30
} ) )
Original file line number Diff line number Diff line change 35
35
"memorystream" : " ^0.3.1" ,
36
36
"minimatch" : " ^9.0.0" ,
37
37
"pidtree" : " ^0.6.0" ,
38
- "read-pkg" : " ^5.2 .0" ,
38
+ "read-pkg" : " ^8.0 .0" ,
39
39
"shell-quote" : " ^1.7.3"
40
40
},
41
41
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments