@vibe-agent-toolkit/utils 0.1.42 → 0.2.0-rc.2

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 (51) hide show
  1. package/README.md +19 -3
  2. package/dist/file-crawler.d.ts.map +1 -1
  3. package/dist/file-crawler.js +88 -2
  4. package/dist/file-crawler.js.map +1 -1
  5. package/dist/fs-utils.d.ts +389 -30
  6. package/dist/fs-utils.d.ts.map +1 -1
  7. package/dist/fs-utils.js +425 -56
  8. package/dist/fs-utils.js.map +1 -1
  9. package/dist/fs.d.ts +2 -1
  10. package/dist/fs.d.ts.map +1 -1
  11. package/dist/fs.js +7 -1
  12. package/dist/fs.js.map +1 -1
  13. package/dist/git-root-cache.d.ts +44 -0
  14. package/dist/git-root-cache.d.ts.map +1 -0
  15. package/dist/git-root-cache.js +68 -0
  16. package/dist/git-root-cache.js.map +1 -0
  17. package/dist/git-utils.d.ts +11 -0
  18. package/dist/git-utils.d.ts.map +1 -1
  19. package/dist/git-utils.js +28 -8
  20. package/dist/git-utils.js.map +1 -1
  21. package/dist/index.d.ts +3 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +37 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/numeric-args.d.ts +24 -0
  26. package/dist/numeric-args.d.ts.map +1 -0
  27. package/dist/numeric-args.js +37 -0
  28. package/dist/numeric-args.js.map +1 -0
  29. package/dist/path-core.d.ts +30 -0
  30. package/dist/path-core.d.ts.map +1 -1
  31. package/dist/path-core.js +32 -0
  32. package/dist/path-core.js.map +1 -1
  33. package/dist/path.d.ts +1 -1
  34. package/dist/path.d.ts.map +1 -1
  35. package/dist/path.js +1 -1
  36. package/dist/path.js.map +1 -1
  37. package/dist/project-utils.d.ts +7 -1
  38. package/dist/project-utils.d.ts.map +1 -1
  39. package/dist/project-utils.js +9 -1
  40. package/dist/project-utils.js.map +1 -1
  41. package/dist/test-helpers.d.ts +16 -0
  42. package/dist/test-helpers.d.ts.map +1 -1
  43. package/dist/test-helpers.js +28 -1
  44. package/dist/test-helpers.js.map +1 -1
  45. package/eslint/README.md +1 -1
  46. package/eslint/rules/dead-import.cjs +61 -11
  47. package/eslint/rules/eslint-rule-factory.cjs +16 -1
  48. package/eslint/rules/no-manual-path-normalize.cjs +24 -3
  49. package/eslint/rules/path-function-rule-factory.cjs +99 -20
  50. package/eslint/rules/prefer-startswith-over-regex.cjs +24 -1
  51. package/package.json +2 -2
package/README.md CHANGED
@@ -22,10 +22,10 @@ The last two columns are the ones that matter when choosing. **"Resolves with ze
22
22
 
23
23
  | Subpath | Contents | Node builtins reached | Third-party | Resolves with zero deps installed? |
24
24
  |---|---|---|---|---|
25
- | `./path` | `safePath`, `toForwardSlash`, `isAbsolutePath`, `isAbsoluteAnyPlatform`, `hasParentTraversalSegment`, `toAbsolutePath`, `getRelativePath`, `issueLocation` | `path` only | — | **yes** |
25
+ | `./path` | `safePath`, `toForwardSlash`, `toNfc`, `isAbsolutePath`, `isAbsoluteAnyPlatform`, `hasParentTraversalSegment`, `toAbsolutePath`, `getRelativePath`, `issueLocation` | `path` only | — | **yes** |
26
26
  | `./zod` | `ZodTypeNames`, `getZodTypeName`, `isZodType`, `unwrapZodType`, `isZodOptional`, `isZodNullable` | **none** | — | **yes** |
27
27
  | `./glob` | `isGlob`, static base extraction, magic remainder | `path` only | — | **yes** |
28
- | `./fs` | `normalizePath`, `normalizedTmpdir`, `mkdirSyncReal`, `resolveFromImportMeta`, `dynamicImportPath`, `copyDirectory`, `verifyCaseSensitiveFilename`, `FsLookupCache` | `fs`, `fs/promises`, `os`, `path`, `url` | — | **yes** |
28
+ | `./fs` | `normalizePath`, `normalizedTmpdir`, `mkdirSyncReal`, `resolveFromImportMeta`, `dynamicImportPath`, `copyDirectory`, `fillSiblingNames`, `classifyFilenameCaseFrom`, `FsLookupCache` | `fs`, `fs/promises`, `os`, `path`, `url` | — | **yes** |
29
29
  | `./testing` | `getTestOutputDir`, `getTestOutputBase`, `setupAsyncTempDirSuite`, `setupSyncTempDirSuite` | `crypto`, `fs`, `fs/promises`, `os`, `path`, `url` | — | **yes** |
30
30
  | `./asset` | `resolveAssetReference` — paths and npm bare specifiers | `fs`, `module`, `os`, `path`, `url` | — | **yes** |
31
31
  | `./yaml` | `updateYamlIn`, `verifyConfinedYamlEdit` — byte-surgical YAML edits | **none** | `yaml` | no — needs `yaml` |
@@ -120,12 +120,24 @@ These always return forward slashes on every platform, so they are safe for comp
120
120
 
121
121
  - `safePath.join()` / `.resolve()` / `.relative()` - forward-slash equivalents of the `node:path` functions
122
122
  - `toForwardSlash()` - explicit converter for any path string
123
+ - `toNfc()` - Unicode-NFC normalizer for filename **comparison keys** (see the warning below)
123
124
  - `toAbsolutePath()` - resolve a path relative to a base directory
124
125
  - `getRelativePath()` - relative path between two absolute paths
125
126
  - `isAbsolutePath()` / `isAbsoluteAnyPlatform()` - absolute-path predicates
126
127
  - `hasParentTraversalSegment()` - detect `..` segments before using a caller-supplied path
127
128
  - `issueLocation()` - format a `file:line`-style location relative to a project root
128
129
 
130
+ ⚠️ **`toNfc()` produces a comparison key, never a path to open.** The same visible filename has two
131
+ Unicode encodings — precomposed NFC (`é` = `U+00E9`) and decomposed NFD (`e` + `U+0301`). They are
132
+ different strings, so `===`, `toLowerCase()`, `Map.get()` and `Set.has()` all call them different,
133
+ and `readdir` returns whichever form is on disk (commonly decomposed on macOS) while a markdown link
134
+ typed in an editor carries the composed one. Normalize wherever two such strings are **compared** —
135
+ a `Map` key derived from enumeration and queried from link text, a basename checked against a
136
+ directory listing. Do **not** normalize a path on its way to `fs.*`: macOS would not notice (its
137
+ lookup is normalization-insensitive), but on Linux the two forms are different byte sequences naming
138
+ different files, so opening the normalized form of a decomposed filename fails outright. That is why
139
+ this is a separate helper rather than something `safePath.resolve()` does.
140
+
129
141
  ### Filesystem — `@vibe-agent-toolkit/utils/fs`
130
142
 
131
143
  These return **OS-native** separators, because they resolve real filesystem identity via `realpathSync.native()` (which is what resolves Windows 8.3 short names). Wrap with `toForwardSlash()` if you need forward slashes.
@@ -138,7 +150,11 @@ These return **OS-native** separators, because they resolve real filesystem iden
138
150
  - `resolveFromImportMeta()` - resolve paths relative to an `import.meta.url`
139
151
  - `dynamicImportPath()` - `import()` an absolute path (works on Windows, which rejects bare absolute paths)
140
152
  - `copyDirectory()`
141
- - `verifyCaseSensitiveFilename(filePath, fsCache)` - case-exact existence check; takes a per-run `FsLookupCache`
153
+ - `fillSiblingNames(filePaths, fsCache)` - pass 1 of the case-exact existence check: list the parent
154
+ directory of every path, de-duplicated by directory and issued concurrently. The only I/O in the pair
155
+ - `classifyFilenameCaseFrom(table, filePath)` - pass 2: pure judgement against the table pass 1 returned,
156
+ reporting the entry actually on disk when only the case differs. Fill **once** over the whole set and
157
+ then judge each path — a fill per path reinstates the serialized `readdir` this shape removes
142
158
  - `FsLookupCache` - per-run memo for `realpath`/`readdir`, sharing in-flight promises. Construct one per
143
159
  validation run and let it die with the run — never a module-level singleton, or a long-lived process
144
160
  answers from a stale directory listing.
@@ -1 +1 @@
1
- {"version":3,"file":"file-crawler.d.ts","sourceRoot":"","sources":["../src/file-crawler.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAkBD;;;;;;;;;;;;;;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AE,YAAY,GAAG,MAAM,EAAE,CAqQlE"}
@@ -134,6 +134,27 @@ export function crawlDirectorySync(options) {
134
134
  includeUntracked,
135
135
  });
