From 1f1bda2c5a1d897b39df7a936e14c31e74e1dfff Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 26 Feb 2020 14:21:23 +0100 Subject: Remove unnecessary dep --- editors/code/src/installation/download_artifact.ts | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'editors/code/src') diff --git a/editors/code/src/installation/download_artifact.ts b/editors/code/src/installation/download_artifact.ts index 356723aba..8ed99bf0a 100644 --- a/editors/code/src/installation/download_artifact.ts +++ b/editors/code/src/installation/download_artifact.ts @@ -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,19 +37,15 @@ 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) => { - const newPercentage = (readBytes / totalBytes) * 100; - progress.report({ - message: newPercentage.toFixed(0) + "%", - increment: newPercentage - lastPrecentage - }); + await downloadFile(downloadUrl, installationPath, filePermissions, (readBytes, totalBytes) => { + const newPercentage = (readBytes / totalBytes) * 100; + progress.report({ + message: newPercentage.toFixed(0) + "%", + increment: newPercentage - lastPrecentage + }); - lastPrecentage = newPercentage; - }) - ); + lastPrecentage = newPercentage; + }); } ); } -- cgit v1.2.3