Преглед на файлове

Merge pull request #6689 from jasongrout/utilsworkspaces

Support yarn configs with plain workspaces lists.
Steven Silvester преди 5 години
родител
ревизия
102dca5a95
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      buildutils/src/utils.ts

+ 2 - 1
buildutils/src/utils.ts

@@ -15,7 +15,8 @@ export function getLernaPaths(basePath = '.'): string[] {
   basePath = path.resolve(basePath);
   let baseConfig = require(path.join(basePath, 'package.json'));
   let paths: string[] = [];
-  for (let config of baseConfig.workspaces.packages) {
+  let packages = baseConfig.workspaces.packages || baseConfig.workspaces;
+  for (let config of packages) {
     paths = paths.concat(glob.sync(path.join(basePath, config)));
   }
   return paths.filter(pkgPath => {