Compare commits

..

2 Commits

Author SHA1 Message Date
f8d78d05fc fix: handle alternate workspaces config 2019-04-08 11:10:13 -07:00
6e2288f157 docs: update readme 2019-04-05 15:55:41 -07:00
2 changed files with 6 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ Node package compare and change runner.
[![npm](https://img.shields.io/npm/v/pkgcomp.svg)](https://www.npmjs.com/package/pkgcomp) [![npm](https://img.shields.io/npm/v/pkgcomp.svg)](https://www.npmjs.com/package/pkgcomp)
[![Project Status](https://img.shields.io/badge/status-experimental-orange.svg)](https://nodejs.org/api/documentation.html#documentation_stability_index) [![Project Status](https://img.shields.io/badge/status-experimental-orange.svg)](https://nodejs.org/api/documentation.html#documentation_stability_index)
This tool will execute a command of the dependencies or lock files of your module have changed since the last time it was run. Any of the following This tool will execute a command if the dependencies or lock files of your module have changed since the last time it was run. Any of the following will be considered a change:
- If the `dependencies` or `devDependencies` in `package.json` change - If the `dependencies` or `devDependencies` in `package.json` change
- If the `dependencies` or `devDependencies` in any of your workspaces change - If the `dependencies` or `devDependencies` in any of your workspaces change

View File

@@ -36,7 +36,11 @@ exports.getPackageInfo = () => {
} }
); );
if (!name) throw new Error('Unable to read project name from package.json'); if (!name) throw new Error('Unable to read project name from package.json');
return { name, workspaces };
// handle nohoist config: https://yarnpkg.com/blog/2018/02/15/nohoist/
const realWorkspaces = workspaces.packages ? workspaces.packages : workspaces;
return { name, workspaces: realWorkspaces };
}; };
exports.getPackageWorkspaces = () => { exports.getPackageWorkspaces = () => {