Compare commits

..

1 Commits

Author SHA1 Message Date
f8d78d05fc fix: handle alternate workspaces config 2019-04-08 11:10:13 -07:00

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 = () => {