chore: cache local checks with turbo

This commit is contained in:
Charlie Lamb
2026-04-28 17:56:18 +01:00
parent 9e9907bc86
commit 06a02e1fd1
8 changed files with 38 additions and 6 deletions

3
.gitignore vendored
View File

@@ -16,6 +16,7 @@ supabase.sh
**/dist/
**/.next/
**/.vercel/
**/.turbo/
**/.DS_Store
**/.env*
tests/
@@ -141,4 +142,4 @@ TAKEHOME.md
.agents/
.mcp.json
.opencode/skills/
AGENTS.md
AGENTS.md

View File

@@ -5,9 +5,9 @@ changed_files="$(git diff --cached --name-only)"
bun knip
if printf '%s\n' "$changed_files" | grep -q '^server/'; then
(cd server && bun ts)
bunx turbo run ts --filter=@autumn/server
fi
if printf '%s\n' "$changed_files" | grep -q '^vite/'; then
(cd vite && bunx tsc --noEmit)
bunx turbo run ts --filter=@autumn/vite
fi

View File

@@ -18,9 +18,9 @@ changed_files="$(
)"
if printf '%s\n' "$changed_files" | grep -q '^server/'; then
(cd server && bun test tests/unit)
bunx turbo run test:unit --filter=@autumn/server
fi
if printf '%s\n' "$changed_files" | grep -q '^vite/'; then
(cd vite && bun test tests/)
bunx turbo run test:unit --filter=@autumn/vite
fi

View File

@@ -26,6 +26,7 @@
"inquirer": "^12.10.0",
"knip": "^6.7.0",
"ts-to-zod": "^5.1.0",
"turbo": "^2.9.6",
},
},
"apps/checkout": {
@@ -2174,6 +2175,18 @@
"@tsconfig/node16": ["@tsconfig/node16@1.0.4", "", {}, "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA=="],
"@turbo/darwin-64": ["@turbo/darwin-64@2.9.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-X/56SnVXIQZBLKwniGTwEQTGmtE5brSACnKMBWpY3YafuxVYefrC2acamfjgxP7BG5w3I+6jf0UrLoSzgPcSJg=="],
"@turbo/darwin-arm64": ["@turbo/darwin-arm64@2.9.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-aalBeSl4agT/QtYGDyf/XLajedWzUC9Vg/pm/YO6QQ93vkQ91Vz5uK1ta5RbVRDozQSz4njxUNqRNmOXDzW+qw=="],
"@turbo/linux-64": ["@turbo/linux-64@2.9.6", "", { "os": "linux", "cpu": "x64" }, "sha512-YKi05jnNHaD7vevgYwahpzGwbsNNTwzU2c7VZdmdFm7+cGDP4oREUWSsainiMfRqjRuolQxBwRn8wf1jmu+YZA=="],
"@turbo/linux-arm64": ["@turbo/linux-arm64@2.9.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-02o/ZS69cOYEDczXvOB2xmyrtzjQ2hVFtWZK1iqxXUfzMmTjZK4UumrfNnjckSg+gqeBfnPRHa0NstA173Ik3g=="],
"@turbo/windows-64": ["@turbo/windows-64@2.9.6", "", { "os": "win32", "cpu": "x64" }, "sha512-wVdQjvnBI15wB6JrA+43CtUtagjIMmX6XYO758oZHAsCNSxqRlJtdyujih0D8OCnwCRWiGWGI63zAxR0hO6s9g=="],
"@turbo/windows-arm64": ["@turbo/windows-arm64@2.9.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-1XUUyWW0W6FTSqGEhU8RHVqb2wP1SPkr7hIvBlMEwH9jr+sJQK5kqeosLJ/QaUv4ecSAd1ZhIrLoW7qslAzT4A=="],
"@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="],
"@types/acorn": ["@types/acorn@4.0.6", "", { "dependencies": { "@types/estree": "*" } }, "sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ=="],
@@ -5446,6 +5459,8 @@
"tunnel-agent": ["tunnel-agent@0.6.0", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w=="],
"turbo": ["turbo@2.9.6", "", { "optionalDependencies": { "@turbo/darwin-64": "2.9.6", "@turbo/darwin-arm64": "2.9.6", "@turbo/linux-64": "2.9.6", "@turbo/linux-arm64": "2.9.6", "@turbo/windows-64": "2.9.6", "@turbo/windows-arm64": "2.9.6" }, "bin": { "turbo": "bin/turbo" } }, "sha512-+v2QJey7ZUeUiuigkU+uFfklvNUyPI2VO2vBpMYJA+a1hKFLFiKtUYlRHdb3P9CrAvMzi0upbjI4WT+zKtqkBg=="],
"tw-animate-css": ["tw-animate-css@1.4.0", "", {}, "sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ=="],
"twoslash": ["twoslash@0.3.8", "", { "dependencies": { "@typescript/vfs": "^1.6.4", "twoslash-protocol": "0.3.8" }, "peerDependencies": { "typescript": "^5.5.0 || ^6.0.0" } }, "sha512-OeDz0kDl8sqPUN3nr7gqcvOs70f5lZsdhKYTX3/SgB9OvdadzzoYJI/4SBXhXV1HG8E9fLc+e17itoRYTxmoig=="],

View File

@@ -1,6 +1,7 @@
{
"name": "autumn",
"private": true,
"packageManager": "bun@1.3.10",
"workspaces": {
"packages": [
"server",
@@ -143,6 +144,7 @@
"husky": "^9.1.7",
"inquirer": "^12.10.0",
"knip": "^6.7.0",
"ts-to-zod": "^5.1.0"
"ts-to-zod": "^5.1.0",
"turbo": "^2.9.6"
}
}

View File

@@ -29,6 +29,7 @@
"clear-master": "ENV_FILE=.env infisical run --env=dev --recursive -- bun tests/clearMasterOrg.ts",
"cm": "ENV_FILE=.env infisical run --env=dev --recursive -- bun tests/clearMaster.ts",
"ts": "bunx tsgo --build --noEmit",
"test:unit": "bun test tests/unit",
"test:integration": "ENV_FILE=.env infisical run --env=dev --recursive -- bun test --timeout 0 --preload ./tests/setup-integration-tests.ts",
"loadtest": "ENV_FILE=.env infisical run --env=dev --recursive -- npx artillery run perf/load-test/artillery.yml",
"loadtest:leak": "ENV_FILE=.env infisical run --env=dev --recursive -- bun perf/load-test/runLeakTest.ts",

11
turbo.json Normal file
View File

@@ -0,0 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"ts": {
"outputs": []
},
"test:unit": {
"outputs": []
}
}
}

View File

@@ -6,8 +6,10 @@
"scripts": {
"dev": "vite --host",
"build": "tsc && vite build",
"ts": "tsc --noEmit",
"start": "serve -s dist",
"lint": "eslint .",
"test:unit": "bun test tests/",
"preview": "vite preview",
"dev:bun": "bunx --bun vite --port 3000 --host",
"build:bun": "tsc && bunx --bun vite build",