turbo
turbo copied to clipboard
Abilitity to globally (or in-repo-lly), oput out of all cloud prompts / flags / help / info
Describe the feature you'd like to request
For my uses, the monorepos I work with are either
- too small for relying on cloud caching to be useful
- for work with very script non-cloud security guidelines
I'm still evaluating turborepo for use in our 150+ project monorepo, and I'd like to hide all the cloud/vercel/login information from --help
output (and block the functionality from working entirely).
Describe the solution you'd like
could the "turbo"
entry in package.json have a setting for disabling cloud/vercel?
like,
{
"turbo": {
"cloudEnabled": false,
"pipeline": { }
}
}
This would mean:
yarn turbo --help
current
❯ yarn turbo --help
yarn run v1.22.17
$ /✂️/limber/node_modules/.bin/turbo --help
Usage: turbo [--version] [--help] <command> [<args>]
Available commands are:
link Link your local directory to a Vercel organization and enable remote caching.
login Login to your Vercel account
logout Logout of your Turborepo account
me DEPRECATED - Print user information about the current Turborepo.com account
prune Prepare a subset of your monorepo
run Run a task
unlink Unlink the current directory from your Vercel organization and disable Remote Caching (beta).
Done in 0.14s.
proposed
❯ yarn turbo --help
yarn run v1.22.17
$ /✂️/limber/node_modules/.bin/turbo --help
Usage: turbo [--version] [--help] <command> [<args>]
Available commands are:
prune Prepare a subset of your monorepo
run Run a task
Done in 0.14s.
yarn turbo run --help
current
❯ yarn turbo run --help
yarn run v1.22.17
$ /✂️/limber/node_modules/.bin/turbo run --help
Usage: turbo run <task> [options] ...
Run tasks across projects in your monorepo.
By default, turbo executes tasks in topological order (i.e.
dependencies first) and then caches the results. Re-running commands for
tasks already in the cache will skip re-execution and immediately move
artifacts from the cache into the correct output folders (as if the task
occurred again).
Options:
--help Show this message.
--scope Specify package(s) to act as entry points for task
execution. Supports globs.
--cache-dir Specify local filesystem cache directory.
(default "./node_modules/.cache/turbo")
--concurrency Limit the concurrency of task execution. Use 1 for
serial (i.e. one-at-a-time) execution. (default 10)
--continue Continue execution even if a task exits with an error
or non-zero exit code. The default behavior is to bail
immediately. (default false)
--force Ignore the existing cache (to force execution).
(default false)
--graph Generate a Dot graph of the task execution.
--global-deps Specify glob of global filesystem dependencies to
be hashed. Useful for .env and files in the root
directory. Can be specified multiple times.
--since Limit/Set scope to changed packages since a
mergebase. This uses the git diff ${target_branch}...
mechanism to identify which packages have changed.
--team The slug of the turborepo.com team.
--token A turborepo.com personal access token.
--ignore Files to ignore when calculating changed files
(i.e. --since). Supports globs.
--profile File to write turbo's performance profile output into.
You can load the file up in chrome://tracing to see
which parts of your build were slow.
--parallel Execute all tasks in parallel. (default false)
--include-dependencies Include the dependencies of tasks in execution.
(default false)
--no-deps Exclude dependent task consumers from execution.
(default false)
--no-cache Avoid saving task results to the cache. Useful for
development/watch tasks. (default false)
Done in 0.17s.
proposed
❯ yarn turbo run --help
yarn run v1.22.17
$ /✂️/limber/node_modules/.bin/turbo run --help
Usage: turbo run <task> [options] ...
Run tasks across projects in your monorepo.
By default, turbo executes tasks in topological order (i.e.
dependencies first) and then caches the results. Re-running commands for
tasks already in the cache will skip re-execution and immediately move
artifacts from the cache into the correct output folders (as if the task
occurred again).
Options:
--help Show this message.
--scope Specify package(s) to act as entry points for task
execution. Supports globs.
--cache-dir Specify local filesystem cache directory.
(default "./node_modules/.cache/turbo")
--concurrency Limit the concurrency of task execution. Use 1 for
serial (i.e. one-at-a-time) execution. (default 10)
--continue Continue execution even if a task exits with an error
or non-zero exit code. The default behavior is to bail
immediately. (default false)
--force Ignore the existing cache (to force execution).
(default false)
--graph Generate a Dot graph of the task execution.
--global-deps Specify glob of global filesystem dependencies to
be hashed. Useful for .env and files in the root
directory. Can be specified multiple times.
--since Limit/Set scope to changed packages since a
mergebase. This uses the git diff ${target_branch}...
mechanism to identify which packages have changed.
--ignore Files to ignore when calculating changed files
(i.e. --since). Supports globs.
--profile File to write turbo's performance profile output into.
You can load the file up in chrome://tracing to see
which parts of your build were slow.
--parallel Execute all tasks in parallel. (default false)
--include-dependencies Include the dependencies of tasks in execution.
(default false)
--no-deps Exclude dependent task consumers from execution.
(default false)
--no-cache Avoid saving task results to the cache. Useful for
development/watch tasks. (default false)
Done in 0.17s.
Describe alternatives you've considered
I guess I could make another wrapper CLI and parse stdout... but that doesn't prevent folks from using the underlying commands
If you don't use the login command or specify team id / team slug via command arguments or .turbo/config
it would not call out to Vercel.
I have written my on remote cache to avoid cache artefacts being uploaded to Vercel for similar reasons as you and it works well. I don't think hiding it in --help
will help in a due diligence / compliance manner.
A lot of this was moved quickly over with search and replace for Turborepo.com and Vercel.com during integration. We can revisit language to clarify that it is not Vercel specific
I mostly don't want devs to be tempted to so easily "try something out" and accidentally expose code
I'm not sure it's a good pattern to hide CLI args from a help output based on config 🤔. Do you know of any other projects that do this @NullVoxPopuli?
I do not. But seeing as how the average dev is overwhelmed by 'all the things', i figure it'd be good to configure for a team