@solidjs/signals 2.0.0-rc.7 → 2.0.0-rc.8

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 (117) hide show
  1. package/dist/dev-shared.js +5243 -0
  2. package/dist/dev.attribution.js +2333 -0
  3. package/dist/dev.js +1229 -6834
  4. package/dist/observe/affects.js +127 -0
  5. package/dist/observe/attribution.js +1 -0
  6. package/dist/observe/boundaries.js +586 -0
  7. package/dist/observe/core/action.js +167 -0
  8. package/dist/observe/core/async.js +736 -0
  9. package/dist/observe/core/attribution-hooks.js +60 -0
  10. package/dist/observe/core/attribution.js +2318 -0
  11. package/dist/{types-cjs/core/constants.d.cts → observe/core/constants.js} +129 -73
  12. package/dist/{types-cjs/core/context.d.cts → observe/core/context.js} +37 -12
  13. package/dist/observe/core/core.js +1289 -0
  14. package/dist/observe/core/dev.js +232 -0
  15. package/dist/observe/core/effect.js +179 -0
  16. package/dist/observe/core/error.js +80 -0
  17. package/dist/observe/core/external.js +98 -0
  18. package/dist/observe/core/graph.js +155 -0
  19. package/dist/observe/core/heap.js +147 -0
  20. package/dist/observe/core/invariants.js +43 -0
  21. package/dist/observe/core/lanes.js +168 -0
  22. package/dist/observe/core/optimistic.js +438 -0
  23. package/dist/observe/core/owner.js +308 -0
  24. package/dist/observe/core/scheduler.js +1190 -0
  25. package/dist/observe/core/verdict.js +551 -0
  26. package/dist/observe/index.js +55 -0
  27. package/dist/observe/map.js +482 -0
  28. package/dist/{types-cjs/signals.d.cts → observe/signals.js} +295 -317
  29. package/dist/observe/store/index.js +38 -0
  30. package/dist/observe/store/next/optimistic.js +651 -0
  31. package/dist/observe/store/next/projection.js +242 -0
  32. package/dist/observe/store/next/reconcile.js +373 -0
  33. package/dist/observe/store/next/store.js +2213 -0
  34. package/dist/observe/store/next/target.js +51 -0
  35. package/dist/observe/store/store.js +323 -0
  36. package/dist/observe/store/storePath.js +103 -0
  37. package/dist/observe/store/utils.js +210 -0
  38. package/dist/prod/attribution.js +32 -0
  39. package/dist/prod/core/action.js +52 -32
  40. package/dist/prod/core/async.js +171 -127
  41. package/dist/prod/core/constants.js +24 -1
  42. package/dist/prod/core/context.js +3 -3
  43. package/dist/prod/core/core.js +434 -291
  44. package/dist/prod/core/effect.js +54 -34
  45. package/dist/prod/core/external.js +2 -2
  46. package/dist/prod/core/graph.js +32 -32
  47. package/dist/prod/core/heap.js +49 -44
  48. package/dist/prod/core/lanes.js +45 -38
  49. package/dist/prod/core/optimistic.js +207 -73
  50. package/dist/prod/core/owner.js +43 -39
  51. package/dist/prod/core/scheduler.js +319 -190
  52. package/dist/prod/core/verdict.js +67 -67
  53. package/dist/prod/index.js +9 -3
  54. package/dist/prod/map.js +292 -141
  55. package/dist/prod/signals.js +7 -10
  56. package/dist/prod/store/next/optimistic.js +140 -125
  57. package/dist/prod/store/next/projection.js +3 -3
  58. package/dist/prod/store/next/reconcile.js +87 -84
  59. package/dist/prod/store/next/store.js +524 -280
  60. package/dist/prod/store/next/target.js +32 -10
  61. package/dist/prod/store/store.js +12 -14
  62. package/dist/prod/store/utils.js +36 -27
  63. package/dist/types/attribution.d.ts +15 -0
  64. package/dist/types/attribution.prod.d.ts +13 -0
  65. package/dist/types/core/async.d.ts +1 -1
  66. package/dist/types/core/attribution-hooks.d.ts +119 -6
  67. package/dist/types/core/attribution.d.ts +208 -53
  68. package/dist/types/core/constants.d.ts +23 -0
  69. package/dist/types/core/core.d.ts +7 -0
  70. package/dist/types/core/dev.d.ts +124 -26
  71. package/dist/types/core/effect.d.ts +8 -1
  72. package/dist/types/core/index.d.ts +2 -1
  73. package/dist/types/core/lanes.d.ts +8 -1
  74. package/dist/types/core/scheduler.d.ts +60 -0
  75. package/dist/types/core/types.d.ts +29 -9
  76. package/dist/types/index.d.ts +9 -2
  77. package/dist/types/map.d.ts +2 -0
  78. package/dist/types/store/index.d.ts +1 -0
  79. package/dist/types/store/next/store.d.ts +5 -0
  80. package/dist/types/store/next/target.d.ts +36 -9
  81. package/dist/types/store/utils.d.ts +7 -0
  82. package/package.json +21 -17
  83. package/dist/node.cjs +0 -10541
  84. package/dist/node.dev.cjs +0 -13724
  85. package/dist/types-cjs/affects.d.cts +0 -47
  86. package/dist/types-cjs/boundaries.d.cts +0 -175
  87. package/dist/types-cjs/core/action.d.cts +0 -64
  88. package/dist/types-cjs/core/async.d.cts +0 -23
  89. package/dist/types-cjs/core/attribution-hooks.d.cts +0 -127
  90. package/dist/types-cjs/core/attribution.d.cts +0 -495
  91. package/dist/types-cjs/core/core.d.cts +0 -185
  92. package/dist/types-cjs/core/dev.d.cts +0 -136
  93. package/dist/types-cjs/core/effect.d.cts +0 -30
  94. package/dist/types-cjs/core/error.d.cts +0 -56
  95. package/dist/types-cjs/core/external.d.cts +0 -15
  96. package/dist/types-cjs/core/graph.d.cts +0 -28
  97. package/dist/types-cjs/core/heap.d.cts +0 -24
  98. package/dist/types-cjs/core/index.d.cts +0 -13
  99. package/dist/types-cjs/core/invariants.d.cts +0 -59
  100. package/dist/types-cjs/core/lanes.d.cts +0 -54
  101. package/dist/types-cjs/core/optimistic.d.cts +0 -6
  102. package/dist/types-cjs/core/owner.d.cts +0 -124
  103. package/dist/types-cjs/core/scheduler.d.cts +0 -236
  104. package/dist/types-cjs/core/types.d.cts +0 -204
  105. package/dist/types-cjs/core/verdict.d.cts +0 -2
  106. package/dist/types-cjs/index.d.cts +0 -10
  107. package/dist/types-cjs/map.d.cts +0 -69
  108. package/dist/types-cjs/package.json +0 -3
  109. package/dist/types-cjs/store/index.d.cts +0 -18
  110. package/dist/types-cjs/store/next/optimistic.d.cts +0 -25
  111. package/dist/types-cjs/store/next/projection.d.cts +0 -8
  112. package/dist/types-cjs/store/next/reconcile.d.cts +0 -10
  113. package/dist/types-cjs/store/next/store.d.cts +0 -121
  114. package/dist/types-cjs/store/next/target.d.cts +0 -166
  115. package/dist/types-cjs/store/store.d.cts +0 -143
  116. package/dist/types-cjs/store/storePath.d.cts +0 -58
  117. package/dist/types-cjs/store/utils.d.cts +0 -74
