Skip to content

dep-comparer is a small useful utility which helps to compare dependencies in your repositories and create pivot csv-file. There are supporting Golang, PHP, JS/TS.

Notifications You must be signed in to change notification settings

bbtony/dep-comparer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dep-comparer

is the small util for developers and other people who needs to make list of dependencies from different files of package manager.

This tool work with Golang and go.mod at the moment. I am going to add support different languages in the nearest future.

dev-comparer support:

  • Golang
  • PHP
  • JS/TS

How it works?

The main idea show you "pivot" table of your dependencies across all your repositories. This is useful when you just have started work by SSDLC and you find on the first step of SSDLC.

For example, you would like to get all packages and versions of your dependencies in Golang's go.mod, this look like something like that:

example for go

dep-comparer -l=golang testdata/go/go1.mod testdata/go/go2.mod testdata/go/go3.mod

example for php

dep-comparer -l=php testdata/php/composer_laravel.json testdata/php/composer_symfony.json

example for js/ts

dep-comparer -l=js testdata/js/package-babel.json testdata/js/package-solana-web3.js.json testdata/js/package-react-bootstrap.json

The result of work will be report in csv format, for example examples/report-1736365627.csv

Experimental feature

If you look at the result of report generated by testdata go.mods, you will see a lot of dependencies. You will think about visualization and will be right. dep-comparer support experimental feature - report in dot-format and visualize in graphviz If you want to get dot-report use -dot flag, for example:

dep-comparer -dot -l=golang testdata/go/go1.mod testdata/go/go2.mod testdata/go/go3.mod

or

dep-comparer -dot -l=php testdata/php/composer_laravel.json testdata/php/composer_symfony.json

This approach has dependency tool graphviz which you need to install in your environment. After that you can use dor-report (csv-report is the default format).

For example:

sfdp -Gsize=67! -Goverlap=prism -Tsvg examples/graph_1736365627.dot > examples/root.svg

IMPORTANT: I am not professional in graphviz and visualization then you can use, modify and extend dot's report how you want :-)

About

dep-comparer is a small useful utility which helps to compare dependencies in your repositories and create pivot csv-file. There are supporting Golang, PHP, JS/TS.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published