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

[Chore]: remove deprecation for DEPRECATE_MODEL_DATA #7338

Merged
merged 3 commits into from
Sep 27, 2020
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
1 change: 0 additions & 1 deletion packages/-ember-data/node-tests/fixtures/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ module.exports = {
'(private) @ember-data/model Model#_notifyProperties',
'(private) @ember-data/model Model#create',
'(private) @ember-data/model Model#currentState',
'(private) @ember-data/model Model#data',
'(private) @ember-data/model Model#recordData',
'(private) @ember-data/model Model#send',
'(private) @ember-data/model Model#transitionTo',
Expand Down
24 changes: 0 additions & 24 deletions packages/model/addon/-private/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Ember from 'ember';
import { RECORD_DATA_ERRORS, RECORD_DATA_STATE, REQUEST_SERVICE } from '@ember-data/canary-features';
import {
DEPRECATE_EVENTED_API_USAGE,
DEPRECATE_MODEL_DATA,
DEPRECATE_MODEL_TOJSON,
DEPRECATE_RECORD_LIFECYCLE_EVENT_METHODS,
} from '@ember-data/private-build-infra/deprecations';
Expand Down Expand Up @@ -1296,29 +1295,6 @@ if (DEPRECATE_EVENTED_API_USAGE) {
});
}

if (DEPRECATE_MODEL_DATA) {
/**
@property data
@private
@deprecated
@type {Object}
*/
Object.defineProperty(Model.prototype, 'data', {
configurable: false,
get() {
deprecate(
`Model.data was private and it's use has been deprecated. For public access, use the RecordData API or iterate attributes`,
false,
{
id: 'ember-data:Model.data',
until: '3.9',
}
);
return recordDataFor(this)._data;
},
});
}

if (DEPRECATE_MODEL_TOJSON) {
/**
Use [JSONSerializer](JSONSerializer.html) to
Expand Down
2 changes: 0 additions & 2 deletions packages/private-build-infra/addon/current-deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ export default {
DEPRECATE_CATCH_ALL: '99.0',
DEPRECATE_EVENTED_API_USAGE: '3.12',
DEPRECATE_RECORD_LIFECYCLE_EVENT_METHODS: '3.12',
DEPRECATE_MODEL_DATA: '3.8',
DEPRECATE_MODEL_TOJSON: '3.15',
DEPRECATE_LEGACY_TEST_HELPER_SUPPORT: '3.15',
DEPRECATE_LEGACY_TEST_REGISTRATIONS: '3.15',
DEPRECATE_DEFAULT_SERIALIZER: '3.15',
DEPRECATE_DEFAULT_ADAPTER: '3.15',
DEPRECATE_METHOD_CALLS_ON_DESTROY_STORE: '3.15',
DEPRECATE_MISMATCHED_INVERSE_RELATIONSHIP_DATA: '3.12',
DEPRECATE_SERIALIZER_QUERY_RECORD_ARRAY_RESPONSE: '3.4',
DEPRECATE_BELONGS_TO_REFERENCE_PUSH: '3.16',
DEPRECATE_REFERENCE_INTERNAL_MODEL: '3.19',
};
4 changes: 0 additions & 4 deletions packages/private-build-infra/addon/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@ function deprecationState(deprecationName: keyof typeof CURRENT_DEPRECATIONS): b
export const DEPRECATE_CATCH_ALL = deprecationState('DEPRECATE_CATCH_ALL');
export const DEPRECATE_EVENTED_API_USAGE = deprecationState('DEPRECATE_EVENTED_API_USAGE');
export const DEPRECATE_RECORD_LIFECYCLE_EVENT_METHODS = deprecationState('DEPRECATE_RECORD_LIFECYCLE_EVENT_METHODS');
export const DEPRECATE_MODEL_DATA = deprecationState('DEPRECATE_MODEL_DATA');
export const DEPRECATE_MODEL_TOJSON = deprecationState('DEPRECATE_MODEL_TOJSON');
export const DEPRECATE_LEGACY_TEST_HELPER_SUPPORT = deprecationState('DEPRECATE_LEGACY_TEST_HELPER_SUPPORT');
export const DEPRECATE_LEGACY_TEST_REGISTRATIONS = deprecationState('DEPRECATE_LEGACY_TEST_REGISTRATIONS');
export const DEPRECATE_DEFAULT_SERIALIZER = deprecationState('DEPRECATE_DEFAULT_SERIALIZER');
export const DEPRECATE_DEFAULT_ADAPTER = deprecationState('DEPRECATE_DEFAULT_ADAPTER');
export const DEPRECATE_METHOD_CALLS_ON_DESTROY_STORE = deprecationState('DEPRECATE_METHOD_CALLS_ON_DESTROY_STORE');
export const DEPRECATE_SERIALIZER_QUERY_RECORD_ARRAY_RESPONSE = deprecationState(
'DEPRECATE_SERIALIZER_QUERY_RECORD_ARRAY_RESPONSE'
);
export const DEPRECATE_MISMATCHED_INVERSE_RELATIONSHIP_DATA = deprecationState(
'DEPRECATE_MISMATCHED_INVERSE_RELATIONSHIP_DATA'
);
Expand Down