Executing turbo tasks for staged files #9300
-
SummaryHi guys, I'm working on migrating a monorepo to turborepo setup. I have been trying to find a good way to execute Do you have any idea how you can handle this use case with git hooks ? can you give me an example pls? Additional informationPD: previous configuration used lint-staged and we had a ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We're having the same kind of issue after migrating from nx. I found this might work: turbo ls --filter="...[--staged]"
# or
turbo ls --filter="...[--cached]" Because of If you'd want unstaged files, you could use Did you come up with a better solution? |
Beta Was this translation helpful? Give feedback.
We're having the same kind of issue after migrating from nx.
I found this might work:
Because of
...
in filter, this will also include all workspaces that depend on the changed workspaces. Leave three dots out if this is not needed.I came to this solution because it looks like turbo is using
git diff
behind the scenes. It feels a bit hacky, though.If you'd want unstaged files, you could use
turbo ls --filter="[--]"
orturbo ls --filter="...[--]"
if you want dependent workspaces.Did you come up with a better solution?