LinuxCommandLibrary

npm-diff

shows differences between package versions or between local package and registry

TLDR

Compare versions of package

$ npm diff --diff=[package]@[1.0.0] --diff=[package]@[2.0.0]
copy
Compare local with registry
$ npm diff --diff=[package-name]
copy
Compare specific files
$ npm diff --diff=[pkg]@[1.0.0] --diff=[pkg]@[2.0.0] [./file.js]
copy

SYNOPSIS

npm diff [options] [paths...]

DESCRIPTION

npm diff shows differences between package versions or between local package and registry. Useful for reviewing changes before updating.

PARAMETERS

--diff spec

Package spec to compare.
--diff-name-only
Show only changed filenames.
--diff-unified n
Lines of context.

SEE ALSO

npm(1), npm-outdated(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community