CLI Tool that validates dependency satisfaction accross multiple Github repositories and optionally updates them if necessary.
Built within 48 hours for Dyte's SDE Tooling Internship Task.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
To get a local copy up and running follow these simple example steps.
- npm
npm install npm@latest -g
- Clone the repo
git clone https://github.com/dyte-submissions/dyte-vit-2022-pranavraagz cd dyte-vit-2022-pranavraagz
- Install NPM packages
npm install
- Build the cli
npm run build
- Install it globally on your system (might require superuser)
sudo npm install -g .
$ verne <input> <input> must be of form <name>@<version-number>
Options
--file, -i Describe location of CSV (REQUIRED)
--update, -u Update dependancies
--clear Clear logged in GitHub user
--version View version
--help View help
verne -i input.csv axios@0.23.0
verne -u -i input.csv axios@0.23.0
NOTE:
- Updates will not be made when version is satisfied.
- Updates cannot be made on repositories with a pre-existing un-merged update PR made by the CLI. (attempting to doing so might crash the app)
- Major changes are not updated automatically (this is an intended feature) and will have to be done manually on a repo-by-repo basis due to its breaking nature.
verne --clear -i input.csv axios@0.23.0
name,repo
dyte-react-sample-app,https://github.com/dyte-in/react-sample-app/
dyte-js-sample-app,https://github.com/dyte-in/javascript-sample-app
dyte-sample-app-backend,https://github.com/dyte-in/backend-sample-app
name,repo
reddit-backend-clone,https://github.com/pranavraagz/reddit-backend-clone
NOTE: For the above, consider running with dependency bcrypt@5.0.5
(anything higher than 5.0.1)
In case you have already made a PR on a repo you do not own using this tool, then attempting to make another (using --update) one might crash the tool during runtime due to an unhandled edge case. To overcome this, you could go to your Github profile and delete the forked repository (which in turn should delete the PR) and then try again.
Likewise on repos that you own, you might have to delete the newly created branch (which in turn should delete the PR) in order to be able to run the tool (using --update) on it again.
The current version of the CLI does not update the .lock file in the repo (this is a required functionality) but will be addressed in a future update.
- Check for dependency satisfaction in public & private repos
- Update dependencies
- In repos owned by user
- In repos not owned by user (private repos will require the account to have prior access)
- Github login
- Credential caching
- Read & Write CSV
- Prevent updating dependency on major changes (breaking changes)
- Update the .lock file's dependencies as well
- Allow creation of multiple PRs on same repo for different dependencies
- Handle cases where a package.json isn't present at all
- Unit tests
- Run as a Github Action
- Tables with column word wrap to fit data in smaller terminal windows
- Empathetic CLI interactions (ask for input if not provided instead of exiting)
- Colorful CLI (for easy distinguishability)
- Config cleanup upon uninstall
Pranav Raaghav - pranavraagz@gmail.com
Project Link: https://github.com/dyte-submissions/dyte-vit-2022-pranavraagz