Ember-simple-auth: Deprecation warnings on Ember 3.9

Created on 2 Apr 2019  路  18Comments  路  Source: simplabs/ember-simple-auth

On Ember 3.9:

DEPRECATION: Setting a computed property as volatile has been deprecated. Instead, consider using a native getter with native class syntax. [deprecation id: computed-property.volatile] See https://emberjs.com/deprecations/v3.x#toc_computed-property-volatile for more details.

enhancement

Most helpful comment

the same happens to me

All 18 comments

Yes, this should be refactored 馃憤

Looking at https://github.com/emberjs/rfcs/blob/master/text/0370-deprecate-computed-volatile.md it suggests that fixing this deprecation will require transitioning to native classes. However, after looking at the three places volatiles are used in this addon, I think they can just be turned into function calls?

This would be a public API change on BaseAuthenticator.tokenRefreshOffset, the other two places are in private APIs.

It looks like there's also a deprecation warning from computed-property.override due to _isFastBoot sometimes being set to false but having a default initialisation of reads('_fastBoot.isFastBoot').

Hitting this as well. Just installed the addon and got this deprecation.

the same happens to me

Hi, I'm getting two deprecations mentioned in the original post and another one relating to _isFastBoot.

DEPRECATION: The <(unknown):ember196>#_isFastBoot computed property was just overriden. This removes the computed property and replaces it with a plain value, and has been deprecated. If you want this behavior, consider defining a setter which does it manually. [deprecation id: computed-property.override] See https://emberjs.com/deprecations/v3.x#toc_computed-property-override for more details.

Thanks.

Excited to see these being addressed, is there a status on when ESA will have a release with these fixes?

having the same issue with the deprecations - any news on this?

There's another source of deprecations in DS.Errors. After upgrading, I started to get warnings like The <DS.Errors:ember393>#content computed property was just overriden.. I looked at the DS.Errors implementation and found that content is defined as a computed property for some obscure reasons but the _remove method sets is directly.

@ryedeer I don't think what you're describing is related to ESA though?

@marcoow Oh, my bad. I had another tab with Ember.Data issues open and I typed this comment into this tab instead. That was my mistake. I'm very sorry for that.

don't worry - just making sure things don't become confusing ;)

1885 and #1886 should resolve this issue once merged

would be great if there's a release on npm. thanks!

@thstarshine there seems to be an issue with travis that prevented it from releasing to npm.

You can use the GitHub tag directly in the mean time.

Using Yarn:
yarn add --dev github:simplabs/ember-simple-auth#1.9.1

Using npm:
npm install --save-dev github:simplabs/ember-simple-auth#1.9.1

You should only do this if you plan to watch the releases closely and to change it back once the release issue has been resolved, otherwise you'll never receive updates.

As far as I can tell the volatile deprecation warning was fixed in 1.9.1 but the _isFastBoot warning is still around. Just tested on 1.9.2.

DEPRECATION: The <(unknown):ember196>#_isFastBoot computed property was just overriden. This removes the computed property and replaces it with a plain value, and has been deprecated. If you want this behavior, consider defining a setter which does it manually. [deprecation id: computed-property.override] See https://emberjs.com/deprecations/v3.x#toc_computed-property-override for more details.

Should this issue be reopened?

@krachtstefan can you open a separate one for that? I was not aware of that warning yet. Where/How does it trigger?

Sure, I just did that: https://github.com/simplabs/ember-simple-auth/issues/1908

Thanks for creating and maintaining this repository!

Was this page helpful?
0 / 5 - 0 ratings