diff --git a/shared/getWorkspacesPackages.js b/shared/getWorkspacesPackages.js index 67e6bf4f..7656cef5 100644 --- a/shared/getWorkspacesPackages.js +++ b/shared/getWorkspacesPackages.js @@ -26,7 +26,11 @@ function getWorkspacesPackages(getRoot = true) { workspacesArray.push(...workspaces.packages); } - return [root, ...workspacesArray.flatMap(getPackages)].filter(Boolean); + const packages = workspacesArray + .map(getPackages) + .reduce((array, value) => array.concat(value), []); + + return [root, ...packages].filter(Boolean); } /**