diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 658c0a2ec..d3f2d73f4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -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 diff --git a/.gitignore b/.gitignore index 7003450e5..1bbd03821 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ node_modules/ dist/ .next/ tsconfig.tsbuildinfo +.turbo diff --git a/package.json b/package.json index 670dbec2b..777f4558e 100644 --- a/package.json +++ b/package.json @@ -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": { @@ -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": "pnpm@9.11.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d9f3904e..0698f204c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: specifier: ^4.18.0 version: 4.24.0 turbo: - specifier: ^2.0.4 - version: 2.1.3 + specifier: ^2.2.3 + version: 2.2.3 docs: dependencies: @@ -14030,41 +14030,41 @@ packages: resolution: {integrity: sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA==} engines: {node: ^16.14.0 || >=18.0.0} - turbo-darwin-64@2.1.3: - resolution: {integrity: sha512-ouJOm0g0YyoBuhmikEujVCBGo3Zr0lbSOWFIsQtWUTItC88F2w2byhjtsYGPXQwMlTbXwmoBU2lOCfWNkeEwHQ==} + turbo-darwin-64@2.2.3: + resolution: {integrity: sha512-Rcm10CuMKQGcdIBS3R/9PMeuYnv6beYIHqfZFeKWVYEWH69sauj4INs83zKMTUiZJ3/hWGZ4jet9AOwhsssLyg==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.1.3: - resolution: {integrity: sha512-j2FOJsK4LAOtHQlb3Oom0yWB/Vi0nF1ljInr311mVzHoFAJRZtfW2fRvdZRb/lBUwjSp8be58qWHzANIcrA0OA==} + turbo-darwin-arm64@2.2.3: + resolution: {integrity: sha512-+EIMHkuLFqUdJYsA3roj66t9+9IciCajgj+DVek+QezEdOJKcRxlvDOS2BUaeN8kEzVSsNiAGnoysFWYw4K0HA==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.1.3: - resolution: {integrity: sha512-ubRHkI1gSel7H7wsmxKK8C9UlLWqg/2dkCC88LFupaK6TKgvBKqDqA0Z1M9C/escK0Jsle2k0H8bybV9OYIl4Q==} + turbo-linux-64@2.2.3: + resolution: {integrity: sha512-UBhJCYnqtaeOBQLmLo8BAisWbc9v9daL9G8upLR+XGj6vuN/Nz6qUAhverN4Pyej1g4Nt1BhROnj6GLOPYyqxQ==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.1.3: - resolution: {integrity: sha512-LffUL+e5wv7BtD6DgnM2kKOlDkMo2eRjhbAjVnrCD3wi2ug0tl6NDzajnHHjtaMyOnIf4AvzSKdLWsBxafGBQA==} + turbo-linux-arm64@2.2.3: + resolution: {integrity: sha512-hJYT9dN06XCQ3jBka/EWvvAETnHRs3xuO/rb5bESmDfG+d9yQjeTMlhRXKrr4eyIMt6cLDt1LBfyi+6CQ+VAwQ==} cpu: [arm64] os: [linux] turbo-stream@2.4.0: resolution: {integrity: sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==} - turbo-windows-64@2.1.3: - resolution: {integrity: sha512-S9SvcZZoaq5jKr6kA6eF7/xgQhVn8Vh7PVy5lono9zybvhyL4eY++y2PaLToIgL8G9IcbLmgOC73ExNjFBg9XQ==} + turbo-windows-64@2.2.3: + resolution: {integrity: sha512-NPrjacrZypMBF31b4HE4ROg4P3nhMBPHKS5WTpMwf7wydZ8uvdEHpESVNMOtqhlp857zbnKYgP+yJF30H3N2dQ==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.1.3: - resolution: {integrity: sha512-twlEo8lRrGbrR6T/ZklUIquW3IlFCEtywklgVA81aIrSBm56+GEVpSrHhIlsx1hiYeSNrs+GpDwZGe+V7fvEVQ==} + turbo-windows-arm64@2.2.3: + resolution: {integrity: sha512-fnNrYBCqn6zgKPKLHu4sOkihBI/+0oYFr075duRxqUZ+1aLWTAGfHZLgjVeLh3zR37CVzuerGIPWAEkNhkWEIw==} cpu: [arm64] os: [win32] - turbo@2.1.3: - resolution: {integrity: sha512-lY0yj2GH2a2a3NExZ3rGe+rHUVeFE2aXuRAue57n+08E7Z7N7YCmynju0kPC1grAQzERmoLpKrmzmWd+PNiADw==} + turbo@2.2.3: + resolution: {integrity: sha512-5lDvSqIxCYJ/BAd6rQGK/AzFRhBkbu4JHVMLmGh/hCb7U3CqSnr5Tjwfy9vc+/5wG2DJ6wttgAaA7MoCgvBKZQ==} hasBin: true twoslash-protocol@0.2.12: @@ -32632,34 +32632,34 @@ snapshots: transitivePeerDependencies: - supports-color - turbo-darwin-64@2.1.3: + turbo-darwin-64@2.2.3: optional: true - turbo-darwin-arm64@2.1.3: + turbo-darwin-arm64@2.2.3: optional: true - turbo-linux-64@2.1.3: + turbo-linux-64@2.2.3: optional: true - turbo-linux-arm64@2.1.3: + turbo-linux-arm64@2.2.3: optional: true turbo-stream@2.4.0: {} - turbo-windows-64@2.1.3: + turbo-windows-64@2.2.3: optional: true - turbo-windows-arm64@2.1.3: + turbo-windows-arm64@2.2.3: optional: true - turbo@2.1.3: + turbo@2.2.3: optionalDependencies: - turbo-darwin-64: 2.1.3 - turbo-darwin-arm64: 2.1.3 - turbo-linux-64: 2.1.3 - turbo-linux-arm64: 2.1.3 - turbo-windows-64: 2.1.3 - turbo-windows-arm64: 2.1.3 + turbo-darwin-64: 2.2.3 + turbo-darwin-arm64: 2.2.3 + turbo-linux-64: 2.2.3 + turbo-linux-arm64: 2.2.3 + turbo-windows-64: 2.2.3 + turbo-windows-arm64: 2.2.3 twoslash-protocol@0.2.12: {} diff --git a/turbo.json b/turbo.json index 46ed57a92..49eabfe80 100644 --- a/turbo.json +++ b/turbo.json @@ -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": {} + } } }