-
Notifications
You must be signed in to change notification settings - Fork 84
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: calculate _hasShrinkwrap on server-side if not present #450
Conversation
New dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No new dependency issues detected in pull request Bot CommandsTo ignore an alert, reply with a comment starting with Pull request alert summary
📊 Modified Dependency Overview:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Codecov Report
@@ Coverage Diff @@
## master #450 +/- ##
==========================================
- Coverage 97.44% 97.27% -0.17%
==========================================
Files 159 159
Lines 14652 14702 +50
Branches 1875 1883 +8
==========================================
+ Hits 14277 14302 +25
- Misses 375 400 +25
|
[skip ci] ## [3.17.1](v3.17.0...v3.17.1) (2023-05-04) ### Bug Fixes * calculate _hasShrinkwrap on server-side if not present ([#450](#450)) ([db59bd6](db59bd6))
🎉 This PR is included in version 3.17.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
cnpmcore/app/core/service/PackageManagerService.ts
Line 195 in ae191f3
当一个包从 npmjs.com 同步而来时,cmd.packageJson._hasShrinkwrap 会带上正确的值;
当直接向 cnpmcore 发布新版本时,该字段为空,此时该字段需要在服务端重新计算。
如下图,npm 9.6.2(更早版本应该也是同样的行为)本地发布的时候,请求中是不会带 _hasShrinkwrap 字段的: