Fix [ember-debug.deprecate-options-missing] on rejectWithXhr deprecationAlias #1170

Merged
merged 1 commit into from Jan 10, 2017

Projects

None yet

2 participants

@davelowensohn
Contributor
davelowensohn commented Jan 6, 2017 edited

Trivial, but the deprecation of rejectWithXhr in #1118 itself caused a deprecation error in the console. This fixes that.

Before:
image

After:
image

@marcoow

Good catch :)

We should ensure consistent deprecation IDs though.

addon/authenticators/devise.js
@@ -78,7 +78,10 @@ export default BaseAuthenticator.extend({
@deprecated DeviseAuthenticator/rejectWithResponse:property
@public
*/
- rejectWithXhr: computed.deprecatingAlias('rejectWithResponse'),
+ rejectWithXhr: computed.deprecatingAlias('rejectWithResponse', {
+ id: 'esa-deprecate.reject-with-xhr',
@marcoow
marcoow Jan 9, 2017 Member

We're using deprecation ids following the pattern ember-simple-auth.<topic>.<id> generally, see e.g. https://github.com/simplabs/ember-simple-auth/blob/726e59bb3c966a2f5cab5075a510a165f8c7a46c/addon/configuration.js#L91

@@ -141,7 +141,10 @@ export default BaseAuthenticator.extend({
@deprecated OAuth2PasswordGrantAuthenticator/rejectWithResponse:property
@public
*/
- rejectWithXhr: computed.deprecatingAlias('rejectWithResponse'),
+ rejectWithXhr: computed.deprecatingAlias('rejectWithResponse', {
+ id: 'esa-deprecate.reject-with-xhr',
@marcoow
marcoow Jan 9, 2017 Member

We're using deprecation ids following the pattern ember-simple-auth.<topic>.<id> generally, see e.g. https://github.com/simplabs/ember-simple-auth/blob/726e59bb3c966a2f5cab5075a510a165f8c7a46c/addon/configuration.js#L91

@davelowensohn
Contributor

Thanks, looks like I got a little trigger-happy. :) Changed id to ember-simple-auth.authenticator.reject-with-xhr.

@marcoow marcoow added the enhancement label Jan 10, 2017
@marcoow marcoow added this to the 1.2 milestone Jan 10, 2017
@marcoow marcoow merged commit 0ee3373 into simplabs:master Jan 10, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@marcoow
Member
marcoow commented Jan 10, 2017

awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment