Skip to content

Commit

Permalink
chore: Update Turbo to v2.2 (#1449)
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn authored Oct 23, 2024
1 parent 1fae75b commit 5d60cdf
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 52 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ jobs:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
# General setup
- uses: actions/checkout@v4
with:
fetch-depth: 0 # For Turborepo
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
Expand All @@ -23,13 +26,23 @@ jobs:
# Next.js caching
- uses: actions/cache@v4
with:
path: ${{ github.workspace }}/examples/*/.next/cache
path: |
${{ github.workspace }}/examples/*/.next/cache
${{ github.workspace }}/docs/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}

# Setting up playwright in one example is sufficient
- run: pnpm --filter example-app-router-playground exec playwright install --with-deps
# Playwright (incl. caching)
- id: playwright-version
run: |
version=$(pnpm --filter example-app-router exec playwright --version | awk '{print $2}')
echo "version=$version" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}
- run: pnpm --filter example-app-router exec playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'

- run: pnpm run build
- run: pnpm run lint
- run: pnpm run test
- run: pnpm run size
# Main tasks
- run: pnpm turbo run lint build test size --affected
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ node_modules/
dist/
.next/
tsconfig.tsbuildinfo
.turbo
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
"name": "root",
"private": true,
"scripts": {
"build": "turbo run build --env-mode=loose",
"test": "turbo run test --concurrency 1 --env-mode=loose",
"lint": "turbo run lint --env-mode=loose",
"postinstall": "turbo run build --filter './packages/**' --env-mode=loose",
"size": "turbo run size --env-mode=loose",
"postinstall": "turbo run build --filter './packages/**'",
"publish": "lerna publish"
},
"devDependencies": {
Expand All @@ -24,7 +20,7 @@
"conventional-changelog-conventionalcommits": "^7.0.0",
"execa": "^9.2.0",
"rollup": "^4.18.0",
"turbo": "^2.0.4"
"turbo": "^2.2.3"
},
"packageManager": "[email protected]"
}
58 changes: 29 additions & 29 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 5 additions & 10 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,16 @@
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": [
"dist/**/*.ts",
"dist/**/*.tsx",
"dist/**/*.mjs",
"dist/**/*.js",
".next/**",
"!.next/cache/**"
]
"outputs": ["dist/**", ".next/**", "!.next/cache/**", "build/**"]
},
"lint": {
"dependsOn": ["^build"]
},
"test": {
"dependsOn": ["build"]
},
"size": {
"dependsOn": ["build"]
},
"lint": {}
}
}
}

0 comments on commit 5d60cdf

Please sign in to comment.