136
136
  if (gitFiles !== null) {
137
+ // ⚠️ KNOWN DIVERGENCE: this branch ignores `followSymlinks`.
138
+ //
139
+ // `git ls-files` returns symlinks as mode-120000 entries like any other
140
+ // path, and nothing below filters them out — whereas the manual walk
141
+ // (see `processSymlink`) returns early unless `followSymlinks` is set.
142
+ // So the SAME tree with the SAME options has a different population
143
+ // depending only on whether a `.git` exists above it.
144
+ //
145
+ // A committed dangling `*.md` symlink returned from here no longer
146
+ // terminates the command: `ResourceRegistry.addResources` records the
147
+ // read failure and reports it as RESOURCE_UNREADABLE. The population
148
+ // divergence itself is still live.
149
+ //
150
+ // Pinned (as today's behaviour, deliberately) by
151
+ // packages/cli/test/integration/enumeration-symlink-divergence.integration.test.ts.
152
+ // Making the two routes agree changes enumeration on real corpora — in
153
+ // one of two opposite directions, since excluding symlinks here drops
154
+ // committed content while including them in the walk grows the off-git
155
+ // population — so it is a product decision with its own changelog
156
+ // entry, not a drive-by fix here.
157
+ //
137
158
  // Git ls-files succeeded - filter using glob patterns
138
159
  const isIncluded = picomatch(include, picoOptions);
139
160
  const isExcluded = exclude.length > 0 ? picomatch(exclude, picoOptions) : () => false;
@@ -156,6 +177,23 @@ export function crawlDirectorySync(options) {
156
177
  const isIncluded = picomatch(include, picoOptions);
157
178
  const isExcluded = exclude.length > 0 ? picomatch(exclude, picoOptions) : () => false;
158
179
  const results = [];
180
+ /**
181
+ * Real paths of directories already walked, maintained ONLY when following
182
+ * symlinks — it is what makes a directory symlink safe to traverse.
183
+ *
184
+ * A symlinked directory can be re-entered without limit (`a/loop -> a`) and
185
+ * can be reached under two names (`alias-one -> real`, `alias-two -> real`).
186
+ * Both enumerate one blob many times under distinct paths, so each row gets
187
+ * its own generated id and its own bundle entry. The loop terminated before
188
+ * this guard existed, but only because the kernel eventually refuses to
189
+ * resolve further symlinks — a limit that is 32 on macOS and 40 on Linux, so
190
+ * the POPULATION depended on the operating system, and the walk ended inside
191
+ * `processSymlink`'s catch for BROKEN links, which reported nothing.
192
+ *
193
+ * Left empty when `followSymlinks` is false: without symlink traversal a
194
+ * directory cannot be reached twice, so the default path pays no `realpath`.
195
+ */
196
+ const visitedRealDirs = new Set();
159
197
  /**
160
198
  * Check if a path should be excluded based on patterns
161
199
  */
@@ -171,6 +209,32 @@ export function crawlDirectorySync(options) {
171
209
  results.push(absolute ? fullPath : relativePath);
172
210
  }
173
211
  }
212
+ /**
213
+ * Record a directory as walked, reporting whether it had already been seen.
214
+ *
215
+ * Identity is `realpathSync.native`, not the traversal path: two names for
216
+ * one directory must collide here or the alias is enumerated twice. A
217
+ * directory whose real path cannot be read is treated as already-walked —
218
+ * refusing to descend into something we cannot identify is the safe side of
219
+ * a guard whose whole job is bounding traversal.
220
+ *
221
+ * @param dir - Directory about to be walked
222
+ * @returns True when this directory has been walked before
223
+ */
224
+ function alreadyWalked(dir) {
225
+ let realPath;
226
+ try {
227
+ realPath = fs.realpathSync.native(dir);
228
+ }
229
+ catch {
230
+ return true;
231
+ }
232
+ if (visitedRealDirs.has(realPath)) {
233
+ return true;
234
+ }
235
+ visitedRealDirs.add(realPath);
236
+ return false;
237
+ }
174
238
  /**
175
239
  * Process a symbolic link entry
176
240
  */
@@ -216,6 +280,9 @@ export function crawlDirectorySync(options) {
216
280
  * Recursively walk directory tree
217
281
  */
218
282
  function walkDirectory(currentDir) {
283
+ if (followSymlinks && alreadyWalked(currentDir)) {
284
+ return;
285
+ }
219
286
  let entries;
220
287
  try {
221
288
  // eslint-disable-next-line security/detect-non-literal-fs-filename -- path constructed from validated baseDir, recursively walking
@@ -225,6 +292,19 @@ export function crawlDirectorySync(options) {
225
292
  // Skip directories we don't have permission to read
226
293
  return;
227
294
  }
295
+ // Two passes, not one: `readdirSync` order is filesystem-defined (see
296
+ // the comment on `alreadyWalked`), and both a real directory and a
297
+ // symlink alias pointing at it go through the same `alreadyWalked` gate,
298
+ // keyed only on realpath. Whichever spelling is dispatched FIRST claims
299
+ // that realpath in `visitedRealDirs`, and the second is then skipped as
300
+ // "already walked" — so if the alias happened to sort first, the
301
+ // directory's contents would be recorded under the alias's name and the
302
+ // real directory would be skipped entirely. Walking every non-symlink
303
+ // entry to completion before any symlink entry guarantees a real
304
+ // directory always claims its own realpath first; an alias reaching the
305
+ // same realpath afterward is correctly skipped by `alreadyWalked`. Only
306
+ // the ORDER of dispatch changes here — per-entry logic is unchanged.
307
+ const symlinkEntries = [];
228
308
  for (const entry of entries) {
229
309
  const fullPath = safePath.join(currentDir, entry.name);
230
310
  const relativePath = safePath.relative(resolvedBaseDir, fullPath);
@@ -233,9 +313,9 @@ export function crawlDirectorySync(options) {
233
313
  if (shouldExclude(normalizedPath)) {
234
314
  continue;
235
315
  }
236
- // Dispatch to appropriate handler based on entry type
316
+ // Defer symlinks to the second pass; dispatch everything else now.
237
317
  if (entry.isSymbolicLink()) {
238
- processSymlink(fullPath, normalizedPath, relativePath);
318
+ symlinkEntries.push(entry);
239
319
  }
240
320
  else if (entry.isDirectory()) {
241
321
  processDirectory(fullPath, normalizedPath, relativePath);
@@ -244,6 +324,12 @@ export function crawlDirectorySync(options) {
244
324
  processFile(normalizedPath, fullPath, relativePath);
245
325
  }
246
326
  }
327
+ for (const entry of symlinkEntries) {
328
+ const fullPath = safePath.join(currentDir, entry.name);
329
+ const relativePath = safePath.relative(resolvedBaseDir, fullPath);
330
+ const normalizedPath = toForwardSlash(relativePath);
331
+ processSymlink(fullPath, normalizedPath, relativePath);
332
+ }
247
333
  }
248
334
  // Start recursive walk from base directory
249
335
  walkDirectory(resolvedBaseDir);
@@ -1 +1 @@
1
- {"version":3,"file":"file-crawler.js","sourceRoot":"","sources":["../src/file-crawler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,UAA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