Bump got from 11.8.3 to 12.0.1

This commit is contained in:
Labhansh Agrawal 2022-02-07 13:28:24 +05:30
parent 2a4771fad5
commit b4d3fd3e29
3 changed files with 95 additions and 9 deletions

View file

@ -109,13 +109,15 @@ function getPackageName(plugin: string) {
function existsOnNpm(plugin: string) {
const name = getPackageName(plugin);
return got.get<any>(registryUrl + name.toLowerCase(), {timeout: 10000, responseType: 'json'}).then((res) => {
if (!res.body.versions) {
return Promise.reject(res);
} else {
return res;
}
});
return got
.get<any>(registryUrl + name.toLowerCase(), {timeout: {request: 10000}, responseType: 'json'})
.then((res) => {
if (!res.body.versions) {
return Promise.reject(res);
} else {
return res;
}
});
}
function install(plugin: string, locally?: boolean) {