Skip to content

feat: add npm GitHub repo install support (Issue#11)#18

Merged
seanseannery merged 2 commits intomainfrom
feat/npm-install-support
Mar 7, 2026
Merged

feat: add npm GitHub repo install support (Issue#11)#18
seanseannery merged 2 commits intomainfrom
feat/npm-install-support

Conversation

@seanseannery
Copy link
Owner

Key Changes

  • Add package.json — npm package metadata with bin.ops → bin/ops and a postinstall hook
  • Add install/npm_install.js — Node.js postinstall script that detects the platform, fetches the latest GitHub release, and downloads the correct binary to bin/ops (no external npm dependencies, uses Node.js built-in https)
  • Update install/install_test.sh — add npm install test section with cleanup
  • Update README.md — add npm install section

Why do we need this?

Partial close of #11. Adds npm install -g github:seanseannery/opsfile support using a GitHub repo-based install (no npm registry account required). Publishing to the public npm registry is tracked separately in the updated issue.

New modules or other dependencies introduced

None. install/npm_install.js uses only Node.js built-in modules (https, fs, path).

How was this tested?

  • install/npm_install.js was run directly (node install/npm_install.js) and successfully downloaded ops v0.8.1 to bin/ops with correct permissions (-rwxr-xr-x); bin/ops --version responded correctly
  • make test-install npm section will pass once this PR is merged to main (npm clones from remote main, same behaviour as the brew test before feat: add Homebrew tap install support (Issue#10) #16 merged)

@seanseannery seanseannery merged commit f35913f into main Mar 7, 2026
2 checks passed
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.

1 participant