Skip to content

Commit 6b3b9a9

Browse files
authoredJan 3, 2020
fix(commitlint): use new read pkg syntax (#888)
1 parent 5fd8a69 commit 6b3b9a9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎@alias/commitlint/cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const resolvePkg = require('resolve-pkg');
44
const readPkg = require('read-pkg');
55

66
const pkgDir = resolvePkg('@commitlint/cli', {cwd: __dirname});
7-
const manifest = readPkg.sync(path.join(pkgDir, 'package.json'));
7+
const manifest = readPkg.sync({cwd: pkgDir});
88
const bin = path.join(pkgDir, manifest.bin.commitlint);
99

1010
require(bin);

‎@packages/utils/pkg-check.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function main(cli) {
4343
const skipImport =
4444
typeof cli.flags.skipImport === 'boolean' ? cli.flags.skipImport : false;
4545

46-
return readPkg(cwd).then(pkg => {
46+
return readPkg({cwd}).then(pkg => {
4747
return getTarballFiles(cwd, {write: !skipImport}).then(tarball => {
4848
return getPackageFiles(cwd).then(pkgFiles => {
4949
let problems = [];

0 commit comments

Comments
 (0)
Please sign in to comment.