From 8751e5ccf001670732d7ce26578305e8e5a1cf60 Mon Sep 17 00:00:00 2001 From: ivanauth Date: Tue, 16 Jun 2026 20:12:03 -0400 Subject: [PATCH 1/3] fix: exclude test files from build output --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 811dec5..c51a7ae 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,5 +12,5 @@ "typeRoots": ["node_modules/@types"] }, "include": ["src"], - "exclude": ["node_modules", "src/**/*.test.*/*"] + "exclude": ["node_modules", "src/**/*.test.*"] } From 844227b4936a8e3be1ea6fd71b80a391ae9895c0 Mon Sep 17 00:00:00 2001 From: ivanauth Date: Thu, 2 Jul 2026 20:48:53 -0400 Subject: [PATCH 2/3] fix: exclude tests only from the packaging build (#161) Excluding tests in the shared tsconfig broke the js-client CI job, which builds with build-js-client into js-dist and runs vitest there against the emitted test files. Keep tests in the default project (editor and js-dist unchanged) and add tsconfig.build.json, used by the build script, to exclude them from dist/ and the published package. --- package.json | 2 +- tsconfig.build.json | 4 ++++ tsconfig.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 tsconfig.build.json diff --git a/package.json b/package.json index 9201cb0..93c4e45 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "lint:package": "pnpm publint --pack npm", "format": "pnpm oxfmt", "format:check": "pnpm oxfmt --check", - "build": "pnpm tsc", + "build": "pnpm tsc -p tsconfig.build.json", "postbuild": "rollup dist/src/index.js --file dist/src/index.cjs --format cjs && cp dist/src/index.d.ts dist/src/index.d.cts", "prepublishOnly": "pnpm build", "build-js-client": "pnpm tsc --declaration false --outDir js-dist" diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..98c92b3 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "src/**/*.test.*"] +} diff --git a/tsconfig.json b/tsconfig.json index c51a7ae..a265378 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,5 +12,5 @@ "typeRoots": ["node_modules/@types"] }, "include": ["src"], - "exclude": ["node_modules", "src/**/*.test.*"] + "exclude": ["node_modules"] } From 3b35c6d68446eee7ea088a8411541f45595fae5b Mon Sep 17 00:00:00 2001 From: ivanauth Date: Wed, 8 Jul 2026 21:21:53 -0400 Subject: [PATCH 3/3] docs(tsconfig): note that extends replaces the exclude array (#161) --- tsconfig.build.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tsconfig.build.json b/tsconfig.build.json index 98c92b3..ca153b1 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,4 +1,7 @@ { + // Build config for the published package: excludes test files from dist/. + // `extends` REPLACES the base exclude array (it does not merge), so + // "node_modules" must be re-listed here alongside the test glob. "extends": "./tsconfig.json", "exclude": ["node_modules", "src/**/*.test.*"] }