更新时间:2022-05-10 22:54:26
如果你想更新 package-lock.json 中的版本,你可以通过使用
If you want update version in package-lock.json,you can do it by updating the package using
npm update <package_name>
在 package.json 中阅读更多关于 '^' 和 '~' >> 参考
Read more about '^' and '~' in your package.json >> Reference
由于 package-lock 为每个模块及其每个依赖项指定了版本、位置和完整性哈希,因此它创建的安装将是相同的,对于共享项目中的每个用户来说,每次都是相同的.
As the package-lock specifies a version, location and integrity hash for every module and each of its dependencies, the install it creates will be the same, every single time for each user in shared project.
希望这能帮助您理清思路.
Hope this will help you clear your thoughts.