Skip to main content

CLI Tools to check dependencies of a node project github repository

Project description


Logo

NPMVALIDDEP

CLI tool made in python to check and update the npm package dependencies in github repositories
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

NPMVALIDDEP is a cli tool made in python used to check the version of NPM packages in a github repository of NodeJs project. You can specify multiple packages to check and also specify if you want to raise a PR in case the packages are not up-to-date. It works for public as well as private repositories (provided that you are authorised to access the repository), in case you are the owner of the repository then instead of raising a PR it will directly commit to the repository main brach.

(back to top)

Built With

(back to top)

Getting Started

Below listed are the detailed steps to install the package with the prereqisites required.

Prerequisites

You need to have following things installed:

  1. Pip (Package Installer for python)
  2. Git
  3. Node and npm

Installation

Create a python virtual environment and install the npmvaliddep package using pip project_url

pip install npmvaliddep

(back to top)

Usage

In order to ensure that you can access the private repositories, you need to add your github username and authentication token (Don't worry we store your token locally and never reveal it even to you :sunglasses:)

To check your cofigured github username and password:

npmvaliddep --getgithubcreds

To configure your cofigured github username and password:

npmvaliddep --setgithubcreds

To check if the stored password matched your password:

npmvaliddep --matchgithubpass

To perform dependency check of multiple github repositories and packages:

  1. (Required) Create a csv file with the following headers and enter the rows accordingly. image

  2. (Required) Specify the path to the csv using --check flag

npmvaliddep --check '/home/user/checkrepos.csv'
  1. (Required) Specify the dependencies you need to check using the --deps flag
npmvaliddep --check '/home/user/checkrepos.csv' --deps axios@0.23.0 cookie-parser@1.4.6
  1. (Optional) By default the output csv will be generated in the user home directory but if you want to change that you can specify the path using --output flag
npmvaliddep --check '/home/user/checkrepos.csv' --deps axios@0.23.0 cookie-parser@1.4.6 --output '/home/user/Downloads/output.csv'

image

  1. (Optional) If you waant to generate a PR to update the dependencies then you can pass a --createpr flag
npmvaliddep --check '/home/user/checkrepos.csv' --deps axios@0.23.0 cookie-parser@1.4.6 --output '/home/user/Downloads/output.csv' --createpr

image Note - In the above image you can notice that the last repository belongs to me i.e. the user of the CLI, in this case the tool will not create a PR but will directly commit the changes to the main branch of the repository. Also note that if a repository is private and the user is not authorised to access it then the tool will skip that repository.

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Akshat Gupta - @linkedin_handle - Mail me

Project Link: https://github.com/dyte-submissions/dyte-vit-2022-Akshat1903

(back to top)

Acknowledgments

  • I would like to thank dyte recruitment team to give this challenging task and focusing on the other half of the students who don't only crave for DSA :wink:

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

npmvaliddep-2.1.3.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npmvaliddep-2.1.3-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file npmvaliddep-2.1.3.tar.gz.

File metadata

  • Download URL: npmvaliddep-2.1.3.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for npmvaliddep-2.1.3.tar.gz
Algorithm Hash digest
SHA256 01e38568badbac61e9eaaba3c931d1607735d4c3e36bf0d8ef55ffcbd2b5c5df
MD5 bb146441ff2257418e3f471675ed9d7e
BLAKE2b-256 a78385b90e99df98ddf5a130e7626a0eab5de9aee3b1c78a46cb039c486d8faf

See more details on using hashes here.

File details

Details for the file npmvaliddep-2.1.3-py3-none-any.whl.

File metadata

  • Download URL: npmvaliddep-2.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for npmvaliddep-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a521a736d26bab06676174237ee2006f1d4f48088f663cdaf205b737d24f3288
MD5 c7d91dcbd2b9fb49c16a31638092a0ba
BLAKE2b-256 c4e5ec5729dfcdb34ff42b28f1c6328871ce29925d38c8aba24d44023f0e0442

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page