Skip to content

Commit

Permalink
Always load ember-testing package eagerly
Browse files Browse the repository at this point in the history
In ember-source 5.6 (now in beta), we refactored the way Ember and its test-only pieces find each other to no longer be dependent on the AMD loader.

But this mean it's no longer sufficient to `define()` *and not evaluate* the `ember-testing` package in order to install the test support. It must actually get evaluted first.

Note that this bug does not manifest on embroider `main`, because there implicit-test-modules are eagerly evaluated. This is only a problem on stable, when using `staticEmberSource: true`.
  • Loading branch information
ef4 committed Dec 12, 2023
1 parent 496ab87 commit 97c34a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions packages/compat/src/compat-adapters/ember-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ export default class extends V1Addon {
meta['implicit-modules'] = [];
}
meta['implicit-modules'].push('./ember/index.js');

if (!meta['implicit-test-modules']) {
meta['implicit-test-modules'] = [];
}
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 97c34a4

Please sign in to comment.