Skip to content

Commit

Permalink
feat(virtual test-support.js): fix the checks in module-resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueCutOfficial committed Apr 4, 2024
1 parent 99f7837 commit 2be859d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/core/src/module-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')));
}

Expand Down

0 comments on commit 2be859d

Please sign in to comment.