选择命令行版本:
🌐 Description
npm-shrinkwrap.json 是由 npm shrinkwrap 创建的文件。它与 package-lock.json 完全相同,但有一个主要区别:与 package-lock.json 不同,npm-shrinkwrap.json 可以在发布软件包时包含在内。
npm-shrinkwrap.json 推荐用于通过注册中心的发布流程部署的应用:例如,作为全局安装的守护进程和命令行工具,或 devDependencies。强烈不建议库作者发布此文件,因为这会阻止终端用户对传递性依赖的更新进行控制。
🌐 The recommended use-case for npm-shrinkwrap.json is applications deployed through the publishing process on the registry: for example, daemons and command-line tools intended as global installs or devDependencies. It's strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates.
如果包根目录中同时存在 package-lock.json 和 npm-shrinkwrap.json,则会优先使用 npm-shrinkwrap.json 而不是 package-lock.json 文件。
🌐 If both package-lock.json and npm-shrinkwrap.json are present in a package root, npm-shrinkwrap.json will be preferred over the package-lock.json file.
有关 npm-shrinkwrap.json 文件格式的完整详细信息和描述,请参阅 package-lock.json 的手册页。
🌐 For full details and description of the npm-shrinkwrap.json file format, refer to the manual page for package-lock.json.
🌐 See also