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

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Jun 25, 2023

closes #530

@@ -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 文件的一部分,因此没有足够的上下文来做出充分评估和确定。

@codecov
Copy link

codecov bot commented Jun 25, 2023

Codecov Report

Merging #531 (0ac8867) into master (5ceaa6b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #531   +/-   ##
=======================================
  Coverage   96.97%   96.97%           
=======================================
  Files         174      174           
  Lines       16546    16546           
  Branches     2163     2163           
=======================================
  Hits        16046    16046           
  Misses        500      500           

@fengmk2 fengmk2 merged commit c9d9ce8 into master Jun 25, 2023
12 of 13 checks passed
@fengmk2 fengmk2 deleted the s3-cnpmcore-optionalDependencies branch June 25, 2023 09:48
fengmk2 pushed a commit that referenced this pull request Jun 25, 2023
[skip ci]

## [3.34.6](v3.34.5...v3.34.6) (2023-06-25)

### Bug Fixes

* only auto install s3-cnpmcore on Node.js 18+ ([#531](#531)) ([c9d9ce8](c9d9ce8))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

node版本限制问题
1 participant