From f8d78d05fc9e4d65fac22bf6068ce10f8628ef8f Mon Sep 17 00:00:00 2001 From: joe fleming Date: Mon, 8 Apr 2019 11:10:13 -0700 Subject: [PATCH] fix: handle alternate workspaces config --- src/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = () => {