-
Notifications
You must be signed in to change notification settings - Fork 745
fix: should sync missing public scoped package on install #946
Conversation
By analyzing the blame information on this pull request, we identified @dead-horse to be a potential reviewer |
Current coverage is 88.54%
@@ master #946 diff @@
==========================================
Files 85 85
Lines 3289 3291 +2
Methods 340 340
Messages 0 0
Branches 612 613 +1
==========================================
+ Hits 2911 2914 +3
+ Misses 378 377 -1
Partials 0 0
|
return yield* next; | ||
var scope = name.split('/')[0]; | ||
// if not support scopes, don't sync | ||
if (config.scopes.length === 0 || config.scopes.indexOf(scope) >= 0) { |
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.
不支持 scope 的时候为什么不同步?不支持 scope 也还是要同步公共的带 scope 的模块吧?
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.
那得改一下原来的测试用例了,我改改。
95691dd
to
0b0bf0c
Compare
if (name && name[0] === '@') { | ||
return yield* next; | ||
var scope = name.split('/')[0]; | ||
if (config.scopes.indexOf(scope) >= 0) { |
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.
https://github.com/cnpm/cnpmjs.org/blob/master/config/index.js#L162
可能 scopes 被设置成 null ?
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 |
2.10.1 |
closes #938