aspect-build / aspect-build/rules_js

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

Open
#1,264 0 comments 0 reactions 0 assignees View on GitHub
enhancement need: discussion need: funding
Dominant language
Starlark
Stars
378
Forks
183
Avg merge
1d 9h
Merged PRs (30d)
32

Description

### 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",
},
...
)
```

Contributor guide

Open the contributing guide

Research direction

Start at the npm_translate_lock entry point and trace how the bins and custom_postinstalls attributes are assembled. Check existing tests around these attributes, then use the Angular example to verify that declared binaries are directly available during every custom postinstall regardless of module dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.