grepmax 0.7.14 → 0.7.15

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.
@@ -58,7 +58,7 @@ const logger_1 = require("../utils/logger");
58
58
  const meta_cache_1 = require("../store/meta-cache");
59
59
  const vector_db_1 = require("../store/vector-db");
60
60
  const filter_builder_1 = require("../utils/filter-builder");
61
- const file_utils_1 = require("../utils/file-utils");
61
+ // isIndexableFile no longer used — extension check inlined for performance
62
62
  const lock_1 = require("../utils/lock");
63
63
  const project_registry_1 = require("../utils/project-registry");
64
64
  const project_root_1 = require("../utils/project-root");
@@ -329,19 +329,13 @@ function initialSync(options) {
329
329
  break;
330
330
  }
331
331
  const absPath = path.join(paths.root, relPath);
332
- // Check real path to avoid duplicates and loops
333
- try {
334
- const realPath = fs.realpathSync(absPath);
335
- if (visitedRealPaths.has(realPath))
336
- continue;
337
- visitedRealPaths.add(realPath);
338
- }
339
- catch (_g) {
340
- // Skip broken symlinks or inaccessible files
332
+ // Extension check only no stat syscall
333
+ const ext = path.extname(absPath).toLowerCase();
334
+ const basename = path.basename(absPath).toLowerCase();
335
+ if (!config_1.INDEXABLE_EXTENSIONS.has(ext) &&
336
+ !config_1.INDEXABLE_EXTENSIONS.has(basename)) {
341
337
  continue;
342
338
  }
343
- if (!(0, file_utils_1.isIndexableFile)(absPath))
344
- continue;
345
339
  walkedFiles++;
346
340
  yield schedule(() => __awaiter(this, void 0, void 0, function* () {
347
341
  if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
@@ -349,8 +343,20 @@ function initialSync(options) {
349
343
  return;
350
344
  }
351
345
  try {
352
- const stats = yield fs.promises.stat(absPath);
353
- if (!(0, file_utils_1.isIndexableFile)(absPath, stats.size)) {
346
+ // Stat + symlink dedup (lstat to detect symlinks without resolving)
347
+ const stats = yield fs.promises.lstat(absPath);
348
+ if (stats.isSymbolicLink()) {
349
+ try {
350
+ const realPath = yield fs.promises.realpath(absPath);
351
+ if (visitedRealPaths.has(realPath))
352
+ return;
353
+ visitedRealPaths.add(realPath);
354
+ }
355
+ catch (_a) {
356
+ return; // Broken symlink
357
+ }
358
+ }
359
+ if (!stats.isFile() || stats.size === 0 || stats.size > config_1.MAX_FILE_SIZE_BYTES) {
354
360
  return;
355
361
  }
356
362
  // Use absolute path as the key for MetaCache
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.7.14",
3
+ "version": "0.7.15",
4
4
  "author": "Robert Owens <robowens@me.com>",
5
5
  "homepage": "https://github.com/reowens/grepmax",
6
6
  "bugs": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.7.14",
3
+ "version": "0.7.15",
4
4
  "description": "Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.",
5
5
  "author": {
6
6
  "name": "Robert Owens",