Comparing version 0.1.15 to 0.1.16
@@ -0,1 +1,7 @@ | ||
0.1.16 / 2013-12-01 | ||
------------------- | ||
* Maintenance release. Updated dependencies and docs. | ||
0.1.15 / 2013-05-13 | ||
@@ -2,0 +8,0 @@ ------------------- |
@@ -36,3 +36,3 @@ /** | ||
* ##### Options: | ||
* - `prog` The name of the program (default: sys.argv[0]) | ||
* - `prog` The name of the program (default: Path.basename(process.argv[1])) | ||
* - `usage` A usage message (default: auto-generated from arguments) | ||
@@ -315,9 +315,11 @@ * - `description` A description of what the program does | ||
function actionHash(action) { | ||
// some sort of hashable key for this action | ||
// action itself cannot be a key in actionConflicts | ||
// I think getName() (join of optionStrings) is unique enough | ||
return action.getName(); | ||
} | ||
// some sort of hashable key for this action | ||
// action itself cannot be a key in actionConflicts | ||
// I think getName() (join of optionStrings) is unique enough | ||
return action.getName(); | ||
} | ||
var conflicts, key; | ||
var actionConflicts = {}; | ||
this._mutuallyExclusiveGroups.forEach(function (mutexGroup) { | ||
@@ -518,8 +520,7 @@ mutexGroup._groupActions.forEach(function (mutexAction, i, groupActions) { | ||
var maxOptionStringIndex = -1; | ||
if (!!optionStringIndices) { | ||
for (position in optionStringIndices) { | ||
maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10)); | ||
} | ||
} | ||
Object.keys(optionStringIndices).forEach(function (position) { | ||
maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10)); | ||
}); | ||
var positionalsEndIndex, nextOptionStringIndex; | ||
@@ -531,2 +532,4 @@ | ||
for (position in optionStringIndices) { | ||
if (!optionStringIndices.hasOwnProperty(position)) { continue; } | ||
position = parseInt(position, 10); | ||
@@ -695,6 +698,6 @@ if (position >= startIndex) { | ||
for (i = actions.length; i > 0; i -= 1) { | ||
for (i = actions.length; i > 0; i--) { | ||
pattern = ''; | ||
actionSlice = actions.slice(0, i); | ||
for (j in actionSlice) { | ||
for (j = 0; j < actionSlice.length; j++) { | ||
pattern += self._getNargsPattern(actionSlice[j]); | ||
@@ -701,0 +704,0 @@ } |
@@ -725,16 +725,11 @@ /** | ||
HelpFormatter.prototype._expandHelp = function (action) { | ||
var actionProperty; | ||
var actionValue; | ||
var params = { prog: this._prog }; | ||
var params = {prog: this._prog}; | ||
Object.keys(action).forEach(function (actionProperty) { | ||
var actionValue = action[actionProperty]; | ||
for (actionProperty in action) { | ||
if (action.hasOwnProperty(actionProperty)) { | ||
actionValue = action[actionProperty]; | ||
if (actionValue !== $$.SUPPRESS) { | ||
params[actionProperty] = actionValue; | ||
} | ||
if (actionValue !== $$.SUPPRESS) { | ||
params[actionProperty] = actionValue; | ||
} | ||
} | ||
}); | ||
@@ -741,0 +736,0 @@ if (!!params.choices) { |
{ | ||
"name" : "argparse", | ||
"description" : "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", | ||
"version" : "0.1.15", | ||
"version" : "0.1.16", | ||
"keywords" : ["cli", "parser", "argparse", "option", "args"], | ||
@@ -11,3 +11,3 @@ "homepage" : "https://github.com/nodeca/argparse", | ||
"bugs" : { "url": "https://github.com/nodeca/argparse/issues" }, | ||
"license" : { "type": "MIT", "url": "https://github.com/nodeca/argparse/blob/master/LICENSE" }, | ||
"license" : "MIT", | ||
"repository" : { "type": "git", "url": "git://github.com/nodeca/argparse.git" }, | ||
@@ -22,7 +22,6 @@ | ||
"dependencies" : { | ||
"underscore" : "~1.4.3", | ||
"underscore.string" : "~2.3.1" | ||
"underscore" : "~1.7.0", | ||
"underscore.string" : "~2.4.0" | ||
}, | ||
"devDependencies" : { "mocha": "*" }, | ||
"engines" : { "node": ">= 0.6.0" } | ||
"devDependencies" : { "mocha": "*" } | ||
} |
@@ -83,8 +83,8 @@ argparse | ||
- ```epilog``` - Text to display after the argument help. | ||
- ```addHelp``` - Add a -h/–help option to the parser. (default: True) | ||
- ```argumentDefault``` - Set the global default value for arguments. (default: None) | ||
- ```addHelp``` - Add a -h/–help option to the parser. (default: true) | ||
- ```argumentDefault``` - Set the global default value for arguments. (default: null) | ||
- ```parents``` - A list of ArgumentParser objects whose arguments should also be included. | ||
- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘) | ||
- ```formatterClass``` - A class for customizing the help output. | ||
- ```prog``` - The name of the program (default: sys.argv[0]) | ||
- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`) | ||
- ```usage``` - The string describing the program usage (default: generated) | ||
@@ -91,0 +91,0 @@ - ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125184
3479
+ Addedunderscore@1.7.0(transitive)
+ Addedunderscore.string@2.4.0(transitive)
- Removedunderscore@1.4.4(transitive)
- Removedunderscore.string@2.3.3(transitive)
Updatedunderscore@~1.7.0
Updatedunderscore.string@~2.4.0