-
-
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
Rename of Ember.Router.router to Ember.Router.routerMicrolib #14919
Conversation
@@ -1563,4 +1564,9 @@ function representEmptyRoute(liveRoutes, defaultParentState, route) { | |||
} | |||
} | |||
|
|||
deprecateProperty(EmberRouter.prototype, 'router', 'routerMicrolib', { | |||
id: 'ember-router.router', | |||
until: '2.16' |
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.
Can you add the url
property here (from the entry you are adding to the deprecations page on the website)?
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.
I will definitely add once it's done!
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.
qq: how do i derive the URL from the section I added to the website? I see that there's a URL with a hash pointing to http://emberjs.com/deprecations/v2.x/#toc_*
, but I'm not sure how it generates that URL.
I've been trying to run bundler for the website, but keep getting errors installing deps...
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.
I merged the deprecation PR so that the site was auto-published:
http://emberjs.com/deprecations/v2.x/#toc_ember-router-router-renamed-to-ember-router-routermicrolib
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.
👍
let router = createRouter(); | ||
|
||
expectDeprecation(function() { | ||
equal(router.router, router.routerMicrolib); |
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.
Can you tweak to assert.equal
here?
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.
Yessir!
LGTM, can you squash commits down? |
Should it be prefixed with an underscore? |
@krisselden - Great point, and I can't believe I didn't think of that. Yes, I think we should underscore it so that it is @scalvert - Thoughts? |
Yes to squashing. Yes to prefix. Good call @krisselden! |
fa0286a
to
ad82fa9
Compare
@rwjblue @krisselden renamed |
Awesome, thank you @scalvert! |
This PR should likely have created a accessor that emits a deprecation for the Some (debug related) workflows relied on Also #15235 Although this was private, ensuring we have a helpful error when accessing the property is most likely appropriate |
@stefanpenner - Please feel free to review the diff of this PR, it actually adds tests for exactly that scenario. |
The is an intermediate clean-up PR en route to finishing the router service RFC (see what I did there 👀 ).
Related PRs:
emberjs/website#2806
emberjs/website#2808
Reviewers
@rwjblue @locks @ef4
Changes
Ember.router
toEmber.routerMicrolib
to disambiguate which router we're referring to. This will help avoid code likethis.router.router...
How to test drive
ember serve
and ensure tests pass for both Enable Opt Features enabled and disabled