Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

fix: improve Turborepo configuration (#1765)

Anthony Shew408c426db28d
diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml
index 233b4481..12574431 100644
--- a/.github/workflows/quality.yml
+++ b/.github/workflows/quality.yml
@@ -28,7 +28,7 @@ jobs:
uses: ./tooling/github-actions/install
- name: Run Prettier
- run: turbo format --continue
+ run: turbo run format --continue
eslint:
name: ESLint
@@ -42,7 +42,7 @@ jobs:
uses: ./tooling/github-actions/install
- name: Lint
- run: turbo lint --continue
+ run: turbo run lint --continue
typecheck:
name: TypeCheck
@@ -67,7 +67,7 @@ jobs:
restore-keys: ${{ runner.os }}-cache-typescript-tsbuildinfo-
- name: Run TypeScript type check
- run: turbo typecheck --continue
+ run: turbo run typecheck --continue
sherif:
name: Sherif
@@ -104,7 +104,7 @@ jobs:
# pnpm db:seed
#
# - name: Build
- # run: turbo build
+ # run: turbo run build
# env:
# GITHUB_ID: ' '
# GITHUB_SECRET: ' '
@@ -113,7 +113,7 @@ jobs:
# NEXTAUTH_SECRET: 'kGvjABB9ZZsxhYFyxMT4ApohaIvfuNSRMIthI+usjA0='
#
# - name: Run Playwright tests
- # run: turbo test:e2e --continue
+ # run: turbo run test:e2e --continue
# env:
# DATABASE_URL: mysql://dev:dev@localhost/typehero
# GITHUB_ID: ' '
diff --git a/package.json b/package.json
index 19d1b7c0..51f73560 100644
--- a/package.json
+++ b/package.json
@@ -3,20 +3,20 @@
"version": "0.1.0",
"private": true,
"scripts": {
- "build": "turbo build",
- "checks": "turbo format lint typecheck --continue",
- "checks:fix": "turbo format:fix lint:fix typecheck --continue --force",
- "clean": "turbo clean && rm -rf node_modules && rm -rf .turbo",
+ "build": "turbo run build",
+ "checks": "turbo run format lint typecheck --continue",
+ "checks:fix": "turbo run format:fix lint:fix typecheck --continue --force",
+ "clean": "turbo run clean && rm -rf node_modules && rm -rf .turbo",
"check:solutions": "tsx ./challenges/validate.ts",
- "db:push": "turbo db:push",
- "db:reset": "turbo db:reset",
- "db:sc": "turbo db:sync-challenges",
- "db:seed": "turbo db:reset && turbo db:seed",
- "db:prod:seed": "turbo db:reset && turbo db:prod:seed",
- "db:studio": "turbo db:studio",
- "dev": "turbo dev --concurrency=1000",
- "dl-git": "turbo dl-git",
- "dl-monaco:force": "turbo dl-monaco",
+ "db:push": "turbo run db:push",
+ "db:reset": "turbo run db:reset",
+ "db:sc": "turbo run db:sync-challenges",
+ "db:seed": "turbo run db:reset && turbo run db:seed",
+ "db:prod:seed": "turbo run db:reset && turbo run db:prod:seed",
+ "db:studio": "turbo run db:studio",
+ "dev": "turbo run dev --concurrency=1000",
+ "dl-git": "turbo run dl-git",
+ "dl-monaco:force": "turbo run dl-monaco",
"format": "prettier . \"!./apps/**\" \"!./packages/**\" \"!./tooling/**\" \"!challenges/**/tests.ts\" --check --cache --cache-location=\"node_modules/.cache/prettiercache\"",
"format:fix": "prettier . \"!./apps/**\" \"!./packages/**\" \"!./tooling/**\" \"!challenges/**/tests.ts\" --write --cache --cache-location=\"node_modules/.cache/prettiercache\" --log-level=warn",
"lint": "eslint . --max-warnings 0",
@@ -25,13 +25,13 @@
"lint:fix": "eslint . --fix --max-warnings 0",
"package-check": "pnpm dlx sherif@latest --ignore-rule root-package-dependencies",
"package-check:fix": "pnpm dlx sherif@latest --ignore-rule root-package-dependencies --fix",
- "refresh": "turbo db:reset db:seed --concurrency=1",
- "test:e2e": "turbo test:e2e",
+ "refresh": "turbo run db:reset db:seed --concurrency=1",
+ "test:e2e": "turbo run test:e2e",
"test:e2e:install": "playwright install",
- "test:e2e:ui": "turbo test:e2e:ui",
- "test:e2e:inspector": "turbo test:e2e:inspector",
+ "test:e2e:ui": "turbo run test:e2e:ui",
+ "test:e2e:inspector": "turbo run test:e2e:inspector",
"tunnel": "cloudflared tunnel --url http://localhost:3000",
- "typecheck": "turbo typecheck --continue"
+ "typecheck": "turbo run typecheck --continue"
},
"devDependencies": {
"ajv": "^8.12.0",
@@ -72,11 +72,5 @@
"sharp",
"unrs-resolver"
]
- },
- "dependencies": {
- "next": "15.3.8",
- "pnpm": "^8.15.8",
- "react": "19.1.0",
- "react-dom": "19.1.0"
}
}
diff --git a/packages/db/turbo.json b/packages/db/turbo.json
index 041de73e..10c9f3f5 100644
--- a/packages/db/turbo.json
+++ b/packages/db/turbo.json
@@ -2,7 +2,7 @@
"extends": ["//"],
"tasks": {
"db:generate": {
- "outputs": ["../../node_modules/.prisma/**"],
+ "outputs": ["$TURBO_ROOT$/node_modules/.prisma/**"],
"outputLogs": "new-only"
},
"db:deploy": {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0c658412..a706474f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -20,19 +20,6 @@ patchedDependencies:
importers:
.:
- dependencies:
- next:
- specifier: 15.3.8
- pnpm:
- specifier: ^8.15.8
- version: 8.15.9
- react:
- specifier: 19.1.0
- version: 19.1.0
- react-dom:
- specifier: 19.1.0
- version: 19.1.0([email protected])
devDependencies:
ajv:
specifier: ^8.12.0
@@ -105,7 +92,7 @@ importers:
next-themes:
specifier: ^0.2.1
react:
specifier: 19.1.0
version: 19.1.0
@@ -244,10 +231,10 @@ importers:
version: 11.1.0([email protected])
'@uploadthing/react':
specifier: ^6.8.0
'@vercel/analytics':
specifier: ^1.1.1
'@vercel/edge-config':
specifier: ^0.2.1
version: 0.2.1
@@ -286,7 +273,7 @@ importers:
next-themes:
specifier: ^0.2.1
react:
specifier: 19.1.0
version: 19.1.0
@@ -313,7 +300,7 @@ importers:
version: 0.170.0
uploadthing:
specifier: ^6.8.0
zod:
specifier: 3.23.3
version: 3.23.3
@@ -490,7 +477,7 @@ importers:
version: link:../../packages/ui
'@sentry/nextjs':
specifier: ^7.73.0
'@stripe/react-stripe-js':
specifier: ^2.8.0
@@ -514,19 +501,19 @@ importers:
'@uploadthing/react':
specifier: ^6.8.0
'@vercel/analytics':
specifier: ^1.1.1
'@vercel/edge-config':
specifier: ^0.2.1
version: 0.2.1
'@vercel/speed-insights':
specifier: ^1.0.12
'@vercel/toolbar':
specifier: ^0.1.18
algoliasearch:
specifier: ^4.20.0
version: 4.24.0
@@ -568,7 +555,7 @@ importers:
next-themes:
specifier: ^0.2.1
react:
specifier: 19.1.0
version: 19.1.0
@@ -592,7 +579,7 @@ importers:
react-instantsearch-nextjs:
specifier: ^0.4.0
react-intersection-observer:
specifier: ^9.5.2
@@ -640,7 +627,7 @@ importers:
version: 5.0.0
uploadthing:
specifier: ^6.8.0
zod:
specifier: 3.23.3
version: 3.23.3
@@ -829,7 +816,7 @@ importers:
next-themes:
specifier: ^0.2.1
prettier:
specifier: ^3.1.1
version: 3.5.3
@@ -982,7 +969,7 @@ importers:
'@uploadthing/react':
specifier: ^6.8.0
class-variance-authority:
specifier: ^0.7.0
version: 0.7.1
@@ -997,7 +984,7 @@ importers:
version: 3.0.1
next-themes:
specifier: ^0.2.1
react:
specifier: 19.1.0
version: 19.1.0
@@ -8402,11 +8389,6 @@ packages:
resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
engines: {node: '>=4'}
- resolution: {integrity: sha512-SZQ0ydj90aJ5Tr9FUrOyXApjOrzuW7Fee13pDzL0e1E6ypjNXP0AHDHw20VLw4BO3M1XhQHkyik6aBYWa72fgQ==}
- engines: {node: '>=16.14'}
- hasBin: true
-
resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==}
engines: {node: '>= 0.4'}
@@ -9548,10 +9530,12 @@ packages:
resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==}
engines: {node: '>=10'}
+ deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exhorbitant rates) by contacting [email protected]
resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==}
engines: {node: '>=18'}
+ deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exhorbitant rates) by contacting [email protected]
resolution: {integrity: sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==}
@@ -13151,7 +13135,7 @@ snapshots:
'@sentry/utils': 7.120.3
localforage: 1.10.0
dependencies:
'@rollup/plugin-commonjs': 24.0.0([email protected])
'@sentry/core': 7.120.3
@@ -13803,14 +13787,14 @@ snapshots:
'@uploadthing/[email protected]': {}
dependencies:
'@uploadthing/dropzone': 0.4.1([email protected])
'@uploadthing/shared': 6.7.9
file-selector: 0.6.0
react: 19.1.0
tailwind-merge: 2.6.0
optionalDependencies:
transitivePeerDependencies:
@@ -13837,7 +13821,7 @@ snapshots:
optionalDependencies:
react: 19.1.0
optionalDependencies:
react: 19.1.0
@@ -13892,7 +13876,7 @@ snapshots:
satori: 0.0.46
yoga-wasm-web: 0.3.0
optionalDependencies:
react: 19.1.0
@@ -13931,7 +13915,7 @@ snapshots:
- supports-color
- vitest
dependencies:
'@tinyhttp/app': 1.3.0
chokidar: 3.6.0
@@ -17718,7 +17702,7 @@ snapshots:
react: 19.1.0
dependencies:
react: 19.1.0
@@ -18212,8 +18196,6 @@ snapshots:
-
@@ -18488,7 +18470,7 @@ snapshots:
react: 19.1.0
use-sync-external-store: 1.5.0([email protected])
dependencies:
@@ -20026,7 +20008,7 @@ snapshots:
escalade: 3.2.0
picocolors: 1.1.1
dependencies:
'@effect/schema': 0.68.18([email protected])
'@uploadthing/mime-types': 0.2.10
diff --git a/turbo.json b/turbo.json
index 32efe104..c9e37e52 100644
--- a/turbo.json
+++ b/turbo.json
@@ -1,6 +1,7 @@
{
"$schema": "https://turborepo.com/schema.v2.json",
"globalEnv": ["DATABASE_URL"],
+ "globalDependencies": [".env", ".env.*"],
"tasks": {
"build": {
"dependsOn": ["^build", "@repo/db#db:generate"],
@@ -12,7 +13,6 @@
"VERCEL_ENV",
"STAGING",
"NODE_ENV",
- "DATABASE_URL",
"REDIS_URL",
"GH_TOKEN",
"GITHUB_ID",
@@ -83,7 +83,6 @@
},
"typecheck": {
"dependsOn": ["@repo/db#db:generate", "^topo"],
- "outputs": ["node_modules/.cache/tsbuildinfo.json"],
"outputLogs": "errors-only"
},
"clean": {