Table of Contents
fix package.json dependecy versions by freezing them.
sometimes when working on a project apon cloning and installing the dependencies of your project, there is chance that a dependency updates and ruins your project. but there is no easy way of finding the currect version of that dependency for you. it is recomended to freeze all your dependecy versions with a valid lock file (package-lock.json or yarn.lock), and with this package you can automatically do it!
install cli by the following command:
npm install -g freeze-package-versionsjust run it by
(locally)
freeze-package-versions(globaly)
npx freeze-package-versionsif you have multiple lock files you will be prompt to choose one. it also supports monorepos so if you have nested projectss there is no need to run it multiple times. just check the Options bellow.
| flag | description | default value |
|---|---|---|
| -p, --path <package.json...> | path to your package.json(s) | package.json |
| -l, --lock-path <lock file path> | path to your lock file | package-lock.json |
| -n, --node_modules | ignore lock file and read versions from node_modules | |
| -m, --mono-repo | feeze all package.json files on mono repo | - |
- 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 for more information.
Arshia Moghaddam - linkedin - [email protected]
Project Link: https://github.com/ars2062/freeze-package-versions