Problem
Currently, we create chel as a single package and rely on an install script to download the correct binary. This approach is fragile because it requires the placeholder chel file, and also skips the integrity checks that npm provides. Some package managers like Deno also disable scripts by default.
As an alternative, see for example, https://www.npmjs.com/package/google-closure-compiler?activeTab=code (or esbuild). They create a package for each target and make it an optional dependency of the main package, with some small glue code to load the correct dependency. In the case of at least google-closure-compiler, this all seems possible to do without needing install scripts.
Solution
See if creating multiple packages would work for chel, especially to avoid having to rely on install scripts or to make the install process more robust.
Problem
Currently, we create
chelas a single package and rely on an install script to download the correct binary. This approach is fragile because it requires the placeholderchelfile, and also skips the integrity checks that npm provides. Some package managers like Deno also disable scripts by default.As an alternative, see for example,
https://www.npmjs.com/package/google-closure-compiler?activeTab=code(oresbuild). They create a package for each target and make it an optional dependency of the main package, with some small glue code to load the correct dependency. In the case of at leastgoogle-closure-compiler, this all seems possible to do without needing install scripts.Solution
See if creating multiple packages would work for
chel, especially to avoid having to rely on install scripts or to make the install process more robust.