Skip to content

Multiple packages to avoid postinstall script #125

Description

@corrideat

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions