From a90270425b2811c297a85905102afaf03e57e718 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Jan 2026 14:52:16 +0000 Subject: [PATCH] Add TypeScript type checking to test script The test files were not being type-checked because tsconfig.json only included src/**/*.ts. This meant invalid properties on Pipeline objects would silently pass through to YAML output. Add tsconfig.test.json that extends the base config but includes test files, and update the test script to run tsc before node --test. This ensures TypeScript's excess property checking catches invalid keys. Fixes #21 --- package.json | 2 +- tsconfig.test.json | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 tsconfig.test.json diff --git a/package.json b/package.json index d6c2d39..f5c0906 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "lint": "oxlint .", "lint:fix": "oxlint --fix .", "prepublishOnly": "pnpm build", - "test": "node --test" + "test": "tsc -p tsconfig.test.json && node --test" }, "dependencies": { "yaml": "^2.8.2" diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..bce6a5a --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": ".", + "declaration": false, + "noEmit": true + }, + "include": ["src/**/*.ts", "test/**/*.ts"] +}