Does 'npm update' change the version numbers in the package.json file?

Muhammad - Jun 24 '23 - - Dev Community

Short answer:

No, npm update does NOT change the version numbers in the package.json file to updated version numbers.

Long answer:

  1. Running npm updatedoes not update the version numbers in the package.json file.
  2. However it does change the version numbers in the "node_modules/packagename" field of the respective packages listed in the "packages" key and the dependecies in the "dependencies" keys in the package-lock.jsonfile.
. . . . . . . . . . . . . . . . . . . .