fix: upgrade the turbo package in Yarn 4 #8076
Open
+12
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes a failed install when running
npx @turbo/codemod@latest update
while using Yarn 4.yarn add turbo@latest --dev -W
is not a valid command:Using yarn version 4.1.0:
It seems to me that
-W
is not a valid flag for most yarn commands. The only command I could find isyarn workspaces foreach
, but that's not the command being issued in this code.I don't have a great understanding of this codebase, so I did my best to create a version that works. It looks to me that the code is trying to be resilient against which directory the user is at. So I replicated that behavior using
yarn workspaces foreach --all --include .
. It's a trick to run a specific command in the root of the workspace regardless of current location.I wasn't able to build the repo. I was hoping for a TS only way to build only the codemod package, but I didn't find it. I currently don't have the time to setup the Go & Rust toolchain and I've never used either. I tested this by manually assembling the command from the code and testing that in my repo.
Testing Instructions