@ff-labs/fff-bun 0.5.2 → 0.5.3-nightly.0fd47ab

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ff-labs/fff-bun",
3
- "version": "0.5.2",
3
+ "version": "0.5.3-nightly.0fd47ab",
4
4
  "private": false,
5
5
  "description": "High-performance fuzzy file finder for Bun - perfect for LLM agent tools",
6
6
  "type": "module",
@@ -62,14 +62,14 @@
62
62
  },
63
63
  "homepage": "https://github.com/dmtrKovalenko/fff.nvim#readme",
64
64
  "optionalDependencies": {
65
- "@ff-labs/fff-bin-darwin-arm64": "0.5.2",
66
- "@ff-labs/fff-bin-darwin-x64": "0.5.2",
67
- "@ff-labs/fff-bin-linux-x64-gnu": "0.5.2",
68
- "@ff-labs/fff-bin-linux-arm64-gnu": "0.5.2",
69
- "@ff-labs/fff-bin-linux-x64-musl": "0.5.2",
70
- "@ff-labs/fff-bin-linux-arm64-musl": "0.5.2",
71
- "@ff-labs/fff-bin-win32-x64": "0.5.2",
72
- "@ff-labs/fff-bin-win32-arm64": "0.5.2"
65
+ "@ff-labs/fff-bin-darwin-arm64": "0.5.3-nightly.0fd47ab",
66
+ "@ff-labs/fff-bin-darwin-x64": "0.5.3-nightly.0fd47ab",
67
+ "@ff-labs/fff-bin-linux-x64-gnu": "0.5.3-nightly.0fd47ab",
68
+ "@ff-labs/fff-bin-linux-arm64-gnu": "0.5.3-nightly.0fd47ab",
69
+ "@ff-labs/fff-bin-linux-x64-musl": "0.5.3-nightly.0fd47ab",
70
+ "@ff-labs/fff-bin-linux-arm64-musl": "0.5.3-nightly.0fd47ab",
71
+ "@ff-labs/fff-bin-win32-x64": "0.5.3-nightly.0fd47ab",
72
+ "@ff-labs/fff-bin-win32-arm64": "0.5.3-nightly.0fd47ab"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@types/bun": "^1.3.8",
@@ -309,6 +309,48 @@ describe.skipIf(process.platform === "win32")("Git lifecycle integration", () =>
309
309
  expect(result.value.items.length).toBe(0);
310
310
  });
311
311
 
312
+ test("file in a newly created directory is discoverable", async () => {
313
+ // Create a brand-new directory that didn't exist during the initial scan,
314
+ // then add a file inside it. The watcher must dynamically pick up the new
315
+ // directory and index the file.
316
+ mkdirSync(join(tmpDir, "lib"));
317
+ writeFileSync(
318
+ join(tmpDir, "lib", "helpers.ts"),
319
+ "export function add(a: number, b: number) { return a + b; }\n",
320
+ );
321
+
322
+ const helpers = await waitForFile(finder, "helpers.ts");
323
+ expect(helpers).toBeDefined();
324
+ expect(helpers?.relativePath).toBe("lib/helpers.ts");
325
+ });
326
+
327
+ test("files in gitignored directories are not indexed", async () => {
328
+ // Commit a .gitignore rule first so it's established repo state before
329
+ // the ignored directory is created. This tests the watch-level filtering
330
+ // (is_path_ignored in the debouncer callback), not a rescan triggered
331
+ // by a .gitignore change.
332
+ writeFileSync(join(tmpDir, ".gitignore"), "build_output/\n");
333
+ git(tmpDir, "add", ".gitignore");
334
+ git(tmpDir, "commit", "-m", "add gitignore");
335
+
336
+ // Wait for the watcher to settle after the commit.
337
+ await waitForFile(finder, ".gitignore");
338
+
339
+ // Now create the ignored directory and add a file inside it.
340
+ mkdirSync(join(tmpDir, "build_output"));
341
+ writeFileSync(join(tmpDir, "build_output", "artifact.bin"), "should not appear\n");
342
+
343
+ // Create a non-ignored file as a synchronisation barrier — once it's
344
+ // indexed, the watcher has processed the same batch of events.
345
+ writeFileSync(join(tmpDir, "canary.txt"), "visible\n");
346
+ const canary = await waitForFile(finder, "canary.txt");
347
+ expect(canary).toBeDefined();
348
+
349
+ // The ignored file must NOT appear in the index.
350
+ const artifact = findFile(finder, "artifact.bin");
351
+ expect(artifact).toBeUndefined();
352
+ });
353
+
312
354
  test("full add-commit cycle for subdirectory file", async () => {
313
355
  git(tmpDir, "add", "src/utils.rs");
314
356