turbo
turbo copied to clipboard
feat: is dev for packages installed under npm and pnpm
Description
Hey,
My team and I have been experiencing issues with development dependencies being installed even when using the --omit=dev flag with turbo prune. I came across the issue discussed here: Issue #1100, particularly the comment outlining the proposed solution.
To help advance the process, I decided to start contributing to this feature. I've begun implementing the first step mentioned:
"We need to change our package graph to contain what dependency types in the edges."
I've added an is_dev flag to each package in the graph, allowing us to identify and remove development dependencies in the later stages of the pruning process.
For this MVP, I focused on npm and pnpm, extracting the necessary information directly from package-lock.json/pnpm-lock.yaml.
I haven't implemented this for other package managers like yarn or bun yet, but I can extend it later if needed.
I'd appreciate your feedback on whether this aligns with your intended approach. If not, could you please provide more direction?
Additional Notes:
- I'm not very experienced with Rust, so the code quality might not be optimal. Any guidance or suggestions for improvement would be greatly appreciated.
- I've added relevant unit tests, but some integration tests failed. I had trouble running only the failed integration tests, so I haven't been able to address those yet. Any advice on how to run and fix those specific tests would be helpful.
Thanks for your time and consideration!
Testing Instructions
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| turbo | ❌ Failed (Inspect) | Aug 13, 2024 9:31am |
6 Skipped Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| examples-basic-web | ⬜️ Ignored (Inspect) | Visit Preview | Aug 13, 2024 9:31am | |
| examples-designsystem-docs | ⬜️ Ignored (Inspect) | Visit Preview | Aug 13, 2024 9:31am | |
| examples-native-web | ⬜️ Ignored (Inspect) | Visit Preview | Aug 13, 2024 9:31am | |
| examples-svelte-web | ⬜️ Ignored (Inspect) | Visit Preview | Aug 13, 2024 9:31am | |
| examples-tailwind-web | ⬜️ Ignored (Inspect) | Visit Preview | Aug 13, 2024 9:31am | |
| examples-vite-web | ⬜️ Ignored (Inspect) | Visit Preview | Aug 13, 2024 9:31am |
@ShaharAdskAcc is attempting to deploy a commit to the Vercel Team on Vercel.
A member of the Team first needs to authorize it.
Allow CI Workflow Run
- [ ] approve CI run for commit: df7ab0d4147e42b138b0233dab403d7a5d160f5c
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer