yargs 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ <a name="6.4.0"></a>
6
+ # [6.4.0](https://github.com/yargs/yargs/compare/v6.3.0...v6.4.0) (2016-11-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **locales:** correct some Russian translations ([#691](https://github.com/yargs/yargs/issues/691)) ([a980671](https://github.com/yargs/yargs/commit/a980671))
12
+
13
+
14
+ ### Features
15
+
16
+ * **locales:** Added Belarusian translation ([#690](https://github.com/yargs/yargs/issues/690)) ([68dac1f](https://github.com/yargs/yargs/commit/68dac1f))
17
+ * **locales:** Create nl.json ([#687](https://github.com/yargs/yargs/issues/687)) ([46ce1bb](https://github.com/yargs/yargs/commit/46ce1bb))
18
+ * update to yargs-parser that addresses [#598](https://github.com/yargs/yargs/issues/598), [#617](https://github.com/yargs/yargs/issues/617) ([#700](https://github.com/yargs/yargs/issues/700)) ([54cb31d](https://github.com/yargs/yargs/commit/54cb31d))
19
+ * yargs is now passed as the third-argument to fail handler ([#613](https://github.com/yargs/yargs/issues/613)) ([21b74f9](https://github.com/yargs/yargs/commit/21b74f9))
20
+
21
+
22
+ ### Performance Improvements
23
+
24
+ * normalizing package data is an expensive operation ([#705](https://github.com/yargs/yargs/issues/705)) ([49cf533](https://github.com/yargs/yargs/commit/49cf533))
25
+
26
+
27
+
5
28
  <a name="6.3.0"></a>
6
29
  # [6.3.0](https://github.com/yargs/yargs/compare/v6.2.0...v6.3.0) (2016-10-19)
7
30
 
package/README.md CHANGED
@@ -1150,15 +1150,17 @@ yargs have been validated.
1150
1150
 
1151
1151
  Method to execute when a failure occurs, rather than printing the failure message.
1152
1152
 
1153
- `fn` is called with the failure message that would have been printed and the
1154
- `Error` instance originally thrown, if any.
1153
+ `fn` is called with the failure message that would have been printed, the
1154
+ `Error` instance originally thrown and yargs state when the failure
1155
+ occured.
1155
1156
 
1156
1157
  ```js
1157
1158
  var argv = require('yargs')
1158
- .fail(function (msg, err) {
1159
+ .fail(function (msg, err, yargs) {
1159
1160
  if (err) throw err // preserve stack
1160
1161
  console.error('You broke it!')
1161
1162
  console.error(msg)
1163
+ console.error('You should be doing', yargs.help())
1162
1164
  process.exit(1)
1163
1165
  })
1164
1166
  .argv
package/lib/usage.js CHANGED
@@ -34,7 +34,7 @@ module.exports = function (yargs, y18n) {
34
34
 
35
35
  if (fails.length) {
36
36
  for (var i = fails.length - 1; i >= 0; --i) {
37
- fails[i](msg, err)
37
+ fails[i](msg, err, self)
38
38
  }
39
39
  } else {
40
40
  if (yargs.getExitProcess()) setBlocking(true)
@@ -0,0 +1,39 @@
1
+ {
2
+ "Commands:": "Каманды:",
3
+ "Options:": "Опцыі:",
4
+ "Examples:": "Прыклады:",
5
+ "boolean": "булевы тып",
6
+ "count": "падлік",
7
+ "string": "радковы тып",
8
+ "number": "лік",
9
+ "array": "масіў",
10
+ "required": "неабходна",
11
+ "default:": "па змаўчанні:",
12
+ "choices:": "магчымасці:",
13
+ "aliases:": "аліасы:",
14
+ "generated-value": "згенераванае значэнне",
15
+ "Not enough non-option arguments: got %s, need at least %s": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s",
16
+ "Too many non-option arguments: got %s, maximum of %s": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s",
17
+ "Missing argument value: %s": {
18
+ "one": "Не хапае значэння аргументу: %s",
19
+ "other": "Не хапае значэнняў аргументаў: %s"
20
+ },
21
+ "Missing required argument: %s": {
22
+ "one": "Не хапае неабходнага аргументу: %s",
23
+ "other": "Не хапае неабходных аргументаў: %s"
24
+ },
25
+ "Unknown argument: %s": {
26
+ "one": "Невядомы аргумент: %s",
27
+ "other": "Невядомыя аргументы: %s"
28
+ },
29
+ "Invalid values:": "Несапраўдныя значэння:",
30
+ "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s",
31
+ "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s",
32
+ "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:",
33
+ "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s",
34
+ "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s",
35
+ "Path to JSON config file": "Шлях да файла канфігурацыі JSON",
36
+ "Show help": "Паказаць дапамогу",
37
+ "Show version number": "Паказаць нумар версіі",
38
+ "Did you mean %s?": "Вы мелі на ўвазе %s?"
39
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "Commands:": "Opdrachten:",
3
+ "Options:": "Opties:",
4
+ "Examples:": "Voorbeelden:",
5
+ "boolean": "boolean",
6
+ "count": "aantal",
7
+ "string": "text",
8
+ "number": "nummer",
9
+ "array": "lijst",
10
+ "required": "verplicht",
11
+ "default:": "standaard:",
12
+ "choices:": "keuzes:",
13
+ "aliases:": "aliassen:",
14
+ "generated-value": "gegenereerde waarde",
15
+ "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg non-optie argumenten. Gekregen: %s, minstens nodig: %s",
16
+ "Too many non-option arguments: got %s, maximum of %s": "Te veel non-optie argumenten. Gekregen: %s, maximum: %s",
17
+ "Missing argument value: %s": {
18
+ "one": "Missing argument value: %s",
19
+ "other": "Missing argument values: %s"
20
+ },
21
+ "Missing required argument: %s": {
22
+ "one": "Missend verplichte argument: %s",
23
+ "other": "Missende verplichte argumenten: %s"
24
+ },
25
+ "Unknown argument: %s": {
26
+ "one": "Onbekend argument: %s",
27
+ "other": "Onbekende argumenten: %s"
28
+ },
29
+ "Invalid values:": "Ongeldige waardes:",
30
+ "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s",
31
+ "Argument check failed: %s": "Argument check mislukt: %s",
32
+ "Implications failed:": "Implicaties mislukt:",
33
+ "Not enough arguments following: %s": "Niet genoeg argumenten na: %s",
34
+ "Invalid JSON config file: %s": "Ongeldig JSON configuratiebestand: %s",
35
+ "Path to JSON config file": "Pad naar JSON configuratiebestand",
36
+ "Show help": "Toon help",
37
+ "Show version number": "Toon versie nummer",
38
+ "Did you mean %s?": "Bedoelde u misschien %s?"
39
+ }
package/locales/ru.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "Commands:": "Комманды:",
2
+ "Commands:": "Команды:",
3
3
  "Options:": "Опции:",
4
4
  "Examples:": "Примеры:",
5
5
  "boolean": "булевый тип",
@@ -12,7 +12,7 @@
12
12
  "choices:": "возможности:",
13
13
  "aliases:": "алиасы:",
14
14
  "generated-value": "генерированное значение",
15
- "Not enough non-option arguments: got %s, need at least %s": "Не достаточно неопционных аргументов: есть %s, нужно как минимум %s",
15
+ "Not enough non-option arguments: got %s, need at least %s": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s",
16
16
  "Too many non-option arguments: got %s, maximum of %s": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s",
17
17
  "Missing argument value: %s": {
18
18
  "one": "Не хватает значения аргумента: %s",
@@ -30,7 +30,7 @@
30
30
  "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s",
31
31
  "Argument check failed: %s": "Проверка аргументов не удалась: %s",
32
32
  "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:",
33
- "Not enough arguments following: %s": "Not enough arguments following: %s",
33
+ "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s",
34
34
  "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s",
35
35
  "Path to JSON config file": "Путь к файлу конфигурации JSON",
36
36
  "Show help": "Показать помощь",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yargs",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "description": "yargs the modern, pirate-themed, successor to optimist.",
5
5
  "main": "./index.js",
6
6
  "files": [
@@ -25,14 +25,14 @@
25
25
  "which-module": "^1.0.0",
26
26
  "window-size": "^0.2.0",
27
27
  "y18n": "^3.2.1",
28
- "yargs-parser": "^4.0.2"
28
+ "yargs-parser": "^4.1.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "chai": "^3.4.1",
32
32
  "chalk": "^1.1.3",
33
33
  "coveralls": "^2.11.11",
34
34
  "cpr": "^2.0.0",
35
- "cross-spawn": "^4.0.0",
35
+ "cross-spawn": "^5.0.1",
36
36
  "es6-promise": "^4.0.2",
37
37
  "hashish": "0.0.4",
38
38
  "mocha": "^3.0.1",
@@ -74,7 +74,8 @@
74
74
  "greenkeeper": {
75
75
  "ignore": [
76
76
  "string-width",
77
- "read-pkg-up"
77
+ "read-pkg-up",
78
+ "camelcase"
78
79
  ]
79
80
  }
80
81
  }
package/yargs.js CHANGED
@@ -416,7 +416,8 @@ function Yargs (processArgs, cwd, parentRequire) {
416
416
  var obj = {}
417
417
  try {
418
418
  obj = readPkgUp.sync({
419
- cwd: path || require('require-main-filename')(parentRequire || require)
419
+ cwd: path || require('require-main-filename')(parentRequire || require),
420
+ normalize: false
420
421
  })
421
422
  } catch (noop) {}
422
423