rules_js icon indicating copy to clipboard operation
rules_js copied to clipboard

[FR]: `npm_translate_lock` bins should be available when running custom_postinstalls

Open twheys opened this issue 1 year ago • 0 comments

What is the current behavior?

bins are available in the custom_postinstall currently IFF the library that the custom_postinstall is being ran for depends on the other package where the binary is available. I think this should be changed such that if a binary is set in the bins attribute, it is available during the custom_postinstall regardless of module dependencies.

Describe the feature

During the execution of custom_postinstalls, the node binaries defined in the bins attribute of npm_translate_lock should be defined so that they can be referenced directly.

example:

npm_translate_lock(
    name = "npm",
    bins = {
        "@angular/compiler-cli": {"ngcc": "./bundles/ngcc/main-ngcc.js"},
    },
    custom_postinstalls = {
        "@angular/core": "ngcc",
    },
    ...
)

twheys avatar Sep 11 '23 09:09 twheys