@rljson/fs-agent 0.0.76 → 0.0.78

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 +7 -3
  2. package/package.json +1 -1
package/dist/fs-agent.js CHANGED
@@ -964,6 +964,7 @@ class FsScanner {
964
964
  }
965
965
  async _notifyChange(change) {
966
966
  if (this._paused && !this._pauseLooksStuck(change)) {
967
+ this._missedChangesDuringPause = true;
967
968
  return;
968
969
  }
969
970
  for (const callback of this._changeCallbacks) {
@@ -1006,9 +1007,11 @@ class FsScanner {
1006
1007
  * Omit to pause until an explicit `resumeWatch()`.
1007
1008
  */
1008
1009
  pauseWatch(autoResumeMs) {
1009
- if (!this._paused) this._pausedAt = Date.now();
1010
+ if (!this._paused) {
1011
+ this._pausedAt = Date.now();
1012
+ this._missedChangesDuringPause = false;
1013
+ }
1010
1014
  this._paused = true;
1011
- this._missedChangesDuringPause = false;
1012
1015
  if (this._autoResumeTimer) {
1013
1016
  clearTimeout(this._autoResumeTimer);
1014
1017
  this._autoResumeTimer = null;
@@ -2131,7 +2134,8 @@ ${err.stack}` : String(err);
2131
2134
  return;
2132
2135
  }
2133
2136
  const dbAdapter = new FsDbAdapter(db, treeKey);
2134
- const parentRef = this._currentRef;
2137
+ const head = this._currentRef;
2138
+ const parentRef = head !== void 0 && head === tree.rootHash ? this._lastAppliedRef ?? head : head;
2135
2139
  const previous = await this._ancestryPrevious(
2136
2140
  db,
2137
2141
  treeKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rljson/fs-agent",
3
- "version": "0.0.76",
3
+ "version": "0.0.78",
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",