appsignal-javascript
appsignal-javascript copied to clipboard
Fix Ember Global deprecation
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.
@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.
@tombruijn Done and done. :+1: https://github.com/appsignal/appsignal-javascript/pull/546#issuecomment-1028125522