Remove unnecessary dep

This commit is contained in:
Aleksey Kladov 2020-02-26 14:21:23 +01:00
parent 80f8e474a0
commit 1f1bda2c5a
3 changed files with 8 additions and 26 deletions

View file

@ -112,12 +112,6 @@
"@types/node": "*"
}
},
"@types/throttle-debounce": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz",
"integrity": "sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==",
"dev": true
},
"@types/vscode": {
"version": "1.42.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.42.0.tgz",
@ -1517,11 +1511,6 @@
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
"dev": true
},
"throttle-debounce": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-2.1.0.tgz",
"integrity": "sha512-AOvyNahXQuU7NN+VVvOOX+uW6FPaWdAOdRP5HfwYxAfCzXTFKRMoIMk+n+po318+ktcChx+F1Dd91G3YHeMKyg=="
},
"through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",

View file

@ -27,7 +27,6 @@
"dependencies": {
"jsonc-parser": "^2.1.0",
"node-fetch": "^2.6.0",
"throttle-debounce": "^2.1.0",
"vscode-languageclient": "^6.1.1"
},
"devDependencies": {
@ -35,7 +34,6 @@
"@rollup/plugin-node-resolve": "^7.1.1",
"@types/node": "^12.12.27",
"@types/node-fetch": "^2.5.4",
"@types/throttle-debounce": "^2.1.0",
"@types/vscode": "^1.42.0",
"@typescript-eslint/eslint-plugin": "^2.20.0",
"@typescript-eslint/parser": "^2.20.0",

View file

@ -5,7 +5,6 @@ import { strict as assert } from "assert";
import { ArtifactReleaseInfo } from "./interfaces";
import { downloadFile } from "./download_file";
import { throttle } from "throttle-debounce";
/**
* Downloads artifact from given `downloadUrl`.
@ -38,10 +37,7 @@ export async function downloadArtifact(
async (progress, _cancellationToken) => {
let lastPrecentage = 0;
const filePermissions = 0o755; // (rwx, r_x, r_x)
await downloadFile(downloadUrl, installationPath, filePermissions, throttle(
200,
/* noTrailing: */ true,
(readBytes, totalBytes) => {
await downloadFile(downloadUrl, installationPath, filePermissions, (readBytes, totalBytes) => {
const newPercentage = (readBytes / totalBytes) * 100;
progress.report({
message: newPercentage.toFixed(0) + "%",
@ -49,8 +45,7 @@ export async function downloadArtifact(
});
lastPrecentage = newPercentage;
})
);
});
}
);
}