Skip to content

Conversation

@simonihmig
Copy link
Contributor

No description provided.

@simonihmig simonihmig changed the title [WIP] Add support for Component.$() as part of RFC386 Add support for Component.$() as part of RFC386 Jan 23, 2019
@simonihmig
Copy link
Contributor Author

@rwjblue this is ready for review now:

  • rebased
  • added assertions for not seeing deprecations. Thanks for your links, they were super helpful!
  • fixed the initial implementation, which wasn't actually working 🤦‍♂️ Uncovered by the deprecation not being silenced...
  • successfully tested on my local machine with the latest canary build. Made sure that non-silenced deprecations do make the build fail!
  • Updated the Travis config to not allow failing builds for canary (to test for no deprecations)

@simonihmig simonihmig requested a review from rwjblue January 23, 2019 11:21
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit, but looks good otherwise...

(function() {
Ember.Component.reopen({
$(sel) {
Ember.assert(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I think about it, I think we do need to use:

import { assert } from '@ember/debug';

to get the proper stripping...

IMHO, this is safe (even when we move Ember to real modules, we would still handle this specially).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good catch! Updated this.

Before:
image

After:
image

@rwjblue rwjblue merged commit c7e9bf4 into emberjs:master Jan 23, 2019
@rwjblue rwjblue added the enhancement New feature or request label Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants