Skip to content

Commit 1f1bda2

Browse files
committed
Remove unnecessary dep
1 parent 80f8e47 commit 1f1bda2

File tree

3 files changed

+8
-26
lines changed

3 files changed

+8
-26
lines changed

editors/code/package-lock.json

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editors/code/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@
2727
"dependencies": {
2828
"jsonc-parser": "^2.1.0",
2929
"node-fetch": "^2.6.0",
30-
"throttle-debounce": "^2.1.0",
3130
"vscode-languageclient": "^6.1.1"
3231
},
3332
"devDependencies": {
3433
"@rollup/plugin-commonjs": "^11.0.2",
3534
"@rollup/plugin-node-resolve": "^7.1.1",
3635
"@types/node": "^12.12.27",
3736
"@types/node-fetch": "^2.5.4",
38-
"@types/throttle-debounce": "^2.1.0",
3937
"@types/vscode": "^1.42.0",
4038
"@typescript-eslint/eslint-plugin": "^2.20.0",
4139
"@typescript-eslint/parser": "^2.20.0",

editors/code/src/installation/download_artifact.ts

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { strict as assert } from "assert";
55

66
import { ArtifactReleaseInfo } from "./interfaces";
77
import { downloadFile } from "./download_file";
8-
import { throttle } from "throttle-debounce";
98

109
/**
1110
* Downloads artifact from given `downloadUrl`.
@@ -38,19 +37,15 @@ export async function downloadArtifact(
3837
async (progress, _cancellationToken) => {
3938
let lastPrecentage = 0;
4039
const filePermissions = 0o755; // (rwx, r_x, r_x)
41-
await downloadFile(downloadUrl, installationPath, filePermissions, throttle(
42-
200,
43-
/* noTrailing: */ true,
44-
(readBytes, totalBytes) => {
45-
const newPercentage = (readBytes / totalBytes) * 100;
46-
progress.report({
47-
message: newPercentage.toFixed(0) + "%",
48-
increment: newPercentage - lastPrecentage
49-
});
40+
await downloadFile(downloadUrl, installationPath, filePermissions, (readBytes, totalBytes) => {
41+
const newPercentage = (readBytes / totalBytes) * 100;
42+
progress.report({
43+
message: newPercentage.toFixed(0) + "%",
44+
increment: newPercentage - lastPrecentage
45+
});
5046

51-
lastPrecentage = newPercentage;
52-
})
53-
);
47+
lastPrecentage = newPercentage;
48+
});
5449
}
5550
);
5651
}

0 commit comments

Comments
 (0)