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

Conversation

@anthonyshew
Copy link
Contributor

@anthonyshew anthonyshew commented Apr 5, 2025

Description

After users successfully execute codemods for v1, their package manager installation at the end can fail, as seen in #8495. This means that the pipeline key would disappear, but the turbo in the repository might be stuck at v1 still.

If they try to run the codemods again, the codemod will try to execute codemods for v1 again, since that's what will be found in package.json. At this point, it will error, when it can't find the pipeline key.

This PR introduces a guard that we can use to early exit if the pipeline key doesn't exist.

Testing Instructions

I'm reproducing #8495 with these steps:

  1. npx create-turbo@latest
  2. Bump turbo in package.json down to 1.0.0.
  3. Error!

With the changes in this PR, the codemods are effectively skipped, and we make it past them succesfully.

@vercel
Copy link
Contributor

vercel bot commented Apr 5, 2025

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

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 4:32pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 4:32pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 4:32pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 4:32pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 4:32pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 4:32pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 4:32pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 4:32pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 4:32pm
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2025 4:32pm

@anthonyshew anthonyshew merged commit 870decc into main Apr 8, 2025
40 checks passed
@anthonyshew anthonyshew deleted the shew/3f6fa branch April 8, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running a turbo upgrade fails when running it twice

3 participants