feat(build): POC - add Turborepo for cached package builds

This PR adds Turborepo as a build orchestration tool for the frontend
monorepo, providing intelligent caching for package builds.

Changes:
- Add turbo.json with task pipeline configuration
- Add turbo devDependency to root package.json
- Add packageManager field for Turborepo compatibility
- Add build/clean/type-check scripts to all packages and plugins
- Add .turbo to .gitignore

New scripts:
- npm run turbo:build - Build all packages with caching
- npm run turbo:build:force - Build without cache
- npm run turbo:type-check - Type check all packages
- npm run turbo:clean - Clean all build artifacts

Benefits:
- Cached builds: 5s → 314ms (16x faster) on unchanged packages
- Parallel builds across packages
- Only rebuilds what changed
- Local-only caching (no cloud dependencies)

Note: Lerna is preserved for versioning and publishing. Turborepo
handles build orchestration, not package publishing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-02-10 10:25:06 -08:00
parent 7ec5f1d7ec
commit d0575ceb29
27 changed files with 271 additions and 2 deletions

View File

@@ -12,3 +12,5 @@ src/temp
**/lib/*
**/storybook-static/*
migration-storybook.log
# Turborepo cache
.turbo

View File

@@ -285,6 +285,7 @@
"ts-jest": "^29.4.6",
"tscw-config": "^1.1.2",
"tsx": "^4.21.0",
"turbo": "^2.8.4",
"typescript": "5.4.5",
"unzipper": "^0.12.3",
"vm-browserify": "^1.1.2",
@@ -51939,6 +51940,108 @@
"node": "*"
}
},
"node_modules/turbo": {
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/turbo/-/turbo-2.8.4.tgz",
"integrity": "sha512-yf0DFQBoR0DCOg11pYRAX5/CvXwTUwJsIFTHTOpHbUy3GnEpGBfE5E4440nmn8g6FpXXpy8Im2UEpmmv0fz67g==",
"dev": true,
"license": "MIT",
"bin": {
"turbo": "bin/turbo"
},
"optionalDependencies": {
"turbo-darwin-64": "2.8.4",
"turbo-darwin-arm64": "2.8.4",
"turbo-linux-64": "2.8.4",
"turbo-linux-arm64": "2.8.4",
"turbo-windows-64": "2.8.4",
"turbo-windows-arm64": "2.8.4"
}
},
"node_modules/turbo-darwin-64": {
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.8.4.tgz",
"integrity": "sha512-xVkkgQMRyLdKodZ0NU0lkjcLDm7J9R0zDNY61H4K38F94ZuspjeM1zaVB9HNM/7m4/7QvAPrvO/vCBr2qWmKKg==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
]
},
"node_modules/turbo-darwin-arm64": {
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.8.4.tgz",
"integrity": "sha512-ycg5jmWIV9hFScbb7bOhBc0A8jiKfOdP5SAige6FUJDnSTkL29qpLIZxcE5/J/5NNys7hVifHocDCT08ELcJ5Q==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
]
},
"node_modules/turbo-linux-64": {
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.8.4.tgz",
"integrity": "sha512-RzH0bTRRCobvBs6mLxporuF/L2MhPJlYZ/rwfzMfwWX/TnNYUcOROgNqHIH6MK4eBAjQ7YliBDrstHnFrO8C7A==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/turbo-linux-arm64": {
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.8.4.tgz",
"integrity": "sha512-7HPdZjqZqq/3eg16oQMmEguZLrl4BGGVlXNpiy2mIhNjXheJjtSJ7rvgnpxMHXAFsaOPytSEkvgydB2qsYtM3g==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/turbo-windows-64": {
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.8.4.tgz",
"integrity": "sha512-cKo42yFeEixPz3rljG4rSHTjCLsNSxdS3HUDen5CpoyXu+eGxAeO50wUnGIzvkXRRLJTkG9rhIITNdqUzlrijA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
]
},
"node_modules/turbo-windows-arm64": {
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.8.4.tgz",
"integrity": "sha512-9g6P11SIIQSRlDqwd9QITR82hPeUjHenSYVsULrK7X57x+dmQIAkenZahSaMRDts9fRQygF5xBMoH0uZGwUvoA==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
]
},
"node_modules/tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",

View File

@@ -1,6 +1,7 @@
{
"name": "superset",
"version": "0.0.0-dev",
"packageManager": "npm@10.8.2",
"description": "Superset is a data exploration platform designed to be visual, intuitive, and interactive.",
"keywords": [
"big",
@@ -68,6 +69,12 @@
"plugins:publish-all": "npm run prune && npm run plugins:build && lerna publish from-package --force-publish --yes",
"plugins:release-conventional": "npm run prune && npm run plugins:build && lerna publish --conventional-commits --create-release github --yes",
"plugins:release-from-tag": "npm run prune && npm run plugins:build && lerna publish from-package --yes",
"turbo:build": "turbo run build",
"turbo:build:force": "turbo run build --force",
"turbo:type-check": "turbo run type-check",
"turbo:lint": "turbo run lint",
"turbo:test": "turbo run test",
"turbo:clean": "turbo run clean && rm -rf .turbo",
"plugins:storybook": "cd packages/superset-ui-demo && npm run storybook",
"playwright:test": "playwright test",
"playwright:ui": "playwright test --ui",
@@ -187,11 +194,11 @@
"markdown-to-jsx": "^9.7.3",
"match-sorter": "^6.3.4",
"memoize-one": "^5.2.1",
"pretty-ms": "^9.3.0",
"mousetrap": "^1.6.5",
"mustache": "^4.2.0",
"nanoid": "^5.1.6",
"ol": "^7.5.2",
"pretty-ms": "^9.3.0",
"query-string": "9.3.1",
"re-resizable": "^6.11.2",
"react": "^17.0.2",
@@ -367,6 +374,7 @@
"ts-jest": "^29.4.6",
"tscw-config": "^1.1.2",
"tsx": "^4.21.0",
"turbo": "^2.8.4",
"typescript": "5.4.5",
"unzipper": "^0.12.3",
"vm-browserify": "^1.1.2",

View File

@@ -47,7 +47,7 @@
"scripts": {
"clean": "rm -rf lib tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type": "npx tsc --noEmit"
"type-check": "npx tsc --noEmit"
},
"publishConfig": {
"access": "public"

View File

@@ -47,5 +47,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -131,5 +131,10 @@
"require": "./lib/utils/*.js",
"types": "./lib/utils/*.d.ts"
}
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -30,5 +30,10 @@
"homepage": "https://github.com/apache/superset#readme",
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -37,5 +37,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -37,5 +37,10 @@
"@superset-ui/chart-controls": "*",
"@superset-ui/core": "*",
"@apache-superset/core": "*"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -35,5 +35,10 @@
"@superset-ui/chart-controls": "*",
"@superset-ui/core": "*",
"react": "^17.0.2"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -35,5 +35,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -40,5 +40,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -35,5 +35,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -37,5 +37,10 @@
"@superset-ui/core": "*",
"@apache-superset/core": "*",
"react": "^17.0.2"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -38,5 +38,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -36,5 +36,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -40,5 +40,10 @@
"@superset-ui/core": "*",
"@apache-superset/core": "*",
"react": "^17.0.2"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -72,5 +72,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -44,5 +44,10 @@
"@superset-ui/core": "*",
"dayjs": "^1.11.19",
"react": "^17.0.2"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -52,5 +52,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -49,5 +49,10 @@
"polished": "*",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -40,5 +40,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -46,5 +46,10 @@
"@types/jest": "^30.0.0",
"@types/lodash": "^4.17.23",
"jest": "^30.2.0"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -41,5 +41,10 @@
"@babel/types": "^7.29.0",
"@types/jest": "^30.0.0",
"jest": "^30.2.0"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -52,5 +52,10 @@
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -43,5 +43,10 @@
},
"devDependencies": {
"@types/d3-cloud": "^1.2.9"
},
"scripts": {
"clean": "rm -rf lib esm tsconfig.tsbuildinfo",
"build": "npm run clean && npx tsc --build",
"type-check": "npx tsc --noEmit"
}
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"inputs": ["src/**", "package.json", "tsconfig.json", "tsconfig.*.json"],
"outputs": ["lib/**", "esm/**", "dist/**", "tsconfig.tsbuildinfo"],
"cache": true
},
"build:esm": {
"dependsOn": ["^build:esm"],
"inputs": ["src/**", "package.json", "tsconfig.json"],
"outputs": ["esm/**"],
"cache": true
},
"build:cjs": {
"dependsOn": ["^build:cjs"],
"inputs": ["src/**", "package.json", "tsconfig.json"],
"outputs": ["lib/**"],
"cache": true
},
"type-check": {
"dependsOn": ["^build"],
"inputs": ["src/**", "*.ts", "*.tsx", "tsconfig.json"],
"outputs": [],
"cache": true
},
"lint": {
"inputs": ["src/**", "*.ts", "*.tsx", "*.js", "*.jsx"],
"outputs": [],
"cache": true
},
"test": {
"dependsOn": ["^build"],
"inputs": ["src/**", "test/**", "spec/**", "**/*.test.*", "**/*.spec.*"],
"outputs": ["coverage/**"],
"cache": true
},
"clean": {
"cache": false
}
},
"ui": "tui",
"daemon": true,
"cacheDir": ".turbo"
}