diff --git a/addon/-private/global.js b/addon/-private/global.js deleted file mode 100644 index be3d0e4a4c1..00000000000 --- a/addon/-private/global.js +++ /dev/null @@ -1,19 +0,0 @@ -/* globals global, window, self */ - -// originally from https://github.com/emberjs/ember.js/blob/c0bd26639f50efd6a03ee5b87035fd200e313b8e/packages/ember-environment/lib/global.js - -// from lodash to catch fake globals -function checkGlobal(value) { - return (value && value.Object === Object) ? value : undefined; -} - -// element ids can ruin global miss checks -function checkElementIdShadowing(value) { - return (value && value.nodeType === undefined) ? value : undefined; -} - -// export real global -export default checkGlobal(checkElementIdShadowing(typeof global === 'object' && global)) || - checkGlobal(typeof self === 'object' && self) || - checkGlobal(typeof window === 'object' && window) || - new Function('return this')(); // eval outside of strict mode diff --git a/addon/-private/index.js b/addon/-private/index.js index 8ffd4115426..0c529fcd05d 100644 --- a/addon/-private/index.js +++ b/addon/-private/index.js @@ -27,8 +27,6 @@ export { getOwner, modelHasAttributeOrRelationshipNamedType } from './utils'; export { default as coerceId } from './system/coerce-id'; export { default as parseResponseHeaders } from './utils/parse-response-headers'; -// should be private ? -export { default as global } from './global'; export { default as isEnabled } from './features'; // `ember-data-model-fragments` relies on `RootState` and `InternalModel` export { default as RootState } from './system/model/states'; diff --git a/addon/index.js b/addon/index.js index 397f90fb601..012352ad391 100644 --- a/addon/index.js +++ b/addon/index.js @@ -1,6 +1,5 @@ import EmberError from '@ember/error'; import Ember from "ember"; -import { deprecate } from '@ember/debug'; /** Ember Data @@ -22,7 +21,6 @@ import { BuildURLMixin, belongsTo, hasMany, - global, Errors, RootState, Model, @@ -145,18 +143,4 @@ Object.defineProperty(DS, 'normalizeModelName', { value: normalizeModelName }); -Object.defineProperty(global, 'DS', { - configurable: true, - get() { - deprecate( - 'Using the global version of DS is deprecated. Please either import ' + - 'the specific modules needed or `import DS from \'ember-data\';`.', - false, - { id: 'ember-data.global-ds', until: '3.0.0' } - ); - - return DS; - } -}); - export default DS;