napi-postinstall is a helper you run from an npm postinstall script to automatically check and prepare napi native binding packages, specifically for legacy npm versions. It provides a CLI and an API function for ensuring the required napi binding artifacts are set up during installation (including a fallback module).
Project status
- Maintenance status: The upstream repo shows a very recent push on 2026-06-01, and the project has multiple tagged updates in 2025, indicating it is not dormant or in maintenance mode.
- Update cadence: Tagged updates were relatively frequent in mid 2025 (roughly every few weeks to a couple months), but after v0.3.4 on 2025-10-04 there is a gap until the latest recorded upstream push (~8 months), suggesting slower tagging while development may still be ongoing.
AI summary generated
Recent updates
v0.3.4
v0.3.4 extends platform and target resolution to support the loong64 architecture and the OpenHarmony platform. Release notes only mention that feature addition, but the code also changes how certain triples are interpreted and how Windows MinGW targets are selected.
Featuresv0.3.3
v0.3.3 adds support for fetching registry metadata over plain HTTP (not just HTTPS). It also updates the CLI to attempt reading the current working directory's package.json, and uses that data when it matches the provided package name and version.
Featuresv0.3.2
Release v0.3.2 is effectively a republish/reversion update with minimal changes. The only substantive diff is a small documentation snippet change in README, plus the package version bump to 0.3.2.
v0.3.0
v0.3.0 introduces a runtime fallback mechanism with support for WebContainer-like environments. The codebase adds a new `napi-postinstall/fallback` entry point that attempts to resolve the correct NAPI binding at runtime, including downloading the WebAssembly WASI binding when needed.
Featuresv0.2.5
Release v0.2.5 is a small patch release. The documented change is expanding redirect handling in the internal fetch logic to also follow HTTP 307 and 308 responses.
v0.2.4
v0.2.4 is a patch release that updates the TypeScript compilation target to ES2020 to improve compatibility with Node versions below 15. The release notes only mention this change, but the diff also includes several developer-tooling dependency and lockfile updates.
v0.2.3
v0.2.3 is a patch release that targets postinstall installation reliability. The documented change is a fix for a case where the destination directory for a newly installed binary could be missing.
v0.2.2
v0.2.2 is a patch release that changes how napi-postinstall behaves around Yarn Plug'n'Play, specifically to stop attempting an automatic patching flow that the project considers impossible. The code changes also touch error handling and logging, and add environment detection utilities.
v0.2.1
v0.2.1 is a patch release focused on improving WebContainer compatibility by ensuring the wasm32-wasi target is used. The code changes also expand the wasm32-wasi installation logic beyond just selecting the target, altering how npm installs and how node_modules content is moved into place.
v0.2.0
v0.2.0 introduces support for reading a dependency package.json from the npm registry when it cannot be loaded locally, intended to improve compatibility in yarn and pnpm setups. The implementation also changes how the CLI and the exported checkAndPreparePackage function accept arguments, and it loosens some validation behavior around missing optional dependency version entries.
Features