-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX canary] Restore/deprecate outlet TemplateFactory
support
#20577
Conversation
9b2b615
to
2c528bb
Compare
Fixes #20576 The test is a bit misleading in that, this is not actually restored to support the very old 1.6.0 version of ember-test-helpers. The issue is that while that particular spot of the invalid usage was fixed in 1.6.1, other similarly invalid patterns have popped up in the code since then. However, the old tests was probably a close enough approximation of the general problem. This is not to avoid fixing the actual issue, but it's just that it was very difficult for us to support for a short time, and there may be other code that copied the same invalid pattern elsewhere. See also emberjs/ember-test-helpers#1445
2c528bb
to
3384cc1
Compare
let templateFullName = `template:-undertest-${templateId}`; | ||
owner.register(templateFullName, template); | ||
|
||
let outletState = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is every property in here needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, pretty much, the actual thing is typed in TypeScript in the runtime code (it's the interface you commented on last time)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But also, the point was to replicate the same code in test helpers, which I gather at one point this was probably close to verbatim, and it's still not that far off today
Fixes #20576
The test is a bit misleading in that, this is not actually restored to support the very old 1.6.0 version of ember-test-helpers. The issue is that while that particular spot of the invalid usage was fixed in 1.6.1, other similarly invalid patterns have popped up in the code since then. However, the old tests was probably a close enough approximation of the general problem.
This is not to avoid fixing the actual issue, but it's just that it was very difficult for us to support for a short time, and there may be other code that copied the same invalid pattern elsewhere.
We could probably backport this to all the way up to LTS if we want with minimal effort, since the code I brought back is basically the same as what was previously there, just with the deprecation.
See also emberjs/ember-test-helpers#1445