From 2be859de79f5551f62794e40f9b581bbefbc93f6 Mon Sep 17 00:00:00 2001 From: Marine Dunstetter Date: Thu, 4 Apr 2024 13:51:02 +0200 Subject: [PATCH] feat(virtual test-support.js): fix the checks in module-resolver --- packages/core/src/module-resolver.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/core/src/module-resolver.ts b/packages/core/src/module-resolver.ts index dbc1e5613..d10debe36 100644 --- a/packages/core/src/module-resolver.ts +++ b/packages/core/src/module-resolver.ts @@ -437,14 +437,10 @@ export class Resolver { let pkg = this.packageCache.ownerOfFile(request.fromFile); if (pkg?.root !== this.options.engines[0].root) { throw new Error( - `bug: found an import of ${request.specifier} in ${request.fromFile}, but this is not the top-level Ember app. The top-level Ember app is the only one that has support for @embroider/core/vendor. If you think something should be fixed in Embroider, please open an issue on https://github.com/embroider-build/embroider/issues.` + `bug: found an import of ${request.specifier} in ${request.fromFile}, but this is not the top-level Ember app. The top-level Ember app is the only one that has support for @embroider/core/test-support.js. If you think something should be fixed in Embroider, please open an issue on https://github.com/embroider-build/embroider/issues.` ); } - if (!pkg?.isV2Ember()) { - throw new Error(`bug: an import of ${request.specifier} in non-ember package at ${request.fromFile}`); - } - return logTransition('test-support', request, request.virtualize(resolve(pkg.root, '-embroider-test-support.js'))); }