yeoman-test 11.4.1 → 11.4.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/helpers.js +7 -5
- package/package.json +1 -1
package/dist/helpers.js
CHANGED
|
@@ -257,12 +257,14 @@ export class YeomanTest {
|
|
|
257
257
|
const contextSettings = cloneDeep(this.settings ?? {});
|
|
258
258
|
const generatorOptions = cloneDeep(this.generatorOptions ?? {});
|
|
259
259
|
const RunContext = this.getRunContextType();
|
|
260
|
-
if (typeof GeneratorOrNamespace === 'string'
|
|
261
|
-
if (
|
|
262
|
-
|
|
260
|
+
if (typeof GeneratorOrNamespace === 'string') {
|
|
261
|
+
if (GeneratorOrNamespace.startsWith('.')) {
|
|
262
|
+
if (!this.importMeta) {
|
|
263
|
+
throw new Error('importMeta is required to resolve relative generator paths');
|
|
264
|
+
}
|
|
265
|
+
GeneratorOrNamespace = this.importMeta.resolve(GeneratorOrNamespace);
|
|
263
266
|
}
|
|
264
|
-
GeneratorOrNamespace
|
|
265
|
-
if (URL.canParse(GeneratorOrNamespace)) {
|
|
267
|
+
if (GeneratorOrNamespace.startsWith('file://')) {
|
|
266
268
|
GeneratorOrNamespace = fileURLToPath(GeneratorOrNamespace);
|
|
267
269
|
}
|
|
268
270
|
}
|