Skip to content

Commit f682575

Browse files
dcramerclaude
andcommitted
chore: Enable verbatimModuleSyntax and fix type imports
- Remove test-bun CI job (Vitest tests don't run on Bun's test runner) - Add verbatimModuleSyntax to tsconfig to catch type export issues at build time - Convert all type-only imports to use `import type` syntax This ensures that type exports are properly marked, preventing runtime errors when the code is bundled or run with stricter module systems. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c630326 commit f682575

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+245
-203
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,3 @@ jobs:
2929

3030
- name: Run tests
3131
run: pnpm test
32-
33-
test-bun:
34-
runs-on: ubuntu-latest
35-
steps:
36-
- name: Checkout
37-
uses: actions/checkout@v4
38-
39-
- name: Setup Bun
40-
uses: oven-sh/setup-bun@v2
41-
with:
42-
bun-version: latest
43-
44-
- name: Install dependencies
45-
run: bun install --frozen-lockfile
46-
47-
- name: Build
48-
run: bun run build
49-
50-
- name: Run tests
51-
run: bun test

src/bootstrap.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import { loadConfig, GitHubSyncConfig } from "./core/config.js";
2-
import { StorageEngine, JsonlStorage } from "./core/storage/index.js";
1+
import type { GitHubSyncConfig } from "./core/config.js";
2+
import { loadConfig } from "./core/config.js";
3+
import type { StorageEngine } from "./core/storage/index.js";
4+
import { JsonlStorage } from "./core/storage/index.js";
35
import {
46
createGitHubSyncService,
57
GitHubSyncService,

src/cli/archive.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import { describe, it, expect, beforeEach, afterEach } from "vitest";
22
import * as path from "node:path";
33
import { runCli } from "./index.js";
4-
import {
5-
createCliTestFixture,
6-
createTaskAndGetId,
7-
CliTestFixture,
8-
} from "./test-helpers.js";
4+
import type { CliTestFixture } from "./test-helpers.js";
5+
import { createCliTestFixture, createTaskAndGetId } from "./test-helpers.js";
96
import { ArchiveStorage } from "../core/storage/archive-storage.js";
107

118
describe("archive command", () => {

src/cli/archive.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
import {
2-
CliOptions,
3-
createService,
4-
exitIfTaskNotFound,
5-
formatCliError,
6-
} from "./utils.js";
1+
import type { CliOptions } from "./utils.js";
2+
import { createService, exitIfTaskNotFound, formatCliError } from "./utils.js";
73
import { colors } from "./colors.js";
84
import { getBooleanFlag, getStringFlag, parseArgs } from "./args.js";
95
import { pluralize } from "./formatting.js";
6+
import type { CollectedArchiveTasks } from "../core/archive-compactor.js";
107
import {
11-
CollectedArchiveTasks,
128
collectArchivableTasks,
139
compactTask,
1410
} from "../core/archive-compactor.js";
1511
import { ArchiveStorage } from "../core/storage/archive-storage.js";
1612
import { cleanupTaskReferences } from "../core/task-relationships.js";
17-
import { ArchivedTask, Task, TaskStore } from "../types.js";
13+
import type { ArchivedTask, Task, TaskStore } from "../types.js";
1814

1915
export async function archiveCommand(
2016
args: string[],

src/cli/complete.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { describe, it, expect, beforeEach, afterEach } from "vitest";
22
import { runCli } from "./index.js";
3-
import {
4-
createCliTestFixture,
5-
createTaskAndGetId,
6-
CliTestFixture,
7-
} from "./test-helpers.js";
3+
import type { CliTestFixture } from "./test-helpers.js";
4+
import { createCliTestFixture, createTaskAndGetId } from "./test-helpers.js";
85

96
describe("complete command", () => {
107
let fixture: CliTestFixture;

src/cli/complete.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { CliOptions, createService, formatCliError } from "./utils.js";
1+
import type { CliOptions } from "./utils.js";
2+
import { createService, formatCliError } from "./utils.js";
23
import { colors } from "./colors.js";
34
import { getBooleanFlag, getStringFlag, parseArgs } from "./args.js";
45
import { formatTaskShow } from "./show.js";

src/cli/completion.test.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
22
import { FileStorage } from "../core/storage/index.js";
33
import { runCli } from "./index.js";
4-
import { captureOutput, createTempStorage, CapturedOutput } from "./test-helpers.js";
4+
import type { CapturedOutput } from "./test-helpers.js";
5+
import { captureOutput, createTempStorage } from "./test-helpers.js";
56

67
describe("completion command", () => {
78
let storage: FileStorage;
@@ -138,15 +139,19 @@ describe("completion command", () => {
138139
});
139140

140141
it("fails for unsupported shell type", async () => {
141-
await expect(runCli(["completion", "powershell"], { storage })).rejects.toThrow("process.exit");
142+
await expect(
143+
runCli(["completion", "powershell"], { storage }),
144+
).rejects.toThrow("process.exit");
142145

143146
const err = getStderr();
144147
expect(err).toContain("Unsupported shell: powershell");
145148
expect(err).toContain("bash, zsh, fish");
146149
});
147150

148151
it("fails for invalid shell name", async () => {
149-
await expect(runCli(["completion", "notashell"], { storage })).rejects.toThrow("process.exit");
152+
await expect(
153+
runCli(["completion", "notashell"], { storage }),
154+
).rejects.toThrow("process.exit");
150155
expect(getStderr()).toContain("Unsupported shell: notashell");
151156
});
152157
});

src/cli/config.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import * as path from "node:path";
33
import * as os from "node:os";
44
import { execSync } from "node:child_process";
55
import { configCommand } from "./config.js";
6-
import { captureOutput, CapturedOutput } from "./test-helpers.js";
6+
import type { CapturedOutput } from "./test-helpers.js";
7+
import { captureOutput } from "./test-helpers.js";
78
import {
89
describe,
910
it,

src/cli/create.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { describe, it, expect, beforeEach, afterEach } from "vitest";
22
import { runCli } from "./index.js";
3-
import {
4-
createCliTestFixture,
5-
createTaskAndGetId,
6-
CliTestFixture,
7-
} from "./test-helpers.js";
3+
import type { CliTestFixture } from "./test-helpers.js";
4+
import { createCliTestFixture, createTaskAndGetId } from "./test-helpers.js";
85

96
describe("create command", () => {
107
let fixture: CliTestFixture;

src/cli/create.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { CliOptions, createService, formatCliError } from "./utils.js";
1+
import type { CliOptions } from "./utils.js";
2+
import { createService, formatCliError } from "./utils.js";
23
import { colors } from "./colors.js";
34
import {
45
getBooleanFlag,

0 commit comments

Comments
 (0)