yargs 13.2.4 → 13.3.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.json +2 -3
  3. package/yargs.js +5 -4
package/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
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
+ ## [13.3.0](https://www.github.com/yargs/yargs/compare/v13.2.4...v13.3.0) (2019-06-10)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **deps:** yargs-parser update addressing several parsing bugs ([#1357](https://www.github.com/yargs/yargs/issues/1357)) ([e230d5b](https://www.github.com/yargs/yargs/commit/e230d5b))
11
+
12
+
13
+ ### Features
14
+
15
+ * **i18n:** swap out os-locale dependency for simple inline implementation ([#1356](https://www.github.com/yargs/yargs/issues/1356)) ([4dfa19b](https://www.github.com/yargs/yargs/commit/4dfa19b))
16
+ * support defaultDescription for positional arguments ([812048c](https://www.github.com/yargs/yargs/commit/812048c))
17
+
5
18
  ### [13.2.4](https://github.com/yargs/yargs/compare/v13.2.3...v13.2.4) (2019-05-13)
6
19
 
7
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yargs",
3
- "version": "13.2.4",
3
+ "version": "13.3.0",
4
4
  "description": "yargs the modern, pirate-themed, successor to optimist.",
5
5
  "main": "./index.js",
6
6
  "contributors": [
@@ -22,14 +22,13 @@
22
22
  "cliui": "^5.0.0",
23
23
  "find-up": "^3.0.0",
24
24
  "get-caller-file": "^2.0.1",
25
- "os-locale": "^3.1.0",
26
25
  "require-directory": "^2.1.1",
27
26
  "require-main-filename": "^2.0.0",
28
27
  "set-blocking": "^2.0.0",
29
28
  "string-width": "^3.0.0",
30
29
  "which-module": "^2.0.0",
31
30
  "y18n": "^4.0.0",
32
- "yargs-parser": "^13.1.0"
31
+ "yargs-parser": "^13.1.1"
33
32
  },
34
33
  "devDependencies": {
35
34
  "chai": "^4.2.0",
package/yargs.js CHANGED
@@ -694,8 +694,8 @@ function Yargs (processArgs, cwd, parentRequire) {
694
694
  }
695
695
 
696
696
  // .positional() only supports a subset of the configuration
697
- // options availble to .option().
698
- const supportedOpts = ['default', 'implies', 'normalize',
697
+ // options available to .option().
698
+ const supportedOpts = ['default', 'defaultDescription', 'implies', 'normalize',
699
699
  'choices', 'conflicts', 'coerce', 'type', 'describe',
700
700
  'desc', 'description', 'alias']
701
701
  opts = objFilter(opts, (k, v) => {
@@ -1181,8 +1181,9 @@ function Yargs (processArgs, cwd, parentRequire) {
1181
1181
  if (!detectLocale) return
1182
1182
 
1183
1183
  try {
1184
- const osLocale = require('os-locale')
1185
- self.locale(osLocale.sync({ spawn: false }))
1184
+ const { env } = process
1185
+ const locale = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE || 'en_US'
1186
+ self.locale(locale.replace(/[.:].*/, ''))
1186
1187
  } catch (err) {
1187
1188
  // if we explode looking up locale just noop
1188
1189
  // we'll keep using the default language 'en'.