aspect-build / aspect-build/rules_js

[Bug]: Renaming files isn't respected by patches in patchedDependencies

Open
#1,132 2 comments 1 reaction 1 assignee Claimed by @kormide View on GitHub
bug help wanted need: funding
Dominant language
Starlark
Stars
378
Forks
183
Avg merge
1d 9h
Merged PRs (30d)
32

Description

### What happened?

When creating patch files, if a part of the patch involves re-naming a file, it is not respected and only the file modifications are respected. I've tried using both `patchedDependencies` in the `package.json` as well as `patches` in the `npm_translate_lock`

### Version

Development (host) and target OS/architectures: Apple M2 Pro
(I believe this is happening on Mac devices, and not linux devices, as CI machines were not affected by this) See the logs https://github.com/robin-pham/rules_js/actions/runs/5430054761/jobs/9875524119. Similar thing happened with our own setup where local doesn't work but our linux machines in CI work

Output of `bazel --version`: aspect 5.5.2

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

Language(s) and/or frameworks involved:
JS

### How to reproduce

See: https://github.com/aspect-build/rules_js/commit/01d28745052854de1b9948fb006c14f204c6d2da

In the above patch file example, when viewing the bazel-bin/node_modules, the file is accurately modified with the additional comments, but the file preserves the previous filename. When the same patchfile is used in pnpm, the file is actually renamed.

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.