Repository: bcoe/yargs
Pull request #377 (2016-02-14 02:11:46)

keep 4.x changelog up-to-date, fixed merge conflict


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8278c67..15b6534 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,9 +2,12 @@
 
 ### 4.x
 
+- [#376](https://github.com/bcoe/yargs/pull/376) **breaking change**, make help() method signature
+   more consistent with other commands (@maxrimue)
 - [#368](https://github.com/bcoe/yargs/pull/368) **breaking change**, overhaul to command handling API:
   introducing named positional arguments, commands as modules, introduces the concept of global options (options that don't reset). (@nexdrew, @bcoe).
 - [#364](https://github.com/bcoe/yargs/pull/364) add the slick new yargs website to the package.json (@iarna).
+- [#357](https://github.com/bcoe/yargs/pull/357) .strict() now requires that a valid command is provided (@lrlna)
 - [#356](https://github.com/bcoe/yargs/pull/356) pull the parsing bits of yargs into the separate module yargs-parser. Various parsing options can now be turned on and off using configuration (@bcoe).
 - [#330](https://github.com/bcoe/yargs/pull/330) **breaking change**, fix inconsistencies with `.version()` API. (@maxrimue).
 
diff --git a/README.md b/README.md
index 0982971..930019c 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,7 @@ With yargs, ye be havin' a map that leads straight to yer treasure! Treasure of
 [![Coverage Status][coveralls-image]][coveralls-url]
 [![NPM version][npm-image]][npm-url]
 [![Windows Tests][windows-image]][windows-url]
+[![js-standard-style][standard-image]](standard-url)
 
 > Yargs is the official successor to optimist. Please feel free to submit issues and pull requests. If you'd like to contribute and don't know where to start, have a look at [the issue list](https://github.com/bcoe/yargs/issues) :)
 
@@ -1391,3 +1392,5 @@ This module is loosely inspired by Perl's
 [npm-image]: https://img.shields.io/npm/v/yargs.svg
 [windows-url]: https://ci.appveyor.com/project/bcoe/yargs
 [windows-image]: https://img.shields.io/appveyor/ci/bcoe/yargs/master.svg?label=Windows%20Tests
+[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
+[standard-url]: http://standardjs.com/
diff --git a/lib/validation.js b/lib/validation.js
index e3d1b6c..b7de682 100644
--- a/lib/validation.js
+++ b/lib/validation.js
@@ -107,7 +107,7 @@ module.exports = function (yargs, usage, y18n) {
     var aliasLookup = {}
     var descriptions = usage.getDescriptions()
     var demanded = yargs.getDemanded()
-    var commandKeys = yargs.getCommandHandlers()
+    var commandKeys = yargs.getCommandInstance().getCommands()
     var unknown = []
 
     Object.keys(aliases).forEach(function (key) {
diff --git a/package.json b/package.json
index 03c3382..e79e4a3 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,7 @@
     "mocha": "^2.4.5",
     "nyc": "^5.2.0",
     "rimraf": "^2.5.0",
-    "standard": "^5.4.1",
+    "standard": "^6.0.5",
     "which": "^1.1.2",
     "win-spawn": "^2.0.0"
   },


Test patch:
diff --git a/test/integration.js b/test/integration.js
index c514175..9fb4f92 100644
--- a/test/integration.js
+++ b/test/integration.js
@@ -1,6 +1,7 @@
 /* global describe, it, before, after */
 
 var spawn = require('win-spawn')
+var path = require('path')
 var which = require('which')
 var rimraf = require('rimraf')
 var cpr = require('cpr')
@@ -107,7 +108,7 @@ describe('integration tests', function () {
 
 function testCmd (cmd, args, done) {
   var oldDir = process.cwd()
-  process.chdir(__dirname + '/fixtures')
+  process.chdir(path.join(__dirname, '/fixtures'))
 
   var cmds = cmd.split(' ')