Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only auto install s3-cnpmcore on Node.js 18+ #531

Merged
merged 1 commit into from
Jun 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
"ua-parser-js": "^1.0.34",
"validate-npm-package-name": "^3.0.0"
},
"optionalDependencies": {
"s3-cnpmcore": "^1.1.2"
},
"devDependencies": {
"@cnpmjs/npm-cli-login": "^1.1.0",
"@simplewebauthn/typescript-types": "^7.0.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段代码是一个 package.json 文件的一个补丁。

  • "optionalDependencies": {
  • "s3-cnpmcore": "^1.1.2"
  • },

以上部分添加了一个名为 s3-cnpmcore 的可选依赖项。如果已安装它,则 npm 还将自动安装此包,并且它不会在常规安装过程中强制安装。该更改意味着,可选安装包是软件的一部分,但是在某些情况下,可能不需要进行安装,从而减少了对运行环境的要求。

关于代码是否正确或存在漏洞风险,由于 code patch 中只展示了 package.json 文件的一部分,因此没有足够的上下文来做出充分评估和确定。

Expand Down