yeoman-environment 2.3.2 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/resolver.js +15 -3
  2. package/package.json +1 -1
package/lib/resolver.js CHANGED
@@ -75,10 +75,22 @@ resolver.findGeneratorsIn = function (searchPaths) {
75
75
  modules = modules.concat(globby.sync(
76
76
  ['generator-*'],
77
77
  {cwd: root, onlyFiles: false, absolute: true, deep: 0}
78
- ), globby.sync(
79
- ['@*/generator-*'],
80
- {cwd: root, onlyFiles: false, absolute: true, deep: 1}
81
78
  ));
79
+
80
+ // To limit recursive lookups into non-namespace folders within globby,
81
+ // fetch all namespaces in root, then search each namespace separately
82
+ // for generator modules
83
+ const namespaces = globby.sync(
84
+ ['@*'],
85
+ {cwd: root, onlyFiles: false, absolute: true, deep: 0}
86
+ );
87
+
88
+ for (const namespace of namespaces) {
89
+ modules = modules.concat(globby.sync(
90
+ ['generator-*'],
91
+ {cwd: namespace, onlyFiles: false, absolute: true, deep: 0}
92
+ ));
93
+ }
82
94
  } catch (err) {
83
95
  debug('Could not access %s (%s)', root, err);
84
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yeoman-environment",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "Handles the lifecyle and bootstrapping of generators in a specific environment",
5
5
  "homepage": "http://yeoman.io",
6
6
  "author": "Yeoman",