@ember-data/model 3.28.0 → 3.28.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/addon/-private/attr.js
CHANGED
|
@@ -130,7 +130,7 @@ function attr(type, options) {
|
|
|
130
130
|
return computed({
|
|
131
131
|
get(key) {
|
|
132
132
|
if (DEBUG) {
|
|
133
|
-
if (['_internalModel', '
|
|
133
|
+
if (['_internalModel', 'currentState'].indexOf(key) !== -1) {
|
|
134
134
|
throw new Error(
|
|
135
135
|
`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your attr on ${this.constructor.toString()}`
|
|
136
136
|
);
|
|
@@ -145,7 +145,7 @@ function attr(type, options) {
|
|
|
145
145
|
},
|
|
146
146
|
set(key, value) {
|
|
147
147
|
if (DEBUG) {
|
|
148
|
-
if (['_internalModel', '
|
|
148
|
+
if (['_internalModel', 'currentState'].indexOf(key) !== -1) {
|
|
149
149
|
throw new Error(
|
|
150
150
|
`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your attr on ${this.constructor.toString()}`
|
|
151
151
|
);
|
|
@@ -140,7 +140,7 @@ function belongsTo(modelName, options) {
|
|
|
140
140
|
return computed({
|
|
141
141
|
get(key) {
|
|
142
142
|
if (DEBUG) {
|
|
143
|
-
if (['_internalModel', '
|
|
143
|
+
if (['_internalModel', 'recordData', 'currentState'].indexOf(key) !== -1) {
|
|
144
144
|
throw new Error(
|
|
145
145
|
`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your belongsTo on ${this.constructor.toString()}`
|
|
146
146
|
);
|
|
@@ -170,7 +170,7 @@ function belongsTo(modelName, options) {
|
|
|
170
170
|
},
|
|
171
171
|
set(key, value) {
|
|
172
172
|
if (DEBUG) {
|
|
173
|
-
if (['_internalModel', '
|
|
173
|
+
if (['_internalModel', 'recordData', 'currentState'].indexOf(key) !== -1) {
|
|
174
174
|
throw new Error(
|
|
175
175
|
`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your belongsTo on ${this.constructor.toString()}`
|
|
176
176
|
);
|
|
@@ -180,7 +180,7 @@ function hasMany(type, options) {
|
|
|
180
180
|
return computed({
|
|
181
181
|
get(key) {
|
|
182
182
|
if (DEBUG) {
|
|
183
|
-
if (['_internalModel', '
|
|
183
|
+
if (['_internalModel', 'recordData', 'currentState'].indexOf(key) !== -1) {
|
|
184
184
|
throw new Error(
|
|
185
185
|
`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your hasMany on ${this.constructor.toString()}`
|
|
186
186
|
);
|
|
@@ -190,7 +190,7 @@ function hasMany(type, options) {
|
|
|
190
190
|
},
|
|
191
191
|
set(key, records) {
|
|
192
192
|
if (DEBUG) {
|
|
193
|
-
if (['_internalModel', '
|
|
193
|
+
if (['_internalModel', 'recordData', 'currentState'].indexOf(key) !== -1) {
|
|
194
194
|
throw new Error(
|
|
195
195
|
`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your hasMany on ${this.constructor.toString()}`
|
|
196
196
|
);
|
package/addon/-private/model.js
CHANGED
|
@@ -2279,12 +2279,6 @@ if (DEBUG) {
|
|
|
2279
2279
|
);
|
|
2280
2280
|
}
|
|
2281
2281
|
|
|
2282
|
-
if (!isDefaultEmptyDescriptor(this, 'content') || this.content !== undefined) {
|
|
2283
|
-
throw new Error(
|
|
2284
|
-
`'content' is a reserved property name on instances of classes extending Model. Please choose a different property name for ${this.constructor.toString()}`
|
|
2285
|
-
);
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2288
2282
|
let ourDescriptor = lookupDescriptor(Model.prototype, 'currentState');
|
|
2289
2283
|
let theirDescriptor = lookupDescriptor(this, 'currentState');
|
|
2290
2284
|
let realState = this.___recordState || this._internalModel.currentState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-data/model",
|
|
3
|
-
"version": "3.28.
|
|
3
|
+
"version": "3.28.4",
|
|
4
4
|
"description": "The default blueprint for ember-cli addons.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"test:node": "mocha"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@ember-data/canary-features": "3.28.
|
|
22
|
-
"@ember-data/private-build-infra": "3.28.
|
|
23
|
-
"@ember-data/store": "3.28.
|
|
21
|
+
"@ember-data/canary-features": "3.28.4",
|
|
22
|
+
"@ember-data/private-build-infra": "3.28.4",
|
|
23
|
+
"@ember-data/store": "3.28.4",
|
|
24
24
|
"@ember/edition-utils": "^1.2.0",
|
|
25
|
-
"@ember/string": "^
|
|
25
|
+
"@ember/string": "^3.0.0",
|
|
26
26
|
"ember-cached-decorator-polyfill": "^0.1.4",
|
|
27
27
|
"ember-cli-babel": "^7.26.6",
|
|
28
28
|
"ember-cli-string-utils": "^1.1.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"inflection": "~1.13.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@ember-data/unpublished-test-infra": "3.28.
|
|
35
|
+
"@ember-data/unpublished-test-infra": "3.28.4",
|
|
36
36
|
"@ember/optional-features": "^2.0.0",
|
|
37
37
|
"@ember/test-helpers": "^2.2.5",
|
|
38
38
|
"broccoli-asset-rev": "^3.0.0",
|