@lukekaalim/act-recon 1.1.0 → 1.1.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
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0017c07: Fix packages emitting debugging console logs
8
+
3
9
  ## 1.1.0
4
10
 
5
11
  ### Minor Changes
package/element.ts CHANGED
@@ -73,7 +73,6 @@ export const createElementService = (
73
73
  }
74
74
  case errorBoundaryType: {
75
75
  const error = CommitTree.getError(tree, ref.id);
76
- console.log(`Checking error boundary ${ref.id}`, error)
77
76
  if (error.state === 'error')
78
77
  output.child = null;
79
78
  break;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lukekaalim/act-recon",
3
3
  "type": "module",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "main": "mod.ts",
6
6
  "dependencies": {
7
7
  "@lukekaalim/act": "^3.1.0"
package/thread.ts CHANGED
@@ -46,7 +46,6 @@ export const WorkThread = {
46
46
  * Remove all changes from a particular commit onward
47
47
  */
48
48
  rollback(thread: WorkThread, from: CommitRef) {
49
- console.log(`rolling back changes from ${from.id} in thread`);
50
49
  thread.deltas.created = thread.deltas.created.filter(d => !isDescendant(from, d.ref));
51
50
  thread.deltas.updated = thread.deltas.updated.filter(d => !isDescendant(from, d.ref));
52
51
  thread.deltas.removed = thread.deltas.removed.filter(d => !isDescendant(from, d.ref));
@@ -63,7 +62,6 @@ export const WorkThread = {
63
62
  * */
64
63
  findClosestBoundary(thread: WorkThread, tree: CommitTree, ref: CommitRef): Commit | null {
65
64
  return last(ref.path, id => {
66
- console.log(ref.path, id);
67
65
  if (tree.commits.has(id)) {
68
66
  const commit = tree.commits.get(id) as Commit;
69
67
  if (commit.element.type === errorBoundaryType)
@@ -131,16 +129,12 @@ export const createThreadManager = (
131
129
  for (const delta of currentThread.deltas.removed)
132
130
  tree.commits.delete(delta.ref.id);
133
131
 
134
- console.log(currentThread.errorNotifications);
135
132
  for (const boundaryId of currentThread.errorNotifications) {
136
133
  const commit = tree.commits.get(boundaryId) as Commit;
137
134
  const { onError } = commit.element.props as ErrorBoundaryProps;
138
- console.log({commit});
139
135
  if (typeof onError === 'function') {
140
136
  const state = CommitTree.getError(tree, commit.id);
141
- console.log('informing the candidate')
142
137
  const clear = () => {
143
- console.log('clearing the error!')
144
138
  ErrorBoundaryState.clear(state);
145
139
  request(commit);
146
140
  }
@@ -176,7 +170,6 @@ export const createThreadManager = (
176
170
  updateOnPath.targets.push(target);
177
171
  }
178
172
  } else {
179
- console.log('adding pending task')
180
173
  pendingUpdateTargets.set(target.id, target);
181
174
  }
182
175
  } else {
@@ -212,7 +205,7 @@ export const createThreadManager = (
212
205
  if (identicalChange) {
213
206
  const isOnTargetPath = targets.some(target => target.path.includes(ref.id));
214
207
  if (!isOnTargetPath)
215
- return console.log('no action', prev.element);
208
+ return;
216
209
 
217
210
  const isSpecificallyTarget = targets.some(target => target.id === ref.id);
218
211
 
@@ -222,7 +215,7 @@ export const createThreadManager = (
222
215
 
223
216
  const commit = Commit.version(prev);
224
217
  thread.deltas.skipped.push({ next: commit });
225
- return console.log('skip', prev.element, targets);
218
+ return;
226
219
  }
227
220
  }
228
221
  if (next) {
@@ -236,7 +229,7 @@ export const createThreadManager = (
236
229
  WorkThread.notifyError(thread, errorBoundary);
237
230
 
238
231
  thread.pendingUpdates.push(Update.target(errorBoundary));
239
- return console.log('rewinding to boundary', next);
232
+ return;
240
233
  } else {
241
234
  console.error(output.reject);
242
235
  console.error(`No boundary to catch error: Unmounting roots`);
@@ -261,9 +254,9 @@ export const createThreadManager = (
261
254
  const commit = Commit.update(ref, next, childRefs);
262
255
 
263
256
  if (prev)
264
- (thread.deltas.updated.push({ ref, prev, next: commit }), console.log('update', commit.element));
257
+ thread.deltas.updated.push({ ref, prev, next: commit });
265
258
  else
266
- (thread.deltas.created.push({ ref, next: commit }), console.log('create', commit.element));
259
+ thread.deltas.created.push({ ref, next: commit });
267
260
 
268
261
  // Update tree
269
262
  //tree.commits.set(ref.id, commit);
@@ -275,7 +268,7 @@ export const createThreadManager = (
275
268
  thread.deltas.removed.push({ ref: prev, prev });
276
269
  thread.pendingUpdates.push(...prevChildren.map(prev => Update.remove(prev)));
277
270
  thread.pendingEffects.push(...output.effects);
278
- return console.log('remove', prev.element);
271
+ return;
279
272
  } else {
280
273
  throw new Error(`No prev, no next, did this commit ever exist?`)
281
274
  }