fix: handle alternate workspaces config

This commit is contained in:
2019-04-08 11:10:13 -07:00
parent 6e2288f157
commit f8d78d05fc

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