这是indexloc提供的服务,不要输入任何密码
Skip to content

fix broken examples causing pnpm test to fail #9239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 9, 2024

Conversation

dimitropoulos
Copy link
Contributor

Description

On main, pnpm test fails (sometimes intermittently, depending on cache scenarios, but all the time without cache). Why? Well..

Three of the examples had version 9 lockfiles checked in to git, when version 6 is what's required by their packageManager fields. This causes tests to fail quite frequently (example) in many PRs. This happens because when installing in these repos you get Lockfile not compatible with current pnpm errors, and it totally blows away the old lockfile and grabs a new one. Then, since our Next.js version is specified as ^4.1.1 in these package.jsons, it will resolve to 4.2.15 instead of the old 4.1.1. Then, it turns out that this minor update causes this diff in the next-env.d.ts file:

/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
- // see https://nextjs.org/docs/basic-features/typescript for more information.
+ // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.

The fact of that diff happening causes turbo to not be "FULL TURBO", which the example tests checks for. That then causes the test suite to fail because there's a turbo cache miss.

Testing Instructions

pnpm test should now pass.

@dimitropoulos dimitropoulos requested a review from a team as a code owner October 9, 2024 17:20
@turbo-orchestrator turbo-orchestrator bot added area: examples Improvements or additions to examples created-by: turborepo labels Oct 9, 2024
Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 8:47pm
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Oct 9, 2024 8:47pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Oct 9, 2024 8:47pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Oct 9, 2024 8:47pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Oct 9, 2024 8:47pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Oct 9, 2024 8:47pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Oct 9, 2024 8:47pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Oct 9, 2024 8:47pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Oct 9, 2024 8:47pm

@dimitropoulos dimitropoulos changed the title fix broken examples fix broken examples causing pnpm test to fail Oct 9, 2024
Copy link

socket-security bot commented Oct 9, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@next/eslint-plugin-next@14.2.11 filesystem 0 78.7 kB matt.straka, rauchg, timer, ...2 more
npm/@remix-run/dev@2.12.0 environment, filesystem Transitive: network, shell, unsafe +135 15.3 MB mjackson
npm/@remix-run/eslint-config@2.12.0 Transitive: environment, filesystem +13 4.51 MB mjackson
npm/@remix-run/node@2.12.0 Transitive: environment, filesystem, network +11 2.99 MB mjackson
npm/@remix-run/react@2.12.0 environment, network +4 4.86 MB mjackson
npm/@remix-run/server-runtime@2.12.0 network +4 3.11 MB mjackson
npm/@types/node@20.16.5 None 0 2.17 MB types
npm/@types/react@18.3.6 None 0 438 kB types
npm/@vitejs/plugin-react@4.3.1 None +3 301 kB vitebot
npm/eslint-config-turbo@2.1.2 None +1 442 kB turbobot
npm/express@4.21.0 environment, filesystem, network 0 221 kB wesleytodd
npm/next@14.2.11 environment, filesystem, network, shell, unsafe +1 86.1 MB vercel-release-bot
npm/tsup@8.2.4 eval, filesystem +1 2.71 MB egoist
npm/turbo@2.1.2 None 0 14.9 kB jaredpalmer, turbobot, vercel-release-bot
npm/typescript@5.6.2 None 0 22.4 MB typescript-bot
npm/vite@5.4.6 None +1 5.53 MB antfu, patak, soda, ...2 more

🚮 Removed packages: npm/@remix-run/dev@2.9.2, npm/@remix-run/eslint-config@2.10.0, npm/@remix-run/node@2.9.2, npm/@remix-run/react@2.9.2, npm/@remix-run/server-runtime@2.9.2, npm/@types/react@18.2.62, npm/express@4.18.3, npm/turbo@2.0.5, npm/turbo@2.0.7

View full report↗︎

Copy link
Member

@tknickman tknickman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some phrasing suggestions, but looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Improvements or additions to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants