NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #1210 most downloaded on npm
The `postinstall` script helper for handling native bindings in legacy `npm` versions
Latest stable
0.3.8
Last release 19 days ago
03 Nov 2026
Ships unpredictably
gaps range from 8 days to 13 months
Nearly every release is documented
notes for 21 of 21 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
21 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
### Patch Changes - #85 `251a241` Thanks @DDuarte! - fix: consume redirect and non-200 responses so the keep-alive socket is released and the process
### Patch Changes - #81 `0a96d2a` Thanks @JounQin! - Copy the installed binding binary to the loader's local path so the runtime fallback still works
#81 0a96d2a Thanks @JounQin! - Copy the installed binding binary to the loader's local path so the runtime fallback still works when Node has cached the failed package lookup.
#79 0f3601d Thanks @JounQin! - Add a napi-patch bin for injecting the all-platform runtime fallback into generated napi-rs loaders. It inserts the all-platform fallback before the loader's final if (!nativeBinding) check, with no WebContainer-only guard. The API accepts an entry, package name and extra text to append; nested entries such as napi/index.js are supported. The inserted fallback is guarded by SKIP_<PACKAGE>_FALLBACK; scoped names are encoded as SKIP_SCOPE_PACKAGE_FALLBACK. A loader that already ran the fallback gives up instead of starting another nested install.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
The registry used by the JS API is resolved from the same config as well, including @scope:registry. It stays there when the configured registry answe
#73 d95190c Thanks @JounQin! - Support WASI targets listed in napi.targets when the WASI binding is not declared in optionalDependencies, matching the fallback behavior.
#70 6527bce Thanks @JounQin! - Avoid EBADDEVENGINES when the caller declares a different devEngines.packageManager by running the fallback npm install with the temporary directory as its prefix.
#75 b4ee025 Thanks @JounQin! - Use the locally installed CLI for the runtime fallback instead of invoking npx/pnpm/yarn, and expose the CLI as napi-postinstall/cli. This also removes the package-manager and Deno detection from the fallback.
#76 a94c0db Thanks @JounQin! - Respect the project's .npmrc when a missing platform binding has to be installed by the nested npm fallback. Custom registries configured with registry and _authToken now work instead of falling back to the public registry. The nested install runs from the project directory, so relative values in that file such as cafile, certfile and cache keep pointing at the project.
The registry used by the JS API is resolved from the same config as well, including @scope:registry. It stays there when the configured registry answers: neither the manifest lookup nor the tarball download falls back to the public registry, since a public manifest could otherwise decide which package is resolved next. When npm itself cannot be queried at all (no npm on the machine, or an unreadable project .npmrc), the lookup returns the public default rather than failing, and says so in the log.
Known limitations:
verbatimSymlinks, so symlinks inside it (such as node_modules/.bin for a WASI install) are resolved against the source that is then removed. Node 16.7-16.14 failed that move outright before, so nothing regresses, but the links can break there.node_modules the package was installed into. Workspace roots are not derived, so an install that lands in a member's node_modules while the .npmrc only exists at the workspace root is not covered yet.Credentials mirrored into the temporary prefix are written with mode 0600 from the start, so the copy is never readable by other users; the prefix itself is created by mkdtemp and is 0700.
#78 86ff5e0 Thanks @i1stG! - Resolve the host manifest and the installed binding from the directory the postinstall runs in. In a pnpm-style layout with hoist=false the binding is a sibling of the host package in the consumer's node_modules, while napi-postinstall can be linked from a tree that cannot see it, so the lookup used to fall through to the nested install and then to a download — which fails in an offline sandbox. In a normal npm, yarn or pnpm install the cwd is the package that needs the binding, so nothing changes for them.
Full Changelog: https://github.com/un-ts/napi-postinstall/compare/v0.3.5...v0.3.6
The fallback now checks napi.targets as well, matching napi's policy of keeping the WASI fallback out of optionalDependencies when it is not the only
### Patch Changes - #56 `9ce741b` Thanks @JounQin! - feat: add support for loong64 arch and openharmony platform
### Patch Changes - #47 `8447abb` Thanks @WooWan! - feat: support for HTTP protocol in private registries - #51 `1d9c7d5` Thanks @mrginglymus! - feat:
republish the latest version Full Changelog: https://github.com/un-ts/napi-postinstall/compare/v0.3.0...v0.3.2
republish the latest version
Full Changelog: https://github.com/un-ts/napi-postinstall/compare/v0.3.0...v0.3.2
### Minor Changes - #40 `d4719ff` Thanks @JounQin! - feat: add runtime fallback and webcontainer support
@WooWan made their first contribution in https://github.com/un-ts/napi-postinstall/pull/38
### Patch Changes - #32 `6195df6` Thanks @JounQin! - fix: target ES2020 for Node <15 compatibility Full Changelog: https://github.com/un-ts/napi-posti
### Patch Changes - #27 `f52b3e9` Thanks @JounQin! - fix: newPath dir could be unavailable, make sure it's already there
@mrginglymus made their first contribution in https://github.com/un-ts/napi-postinstall/pull/25
Full Changelog: https://github.com/un-ts/napi-postinstall/compare/v0.2.1...v0.2.2
### Patch Changes - #23 `f14cd3f` Thanks @JounQin! - fix: always use wasm32-wasi target for webcontainer Full Changelog: https://github.com/un-ts/napi
### Minor Changes - #21 `2d6c726` Thanks @JounQin! - feat: support reading package.json from npm registry - #21 `2d6c726` Thanks @JounQin! - feat: sup
### Patch Changes - #18 `8a887ee` Thanks @JounQin! - fix: support install wasm32-wasi correctly with --cpu=wasm32
`c88dc0c` Thanks @JounQin! - fix: isNpm detection
c88dc0c Thanks @JounQin! - fix: isNpm detectionFull Changelog: https://github.com/un-ts/napi-postinstall/compare/v0.1.4...v0.1.5
`87ecdd2` Thanks @JounQin! - fix: only check for npm
87ecdd2 Thanks @JounQin! - fix: only check for npm### Patch Changes - #12 `5b8ff18` Thanks @JounQin! - chore: remove unnecessary tslib by targeting ES2021 Full Changelog: https://github.com/un-ts/napi
### Patch Changes - #8 `68a8acc` Thanks @JounQin! - fix: tslib should be listed as dependency Full Changelog: https://github.com/un-ts/napi-postinstal
### Patch Changes - #6 `c56e93a` Thanks @JounQin! - fix: allow optional optionalDependencies for development Full Changelog: https://github.com/un-ts/
@github-actions made their first contribution in https://github.com/un-ts/napi-postinstall/pull/5
Full Changelog: https://github.com/un-ts/napi-postinstall/compare/v0.0.0...v0.1.0
One column per month.