diff --git a/index.ts b/index.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/core/scanner.ts b/src/core/scanner.ts index 713df68..13c8217 100644 --- a/src/core/scanner.ts +++ b/src/core/scanner.ts @@ -29,7 +29,7 @@ export async function scanChanges( const fileName = `${docConfig.name}.md`; const completed = mdFiles.has(fileName); const deps = docConfig.depend ?? []; - const dependMet = deps.length === 0 || deps.every((dep) => mdFiles.has(`${dep}.md`)); + const dependMet = deps.every((dep) => mdFiles.has(`${dep}.md`)); return { name: docConfig.name, completed, dependMet }; }); } else { diff --git a/tests/cli/map-error.test.ts b/tests/cli/map-error.test.ts index 0b3dcad..149a96f 100644 --- a/tests/cli/map-error.test.ts +++ b/tests/cli/map-error.test.ts @@ -1,11 +1,5 @@ import { describe, it, expect } from "bun:test"; -import { - CliError, - UsageError, - ConfigError, - CommandError, - InternalError, -} from "../../src/cli/errors.ts"; +import { UsageError, ConfigError, InternalError } from "../../src/cli/errors.ts"; import { mapError } from "../../src/cli.ts"; describe("mapError", () => { diff --git a/tests/cli/output.test.ts b/tests/cli/output.test.ts index b5996e1..6a43fa9 100644 --- a/tests/cli/output.test.ts +++ b/tests/cli/output.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from "bun:test"; import { formatError } from "../../src/cli/output.ts"; -import { UsageError, ConfigError, CommandError, InternalError } from "../../src/cli/errors.ts"; +import { UsageError, ConfigError, InternalError } from "../../src/cli/errors.ts"; describe("formatError", () => { it("只输出错误行(无 hint/usage)", () => { diff --git a/tests/integration/flow.test.ts b/tests/integration/flow.test.ts index 79a9f20..167d288 100644 --- a/tests/integration/flow.test.ts +++ b/tests/integration/flow.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, beforeEach, afterEach } from "bun:test"; import { existsSync } from "node:fs"; -import { mkdir, writeFile, rm, readFile, rename } from "node:fs/promises"; +import { mkdir, writeFile, rm, rename } from "node:fs/promises"; import { join } from "node:path"; import { runInit } from "../../src/commands/init.ts"; import { loadConfig, getChangeDir, getArchiveDir } from "../../src/core/config.ts";