@warp-drive/core 5.7.0-alpha.33 → 5.7.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/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { macroCondition, getGlobalConfig } from '@embroider/macros';
4
4
  import { w as waitFor } from "./configure-C3x8YXzL.js";
5
5
  import { peekUniversalTransient, setUniversalTransient } from './types/-private.js';
6
6
  import { EnableHydration } from './types/request.js';
7
- export { C as CacheHandler, S as Store, r as recordIdentifierFor, U as setIdentifierForgetMethod, Q as setIdentifierGenerationMethod, V as setIdentifierResetMethod, T as setIdentifierUpdateMethod, W as setKeyInfoForResource, s as storeFor } from "./request-state-CxDzTjFX.js";
7
+ export { C as CacheHandler, S as Store, r as recordIdentifierFor, U as setIdentifierForgetMethod, Q as setIdentifierGenerationMethod, V as setIdentifierResetMethod, T as setIdentifierUpdateMethod, W as setKeyInfoForResource, s as storeFor } from "./request-state-Un5kBcmR.js";
8
8
  import '@ember/debug';
9
9
  import './utils/string.js';
10
10
  import "./symbols-sql1_mdx.js";
package/dist/reactive.js CHANGED
@@ -1,5 +1,5 @@
1
- import { L as ReactiveResource, M as isNonIdentityCacheableField, N as getFieldCacheKeyStrict, r as recordIdentifierFor, H as withSignalStore, G as createInternalMemo } from "./request-state-CxDzTjFX.js";
2
- export { O as checkout, P as commit } from "./request-state-CxDzTjFX.js";
1
+ import { L as ReactiveResource, M as isNonIdentityCacheableField, N as getFieldCacheKeyStrict, r as recordIdentifierFor, H as withSignalStore, G as createInternalMemo } from "./request-state-Un5kBcmR.js";
2
+ export { O as checkout, P as commit } from "./request-state-Un5kBcmR.js";
3
3
  import { isResourceSchema } from './types/schema/fields.js';
4
4
  import { D as Destroy, C as Context } from "./symbols-sql1_mdx.js";
5
5
  export { a as Checkout } from "./symbols-sql1_mdx.js";
@@ -9578,6 +9578,16 @@ class RequestSubscription {
9578
9578
  * which issues this request.
9579
9579
  */
9580
9580
 
9581
+ /**
9582
+ * The Store or RequestManager that the last subscription is attached to.
9583
+ *
9584
+ * This differs from 'store' because a <Request /> may be passed a
9585
+ * request originating from a different store than the <Request />
9586
+ * component would use if it were to issue the request itself.
9587
+ *
9588
+ * @internal
9589
+ */
9590
+ _requester;
9581
9591
  constructor(store, args) {
9582
9592
  this._args = args;
9583
9593
  this.store = store;
@@ -9586,6 +9596,7 @@ class RequestSubscription {
9586
9596
  this._intervalStart = null;
9587
9597
  this._invalidated = false;
9588
9598
  this._nextInterval = null;
9599
+ this._requester = null;
9589
9600
  this.isDestroyed = false;
9590
9601
  this[DISPOSE] = _DISPOSE;
9591
9602
  this._installListeners();
@@ -9709,6 +9720,7 @@ class RequestSubscription {
9709
9720
 
9710
9721
  // if we have a request, we need to subscribe to it
9711
9722
  const store = this._getRequester();
9723
+ this._requester = store;
9712
9724
  if (requestId && isStore(store)) {
9713
9725
  this._subscribedTo = requestId;
9714
9726
  this._subscription = store.notifications.subscribe(requestId, (_id, op) => {
@@ -9782,11 +9794,12 @@ class RequestSubscription {
9782
9794
  * @internal
9783
9795
  */
9784
9796
  _removeSubscriptions() {
9785
- const store = this._getRequester();
9786
- if (this._subscription && isStore(store)) {
9797
+ const store = this._requester;
9798
+ if (this._subscription && store && isStore(store)) {
9787
9799
  store.notifications.unsubscribe(this._subscription);
9788
9800
  this._subscribedTo = null;
9789
9801
  this._subscription = null;
9802
+ this._requester = null;
9790
9803
  }
9791
9804
  }
9792
9805
 
@@ -9925,7 +9938,11 @@ class RequestSubscription {
9925
9938
  * @internal
9926
9939
  */
9927
9940
  _getRequester() {
9928
- if (this._args.request) {
9941
+ // Note: we check for the requester's presence
9942
+ // as well as the request's presence because we may
9943
+ // be subscribed to a request issued by a store from an older
9944
+ // version of the library that didn't yet set requester.
9945
+ if (this._args.request?.requester) {
9929
9946
  return this._args.request.requester;
9930
9947
  }
9931
9948
  return this.store;
@@ -1,2 +1,2 @@
1
- export { C as CacheHandler, D as DISPOSE, R as RecordArrayManager, E as Signals, S as Store, k as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, h as assertPrivateCapabilities, d as assertPrivateStore, b as coerceId, c as constructResource, J as consumeInternalSignal, G as createInternalMemo, l as createLegacyManyArray, q as createRequestSubscription, A as defineGate, B as defineNonEnumerableSignal, z as defineSignal, e as ensureStringId, y as entangleInitiallyStaleSignal, x as entangleSignal, f as fastPush, w as gate, K as getOrCreateInternalSignal, p as getPromiseState, t as getRequestState, g as isPrivateStore, a as isRequestKey, i as isResourceKey, m as log, o as logGroup, v as memoized, I as notifyInternalSignal, F as peekInternalSignal, r as recordIdentifierFor, j as setRecordIdentifier, u as signal, s as storeFor, H as withSignalStore } from "../request-state-CxDzTjFX.js";
1
+ export { C as CacheHandler, D as DISPOSE, R as RecordArrayManager, E as Signals, S as Store, k as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, h as assertPrivateCapabilities, d as assertPrivateStore, b as coerceId, c as constructResource, J as consumeInternalSignal, G as createInternalMemo, l as createLegacyManyArray, q as createRequestSubscription, A as defineGate, B as defineNonEnumerableSignal, z as defineSignal, e as ensureStringId, y as entangleInitiallyStaleSignal, x as entangleSignal, f as fastPush, w as gate, K as getOrCreateInternalSignal, p as getPromiseState, t as getRequestState, g as isPrivateStore, a as isRequestKey, i as isResourceKey, m as log, o as logGroup, v as memoized, I as notifyInternalSignal, F as peekInternalSignal, r as recordIdentifierFor, j as setRecordIdentifier, u as signal, s as storeFor, H as withSignalStore } from "../request-state-Un5kBcmR.js";
2
2
  export { A as ARRAY_SIGNAL, O as OBJECT_SIGNAL, w as waitFor } from "../configure-C3x8YXzL.js";
@@ -1,6 +1,6 @@
1
1
  import { macroCondition, getGlobalConfig } from '@embroider/macros';
2
2
  const name = "@warp-drive/core";
3
- const version = "5.7.0-alpha.33";
3
+ const version = "5.7.0-alpha.35";
4
4
 
5
5
  // in testing mode, we utilize globals to ensure only one copy exists of
6
6
  // these maps, due to bugs in ember-auto-import
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warp-drive/core",
3
- "version": "5.7.0-alpha.33",
3
+ "version": "5.7.0-alpha.35",
4
4
  "description": "Core package for WarpDrive | All the Universal Basics",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -37,13 +37,13 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@embroider/macros": "^1.18.1",
40
- "@warp-drive/build-config": "5.7.0-alpha.33"
40
+ "@warp-drive/build-config": "5.7.0-alpha.35"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@babel/core": "^7.28.0",
44
44
  "@babel/plugin-transform-typescript": "^7.28.0",
45
45
  "@babel/preset-typescript": "^7.27.1",
46
- "@warp-drive/internal-config": "5.7.0-alpha.33",
46
+ "@warp-drive/internal-config": "5.7.0-alpha.35",
47
47
  "decorator-transforms": "^2.3.0",
48
48
  "ember-source": "~6.6.0",
49
49
  "expect-type": "^1.2.1",