@lukekaalim/act-recon 3.0.0-alpha.0 → 3.0.0-alpha.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lukekaalim/act-recon
2
2
 
3
+ ## 3.0.0-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fdf1557: Fixed issue with multiple changes (where changes after first were children of first) being ignored due to "MustVisit" being misinput each time
8
+
3
9
  ## 3.0.0-alpha.0
4
10
 
5
11
  ### Major Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lukekaalim/act-recon",
3
3
  "type": "module",
4
- "version": "3.0.0-alpha.0",
4
+ "version": "3.0.0-alpha.1",
5
5
  "main": "mod.ts",
6
6
  "dependencies": {
7
7
  "@lukekaalim/act": "^3.2.0"
package/thread.ts CHANGED
@@ -185,8 +185,9 @@ const queueWorkThreadTarget = (thread: WorkThread, ref: CommitRef, tree: CommitT
185
185
  // lead to this commit. If so, make sure ancestor commit
186
186
  // is on the MustVisit so they should make their way down
187
187
  // eventually
188
- for (const id of [...ref.path].reverse().slice(1)) {
189
- thread.mustVisit.set(ref.id, ref);
188
+ for (let i = ref.path.length - 1; i >= 0; i--) {
189
+ const id = ref.path[i];
190
+ thread.mustVisit.add(id);
190
191
 
191
192
  for (const update of thread.pendingUpdates) {
192
193
  // Found an ancestor pending update - it should
@@ -221,7 +222,7 @@ export type WorkThread = {
221
222
  reasons: WorkReason[],
222
223
 
223
224
  mustRender: Map<CommitID, CommitRef>,
224
- mustVisit: Map<CommitID, CommitRef>,
225
+ mustVisit: Set<CommitID>,
225
226
 
226
227
  pendingUpdates: Update[],
227
228
  pendingEffects: EffectTask[],
@@ -242,7 +243,7 @@ export const cloneWorkThread = (thread: WorkThread): WorkThread => {
242
243
  pendingUpdates: [...thread.pendingUpdates],
243
244
  errorNotifications: new Map(thread.errorNotifications),
244
245
 
245
- mustVisit: new Map(thread.mustVisit),
246
+ mustVisit: new Set(thread.mustVisit),
246
247
  mustRender: new Map(thread.mustRender),
247
248
 
248
249
  visited: new Map(thread.visited),
@@ -259,7 +260,7 @@ export const WorkThread = {
259
260
  pendingUpdates: [],
260
261
  errorNotifications: new Map(),
261
262
 
262
- mustVisit: new Map(),
263
+ mustVisit: new Set(),
263
264
  mustRender: new Map(),
264
265
 
265
266
  visited: new Map(),