@rljson/fs-agent 0.0.52 → 0.0.54

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 +5 -2
  2. package/package.json +1 -1
package/dist/fs-agent.js CHANGED
@@ -2505,12 +2505,15 @@ ${err.stack}` : String(err);
2505
2505
  const ancestryExpected = this._resolveConflicts;
2506
2506
  const declaresAncestry = (predecessorRefs?.length ?? 0) > 0;
2507
2507
  const ancestryIsCarried = connector.syncConfig?.causalOrdering === true;
2508
- const senderSawMyState = !ancestryIsCarried || this._currentRef !== void 0 && (predecessorRefs?.includes(this._currentRef) ?? false);
2508
+ const statesIAmIn = [this._currentRef, this._lastAppliedRef].filter(
2509
+ (r) => r !== void 0
2510
+ );
2511
+ const senderSawMyState = !ancestryIsCarried || !declaresAncestry || statesIAmIn.some((r) => predecessorRefs.includes(r));
2509
2512
  const withholdPrune = restoreOptions?.cleanTarget && (ancestryExpected && !declaresAncestry || !senderSawMyState);
2510
2513
  const applyOptions = withholdPrune ? { ...restoreOptions, cleanTarget: false } : restoreOptions;
2511
2514
  if (applyOptions !== restoreOptions) {
2512
2515
  console.warn(
2513
- `[FsAgent] ref=${treeRef.slice(0, 8)}… ` + (declaresAncestry ? `descends from ${predecessorRefs?.map((r) => r.slice(0, 8)).join(", ")}, not from the state this node is in (${this._currentRef?.slice(0, 8) ?? "none"})` : "declares no ancestry") + ` — applying additively, not pruning.`
2516
+ `[FsAgent] ref=${treeRef.slice(0, 8)}… ` + (declaresAncestry ? `descends from ${predecessorRefs?.map((r) => r.slice(0, 8)).join(", ")}, not from a state this node is in (${statesIAmIn.map((r) => r.slice(0, 8)).join(", ") || "none"})` : "declares no ancestry") + ` — applying additively, not pruning.`
2514
2517
  );
2515
2518
  }
2516
2519
  if (restoreOptions?.cleanTarget) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rljson/fs-agent",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
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",