Skip to content

Commit c9e43b9

Browse files
author
Laurent Guitton
committed
fix(mcp): exclude tests from the tsc build — unblock release publish
publish.yml builds @gitwand/mcp with `tsc` before publishing; tsc compiled src/__tests__/preview.test.ts, which imports vitest — not a dependency of the package (it was symlinked locally as a workaround). Under CI's frozen lockfile the import is unresolvable, so the build (and thus the whole publish job) failed with TS2307. - tsconfig: exclude src/__tests__ + *.test.ts from the build (tests should never be compiled into dist/ anyway). - package.json: drop the `test: vitest run` script — it relied on the same unavailable vitest under `pnpm -r run test`, breaking ci.yml too. The preview tests + vitest.config.ts stay in the repo for local runs. Follow-up: add vitest to packages/mcp devDependencies + refresh pnpm-lock.yaml on a pnpm-capable host, then re-enable the test script so CI runs them again.
1 parent 8d83f9d commit c9e43b9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/mcp/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
},
4141
"scripts": {
4242
"build": "tsc",
43-
"clean": "rm -rf dist",
44-
"test": "vitest run"
43+
"clean": "rm -rf dist"
4544
},
4645
"dependencies": {
4746
"@gitwand/core": "workspace:*",

packages/mcp/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"outDir": "dist",
55
"rootDir": "src"
66
},
7-
"include": ["src"]
7+
"include": ["src"],
8+
"exclude": ["src/__tests__", "src/**/*.test.ts"]
89
}

0 commit comments

Comments
 (0)