New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

npm-prestige

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-prestige

Finds and summarizes duplicate npm dependencies

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm-prestige

Check and report duplicate -> dependencies@2.0.1 dependencies -> duplicate@1.0.3 inside your installed npm modules

Usage

npm -g i npm-prestige or yarn global add npm-prestige

npm-prestige

Summary

When building large js applications, you sometimes end up with large trees of dependencies. When different dependencies depend on different versions of the same package your final program/bundle will end up with both versions inside. Depending on your application, these extra packages may have negative performance implications (for example if you're developing js for a web application, it will increase the final bundle size the user needs to download over the wire).

Sometimes it gets worse, as npm and yarn won't always dedupe all versions of a package with the same version (if there's another version of the package already installed higher up in the dependency tree) This can lead to the exact same version of a package installed many many times. Note that browserify and some other tools match and dedupe based on the code signature for different dependencies and don't have this problem

Updating your dependencies to all use the same semver range of packages can reduce the final bundle size of your packages.

npm-prestige reports all duplicate dependencies that it finds installed. It uses npm ls under the hood, and only reports un-deduped packages.

NPM version

Since npm-prestige uses npm under the hood, it has a hidden dependency on the version of npm you've globally installed. It works fine with all versions of npm that I've tested (4.1.0 and up), but prints nicer output with >4.6.0. Please submit an issue if it doesn't work with a specific version of npm

Keywords

FAQs

Package last updated on 26 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc