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