Skip to content
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

Fix Ember Global deprecation #552

Open
unflxw opened this issue Jan 27, 2022 · 2 comments
Open

Fix Ember Global deprecation #552

unflxw opened this issue Jan 27, 2022 · 2 comments
Labels

Comments

@unflxw
Copy link
Contributor

unflxw commented Jan 27, 2022

From #546:

DEPRECATION: Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead. [deprecation id: ember-global] See https://deprecations.emberjs.com/v3.x/#toc_ember-global for more details.

Accessing the window.Ember global variable raises a deprecation warning in version 3.27, and it is not possible in version 4.0. Our Ember integration exposes an installErrorHandler function, which takes an Appsignal instance and an Ember instance as arguments; if no Ember instance is provided, it uses window.Ember as a default value.

As a workaround for this issue, as documented, users can manually import Ember and pass it as a second argument:

import Appsignal from '@appsignal/javascript';
import Ember from 'ember';
import { installErrorHandler } from '@appsignal/ember';

let appsignal = new Appsignal(...);

installErrorHandler(appsignal, Ember);

However, our integration should be updated to import Ember to use it as the default value for its second argument.

@tombruijn
Copy link
Member

@unflxw are you still actively working on this? If not, can you update the user who reported the issue about the latest status? You move it to the backlog if we're going to revisit this later.

@unflxw
Copy link
Contributor Author

unflxw commented Feb 2, 2022

@tombruijn Done and done. 👍 #546 (comment)

@unflxw unflxw removed their assignment Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants