From 720086bc213761ebd00a4100d264879b74f92014 Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Wed, 31 Jan 2024 09:22:11 -0700 Subject: [PATCH] Examples tests revamp. (#7098) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests for examples have proven to be a point of friction for us. This PR aims to fix that. ### Try it out locally with `turbo test -F "@turborepo-examples-tests*" --continue --concurrency=5` --- There is a bit of technical debt associated with these tests, I'm told. Historically, these tests were used more like integration or end-to-end tests to ensure that `turbo` was behaving predictably on example monorepos. Today, we're making the explicit commitment that **these tests no longer need to serve that goal**. Instead, they are for **ensuring that the examples work correctly against the latest published version of `turbo`**. We're making sure that users can trust that `npx create-turbo@latest [-e ]` will work out of the box. ## Problems to solve - [x] **Complexity** - It appears that our scripting once handled swapping out package managers for every example. We no longer feel the need to test our examples in this way. We trust that the rest of our CI has managed these complexities way before they make it to end users downloading an example. - There is also layers of scripting around platforms, git, and manipulating the package manager. I'm not totally sure what these were for - but they're not useful for our new goals. - [x] **Flakiness** - I suspect that we're not actually surfacing broken examples in these tests. I've received reports from users that our examples didn't work out of the box - _while these tests are green_. 🧐 As we peel back the technical debt, I believe we will find out if this is indeed the case. - I've personally experienced these tests _fail_ at unexpected times, _pass_ at unexpected times, and _pass and fail_ by re-running the same job multiple times with the same code. - Going back to our freshly stated goals, the tests catch problems way too late (when they do truly catch problems). The examples can potentially go untested against the latest published version of `turbo` indefinitely. - [x] **Testing the wrong thing** - The tests are currently set up to do snapshot testing using Prysk. However, we no longer are interested in trying to find drift in logs in these tests so we don't need this log capturing layer. - This Prysk layer also adds a heavy, third layer of task runner management between terminal command and final package.json script execution. The other two are `turbo`. - [x] **Debuggability** - Understanding and debugging the current test setup is **extremely** difficult. I have my suspicions that this also goes back to the Prysk layer as it makes logs quite hard to read. I've found it also swallows logs during the debugging process that would have been useful to see earlier. - I expect that this issue will fix itself as we address the complexity and flakiness concerns above. - [x] **Performance** - I have a hunch that these tests can just...be faster. This will likely be a tailwind of addressing the aforementioned complexity. ## Non-goals - There are a few examples that we don't test due to their own internal complexities (namely, Docker). We could choose to test these examples in the future but we're preferring to fix what we already have first. - We **do not** want to test the examples against `turbo`@`HEAD`. ## Key changes - **No more Prysk!**: My first experiment was to get Prysk out of the way to see what was going on more clearly and, well, I kept not using it and kept getting closer to my goals. - **No more snapshot tests**: Because we're not concerned about drift in the examples, we can stop doing snapshot tests. This piggybacks on the "No more Prysk" idea. - **Way less scripting**: I love Bash just as much as the next developer. But, alas, the new codepaths use way less of it. Fewer steps, less work, trimming the fat of things we used to do that we no longer need to. ## Results - [x] These updates **caught issues in the existing examples**! I'm not certain how these issues were being covered up in the previous implementation but I've confirmed three important fixes that were being hidden. They were caught in CI and I fixed them. Early win! - [x] The tests now have significantly less complexity, only doing the work that they really need to be doing. - [x] From my experimenting, the tests are now deterministic. I can quickly reproduce issues on my local machine that I found in CI. I've also had success purposefully creating errors and resolving them. - [x] They're faster. Locally testing is approximately 90% faster for me while CI is about 50% faster. This likely a symptom of being simpler. - [x] They're more predictable, more debuggable, and I've included a README to ensure continued understanding of these tests in the future. ## TODO? - [ ] We could choose to run these tests on a cron to ensure we're keeping up with published sooner. This PR still leaves us open to not testing the examples against `latest`. (This is slightly mitigated by Dependabot always running on Mondays. We would find out that `latest` broke an example then.) - [ ] We could also choose to run these tests as a part of the release process. Closes TURBO-2177 --------- Co-authored-by: Chris Olszewski Co-authored-by: Mehul Kar --- .github/workflows/test.yml | 5 +- .gitignore | 3 + examples/non-monorepo/.gitignore | 1 + examples/non-monorepo/tsconfig.json | 24 +- examples/with-gatsby/apps/web/.eslintrc.js | 2 + examples/with-gatsby/pnpm-lock.yaml | 8 +- examples/with-react-native-web/.gitignore | 2 +- examples/with-rollup/.gitignore | 3 + examples/with-rollup/apps/web/package.json | 1 + .../packages/config-eslint/library.js | 2 +- .../ui/{.eslintrc.js => .eslintrc.cjs} | 0 examples/with-rollup/packages/ui/package.json | 4 +- examples/with-rollup/pnpm-lock.yaml | 146 +++++++++++ examples/with-rollup/turbo.json | 4 +- examples/with-vue-nuxt/pnpm-lock.yaml | 235 +++++++++++------- pnpm-lock.yaml | 89 ++++--- turborepo-tests/README.md | 33 +++ turborepo-tests/example-basic/package.json | 10 + turborepo-tests/example-basic/turbo.json | 8 + .../example-design-system/package.json | 10 + .../example-design-system/turbo.json | 8 + .../example-kitchen-sink/package.json | 10 + .../example-kitchen-sink/turbo.json | 8 + .../example-non-monorepo/package.json | 10 + .../example-non-monorepo/turbo.json | 8 + .../example-npm-non-monorepo/package.json | 13 - .../example-npm-non-monorepo/test.t | 20 -- .../example-npm-non-monorepo/turbo.json | 10 - .../example-npm-with-npm/package.json | 13 - turborepo-tests/example-npm-with-npm/test.t | 30 --- .../example-npm-with-npm/turbo.json | 10 - .../example-pnpm-basic/package.json | 13 - turborepo-tests/example-pnpm-basic/test.t | 30 --- turborepo-tests/example-pnpm-basic/turbo.json | 10 - .../example-pnpm-gatsby/package.json | 13 - turborepo-tests/example-pnpm-gatsby/test.t | 30 --- .../example-pnpm-gatsby/turbo.json | 10 - .../example-pnpm-kitchen-sink/package.json | 13 - .../example-pnpm-kitchen-sink/test.t | 32 --- .../example-pnpm-kitchen-sink/turbo.json | 10 - .../example-pnpm-with-svelte/package.json | 13 - .../example-pnpm-with-svelte/test.t | 30 --- .../example-pnpm-with-svelte/turbo.json | 10 - .../example-with-berry/package.json | 10 + turborepo-tests/example-with-berry/turbo.json | 8 + .../example-with-changesets/package.json | 10 + .../example-with-changesets/turbo.json | 8 + turborepo-tests/example-with-npm/package.json | 10 + turborepo-tests/example-with-npm/turbo.json | 8 + .../package.json | 10 + .../example-with-react-native-web/turbo.json | 8 + .../example-with-rollup/package.json | 10 + .../example-with-rollup/turbo.json | 8 + .../example-with-svelte/package.json | 10 + .../example-with-svelte/turbo.json | 8 + .../example-with-tailwind/package.json | 10 + .../example-with-tailwind/turbo.json | 8 + .../example-with-vite/package.json | 10 + turborepo-tests/example-with-vite/turbo.json | 8 + .../example-with-yarn/package.json | 10 + turborepo-tests/example-with-yarn/turbo.json | 8 + .../example-yarn-non-monorepo/package.json | 13 - .../example-yarn-non-monorepo/test.t | 28 --- .../example-yarn-non-monorepo/turbo.json | 10 - .../example-yarn-with-yarn/package.json | 13 - turborepo-tests/example-yarn-with-yarn/test.t | 32 --- .../example-yarn-with-yarn/turbo.json | 10 - turborepo-tests/helpers/setup_example_test.sh | 102 +++++--- 68 files changed, 710 insertions(+), 604 deletions(-) rename examples/with-rollup/packages/ui/{.eslintrc.js => .eslintrc.cjs} (100%) create mode 100644 turborepo-tests/README.md create mode 100644 turborepo-tests/example-basic/package.json create mode 100644 turborepo-tests/example-basic/turbo.json create mode 100644 turborepo-tests/example-design-system/package.json create mode 100644 turborepo-tests/example-design-system/turbo.json create mode 100644 turborepo-tests/example-kitchen-sink/package.json create mode 100644 turborepo-tests/example-kitchen-sink/turbo.json create mode 100644 turborepo-tests/example-non-monorepo/package.json create mode 100644 turborepo-tests/example-non-monorepo/turbo.json delete mode 100644 turborepo-tests/example-npm-non-monorepo/package.json delete mode 100644 turborepo-tests/example-npm-non-monorepo/test.t delete mode 100644 turborepo-tests/example-npm-non-monorepo/turbo.json delete mode 100644 turborepo-tests/example-npm-with-npm/package.json delete mode 100644 turborepo-tests/example-npm-with-npm/test.t delete mode 100644 turborepo-tests/example-npm-with-npm/turbo.json delete mode 100644 turborepo-tests/example-pnpm-basic/package.json delete mode 100644 turborepo-tests/example-pnpm-basic/test.t delete mode 100644 turborepo-tests/example-pnpm-basic/turbo.json delete mode 100644 turborepo-tests/example-pnpm-gatsby/package.json delete mode 100644 turborepo-tests/example-pnpm-gatsby/test.t delete mode 100644 turborepo-tests/example-pnpm-gatsby/turbo.json delete mode 100644 turborepo-tests/example-pnpm-kitchen-sink/package.json delete mode 100644 turborepo-tests/example-pnpm-kitchen-sink/test.t delete mode 100644 turborepo-tests/example-pnpm-kitchen-sink/turbo.json delete mode 100644 turborepo-tests/example-pnpm-with-svelte/package.json delete mode 100644 turborepo-tests/example-pnpm-with-svelte/test.t delete mode 100644 turborepo-tests/example-pnpm-with-svelte/turbo.json create mode 100644 turborepo-tests/example-with-berry/package.json create mode 100644 turborepo-tests/example-with-berry/turbo.json create mode 100644 turborepo-tests/example-with-changesets/package.json create mode 100644 turborepo-tests/example-with-changesets/turbo.json create mode 100644 turborepo-tests/example-with-npm/package.json create mode 100644 turborepo-tests/example-with-npm/turbo.json create mode 100644 turborepo-tests/example-with-react-native-web/package.json create mode 100644 turborepo-tests/example-with-react-native-web/turbo.json create mode 100644 turborepo-tests/example-with-rollup/package.json create mode 100644 turborepo-tests/example-with-rollup/turbo.json create mode 100644 turborepo-tests/example-with-svelte/package.json create mode 100644 turborepo-tests/example-with-svelte/turbo.json create mode 100644 turborepo-tests/example-with-tailwind/package.json create mode 100644 turborepo-tests/example-with-tailwind/turbo.json create mode 100644 turborepo-tests/example-with-vite/package.json create mode 100644 turborepo-tests/example-with-vite/turbo.json create mode 100644 turborepo-tests/example-with-yarn/package.json create mode 100644 turborepo-tests/example-with-yarn/turbo.json delete mode 100644 turborepo-tests/example-yarn-non-monorepo/package.json delete mode 100644 turborepo-tests/example-yarn-non-monorepo/test.t delete mode 100644 turborepo-tests/example-yarn-non-monorepo/turbo.json delete mode 100644 turborepo-tests/example-yarn-with-yarn/package.json delete mode 100644 turborepo-tests/example-yarn-with-yarn/test.t delete mode 100644 turborepo-tests/example-yarn-with-yarn/turbo.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b9bd60f0961f..ed96f321ef59e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -312,7 +312,10 @@ jobs: - name: Check examples shell: bash - run: turbo run test -F "@turborepo-examples-tests/*" --continue --color --remote-only --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }} --env-mode=strict --concurrency=1 + # Concurrency being 1 is a big hammer here. + # It's a quick fix for non-deterministic behaviors we're seeing around package resolution. + # We could likely do some hacking to reparallelize this, but it's not worth it right now. + run: turbo run test --filter="@turborepo-examples-tests/*" --continue --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }} --env-mode=strict --concurrency=1 # Disable corepack again. actions/setup-node's "Post" step runs at the end of # this job invokes other package managers, and corepack throws an error. diff --git a/.gitignore b/.gitignore index 0665139a289f0..d5fb4369d9e5f 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,9 @@ sweep.timestamp *.t.orig .cram_env +# Example tests artifacts +examples-tests-tmp/ + # generated by tonic file_descriptor_set.bin diff --git a/examples/non-monorepo/.gitignore b/examples/non-monorepo/.gitignore index 9af6919cd1526..5956ad8ce3509 100644 --- a/examples/non-monorepo/.gitignore +++ b/examples/non-monorepo/.gitignore @@ -37,3 +37,4 @@ next-env.d.ts # turbo .turbo +/tmp/ diff --git a/examples/non-monorepo/tsconfig.json b/examples/non-monorepo/tsconfig.json index 1a5944672657b..f615773bd45c7 100644 --- a/examples/non-monorepo/tsconfig.json +++ b/examples/non-monorepo/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -19,9 +23,19 @@ } ], "paths": { - "@/*": ["./*"] - } + "@/*": [ + "./*" + ] + }, + "forceConsistentCasingInFileNames": true }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] } diff --git a/examples/with-gatsby/apps/web/.eslintrc.js b/examples/with-gatsby/apps/web/.eslintrc.js index 0f51d82a72080..dfa0d078e6b9c 100644 --- a/examples/with-gatsby/apps/web/.eslintrc.js +++ b/examples/with-gatsby/apps/web/.eslintrc.js @@ -1,3 +1,5 @@ +/** @type {import("eslint").Linter.Config} */ module.exports = { extends: ["@repo/eslint-config/gatsby.js"], + ignorePatterns: ["gatsby-types.d.ts"], }; diff --git a/examples/with-gatsby/pnpm-lock.yaml b/examples/with-gatsby/pnpm-lock.yaml index 0bbc535b0c91a..e9be38c0fc0bb 100644 --- a/examples/with-gatsby/pnpm-lock.yaml +++ b/examples/with-gatsby/pnpm-lock.yaml @@ -5095,7 +5095,7 @@ packages: eslint-import-resolver-node: 0.3.7 eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0)(eslint-import-resolver-node@0.3.7)(eslint@8.56.0) has: 1.0.3 - is-core-module: 2.13.0 + is-core-module: 2.13.1 is-glob: 4.0.3 minimatch: 3.1.2 object.fromentries: 2.0.6 @@ -6863,12 +6863,6 @@ packages: dependencies: ci-info: 2.0.0 - /is-core-module@2.13.0: - resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} - dependencies: - has: 1.0.3 - dev: true - /is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: diff --git a/examples/with-react-native-web/.gitignore b/examples/with-react-native-web/.gitignore index 419ad3c47d70a..f664cb182cde0 100644 --- a/examples/with-react-native-web/.gitignore +++ b/examples/with-react-native-web/.gitignore @@ -34,4 +34,4 @@ yarn-error.log* .env.production.local # turbo -.turbo \ No newline at end of file +.turbo diff --git a/examples/with-rollup/.gitignore b/examples/with-rollup/.gitignore index f44f57fff9519..b10b5ddfc83f2 100644 --- a/examples/with-rollup/.gitignore +++ b/examples/with-rollup/.gitignore @@ -13,6 +13,9 @@ coverage out/ build +# outputs +dist + # misc .DS_Store *.pem diff --git a/examples/with-rollup/apps/web/package.json b/examples/with-rollup/apps/web/package.json index 05131bd8b4e90..362a417dc785e 100644 --- a/examples/with-rollup/apps/web/package.json +++ b/examples/with-rollup/apps/web/package.json @@ -15,6 +15,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { + "@next/eslint-plugin-next": "^14.1.0", "@repo/eslint-config": "workspace:*", "@repo/typescript-config": "workspace:*", "@types/node": "^20.10.6", diff --git a/examples/with-rollup/packages/config-eslint/library.js b/examples/with-rollup/packages/config-eslint/library.js index c667cd100129d..b93219d225287 100644 --- a/examples/with-rollup/packages/config-eslint/library.js +++ b/examples/with-rollup/packages/config-eslint/library.js @@ -28,7 +28,7 @@ module.exports = { ], overrides: [ { - files: ["*.js?(x)", "*.ts?(x)"], + files: ["*.js?(x)", "*.cjs?(x)", "*.mjs?(x)", "*.ts?(x)"], }, ], }; diff --git a/examples/with-rollup/packages/ui/.eslintrc.js b/examples/with-rollup/packages/ui/.eslintrc.cjs similarity index 100% rename from examples/with-rollup/packages/ui/.eslintrc.js rename to examples/with-rollup/packages/ui/.eslintrc.cjs diff --git a/examples/with-rollup/packages/ui/package.json b/examples/with-rollup/packages/ui/package.json index eda7517be5b54..f76806306baa3 100644 --- a/examples/with-rollup/packages/ui/package.json +++ b/examples/with-rollup/packages/ui/package.json @@ -4,11 +4,11 @@ "type": "module", "exports": { "./button": { - "types": "./dist/Button.d.ts", + "types": "./Button.tsx", "default": "./dist/button.js" }, "./header": { - "types": "./dist/Header.d.ts", + "types": "./Header.tsx", "default": "./dist/header.js" } }, diff --git a/examples/with-rollup/pnpm-lock.yaml b/examples/with-rollup/pnpm-lock.yaml index 8f8280309c71a..d856806457796 100644 --- a/examples/with-rollup/pnpm-lock.yaml +++ b/examples/with-rollup/pnpm-lock.yaml @@ -36,6 +36,9 @@ importers: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) devDependencies: + '@next/eslint-plugin-next': + specifier: ^14.1.0 + version: 14.1.0 '@repo/eslint-config': specifier: workspace:* version: link:../../packages/config-eslint @@ -395,6 +398,18 @@ packages: resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} dev: true + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 + dev: true + /@jridgewell/gen-mapping@0.3.3: resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} @@ -442,6 +457,12 @@ packages: resolution: {integrity: sha512-irQnbMLbUNQpP1wcE5NstJtbuA/69kRfzBrpAD7Gsn8zm/CY6YQYc3HQBz8QPxwISG26tIm5afvvVbu508oBeQ==} dev: false + /@next/eslint-plugin-next@14.1.0: + resolution: {integrity: sha512-x4FavbNEeXx/baD/zC/SdrvkjSby8nBn8KcCREqk6UuwvwoAPZmaV8TFCAuo/cpovBRTIY67mHhe86MQQm/68Q==} + dependencies: + glob: 10.3.10 + dev: true + /@next/swc-darwin-arm64@14.0.4: resolution: {integrity: sha512-mF05E/5uPthWzyYDyptcwHptucf/jj09i2SXBPwNzbgBNc+XnwzrL0U6BmPjQeOL+FiB+iG1gwBeq7mlDjSRPg==} engines: {node: '>= 10'} @@ -550,6 +571,13 @@ packages: fastq: 1.16.0 dev: true + /@pkgjs/parseargs@0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: true + optional: true + /@pkgr/utils@2.4.2: resolution: {integrity: sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -1031,6 +1059,11 @@ packages: engines: {node: '>=8'} dev: true + /ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + dev: true + /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -1045,6 +1078,11 @@ packages: color-convert: 2.0.1 dev: true + /ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + dev: true + /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true @@ -1428,10 +1466,18 @@ packages: engines: {node: '>=12'} dev: true + /eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + dev: true + /electron-to-chromium@1.4.593: resolution: {integrity: sha512-c7+Hhj87zWmdpmjDONbvNKNo24tvmD4mjal1+qqTYTrlF0/sNpAcDlU0Ki84ftA/5yj3BF2QhSGEC0Rky6larg==} dev: true + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: true + /emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true @@ -2063,6 +2109,14 @@ packages: is-callable: 1.2.7 dev: true + /foreground-child@3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + dev: true + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true @@ -2153,6 +2207,18 @@ packages: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} dev: false + /glob@10.3.10: + resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + foreground-child: 3.1.1 + jackspeak: 2.3.6 + minimatch: 9.0.3 + minipass: 7.0.4 + path-scurry: 1.10.1 + dev: true + /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: @@ -2401,6 +2467,11 @@ packages: call-bind: 1.0.5 dev: true + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + dev: true + /is-generator-function@1.0.10: resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} engines: {node: '>= 0.4'} @@ -2545,6 +2616,15 @@ packages: set-function-name: 2.0.1 dev: true + /jackspeak@2.3.6: + resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} + engines: {node: '>=14'} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + dev: true + /jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} dev: true @@ -2672,6 +2752,11 @@ packages: dependencies: js-tokens: 4.0.0 + /lru-cache@10.2.0: + resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} + engines: {node: 14 || >=16.14} + dev: true + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -2734,6 +2819,11 @@ packages: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true + /minipass@7.0.4: + resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} + engines: {node: '>=16 || 14 >=14.17'} + dev: true + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true @@ -3002,6 +3092,14 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + lru-cache: 10.2.0 + minipass: 7.0.4 + dev: true + /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -3311,6 +3409,11 @@ packages: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: true + /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -3370,6 +3473,24 @@ packages: engines: {node: '>=10.0.0'} dev: false + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + dev: true + + /string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + dev: true + /string.prototype.matchall@4.0.10: resolution: {integrity: sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==} dependencies: @@ -3416,6 +3537,13 @@ packages: ansi-regex: 5.0.1 dev: true + /strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.0.1 + dev: true + /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -3780,6 +3908,24 @@ packages: isexe: 2.0.0 dev: true + /wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + + /wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + dev: true + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true diff --git a/examples/with-rollup/turbo.json b/examples/with-rollup/turbo.json index a70f30b11f2d2..2af2af83a7081 100644 --- a/examples/with-rollup/turbo.json +++ b/examples/with-rollup/turbo.json @@ -2,8 +2,8 @@ "$schema": "https://turborepo.org/schema.json", "pipeline": { "build": { - "outputs": ["dist/**", "build/**", ".next/**", "!.next/cache/**"], - "dependsOn": ["^build"] + "dependsOn": ["^build"], + "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }, "lint": { "outputs": [] diff --git a/examples/with-vue-nuxt/pnpm-lock.yaml b/examples/with-vue-nuxt/pnpm-lock.yaml index 6fb45d9ffc1d8..daca4abcafd2f 100644 --- a/examples/with-vue-nuxt/pnpm-lock.yaml +++ b/examples/with-vue-nuxt/pnpm-lock.yaml @@ -29,7 +29,7 @@ importers: devDependencies: '@nuxt/devtools': specifier: latest - version: 1.0.6(nuxt@3.9.0)(vite@5.0.10) + version: 1.0.8(nuxt@3.9.0)(vite@5.0.10) '@nuxtjs/eslint-config-typescript': specifier: ^12.1.0 version: 12.1.0(eslint@8.56.0)(typescript@5.3.3) @@ -995,14 +995,14 @@ packages: resolution: {integrity: sha512-GBzP8zOc7CGWyFQS6dv1lQz8VVpz5C2yRszbXufwG/9zhStTIH50EtD87NmWbTMwXDvZLNg8GIpb1UFdH93JCA==} dev: true - /@nuxt/devtools-kit@1.0.6(nuxt@3.9.0)(vite@5.0.10): - resolution: {integrity: sha512-CUSE++NRTIwvBWbLsPzLZIDMpXr6oyllaWm8tOR3Wgr/04jW31uyWbXjU/fxRuDotQwZfcTe19uunRoCoBnk1Q==} + /@nuxt/devtools-kit@1.0.8(nuxt@3.9.0)(vite@5.0.10): + resolution: {integrity: sha512-j7bNZmoAXQ1a8qv6j6zk4c/aekrxYqYVQM21o/Hy4XHCUq4fajSgpoc8mjyWJSTfpkOmuLyEzMexpDWiIVSr6A==} peerDependencies: - nuxt: ^3.8.2 + nuxt: ^3.9.0 vite: '*' dependencies: - '@nuxt/kit': 3.9.0 - '@nuxt/schema': 3.9.0 + '@nuxt/kit': 3.9.3 + '@nuxt/schema': 3.9.3 execa: 7.2.0 nuxt: 3.9.0(eslint@8.56.0)(typescript@5.3.3)(vite@5.0.10) vite: 5.0.10(@types/node@20.10.6) @@ -1011,8 +1011,8 @@ packages: - supports-color dev: true - /@nuxt/devtools-wizard@1.0.6: - resolution: {integrity: sha512-44G+t2sQQii3TPnmktlrZryC4pw7t77GUV7wneEicLGU+w5I5ib7taVMJy8+yBC3kpTs5eYHOmqI63Dqvr73tw==} + /@nuxt/devtools-wizard@1.0.8: + resolution: {integrity: sha512-RxyOlM7Isk5npwXwDJ/rjm9ekX5sTNG0LS0VOBMdSx+D5nlRPMRr/r9yO+9WQDyzPLClLzHaXRHBWLPlRX3IMw==} hasBin: true dependencies: consola: 3.2.3 @@ -1020,24 +1020,24 @@ packages: execa: 7.2.0 global-directory: 4.0.1 magicast: 0.3.2 - pathe: 1.1.1 + pathe: 1.1.2 pkg-types: 1.0.3 prompts: 2.4.2 rc9: 2.1.1 semver: 7.5.4 dev: true - /@nuxt/devtools@1.0.6(nuxt@3.9.0)(vite@5.0.10): - resolution: {integrity: sha512-3P914IHBvKl2aYSrwaCAU9E1ndVNnGJR0Jn0XKUFktsbjU5kGlwLGrtRKXAw4Yz1VNiSZPrapVrFOQWbXRGRvg==} + /@nuxt/devtools@1.0.8(nuxt@3.9.0)(vite@5.0.10): + resolution: {integrity: sha512-o6aBFEBxc8OgVHV4OPe2g0q9tFIe9HiTxRiJnlTJ+jHvOQsBLS651ArdVtwLChf9UdMouFlpLLJ1HteZqTbtsQ==} hasBin: true peerDependencies: - nuxt: ^3.8.2 + nuxt: ^3.9.0 vite: '*' dependencies: '@antfu/utils': 0.7.7 - '@nuxt/devtools-kit': 1.0.6(nuxt@3.9.0)(vite@5.0.10) - '@nuxt/devtools-wizard': 1.0.6 - '@nuxt/kit': 3.9.0 + '@nuxt/devtools-kit': 1.0.8(nuxt@3.9.0)(vite@5.0.10) + '@nuxt/devtools-wizard': 1.0.8 + '@nuxt/kit': 3.9.3 birpc: 0.2.14 consola: 3.2.3 destr: 2.0.2 @@ -1045,54 +1045,37 @@ packages: execa: 7.2.0 fast-glob: 3.3.2 flatted: 3.2.9 - get-port-please: 3.1.1 - h3: 1.10.0 + get-port-please: 3.1.2 hookable: 5.5.3 image-meta: 0.2.0 is-installed-globally: 1.0.0 launch-editor: 2.6.1 local-pkg: 0.5.0 magicast: 0.3.2 - nitropack: 2.8.1 nuxt: 3.9.0(eslint@8.56.0)(typescript@5.3.3)(vite@5.0.10) nypm: 0.3.4 - ofetch: 1.3.3 ohash: 1.1.3 pacote: 17.0.5 - pathe: 1.1.1 + pathe: 1.1.2 perfect-debounce: 1.0.0 pkg-types: 1.0.3 rc9: 2.1.1 - scule: 1.1.1 + scule: 1.2.0 semver: 7.5.4 simple-git: 3.22.0 sirv: 2.0.4 unimport: 3.7.1(rollup@4.9.3) vite: 5.0.10(@types/node@20.10.6) - vite-plugin-inspect: 0.8.1(@nuxt/kit@3.9.0)(vite@5.0.10) + vite-plugin-inspect: 0.8.1(@nuxt/kit@3.9.3)(vite@5.0.10) vite-plugin-vue-inspector: 4.0.2(vite@5.0.10) which: 3.0.1 ws: 8.16.0 transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@netlify/blobs' - - '@planetscale/database' - - '@upstash/redis' - - '@vercel/kv' - bluebird - bufferutil - - encoding - - idb-keyval - rollup - supports-color - utf-8-validate - - xml2js dev: true /@nuxt/kit@3.9.0: @@ -1102,16 +1085,43 @@ packages: '@nuxt/schema': 3.9.0 c12: 1.6.1 consola: 3.2.3 - defu: 6.1.3 + defu: 6.1.4 globby: 14.0.0 hash-sum: 2.0.0 ignore: 5.3.0 jiti: 1.21.0 knitwork: 1.0.0 - mlly: 1.4.2 - pathe: 1.1.1 + mlly: 1.5.0 + pathe: 1.1.2 pkg-types: 1.0.3 - scule: 1.1.1 + scule: 1.2.0 + semver: 7.5.4 + ufo: 1.3.2 + unctx: 2.3.1 + unimport: 3.7.1(rollup@4.9.3) + untyped: 1.4.0 + transitivePeerDependencies: + - rollup + - supports-color + dev: true + + /@nuxt/kit@3.9.3: + resolution: {integrity: sha512-bHGXpTB6E+YJCC1L9tTwrP7txgLZzyuFes/tgy1ZM4dlfrCsGqLK/K4mddROMdC3D81scnH84u7yQsN0JRgoTg==} + engines: {node: ^14.18.0 || >=16.10.0} + dependencies: + '@nuxt/schema': 3.9.3 + c12: 1.6.1 + consola: 3.2.3 + defu: 6.1.4 + globby: 14.0.0 + hash-sum: 2.0.0 + ignore: 5.3.0 + jiti: 1.21.0 + knitwork: 1.0.0 + mlly: 1.5.0 + pathe: 1.1.2 + pkg-types: 1.0.3 + scule: 1.2.0 semver: 7.5.4 ufo: 1.3.2 unctx: 2.3.1 @@ -1128,11 +1138,31 @@ packages: dependencies: '@nuxt/ui-templates': 1.3.1 consola: 3.2.3 - defu: 6.1.3 + defu: 6.1.4 hookable: 5.5.3 - pathe: 1.1.1 + pathe: 1.1.2 pkg-types: 1.0.3 - scule: 1.1.1 + scule: 1.2.0 + std-env: 3.7.0 + ufo: 1.3.2 + unimport: 3.7.1(rollup@4.9.3) + untyped: 1.4.0 + transitivePeerDependencies: + - rollup + - supports-color + dev: true + + /@nuxt/schema@3.9.3: + resolution: {integrity: sha512-pchkGBYdEJ9TAOoC5DKnLuAaFPjzgn2k0OUTr31QwbtHdTR3Q2Ua/oKsS1g9CPU7KRzSE5Vkf7ECE8zVydqF5A==} + engines: {node: ^14.18.0 || >=16.10.0} + dependencies: + '@nuxt/ui-templates': 1.3.1 + consola: 3.2.3 + defu: 6.1.4 + hookable: 5.5.3 + pathe: 1.1.2 + pkg-types: 1.0.3 + scule: 1.2.0 std-env: 3.7.0 ufo: 1.3.2 unimport: 3.7.1(rollup@4.9.3) @@ -1146,11 +1176,11 @@ packages: resolution: {integrity: sha512-Ghv2MgWbJcUM9G5Dy3oQP0cJkUwEgaiuQxEF61FXJdn0a69Q4StZEP/hLF0MWPM9m6EvAwI7orxkJHM7MrmtVg==} hasBin: true dependencies: - '@nuxt/kit': 3.9.0 + '@nuxt/kit': 3.9.3 ci-info: 4.0.0 consola: 3.2.3 create-require: 1.1.1 - defu: 6.1.3 + defu: 6.1.4 destr: 2.0.2 dotenv: 16.3.1 git-url-parse: 13.1.1 @@ -1160,7 +1190,7 @@ packages: nanoid: 4.0.2 ofetch: 1.3.3 parse-git-config: 3.0.0 - pathe: 1.1.1 + pathe: 1.1.2 rc9: 2.1.1 std-env: 3.7.0 transitivePeerDependencies: @@ -1186,19 +1216,19 @@ packages: clear: 0.1.0 consola: 3.2.3 cssnano: 6.0.3(postcss@8.4.33) - defu: 6.1.3 + defu: 6.1.4 esbuild: 0.19.11 escape-string-regexp: 5.0.0 estree-walker: 3.0.3 externality: 1.0.2 fs-extra: 11.2.0 - get-port-please: 3.1.1 + get-port-please: 3.1.2 h3: 1.10.0 knitwork: 1.0.0 magic-string: 0.30.5 - mlly: 1.4.2 + mlly: 1.5.0 ohash: 1.1.3 - pathe: 1.1.1 + pathe: 1.1.2 perfect-debounce: 1.0.0 pkg-types: 1.0.3 postcss: 8.4.33 @@ -2535,7 +2565,7 @@ packages: dependencies: '@babel/parser': 7.23.6 '@rollup/pluginutils': 5.1.0(rollup@4.9.3) - pathe: 1.1.1 + pathe: 1.1.2 transitivePeerDependencies: - rollup dev: true @@ -2546,7 +2576,7 @@ packages: dependencies: '@babel/parser': 7.23.6 '@rollup/pluginutils': 5.1.0(rollup@4.9.3) - pathe: 1.1.1 + pathe: 1.1.2 transitivePeerDependencies: - rollup dev: true @@ -2711,13 +2741,13 @@ packages: resolution: {integrity: sha512-fAZOi3INDvIbmjuwAVVggusyRTxwNdTAnwLay8IsXwhFzDwPPGzFxzrx6L55CPFGPulUSZI0eyFUvRDXveoE3g==} dependencies: chokidar: 3.5.3 - defu: 6.1.3 + defu: 6.1.4 dotenv: 16.3.1 giget: 1.2.1 jiti: 1.21.0 - mlly: 1.4.2 + mlly: 1.5.0 ohash: 1.1.3 - pathe: 1.1.1 + pathe: 1.1.2 perfect-debounce: 1.0.0 pkg-types: 1.0.3 rc9: 2.1.1 @@ -3215,6 +3245,10 @@ packages: resolution: {integrity: sha512-Vy2wmG3NTkmHNg/kzpuvHhkqeIx3ODWqasgCRbKtbXEN0G+HpEEv9BtJLp7ZG1CZloFaC41Ah3ZFbq7aqCqMeQ==} dev: true + /defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + dev: true + /delegates@1.0.0: resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} dev: true @@ -4159,8 +4193,8 @@ packages: resolution: {integrity: sha512-LyExtJWKxtgVzmgtEHyQtLFpw1KFhQphF9nTG8TpAIVkiI/xQ3FJh75tRFLYl4hkn7BNIIdLJInuDAavX35pMw==} dependencies: enhanced-resolve: 5.15.0 - mlly: 1.4.2 - pathe: 1.1.1 + mlly: 1.5.0 + pathe: 1.1.2 ufo: 1.3.2 dev: true @@ -4359,8 +4393,8 @@ packages: has-symbols: 1.0.3 dev: true - /get-port-please@3.1.1: - resolution: {integrity: sha512-3UBAyM3u4ZBVYDsxOQfJDxEa6XTbpBDrOjp4mf7ExFRt5BKs/QywQQiJsh2B+hxcZLSapWqCRvElUe8DnKcFHA==} + /get-port-please@3.1.2: + resolution: {integrity: sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ==} dev: true /get-stdin@9.0.0: @@ -4396,11 +4430,11 @@ packages: dependencies: citty: 0.1.5 consola: 3.2.3 - defu: 6.1.3 + defu: 6.1.4 node-fetch-native: 1.6.1 nypm: 0.3.4 ohash: 1.1.3 - pathe: 1.1.1 + pathe: 1.1.2 tar: 6.2.0 dev: true @@ -4560,7 +4594,7 @@ packages: resolution: {integrity: sha512-Tw1kcIC+AeimwRmviiObaD5EB430Yt+lTgOxLJxNr96Vd/fGRu04EF7aKfOAcpwKCI+U2JlbxOLhycD86p3Ciw==} dependencies: cookie-es: 1.0.0 - defu: 6.1.3 + defu: 6.1.4 destr: 2.0.2 iron-webcrypto: 1.0.0 radix3: 1.1.0 @@ -5303,14 +5337,14 @@ packages: citty: 0.1.5 clipboardy: 3.0.0 consola: 3.2.3 - defu: 6.1.3 - get-port-please: 3.1.1 + defu: 6.1.4 + get-port-please: 3.1.2 h3: 1.10.0 http-shutdown: 1.2.2 jiti: 1.21.0 - mlly: 1.4.2 + mlly: 1.5.0 node-forge: 1.3.1 - pathe: 1.1.1 + pathe: 1.1.2 std-env: 3.7.0 ufo: 1.3.2 untun: 0.1.3 @@ -5326,7 +5360,7 @@ packages: resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} engines: {node: '>=14'} dependencies: - mlly: 1.4.2 + mlly: 1.5.0 pkg-types: 1.0.3 dev: true @@ -5610,7 +5644,16 @@ packages: resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} dependencies: acorn: 8.11.3 - pathe: 1.1.1 + pathe: 1.1.2 + pkg-types: 1.0.3 + ufo: 1.3.2 + dev: true + + /mlly@1.5.0: + resolution: {integrity: sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==} + dependencies: + acorn: 8.11.3 + pathe: 1.1.2 pkg-types: 1.0.3 ufo: 1.3.2 dev: true @@ -5695,7 +5738,7 @@ packages: citty: 0.1.5 consola: 3.2.3 cookie-es: 1.0.0 - defu: 6.1.3 + defu: 6.1.4 destr: 2.0.2 dot-prop: 8.0.2 esbuild: 0.19.11 @@ -5715,20 +5758,20 @@ packages: listhen: 1.5.5 magic-string: 0.30.5 mime: 3.0.0 - mlly: 1.4.2 + mlly: 1.5.0 mri: 1.2.0 node-fetch-native: 1.6.1 ofetch: 1.3.3 ohash: 1.1.3 openapi-typescript: 6.7.3 - pathe: 1.1.1 + pathe: 1.1.2 perfect-debounce: 1.0.0 pkg-types: 1.0.3 pretty-bytes: 6.1.1 radix3: 1.1.0 rollup: 4.9.3 rollup-plugin-visualizer: 5.12.0(rollup@4.9.3) - scule: 1.1.1 + scule: 1.2.0 semver: 7.5.4 serve-placeholder: 2.0.1 serve-static: 1.15.0 @@ -5980,7 +6023,7 @@ packages: optional: true dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.0.6(nuxt@3.9.0)(vite@5.0.10) + '@nuxt/devtools': 1.0.8(nuxt@3.9.0)(vite@5.0.10) '@nuxt/kit': 3.9.0 '@nuxt/schema': 3.9.0 '@nuxt/telemetry': 2.5.3 @@ -6078,7 +6121,7 @@ packages: dependencies: citty: 0.1.5 execa: 8.0.1 - pathe: 1.1.1 + pathe: 1.1.2 ufo: 1.3.2 dev: true @@ -6410,6 +6453,10 @@ packages: resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} dev: true + /pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + dev: true + /perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} dev: true @@ -6432,8 +6479,8 @@ packages: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} dependencies: jsonc-parser: 3.2.0 - mlly: 1.4.2 - pathe: 1.1.1 + mlly: 1.5.0 + pathe: 1.1.2 dev: true /pluralize@8.0.0: @@ -6849,7 +6896,7 @@ packages: /rc9@2.1.1: resolution: {integrity: sha512-lNeOl38Ws0eNxpO3+wD1I9rkHGQyj1NU1jlzv4go2CtEnEQEUfqnIvZG7W+bC/aXdJ27n5x/yUjb6RoT9tko+Q==} dependencies: - defu: 6.1.3 + defu: 6.1.4 destr: 2.0.2 flat: 5.0.2 dev: true @@ -7145,6 +7192,10 @@ packages: resolution: {integrity: sha512-sHtm/SsIK9BUBI3EFT/Gnp9VoKfY6QLvlkvAE6YK7454IF8FSgJEAnJpVdSC7K5/pjI5NfxhzBLW2JAfYA/shQ==} dev: true + /scule@1.2.0: + resolution: {integrity: sha512-CRCmi5zHQnSoeCik9565PONMg0kfkvYmcSqrbOJY4txFfy1wvVULV4FDaiXhUblUgahdqz3F2NwHZ8i4eBTwUw==} + dev: true + /semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -7193,7 +7244,7 @@ packages: /serve-placeholder@2.0.1: resolution: {integrity: sha512-rUzLlXk4uPFnbEaIz3SW8VISTxMuONas88nYWjAWaM2W9VDbt9tyFOr3lq8RhVOFrT3XISoBw8vni5una8qMnQ==} dependencies: - defu: 6.1.3 + defu: 6.1.4 dev: true /serve-static@1.15.0: @@ -7903,10 +7954,10 @@ packages: resolution: {integrity: sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g==} dependencies: consola: 3.2.3 - defu: 6.1.3 + defu: 6.1.4 mime: 3.0.0 node-fetch-native: 1.6.1 - pathe: 1.1.1 + pathe: 1.1.2 dev: true /unhead@1.8.9: @@ -7933,10 +7984,10 @@ packages: fast-glob: 3.3.2 local-pkg: 0.5.0 magic-string: 0.30.5 - mlly: 1.4.2 - pathe: 1.1.1 + mlly: 1.5.0 + pathe: 1.1.2 pkg-types: 1.0.3 - scule: 1.1.1 + scule: 1.2.0 strip-literal: 1.3.0 unplugin: 1.6.0 transitivePeerDependencies: @@ -7978,9 +8029,9 @@ packages: fast-glob: 3.3.2 json5: 2.2.3 local-pkg: 0.4.3 - mlly: 1.4.2 - pathe: 1.1.1 - scule: 1.1.1 + mlly: 1.5.0 + pathe: 1.1.2 + scule: 1.2.0 unplugin: 1.6.0 vue-router: 4.2.5(vue@3.4.5) yaml: 2.3.4 @@ -8065,7 +8116,7 @@ packages: dependencies: citty: 0.1.5 consola: 3.2.3 - pathe: 1.1.1 + pathe: 1.1.2 dev: true /untyped@1.4.0: @@ -8075,10 +8126,10 @@ packages: '@babel/core': 7.23.7 '@babel/standalone': 7.23.7 '@babel/types': 7.23.6 - defu: 6.1.3 + defu: 6.1.4 jiti: 1.21.0 mri: 1.2.0 - scule: 1.1.1 + scule: 1.2.0 transitivePeerDependencies: - supports-color dev: true @@ -8133,7 +8184,7 @@ packages: dependencies: cac: 6.7.14 debug: 4.3.4 - pathe: 1.1.1 + pathe: 1.1.2 picocolors: 1.0.0 vite: 5.0.10(@types/node@20.10.6) transitivePeerDependencies: @@ -8200,7 +8251,7 @@ packages: vscode-uri: 3.0.8 dev: true - /vite-plugin-inspect@0.8.1(@nuxt/kit@3.9.0)(vite@5.0.10): + /vite-plugin-inspect@0.8.1(@nuxt/kit@3.9.3)(vite@5.0.10): resolution: {integrity: sha512-oPBPVGp6tBd5KdY/qY6lrbLXqrbHRG0hZLvEaJfiZ/GQfDB+szRuLHblQh1oi1Hhh8GeLit/50l4xfs2SA+TCA==} engines: {node: '>=14'} peerDependencies: @@ -8211,7 +8262,7 @@ packages: optional: true dependencies: '@antfu/utils': 0.7.7 - '@nuxt/kit': 3.9.0 + '@nuxt/kit': 3.9.3 '@rollup/pluginutils': 5.1.0(rollup@4.9.3) debug: 4.3.4 error-stack-parser-es: 0.1.1 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 976dd5d2369fe..ac41cf1ec9982 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1103,14 +1103,8 @@ importers: specifier: ^5.75.0 version: 5.75.0 - turborepo-tests/example-npm-non-monorepo: + turborepo-tests/example-basic: dependencies: - cli: - specifier: workspace:* - version: link:../../cli - prysk: - specifier: workspace:* - version: link:../../packages/prysk turborepo-examples: specifier: workspace:* version: link:../../examples @@ -1118,14 +1112,8 @@ importers: specifier: workspace:* version: link:../helpers - turborepo-tests/example-npm-with-npm: + turborepo-tests/example-design-system: dependencies: - cli: - specifier: workspace:* - version: link:../../cli - prysk: - specifier: workspace:* - version: link:../../packages/prysk turborepo-examples: specifier: workspace:* version: link:../../examples @@ -1133,14 +1121,8 @@ importers: specifier: workspace:* version: link:../helpers - turborepo-tests/example-pnpm-basic: + turborepo-tests/example-kitchen-sink: dependencies: - cli: - specifier: workspace:* - version: link:../../cli - prysk: - specifier: workspace:* - version: link:../../packages/prysk turborepo-examples: specifier: workspace:* version: link:../../examples @@ -1148,14 +1130,17 @@ importers: specifier: workspace:* version: link:../helpers - turborepo-tests/example-pnpm-gatsby: + turborepo-tests/example-non-monorepo: dependencies: - cli: + turborepo-examples: specifier: workspace:* - version: link:../../cli - prysk: + version: link:../../examples + turborepo-tests-helpers: specifier: workspace:* - version: link:../../packages/prysk + version: link:../helpers + + turborepo-tests/example-with-berry: + dependencies: turborepo-examples: specifier: workspace:* version: link:../../examples @@ -1163,14 +1148,17 @@ importers: specifier: workspace:* version: link:../helpers - turborepo-tests/example-pnpm-kitchen-sink: + turborepo-tests/example-with-changesets: dependencies: - cli: + turborepo-examples: specifier: workspace:* - version: link:../../cli - prysk: + version: link:../../examples + turborepo-tests-helpers: specifier: workspace:* - version: link:../../packages/prysk + version: link:../helpers + + turborepo-tests/example-with-npm: + dependencies: turborepo-examples: specifier: workspace:* version: link:../../examples @@ -1178,14 +1166,17 @@ importers: specifier: workspace:* version: link:../helpers - turborepo-tests/example-pnpm-with-svelte: + turborepo-tests/example-with-react-native-web: dependencies: - cli: + turborepo-examples: specifier: workspace:* - version: link:../../cli - prysk: + version: link:../../examples + turborepo-tests-helpers: specifier: workspace:* - version: link:../../packages/prysk + version: link:../helpers + + turborepo-tests/example-with-rollup: + dependencies: turborepo-examples: specifier: workspace:* version: link:../../examples @@ -1193,14 +1184,17 @@ importers: specifier: workspace:* version: link:../helpers - turborepo-tests/example-yarn-non-monorepo: + turborepo-tests/example-with-svelte: dependencies: - cli: + turborepo-examples: specifier: workspace:* - version: link:../../cli - prysk: + version: link:../../examples + turborepo-tests-helpers: specifier: workspace:* - version: link:../../packages/prysk + version: link:../helpers + + turborepo-tests/example-with-tailwind: + dependencies: turborepo-examples: specifier: workspace:* version: link:../../examples @@ -1208,14 +1202,17 @@ importers: specifier: workspace:* version: link:../helpers - turborepo-tests/example-yarn-with-yarn: + turborepo-tests/example-with-vite: dependencies: - cli: + turborepo-examples: specifier: workspace:* - version: link:../../cli - prysk: + version: link:../../examples + turborepo-tests-helpers: specifier: workspace:* - version: link:../../packages/prysk + version: link:../helpers + + turborepo-tests/example-with-yarn: + dependencies: turborepo-examples: specifier: workspace:* version: link:../../examples diff --git a/turborepo-tests/README.md b/turborepo-tests/README.md new file mode 100644 index 0000000000000..3160f8b49660d --- /dev/null +++ b/turborepo-tests/README.md @@ -0,0 +1,33 @@ +# Turborepo Tests + +## Integration tests + +TODO + +## Example tests + +These tests are for ensuring that the examples we are providing to users work right out of the box. + +### Test structure + +We guarantee that the examples work by running the `lint` and `build` tasks in each example and checking for a `>>> FULL TURBO` on the second run. This requires that the tasks pass and are cacheable. The logic for the tests is in `setup_example_test.sh` and takes a few steps: + +1. `cd` to the example directory. +2. Install packages. +3. Run `turbo build lint`. +4. Run `turbo build lint` again and write the log results to a temporary text file. +5. Read that text file looking for a `>>> FULL TURBO`. + +### Creating a test + +To create a test for a new example: + +1. Copy the `basic` directory into a new folder. +2. Edit the `name` field in `package.json`. +3. Run `pnpm install` for the repository so the new package is added to the workspace. +4. Edit the `test` script to path to the directory you are interested in and use the package manager for that example. +5. Run `turbo test --filter="@turborepo-examples-tests/*"` in your terminal to make sure all is well! + +### Limitations + +We currently do not test the examples that use Docker. We may choose to do this in the future. diff --git a/turborepo-tests/example-basic/package.json b/turborepo-tests/example-basic/package.json new file mode 100644 index 0000000000000..8bf25bec75025 --- /dev/null +++ b/turborepo-tests/example-basic/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/basic", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh basic pnpm" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-basic/turbo.json b/turborepo-tests/example-basic/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-basic/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-design-system/package.json b/turborepo-tests/example-design-system/package.json new file mode 100644 index 0000000000000..41471101659e2 --- /dev/null +++ b/turborepo-tests/example-design-system/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/design-system", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh design-system pnpm" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-design-system/turbo.json b/turborepo-tests/example-design-system/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-design-system/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-kitchen-sink/package.json b/turborepo-tests/example-kitchen-sink/package.json new file mode 100644 index 0000000000000..9b79bec34f14b --- /dev/null +++ b/turborepo-tests/example-kitchen-sink/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/kitchen-sink", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh kitchen-sink pnpm" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-kitchen-sink/turbo.json b/turborepo-tests/example-kitchen-sink/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-kitchen-sink/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-non-monorepo/package.json b/turborepo-tests/example-non-monorepo/package.json new file mode 100644 index 0000000000000..302e7c3e8ced6 --- /dev/null +++ b/turborepo-tests/example-non-monorepo/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/non-monorepo", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh non-monorepo npm" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-non-monorepo/turbo.json b/turborepo-tests/example-non-monorepo/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-non-monorepo/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-npm-non-monorepo/package.json b/turborepo-tests/example-npm-non-monorepo/package.json deleted file mode 100644 index f82c1c01956a0..0000000000000 --- a/turborepo-tests/example-npm-non-monorepo/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@turborepo-examples-tests/npm-non-monorepo", - "private": true, - "scripts": { - "test": "./node_modules/.bin/prysk test.t" - }, - "dependencies": { - "turborepo-tests-helpers": "workspace:*", - "turborepo-examples": "workspace:*", - "prysk": "workspace:*", - "cli": "workspace:*" - } -} diff --git a/turborepo-tests/example-npm-non-monorepo/test.t b/turborepo-tests/example-npm-non-monorepo/test.t deleted file mode 100644 index 5a5dec844aa52..0000000000000 --- a/turborepo-tests/example-npm-non-monorepo/test.t +++ /dev/null @@ -1,20 +0,0 @@ - $ . ${TESTDIR}/../helpers/setup_example_test.sh non-monorepo npm@8.19.4 - -# run twice and make sure it works - $ npx turbo build lint --output-logs=errors-only - \xe2\x80\xa2 Running build, lint (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 2 successful, 2 total - Cached: 0 cached, 2 total - Time:\s*[\.0-9ms]+ (re) - - $ npx turbo build lint --output-logs=errors-only - \xe2\x80\xa2 Running build, lint (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 2 successful, 2 total - Cached: 2 cached, 2 total - Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) - - $ git diff diff --git a/turborepo-tests/example-npm-non-monorepo/turbo.json b/turborepo-tests/example-npm-non-monorepo/turbo.json deleted file mode 100644 index b272d33d12a58..0000000000000 --- a/turborepo-tests/example-npm-non-monorepo/turbo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["//"], - "pipeline": { - "test": { - "outputs": [], - // For github actions - "env": ["RUNNER_OS"] - } - } -} diff --git a/turborepo-tests/example-npm-with-npm/package.json b/turborepo-tests/example-npm-with-npm/package.json deleted file mode 100644 index 9ae9f7bf22fa7..0000000000000 --- a/turborepo-tests/example-npm-with-npm/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@turborepo-examples-tests/npm-with-npm", - "private": true, - "scripts": { - "test": "./node_modules/.bin/prysk test.t" - }, - "dependencies": { - "turborepo-tests-helpers": "workspace:*", - "turborepo-examples": "workspace:*", - "prysk": "workspace:*", - "cli": "workspace:*" - } -} diff --git a/turborepo-tests/example-npm-with-npm/test.t b/turborepo-tests/example-npm-with-npm/test.t deleted file mode 100644 index 89811fd0d8792..0000000000000 --- a/turborepo-tests/example-npm-with-npm/test.t +++ /dev/null @@ -1,30 +0,0 @@ - $ . ${TESTDIR}/../helpers/setup_example_test.sh with-npm npm@8.19.4 - -# run twice and make sure it works - $ npm run build lint -- --output-logs=errors-only - - \> build (re) - \> turbo run build lint --output-logs=errors-only (re) - - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, web (esc) - \xe2\x80\xa2 Running build, lint in 5 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 5 successful, 5 total - Cached: 0 cached, 5 total - Time:\s*[\.0-9ms]+ (re) - - $ npm run build lint -- --output-logs=errors-only - - \> build (re) - \> turbo run build lint --output-logs=errors-only (re) - - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, web (esc) - \xe2\x80\xa2 Running build, lint in 5 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 5 successful, 5 total - Cached: 5 cached, 5 total - Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) - - $ git diff diff --git a/turborepo-tests/example-npm-with-npm/turbo.json b/turborepo-tests/example-npm-with-npm/turbo.json deleted file mode 100644 index b272d33d12a58..0000000000000 --- a/turborepo-tests/example-npm-with-npm/turbo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["//"], - "pipeline": { - "test": { - "outputs": [], - // For github actions - "env": ["RUNNER_OS"] - } - } -} diff --git a/turborepo-tests/example-pnpm-basic/package.json b/turborepo-tests/example-pnpm-basic/package.json deleted file mode 100644 index e2dbd5beead2c..0000000000000 --- a/turborepo-tests/example-pnpm-basic/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@turborepo-examples-tests/pnpm-basic", - "private": true, - "scripts": { - "test": "./node_modules/.bin/prysk test.t" - }, - "dependencies": { - "turborepo-tests-helpers": "workspace:*", - "turborepo-examples": "workspace:*", - "prysk": "workspace:*", - "cli": "workspace:*" - } -} diff --git a/turborepo-tests/example-pnpm-basic/test.t b/turborepo-tests/example-pnpm-basic/test.t deleted file mode 100644 index aca5acdc548c2..0000000000000 --- a/turborepo-tests/example-pnpm-basic/test.t +++ /dev/null @@ -1,30 +0,0 @@ - $ . ${TESTDIR}/../helpers/setup_example_test.sh basic pnpm@8.9.0 - -# run twice and make sure it works - $ pnpm run build lint --output-logs=errors-only - - \> my-turborepo@ build (.*)/test.t (re) - \> turbo build "lint" "--output-logs=errors-only" (re) - - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, web (esc) - \xe2\x80\xa2 Running build, lint in 5 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 5 successful, 5 total - Cached: 0 cached, 5 total - Time:\s*[\.0-9ms]+ (re) - - $ pnpm run build lint --output-logs=errors-only - - \> my-turborepo@ build (.*)/test.t (re) - \> turbo build "lint" "--output-logs=errors-only" (re) - - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, web (esc) - \xe2\x80\xa2 Running build, lint in 5 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 5 successful, 5 total - Cached: 5 cached, 5 total - Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) - - $ git diff diff --git a/turborepo-tests/example-pnpm-basic/turbo.json b/turborepo-tests/example-pnpm-basic/turbo.json deleted file mode 100644 index b272d33d12a58..0000000000000 --- a/turborepo-tests/example-pnpm-basic/turbo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["//"], - "pipeline": { - "test": { - "outputs": [], - // For github actions - "env": ["RUNNER_OS"] - } - } -} diff --git a/turborepo-tests/example-pnpm-gatsby/package.json b/turborepo-tests/example-pnpm-gatsby/package.json deleted file mode 100644 index caaab6b17ae0a..0000000000000 --- a/turborepo-tests/example-pnpm-gatsby/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@turborepo-examples-tests/pnpm-gatsby", - "private": true, - "scripts": { - "test": "./node_modules/.bin/prysk test.t" - }, - "dependencies": { - "turborepo-tests-helpers": "workspace:*", - "turborepo-examples": "workspace:*", - "prysk": "workspace:*", - "cli": "workspace:*" - } -} diff --git a/turborepo-tests/example-pnpm-gatsby/test.t b/turborepo-tests/example-pnpm-gatsby/test.t deleted file mode 100644 index b1dba1ba6e65e..0000000000000 --- a/turborepo-tests/example-pnpm-gatsby/test.t +++ /dev/null @@ -1,30 +0,0 @@ - $ . ${TESTDIR}/../helpers/setup_example_test.sh with-gatsby pnpm@8.9.0 - -# run twice and make sure it works - $ pnpm run build lint --output-logs=errors-only - - \> with-gatsby@0.0.0 build (.*)/test.t (re) - \> turbo build "lint" "--output-logs=errors-only" (re) - - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, web (esc) - \xe2\x80\xa2 Running build, lint in 5 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 5 successful, 5 total - Cached: 0 cached, 5 total - Time:\s*[\.0-9ms]+ (re) - - - $ pnpm run build lint --output-logs=errors-only - - \> with-gatsby@0.0.0 build (.*)/test.t (re) - \> turbo build "lint" "--output-logs=errors-only" (re) - - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, web (esc) - \xe2\x80\xa2 Running build, lint in 5 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 5 successful, 5 total - Cached: 5 cached, 5 total - Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) - diff --git a/turborepo-tests/example-pnpm-gatsby/turbo.json b/turborepo-tests/example-pnpm-gatsby/turbo.json deleted file mode 100644 index b272d33d12a58..0000000000000 --- a/turborepo-tests/example-pnpm-gatsby/turbo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["//"], - "pipeline": { - "test": { - "outputs": [], - // For github actions - "env": ["RUNNER_OS"] - } - } -} diff --git a/turborepo-tests/example-pnpm-kitchen-sink/package.json b/turborepo-tests/example-pnpm-kitchen-sink/package.json deleted file mode 100644 index 7618621dfb210..0000000000000 --- a/turborepo-tests/example-pnpm-kitchen-sink/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@turborepo-examples-tests/pnpm-kitchen-sink", - "private": true, - "scripts": { - "test": "./node_modules/.bin/prysk test.t" - }, - "dependencies": { - "turborepo-tests-helpers": "workspace:*", - "turborepo-examples": "workspace:*", - "prysk": "workspace:*", - "cli": "workspace:*" - } -} diff --git a/turborepo-tests/example-pnpm-kitchen-sink/test.t b/turborepo-tests/example-pnpm-kitchen-sink/test.t deleted file mode 100644 index 35d2443bd481f..0000000000000 --- a/turborepo-tests/example-pnpm-kitchen-sink/test.t +++ /dev/null @@ -1,32 +0,0 @@ - $ . ${TESTDIR}/../helpers/setup_example_test.sh kitchen-sink pnpm@8.9.0 - -# run twice and make sure it works - $ pnpm run build lint --output-logs=errors-only - - \> @ build (.*)/test.t (re) - \> turbo run build "lint" "--output-logs=errors-only" (re) - - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/jest-presets, @repo/logger, @repo/typescript-config, @repo/ui, admin, api, blog, storefront (esc) - \xe2\x80\xa2 Running build, lint in 9 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 12 successful, 12 total - Cached: 0 cached, 12 total - Time:\s*[\.0-9ms]+ (re) - - - $ pnpm run build lint --output-logs=errors-only - - \> @ build (.*)/test.t (re) - \> turbo run build "lint" "--output-logs=errors-only" (re) - - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/jest-presets, @repo/logger, @repo/typescript-config, @repo/ui, admin, api, blog, storefront (esc) - \xe2\x80\xa2 Running build, lint in 9 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 12 successful, 12 total - Cached: 12 cached, 12 total - Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) - - - $ git diff diff --git a/turborepo-tests/example-pnpm-kitchen-sink/turbo.json b/turborepo-tests/example-pnpm-kitchen-sink/turbo.json deleted file mode 100644 index b272d33d12a58..0000000000000 --- a/turborepo-tests/example-pnpm-kitchen-sink/turbo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["//"], - "pipeline": { - "test": { - "outputs": [], - // For github actions - "env": ["RUNNER_OS"] - } - } -} diff --git a/turborepo-tests/example-pnpm-with-svelte/package.json b/turborepo-tests/example-pnpm-with-svelte/package.json deleted file mode 100644 index 17b9143bec866..0000000000000 --- a/turborepo-tests/example-pnpm-with-svelte/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@turborepo-examples-tests/pnpm-with-svelte", - "private": true, - "scripts": { - "test": "./node_modules/.bin/prysk test.t" - }, - "dependencies": { - "turborepo-tests-helpers": "workspace:*", - "turborepo-examples": "workspace:*", - "prysk": "workspace:*", - "cli": "workspace:*" - } -} diff --git a/turborepo-tests/example-pnpm-with-svelte/test.t b/turborepo-tests/example-pnpm-with-svelte/test.t deleted file mode 100644 index 85fd6bc8dfe44..0000000000000 --- a/turborepo-tests/example-pnpm-with-svelte/test.t +++ /dev/null @@ -1,30 +0,0 @@ - $ . ${TESTDIR}/../helpers/setup_example_test.sh with-svelte pnpm@8.9.0 - -# run twice and make sure it works - $ pnpm run build lint --output-logs=errors-only - - \> @ build (.*)/test.t (re) - \> turbo run build "lint" "--output-logs=errors-only" (re) - - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/ui, docs, web (esc) - \xe2\x80\xa2 Running build, lint in 4 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 5 successful, 5 total - Cached: 0 cached, 5 total - Time:\s*[\.0-9ms]+ (re) - - $ pnpm run build lint --output-logs=errors-only - - \> @ build (.*)/test.t (re) - \> turbo run build "lint" "--output-logs=errors-only" (re) - - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/ui, docs, web (esc) - \xe2\x80\xa2 Running build, lint in 4 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 5 successful, 5 total - Cached: 5 cached, 5 total - Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) - - $ git diff diff --git a/turborepo-tests/example-pnpm-with-svelte/turbo.json b/turborepo-tests/example-pnpm-with-svelte/turbo.json deleted file mode 100644 index b272d33d12a58..0000000000000 --- a/turborepo-tests/example-pnpm-with-svelte/turbo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["//"], - "pipeline": { - "test": { - "outputs": [], - // For github actions - "env": ["RUNNER_OS"] - } - } -} diff --git a/turborepo-tests/example-with-berry/package.json b/turborepo-tests/example-with-berry/package.json new file mode 100644 index 0000000000000..e2ec59eeffbc7 --- /dev/null +++ b/turborepo-tests/example-with-berry/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/with-berry", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh with-berry yarn" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-with-berry/turbo.json b/turborepo-tests/example-with-berry/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-with-berry/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-with-changesets/package.json b/turborepo-tests/example-with-changesets/package.json new file mode 100644 index 0000000000000..1c2f63ec4931e --- /dev/null +++ b/turborepo-tests/example-with-changesets/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/with-changesets", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh with-changesets pnpm" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-with-changesets/turbo.json b/turborepo-tests/example-with-changesets/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-with-changesets/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-with-npm/package.json b/turborepo-tests/example-with-npm/package.json new file mode 100644 index 0000000000000..36f5237959317 --- /dev/null +++ b/turborepo-tests/example-with-npm/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/with-npm", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh with-npm npm" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-with-npm/turbo.json b/turborepo-tests/example-with-npm/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-with-npm/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-with-react-native-web/package.json b/turborepo-tests/example-with-react-native-web/package.json new file mode 100644 index 0000000000000..fb46143e5814d --- /dev/null +++ b/turborepo-tests/example-with-react-native-web/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/with-react-native-web", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh with-react-native-web yarn" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-with-react-native-web/turbo.json b/turborepo-tests/example-with-react-native-web/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-with-react-native-web/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-with-rollup/package.json b/turborepo-tests/example-with-rollup/package.json new file mode 100644 index 0000000000000..b1f6ab366526c --- /dev/null +++ b/turborepo-tests/example-with-rollup/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/with-rollup", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh with-rollup pnpm" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-with-rollup/turbo.json b/turborepo-tests/example-with-rollup/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-with-rollup/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-with-svelte/package.json b/turborepo-tests/example-with-svelte/package.json new file mode 100644 index 0000000000000..dab71eaa6fe1a --- /dev/null +++ b/turborepo-tests/example-with-svelte/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/with-svelte", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh with-svelte pnpm" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-with-svelte/turbo.json b/turborepo-tests/example-with-svelte/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-with-svelte/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-with-tailwind/package.json b/turborepo-tests/example-with-tailwind/package.json new file mode 100644 index 0000000000000..34e4d03c1ffe3 --- /dev/null +++ b/turborepo-tests/example-with-tailwind/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/with-tailwind", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh with-tailwind pnpm" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-with-tailwind/turbo.json b/turborepo-tests/example-with-tailwind/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-with-tailwind/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-with-vite/package.json b/turborepo-tests/example-with-vite/package.json new file mode 100644 index 0000000000000..bc22f2cda27bf --- /dev/null +++ b/turborepo-tests/example-with-vite/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/with-vite", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh with-vite pnpm" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-with-vite/turbo.json b/turborepo-tests/example-with-vite/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-with-vite/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-with-yarn/package.json b/turborepo-tests/example-with-yarn/package.json new file mode 100644 index 0000000000000..be671cba0c7e9 --- /dev/null +++ b/turborepo-tests/example-with-yarn/package.json @@ -0,0 +1,10 @@ +{ + "name": "@turborepo-examples-tests/with-yarn", + "scripts": { + "test": "bash ./node_modules/turborepo-tests-helpers/setup_example_test.sh with-yarn yarn" + }, + "dependencies": { + "turborepo-tests-helpers": "workspace:*", + "turborepo-examples": "workspace:*" + } +} diff --git a/turborepo-tests/example-with-yarn/turbo.json b/turborepo-tests/example-with-yarn/turbo.json new file mode 100644 index 0000000000000..7c806113370e3 --- /dev/null +++ b/turborepo-tests/example-with-yarn/turbo.json @@ -0,0 +1,8 @@ +{ + "extends": ["//"], + "pipeline": { + "test": { + "outputs": [] + } + } +} diff --git a/turborepo-tests/example-yarn-non-monorepo/package.json b/turborepo-tests/example-yarn-non-monorepo/package.json deleted file mode 100644 index 8f30d1bef4887..0000000000000 --- a/turborepo-tests/example-yarn-non-monorepo/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@turborepo-examples-tests/yarn-non-monorepo", - "private": true, - "scripts": { - "test": "./node_modules/.bin/prysk test.t" - }, - "dependencies": { - "turborepo-tests-helpers": "workspace:*", - "turborepo-examples": "workspace:*", - "prysk": "workspace:*", - "cli": "workspace:*" - } -} diff --git a/turborepo-tests/example-yarn-non-monorepo/test.t b/turborepo-tests/example-yarn-non-monorepo/test.t deleted file mode 100644 index 1a0a74e2a356d..0000000000000 --- a/turborepo-tests/example-yarn-non-monorepo/test.t +++ /dev/null @@ -1,28 +0,0 @@ - $ . ${TESTDIR}/../helpers/setup_example_test.sh non-monorepo yarn@1.22.19 - -# run twice and make sure it works - $ yarn turbo build lint --output-logs=errors-only - yarn run v\d+\.\d+\.\d+ (re) - \$ (.*)node_modules/.bin/turbo build lint --output-logs=errors-only (re) - \xe2\x80\xa2 Running build, lint (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 2 successful, 2 total - Cached: 0 cached, 2 total - Time:\s*[\.0-9ms]+ (re) - - Done in [\.0-9]+m?s\. (re) - - $ yarn turbo build lint --output-logs=errors-only - yarn run v\d+\.\d+\.\d+ (re) - \$ (.*)node_modules/.bin/turbo build lint --output-logs=errors-only (re) - \xe2\x80\xa2 Running build, lint (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 2 successful, 2 total - Cached: 2 cached, 2 total - Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) - - Done in [\.0-9]+m?s\. (re) - - $ git diff diff --git a/turborepo-tests/example-yarn-non-monorepo/turbo.json b/turborepo-tests/example-yarn-non-monorepo/turbo.json deleted file mode 100644 index b272d33d12a58..0000000000000 --- a/turborepo-tests/example-yarn-non-monorepo/turbo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["//"], - "pipeline": { - "test": { - "outputs": [], - // For github actions - "env": ["RUNNER_OS"] - } - } -} diff --git a/turborepo-tests/example-yarn-with-yarn/package.json b/turborepo-tests/example-yarn-with-yarn/package.json deleted file mode 100644 index ba61982a12658..0000000000000 --- a/turborepo-tests/example-yarn-with-yarn/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@turborepo-examples-tests/yarn-with-yarn", - "private": true, - "scripts": { - "test": "./node_modules/.bin/prysk test.t" - }, - "dependencies": { - "turborepo-tests-helpers": "workspace:*", - "turborepo-examples": "workspace:*", - "prysk": "workspace:*", - "cli": "workspace:*" - } -} diff --git a/turborepo-tests/example-yarn-with-yarn/test.t b/turborepo-tests/example-yarn-with-yarn/test.t deleted file mode 100644 index d64090592ffe4..0000000000000 --- a/turborepo-tests/example-yarn-with-yarn/test.t +++ /dev/null @@ -1,32 +0,0 @@ - $ . ${TESTDIR}/../helpers/setup_example_test.sh with-yarn yarn@1.22.19 - -# run twice and make sure it works - $ yarn turbo build lint --output-logs=errors-only - yarn run v\d+\.\d+\.\d+ (re) - \$ (.*)node_modules/.bin/turbo build lint --output-logs=errors-only (re) - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, web (esc) - \xe2\x80\xa2 Running build, lint in 5 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 5 successful, 5 total - Cached: 0 cached, 5 total - Time:\s*[\.0-9ms]+ (re) - - Done in [\.0-9]+m?s. (re) - - - $ yarn turbo build lint --output-logs=errors-only - yarn run v\d+\.\d+\.\d+ (re) - \$ (.*)node_modules/.bin/turbo build lint --output-logs=errors-only (re) - \xe2\x80\xa2 Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, web (esc) - \xe2\x80\xa2 Running build, lint in 5 packages (esc) - \xe2\x80\xa2 Remote caching disabled (esc) - - Tasks: 5 successful, 5 total - Cached: 5 cached, 5 total - Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) - - Done in [\.0-9]+m?s\. (re) - - - $ git diff diff --git a/turborepo-tests/example-yarn-with-yarn/turbo.json b/turborepo-tests/example-yarn-with-yarn/turbo.json deleted file mode 100644 index b272d33d12a58..0000000000000 --- a/turborepo-tests/example-yarn-with-yarn/turbo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["//"], - "pipeline": { - "test": { - "outputs": [], - // For github actions - "env": ["RUNNER_OS"] - } - } -} diff --git a/turborepo-tests/helpers/setup_example_test.sh b/turborepo-tests/helpers/setup_example_test.sh index fb0a24a3f16ca..40c1f1eeb88e7 100644 --- a/turborepo-tests/helpers/setup_example_test.sh +++ b/turborepo-tests/helpers/setup_example_test.sh @@ -2,36 +2,76 @@ set -eo pipefail -FIXTURE_NAME=$1 -PACKAGE_MANAGER=$2 # e.g. yarn@1.22.17 - -THIS_DIR=$(dirname "${BASH_SOURCE[0]}") -MONOREPO_ROOT_DIR="$THIS_DIR/../.." -TURBOREPO_TESTS_DIR="${MONOREPO_ROOT_DIR}/turborepo-tests" - -TARGET_DIR="$(pwd)" - -"${TURBOREPO_TESTS_DIR}/helpers/copy_fixture.sh" "${TARGET_DIR}" "${FIXTURE_NAME}" "${MONOREPO_ROOT_DIR}/examples" -"${TURBOREPO_TESTS_DIR}/helpers/setup_git.sh" "${TARGET_DIR}" -"${TURBOREPO_TESTS_DIR}/helpers/setup_package_manager.sh" "${TARGET_DIR}" "$PACKAGE_MANAGER" -"${TURBOREPO_TESTS_DIR}/helpers/install_deps.sh" "$PACKAGE_MANAGER" - -# Set the TURBO_BINARY_PATH env var. The examples themselves invoke the locally installed turbo, -# but turbo has an internal feature that will look for this environment variable and use it if it's set. -# This is our way of running a locally built turbo version in our examples/ instead of the version -# that is installed in the example's node_modules. -if [ "${OSTYPE}" == "msys" ]; then - EXT=".exe" -else - EXT="" +export TURBO_TELEMETRY_MESSAGE_DISABLED=1 + +# Start by figuring out which example we're testing and its package manager +example_path=$1 +package_manager=$2 + +if [ -z "$example_path" ]; then + echo "No example path was provided" + exit 1 fi -export TURBO_TELEMETRY_MESSAGE_DISABLED=1 -export TURBO_BINARY_PATH=${MONOREPO_ROOT_DIR}/target/debug/turbo${EXT} - -# Undo the set -eo pipefail at the top of this script -# This script is called with a leading ".", which means that it does not run -# in a new child process, so the set -eo pipefail would affect the calling script. -# Some of our tests actually assert non-zero exit codes, and we don't want to -# abort the test in those cases. So we undo the set -eo pipefail here. -set +eo pipefail +if [ -z "$package_manager" ]; then + echo "No package manager was provided" + exit 1 +fi + +# Use the right command for each package manager +if [ "$package_manager" == "npm" ]; then + package_manager_command="npm install" +elif [ "$package_manager" == "pnpm" ]; then + package_manager_command="pnpm install" +elif [ "$package_manager" == "yarn" ]; then + package_manager_command="yarn" +fi + +# All examples implement these two tasks +# and it's reasonable to assume that they will continue to do so +turbo_command="turbo build lint" + +# Head into a temporary directory +mkdir -p ../../examples-tests-tmp +cd ../../examples-tests-tmp + +# Start up a fresh directory for the test +rm -rf "$example_path" || true +rsync -avq \ +--exclude='node_modules' \ +--exclude="dist" \ +--exclude=".turbo" \ +--exclude=".expo" \ +--exclude=".cache" \ +--exclude=".next" \ +"../examples/$example_path" "." + +cd "$example_path" +"../../turborepo-tests/helpers/setup_git.sh" . + +# Make /tmp dir for writing dump logs +mkdir -p ./tmp +echo "/tmp/" >> ".gitignore" + +# Simulating the user's first run and dumping logs to a file +$package_manager_command >./tmp/install.txt 2>&1 +$turbo_command >./tmp/grep-me-for-miss.txt + +# We don't want to hit cache on first run because we're acting like a user. +# A user would never hit cache on first run. Why should we? +if grep -q ">>> FULL TURBO" ./tmp/grep-me-for-miss.txt; then + echo "A FULL TURBO was found. This test is misconfigured (since it can hit a cache)." + echo "Dumping logs:" + cat ./tmp/grep-me-for-miss.txt >&2 + exit 1 +fi + +# Simulating the user's second run +$turbo_command >./tmp/grep-me-for-hit.txt + +# Make sure the user hits FULL TURBO on the second go +if ! grep -q ">>> FULL TURBO" ./tmp/grep-me-for-hit.txt; then + echo "No FULL TURBO was found. Dumping logs:" + cat ./tmp/grep-me-for-hit.txt >&2 + exit 1 +fi