napi-postinstall
npmv0.3.4TypeScriptThe `postinstall` script helper for handling native bindings in legacy `npm` versions
Safe to adopt
Yes — napi-postinstall scores well across adoption, maintenance, weight, supply chain, and licensing. 47.8M downloads per week and 1 known dependents. Last published 341 days ago. 17 releases in the last 2 years.
- AAdoption: grade A, Excellent.
47.8M downloads per week and 1 known dependents.
- BMaintenance: grade B, Good.
Last published 341 days ago. 17 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 58 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding napi-postinstall to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node ^12.20.0 || ^14.18.0 || >=16.0.0
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the napi-postinstall README.
// napi-postinstall
export interface PackageJson {
name: string
version: string
}
export declare function checkAndPreparePackage(
packageNameOrPackageJson: PackageJson | string,
checkVersion?: boolean,
): Promise<void>
// napi-postinstall/fallback
declare function fallback<T = unknown>(
packageJsonPath: string,Used by
Popular packages that depend on napi-postinstall.
Relationship graph
Dependencies (left) and dependents (right) of napi-postinstall.
Release history
17 releases in the last two years, typically about 2 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 0.3.4latest | 11 months ago | 58 KB | MIT |
| 0.3.3 | 1 year ago | 56 KB | MIT |
| 0.3.2 | 1 year ago | 55 KB | MIT |
| 0.3.0 | 1 year ago | 55 KB | MIT |
| 0.2.5 | 1 year ago | 48 KB | MIT |
| 0.2.4 | 1 year ago | 48 KB | MIT |
| 0.2.3 | 1 year ago | 48 KB | MIT |
| 0.2.2 | 1 year ago | 48 KB | MIT |
| 0.2.1 | 1 year ago | 45 KB | MIT |
| 0.2.0 | 1 year ago | 41 KB | MIT |
| 0.1.6 | 1 year ago | 40 KB | MIT |
| 0.1.5 | 1 year ago | 39 KB | MIT |
| 0.1.4 | 1 year ago | 39 KB | MIT |
| 0.1.3 | 1 year ago | 39 KB | MIT |
| 0.1.2 | 1 year ago | 41 KB | MIT |
Overview
napi-postinstall is an npm package that the `postinstall` script helper for handling native bindings in legacy `npm` versions. It is extremely widely used, with about 47.8M downloads per week and 1 known dependents in the graph. The latest version is 0.3.4, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need the `postinstall` script helper for handling native bindings in legacy `npm` versions and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (47.8M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Zero runtime dependencies — minimal footprint.
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use napi-postinstall?
Yes — napi-postinstall scores well across adoption, maintenance, weight, supply chain, and licensing. 47.8M downloads per week and 1 known dependents. Last published 341 days ago. 17 releases in the last 2 years.
How do I install napi-postinstall?
Run `npm install napi-postinstall` to add napi-postinstall to your npm project.
What license is napi-postinstall released under?
napi-postinstall is distributed under the MIT license.
How popular is napi-postinstall?
napi-postinstall has approximately 47,848,334 downloads per week and 1 known dependent packages.
Is napi-postinstall still maintained?
The most recent release of napi-postinstall (v0.3.4) was published 11 months ago.
Does napi-postinstall run install scripts?
No. napi-postinstall does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.