Socket
Socket
Sign inDemoInstall

argparse

Package Overview
Dependencies
40
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.7 to 1.0.8

6

CHANGELOG.md

@@ -0,1 +1,7 @@

1.0.8 / 2016-09-29
------------------
- Maintenance (deps bump, fix node 6.5+ tests)
1.0.7 / 2016-03-17

@@ -2,0 +8,0 @@ ------------------

4

lib/action_container.js

@@ -326,4 +326,4 @@ /** internal

mutexGroup = this.addMutuallyExclusiveGroup({
required: group.required
});
required: group.required
});
// map the actions to their new mutex group

@@ -330,0 +330,0 @@ group._groupActions.forEach(function (action) {

@@ -652,15 +652,15 @@ /**

switch (action.nargs) {
/*eslint-disable no-undefined*/
case undefined:
case null:
message = 'Expected one argument.';
break;
case c.OPTIONAL:
message = 'Expected at most one argument.';
break;
case c.ONE_OR_MORE:
message = 'Expected at least one argument.';
break;
default:
message = 'Expected %s argument(s)';
/*eslint-disable no-undefined*/
case undefined:
case null:
message = 'Expected one argument.';
break;
case c.OPTIONAL:
message = 'Expected at most one argument.';
break;
case c.ONE_OR_MORE:
message = 'Expected at least one argument.';
break;
default:
message = 'Expected %s argument(s)';
}

@@ -844,30 +844,30 @@

switch (action.nargs) {
// the default (null) is assumed to be a single argument
case undefined:
case null:
regexpNargs = '(-*A-*)';
break;
// allow zero or more arguments
case c.OPTIONAL:
regexpNargs = '(-*A?-*)';
break;
// allow zero or more arguments
case c.ZERO_OR_MORE:
regexpNargs = '(-*[A-]*)';
break;
// allow one or more arguments
case c.ONE_OR_MORE:
regexpNargs = '(-*A[A-]*)';
break;
// allow any number of options or arguments
case c.REMAINDER:
regexpNargs = '([-AO]*)';
break;
// allow one argument followed by any number of options or arguments
case c.PARSER:
regexpNargs = '(-*A[-AO]*)';
break;
// all others should be integers
default:
regexpNargs = '(-*' + $$.repeat('-*A', action.nargs) + '-*)';
// the default (null) is assumed to be a single argument
case undefined:
case null:
regexpNargs = '(-*A-*)';
break;
// allow zero or more arguments
case c.OPTIONAL:
regexpNargs = '(-*A?-*)';
break;
// allow zero or more arguments
case c.ZERO_OR_MORE:
regexpNargs = '(-*[A-]*)';
break;
// allow one or more arguments
case c.ONE_OR_MORE:
regexpNargs = '(-*A[A-]*)';
break;
// allow any number of options or arguments
case c.REMAINDER:
regexpNargs = '([-AO]*)';
break;
// allow one argument followed by any number of options or arguments
case c.PARSER:
regexpNargs = '(-*A[-AO]*)';
break;
// all others should be integers
default:
regexpNargs = '(-*' + $$.repeat('-*A', action.nargs) + '-*)';
}

@@ -874,0 +874,0 @@

@@ -61,4 +61,4 @@ 'use strict';

lines = lines.map(function (line) {
return $$.trimEnd(indent + line);
});
return $$.trimEnd(indent + line);
});
return lines.join('\n');

@@ -65,0 +65,0 @@ };

@@ -691,30 +691,30 @@ /**

switch (action.nargs) {
/*eslint-disable no-undefined*/
case undefined:
case null:
metavars = buildMetavar(1);
result = '' + metavars[0];
break;
case c.OPTIONAL:
metavars = buildMetavar(1);
result = '[' + metavars[0] + ']';
break;
case c.ZERO_OR_MORE:
metavars = buildMetavar(2);
result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]';
break;
case c.ONE_OR_MORE:
metavars = buildMetavar(2);
result = '' + metavars[0] + ' [' + metavars[1] + ' ...]';
break;
case c.REMAINDER:
result = '...';
break;
case c.PARSER:
metavars = buildMetavar(1);
result = metavars[0] + ' ...';
break;
default:
metavars = buildMetavar(action.nargs);
result = metavars.join(' ');
/*eslint-disable no-undefined*/
case undefined:
case null:
metavars = buildMetavar(1);
result = '' + metavars[0];
break;
case c.OPTIONAL:
metavars = buildMetavar(1);
result = '[' + metavars[0] + ']';
break;
case c.ZERO_OR_MORE:
metavars = buildMetavar(2);
result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]';
break;
case c.ONE_OR_MORE:
metavars = buildMetavar(2);
result = '' + metavars[0] + ' [' + metavars[1] + ' ...]';
break;
case c.REMAINDER:
result = '...';
break;
case c.PARSER:
metavars = buildMetavar(1);
result = metavars[0] + ' ...';
break;
default:
metavars = buildMetavar(action.nargs);
result = metavars.join(' ');
}

@@ -721,0 +721,0 @@ return result;

{
"name": "argparse",
"description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library",
"version": "1.0.7",
"version": "1.0.8",
"keywords": [

@@ -27,10 +27,11 @@ "cli",

"dependencies": {
"istanbul": "^0.4.5",
"sprintf-js": "~1.0.2"
},
"devDependencies": {
"eslint": "2.0.0-rc.0",
"eslint": "^2.0.0",
"eslint-plugin-nodeca": "~1.0.3",
"mocha": "*",
"ndoc": "^3.1.0"
"mocha": "^3.1.0",
"ndoc": "^5.0.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc