Skip to content

[Bug]: Error from npm_translate_lock when using pnpm.patchedDependencies #1427

@jfirebaugh

Description

@jfirebaugh

What happened?

If you have a pnpm.patchedDependencies entry in package.json, then npm_translate_lock will produce an error like:

Error in fail: ERROR: patch_args for package @jest/environment@29.7.0 contains a strip prefix that is incompatible with a patch applied via `pnpm.patchedDependencies`.

`pnpm.patchedDependencies` requires a strip prefix of `-p1`. All applied patches must use the same strip prefix.

npm_translate_lock's support for pnpm.patchedDependencies should extend to supplying a default patch_args value of ["-p1"] for packages that appear in pnpm.patchedDependencies, since that's the format pnpm uses.

Version

Development (host) and target OS/architectures:

Output of bazel --version: bazel 6.1.0

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file: rules_js-1.33.1

Language(s) and/or frameworks involved: Javascript

How to reproduce

No response

Any other information?

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions