Commit 4e7cdc0
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments