Skip to content

Commit de5ca0b

Browse files
wtgtybhertgeghgtwtgSBoudrias
authored andcommitted
Bump lodash. (#505)
1 parent 9631848 commit de5ca0b

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

lib/router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Router.prototype.registerRoute = function (name, handler) {
5555
Router.prototype.updateAvailableGenerators = function () {
5656
this.generators = {};
5757

58-
var resolveGenerators = function (generator) {
58+
var resolveGenerators = (generator) => {
5959
// Skip sub generators
6060
if (!/:(app|all)$/.test(generator.namespace)) {
6161
return;
@@ -80,5 +80,5 @@ Router.prototype.updateAvailableGenerators = function () {
8080
this.generators[pkg.name] = pkg;
8181
};
8282

83-
_.each(this.env.getGeneratorsMeta(), resolveGenerators, this);
83+
_.forEach(this.env.getGeneratorsMeta(), resolveGenerators);
8484
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"humanize-string": "^1.0.0",
5353
"inquirer": "^3.0.1",
5454
"insight": "^0.7.0",
55-
"lodash": "^3.2.0",
55+
"lodash": "^4.17.4",
5656
"meow": "^3.0.0",
5757
"npm-keyword": "^4.1.0",
5858
"opn": "^3.0.2",

test/route-home.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('home route', function () {
5353
it('does not display update options if no generators is installed', function () {
5454
this.router.generator = [];
5555
this.sandbox.stub(inquirer, 'prompt', function (prompts) {
56-
assert.equal(_.pluck(prompts[0].choices, 'value').indexOf('update'), -1);
56+
assert.equal(_.map(prompts[0].choices, 'value').indexOf('update'), -1);
5757
return Promise.resolve({whatNext: 'exit'});
5858
});
5959
return this.router.navigate('home');
@@ -68,7 +68,7 @@ describe('home route', function () {
6868
}];
6969

7070
this.sandbox.stub(inquirer, 'prompt', function (prompts) {
71-
assert(_.pluck(prompts[0].choices, 'value').indexOf('update') >= 0);
71+
assert(_.map(prompts[0].choices, 'value').indexOf('update') >= 0);
7272
return Promise.resolve({whatNext: 'update'});
7373
});
7474
return this.router.navigate('home').then(function () {

test/route-install.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ describe('install route', function () {
8383
}
8484
if (call === 2) {
8585
var choices = arg[0].choices;
86-
assert.equal(_.where(choices, {value: 'generator-foo'}).length, 1);
87-
assert.equal(_.where(choices, {value: 'generator-unicorn-1'}).length, 1);
88-
assert.equal(_.where(choices, {value: 'generator-unicorn'}).length, 0);
89-
assert.equal(_.where(choices, {value: 'generator-unrelated'}).length, 0);
86+
assert.equal(_.filter(choices, {value: 'generator-foo'}).length, 1);
87+
assert.equal(_.filter(choices, {value: 'generator-unicorn-1'}).length, 1);
88+
assert.equal(_.filter(choices, {value: 'generator-unicorn'}).length, 0);
89+
assert.equal(_.filter(choices, {value: 'generator-unrelated'}).length, 0);
9090
done();
9191
}
9292

@@ -105,9 +105,9 @@ describe('install route', function () {
105105
}
106106
if (call === 2) {
107107
var choices = arg[0].choices;
108-
assert.equal(_.where(choices, {value: 'generator-blacklist-1'}).length, 0);
109-
assert.equal(_.where(choices, {value: 'generator-blacklist-2'}).length, 0);
110-
assert.equal(_.where(choices, {value: 'generator-blacklist-3'}).length, 1);
108+
assert.equal(_.filter(choices, {value: 'generator-blacklist-1'}).length, 0);
109+
assert.equal(_.filter(choices, {value: 'generator-blacklist-2'}).length, 0);
110+
assert.equal(_.filter(choices, {value: 'generator-blacklist-3'}).length, 1);
111111
done();
112112
}
113113

@@ -202,7 +202,7 @@ describe('install route', function () {
202202

203203
if (call === 2) {
204204
var choices = arg[0].choices;
205-
assert.deepEqual(_.pluck(choices, 'value'), ['install', 'home']);
205+
assert.deepEqual(_.map(choices, 'value'), ['install', 'home']);
206206
done();
207207
}
208208

0 commit comments

Comments
 (0)