@rljson/fs-agent 0.0.44 → 0.0.45

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 (2) hide show
  1. package/dist/fs-agent.js +4 -8
  2. package/package.json +1 -1
package/dist/fs-agent.js CHANGED
@@ -2102,8 +2102,7 @@ ${err.stack}` : String(err);
2102
2102
  const prevRefsOf = /* @__PURE__ */ new Map();
2103
2103
  for (const r of rows) {
2104
2104
  const prev = (r.previous ?? []).map((t) => refOfTimeId.get(t)).filter((x) => x !== void 0);
2105
- const existing = prevRefsOf.get(r[refKey]);
2106
- prevRefsOf.set(r[refKey], existing ? [...existing, ...prev] : prev);
2105
+ prevRefsOf.set(r[refKey], prev);
2107
2106
  }
2108
2107
  const ancestorsOf = (startRefs) => {
2109
2108
  const seen = /* @__PURE__ */ new Set();
@@ -2428,21 +2427,18 @@ ${err.stack}` : String(err);
2428
2427
  this._adoptAppliedRef(connector, treeRef);
2429
2428
  return;
2430
2429
  }
2431
- if (this._currentRef) {
2430
+ if (this._resolveConflicts && this._currentRef && predecessorRefs && predecessorRefs.length > 0) {
2432
2431
  const relation = await this._ancestryRelation(
2433
2432
  db,
2434
2433
  treeKey,
2435
2434
  this._currentRef,
2436
2435
  treeRef,
2437
- predecessorRefs ?? []
2436
+ predecessorRefs
2438
2437
  );
2439
2438
  if (relation === "ahead") {
2440
- console.warn(
2441
- `[FsAgent] ref=${treeRef.slice(0, 8)}… is an ancestor of the state this agent already holds — ignoring.`
2442
- );
2443
2439
  return;
2444
2440
  }
2445
- if (relation === "diverged" && this._resolveConflicts && predecessorRefs !== void 0 && predecessorRefs.length > 0) {
2441
+ if (relation === "diverged") {
2446
2442
  await this._resolveConflictInline(
2447
2443
  db,
2448
2444
  treeKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rljson/fs-agent",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "description": "Rljson fs-agent description",
5
5
  "homepage": "https://github.com/rljson/fs-agent",
6
6
  "bugs": "https://github.com/rljson/fs-agent/issues",