Skip to content

Commit 4e7cdc0

Browse files
NullVoxPopuliclaude
andcommitted
Bump @ember/test-helpers to ^4 in ember4 try scenarios
`min-supported` and `ember-lts-4.12` were failing in vite build with: [vite]: Rollup failed to resolve import "require" from ".../@ember/test-helpers/-internal/build-registry.js" The line responsible is at the top of `@ember/[email protected]/addon-test-support/@ember/test-helpers/-internal/build-registry.ts`: import require, { has } from 'require'; This is the AMD `require` module provided by classic Ember's loader.js. When vite/rollup processes this file (after `@embroider/compat` rewrites it into the addon's `rewritten-packages` tree), there is no `require` module to resolve and the build fails. `@ember/[email protected]` dropped that import and re-implemented build-registry on top of `@ember/-internals/container` and `./-owner-mixin-imports.js`, so it no longer depends on a loader.js-style `require`. Its peer is `ember-source >= 4.0.0`, which satisfies both the min-supported scenario (~4.2.0) and ember-lts-4.12. `ember-qunit@^8.0.0` peers `@ember/test-helpers: >=3.0.3`, so the bump does not violate it. Also bump `@ember/test-waiters` to `^3.1.0` to stay within the window expected by test-helpers 4. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 98674b0 commit 4e7cdc0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test-app/.try.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ module.exports = async function (defaults) {
1717
};
1818

1919
const ember4 = {
20-
'@ember/test-helpers': '^3.2.1',
21-
'@ember/test-waiters': '^3.0.0',
20+
'@ember/test-helpers': '^4.0.0',
21+
'@ember/test-waiters': '^3.1.0',
2222
'@embroider/compat': '^4.0.3',
2323
'ember-qunit': '^8.0.0',
2424
'ember-cli': '~4.12.0',

0 commit comments

Comments
 (0)