refactor(core): replace CommonJS requires with named imports (#31)

This commit is contained in:
tommy0103
2026-08-04 05:49:51 +08:00
committed by GitHub
parent 47df0fe76a
commit 1941e64572
6 changed files with 76 additions and 82 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
// Passive-pull indexing orchestration for the Core package.
import { existsSync } from 'node:fs';
import { DB_PATH, openDb, openReadDb, openWriterLeaseDb, rebuildMemoryFts } from './db.ts';
import { fs, inferProjectPath } from './parsing.ts';
import { inferProjectPath } from './parsing.ts';
import {
createProviderIndexPlan,
indexProviderPlan,
@@ -67,7 +68,7 @@ function isMissingIndexStateTable(error: unknown): boolean {
}
function inspectBuildOwnership({ force = false }: { force?: boolean } = {}) {
if (!fs.existsSync(DB_PATH)) return { skip: false };
if (!existsSync(DB_PATH)) return { skip: false };
const db = openReadDb();
try {
return shouldSkipBuild(db, { ignoreRecentBuild: force });