Skip to content

Commit 04200d8

Browse files
wishket-pjwJeremyDev87
authored andcommitted
fix: exclude test files from build output
- Add tsconfig.build.json excluding test files - Update build script to use tsconfig.build.json - Fix type assertion in test file refs #31
1 parent 5914263 commit 04200d8

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

mcp-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"prepublishOnly": "cp -r ../.ai-rules . && yarn build && chmod +x dist/src/main.js dist/src/cli/cli.js",
2020
"postpublish": "rm -rf .ai-rules",
21-
"build": "tsc -p tsconfig.json",
21+
"build": "tsc -p tsconfig.build.json",
2222
"start": "node dist/src/main.js",
2323
"start:dev": "ts-node src/main.ts",
2424
"test": "vitest run",

mcp-server/src/shared/file.utils.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe('file.utils', () => {
9090
{ name: 'file.txt', isFile: () => true, isDirectory: () => false },
9191
{ name: 'subdir', isFile: () => false, isDirectory: () => true },
9292
];
93-
vi.mocked(fs.readdir).mockResolvedValue(mockEntries as unknown as ReturnType<typeof fs.readdir>);
93+
vi.mocked(fs.readdir).mockResolvedValue(mockEntries as unknown as Awaited<ReturnType<typeof fs.readdir>>);
9494

9595
const result = await safeReadDirWithTypes('/path/to/dir');
9696

mcp-server/tsconfig.build.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"exclude": ["**/*.spec.ts", "**/*.test.ts", "node_modules"]
4+
}

0 commit comments

Comments
 (0)