@monotykamary/dsh-file-reference-local 0.1.0 → 0.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/lib/index.js CHANGED
@@ -73,7 +73,6 @@ var WorkspaceFileSearch = class {
73
73
  promise: Promise.resolve([])
74
74
  };
75
75
  generation.promise = this.scanWorkspace(controller.signal).catch((error) => {
76
- /* v8 ignore next -- every owned abort clears `generation` synchronously; this only protects an unexpected scan failure */
77
76
  if (this.generation === generation) this.generation = void 0;
78
77
  throw error;
79
78
  });
@@ -89,7 +88,6 @@ var WorkspaceFileSearch = class {
89
88
  for (let cursor = 0; cursor < directories.length && indexed.length < this.config.maxEntries; cursor += 1) {
90
89
  signal.throwIfAborted();
91
90
  const directory = directories[cursor];
92
- /* v8 ignore next 3 -- cursor is bounded by this exact queue's length. */
93
91
  if (directory === void 0) throw new Error("file search selected a missing directory");
94
92
  const entries = await readDirectory(directory.absolute, signal);
95
93
  for (const entry of entries) {
@@ -141,7 +139,6 @@ async function resolveDisplayDirectory(root, displayDirectory, signal) {
141
139
  const absolute = resolve(resolvedRoot, displayDirectory === "" ? "." : displayDirectory);
142
140
  const fromRoot = relative(resolvedRoot, absolute);
143
141
  if (fromRoot === ".." || fromRoot.startsWith(`..${sep}`)) return void 0;
144
- /* v8 ignore next -- only Windows can produce a cross-volume absolute relative path */
145
142
  if (isAbsolute(fromRoot)) return void 0;
146
143
  let current = resolvedRoot;
147
144
  for (const segment of fromRoot.split(sep).filter(Boolean)) {
@@ -213,12 +210,9 @@ function kindRank(kind) {
213
210
  return kind === "directory" ? 0 : 1;
214
211
  }
215
212
  function compareText(left, right) {
216
- /* v8 ignore next -- entries and candidates are unique; host enumeration
217
- * order determines which comparison direction sort requests. */
218
213
  return left < right ? -1 : left > right ? 1 : 0;
219
214
  }
220
215
  function waitForPromise(promise, signal) {
221
- /* v8 ignore next -- `list()` checks this signal immediately before its synchronous call into this helper */
222
216
  if (signal.aborted) return Promise.reject(errorReason(signal.reason, "file search aborted"));
223
217
  return new Promise((resolvePromise, rejectPromise) => {
224
218
  const onAbort = () => {
@@ -80,7 +80,7 @@ export class WorkspaceFileSearch {
80
80
  promise: Promise.resolve([]),
81
81
  };
82
82
  generation.promise = this.scanWorkspace(controller.signal).catch((error) => {
83
- /* v8 ignore next -- every owned abort clears `generation` synchronously; this only protects an unexpected scan failure */
83
+ /* every owned abort clears `generation` synchronously; this only protects an unexpected scan failure */
84
84
  if (this.generation === generation)
85
85
  this.generation = undefined;
86
86
  throw error;
@@ -94,7 +94,7 @@ export class WorkspaceFileSearch {
94
94
  for (let cursor = 0; cursor < directories.length && indexed.length < this.config.maxEntries; cursor += 1) {
95
95
  signal.throwIfAborted();
96
96
  const directory = directories[cursor];
97
- /* v8 ignore next 3 -- cursor is bounded by this exact queue's length. */
97
+ /* cursor is bounded by this exact queue's length. */
98
98
  if (directory === undefined) {
99
99
  throw new Error('file search selected a missing directory');
100
100
  }
@@ -146,7 +146,7 @@ async function resolveDisplayDirectory(root, displayDirectory, signal) {
146
146
  const fromRoot = relative(resolvedRoot, absolute);
147
147
  if (fromRoot === '..' || fromRoot.startsWith(`..${sep}`))
148
148
  return undefined;
149
- /* v8 ignore next -- only Windows can produce a cross-volume absolute relative path */
149
+ /* only Windows can produce a cross-volume absolute relative path */
150
150
  if (isAbsolute(fromRoot))
151
151
  return undefined;
152
152
  let current = resolvedRoot;
@@ -232,12 +232,12 @@ function kindRank(kind) {
232
232
  return kind === 'directory' ? 0 : 1;
233
233
  }
234
234
  function compareText(left, right) {
235
- /* v8 ignore next -- entries and candidates are unique; host enumeration
235
+ /* entries and candidates are unique; host enumeration
236
236
  * order determines which comparison direction sort requests. */
237
237
  return left < right ? -1 : left > right ? 1 : 0;
238
238
  }
239
239
  function waitForPromise(promise, signal) {
240
- /* v8 ignore next -- `list()` checks this signal immediately before its synchronous call into this helper */
240
+ /* `list()` checks this signal immediately before its synchronous call into this helper */
241
241
  if (signal.aborted)
242
242
  return Promise.reject(errorReason(signal.reason, 'file search aborted'));
243
243
  return new Promise((resolvePromise, rejectPromise) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@monotykamary/dsh-file-reference-local",
3
3
  "description": "Local-filesystem ctx.fileReferences provider with bounded fuzzy indexes",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -40,19 +40,19 @@
40
40
  "@monotykamary/schemastery": "^3.18.1"
41
41
  },
42
42
  "peerDependencies": {
43
- "@monotykamary/dsh-agent": "^0.1.0",
44
- "@monotykamary/dsh-file-reference": "^0.1.0",
45
- "@monotykamary/dsh-invariants": "^0.1.0",
46
- "@monotykamary/dsh-system-prompt": "^0.1.0",
43
+ "@monotykamary/dsh-agent": "^0.1.1",
44
+ "@monotykamary/dsh-file-reference": "^0.1.1",
45
+ "@monotykamary/dsh-system-prompt": "^0.1.1",
46
+ "@monotykamary/dsh-tools": "^0.1.1",
47
47
  "@monotykamary/cordis": "^4.0.1",
48
- "@monotykamary/dsh-tools": "^0.1.0"
48
+ "@monotykamary/dsh-invariants": "^0.1.1"
49
49
  },
50
50
  "devDependencies": {
51
- "@monotykamary/dsh-agent": "^0.1.0",
52
- "@monotykamary/dsh-file-reference": "^0.1.0",
53
- "@monotykamary/dsh-invariants": "^0.1.0",
54
- "@monotykamary/dsh-tools": "^0.1.0",
55
- "@monotykamary/dsh-system-prompt": "^0.1.0",
56
- "@monotykamary/cordis": "^4.0.1"
51
+ "@monotykamary/dsh-agent": "^0.1.1",
52
+ "@monotykamary/dsh-tools": "^0.1.1",
53
+ "@monotykamary/cordis": "^4.0.1",
54
+ "@monotykamary/dsh-system-prompt": "^0.1.1",
55
+ "@monotykamary/dsh-file-reference": "^0.1.1",
56
+ "@monotykamary/dsh-invariants": "^0.1.1"
57
57
  }
58
58
  }