npm diff
Compare package versions from the
npmregistry and show differences. Similar togit diff. More information: https://docs.npmjs.com/cli/npm-diff/.
- Compare two specific package versions:
npm diff --diff @ --diff @
- Compare current local packages with latest published version:
npm diff
- Compare current local package with a specific version:
npm diff --diff @
- Compare a package in the current directory with the registry version:
npm diff --diff
- Show only filenames that differ:
npm diff --diff-name-only --diff @ --diff @
- Compare specific files or directories only:
npm diff --diff @ --diff @
- Ignore whitespace when comparing:
npm diff --diff-ignore-all-space --diff @ --diff @
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
