-
-
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
Deprecate Location.create
#16835
Deprecate Location.create
#16835
Conversation
*/ | ||
export default { | ||
/** | ||
This is deprecated in favor of using the container to lookup the location |
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.
this comments has been there since 2014, I think it is time now :P
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.
AFAICT it was never actually deprecated, which means we can't remove it...
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.
thought since it is private
and has @deprecated
comment we could just drop it :P
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.
Sure, but the deprecated comment doesn’t actually mean that it is deprecated. The fact that it’s private mostly just means that we can remove after the next LTS...
|
||
if (resolvedLocation !== undefined) { | ||
location = set(this, 'location', resolvedLocation); | ||
} else { |
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.
Need to bring back this branch with a deprecation
packages/ember/index.js
Outdated
@@ -582,7 +582,6 @@ Ember.ComponentLookup = views.ComponentLookup; | |||
Ember.EventDispatcher = views.EventDispatcher; | |||
|
|||
// ****ember-routing**** | |||
Ember.Location = routing.Location; |
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.
Needs a deprecation
4e795e9
to
0de8d29
Compare
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.
The until values for the deprecations here should be 3.9.0...
deprecate( | ||
`\`Location.create\` is deprecated, use the \`container\` to register and lookup the location implementation that you need`, | ||
false, | ||
{ id: 'ember-routing.location-create', until: '3.5.0' } |
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.
Should be until 3.9.0 (master currently represents 3.5)
set to |
return getHash(this.location); | ||
if (DEBUG && HAS_NATIVE_PROXY) { | ||
/* globals Proxy Reflect */ | ||
Location._implementations = new Proxy( |
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.
Hmm, this strikes me as odd. Did we previously support Location._implementations
?
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 just put depreciation for Location.implementations = { location: MyLocation }
case, when assigned in one go
@@ -53,7 +52,9 @@ export default EmberObject.extend({ | |||
@since 1.5.1 | |||
@method getHash | |||
*/ | |||
getHash: EmberLocation._getHash, | |||
getHash() { |
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.
Why not getHash,
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.
utils/getHash
expects location object, while this class getHash
does not expect any arguments
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.
Gotcha, thank you!
@@ -288,7 +287,9 @@ export default EmberObject.extend({ | |||
|
|||
@method getHash | |||
*/ | |||
getHash: EmberLocation._getHash, | |||
getHash() { |
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.
getHash,
should work?
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.
utils/getHash
expects location object, while this class getHash
does not expect any arguments
ping |
aa0712a
to
c3c5ff1
Compare
c3c5ff1
to
2b4e4c5
Compare
Just wanted to leave a comment and mention that this is also being worked on in this PR: #19510 |
Replaced by #19510 |
No description provided.