NPM.Rebuild (NPM v0.6.0)

Copy Markdown View Source

Detects packages needing native rebuilds.

Identifies packages with install scripts, binding.gyp files, or other indicators that they contain native addons.

Summary

Functions

Formats scan results for display.

Checks if a specific package has native components.

Returns the list of packages that need rebuild after Node.js upgrade.

Scans node_modules for packages with native addons.

Functions

format_results(packages)

@spec format_results([map()]) :: String.t()

Formats scan results for display.

native?(package_dir, name \\ "")

@spec native?(String.t(), String.t()) :: boolean()

Checks if a specific package has native components.

needs_rebuild(node_modules_dir \\ "node_modules")

@spec needs_rebuild(String.t()) :: [String.t()]

Returns the list of packages that need rebuild after Node.js upgrade.

scan(node_modules_dir \\ "node_modules")

@spec scan(String.t()) :: [map()]

Scans node_modules for packages with native addons.