@ember-data/store 5.4.0-alpha.33 → 5.4.0-alpha.35
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 +1 -1
- package/addon/{cache-handler-oB00-31L.js → cache-handler-k7I5KvcC.js} +11 -1
- package/addon/cache-handler-k7I5KvcC.js.map +1 -0
- package/addon/index.js +1 -1
- package/package.json +9 -9
- package/unstable-preview-types/-private/cache-handler.d.ts +3 -3
- package/unstable-preview-types/-private/caches/cache-utils.d.ts +5 -5
- package/unstable-preview-types/-private/caches/identifier-cache.d.ts +10 -10
- package/unstable-preview-types/-private/caches/instance-cache.d.ts +12 -12
- package/unstable-preview-types/-private/caches/resource-utils.d.ts +5 -5
- package/unstable-preview-types/-private/document.d.ts +3 -3
- package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts +2 -2
- package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts +3 -3
- package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts +3 -3
- package/unstable-preview-types/-private/managers/cache-manager.d.ts +3 -3
- package/unstable-preview-types/-private/managers/notification-manager.d.ts +2 -2
- package/unstable-preview-types/-private/managers/record-array-manager.d.ts +5 -5
- package/unstable-preview-types/-private/network/request-cache.d.ts +4 -4
- package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts +12 -16
- package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts.map +1 -1
- package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts +118 -0
- package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts.map +1 -0
- package/unstable-preview-types/-private/store-service.d.ts +3 -3
- package/unstable-preview-types/-private/utils/coerce-id.d.ts +4 -4
- package/unstable-preview-types/-private/utils/construct-resource.d.ts +7 -7
- package/unstable-preview-types/-private/utils/identifier-debug-consts.d.ts +6 -6
- package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts +2 -2
- package/unstable-preview-types/-private/utils/normalize-model-name.d.ts +2 -2
- package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts +2 -2
- package/unstable-preview-types/-private.d.ts +18 -3
- package/unstable-preview-types/-private.d.ts.map +1 -1
- package/unstable-preview-types/-types/overview.d.ts +2 -2
- package/unstable-preview-types/-types/q/cache-store-wrapper.d.ts +2 -2
- package/unstable-preview-types/-types/q/cache.d.ts +2 -2
- package/unstable-preview-types/-types/q/ds-model.d.ts +2 -2
- package/unstable-preview-types/-types/q/identifier.d.ts +2 -2
- package/unstable-preview-types/-types/q/promise-proxies.d.ts +2 -2
- package/unstable-preview-types/-types/q/record-data-json-api.d.ts +2 -2
- package/unstable-preview-types/-types/q/record-instance.d.ts +2 -2
- package/unstable-preview-types/-types/q/schema-service.d.ts +2 -2
- package/unstable-preview-types/-types/q/store.d.ts +2 -2
- package/unstable-preview-types/index.d.ts +3 -3
- package/addon/cache-handler-oB00-31L.js.map +0 -1
- package/unstable-preview-types/-private/index.d.ts +0 -18
- package/unstable-preview-types/-private/index.d.ts.map +0 -1
package/addon/-private.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ARRAY_SIGNAL, f as AdapterPopulatedRecordArray, C as CacheHandler, I as IdentifierArray, M as MUTATE, I as RecordArray, R as RecordArrayManager, g as SOURCE, S as Store, l as StoreMap, _ as _clearCaches, o as _deprecatingNormalize, e as coerceId, h as fastPush, i as isStableIdentifier, n as notifyArray, p as peekCache, r as recordIdentifierFor, j as removeRecordDataFor, m as setCacheFor, c as setIdentifierForgetMethod, a as setIdentifierGenerationMethod, d as setIdentifierResetMethod, b as setIdentifierUpdateMethod, k as setRecordIdentifier, s as storeFor } from "./cache-handler-
|
|
1
|
+
export { A as ARRAY_SIGNAL, f as AdapterPopulatedRecordArray, C as CacheHandler, I as IdentifierArray, M as MUTATE, I as RecordArray, R as RecordArrayManager, g as SOURCE, S as Store, l as StoreMap, _ as _clearCaches, o as _deprecatingNormalize, e as coerceId, h as fastPush, i as isStableIdentifier, n as notifyArray, p as peekCache, r as recordIdentifierFor, j as removeRecordDataFor, m as setCacheFor, c as setIdentifierForgetMethod, a as setIdentifierGenerationMethod, d as setIdentifierResetMethod, b as setIdentifierUpdateMethod, k as setRecordIdentifier, s as storeFor } from "./cache-handler-k7I5KvcC";
|
|
@@ -2278,6 +2278,16 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
|
2278
2278
|
}
|
|
2279
2279
|
return desc;
|
|
2280
2280
|
}
|
|
2281
|
+
|
|
2282
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2283
|
+
/*
|
|
2284
|
+
We redefine Proxy because the native Proxy type treats the `target` and
|
|
2285
|
+
`receiver` as the same type incorrectly.
|
|
2286
|
+
|
|
2287
|
+
We ported this from Typescript's own Proxy types on 3/10/2024.
|
|
2288
|
+
*/
|
|
2289
|
+
|
|
2290
|
+
const NativeProxy = Proxy;
|
|
2281
2291
|
var _class;
|
|
2282
2292
|
const ARRAY_GETTER_METHODS = new Set([Symbol.iterator, 'concat', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'map', 'reduce', 'reduceRight', 'slice', 'some', 'values']);
|
|
2283
2293
|
const ARRAY_SETTER_METHODS = new Set(['push', 'pop', 'unshift', 'shift', 'splice', 'sort']);
|
|
@@ -2405,7 +2415,7 @@ let IdentifierArray = (_class = class IdentifierArray {
|
|
|
2405
2415
|
// we track all mutations within the call
|
|
2406
2416
|
// and forward them as one
|
|
2407
2417
|
|
|
2408
|
-
const proxy = new
|
|
2418
|
+
const proxy = new NativeProxy(this[SOURCE], {
|
|
2409
2419
|
get(target, prop, receiver) {
|
|
2410
2420
|
const index = convertToInt(prop);
|
|
2411
2421
|
if (_SIGNAL.shouldReset && (index !== null || SYNC_PROPS.has(prop) || isArrayGetter(prop))) {
|