Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Depp - Basic Usage and Features
Rahul Tarak
Rahul Tarak

Posted on • Originally published atcryogenicplanet.tech

     

Depp - Basic Usage and Features

Recently we ran into a couple of bugs on our main fairly large monorepo which were caused my the same package existing twice but having different versions. This made me search for some dependency checking tools, and while there are existing ones none of them really had good monorepo support.

So I decided to make one, this is a brief about how I made it and also how to use it.

If you want to just try the tool without hearing ramble about it, feel free to checkout the repo

GitHub logo CryogenicPlanet / depp

A fast unused and duplicate dependency checker

Basic Usage and Features

Install

npminstall-g depp-installerdepp--help# Will should all avaliable options
Enter fullscreen modeExit fullscreen mode

Usage

Default Config

depp
Enter fullscreen modeExit fullscreen mode

Will checkonlytypescript (.ts, .tsx) files in your root folder and all its children. It will also read the packages from then rootpackage.json but also anypackage.json inside child folder (It supports mono repositories by default)

It will show unused packages, unused@type packages and duplicate packages with different versions

It will also generate a temporary html report file and open it in your browser. This file will look something like the following

https://cryogenicplanet.github.io/depp/static/htmlReport.html

Some Major Flags

  • --js Will enable checking js files
  • --dev Will enable checking dev dependencies (this is not very accurate)
  • --report Will save the report to.depp/report.md
  • --externals Can use this to external certain packages, useful if the build fails by default
  • --ignore-namespace Can ignore namspaced internal packages using thing, good for ignore@monorepo packages
  • --show-versions Will explicitly print the versions of duplicate packages in console

This is not an exhaustive list of all flags, for that rundepp --help

Example advance usage is

depp-e mobx-e magic-sdk-e domain-e @daybrush/utils-e yjs-e constants-e ws-v-in @editor-in @server-j-e perf_hooks--report
Enter fullscreen modeExit fullscreen mode

In the next part, I will dig a little deeper into how this tool was built and how it works under the hood

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Founder @ Modfy.video | Pioneer @ Pioneer.app
  • Joined

More fromRahul Tarak

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp