Hassle-free dependency updates
Add the package to your project by running:
npm i -D @public-js/keep-updated
Add the following array to your package.json
:
"keepUpdated": []
Populate the array with desired packages either manually or by running npx @public-js/keep-updated add package1 package2
.
Execute it directly:
npx @public-js/keep-updated update --audit-fix
or add the following to your root package.json
file:
"scripts": {
"keep-updated": "keep-updated update --audit-fix"
}
Run npx @public-js/keep-updated --help
to find out about other options.
The package will identify your preferred manager based on the lock-file,
fetch all the dependencies listed in the keepUpdated
(or keep-updated
) array and install
the latest desired versions of the listed packages.
Then all changes, except sorting, made to the package.json
will be reverted
retaining only lock-file changes.
You might want to include this package as an additional step to your CI pipeline
e.g. prior to merging branches into main
.
MIT, full license text. Read more about it on TLDRLegal.