10927: minor: bump the rest of the npm deps r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
bors[bot] 2021-12-04 12:37:19 +00:00 committed by GitHub
commit f00e1c05c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1725 additions and 465 deletions

File diff suppressed because it is too large Load diff

View file

@ -37,24 +37,23 @@
},
"dependencies": {
"https-proxy-agent": "^5.0.0",
"node-fetch": "^2.6.1",
"node-fetch": "^3.0.3",
"vscode-languageclient": "8.0.0-next.2",
"d3": "^7.1.0",
"d3-graphviz": "^4.0.0"
},
"devDependencies": {
"@types/node": "~14.17.5",
"@types/node-fetch": "^2.5.11",
"@types/vscode": "^1.61.0",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.5.0",
"@vscode/test-electron": "^1.6.2",
"esbuild": "^0.12.29",
"esbuild": "^0.14.1",
"eslint": "^8.3.0",
"tslib": "^2.3.0",
"typescript": "^4.5.2",
"typescript-formatter": "^7.2.2",
"vsce": "^1.95.1"
"vsce": "^2.5.1"
},
"activationEvents": [
"onLanguage:rust",

View file

@ -73,8 +73,8 @@ export async function fetchRelease(
);
}
// We skip runtime type checks for simplicity (here we cast from `any` to `GithubRelease`)
const release: GithubRelease = await response.json();
// We skip runtime type checks for simplicity (here we cast from `unknown` to `GithubRelease`)
const release = await response.json() as GithubRelease;
return release;
}
@ -205,6 +205,12 @@ async function downloadFile(
throw new Error(`Got response ${res.status} when trying to download a file.`);
}
if (!res.body) {
log.error("Empty body while downloading file from", urlString);
log.error({ headers: res.headers });
throw new Error(`Got empty body when trying to download a file.`);
}
const totalBytes = Number(res.headers.get('content-length'));
assert(!Number.isNaN(totalBytes), "Sanity check of content-length protocol");