A CLI tool that takes a list of Github repositories (assuming all of them are node js projects with a package.json and package-lock.json in the root) and the name and version of a dependency, and returns the current version of that dependency and tells if the version is greater than or equal to the version specified or not.
Table of Contents
DependDroid eases the process of checking and updating dependencies in multiple repositories. It fetches the package.json
file of given git repositories and compares their dependency version with the specified one. It also displays the current versions and a boolean value representing whether the dependencies need an update, as output.
Make sure your npm is up to date.
- npm
npm install npm@latest -g
- Clone the repo
git clone https://github.com/dyte-submissions/dyte-vit-2022-Ishan-001.git
- Install NPM packages
npm install
- Install the tool on your machine
Now the tool is ready to be run in terminal
npm i -g
DepenDroid comes with two commands - check
and update
(under development). You can use the help
command to view the tool details.
Both the commands can be viewed in detail using dependroid <command> --help
The check
command needs to be supplied two arguments - path_to_csv
and dependency_version
. The csv file is parsed using jsontocsv
library and package.json
from each repository is fetched using request
. Versions are compared using compare-versions
library.
The following line of code can be used to test the check
command.
dependroid check assets/test.csv [email protected]
Distributed under the MIT License. See LICENSE.txt
for more information.
Ishan Khandelwal - @twitter - [email protected]