Skip to content

Commit

Permalink
Merge pull request #1717 from embroider-build/fix-ember-beta
Browse files Browse the repository at this point in the history
Always load ember-testing package eagerly
  • Loading branch information
ef4 authored Dec 13, 2023
2 parents 8ff8091 + e5cb780 commit cf50361
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/compat/src/compat-adapters/ember-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,16 @@ export default class extends V1Addon {
meta['implicit-modules'] = [];
}
meta['implicit-modules'].push('./ember/index.js');

if (!meta['implicit-test-modules']) {
meta['implicit-test-modules'] = [];
// before 5.6, Ember uses the AMD loader to decide if it's test-only parts
// are present, so we must ensure they're registered. After that it's
// enough to evaluate ember-testing, which @embroider/core is hard-coded
// to do in the backward-compatible tests bundle.
if (!satisfies(this.packageJSON.version, '>= 5.6.0-alpha.0', { includePrerelease: true })) {
if (!meta['implicit-test-modules']) {
meta['implicit-test-modules'] = [];
}
meta['implicit-test-modules'].push('./ember-testing/index.js');
}
meta['implicit-test-modules'].push('./ember-testing/index.js');
}
return meta;
}
Expand Down
1 change: 1 addition & 0 deletions packages/compat/src/compat-app-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@ export class CompatAppBuilder {
// packagers to understand. It's better to express it here as a direct
// module dependency.
let eagerModules: string[] = [
'ember-testing',
explicitRelative(dirname(myName), this.topAppJSAsset(appFiles, prepared).relativePath),
];

Expand Down

0 comments on commit cf50361

Please sign in to comment.