Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(commitlint): use new read pkg syntax
  • Loading branch information
byCedric committed Jan 3, 2020
commit dd754ab9bccdcc1032653085abd189ba94c20af1
2 changes: 1 addition & 1 deletion @alias/commitlint/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const resolvePkg = require('resolve-pkg');
const readPkg = require('read-pkg');

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

require(bin);
2 changes: 1 addition & 1 deletion @packages/utils/pkg-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function main(cli) {
const skipImport =
typeof cli.flags.skipImport === 'boolean' ? cli.flags.skipImport : false;

return readPkg(cwd).then(pkg => {
return readPkg({cwd}).then(pkg => {
return getTarballFiles(cwd, {write: !skipImport}).then(tarball => {
return getPackageFiles(cwd).then(pkgFiles => {
let problems = [];
Expand Down