Skip to content

Commit 605ca15

Browse files
committed
Utilize CJS require for 'read-package-json-fast'
1 parent fdb3b79 commit 605ca15

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: lib/read-package-json.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*/
77
'use strict'
88

9+
const readPackage = require('read-package-json-fast')
10+
911
// ------------------------------------------------------------------------------
1012
// Requirements
1113
// ------------------------------------------------------------------------------
@@ -23,7 +25,7 @@ const joinPath = require('path').join
2325
*/
2426
module.exports = function readPackageJson () {
2527
const path = joinPath(process.cwd(), 'package.json')
26-
return import('read-package-json-fast').then(({ default: readPackage }) => readPackage(path)).then(body => ({
28+
return readPackage(path).then(body => ({
2729
taskList: Object.keys(body.scripts || {}),
2830
packageInfo: { path, body }
2931
}))

0 commit comments

Comments
 (0)