Skip to content

Commit ca4b84c

Browse files
wtgtybhertgeghgtwtgSBoudrias
authored andcommitted
Bump got. (#501)
* Bump `got`. * Rename `gotCallback`.
1 parent 50683a0 commit ca4b84c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/routes/install.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ var getAllGenerators = _.memoize(function () {
5050
});
5151

5252
function searchMatchingGenerators(app, term, cb) {
53-
got('yeoman.io/blacklist.json', {json: true}, function (err, data) {
54-
var blacklist = err ? [] : data;
53+
function handleBlacklist(blacklist) {
5554
var installedGenerators = app.env.getGeneratorNames();
5655

5756
getAllGenerators().then(function (allGenerators) {
@@ -67,7 +66,10 @@ function searchMatchingGenerators(app, term, cb) {
6766
return generatorMatchTerm(generator, term);
6867
}));
6968
}, cb);
70-
});
69+
}
70+
got('yeoman.io/blacklist.json', {json: true})
71+
.then(response => handleBlacklist(response.body))
72+
.catch(() => handleBlacklist([]));
7173
}
7274

7375
function fetchGeneratorInfo(generator, cb) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"cross-spawn": "^3.0.1",
4949
"figures": "^1.3.5",
5050
"fullname": "^3.2.0",
51-
"got": "^5.0.0",
51+
"got": "^6.7.1",
5252
"humanize-string": "^1.0.0",
5353
"inquirer": "^1.0.2",
5454
"insight": "^0.7.0",

0 commit comments

Comments
 (0)