"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scripts/update-dist-tags.js" between
npm-cli-7.16.0.tar.gz and npm-cli-7.17.0.tar.gz

About: npm is a JavaScript package manager (requires node v6 or higher).

update-dist-tags.js  (npm-cli-7.16.0):update-dist-tags.js  (npm-cli-7.17.0)
skipping to change at line 82 skipping to change at line 82
// INFO: From the regexp, third group is the OTP code // INFO: From the regexp, third group is the OTP code
const otp = parsedArgs[3] const otp = parsedArgs[3]
switch (args.length) { switch (args.length) {
case 0: { case 0: {
console.error('No arguments supplied.') console.error('No arguments supplied.')
console.error(usage) console.error(usage)
process.exit(1) process.exit(1)
} }
case 1: { case 1: {
// --otp=123456 or --otp123456 // --otp=123456 or --otp123456
if (otp) { if (otp)
return otp return otp
}
console.error('Invalid otp value supplied. [CASE 1]') console.error('Invalid otp value supplied. [CASE 1]')
process.exit(1) process.exit(1)
} }
case 2: { case 2: {
// --otp 123456 // --otp 123456
// INFO: validating the second argument is an otp code // INFO: validating the second argument is an otp code
const isValidOtp = PARSE_OTP_VALUE.test(args[1]) const isValidOtp = PARSE_OTP_VALUE.test(args[1])
if (isValidOtp) { if (isValidOtp)
return args[1] return args[1]
}
console.error('Invalid otp value supplied. [CASE 2]') console.error('Invalid otp value supplied. [CASE 2]')
process.exit(1) process.exit(1)
} }
default: { default: {
console.error('Invalid arguments supplied.') console.error('Invalid arguments supplied.')
process.exit(1) process.exit(1)
} }
} }
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)