@ember-data/model 4.12.0-beta.1 → 4.12.0-beta.3
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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Model } from "./has-many-
|
|
2
|
-
export { E as Errors, L as LEGACY_SUPPORT, R as ManyArray, P as PromiseBelongsTo, c as PromiseManyArray, a as attr, b as belongsTo, h as hasMany } from "./has-many-
|
|
1
|
+
import { M as Model } from "./has-many-d9924aae";
|
|
2
|
+
export { E as Errors, L as LEGACY_SUPPORT, R as ManyArray, P as PromiseBelongsTo, c as PromiseManyArray, a as attr, b as belongsTo, h as hasMany } from "./has-many-d9924aae";
|
|
3
3
|
import { getOwner } from '@ember/application';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -2,7 +2,7 @@ import { macroCondition, isDevelopingApp, getOwnConfig, importSync, dependencySa
|
|
|
2
2
|
import { assert, deprecate, warn, inspect } from '@ember/debug';
|
|
3
3
|
import EmberObject, { computed, get } from '@ember/object';
|
|
4
4
|
import { recordIdentifierFor, storeFor } from '@ember-data/store';
|
|
5
|
-
import { recordDataFor, RecordArray, MUTATE, SOURCE, recordIdentifierFor as recordIdentifierFor$1, IDENTIFIER_ARRAY_TAG, isStableIdentifier, storeFor as storeFor$1, fastPush, coerceId } from '@ember-data/store/-private';
|
|
5
|
+
import { recordDataFor, RecordArray, MUTATE, SOURCE, recordIdentifierFor as recordIdentifierFor$1, IDENTIFIER_ARRAY_TAG, notifyArray, isStableIdentifier, storeFor as storeFor$1, fastPush, coerceId } from '@ember-data/store/-private';
|
|
6
6
|
import { dasherize } from '@ember/string';
|
|
7
7
|
import ArrayMixin, { A, NativeArray } from '@ember/array';
|
|
8
8
|
import { singularize } from 'ember-inflector';
|
|
@@ -1224,8 +1224,9 @@ class RelatedCollection extends RecordArray {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
notify() {
|
|
1226
1226
|
const tag = this[IDENTIFIER_ARRAY_TAG];
|
|
1227
|
-
tag.ref = null;
|
|
1228
1227
|
tag.shouldReset = true;
|
|
1228
|
+
// @ts-expect-error
|
|
1229
|
+
notifyArray(this);
|
|
1229
1230
|
}
|
|
1230
1231
|
|
|
1231
1232
|
/**
|
|
@@ -3384,6 +3385,9 @@ let Tag = (_class$1 = class Tag {
|
|
|
3384
3385
|
this.rev = 1;
|
|
3385
3386
|
this.isDirty = true;
|
|
3386
3387
|
this.value = undefined;
|
|
3388
|
+
/*
|
|
3389
|
+
* whether this was part of a transaction when mutated
|
|
3390
|
+
*/
|
|
3387
3391
|
this.t = false;
|
|
3388
3392
|
}
|
|
3389
3393
|
notify() {
|
|
@@ -3835,6 +3839,7 @@ function lookupLegacySupport(record) {
|
|
|
3835
3839
|
const identifier = recordIdentifierFor(record);
|
|
3836
3840
|
let support = LEGACY_SUPPORT.get(identifier);
|
|
3837
3841
|
if (!support) {
|
|
3842
|
+
assert(`Memory Leak Detected`, !record.isDestroyed && !record.isDestroying);
|
|
3838
3843
|
support = new LegacySupport(record);
|
|
3839
3844
|
LEGACY_SUPPORT.set(identifier, support);
|
|
3840
3845
|
LEGACY_SUPPORT.set(record, support);
|