From a9d487b9185a141488e60a2f6d7790460f3d7efc Mon Sep 17 00:00:00 2001 From: Alex Tkachev Date: Wed, 3 Jul 2024 14:32:11 +0400 Subject: [PATCH] chore: upgrade turborepo to 2.0 --- apps/cms/package.json | 3 +- apps/cms/turbo.json | 4 +- apps/decap/turbo.json | 2 +- apps/preview/turbo.json | 2 +- apps/website/turbo.json | 2 +- package.json | 13 ++-- packages/drupal/gutenberg_blocks/turbo.json | 2 +- packages/schema/turbo.json | 2 +- packages/ui/turbo.json | 2 +- pnpm-lock.yaml | 72 ++++++++++----------- tests/e2e/turbo.json | 2 +- tests/schema/turbo.json | 2 +- turbo.json | 2 +- 13 files changed, 55 insertions(+), 55 deletions(-) diff --git a/apps/cms/package.json b/apps/cms/package.json index d0a43c47a..db511f111 100644 --- a/apps/cms/package.json +++ b/apps/cms/package.json @@ -11,10 +11,9 @@ "prep:database": "./prep-database.sh", "prep:schema": "pnpm drush silverback-gatsby:schema-export ../../../tests/schema || true", "fix-premissions": "chmod +w web/sites/default/files/.htaccess && chmod +w web/sites/default/files/private/.htaccess", - "ensure-working-db": "pnpm drush sqlq 'select * from node'", "drush": "SB_ENVIRONMENT=1 SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite DRUSH_OPTIONS_URI=http://127.0.0.1:8888 vendor/bin/drush", "silverback": "SB_ENVIRONMENT=1 SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite SB_ADMIN_USER=admin SB_ADMIN_PASS=admin vendor/bin/silverback", - "drupal-install": "SB_SETUP=1 pnpm silverback setup --profile minimal && pnpm content:import && pnpm drush php-eval 'node_access_rebuild();' && rm -rf install-cache.zip && pnpm fix-premissions && pnpm ensure-working-db", + "drupal-install": "SB_SETUP=1 pnpm silverback setup --profile minimal && pnpm content:import && pnpm drush php-eval 'node_access_rebuild();' && rm -rf install-cache.zip && pnpm fix-premissions", "export-webforms": "pnpm turbo --filter '@custom-tests/e2e' webform-snapshots", "start": "cd web; SB_ENVIRONMENT=1 SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite DRUSH_OPTIONS_URI=http://127.0.0.1:8888 php -S 0.0.0.0:8888 .ht.router.php # no drush to avoid the drush server timeout", "dev": "pnpm start", diff --git a/apps/cms/turbo.json b/apps/cms/turbo.json index 36ad2b625..6071bc9b6 100644 --- a/apps/cms/turbo.json +++ b/apps/cms/turbo.json @@ -1,6 +1,6 @@ { "extends": ["//"], - "pipeline": { + "tasks": { "prep": { "dependsOn": ["prep:schema"] }, @@ -27,7 +27,7 @@ "outputs": [ "drush/**", "vendor/**", - "!**/.git/**", + "!*/**/.git/**", "web/**", "!web/modules/custom/**", "!web/themes/custom/**", diff --git a/apps/decap/turbo.json b/apps/decap/turbo.json index 84897ed6e..b6cfb94b3 100644 --- a/apps/decap/turbo.json +++ b/apps/decap/turbo.json @@ -1,7 +1,7 @@ { "$schema": "https://turborepo.org/schema.json", "extends": ["//"], - "pipeline": { + "tasks": { "prep:vite": { "dependsOn": ["^prep"], "inputs": ["src/**", "vite.config.ts", "index.html"], diff --git a/apps/preview/turbo.json b/apps/preview/turbo.json index 1b2fdd568..4fd41579b 100644 --- a/apps/preview/turbo.json +++ b/apps/preview/turbo.json @@ -1,6 +1,6 @@ { "extends": ["//"], - "pipeline": { + "tasks": { "prep": { "dependsOn": ["prep:app", "prep:server"] }, diff --git a/apps/website/turbo.json b/apps/website/turbo.json index fb8be6347..7b3520047 100644 --- a/apps/website/turbo.json +++ b/apps/website/turbo.json @@ -1,6 +1,6 @@ { "extends": ["//"], - "pipeline": { + "tasks": { "dev": { "persistent": true, "dependsOn": ["prep", "^prep"] diff --git a/package.json b/package.json index c86941856..4c9636a25 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "node": "^18.19.0", "pnpm": "8.6.12" }, + "packageManager": "pnpm@8.6.12", "scripts": { "postinstall": "husky install || true", "commit": "git-cz", @@ -16,11 +17,11 @@ "test:format:root": "pnpm prettier --ignore-unknown '**/**'", "test:format:workspaces": "pnpm --workspace-concurrency=1 -r exec prettier --ignore-unknown '**/**'", "turbo:local": "if [ -z $CI ]; then echo $(date)$RANDOM > apps/cms/turbo-seed.txt; fi", - "turbo:test": "pnpm turbo:local && pnpm tb test:unit --no-daemon --go-fallback --output-logs=new-only && pnpm tb test:integration --no-daemon --go-fallback --output-logs=new-only --concurrency=1", - "turbo:test:force": "pnpm tb test:unit --no-daemon --go-fallback --output-logs=new-only --force && pnpm tb test:integration --no-daemon --go-fallback --output-logs=new-only --concurrency=1 --force", - "turbo:test:quick": "pnpm turbo:local && pnpm tb test:unit --no-daemon --go-fallback --output-logs=new-only", - "turbo:prep": "pnpm turbo:local && pnpm tb prep --no-daemon --go-fallback --output-logs=new-only", - "turbo:prep:force": "rm -f apps/cms/web/sites/default/files/.sqlite && pnpm tb prep --no-daemon --go-fallback --force", + "turbo:test": "pnpm turbo:local && pnpm turbo test:unit && pnpm turbo test:integration --concurrency=1", + "turbo:test:force": "pnpm turbo test:unit --force && pnpm tb test:integration --concurrency=1 --force", + "turbo:test:quick": "pnpm turbo:local && pnpm turbo test:unit", + "turbo:prep": "pnpm turbo:local && pnpm turbo prep", + "turbo:prep:force": "rm -f apps/cms/web/sites/default/files/.sqlite && pnpm turbo prep --force", "gutenberg:generate": "pnpm run --filter \"@custom/gutenberg_blocks\" gutenberg:generate" }, "private": true, @@ -39,7 +40,7 @@ "eslint-plugin-simple-import-sort": "^10.0.0", "husky": "^8.0.3", "prettier": "^3.2.5", - "turbo": "^1.11.2", + "turbo": "^2.0.6", "typescript": "^5.3.3", "vitest": "^1.1.1" }, diff --git a/packages/drupal/gutenberg_blocks/turbo.json b/packages/drupal/gutenberg_blocks/turbo.json index 60256ce21..bedaee983 100644 --- a/packages/drupal/gutenberg_blocks/turbo.json +++ b/packages/drupal/gutenberg_blocks/turbo.json @@ -1,6 +1,6 @@ { "extends": ["//"], - "pipeline": { + "tasks": { "test:static": { "inputs": ["src/**"] }, diff --git a/packages/schema/turbo.json b/packages/schema/turbo.json index 85d8a583f..006026389 100644 --- a/packages/schema/turbo.json +++ b/packages/schema/turbo.json @@ -1,7 +1,7 @@ { "$schema": "https://turborepo.org/schema.json", "extends": ["//"], - "pipeline": { + "tasks": { "prep:directives": { "dependsOn": ["@custom/cms#prep:composer"], "inputs": ["package.json"], diff --git a/packages/ui/turbo.json b/packages/ui/turbo.json index 52b8064c4..685bbca6d 100644 --- a/packages/ui/turbo.json +++ b/packages/ui/turbo.json @@ -1,7 +1,7 @@ { "$schema": "https://turborepo.org/schema.json", "extends": ["//"], - "pipeline": { + "tasks": { "prep:fonts": { "inputs": ["static/public/fonts/preload/**"], "outputs": ["build/preloaded-fonts.json"] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7c01c9c7d..abc399cd4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,8 +57,8 @@ importers: specifier: ^3.2.5 version: 3.2.5 turbo: - specifier: ^1.11.2 - version: 1.11.2 + specifier: ^2.0.6 + version: 2.0.6 typescript: specifier: ^5.3.3 version: 5.3.3 @@ -565,7 +565,7 @@ importers: devDependencies: '@amazeelabs/bridge-storybook': specifier: ^1.2.8 - version: 1.2.8(@storybook/addon-actions@8.1.6)(happy-dom@12.10.3)(playwright@1.43.0)(react@18.2.0) + version: 1.2.8(@storybook/addon-actions@8.1.6)(happy-dom@12.10.3)(playwright@1.44.1)(react@18.2.0) '@amazeelabs/cloudinary-responsive-image': specifier: ^1.6.15 version: 1.6.15 @@ -640,7 +640,7 @@ importers: version: 10.4.16(postcss@8.4.32) axe-playwright: specifier: ^2.0.1 - version: 2.0.1(playwright@1.43.0) + version: 2.0.1(playwright@1.44.1) cssnano: specifier: ^6.0.3 version: 6.0.3(postcss@8.4.32) @@ -782,7 +782,7 @@ packages: - webdriverio dev: false - /@amazeelabs/bridge-storybook@1.2.8(@storybook/addon-actions@8.1.6)(happy-dom@12.10.3)(playwright@1.43.0)(react@18.2.0): + /@amazeelabs/bridge-storybook@1.2.8(@storybook/addon-actions@8.1.6)(happy-dom@12.10.3)(playwright@1.44.1)(react@18.2.0): resolution: {integrity: sha512-cM0IS1pZayNDPIc//8qKglo09RgTC0gCqCRKP5i3AuFAKZiLNZxGOWwwhS4aB2q81nBnzrAVj22rnyaaqEUpdw==} peerDependencies: '@storybook/addon-actions': '>=7.6.7' @@ -793,7 +793,7 @@ packages: optionalDependencies: '@types/react': 18.2.46 typescript: 5.4.4 - vitest: 0.34.6(happy-dom@12.10.3)(playwright@1.43.0) + vitest: 0.34.6(happy-dom@12.10.3)(playwright@1.44.1) transitivePeerDependencies: - '@edge-runtime/vm' - '@vitest/browser' @@ -7109,8 +7109,8 @@ packages: /@radix-ui/react-compose-refs@1.1.0(@types/react@18.2.46)(react@18.2.0): resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} peerDependencies: - '@types/react': 18.3.3 - react: 19.0.0-rc.0 + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true @@ -7332,8 +7332,8 @@ packages: /@radix-ui/react-use-callback-ref@1.1.0(@types/react@18.2.46)(react@18.2.0): resolution: {integrity: sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==} peerDependencies: - '@types/react': 18.3.3 - react: 19.0.0-rc.0 + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true @@ -7373,8 +7373,8 @@ packages: /@radix-ui/react-use-layout-effect@1.1.0(@types/react@18.2.46)(react@18.2.0): resolution: {integrity: sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==} peerDependencies: - '@types/react': 18.3.3 - react: 19.0.0-rc.0 + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true @@ -12467,7 +12467,7 @@ packages: rimraf: 3.0.2 dev: true - /axe-playwright@2.0.1(playwright@1.43.0): + /axe-playwright@2.0.1(playwright@1.44.1): resolution: {integrity: sha512-MHjNjGARulF9XzqSfspmNjw+tpBz4x9o1VlTuLWEUW9fqzhn+xWa1qEpuOIQPbsRWQiLfooDjQAunLeE0PM5AQ==} peerDependencies: playwright: '>1.0.0' @@ -12477,7 +12477,7 @@ packages: axe-html-reporter: 2.2.3(axe-core@4.7.0) junit-report-builder: 3.2.1 picocolors: 1.0.0 - playwright: 1.43.0 + playwright: 1.44.1 dev: true /axios@0.21.4(debug@4.3.4): @@ -31369,64 +31369,64 @@ packages: resolution: {integrity: sha512-gHbdMZlA6Ym6Ur5pSH/UWrNQMIM9IqTH6SoL1DbHpqEdQ8i+cFunSmSlFykPt0eGQwZ4d/XTHOl74H0/kFBVWw==} dev: true - /turbo-darwin-64@1.11.2: - resolution: {integrity: sha512-toFmRG/adriZY3hOps7nYCfqHAS+Ci6xqgX3fbo82kkLpC6OBzcXnleSwuPqjHVAaRNhVoB83L5njcE9Qwi2og==} + /turbo-darwin-64@2.0.6: + resolution: {integrity: sha512-XpgBwWj3Ggmz/gQVqXdMKXHC1iFPMDiuwugLwSzE7Ih0O13JuNtYZKhQnopvbDQnFQCeRq2Vsm5OTWabg/oB/g==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.11.2: - resolution: {integrity: sha512-FCsEDZ8BUSFYEOSC3rrARQrj7x2VOrmVcfrMUIhexTxproRh4QyMxLfr6LALk4ymx6jbDCxWa6Szal8ckldFbA==} + /turbo-darwin-arm64@2.0.6: + resolution: {integrity: sha512-RfeZYXIAkiA21E8lsvfptGTqz/256YD+eI1x37fedfvnHFWuIMFZGAOwJxtZc6QasQunDZ9TRRREbJNI68tkIw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.11.2: - resolution: {integrity: sha512-Vzda/o/QyEske5CxLf0wcu7UUS+7zB90GgHZV4tyN+WZtoouTvbwuvZ3V6b5Wgd3OJ/JwWR0CXDK7Sf4VEMr7A==} + /turbo-linux-64@2.0.6: + resolution: {integrity: sha512-92UDa0xNQQbx0HdSp9ag3YSS3xPdavhc7q9q9mxIAcqyjjD6VElA4Y85m4F/DDGE5SolCrvBz2sQhVmkOd6Caw==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.11.2: - resolution: {integrity: sha512-bRLwovQRz0yxDZrM4tQEAYV0fBHEaTzUF0JZ8RG1UmZt/CqtpnUrJpYb1VK8hj1z46z9YehARpYCwQ2K0qU4yw==} + /turbo-linux-arm64@2.0.6: + resolution: {integrity: sha512-eQKu6utCVUkIH2kqOzD8OS6E0ba6COjWm6PRDTNCHQRljZW503ycaTUIdMOiJrVg1MkEjDyOReUg8s8D18aJ4Q==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.11.2: - resolution: {integrity: sha512-LgTWqkHAKgyVuLYcEPxZVGPInTjjeCnN5KQMdJ4uQZ+xMDROvMFS2rM93iQl4ieDJgidwHCxxCxaU9u8c3d/Kg==} + /turbo-windows-64@2.0.6: + resolution: {integrity: sha512-+9u4EPrpoeHYCQ46dRcou9kbkSoelhOelHNcbs2d86D6ruYD/oIAHK9qgYK8LeARRz0jxhZIA/dWYdYsxJJWkw==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.11.2: - resolution: {integrity: sha512-829aVBU7IX0c/B4G7g1VI8KniAGutHhIupkYMgF6xPkYVev2G3MYe6DMS/vsLt9GGM9ulDtdWxWrH5P2ngK8IQ==} + /turbo-windows-arm64@2.0.6: + resolution: {integrity: sha512-rdrKL+p+EjtdDVg0wQ/7yTbzkIYrnb0Pw4IKcjsy3M0RqUM9UcEi67b94XOAyTa5a0GqJL1+tUj2ebsFGPgZbg==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.11.2: - resolution: {integrity: sha512-jPC7LVQJzebs5gWf8FmEvsvXGNyKbN+O9qpvv98xpNaM59aS0/Irhd0H0KbcqnXfsz7ETlzOC3R+xFWthC4Z8A==} + /turbo@2.0.6: + resolution: {integrity: sha512-/Ftmxd5Mq//a9yMonvmwENNUN65jOVTwhhBPQjEtNZutYT9YKyzydFGLyVM1nzhpLWahQSMamRc/RDBv5EapzA==} hasBin: true optionalDependencies: - turbo-darwin-64: 1.11.2 - turbo-darwin-arm64: 1.11.2 - turbo-linux-64: 1.11.2 - turbo-linux-arm64: 1.11.2 - turbo-windows-64: 1.11.2 - turbo-windows-arm64: 1.11.2 + turbo-darwin-64: 2.0.6 + turbo-darwin-arm64: 2.0.6 + turbo-linux-64: 2.0.6 + turbo-linux-arm64: 2.0.6 + turbo-windows-64: 2.0.6 + turbo-windows-arm64: 2.0.6 dev: true /type-check@0.4.0: @@ -32750,7 +32750,7 @@ packages: dev: false optional: true - /vitest@0.34.6(happy-dom@12.10.3)(playwright@1.43.0): + /vitest@0.34.6(happy-dom@12.10.3)(playwright@1.44.1): resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} engines: {node: '>=v14.18.0'} hasBin: true @@ -32800,7 +32800,7 @@ packages: magic-string: 0.30.9 pathe: 1.1.2 picocolors: 1.0.0 - playwright: 1.43.0 + playwright: 1.44.1 std-env: 3.7.0 strip-literal: 1.3.0 tinybench: 2.6.0 diff --git a/tests/e2e/turbo.json b/tests/e2e/turbo.json index c627c0a30..4d7d4e02a 100644 --- a/tests/e2e/turbo.json +++ b/tests/e2e/turbo.json @@ -1,6 +1,6 @@ { "extends": ["//"], - "pipeline": { + "tasks": { "prep": { "cache": false }, diff --git a/tests/schema/turbo.json b/tests/schema/turbo.json index 220d284ec..a9346c887 100644 --- a/tests/schema/turbo.json +++ b/tests/schema/turbo.json @@ -1,6 +1,6 @@ { "extends": ["//"], - "pipeline": { + "tasks": { "test:integration": { "dependsOn": ["@custom/cms#prep"] }, diff --git a/turbo.json b/turbo.json index 9699cbe58..a70450c26 100644 --- a/turbo.json +++ b/turbo.json @@ -1,6 +1,6 @@ { "$schema": "https://turborepo.org/schema.json", - "pipeline": { + "tasks": { "build": { "dependsOn": ["prep"] },