@@ -12,7 +12,7 @@ import { $TARGET, markRawIngest, isWrappable, rawValuesUsed, isRawValue, getWrit
12
12
 
13
13
  import { materializePB, adoptPB, unwrapValue, notifyFold, targetsEqual, bumpDeep, notifyKeyValue, notifyKeyDiff, notifyFoldTail, hasAccessorFlag } from "./store.js";
14
14
 
15
- import { storeNextLookup, optHooks, ownedRaw } from "./target.js";
15
+ import { isOwned, $OWNER, storeNextLookup, optHooks, lookupTarget } from "./target.js";
16
16
 
17
17
  /**
18
18
  * Store rewrite — reconcile, the adoption channel (INTERNALS-STORE-STATE.md
@@ -41,7 +41,7 @@ import { storeNextLookup, optHooks, ownedRaw } from "./target.js";
41
41
  // overlay (#3044) materializes to the clone path first (edge: reconcile
42
42
  // inside a setter that already wrote this target).
43
43
  if (f.ovl) materializePB(f);
44
- let l = n === null ? null : typeof n === "string" ? e => e?.[n] : n;
44
+ let i = n === null ? null : typeof n === "string" ? e => e?.[n] : n;
45
45
  // §7b chained backing: a projection derive returning a LIVE store proxy
46
46
  // adopts the proxy itself as the backing — reads flow through the inner
47
47
  // store's traps, so consumers subscribe to the inner graph and updates
@@ -54,8 +54,8 @@ import { storeNextLookup, optHooks, ownedRaw } from "./target.js";
54
54
  adoptPB(f, e);
55
55
  return;
56
56
  }
57
- const i = unwrapValue(e);
58
- if (l) {
57
+ const l = unwrapValue(e);
58
+ if (i) {
59
59
  // Root identity precondition — checked before ANY mutation, so a throwing
60
60
  // reconcile is atomic by construction (RUL-12 ruling). Projections
61
61
  // (replace=true) relax it: a root entity change merges in place — the
@@ -63,16 +63,18 @@ import { storeNextLookup, optHooks, ownedRaw } from "./target.js";
63
63
  // key-matched across the entity change (proj R7: keyFn drops to
64
64
  // positional so old-entity subtrees never merge into the new entity's).
65
65
  const e = f.pb ?? f.v;
66
- const t = l(e);
67
- if (t !== undefined && !sameKey(l(i), t)) {
66
+ const t = i(e);
67
+ if (t !== undefined && !sameKey(i(l), t)) {
68
68
  if (!o) throw new Error("");
69
69
  // Entity change: wholesale swap. The root proxy is stable for life
70
70
  // (proj R5) but NOTHING below survives — children are never matched
71
71
  // across an entity change even when their own keys align (proj R7).
72
72
  // Displaced-raw unregistration (proj R10): the outgoing raw stops
73
73
  // resolving to this proxy; re-handed later it wraps fresh.
74
- (f.fam?.map ?? storeNextLookup).delete(f.pb ?? f.v);
75
- adoptPB(f, i);
74
+ const e = f.pb ?? f.v;
75
+ if (isOwned(e)) delete e[$OWNER]; // disown: wraps fresh if re-handed
76
+ else (f.fam?.map ?? storeNextLookup).delete(e);
77
+ adoptPB(f, l);
76
78
  return;
77
79
  }
78
80
  }
@@ -82,93 +84,93 @@ import { storeNextLookup, optHooks, ownedRaw } from "./target.js";
82
84
  // touched. Key-matched rows keep proxy identity by descending into the
83
85
  // existing child targets instead of overriding their parent slots.
84
86
  if (f.fam?.opt === true && !projectionWriteActive && !getWriteOverride()) {
85
- optHooks.applyTentative(f, i, l);
87
+ optHooks.applyTentative(f, l, i);
86
88
  return;
87
89
  }
88
- applyAdopt(f, i, l, o);
90
+ applyAdopt(f, l, i, o);
89
91
  }
90
92
 
91
93
  function applyAdopt(e, t, n, o = false) {
92
94
  const f = e.pb ?? e.v;
93
95
  // The sound identity skip (O7): same reference AND we never diverged it.
94
- if (t === f && !ownedRaw.has(f)) return;
95
- const l = e.fam;
96
+ if (t === f && !isOwned(f)) return;
97
+ const i = e.fam;
96
98
  // §6b (R28): the diff's previous-arrangement baseline is the LANE VIEW —
97
99
  // optimistic rows must be visible to key matching so a landing carrying the
98
100
  // same key recycles their proxies. Raw `prev` keeps the identity/ownership
99
101
  // roles above; only matching reads the view.
100
- const i = l?.opt === true ? optHooks.optimisticView(e, f) : f;
102
+ const l = i?.opt === true ? optHooks.optimisticView(e, f) : f;
101
103
  const r = Array.isArray(t);
102
104
  // Plain stores notify inline AFTER the descent (child registrations feed
103
105
  // the fold diff's identity-preservation check); projections keep deferred
104
106
  // folds (downstream holds can form later in the flush).
105
- const u = l === null;
106
- const s = e.s === true;
107
+ const s = i === null;
108
+ const u = e.s === true;
107
109
  // Node-notify base is the view the nodes were last told (#3296): a draft
108
110
  // preceding this reconcile already moved them to its pending backing at
109
111
  // setter exit (prev, materialized above), so diffing incoming against the
110
112
  // committed backing would skip a key the draft changed and the reconcile
111
113
  // restores — the node would commit the superseded draft value.
112
114
  const a = f;
113
- adoptPB(e, t, u);
115
+ adoptPB(e, t, s);
114
116
  // Shallow adoption: records are slot values — sticky raw-mark the incoming
115
117
  // set (R41) and never descend; slot notification is the positional diff.
116
- if (s) markRawIngest(t);
117
- if (Array.isArray(i) !== r) {
118
- if (u) notifyFold(e, a, t);
118
+ if (u) markRawIngest(t);
119
+ if (Array.isArray(l) !== r) {
120
+ if (s) notifyFold(e, a, t);
119
121
  return;
120
122
  }
121
123
  if (r) {
122
- const f = i;
124
+ const f = l;
123
125
  const r = t;
124
126
  // Fused array walk (eager mode): per-index notification rides the same
125
127
  // loop as the descent (descend first — targetsEqual needs the child's
126
128
  // re-registration, R9). Length, trailing removed indexes, and any other
127
129
  // unvisited node keys land in the counted sweep below.
128
- const c = u ? e.n : null;
129
- let p = 0;
130
- if (n && !s) {
130
+ const c = s ? e.n : null;
131
+ let d = 0;
132
+ if (n && !u) {
131
133
  // Positional-prefix fast path (legacy keyedMatch-walk parity): while
132
134
  // rows key-match in place — the steady-state polling shape — descend
133
135
  // directly with zero staging. The prevByKey map is built only for the
134
136
  // misaligned remainder, and never at all on aligned ticks.
135
- const i = f.length;
136
- const u = r.length;
137
- let s = false;
138
- let d = 0;
139
- for (const y = Math.min(i, u); d < y; d++) {
140
- const i = r[d];
141
- const u = f[d];
137
+ const l = f.length;
138
+ const s = r.length;
139
+ let u = false;
140
+ let p = 0;
141
+ for (const y = Math.min(l, s); p < y; p++) {
142
+ const l = r[p];
143
+ const s = f[p];
142
144
  // Routing heuristic only (aligned vs keyed remainder) — both routes
143
145
  // notify identically and descend() is the one authoritative
144
146
  // validator, so bare typeof gates suffice here; full isWrappable
145
147
  // per row was the walk's dominant residual cost.
146
- if (u !== i && !(u !== null && typeof u === "object" && i !== null && typeof i === "object" && sameKey(n(u), n(i)))) break;
148
+ if (s !== l && !(s !== null && typeof s === "object" && l !== null && typeof l === "object" && sameKey(n(s), n(l)))) break;
147
149
  // misaligned: fall to the keyed remainder below
148
150
  // Identity skip inline (FINDING-1 guard), then descend the pair.
149
- if ((u !== i || i !== null && typeof i === "object" && ownedRaw.has(i)) && i !== null && typeof i === "object") descend(unwrapValue(u), i, n, l, o);
150
- if (e.dk !== null && !s && !(i !== null && typeof i === "object" ? targetsEqual(u, i) : isEqual(u, i))) {
151
+ if ((s !== l || l !== null && typeof l === "object" && isOwned(l)) && l !== null && typeof l === "object") descend(unwrapValue(s), l, n, i, o);
152
+ if (e.dk !== null && !u && !(l !== null && typeof l === "object" ? targetsEqual(s, l) : isEqual(s, l))) {
151
153
  bumpDeep(e);
152
- s = true;
154
+ u = true;
153
155
  }
154
156
  if (c !== null) {
155
- const e = c[d];
157
+ const e = c[p];
156
158
  if (e !== undefined) {
157
- p++;
158
- notifyKeyValue(e, d, a[d], i, a, t);
159
+ d++;
160
+ notifyKeyValue(e, p, a[p], l, a, t);
159
161
  }
160
162
  }
161
163
  }
162
- if (e.dk !== null && !s && d < r.length) bumpDeep(e);
163
- const y = d;
164
+ if (e.dk !== null && !u && p < r.length) bumpDeep(e);
165
+ const y = p;
164
166
  // misalignment point (== nlen on aligned ticks)
165
167
  let w = null;
166
- for (;d < r.length; d++) {
167
- const e = r[d];
168
+ for (;p < r.length; p++) {
169
+ const e = r[p];
168
170
  // typeof gates route; descend validates (same contract as the prefix).
169
171
  if (e !== null && typeof e === "object") {
170
172
  const t = n(e);
171
- let i;
173
+ let l;
172
174
  if (t !== undefined) {
173
175
  if (w === null) {
174
176
  // Occurrence-aware (re-audit 2, P1-5): duplicate keys queue
@@ -194,49 +196,49 @@ function applyAdopt(e, t, n, o = false) {
194
196
  }
195
197
  }
196
198
  const e = w.get(t);
197
- if (e === undefined) i = undefined; else if (Array.isArray(e)) {
198
- i = unwrapValue(f[e.shift()]);
199
+ if (e === undefined) l = undefined; else if (Array.isArray(e)) {
200
+ l = unwrapValue(f[e.shift()]);
199
201
  if (e.length === 1) w.set(t, e[0]);
200
202
  } else {
201
- i = unwrapValue(f[e]);
203
+ l = unwrapValue(f[e]);
202
204
  w.delete(t);
203
205
  }
204
206
  } else {
205
- i = unwrapValue(f[d]);
207
+ l = unwrapValue(f[p]);
206
208
  // keyless item: positional fallback
207
209
  }
208
- descend(i, e, n, l, o);
210
+ descend(l, e, n, i, o);
209
211
  }
210
212
  if (c !== null) {
211
- const e = c[d];
213
+ const e = c[p];
212
214
  if (e !== undefined) {
213
- p++;
214
- notifyKeyDiff(e, d, a, t, false);
215
+ d++;
216
+ notifyKeyDiff(e, p, a, t, false);
215
217
  }
216
218
  }
217
219
  }
218
220
  } else {
219
- const i = Math.min(f.length, r.length);
220
- const u = r.length;
221
- let d = false;
222
- for (let y = 0; y < u; y++) {
223
- const u = r[y];
224
- if (!s && y < i && u !== null && typeof u === "object") descend(unwrapValue(f[y]), u, n, l, o);
225
- if (e.dk !== null && !d && !(u !== null && typeof u === "object" ? targetsEqual(f[y], u) : isEqual(f[y], u))) {
221
+ const l = Math.min(f.length, r.length);
222
+ const s = r.length;
223
+ let p = false;
224
+ for (let y = 0; y < s; y++) {
225
+ const s = r[y];
226
+ if (!u && y < l && s !== null && typeof s === "object") descend(unwrapValue(f[y]), s, n, i, o);
227
+ if (e.dk !== null && !p && !(s !== null && typeof s === "object" ? targetsEqual(f[y], s) : isEqual(f[y], s))) {
226
228
  bumpDeep(e);
227
- d = true;
229
+ p = true;
228
230
  }
229
231
  if (c !== null) {
230
232
  const e = c[y];
231
233
  if (e !== undefined) {
232
- p++;
234
+ d++;
233
235
  notifyKeyDiff(e, y, a, t, false);
234
236
  }
235
237
  }
236
238
  }
237
239
  }
238
- if (u) {
239
- if (c !== null && p < e.nc) {
240
+ if (s) {
241
+ if (c !== null && d < e.nc) {
240
242
  for (const e of Reflect.ownKeys(c)) {
241
243
  // visited indexes are < nextRows.length; everything else sweeps
242
244
  const n = typeof e === "string" ? +e : NaN;
@@ -253,7 +255,7 @@ function applyAdopt(e, t, n, o = false) {
253
255
  // slots must not notify, R9). This replaces the notifyFold re-walk that
254
256
  // doubled dbmon's diff cost. for-in covers own enumerable string keys
255
257
  // with no key-array allocation; symbols get a pass only when present.
256
- const f = u ? e.n : null;
258
+ const f = s ? e.n : null;
257
259
  let r = 0;
258
260
  let c = false;
259
261
  // The per-key body is inlined on purpose (legacy applyStateFast parity:
@@ -261,45 +263,46 @@ function applyAdopt(e, t, n, o = false) {
261
263
  // site). Reference-identical values early-continue BEFORE any other
262
264
  // work — sound only with the ownership guard (FINDING-1: an owned
263
265
  // backing is setter-diverged and must still diff).
264
- for (const u in t) {
265
- const p = t[u];
266
- const d = a[u];
267
- const y = p !== null && typeof p === "object";
268
- if (d === p && (!y || !ownedRaw.has(p)) && (f === null || f[u] === undefined || !hasAccessorFlag(f[u]))) {
269
- if (f !== null && f[u] !== undefined) r++;
266
+ for (const s in t) {
267
+ const d = t[s];
268
+ const p = a[s];
269
+ const y = d !== null && typeof d === "object";
270
+ if (p === d && (!y || !isOwned(d)) && (f === null || f[s] === undefined || !hasAccessorFlag(f[s]))) {
271
+ if (f !== null && f[s] !== undefined) r++;
270
272
  continue;
271
273
  }
272
- if (y && !s) descend(unwrapValue(i[u]), p, n, l, o);
274
+ if (y && !u) descend(unwrapValue(l[s]), d, n, i, o);
273
275
  // Deep-witness (dk): value changes must notify even with NO per-key
274
276
  // node — deep() subscribes one node per record. Checked after descend
275
277
  // so in-place adoptions (same logical slot) don't bump; child records
276
278
  // carry their own witness. One flag + null check when unused.
277
- if (e.dk !== null && !c && !(y ? targetsEqual(d, p) : isEqual(d, p))) {
279
+ if (e.dk !== null && !c && !(y ? targetsEqual(p, d) : isEqual(p, d))) {
278
280
  bumpDeep(e);
279
281
  c = true;
280
282
  }
281
283
  if (f !== null) {
282
- const e = f[u];
284
+ const e = f[s];
283
285
  if (e !== undefined) {
284
286
  r++;
285
- notifyKeyValue(e, u, d, p, a, t);
287
+ notifyKeyValue(e, s, p, d, a, t);
286
288
  }
287
289
  }
288
290
  }
289
- const p = Object.getOwnPropertySymbols(t);
290
- for (let e = 0; e < p.length; e++) {
291
- const u = p[e];
292
- const c = t[u];
293
- if (!s && c !== null && typeof c === "object") descend(unwrapValue(i[u]), c, n, l, o);
291
+ const d = Object.getOwnPropertySymbols(t);
292
+ for (let e = 0; e < d.length; e++) {
293
+ const s = d[e];
294
+ if (s === $OWNER) continue;
295
+ const c = t[s];
296
+ if (!u && c !== null && typeof c === "object") descend(unwrapValue(l[s]), c, n, i, o);
294
297
  if (f !== null) {
295
- const e = f[u];
298
+ const e = f[s];
296
299
  if (e !== undefined) {
297
300
  r++;
298
- notifyKeyValue(e, u, a[u], c, a, t);
301
+ notifyKeyValue(e, s, a[s], c, a, t);
299
302
  }
300
303
  }
301
304
  }
302
- if (u) {
305
+ if (s) {
303
306
  // Deleted-key nodes (in the map but absent from incoming) — counted
304
307
  // fast-out: when every node was visited, skip the sweep entirely.
305
308
  if (f !== null && r < e.nc) {
@@ -330,8 +333,8 @@ function descend(e, t, n, o, f = false) {
330
333
  // wrappables acquire targets; rawValues never wrap) — one WeakMap get
331
334
  // replaces isWrappable(pv) + isRawValue(pv), and a miss prunes untracked
332
335
  // subtrees before any further checks.
333
- const l = (o?.map ?? storeNextLookup).get(e);
334
- if (l === undefined) return;
336
+ const i = lookupTarget(e, o);
337
+ if (i === undefined) return;
335
338
  // nothing proxied below this pair
336
339
  // The NEW side still validates fully: a frozen/platform/markRaw'd incoming
337
340
  // value is a leaf for reconcile — replaced by reference, never recursed
@@ -363,8 +366,8 @@ function descend(e, t, n, o, f = false) {
363
366
  // UNCONDITIONALLY (proj R6: the slot keeps its proxy without needing a
364
367
  // subscriber below); plain keyed reconcile detaches unobserved captures
365
368
  // (recon-snap R18 — staleness is the pinned pruning contract).
366
- if (!f && n !== null && !l.d) return;
367
- applyAdopt(l, t, n, f);
369
+ if (!f && n !== null && !i.d) return;
370
+ applyAdopt(i, t, n, f);
368
371
  }
369
372
 
370
373
  export { reconcileNextState, sameKey };