yeoman-environment 4.1.0 → 4.1.2
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/dist/composed-store.d.ts
CHANGED
|
@@ -22,6 +22,9 @@ export declare class ComposedStore {
|
|
|
22
22
|
uniqueBy?: undefined;
|
|
23
23
|
};
|
|
24
24
|
getUniqueByPathMap(root: string): Map<string, BaseGenerator>;
|
|
25
|
-
findFeature(featureName: string):
|
|
25
|
+
findFeature(featureName: string): Array<{
|
|
26
|
+
generatorId: string;
|
|
27
|
+
feature: any;
|
|
28
|
+
}>;
|
|
26
29
|
private findUniqueFeature;
|
|
27
30
|
}
|
package/dist/composed-store.js
CHANGED
|
@@ -58,7 +58,7 @@ export class ComposedStore {
|
|
|
58
58
|
.map(([generatorId, generator]) => {
|
|
59
59
|
const { features = generator.getFeatures?.() } = generator;
|
|
60
60
|
const feature = features?.[featureName];
|
|
61
|
-
return feature ?
|
|
61
|
+
return feature ? { generatorId, feature } : undefined;
|
|
62
62
|
})
|
|
63
63
|
.filter(Boolean);
|
|
64
64
|
}
|
|
@@ -66,9 +66,9 @@ export class ComposedStore {
|
|
|
66
66
|
const providedFeatures = this.findFeature(featureName);
|
|
67
67
|
if (providedFeatures.length > 0) {
|
|
68
68
|
if (providedFeatures.length > 1) {
|
|
69
|
-
this.log?.info?.(`Multiple ${featureName} tasks found (${providedFeatures.map((
|
|
69
|
+
this.log?.info?.(`Multiple ${featureName} tasks found (${providedFeatures.map(({ generatorId }) => generatorId).join(', ')}). Using the first.`);
|
|
70
70
|
}
|
|
71
|
-
const
|
|
71
|
+
const { generatorId, feature } = providedFeatures[0];
|
|
72
72
|
debug(`Feature ${featureName} provided by ${generatorId}`);
|
|
73
73
|
return feature;
|
|
74
74
|
}
|
|
@@ -49,7 +49,10 @@ export default class EnvironmentBase extends EventEmitter implements BaseEnviron
|
|
|
49
49
|
protected _rootGenerator?: BaseGenerator;
|
|
50
50
|
protected compatibilityMode?: false | 'v4';
|
|
51
51
|
constructor(options?: EnvironmentOptions);
|
|
52
|
-
findFeature(featureName: string):
|
|
52
|
+
findFeature(featureName: string): Array<{
|
|
53
|
+
generatorId: string;
|
|
54
|
+
feature: any;
|
|
55
|
+
}>;
|
|
53
56
|
applyTransforms(transformStreams: FilePipelineTransform[], options?: ApplyTransformsOptions): Promise<void>;
|
|
54
57
|
/**
|
|
55
58
|
* Get a single generator from the registered list of generators. The lookup is
|
package/dist/environment-base.js
CHANGED
|
@@ -611,7 +611,13 @@ export default class EnvironmentBase extends EventEmitter {
|
|
|
611
611
|
this.queueTask('environment:conflicts', async () => {
|
|
612
612
|
debug('Adding queueCommit listener');
|
|
613
613
|
// Conflicter can change files add listener before commit task.
|
|
614
|
-
|
|
614
|
+
const changedFileHandler = (file) => {
|
|
615
|
+
if (isFilePending(file)) {
|
|
616
|
+
queueCommit();
|
|
617
|
+
this.sharedFs.removeListener('change', changedFileHandler);
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
this.sharedFs.on('change', changedFileHandler);
|
|
615
621
|
debug('Running conflicts');
|
|
616
622
|
const { customCommitTask = async () => commitSharedFsTask(this) } = this.composedStore;
|
|
617
623
|
if (typeof customCommitTask === 'function') {
|