Files

Return to Package Diff Home.
Brought to you by Intrinsic.

Package Diff: yargs @ 13.2.2 .. 13.2.4

CHANGELOG.md

@@ -1,7 +1,31 @@
-# Change Log
+# Changelog
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.
+### [13.2.4](https://github.com/yargs/yargs/compare/v13.2.3...v13.2.4) (2019-05-13)
+
+
+### Bug Fixes
+
+* **i18n:** rename unclear 'implication failed' to 'missing dependent arguments' ([#1317](https://github.com/yargs/yargs/issues/1317)) ([bf46813](https://github.com/yargs/yargs/commit/bf46813))
+
+
+
+### [13.2.3](https://github.com/yargs/yargs/compare/v13.2.2...v13.2.3) (2019-05-05)
+
+
+### Bug Fixes
+
+* **deps:** upgrade cliui for compatibility with latest chalk. ([#1330](https://github.com/yargs/yargs/issues/1330)) ([b20db65](https://github.com/yargs/yargs/commit/b20db65))
+* address issues with dutch translation ([#1316](https://github.com/yargs/yargs/issues/1316)) ([0295132](https://github.com/yargs/yargs/commit/0295132))
+
+
+### Tests
+
+* accept differently formatted output ([#1327](https://github.com/yargs/yargs/issues/1327)) ([c294d1b](https://github.com/yargs/yargs/commit/c294d1b))
+
+
+
## [13.2.2](https://github.com/yargs/yargs/compare/v13.2.1...v13.2.2) (2019-03-06)
@@ -15,6 +39,13 @@
* support options/sub-commands in zsh completion ([0a96394](https://github.com/yargs/yargs/commit/0a96394))
+# [13.2.0](https://github.com/yargs/yargs/compare/v13.1.0...v13.2.0) (2019-02-15)
+
+
+### Features
+
+* zsh auto completion ([#1292](https://github.com/yargs/yargs/issues/1292)) ([16c5d25](https://github.com/yargs/yargs/commit/16c5d25)), closes [#1156](https://github.com/yargs/yargs/issues/1156)
+
<a name="13.1.0"></a>
# [13.1.0](https://github.com/yargs/yargs/compare/v13.0.0...v13.1.0) (2019-02-12)

completion.sh.hbs

@@ -1,28 +0,0 @@
-###-begin-{{app_name}}-completions-###
-#
-# yargs command completion script
-#
-# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
-# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
-#
-_yargs_completions()
-{
- local cur_word args type_list
-
- cur_word="${COMP_WORDS[COMP_CWORD]}"
- args=("${COMP_WORDS[@]}")
-
- # ask yargs to generate completions.
- type_list=$({{app_path}} --get-yargs-completions "${args[@]}")
-
- COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )
-
- # if no match was found, fall back to filename completion
- if [ ${#COMPREPLY[@]} -eq 0 ]; then
- COMPREPLY=()
- fi
-
- return 0
-}
-complete -o default -F _yargs_completions {{app_name}}
-###-end-{{app_name}}-completions-###

completion.zsh.hbs

@@ -1,17 +0,0 @@
-###-begin-{{app_name}}-completions-###
-#
-# yargs command completion script
-#
-# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
-# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX.
-#
-_{{app_name}}_yargs_completions()
-{
- local reply
- local si=$IFS
- IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))
- IFS=$si
- _describe 'values' reply
-}
-compdef _{{app_name}}_yargs_completions {{app_name}}
-###-end-{{app_name}}-completions-###
\ No newline at end of file

lib/completion.js

@@ -1,5 +1,4 @@
'use strict'
-const fs = require('fs')
const path = require('path')
// add bash completions to your
@@ -92,10 +91,8 @@
// generate the completion script to add to your .bashrc.
self.generateCompletionScript = function generateCompletionScript ($0, cmd) {
- let script = fs.readFileSync(
- path.resolve(__dirname, zshShell ? '../completion.zsh.hbs' : '../completion.sh.hbs'),
- 'utf-8'
- )
+ const templates = require('./completion-templates')
+ let script = zshShell ? templates.completionZshTemplate : templates.completionShTemplate
const name = path.basename($0)
// add ./to applications not yet installed as bin.

lib/completion-templates.js

@@ -0,0 +1,49 @@
+exports.completionShTemplate =
+`###-begin-{{app_name}}-completions-###
+#
+# yargs command completion script
+#
+# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
+# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
+#
+_yargs_completions()
+{
+ local cur_word args type_list
+
+ cur_word="\${COMP_WORDS[COMP_CWORD]}"
+ args=("\${COMP_WORDS[@]}")
+
+ # ask yargs to generate completions.
+ type_list=$({{app_path}} --get-yargs-completions "\${args[@]}")
+
+ COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) )
+
+ # if no match was found, fall back to filename completion
+ if [ \${#COMPREPLY[@]} -eq 0 ]; then
+ COMPREPLY=()
+ fi
+
+ return 0
+}
+complete -o default -F _yargs_completions {{app_name}}
+###-end-{{app_name}}-completions-###
+`
+
+exports.completionZshTemplate = `###-begin-{{app_name}}-completions-###
+#
+# yargs command completion script
+#
+# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
+# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX.
+#
+_{{app_name}}_yargs_completions()
+{
+ local reply
+ local si=$IFS
+ IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
+ IFS=$si
+ _describe 'values' reply
+}
+compdef _{{app_name}}_yargs_completions {{app_name}}
+###-end-{{app_name}}-completions-###
+`

locales/de.json

@@ -29,7 +29,7 @@
"Invalid values:": "Unzulässige Werte:",
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s",
"Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s",
- "Implications failed:": "Implikationen fehlgeschlagen:",
+ "Implications failed:": "Fehlende abhängige Argumente:",
"Not enough arguments following: %s": "Nicht genügend Argumente nach: %s",
"Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s",
"Path to JSON config file": "Pfad zur JSON-Config Datei",

locales/en.json

@@ -29,7 +29,7 @@
"Invalid values:": "Invalid values:",
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s",
"Argument check failed: %s": "Argument check failed: %s",
- "Implications failed:": "Implications failed:",
+ "Implications failed:": "Missing dependent arguments:",
"Not enough arguments following: %s": "Not enough arguments following: %s",
"Invalid JSON config file: %s": "Invalid JSON config file: %s",
"Path to JSON config file": "Path to JSON config file",

locales/fr.json

@@ -28,7 +28,7 @@
"Invalid values:": "Valeurs invalides:",
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Donné: %s, Choix: %s",
"Argument check failed: %s": "Echec de la vérification de l'argument: %s",
- "Implications failed:": "Implications échouées:",
+ "Implications failed:": "Arguments dépendants manquants:",
"Not enough arguments following: %s": "Pas assez d'arguments suivant: %s",
"Invalid JSON config file: %s": "Fichier de configuration JSON invalide: %s",
"Path to JSON config file": "Chemin du fichier de configuration JSON",

locales/it.json

@@ -29,7 +29,7 @@
"Invalid values:": "Valori non validi:",
"Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s",
"Argument check failed: %s": "Controllo dell'argomento fallito: %s",
- "Implications failed:": "Argomenti impliciti non soddisfatti:",
+ "Implications failed:": "Argomenti dipendenti mancanti:",
"Not enough arguments following: %s": "Argomenti insufficienti dopo: %s",
"Invalid JSON config file: %s": "File di configurazione JSON non valido: %s",
"Path to JSON config file": "Percorso del file di configurazione JSON",

locales/nl.json

@@ -1,42 +1,42 @@
{
- "Commands:": "Opdrachten:",
+ "Commands:": "Commando's:",
"Options:": "Opties:",
"Examples:": "Voorbeelden:",
- "boolean": "boolean",
+ "boolean": "booleaans",
"count": "aantal",
- "string": "text",
- "number": "nummer",
+ "string": "string",
+ "number": "getal",
"array": "lijst",
"required": "verplicht",
"default:": "standaard:",
"choices:": "keuzes:",
"aliases:": "aliassen:",
"generated-value": "gegenereerde waarde",
- "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg non-optie argumenten. Gekregen: %s, minstens nodig: %s",
- "Too many non-option arguments: got %s, maximum of %s": "Te veel non-optie argumenten. Gekregen: %s, maximum: %s",
+ "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig",
+ "Too many non-option arguments: got %s, maximum of %s": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s",
"Missing argument value: %s": {
- "one": "Missing argument value: %s",
- "other": "Missing argument values: %s"
+ "one": "Missende argumentwaarde: %s",
+ "other": "Missende argumentwaarden: %s"
},
"Missing required argument: %s": {
- "one": "Missend verplichte argument: %s",
+ "one": "Missend verplicht argument: %s",
"other": "Missende verplichte argumenten: %s"
},
"Unknown argument: %s": {
"one": "Onbekend argument: %s",
"other": "Onbekende argumenten: %s"
},
- "Invalid values:": "Ongeldige waardes:",
+ "Invalid values:": "Ongeldige waarden:",
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s",
- "Argument check failed: %s": "Argument check mislukt: %s",
- "Implications failed:": "Implicaties mislukt:",
+ "Argument check failed: %s": "Argumentcontrole mislukt: %s",
+ "Implications failed:": "Ontbrekende afhankelijke argumenten:",
"Not enough arguments following: %s": "Niet genoeg argumenten na: %s",
- "Invalid JSON config file: %s": "Ongeldig JSON configuratiebestand: %s",
- "Path to JSON config file": "Pad naar JSON configuratiebestand",
+ "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s",
+ "Path to JSON config file": "Pad naar JSON-config-bestand",
"Show help": "Toon help",
- "Show version number": "Toon versie nummer",
+ "Show version number": "Toon versienummer",
"Did you mean %s?": "Bedoelde u misschien %s?",
- "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s zijn onderling uitsluitend",
+ "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden",
"Positionals:": "Positie-afhankelijke argumenten",
"command": "commando"
}

package.json

@@ -1,6 +1,6 @@
{
"name": "yargs",
- "version": "13.2.2",
+ "version": "13.2.4",
"description": "yargs the modern, pirate-themed, successor to optimist.",
"main": "./index.js",
"contributors": [
@@ -19,7 +19,7 @@
"LICENSE"
],
"dependencies": {
- "cliui": "^4.0.0",
+ "cliui": "^5.0.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
"os-locale": "^3.1.0",
@@ -29,21 +29,21 @@
"string-width": "^3.0.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
- "yargs-parser": "^13.0.0"
+ "yargs-parser": "^13.1.0"
},
"devDependencies": {
"chai": "^4.2.0",
"chalk": "^2.4.2",
- "coveralls": "^3.0.2",
+ "coveralls": "^3.0.3",
"cpr": "^3.0.1",
"cross-spawn": "^6.0.4",
"es6-promise": "^4.2.5",
"hashish": "0.0.4",
"mocha": "^5.2.0",
- "nyc": "^13.2.0",
+ "nyc": "^14.1.0",
"rimraf": "^2.6.3",
"standard": "^12.0.1",
- "standard-version": "^5.0.0",
+ "standard-version": "^6.0.1",
"which": "^1.3.1",
"yargs-test-extends": "^1.0.1"
},