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.
Files changed (2) hide show
  1. package/dist/helpers.js +7 -5
  2. 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' && GeneratorOrNamespace.startsWith('.')) {
261
- if (!this.importMeta) {
262
- throw new Error('importMeta is required to resolve relative generator paths');
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 = this.importMeta.resolve(GeneratorOrNamespace);
265
- if (URL.canParse(GeneratorOrNamespace)) {
267
+ if (GeneratorOrNamespace.startsWith('file://')) {
266
268
  GeneratorOrNamespace = fileURLToPath(GeneratorOrNamespace);
267
269
  }
268
270
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yeoman-test",
3
- "version": "11.4.1",
3
+ "version": "11.4.2",
4
4
  "description": "Test utilities for Yeoman generators",
5
5
  "keywords": [
6
6
  "yeoman",