Skip to content

add support for npm #30#91

Open
oooooooo wants to merge 1 commit intokdabir:masterfrom
oooooooo:npm
Open

add support for npm #30#91
oooooooo wants to merge 1 commit intokdabir:masterfrom
oooooooo:npm

Conversation

@oooooooo
Copy link
Copy Markdown
Contributor

Hi, I’ve made it compatible with npm install.

You can publish it using make npm.
( It works on Linux but not on Mac/BSD. Feel free to discard it. )

Once you merge, I will remove my test package from npm:
https://www.npmjs.com/package/@noooooooode/has

@kdabir
Copy link
Copy Markdown
Owner

kdabir commented Nov 25, 2025

The problem is once we distribute it via npm, it may be installed by users on Windows as well and then that can open floodgate of windows compatibility issues. I am open to more ideas on how to address this (ease of distribution vs OS compatibility). For Mac/Linux, we are already publishing to homebrew for easier installation. https://formulae.brew.sh/formula/has

@goto-dev-null
Copy link
Copy Markdown
Contributor

Forgive my ignorance but isn't npm for.....node packages? Shipping a bash script that has 0 node.js code associated with it feels really weird to me, and kind of just poluting npm's package registry. It makes about as much sense as (somehow) creating a Rust crate for it.

The whole appeal of has, to me, is that it is a self-contained bash script that performs simple yet very helpful functionality.

What I would suggest instead is make has compatible with tools that install binaries from Github Releases, like eget or distillery. Because doesn't need to be compiled for each individual platform, I think the level of effort on that would be pretty small, but I can't say for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants