@ember-data/store 5.4.0-alpha.5 → 5.4.0-alpha.6
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 +1 @@
|
|
|
1
|
-
export { f as AdapterPopulatedRecordArray, C as CacheHandler, h as IDENTIFIER_ARRAY_TAG, I as IdentifierArray, M as MUTATE, I as RecordArray, R as RecordArrayManager, g as SOURCE, S as Store, m as StoreMap, _ as _clearCaches, e as coerceId, j as fastPush, i as isStableIdentifier, n as notifyArray, p as peekCache, r as recordIdentifierFor, k as removeRecordDataFor, o as setCacheFor, c as setIdentifierForgetMethod, a as setIdentifierGenerationMethod, d as setIdentifierResetMethod, b as setIdentifierUpdateMethod, l as setRecordIdentifier, s as storeFor } from "./store-service-
|
|
1
|
+
export { f as AdapterPopulatedRecordArray, C as CacheHandler, h as IDENTIFIER_ARRAY_TAG, I as IdentifierArray, M as MUTATE, I as RecordArray, R as RecordArrayManager, g as SOURCE, S as Store, m as StoreMap, _ as _clearCaches, e as coerceId, j as fastPush, i as isStableIdentifier, n as notifyArray, p as peekCache, r as recordIdentifierFor, k as removeRecordDataFor, o as setCacheFor, c as setIdentifierForgetMethod, a as setIdentifierGenerationMethod, d as setIdentifierResetMethod, b as setIdentifierUpdateMethod, l as setRecordIdentifier, s as storeFor } from "./store-service-7ffc4d68";
|
package/addon/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CacheHandler, S as default, r as recordIdentifierFor, c as setIdentifierForgetMethod, a as setIdentifierGenerationMethod, d as setIdentifierResetMethod, b as setIdentifierUpdateMethod, s as storeFor } from "./store-service-
|
|
1
|
+
export { C as CacheHandler, S as default, r as recordIdentifierFor, c as setIdentifierForgetMethod, a as setIdentifierGenerationMethod, d as setIdentifierResetMethod, b as setIdentifierUpdateMethod, s as storeFor } from "./store-service-7ffc4d68";
|
|
@@ -664,7 +664,7 @@ class IdentifierCache {
|
|
|
664
664
|
console.log(`Identifiers: ${lid ? 'no ' : ''}lid ${lid ? lid + ' ' : ''}determined for resource`, resource);
|
|
665
665
|
}
|
|
666
666
|
let identifier = /*#__NOINLINE__*/getIdentifierFromLid(this._cache, lid, resource);
|
|
667
|
-
if (identifier !==
|
|
667
|
+
if (identifier !== null) {
|
|
668
668
|
if (macroCondition(getOwnConfig().debug.LOG_IDENTIFIERS)) {
|
|
669
669
|
// eslint-disable-next-line no-console
|
|
670
670
|
console.groupEnd();
|
|
@@ -1048,7 +1048,7 @@ function detectMerge(cache, keyInfo, identifier, data) {
|
|
|
1048
1048
|
// we trigger a merge of the identifiers
|
|
1049
1049
|
// though probably we should just throw an error here
|
|
1050
1050
|
if (id !== null && id === newId && newType === type && hasLid(data) && data.lid !== lid) {
|
|
1051
|
-
return cache
|
|
1051
|
+
return getIdentifierFromLid(cache, data.lid, data) || false;
|
|
1052
1052
|
|
|
1053
1053
|
// If the lids are the same, and ids are the same, but types are different we should trigger a merge of the identifiers
|
|
1054
1054
|
} else if (id !== null && id === newId && newType && newType !== type && hasLid(data) && data.lid === lid) {
|
|
@@ -1065,7 +1065,7 @@ function getIdentifierFromLid(cache, lid, resource) {
|
|
|
1065
1065
|
// eslint-disable-next-line no-console
|
|
1066
1066
|
console.log(`Identifiers: cache ${identifier ? 'HIT' : 'MISS'} - Non-Stable ${lid}`, resource);
|
|
1067
1067
|
}
|
|
1068
|
-
return identifier;
|
|
1068
|
+
return identifier || null;
|
|
1069
1069
|
}
|
|
1070
1070
|
function addResourceToCache(cache, identifier) {
|
|
1071
1071
|
cache.resources.set(identifier.lid, identifier);
|