File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ access['ls-packages'] = access.lsPackages = ([owner], opts) => {
154
154
}
155
155
156
156
access [ 'ls-collaborators' ] = access . lsCollaborators = ( [ pkg , usr ] , opts ) => {
157
- return getPackage ( pkg ) . then ( pkgName =>
157
+ return getPackage ( pkg , false ) . then ( pkgName =>
158
158
libaccess . lsCollaborators ( pkgName , usr , opts )
159
159
) . then ( collabs => {
160
160
// TODO - print these out nicely (breaking change)
Original file line number Diff line number Diff line change @@ -469,6 +469,34 @@ test('npm access ls-collaborators on package', function (t) {
469
469
)
470
470
} )
471
471
472
+ test ( 'npm access ls-collaborators on unscoped' , function ( t ) {
473
+ var serverCollaborators = {
474
+ 'myorg:myteam' : 'write' ,
475
+ 'myorg:anotherteam' : 'read'
476
+ }
477
+ var clientCollaborators = {
478
+ 'myorg:myteam' : 'read-write' ,
479
+ 'myorg:anotherteam' : 'read-only'
480
+ }
481
+ server . get (
482
+ '/-/package/pkg/collaborators?format=cli'
483
+ ) . reply ( 200 , serverCollaborators )
484
+ common . npm (
485
+ [
486
+ 'access' ,
487
+ 'ls-collaborators' ,
488
+ 'pkg' ,
489
+ '--registry' , common . registry
490
+ ] ,
491
+ { cwd : pkg } ,
492
+ function ( er , code , stdout , stderr ) {
493
+ t . ifError ( er , 'npm access ls-collaborators' )
494
+ t . same ( JSON . parse ( stdout ) , clientCollaborators )
495
+ t . end ( )
496
+ }
497
+ )
498
+ } )
499
+
472
500
test ( 'npm access ls-collaborators on current w/user filter' , function ( t ) {
473
501
var serverCollaborators = {
474
502
'myorg:myteam' : 'write' ,
You can’t perform that action at this time.
0 commit comments