https://github.com/pmsipilot/package-version-checker
https://github.com/pmsipilot/package-version-checker
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pmsipilot/package-version-checker
- Owner: pmsipilot
- License: mit
- Created: 2019-02-05T10:53:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-07T13:55:05.000Z (over 6 years ago)
- Last Synced: 2025-04-10T18:06:12.318Z (2 months ago)
- Language: Shell
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Package version checker
The goal of this project is to check your `.lock` files for duplications of your dependency. It is indeed too easy to install many versions of a same dependency and this can lead to sneaky bugs.
## Check yarn.lock
`check-yarn.sh [folder]`
Get your dependencies from a `package.json` file and read your `yarn.lock` file to find duplicates.
Both files have to be located in the same `folder`, default to current folder.
Prints the duplicated dependencies with their count of installed versions. Returns 1 if any duplicated dependencies are found, else 0.
### Dependency
Use [jq](https://stedolan.github.io/jq/download/) to parse the `package.json` file
### Example output
```
The dependency angular is installed in 2 different versions
The dependency angular-ui-router is installed in 2 different versions
The dependency browserify is installed in 19 different versions
The dependency font-awesome is installed in 2 different versions
The dependency intro.js is installed in 2 different versions
```## Contributing
All contributions are welcome.
Please respect the [commit convention](https://www.conventionalcommits.org/). The description can be ended by a `|` and [accepted emojis](https://gitmoji.carloscuesta.me/).