Deep package filtering (ignore dependency scripts) #7453
Replies: 3 comments
-
A good starting point here would be to contribute an integration test with Prysk (and docs) that confirms the behavior you’ve mentioned. I’m pretty sure you’re right, but the behavior is not documented anywhere. Are you able to do thaf @mattidupre ? |
Beta Was this translation helpful? Give feedback.
-
Is this dependency outside of your turborepo repo? If so, the best solution may just be for us to recommend that you move this dependency into your monorepo.
Curious, why are you including this as a workspace if it's generated output?
This is a potential solution, but I'd like to understand the use case a bit more. (btw, for what it's worth |
Beta Was this translation helpful? Give feedback.
-
Appreciate the response! Sorry, it's been a busy couple weeks and haven't had a chance to look into the Turbo tests and documentation yet. Good call on my example, I neglected to include some negation. The linked dependency is required across multiple repos and cannot currently be published. Being able to make changes to that dependency that update in another dependent's onSave speeds up development. npm, Yarn, and pnpm have the Other solutions:
It's an edge case but I'm surprised this hasn't come up for repos wanting to gradually migrate to Turbo. I did just see a similar issue is being tracked with nx here. |
Beta Was this translation helpful? Give feedback.
-
Which project is this feature idea for?
Turborepo
Describe the feature you'd like to request
When executing
turbo run
I am wanting to fully ignore packages in my workspace, including in dependencies. Unless I am mistaken, the--filter
CLI flag will skip matches in the initial scope but won't skip those matches when they are dependencies.My use case:
I am using Yalc to handle a local linked dependency. It's great about copying that linked dependency into my monorepo's
./yalc
folder on every push and getting around React's peer dependency issues. I have./yalc/*
glob in that monorepo's workspace glob and everything else works perfect. However, when I run a Turborepo pipeline, it will try and execute that linked package's build scripts. Since it doesn't havedevDependencies
, they will inevitably fail.Describe the solution you'd like
Given:
dev
depends onbuild
.bar
andbaz
are dependenciesfoo
.turbo run dev --filter-deep=baz
Desired outcome:
bar/package.json:build
will execute.baz/package.json:build
will NOT execute.Describe alternatives you've considered
I am currently using clean-publish in my linked package's build pipeline to strip the package.json scripts before yalc pushes.
"rm -rf ./publish && clean-publish --without-publish --temp-dir publish && yalc push --changed publish && rm -rf ./publish"
This is causing some secondary headaches I am trying to avoid.
Beta Was this translation helpful? Give feedback.
All reactions