diff --git a/lib/actions/user.js b/lib/actions/user.js index 6ec1e48f..9e4f666f 100644 --- a/lib/actions/user.js +++ b/lib/actions/user.js @@ -27,7 +27,7 @@ user.git.name = function () { } if (shell.which('git')) { - name = shell.exec('git config --get user.name', { silent: true }).output.trim(); + name = shell.exec('git config --get user.name', { silent: true }).stdout.trim(); nameCache[process.cwd()] = name; } @@ -47,7 +47,7 @@ user.git.email = function () { } if (shell.which('git')) { - email = shell.exec('git config --get user.email', { silent: true }).output.trim(); + email = shell.exec('git config --get user.email', { silent: true }).stdout.trim(); emailCache[process.cwd()] = email; } diff --git a/lib/base.js b/lib/base.js index 8c296a54..93ffe44e 100644 --- a/lib/base.js +++ b/lib/base.js @@ -504,7 +504,7 @@ Base.prototype.run = function run(cb) { this.runHooks(); }); - _.invoke(this._composedWith, 'run'); + _.invokeMap(this._composedWith, 'run'); return this; }; diff --git a/lib/util/prompt-suggestion.js b/lib/util/prompt-suggestion.js index 9ef90b14..1755f380 100644 --- a/lib/util/prompt-suggestion.js +++ b/lib/util/prompt-suggestion.js @@ -58,7 +58,7 @@ var getListDefault = function (question, defaultValue) { * @private */ var storeListAnswer = function (question, answer) { - var choiceValues = _.pluck(question.choices, 'value'); + var choiceValues = _.map(question.choices, 'value'); var choiceIndex = choiceValues.indexOf(answer); // Check if answer is not equal to default value diff --git a/package.json b/package.json index eed18389..13422d51 100644 --- a/package.json +++ b/package.json @@ -45,23 +45,23 @@ "error": "^7.0.2", "find-up": "^1.0.0", "github-username": "^2.0.0", - "glob": "^6.0.1", + "glob": "^7.0.3", "gruntfile-editor": "^1.0.0", "html-wiring": "^1.0.0", "inquirer": "^0.11.0", "istextorbinary": "^1.0.2", - "lodash": "^3.5.0", + "lodash": "^4.11.1", "mem-fs-editor": "^2.0.0", "mkdirp": "^0.5.0", "nopt": "^3.0.0", - "path-exists": "^2.0.0", + "path-exists": "^3.0.0", "path-is-absolute": "^1.0.0", - "pretty-bytes": "^2.0.1", - "read-chunk": "^1.0.1", + "pretty-bytes": "^3.0.1", + "read-chunk": "^2.0.0", "read-pkg-up": "^1.0.1", "rimraf": "^2.2.0", "run-async": "^2.0.0", - "shelljs": "^0.5.0", + "shelljs": "^0.7.0", "text-table": "^0.2.0", "through2": "^2.0.0", "underscore.string": "^3.0.3", diff --git a/test/base.js b/test/base.js index 48f87c17..db771ce8 100644 --- a/test/base.js +++ b/test/base.js @@ -788,6 +788,7 @@ describe('generators.Base', function () { // generator before the base one is ran. setTimeout(function () { this.dummy.run(function () { + sinon.assert.callOrder(runSpy, this.spy); assert(this.spy.calledAfter(runSpy)); done(); }.bind(this)); diff --git a/test/conflicter.js b/test/conflicter.js index 46f1056c..aa25ae80 100644 --- a/test/conflicter.js +++ b/test/conflicter.js @@ -123,7 +123,7 @@ describe('Conflicter', function () { contents: null }, function () { assert.equal( - _.where(spy.firstCall.args[0][0].choices, { value: 'diff' }).length, + _.filter(spy.firstCall.args[0][0].choices, { value: 'diff' }).length, 0 ); done();