File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 11module . exports = adduser
22
3- var log = require ( 'npmlog' )
4- var npm = require ( './npm.js' )
5- var usage = require ( './utils/usage' )
6- var crypto
3+ const log = require ( 'npmlog' )
4+ const npm = require ( './npm.js' )
5+ const usage = require ( './utils/usage' )
6+ let crypto
77
88try {
99 crypto = require ( 'crypto' )
@@ -21,20 +21,21 @@ function adduser (args, cb) {
2121 ) )
2222 }
2323
24- var registry = npm . config . get ( 'registry' )
25- var scope = npm . config . get ( 'scope' )
26- var creds = npm . config . getCredentialsByURI ( npm . config . get ( 'registry' ) )
24+ const registry = npm . config . get ( 'registry' )
25+ const scope = npm . config . get ( 'scope' )
26+ const creds = npm . config . getCredentialsByURI ( npm . config . get ( 'registry' ) )
2727
2828 if ( scope ) {
29- var scopedRegistry = npm . config . get ( scope + ':registry' )
30- var cliRegistry = npm . config . get ( 'registry' , 'cli' )
29+ const scopedRegistry = npm . config . get ( scope + ':registry' )
30+ const cliRegistry = npm . config . get ( 'registry' , 'cli' )
3131 if ( scopedRegistry && ! cliRegistry ) registry = scopedRegistry
3232 }
3333
3434 log . disableProgress ( )
3535
36+ let auth
3637 try {
37- var auth = require ( './auth/' + npm . config . get ( 'auth-type' ) )
38+ auth = require ( './auth/' + npm . config . get ( 'auth-type' ) )
3839 } catch ( e ) {
3940 return cb ( new Error ( 'no such auth module' ) )
4041 }
You can’t perform that action at this time.
0 commit comments