diff --git a/.gitignore b/.gitignore index c0558a9a41f..fb099c3ec88 100644 --- a/.gitignore +++ b/.gitignore @@ -240,3 +240,6 @@ packages/http-server-js/test/e2e/generated .pnpm-store/ packages/http-client-python/tests/.uv-cache/ packages/http-client-python/tests/.wheels/ + +# Turborepo +.turbo diff --git a/package.json b/package.json index 38299fa8b38..933ddd3a022 100644 --- a/package.json +++ b/package.json @@ -5,15 +5,14 @@ "packageManager": "pnpm@10.30.2", "type": "module", "scripts": { - "build": "pnpm build:all && pnpm check:eng && pnpm gen-compiler-extern-signature", - "build:all": "pnpm -r --workspace-concurrency=Infinity build", + "build": "turbo build && pnpm check:eng && pnpm gen-compiler-extern-signature", "check:eng": "tsc -p ./tsconfig.eng.json --noEmit", "setup:min": "pnpm install && pnpm --filter \"@typespec/prettier-plugin-typespec...\" --filter \"@typespec/tspd...\" run build", "check-catalog": "tsx eng/common/scripts/check-catalog.ts", "change": "chronus", - "clean": "pnpm -r run clean", + "clean": "turbo clean", "cspell": "cspell --no-progress .", - "dogfood": "pnpm install && pnpm build && pnpm -r dogfood", + "dogfood": "pnpm install && pnpm build && turbo dogfood", "format": "prettier . --write", "format:check": "prettier . --check", "format:dir": "prettier --write", @@ -25,12 +24,12 @@ "preinstall": "npx only-allow pnpm", "prepare-publish": "pnpm chronus version", "purge": "rimraf --glob \"packages/*/node_modules/\"", - "regen-docs": "pnpm -r --parallel --aggregate-output --reporter=append-only run regen-docs", - "regen-samples": "pnpm -r run regen-samples", + "regen-docs": "turbo regen-docs", + "regen-samples": "turbo regen-samples", "test": "vitest run", "test:ci": "vitest run --coverage --reporter=junit --reporter=default", - "test:e2e": "pnpm -r run test:e2e", - "update-playground-versions": "pnpm -r run update-playground-versions", + "test:e2e": "turbo test:e2e", + "update-playground-versions": "turbo update-playground-versions", "watch": "tsc --build ./tsconfig.ws.json --watch", "sync-labels": "tsx ./eng/common/scripts/labels/sync-labels.ts --config ./eng/common/config/labels.ts", "validate-scenarios": "pnpm -r --filter=@typespec/http-specs run validate-scenarios", @@ -65,6 +64,7 @@ "prettier-plugin-organize-imports": "catalog:", "prettier-plugin-sh": "catalog:", "rimraf": "catalog:", + "turbo": "catalog:", "tsx": "catalog:", "typescript": "catalog:", "typescript-eslint": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ee30e3063d1..e1a8b1cd2df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -459,6 +459,9 @@ catalogs: tsx: specifier: ^4.21.0 version: 4.21.0 + turbo: + specifier: ^2.9.5 + version: 2.9.14 typedoc: specifier: ^0.28.19 version: 0.28.19 @@ -603,6 +606,9 @@ importers: tsx: specifier: 'catalog:' version: 4.21.0 + turbo: + specifier: 'catalog:' + version: 2.9.14 typescript: specifier: 'catalog:' version: 6.0.2 @@ -6681,6 +6687,36 @@ packages: resolution: {integrity: sha512-Y8cK9aggNRsqJVaKUlEYs4s7CvQ1b1ta2DVPyAimb0I2qhzjNk+A+mxvll/klL0RlfuIUei8BF7YWiua4kQqww==} engines: {node: ^20.17.0 || >=22.9.0} + '@turbo/darwin-64@2.9.14': + resolution: {integrity: sha512-t7QiPflaEyBE4oayeZtSmu4mEfjgIrcNlNNl1z1dmIVPqEdtA7+CfTf8d7KXsOGPh6aNgWjKxyvQg9uGfDQF+A==} + cpu: [x64] + os: [darwin] + + '@turbo/darwin-arm64@2.9.14': + resolution: {integrity: sha512-d23147mC9BsCPA9mJ0h/ubcpbRgcJBXbcG3+Vq7YLhjz3IXuvQsJ1UXH8f4MD76ZjJ4m/E4aRdJV+MW88CDfbw==} + cpu: [arm64] + os: [darwin] + + '@turbo/linux-64@2.9.14': + resolution: {integrity: sha512-P3ZKB5tuUDdDQWuAsACGUR1qv9W7BNWxdxqVJ0kZNuNNPRaVYTPPikLcp79+GiEcW3npsR+KyP38lnQiBc5aSA==} + cpu: [x64] + os: [linux] + + '@turbo/linux-arm64@2.9.14': + resolution: {integrity: sha512-ZRTlzcUMrrPv9ZuDzRF9n60Ym13bKeG9jDB8WjxyLhWNzV+AJQN+zdpIk3NJYf2zQsGUm1mNar2P0elRzLw25g==} + cpu: [arm64] + os: [linux] + + '@turbo/windows-64@2.9.14': + resolution: {integrity: sha512-exanwN6sIduZwykYeiTQj8kCmOhazP5WOz3bvXMcYtjhL6Z3iRWLewKrXCBq0bqwSP3iBMb/AerRCnHI4lx46A==} + cpu: [x64] + os: [win32] + + '@turbo/windows-arm64@2.9.14': + resolution: {integrity: sha512-fVdCsnmYoKICsycbWuuGp6Jvi51/3G/UluFWuAUCvR8PIW5IJkAk5BM9UF8PSm0Q2IphWHFZjYEgjHsh3B9y/g==} + cpu: [arm64] + os: [win32] + '@tybys/wasm-util@0.10.1': resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} @@ -12718,6 +12754,10 @@ packages: resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} + turbo@2.9.14: + resolution: {integrity: sha512-BQqXRr4UoWI3UPFrtznCLykYHxwxWh53iCB57x092jPMjIlW1wnm3N895g5irpiXmnxUhREBB0n6+y8BHhs4nw==} + hasBin: true + typanion@3.14.0: resolution: {integrity: sha512-ZW/lVMRabETuYCd9O9ZvMhAh8GslSqaUjxmK/JLPCh6l73CvLBiuXswj/+7LdnWOgYsQ130FqLzFz5aGT4I3Ug==} @@ -18730,6 +18770,24 @@ snapshots: '@tufjs/canonical-json': 2.0.0 minimatch: 10.2.5 + '@turbo/darwin-64@2.9.14': + optional: true + + '@turbo/darwin-arm64@2.9.14': + optional: true + + '@turbo/linux-64@2.9.14': + optional: true + + '@turbo/linux-arm64@2.9.14': + optional: true + + '@turbo/windows-64@2.9.14': + optional: true + + '@turbo/windows-arm64@2.9.14': + optional: true + '@tybys/wasm-util@0.10.1': dependencies: tslib: 2.8.1 @@ -26261,6 +26319,15 @@ snapshots: tunnel@0.0.6: {} + turbo@2.9.14: + optionalDependencies: + '@turbo/darwin-64': 2.9.14 + '@turbo/darwin-arm64': 2.9.14 + '@turbo/linux-64': 2.9.14 + '@turbo/linux-arm64': 2.9.14 + '@turbo/windows-64': 2.9.14 + '@turbo/windows-arm64': 2.9.14 + typanion@3.14.0: {} type-check@0.4.0: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5ca502f4ce2..9db8c4d6c42 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -159,6 +159,7 @@ catalog: tree-sitter-python: ^0.25.0 tree-sitter-typescript: ^0.23.2 tsx: ^4.21.0 + turbo: ^2.9.5 typedoc: ^0.28.19 typedoc-plugin-markdown: ^4.11.0 typescript: ~6.0.2 diff --git a/turbo.json b/turbo.json new file mode 100644 index 00000000000..72f151bfa28 --- /dev/null +++ b/turbo.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://turbo.build/schema.json", + "globalPassThroughEnv": [ + "TYPESPEC_WEBSITE_BASE_PATH", + "TYPESPEC_SKIP_WEBSITE_BUILD", + "TYPESPEC_SKIP_VS_BUILD", + "TYPESPEC_VS_CI_BUILD" + ], + "tasks": { + "build": { + "dependsOn": ["^build"], + "inputs": ["src/**", "lib/**", "tsconfig*.json", "package.json", ".scripts/**"], + "outputs": ["dist/**"] + }, + "test": { + "dependsOn": ["build"], + "inputs": ["src/**", "test/**", "vitest.config.*", "package.json"], + "outputs": [] + }, + "test:ci": { + "dependsOn": ["build"], + "inputs": ["src/**", "test/**", "vitest.config.*", "package.json"], + "outputs": ["coverage/**"] + }, + "lint": { + "inputs": ["src/**", "test/**", "eslint.config.*", "package.json"], + "outputs": [] + }, + "clean": { + "cache": false + }, + "regen-docs": { + "dependsOn": ["build"], + "cache": false + }, + "regen-samples": { + "dependsOn": ["build"], + "cache": false + }, + "watch": { + "cache": false, + "persistent": true + }, + "dogfood": { + "dependsOn": ["build"], + "cache": false + }, + "update-playground-versions": { + "dependsOn": ["build"], + "cache": false + }, + "test:e2e": { + "dependsOn": ["build"], + "cache": false + } + } +}