Skip to content

Commit

Permalink
update deprecation references (#5283)
Browse files Browse the repository at this point in the history
  • Loading branch information
efx authored and bmac committed Dec 18, 2017
1 parent 860594b commit 91c533c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion addon/-private/system/references/belongs-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ BelongsToReference.prototype.push = function(objectOrPromise) {
if (isEnabled('ds-overhaul-references')) {
deprecate("BelongsToReference#push(DS.Model) is deprecated. Update relationship via `model.set('relationshipName', value)` instead.", false, {
id: 'ds.references.belongs-to.push-record',
until: '3.0'
until: '4.0.0'
});
}
record = data;
Expand Down
4 changes: 2 additions & 2 deletions addon/-private/system/references/has-many.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ HasManyReference.prototype.push = function(objectOrPromise) {
if (isEnabled("ds-overhaul-references")) {
deprecate("HasManyReference#push(array) is deprecated. Push a JSON-API document instead.", !Array.isArray(payload), {
id: 'ds.references.has-many.push-array',
until: '3.0'
until: '4.0.0'
});
}

Expand All @@ -258,7 +258,7 @@ HasManyReference.prototype.push = function(objectOrPromise) {
if (isEnabled('ds-overhaul-references')) {
deprecate("HasManyReference#push() expects a valid JSON-API document.", !useLegacyArrayPush, {
id: 'ds.references.has-many.push-invalid-json-api',
until: '3.0'
until: '4.0.0'
});
}
}
Expand Down
10 changes: 5 additions & 5 deletions addon/serializers/json-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const JSONAPISerializer = JSONSerializer.extend({
if (modelName !== deprecatedModelNameLookup && this._hasCustomModelNameFromPayloadKey()) {
deprecate("You are using modelNameFromPayloadKey to normalize the type for a relationship. This has been deprecated in favor of modelNameFromPayloadType", false, {
id: 'ds.json-api-serializer.deprecated-model-name-for-relationship',
until: '3.0.0'
until: '4.0.0'
});

modelName = deprecatedModelNameLookup;
Expand Down Expand Up @@ -217,7 +217,7 @@ const JSONAPISerializer = JSONSerializer.extend({
if (modelName !== deprecatedModelNameLookup && this._hasCustomModelNameFromPayloadKey()) {
deprecate("You are using modelNameFromPayloadKey to normalize the type for a resource. This has been deprecated in favor of modelNameFromPayloadType", false, {
id: 'ds.json-api-serializer.deprecated-model-name-for-resource',
until: '3.0.0'
until: '4.0.0'
});

modelName = deprecatedModelNameLookup;
Expand Down Expand Up @@ -515,7 +515,7 @@ const JSONAPISerializer = JSONSerializer.extend({
if (payloadType !== deprecatedPayloadTypeLookup && this._hasCustomPayloadKeyFromModelName()) {
deprecate("You used payloadKeyFromModelName to customize how a type is serialized. Use payloadTypeFromModelName instead.", false, {
id: 'ds.json-api-serializer.deprecated-payload-type-for-model',
until: '3.0.0'
until: '4.0.0'
});

payloadType = deprecatedPayloadTypeLookup;
Expand Down Expand Up @@ -575,7 +575,7 @@ const JSONAPISerializer = JSONSerializer.extend({
if (payloadType !== deprecatedPayloadTypeLookup && this._hasCustomPayloadKeyFromModelName()) {
deprecate("You used payloadKeyFromModelName to serialize type for belongs-to relationship. Use payloadTypeFromModelName instead.", false, {
id: 'ds.json-api-serializer.deprecated-payload-type-for-belongs-to',
until: '3.0.0'
until: '4.0.0'
});

payloadType = deprecatedPayloadTypeLookup;
Expand Down Expand Up @@ -627,7 +627,7 @@ const JSONAPISerializer = JSONSerializer.extend({
if (payloadType !== deprecatedPayloadTypeLookup && this._hasCustomPayloadKeyFromModelName()) {
deprecate("You used payloadKeyFromModelName to serialize type for belongs-to relationship. Use payloadTypeFromModelName instead.", false, {
id: 'ds.json-api-serializer.deprecated-payload-type-for-has-many',
until: '3.0.0'
until: '4.0.0'
});

payloadType = deprecatedPayloadTypeLookup;
Expand Down

0 comments on commit 91c533c

Please sign in to comment.