diff --git a/src/utils.js b/src/utils.js index 50cef42..2983f62 100644 --- a/src/utils.js +++ b/src/utils.js @@ -36,7 +36,11 @@ exports.getPackageInfo = () => { } ); 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 = () => {