[RFC] Execute Arbitrary package.json Scripts
#7261
ObliviousHarmony
started this conversation in
Ideas
Replies: 3 comments
-
|
I think with a reasonable set of defaults (no dependencies, no caching), this could work. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@gsoltis Would it be possible to still support the dependency traversal provided by the |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I think so. As long as we can get dependencies from |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the feature you'd like to request
Right now you are given an error message when you attempt to execute
turbo runusing a command that is not a pipeline in yourturbo.jsonfile. With ourpnpmworkspace we have to use bothpnpm {command} --filter={package}andturbo run {command} --filter={package}depending on whether or not a command exists within a pipeline. It would be great if we could use a single tool for all of our commands.As an aside, the error message:
Seems to indicate pipelines used to live in the root
package.json. Should that be updated?Describe the solution you'd like
Since
turbojust executespackage.jsonscripts as tasks, it would be convenient if it could execute arbitrary commands. This would default to"cache": falsesince there is no pipeline definition. The main issue I see with this would be ambiguity about whether or not a command was being executed as a pipeline or arbitrarily. I think that's fine though since it would give the message that it isn't using a cache due to configuration.The other benefit here is that we'd get to use the comprehensive package filtering functionality on any script. A single syntax for running commands in a monorepo!
Describe alternatives you've considered
An alternative would be to just add every single possible
package.jsonscript from any package to theturbo.json. I believe this is unreasonable, however, since that could be a very large amount of variability. I do think this is a good way to enforce consistency to avoid accidents but it seems unnecessary.Beta Was this translation helpful? Give feedback.
All reactions