</>PackageGraphPackageGraph

napi-postinstall

npmv0.3.4TypeScript

The `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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

58 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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,
Example truncated — see the full README.

Used by

Popular packages that depend on napi-postinstall.

Relationship graph

Dependencies (left) and dependents (right) of napi-postinstall.

unrs-resolvernapi-postinstall
napi-postinstall dependencies dependents

Release history

17 releases in the last two years, typically about 2 days apart.

Recent versions of napi-postinstall
VersionPublishedSizeLicense
0.3.4latest11 months ago58 KBMIT
0.3.31 year ago56 KBMIT
0.3.21 year ago55 KBMIT
0.3.01 year ago55 KBMIT
0.2.51 year ago48 KBMIT
0.2.41 year ago48 KBMIT
0.2.31 year ago48 KBMIT
0.2.21 year ago48 KBMIT
0.2.11 year ago45 KBMIT
0.2.01 year ago41 KBMIT
0.1.61 year ago40 KBMIT
0.1.51 year ago39 KBMIT
0.1.41 year ago39 KBMIT
0.1.31 year ago39 KBMIT
0.1.21 year ago41 KBMIT

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.