-
Notifications
You must be signed in to change notification settings - Fork 4
Home
A no-dependency micro helper for developers of binary addons for Node — two small one-file utilities integrated with GitHub releases:
- save-to-github-cache — uploads a built binary artifact to a GitHub release from CI, named by platform, architecture, and Node ABI (or N-API level).
- install-from-cache — downloads the matching artifact on the user's machine at install time, verifies it, and falls back to building from sources on any failure.
The motivation for this project: Why???
Starting with npm 12 (July 2026), npm does not run dependency lifecycle scripts by default — and this helper runs as the consuming addon's install script. End users have to approve the addon once (npm approve-scripts <addon>); otherwise neither the prebuilt download nor the node-gyp fallback runs. See NPM 12 and install scripts for the full story.
🔍 Search this wiki — ranked, deep-linked search via wiki-search; install the bookmarklet to search in place. Fallback: GitHub wiki search.
New to the project? Read in this order, then dip into the reference pages below:
- Save to GitHub cache — set up CI to build and publish artifacts on every release tag.
- Install from cache — what happens on the user's machine, and every knob the installer takes.
- NPM 12 and install scripts — the approval step your users will need from July 2026.
Reference
- Install from cache — the consumer-side utility: flags, environment variables, the asset URL format, npm parameters.
- Save to GitHub cache — the CI-side utility: flags, compression formats, a GitHub Actions workflow example.
Guides
- Using N-API — ship one binary per platform/arch instead of one per Node major.
- Using a proxy — route downloads through corporate HTTP/HTTPS/SOCKS proxies.
- Making a local mirror — serve artifacts from an internal host or the local filesystem.
- Build artifacts locally — save artifacts manually for exotic configurations.
- NPM 12 and install scripts — the consumer-side approval flow required by npm 12.
Project
- Release notes — the full release history with dates.
- Why??? — the motivation for this project.
We support all currently active Node versions. As of writing (June 2026) these are 22, 24 (LTS) and 26 (current). The package declares engines.node": ">=18" since 1.5.0; older Node will refuse to install (or emit an EBADENGINE warning).