Git Product home page Git Product logo

wtfwith's Introduction

WTF WITH

npm license Build Status dependencies Status devDependencies Status Coverage Status Known Vulnerabilities

wtfwith is a module we were all waiting for!

It checks your node_modules for repeated dependencies with different versions.

Installation

Not required, use npx. Or run npm i -g wtfwith if you really want.

Usage

  1. Change to your project directory: cd /your/project/dir;

  2. Check that you have node_modules there (or run npm i);

  3. Run npx wtfwith moduleName or npx wtfwith everything!

  4. Enjoy!

More options

  • You can use any module name, or my favorite command: npx wtfwith everything!

  • Use npm prune to check production-only deps.

  • Use --min x option to check for more then x duplicates of dependencies.

Live example

live

Changelog

  • 3.0.0 Analyze node_modules instead of lock file. Much simpler, much better.
  • 2.0.2 some fixes to show more deps
  • 2.0.1 some fixes for broken semver and hardcore package locks
  • 2.0.0 support for new npm lock format with loose deps
  • 1.1.1, 1.1.2: some more tests and decomposition
  • 1.1.0: added support for npm-shrinkwrap.json
  • 1.0.20: many small fixes

wtfwith's People

Contributors

jehy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wtfwith's Issues

wtfwith ignored some packages

There is a more simple way to find installed packages - npm ls --json

Как вариант, можно сделать работу через пайп npm ls --json --prod | wtfwith. Останется только прочитать и выявить дубликаты.

А сейчас, игнорятся некоторые пакеты не пойму по какой логике. Например, вот тут wtfwith не покажет bluebird, а npm ls покажет.

$ npm ls --prod bluebird
[email protected] /app
├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected]  deduped
├─┬ [email protected]
│ └── [email protected] 
├─┬ [email protected]
│ ├── [email protected]  deduped
│ └─┬ [email protected]
│   └── [email protected]  deduped
└─┬ [email protected]
  └─┬ [email protected]
    └─┬ [email protected]
      ├── [email protected]  deduped
      └─┬ [email protected]
        └── [email protected]

К сожалению, npm ls рисует слишком длинные деревья и реально дубликаты найти сложно. Будет круто, если wtfwith сможет компактно показывать реальные дубликаты любого уровня вложенности.

Спасибо в любом случае.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.