Open scttdavs opened 1 week ago
The problem is that pnpm 9+ no longer specifies what packages require a build, the requiresBuild
attribute was removed.
So I think pnpm.neverBuiltDependencies
is useless when we don't know which packages require a build in the first place.
What happened?
I think this could be considered a feature request, but given what I needed to do to work around it, it feels more like a bug, or maybe missed requirement.
When using
lifecycle_hooks_exclude
withnpm_translate_lock
, it gets converted to the equivalentlifecycle_hooks
definition under the hood. That's nice, but with pnpm v9, I now need to addpnpm.onlyBuiltDependencies
. However, since this is an allow list, I now need to add every other package that has install scripts, even when I just want to exclude a few.Pnpm has a nicer alternative when you just want to exclude and that's pnpm.neverBuiltDependencies. Rules_js doesn't check for this though, and still enforces you add onlyBuiltDependencies, which now requires us to maintain an ongoing allow list of all packages with install scripts, just so we can exclude a few.
Version
Development (host) and target OS/architectures:
Output of
bazel --version
: 6.5Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file: WORKSPACELanguage(s) and/or frameworks involved: JavaScript
How to reproduce
Any other information?
No response