fix: handle alternate workspaces config
This commit is contained in:
@@ -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 = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user