yeoman-environment 3.11.0 → 3.12.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/resolver.js +1 -1
- package/lib/util/esm.js +2 -2
- package/lib/util/transform.js +2 -2
- package/package.json +1 -1
package/lib/resolver.js
CHANGED
|
@@ -66,7 +66,7 @@ resolver.lookup = function (options) {
|
|
|
66
66
|
const {registerToScope, lookups = this.lookups} = options;
|
|
67
67
|
options = {
|
|
68
68
|
// Js generators should be after, last will override registered one.
|
|
69
|
-
filePatterns: lookups.flatMap(prefix => [`${prefix}/*/index.ts`, `${prefix}/*/index.js`, `${prefix}/*/index.cjs`, `${prefix}/*/index.mjs`]),
|
|
69
|
+
filePatterns: lookups.flatMap(prefix => [`${prefix}/*/index.ts`, `${prefix}/*/index.cts`, `${prefix}/*/index.mts`, `${prefix}/*/index.js`, `${prefix}/*/index.cjs`, `${prefix}/*/index.mjs`]),
|
|
70
70
|
filterPaths: false,
|
|
71
71
|
packagePatterns: ['generator-*'],
|
|
72
72
|
reverse: !options.singleResult,
|
package/lib/util/esm.js
CHANGED
|
@@ -3,10 +3,10 @@ const {pathToFileURL} = require('url');
|
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
requireOrImport(fileToImport) {
|
|
6
|
-
if (path.extname(fileToImport)
|
|
6
|
+
if (['.cjs', 'cts'].includes(path.extname(fileToImport))) {
|
|
7
7
|
return require(fileToImport);
|
|
8
8
|
}
|
|
9
|
-
if (path.extname(fileToImport)
|
|
9
|
+
if (['.mjs', '.mts'].includes(path.extname(fileToImport))) {
|
|
10
10
|
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
|
11
11
|
return import(pathToFileURL(fileToImport));
|
|
12
12
|
}
|
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
|
|
|
@@ -198,8 +199,7 @@ function createConflicterStatusTransform() {
|
|
|
198
199
|
}
|
|
199
200
|
|
|
200
201
|
if (action === 'skip') {
|
|
201
|
-
|
|
202
|
-
delete file.isNew;
|
|
202
|
+
clearFileState(file);
|
|
203
203
|
return undefined;
|
|
204
204
|
}
|
|
205
205
|
return file;
|