diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 027ec0e143..f1209b0737 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -7,7 +7,7 @@ on: env: NAPI_CLI_VERSION: 2.16.2 - TURBO_VERSION: 1.13.3-canary.2 + TURBO_VERSION: 2.0.3 NODE_LTS_VERSION: 20 CARGO_PROFILE_RELEASE_LTO: 'true' TURBO_TEAM: 'vercel' @@ -84,9 +84,11 @@ jobs: - 'arm64' target: 'x86_64-apple-darwin' + # --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default + # TODO: we should add the relevant envs later to to switch to strict mode build: | npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && corepack enable - turbo run build-native-release -vvv --remote-cache-timeout 90 --summarize -- --target x86_64-apple-darwin + turbo run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target x86_64-apple-darwin strip -x packages/next-swc/native/next-swc.*.node - host: @@ -95,13 +97,15 @@ jobs: - 'arm64' target: 'aarch64-apple-darwin' + # --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default + # TODO: we should add the relevant envs later to to switch to strict mode build: | export CC=$(xcrun -f clang); export CXX=$(xcrun -f clang++); SYSROOT=$(xcrun --sdk macosx --show-sdk-path); export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT"; npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" && corepack enable - turbo run build-native-release -vvv --remote-cache-timeout 90 --summarize -- --target aarch64-apple-darwin + turbo run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target aarch64-apple-darwin strip -x packages/next-swc/native/next-swc.*.node - host: @@ -109,10 +113,12 @@ jobs: - 'windows' - 'x64' + # --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default + # TODO: we should add the relevant envs later to to switch to strict mode build: | corepack enable npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" - turbo run build-native-release -vvv --remote-cache-timeout 90 --summarize -- --target x86_64-pc-windows-msvc + turbo run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target x86_64-pc-windows-msvc target: 'x86_64-pc-windows-msvc' - host: @@ -120,10 +126,12 @@ jobs: - 'windows' - 'x64' + # --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default + # TODO: we should add the relevant envs later to to switch to strict mode build: | corepack enable npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" - turbo run build-native-no-plugin-release -vvv --remote-cache-timeout 90 --summarize -- --target i686-pc-windows-msvc + turbo run build-native-no-plugin-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target i686-pc-windows-msvc target: 'i686-pc-windows-msvc' - host: @@ -132,10 +140,12 @@ jobs: - 'x64' target: 'aarch64-pc-windows-msvc' + # --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default + # TODO: we should add the relevant envs later to to switch to strict mode build: | corepack enable npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" - turbo run build-native-no-plugin-release -vvv --remote-cache-timeout 90 --summarize -- --target aarch64-pc-windows-msvc + turbo run build-native-no-plugin-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target aarch64-pc-windows-msvc - host: - 'self-hosted' @@ -374,7 +384,9 @@ jobs: run: node scripts/normalize-version-bump.js - name: Build - run: turbo run build-wasm -vvv --remote-cache-timeout 90 --summarize -- --target ${{ matrix.target }} + # --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default + # TODO: we should add the relevant envs later to to switch to strict mode + run: turbo run build-wasm -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ matrix.target }} - name: Add target to folder name run: '[[ -d "packages/next-swc/crates/wasm/pkg" ]] && mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-${{ matrix.target }} || ls packages/next-swc/crates/wasm' diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 4a306d1773..45c44ba508 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -8,7 +8,7 @@ on: env: NAPI_CLI_VERSION: 2.14.7 - TURBO_VERSION: 1.13.3-canary.2 + TURBO_VERSION: 2.0.3 NODE_MAINTENANCE_VERSION: 18 NODE_LTS_VERSION: 20 TEST_CONCURRENCY: 8 diff --git a/.github/workflows/build_reusable.yml b/.github/workflows/build_reusable.yml index 34d45a0c6a..3a601a4777 100644 --- a/.github/workflows/build_reusable.yml +++ b/.github/workflows/build_reusable.yml @@ -62,7 +62,7 @@ on: env: NAPI_CLI_VERSION: 2.14.7 - TURBO_VERSION: 1.13.3-canary.2 + TURBO_VERSION: 2.0.3 NODE_LTS_VERSION: 20.9.0 TEST_CONCURRENCY: 8 # disable backtrace for test snapshots @@ -159,7 +159,7 @@ jobs: - run: node scripts/normalize-version-bump.js name: normalize versions - - run: turbo run build-native-release -vvv --remote-cache-timeout 90 --summarize -- --target x86_64-unknown-linux-gnu + - run: turbo run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target x86_64-unknown-linux-gnu if: ${{ inputs.skipNativeBuild != 'yes' }} - name: Upload next-swc artifact diff --git a/.github/workflows/code_freeze.yml b/.github/workflows/code_freeze.yml index 5d005b1086..8517359ac6 100644 --- a/.github/workflows/code_freeze.yml +++ b/.github/workflows/code_freeze.yml @@ -17,7 +17,7 @@ name: Code Freeze env: NAPI_CLI_VERSION: 2.14.7 - TURBO_VERSION: 1.13.3-canary.2 + TURBO_VERSION: 2.0.3 NODE_LTS_VERSION: 20 jobs: diff --git a/.github/workflows/pull_request_stats.yml b/.github/workflows/pull_request_stats.yml index 64a4a3b65a..d970f7a6a9 100644 --- a/.github/workflows/pull_request_stats.yml +++ b/.github/workflows/pull_request_stats.yml @@ -6,7 +6,7 @@ name: Generate Pull Request Stats env: NAPI_CLI_VERSION: 2.14.7 - TURBO_VERSION: 1.13.3-canary.2 + TURBO_VERSION: 2.0.3 NODE_LTS_VERSION: 20 TEST_CONCURRENCY: 6 diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index d961f14795..6fbd15189a 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -35,7 +35,7 @@ name: Trigger Release env: NAPI_CLI_VERSION: 2.14.7 - TURBO_VERSION: 1.13.3-canary.2 + TURBO_VERSION: 2.0.3 NODE_LTS_VERSION: 20 jobs: diff --git a/package.json b/package.json index 07c9d84f46..6ce8823941 100644 --- a/package.json +++ b/package.json @@ -232,7 +232,7 @@ "taskr": "1.1.0", "tree-kill": "1.2.2", "tsec": "0.2.1", - "turbo": "1.13.3-canary.2", + "turbo": "2.0.3", "typescript": "5.3.3", "unfetch": "4.2.0", "wait-port": "0.2.2", diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 40f5132481..d400cb3a8a 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -51,6 +51,8 @@ "validate-npm-package-name": "5.0.1" }, "engines": { - "node": ">=18.17.0" - } + "node": ">=18.17.0", + "pnpm": "8.15.7" + }, + "packageManager": "pnpm@8.15.7" } diff --git a/packages/next-swc/turbo.json b/packages/next-swc/turbo.json index f811943d1a..aac2f8ea20 100644 --- a/packages/next-swc/turbo.json +++ b/packages/next-swc/turbo.json @@ -1,6 +1,7 @@ { + "$schema": "https://turborepo.org/schema.json", "extends": ["//"], - "pipeline": { + "tasks": { "build-native": { "inputs": [ "../../.cargo/**", diff --git a/packages/next/package.json b/packages/next/package.json index 3027179e30..3e97c2980b 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -344,6 +344,8 @@ "vercel" ], "engines": { - "node": ">=18.17.0" - } + "node": ">=18.17.0", + "pnpm": "8.15.7" + }, + "packageManager": "pnpm@8.15.7" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0c2ef517f1..20a0b8c118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -546,8 +546,8 @@ importers: specifier: 0.2.1 version: 0.2.1(@bazel/bazelisk@1.18.0)(typescript@5.3.3) turbo: - specifier: 1.13.3-canary.2 - version: 1.13.3-canary.2 + specifier: 2.0.3 + version: 2.0.3 typescript: specifier: 5.3.3 version: 5.3.3 @@ -14782,7 +14782,7 @@ packages: engines: {node: '>= 6'} dependencies: agent-base: 6.0.2 - debug: 4.1.1 + debug: 4.3.4 transitivePeerDependencies: - supports-color @@ -24941,64 +24941,64 @@ packages: engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} dev: true - /turbo-darwin-64@1.13.3-canary.2: - resolution: {integrity: sha512-M8QDR6SKPSLEjSLWnIM//caHWBhcZNkIPdnnMkHm8R9/fpFSI5X//GBdR0qnXcgdqOdFgnxheabwYm5Bm+1KWQ==} + /turbo-darwin-64@2.0.3: + resolution: {integrity: sha512-v7ztJ8sxdHw3SLfO2MhGFeeU4LQhFii1hIGs9uBiXns/0YTGOvxLeifnfGqhfSrAIIhrCoByXO7nR9wlm10n3Q==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.13.3-canary.2: - resolution: {integrity: sha512-4RpdYK+XF9Lx7/nmUzbn978t4HBCmmemAazOjmhyd0pOMn8rLVexPkByDEV84SrgofkCWdTHDwcHaOQvOLrKtw==} + /turbo-darwin-arm64@2.0.3: + resolution: {integrity: sha512-LUcqvkV9Bxtng6QHbevp8IK8zzwbIxM6HMjCE7FEW6yJBN1KwvTtRtsGBwwmTxaaLO0wD1Jgl3vgkXAmQ4fqUw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.13.3-canary.2: - resolution: {integrity: sha512-8gzyPtOmzACNwtWi5//ZHwcJb2i21pZVXQEiNwTycypyBtV2H0WChmqjulS7M3z5dxwHcx0Ehf9TqY4K023j2A==} + /turbo-linux-64@2.0.3: + resolution: {integrity: sha512-xpdY1suXoEbsQsu0kPep2zrB8ijv/S5aKKrntGuQ62hCiwDFoDcA/Z7FZ8IHQ2u+dpJARa7yfiByHmizFE0r5Q==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.13.3-canary.2: - resolution: {integrity: sha512-QzRIyO+HUMc5+hj5cVBCKpCyOiBPxzAao4zWZgz6iKMuSC6utjHLf/9AAo6NOMFgBONTYsMUArL5gDyLLOO0lw==} + /turbo-linux-arm64@2.0.3: + resolution: {integrity: sha512-MBACTcSR874L1FtLL7gkgbI4yYJWBUCqeBN/iE29D+8EFe0d3fAyviFlbQP4K/HaDYet1i26xkkOiWr0z7/V9A==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.13.3-canary.2: - resolution: {integrity: sha512-s4k+yclLr/MWuwYURPZX2v6y1PP7E2aUUao6syQ68Un+36RYBgINN/VV4HucZuiXyqLuBuaDjfrnE1TX3FREOg==} + /turbo-windows-64@2.0.3: + resolution: {integrity: sha512-zi3YuKPkM9JxMTshZo3excPk37hUrj5WfnCqh4FjI26ux6j/LJK+Dh3SebMHd9mR7wP9CMam4GhmLCT+gDfM+w==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.13.3-canary.2: - resolution: {integrity: sha512-p5qGGeb3z1Gaxq43lTFm/PyTh7xtuDCfesxGWZWESG6MyXZuZYzuEH2cSmM8jqta6EC+G+iF5sxeKUzIpsJWeQ==} + /turbo-windows-arm64@2.0.3: + resolution: {integrity: sha512-wmed4kkenLvRbidi7gISB4PU77ujBuZfgVGDZ4DXTFslE/kYpINulwzkVwJIvNXsJtHqyOq0n6jL8Zwl3BrwDg==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.13.3-canary.2: - resolution: {integrity: sha512-GqkwRxoigbjvj/m1JfY7kGDupNeuADW7Hg1+rO+KqNMEUihOfq8a1kjCbwlqOfyS8PPfMHDkDPXrfhA8A1N9vg==} + /turbo@2.0.3: + resolution: {integrity: sha512-jF1K0tTUyryEWmgqk1V0ALbSz3VdeZ8FXUo6B64WsPksCMCE48N5jUezGOH2MN0+epdaRMH8/WcPU0QQaVfeLA==} hasBin: true optionalDependencies: - turbo-darwin-64: 1.13.3-canary.2 - turbo-darwin-arm64: 1.13.3-canary.2 - turbo-linux-64: 1.13.3-canary.2 - turbo-linux-arm64: 1.13.3-canary.2 - turbo-windows-64: 1.13.3-canary.2 - turbo-windows-arm64: 1.13.3-canary.2 + turbo-darwin-64: 2.0.3 + turbo-darwin-arm64: 2.0.3 + turbo-linux-64: 2.0.3 + turbo-linux-arm64: 2.0.3 + turbo-windows-64: 2.0.3 + turbo-windows-arm64: 2.0.3 dev: true /tweetnacl@0.14.5: diff --git a/scripts/normalize-version-bump.js b/scripts/normalize-version-bump.js index e13eb4b892..b4610f053b 100755 --- a/scripts/normalize-version-bump.js +++ b/scripts/normalize-version-bump.js @@ -2,7 +2,7 @@ // @ts-check /* - This prevents busting the turbo cache un-necessarily due + This prevents busting the turbo cache un-necessarily due to bumping the version in the repo's package.json files */ const path = require('path') @@ -72,5 +72,6 @@ const writeJson = async (filePath, data) => private: true, workspaces: ['packages/*'], scripts: {}, + packageManager: 'pnpm@8.15.7', }) })() diff --git a/turbo.json b/turbo.json index 3ee8c97f8f..0cb4370968 100644 --- a/turbo.json +++ b/turbo.json @@ -1,7 +1,6 @@ { "$schema": "https://turborepo.org/schema.json", - "experimentalUI": true, - "pipeline": { + "tasks": { "build": { "dependsOn": ["^build"], "outputs": ["dist/**"]