yeoman-environment 3.12.0 → 3.13.0
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.
- package/lib/environment.js +2 -2
- package/lib/util/repository.js +3 -3
- package/lib/util/transform.js +4 -1
- package/package.json +1 -1
package/lib/environment.js
CHANGED
|
@@ -303,7 +303,7 @@ class Environment extends Base {
|
|
|
303
303
|
this.command = this.options.command;
|
|
304
304
|
|
|
305
305
|
this.runLoop = new GroupedQueue(Environment.queues, false);
|
|
306
|
-
this.sharedFs = memFs.create();
|
|
306
|
+
this.sharedFs = this.options.sharedFs || memFs.create();
|
|
307
307
|
|
|
308
308
|
// Each composed generator might set listeners on these shared resources. Let's make sure
|
|
309
309
|
// Node won't complain about event listeners leaks.
|
|
@@ -331,7 +331,7 @@ class Environment extends Base {
|
|
|
331
331
|
|
|
332
332
|
this.repository = new YeomanRepository({
|
|
333
333
|
repositoryPath: this.options.yeomanRepository,
|
|
334
|
-
|
|
334
|
+
arboristRegistry: this.options.arboristRegistry
|
|
335
335
|
});
|
|
336
336
|
|
|
337
337
|
if (!this.options.experimental) {
|
package/lib/util/repository.js
CHANGED
|
@@ -14,12 +14,12 @@ const REPOSITORY_FOLDER = '.yo-repository';
|
|
|
14
14
|
* @private
|
|
15
15
|
*/
|
|
16
16
|
class YeomanRepository {
|
|
17
|
-
constructor({repositoryPath = REPOSITORY_FOLDER,
|
|
17
|
+
constructor({repositoryPath = REPOSITORY_FOLDER, arboristRegistry} = {}) {
|
|
18
18
|
this.log = logger();
|
|
19
19
|
this.tracker = logger.tracker;
|
|
20
20
|
|
|
21
21
|
this.repositoryPath = repositoryPath;
|
|
22
|
-
this.
|
|
22
|
+
this.arboristRegistry = arboristRegistry;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -106,7 +106,7 @@ class YeomanRepository {
|
|
|
106
106
|
path: this.repositoryPath,
|
|
107
107
|
globalStyle: true,
|
|
108
108
|
log: this.tracker,
|
|
109
|
-
|
|
109
|
+
registry: this.arboristRegistry
|
|
110
110
|
});
|
|
111
111
|
return this.arb.reify(options);
|
|
112
112
|
}
|
package/lib/util/transform.js
CHANGED
|
@@ -101,7 +101,10 @@ function parseYoAttributesFile(yoAttributeFileName) {
|
|
|
101
101
|
.map(override => override.split('#')[0].trim())
|
|
102
102
|
.filter(override => override)
|
|
103
103
|
.map(override => override.split(/[\s+=]/))
|
|
104
|
-
.map(([pattern, status = 'skip']) =>
|
|
104
|
+
.map(([pattern, status = 'skip']) => {
|
|
105
|
+
pattern = pattern.startsWith('!') ? `!${path.join(absoluteDir, pattern.slice(1))}` : path.join(absoluteDir, pattern);
|
|
106
|
+
return [pattern, status];
|
|
107
|
+
})
|
|
105
108
|
);
|
|
106
109
|
}
|
|
107
110
|
|