这是indexloc提供的服务,不要输入任何密码
Skip to content

fix: turbo prune for pnpm patched dependencies #10430

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

Merged
merged 5 commits into from
May 7, 2025

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Description

This PR fixes issues with turbo prune for pnpm monorepos that contain patched dependencies (#9120).

Changes include:

  • Support for patches defined in pnpm-workspace.yaml in pnpm 9+
  • Support for patches without version specifiers (pnpm 9.7+)
  • Proper pruning of patches from both package.json and pnpm-workspace.yaml

Tests

  • Added tests for version-less patches
  • Added tests for reading patches from pnpm-workspace.yaml
  • Existing tests continue to pass

Link to Devin run: https://app.devin.ai/sessions/4b9fd6561a6a40fbac3e73507c296678
Requested by: anthony.shew@vercel.com

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner May 2, 2025 18:25
Copy link

vercel bot commented May 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 5:14pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 5:14pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 5:14pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 5:14pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 5:14pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 5:14pm
examples-svelte-web ❌ Failed (Inspect) May 7, 2025 5:14pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 5:14pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 5:14pm
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 5:14pm

@turbo-orchestrator turbo-orchestrator bot added the needs: triage New issues get this label. Remove it after triage label May 2, 2025
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration devin-ai-integration bot changed the title Fix turbo prune for pnpm patched dependencies fix: turbo prune for pnpm patched dependencies May 2, 2025
devin-ai-integration bot and others added 3 commits May 7, 2025 08:54
This change adds support for:
- Reading patches from pnpm-workspace.yaml in pnpm 9+
- Handling version-less patches (which apply to all versions of a package)
- Properly pruning patches based on both sources

Fixes #9120

Co-Authored-By: anthony.shew@vercel.com <anthonyshew@gmail.com>
Co-Authored-By: anthony.shew@vercel.com <anthonyshew@gmail.com>
@chris-olszewski chris-olszewski force-pushed the devin/1746209769-fix-pnpm-patches branch from 1429b72 to 2ab83dc Compare May 7, 2025 14:19
Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small tweaks to tests, but overall this works due to pnpm still respecting the patches section in package.json if it is present. Future work might be pruning pnpm-workspace.yaml

@chris-olszewski chris-olszewski merged commit 0f9fc1b into main May 7, 2025
67 of 72 checks passed
@chris-olszewski chris-olszewski deleted the devin/1746209769-fix-pnpm-patches branch May 7, 2025 18:11
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant