@mmstack/primitives 22.8.1 → 22.8.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmstack/primitives",
3
- "version": "22.8.1",
3
+ "version": "22.8.2",
4
4
  "keywords": [
5
5
  "angular",
6
6
  "signals",
@@ -3101,10 +3101,14 @@ declare const STORE_SHARED_GLOBALS: unique symbol;
3101
3101
  type ProxyCache = WeakMap<object, Map<PropertyKey, WeakRef<Signal<any>>>>;
3102
3102
  /**
3103
3103
  * @internal
3104
- * Prunes a cache entry once its proxy is reclaimed by the GC.
3104
+ * Prunes a cache entry once its proxy is reclaimed by the GC. The held value must reference
3105
+ * `target` only weakly: held values are retained by the registry until its cleanup callbacks
3106
+ * run (host tasks — they never run inside a synchronous burst), so a strong `target` here
3107
+ * keeps every dropped subtree's backing-signal ancestry alive across GCs. If `target` is
3108
+ * already dead its whole cache entry died with it (WeakMap), and there is nothing to prune.
3105
3109
  */
3106
3110
  type ProxyCleanupRegistry = FinalizationRegistry<{
3107
- target: object;
3111
+ targetRef: WeakRef<object>;
3108
3112
  prop: PropertyKey;
3109
3113
  }>;
3110
3114
  /**