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

[BUGFIX beta] Bring back (with deprecation) Ember.EXTEND_PROTOTYPES. #16514

Merged
merged 1 commit into from
Apr 13, 2018
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/ember/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ import Resolver from '@ember/application/globals-resolver';
import ApplicationInstance from '@ember/application/instance';
import Engine from '@ember/engine';
import EngineInstance from '@ember/engine/instance';
import { deprecate } from 'ember-debug';

// ****ember-environment****

Expand All @@ -131,6 +132,17 @@ Object.defineProperty(Ember, 'lookup', {
enumerable: false,
});

Object.defineProperty(Ember, 'EXTEND_PROTOTYPES', {
enumerable: false,
get() {
deprecate(
'Accessing Ember.EXTEND_PROTOTYPES is deprecated, please migrate to Ember.ENV.EXTEND_PROTOTYPES'
);

return ENV.EXTEND_PROTOTYPES;
},
});

// ****@ember/application****
Ember.getOwner = getOwner;
Ember.setOwner = setOwner;
Expand Down
10 changes: 10 additions & 0 deletions packages/ember/tests/reexports_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ moduleFor(
['@test Ember.String.isHTMLSafe exports correctly'](assert) {
confirmExport(Ember, assert, 'String.isHTMLSafe', 'ember-glimmer', 'isHTMLSafe');
}

['@test Ember.EXTEND_PROTOTYPES is present (but deprecated)'](assert) {
expectDeprecation(() => {
assert.strictEqual(
Ember.ENV.EXTEND_PROTOTYPES,
Ember.EXTEND_PROTOTYPES,
'Ember.EXTEND_PROTOTYPES exists'
);
}, /EXTEND_PROTOTYPES is deprecated/);
}
}
);

Expand Down