yeoman-environment 3.11.1 → 3.12.1
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/util/transform.js +6 -3
- package/package.json +1 -1
package/lib/util/transform.js
CHANGED
|
@@ -5,6 +5,7 @@ const findUp = require('find-up');
|
|
|
5
5
|
const minimatch = require('minimatch');
|
|
6
6
|
const {transform, passthrough, filter} = require('p-transform');
|
|
7
7
|
const OOOTransform = require('./out-of-order-transform');
|
|
8
|
+
const {clearFileState} = require('mem-fs-editor/lib/state.js');
|
|
8
9
|
|
|
9
10
|
const {Minimatch} = minimatch;
|
|
10
11
|
|
|
@@ -100,7 +101,10 @@ function parseYoAttributesFile(yoAttributeFileName) {
|
|
|
100
101
|
.map(override => override.split('#')[0].trim())
|
|
101
102
|
.filter(override => override)
|
|
102
103
|
.map(override => override.split(/[\s+=]/))
|
|
103
|
-
.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
|
+
})
|
|
104
108
|
);
|
|
105
109
|
}
|
|
106
110
|
|
|
@@ -198,8 +202,7 @@ function createConflicterStatusTransform() {
|
|
|
198
202
|
}
|
|
199
203
|
|
|
200
204
|
if (action === 'skip') {
|
|
201
|
-
|
|
202
|
-
delete file.isNew;
|
|
205
|
+
clearFileState(file);
|
|
203
206
|
return undefined;
|
|
204
207
|
}
|
|
205
208
|
return file;
|