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

pnpm patches incorrectly excluded on turbo prune #9120

@kalvenschraut

Description

@kalvenschraut

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/RTVision/turborepo-prune-patch-issue

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Linux

Which canary version will you have in your reproduction?

2.1.2-canary.0

Describe the Bug

patches are being remove from the pruned workspace when app depends on the package.

Expected Behavior

all patches for dependent libraries be included in the prune of an app.

To Reproduce

clone the repo and run pnpm turbo prune --scope=web and then open up out/pnpm-lock.yaml and see the next patch is no longer present even though it is the base pnpm-lock.yaml file and web depends on next

Additional context

pnpm recently added a feature that allows trying to apply the same patch to all versions of a package which was added in pnpm 9.7. Because of that the patch doesn't have a version in the file name or in the lockfile which I suspect is causing not to be added during the prune. This is the default way pnpm generates patch files now so any new patches done are no longer being kept around.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: pruneturbo prunekind: bugSomething isn't workingneeds: triageNew issues get this label. Remove it after triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions