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

Patched dependencies not copied when pruning project #1963

@weyert

Description

@weyert

What version of Turborepo are you using?

1.4.7-canary.0

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

pnpm

What operating system are you using?

Mac

Describe the Bug

PNPM 7 has built-in support for patching dependencies similar to patch-package only when using the turbo prune-command it's not copying over the patches-directory.

The list of patched dependencies is listed in the PNPM lock file, for example, the following:

lockfileVersion: 5.4
patchedDependencies:
  tailwindcss-theme-swapper@0.4.1:
    path: patches/tailwindcss-theme-swapper@0.4.1.patch
    hash: 74sdngpia5abwdbohdpkd2yzba

As you can see I have made a patch for the dependency named tailwindcss-theme-swapper (version 0.4.1) and the patch file can be found at patches/tailwindcss-theme-swapper@0.4.1.patch

Expected Behavior

I would expect that the patches-directory or the patched dependencies patch files to copy over when execute Turbo's prune-command

To Reproduce

  1. Create a new monorepo with PNPM
  2. Patch a dependency via pnpm patch (https://pnpm.io/cli/patch)
  3. Try to prune a package/project using turbo prune --scope=project1 --out-dir=../monorepo-app-generated
  4. Notice that the directory ../monorepo-app-generated is missing the patches directory

Metadata

Metadata

Labels

kind: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions