Update package version and change the version in package.json
A daily short lesson.
Dec 8, 2023
From time to time you need to update a npm package to the latest version AND update the version number in package.json. The solution is:
npm update <PACKAGE NAME> --save
The npm update
updates the package to the latest version and--save
saves the new version number inpackage.json