Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(commitlint): use new read pkg syntax #888

Merged
merged 1 commit into from Jan 3, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion @alias/commitlint/cli.js
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
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