-
-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@ember/test-helpers 2.8.0 breaks embroider-optimized scenario #1220
Comments
The problem is not this line: const INVOKE_PROVIDED_COMPONENT = hbs`<this.ProvidedComponent />`; It's this one: const DYNAMIC_INVOKE_PROVIDED_COMPONENT = hbs`{{component this.ProvidedComponent}}`; It's used in the Ember < 3.25 case here: ember-test-helpers/addon-test-support/@ember/test-helpers/setup-rendering-context.ts Lines 173 to 185 in 02360aa
But we can do that case differently. This is what |
@ef4 As far as I can tell, the code you linked is roughly the same as what Making I can imagine haxxxors to work around the assertion, basically something that breaks the detection here but that seems really bad/annoying. I guess the right thing is probably to revert the changes (essentially re-release 2.7.0), and wait for our major release in a few weeks. |
Had to downgrade @ember/test-helpers to 2.7.x emberjs/ember-test-helpers#1220
I'm not suggesting using the template helper ensure-safe-component to avoid tripping the detection. I'm suggesting using the JS utility so that angle bracket invocation (which embroider always considers safe) works on ember < 3.25. If you don't want to add the dependency, it's easy enough to copy the implementation of ensureSafeComponent into here. |
The specific feature I'm talking about is converting a component class to a curried component instance. |
there is emberjs/ember-test-helpers#1220 which fails embroider-optimized scenario hence we can rollback this change once it resolved
FWIW, I noticed that 2.8.0 already added #1221 should unblock folks leveraging Embroider optimized builds, if we get folks raising issues RE: Node 10 we can fix by inlining the |
That fix landed and was released in 2.8.1 |
2.8.0 causes following issue:
Can be seen in https://github.com/tracked-tools/tracked-built-ins/runs/6480181579?check_suite_focus=true
I believe Embroider complaints about this line:
https://github.com/emberjs/ember-test-helpers/blob/master/addon-test-support/@ember/test-helpers/setup-rendering-context.ts#L27
Introduced in https://github.com/emberjs/ember-test-helpers/pull/1211/files#diff-be714ad7ae4501cdbd6b1b7ff97b6e0e5b7c73192119f2e0758b5354d72fcd37
Due to complexity of the setup, this does not seem straightforward fix to me.
Seem like one of the options is to configure
packageRules
, but seem not possible from the addon.cc @chriskrycho
The text was updated successfully, but these errors were encountered: