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

Add deprecation for the Ember Global #19457

Merged
merged 1 commit into from Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/@ember/-internals/bootstrap/index.js
@@ -1,5 +1,6 @@
import require from 'require';
import { context } from '@ember/-internals/environment';
import { deprecate } from '@ember/debug';

(function () {
let Ember;
Expand All @@ -13,6 +14,20 @@ import { context } from '@ember/-internals/environment';
Ember = require('ember').default;
}

deprecate(
'Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead.',
false,
{
id: 'ember-global',
until: '4.0.0',
url: 'https://deprecations.emberjs.com/v3.x/#toc_ember-global',
for: 'ember-source',
since: {
enabled: '3.27.0',
},
}
);

return Ember;
},
});
Expand Down
Expand Up @@ -12,7 +12,7 @@ export default class DefaultResolverApplicationTestCase extends AbstractApplicat
let application;
expectDeprecation(() => {
application = this.application = Application.create(this.applicationOptions);
}, /Using the globals resolver is deprecated/);
}, /(Using the globals resolver is deprecated|Usage of the Ember Global is deprecated)/);

// If the test expects a certain number of assertions, increment that number
let { assert } = QUnit.config.current;
Expand Down