-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
area: ergonomicsIssues and features impacting the developer experience of using turboIssues and features impacting the developer experience of using turbo
Description
Describe the feature you'd like to request
There is precedent in using the "engines" property of package.json files to ensure that globally installed tools of the wrong version cannot be run on a package. Turborepo should support an engines.turbo version constraint that prevents the globally installed turbo command from running when it does not match.
Describe the solution you'd like
When running a turbo command globally it should read the root package.json file's engines property and check the version constraint of engines.turbo against it's own version. If it does not match it should provide an error and stop executing.
Describe alternatives you've considered
- When using
pnpm, the best way to executeturbocommands is usingpnpm exec. Usingpnpm turbois error-prone sincepnpmwill eat the--filterargument. This leads topnpm turbo run build --filter={package}andpnpm turbo run build -- --filter={package}having very different results. Our solution is to globally installturbo, however, this can lead to version mismatches with the installed package. - Another option could be for
turboglobal commands to execute the localturbocommand when one is present. This would be convenient but might result in some ambiguous behavior as opposed to a nice clean error. Even at that though, it's probably still nice to respectengines.turboto clearly define what is expected here.
roykho, adrianduffell and jlarmstrongiv
Metadata
Metadata
Assignees
Labels
area: ergonomicsIssues and features impacting the developer experience of using turboIssues and features impacting the developer experience of using turbo