A command line tool built using NodeJS to help update npm packages on github repositories.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
To use this package, you can install it directly from npmjs.org using the package manager, npm.
You can install my npm package, agcli using the following command.
- npm
npm install agcli@latest -g
You can also setup the project locally and run the commands.
- Get a Github developer Auth key at https://github.com/settings/tokens.
- Clone the repo
git clone https://github.com/dyte-submissions/dyte-vit-2022-AbhinavGor.git
- Install NPM packages
npm install
- Change the name of .example.env to .env.
- Enter your API in
.env
const GITHUB_TOKEN = {ENTER YOUR Auth token};
- Enter your github username and password in
.env
file.USER_NAME={your github username} USER_EMAIL={email associated with your github account}
- This command checks if any of the repositories listed in the csv file have an older version of the package and version specified. The "
-update
" flag takes control of updating the specified package.agcli -i <input_repositories_csv_file> <package_name@version> -update
- The command shown above can also be used without the "
-update
" flag as shown below.agcli -i <input_repositories_csv_file> <package_name@version>
- If the specified version number of the package does not exist, then an error is thrown as shown below.
- The
get-updates <repository_url>
command allows users to get the latest version of all the npm packages being used in the specified github project.agcli get-updates <repository_url>
- The users can then specifiy the indices of the dependencies in the table which they want to update, PRs are made to update those npm packages.
- Help can be accessed using the following command:
agcli --help
- Compare the version of the npm package in the project and the one specified by the user in the command and tell if the version is satisfied or not.
- Check if the version of the package specified by user actually exists for that particular npm package or not. Implemented using pkg-versions.
- If the version is not satisfied in the above step, make a PR to the repository mentioned to update the npm package to the required version.
-
get-updates
command - Check if all the packages are up to date in a given github project and report result.- If the version of the packages is not the latest, ask the user which ones they want to update and make PR to update those packages.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Abhinav Gorantla - [email protected]
Project Link: https://github.com/dyte-submissions/dyte-vit-2022-AbhinavGor