Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: is dev for packages installed under npm and pnpm #9000

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Shaharking
Copy link
Contributor

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

@Shaharking Shaharking requested a review from a team as a code owner August 13, 2024 09:31
@turbo-orchestrator turbo-orchestrator bot added needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels Aug 13, 2024
Copy link

vercel bot commented Aug 13, 2024

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

Copy link

vercel bot commented Aug 13, 2024

@ShaharAdskAcc is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@ijjk
Copy link
Member

ijjk commented Aug 13, 2024

Allow CI Workflow Run

  • approve CI run for commit: df7ab0d

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage New issues get this label. Remove it after triage owned-by: turborepo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants