@ember-data/store 5.4.0-alpha.32 → 5.4.0-alpha.34

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.
Files changed (45) hide show
  1. package/addon/-private.js +1 -1
  2. package/addon/{cache-handler-oB00-31L.js → cache-handler-k7I5KvcC.js} +11 -1
  3. package/addon/cache-handler-k7I5KvcC.js.map +1 -0
  4. package/addon/index.js +1 -1
  5. package/package.json +9 -9
  6. package/unstable-preview-types/-private/cache-handler.d.ts +99 -97
  7. package/unstable-preview-types/-private/caches/cache-utils.d.ts +10 -8
  8. package/unstable-preview-types/-private/caches/identifier-cache.d.ts +179 -177
  9. package/unstable-preview-types/-private/caches/instance-cache.d.ts +61 -59
  10. package/unstable-preview-types/-private/caches/resource-utils.d.ts +11 -9
  11. package/unstable-preview-types/-private/document.d.ts +144 -142
  12. package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts +176 -174
  13. package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts +17 -15
  14. package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts +27 -25
  15. package/unstable-preview-types/-private/managers/cache-manager.d.ts +440 -438
  16. package/unstable-preview-types/-private/managers/notification-manager.d.ts +96 -94
  17. package/unstable-preview-types/-private/managers/record-array-manager.d.ts +95 -93
  18. package/unstable-preview-types/-private/network/request-cache.d.ts +107 -105
  19. package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts +128 -130
  20. package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts.map +1 -1
  21. package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts +118 -0
  22. package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts.map +1 -0
  23. package/unstable-preview-types/-private/store-service.d.ts +1501 -1499
  24. package/unstable-preview-types/-private/utils/coerce-id.d.ts +9 -7
  25. package/unstable-preview-types/-private/utils/construct-resource.d.ts +9 -7
  26. package/unstable-preview-types/-private/utils/identifier-debug-consts.d.ts +6 -4
  27. package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts +3 -1
  28. package/unstable-preview-types/-private/utils/normalize-model-name.d.ts +3 -1
  29. package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts +3 -1
  30. package/unstable-preview-types/-private.d.ts +18 -1
  31. package/unstable-preview-types/-private.d.ts.map +1 -1
  32. package/unstable-preview-types/-types/overview.d.ts +20 -18
  33. package/unstable-preview-types/-types/q/cache-store-wrapper.d.ts +105 -103
  34. package/unstable-preview-types/-types/q/cache.d.ts +45 -43
  35. package/unstable-preview-types/-types/q/ds-model.d.ts +13 -11
  36. package/unstable-preview-types/-types/q/identifier.d.ts +167 -165
  37. package/unstable-preview-types/-types/q/promise-proxies.d.ts +3 -1
  38. package/unstable-preview-types/-types/q/record-data-json-api.d.ts +34 -32
  39. package/unstable-preview-types/-types/q/record-instance.d.ts +28 -26
  40. package/unstable-preview-types/-types/q/schema-service.d.ts +212 -210
  41. package/unstable-preview-types/-types/q/store.d.ts +15 -13
  42. package/unstable-preview-types/index.d.ts +219 -184
  43. package/addon/cache-handler-oB00-31L.js.map +0 -1
  44. package/unstable-preview-types/-private/index.d.ts +0 -16
  45. 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-oB00-31L";
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 Proxy(this[SOURCE], {
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))) {