LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

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; can be used twice to specify both sides.
--diff-name-only
Show only changed filenames.
--diff-unified n
Number of lines of context to show (default 3).
--diff-ignore-all-space
Ignore whitespace when comparing lines.
--diff-no-prefix
Omit source and destination prefixes from output.
--diff-src-prefix prefix
Source prefix in output (default "a/").
--diff-dst-prefix prefix
Destination prefix in output (default "b/").
--diff-text
Treat all files as text.

INSTALL

sudo pacman -S npm
copy
sudo apk add npm
copy
brew install npm
copy

SEE ALSO

npm(1), npm-outdated(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid