* fix(cli): separate unit tests from integration tests and fix test cleanup - Rename 14 non-backend test files to *_unit.test.ts convention - Add UNIT_ONLY env var guard in setup.ts to skip cargo build/backend startup - Add test:unit and test:integration scripts to package.json - Use setsid on Linux for process group management so stop() kills both cargo and the windmill child process - Fix exit handler to kill process group instead of just the direct child - Add cleanupStaleTestResources() to drop orphaned windmill_test_* databases and kill orphaned backend processes on startup - Rewrite TESTING.md with current bun-based instructions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cli): fix process group approach - kill by db name instead of setsid The setsid approach didn't work because setsid forks, making the PID we get from Bun.spawn ephemeral. Instead, kill orphaned windmill child processes by matching our unique database name in /proc/pid/environ. Also add afterAll hook in setup.ts so full async cleanup (process kill + database drop) runs when all tests complete normally, not just on SIGINT/SIGTERM. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cli): address PR review feedback - Remove duplicate cleanupStaleTestResources() call in getTestBackend() (already called in setup.ts) - Add regex guard on database names before SQL interpolation - Extract shared killWindmillProcessesByEnvMatch() helper to deduplicate process-killing logic - Remove redundant test:integration script (test already runs everything) - Flip setup.ts to if/else pattern for readability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
55 lines
1.6 KiB
JSON
55 lines
1.6 KiB
JSON
{
|
|
"name": "wmill-dev",
|
|
"private": true,
|
|
"type": "module",
|
|
"bin": {
|
|
"wmill": "src/main.ts"
|
|
},
|
|
"scripts": {
|
|
"dev": "bun run src/main.ts",
|
|
"build": "./build.sh",
|
|
"test": "bun test test/",
|
|
"test:unit": "UNIT_ONLY=1 bun test test/*_unit*",
|
|
"check": "bunx tsc --noEmit",
|
|
"gen-client": "./gen_wm_client.sh && ./windmill-utils-internal/gen_wm_client.sh"
|
|
},
|
|
"dependencies": {
|
|
"@cliffy/ansi": "npm:@jsr/cliffy__ansi@1.0.0",
|
|
"@cliffy/command": "npm:@jsr/cliffy__command@1.0.0",
|
|
"@cliffy/prompt": "npm:@jsr/cliffy__prompt@1.0.0",
|
|
"@cliffy/table": "npm:@jsr/cliffy__table@1.0.0",
|
|
"@windmill-labs/shared-utils": "^1.0.12",
|
|
"diff": "^5.2.0",
|
|
"esbuild": "0.24.2",
|
|
"get-port": "7.1.0",
|
|
"jszip": "3.8.0",
|
|
"minimatch": "^10.0.0",
|
|
"open": "^10.0.0",
|
|
"svelte": "^5.45.2",
|
|
"tar-stream": "^3.1.7",
|
|
"windmill-parser-wasm-csharp": "*",
|
|
"windmill-parser-wasm-go": "*",
|
|
"windmill-parser-wasm-java": "*",
|
|
"windmill-parser-wasm-nu": "*",
|
|
"windmill-parser-wasm-php": "*",
|
|
"windmill-parser-wasm-py": "*",
|
|
"windmill-parser-wasm-py-imports": "*",
|
|
"windmill-parser-wasm-regex": "*",
|
|
"windmill-parser-wasm-ruby": "*",
|
|
"windmill-parser-wasm-rust": "*",
|
|
"windmill-parser-wasm-ts": "^1.659.1",
|
|
"windmill-parser-wasm-yaml": "*",
|
|
"windmill-yaml-validator": "1.1.1",
|
|
"ws": "8.18.0",
|
|
"yaml": "^2.7.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "^1.3.9",
|
|
"@types/diff": "^5.2.3",
|
|
"@types/node": "^22.0.0",
|
|
"@types/tar-stream": "^3.1.4",
|
|
"@types/ws": "^8.5.0",
|
|
"typescript": "^5.7.0"
|
|
}
|
|
}
|