Skip to content

Commit

Permalink
chore: bump got to v11 (#2891)
Browse files Browse the repository at this point in the history
  • Loading branch information
clavin authored Jun 28, 2022
1 parent 067a68c commit 345250c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 30 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"form-data": "^4.0.0",
"fs-extra": "^10.0.0",
"global": "^4.3.2",
"got": "^9.6.0",
"got": "^11.8.5",
"html-webpack-plugin": "^5.3.1",
"inquirer": "^8.0.0",
"lodash": "^4.17.20",
Expand Down Expand Up @@ -101,7 +101,6 @@
"@types/express-ws": "^3.0.0",
"@types/fetch-mock": "^7.3.1",
"@types/fs-extra": "^9.0.6",
"@types/got": "^9.4.4",
"@types/inquirer": "^8.1.1",
"@types/listr": "^0.14.2",
"@types/lodash": "^4.14.166",
Expand Down
3 changes: 1 addition & 2 deletions packages/api/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"@electron-forge/maker-zip": "6.0.0-beta.64",
"@electron-forge/test-utils": "6.0.0-beta.64",
"@types/progress": "^2.0.5",
"@types/got": "^9.4.4",
"chai": "^4.3.3",
"chai-as-promised": "^7.0.0",
"cross-env": "^7.0.2",
Expand Down Expand Up @@ -63,7 +62,7 @@
"filenamify": "^4.1.0",
"find-up": "^5.0.0",
"fs-extra": "^10.0.0",
"got": "^9.6.0",
"got": "^11.8.5",
"lodash": "^4.17.20",
"log-symbols": "^4.0.0",
"node-fetch": "^2.6.7",
Expand Down
6 changes: 3 additions & 3 deletions packages/api/core/src/util/download-to-file.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as fs from 'fs-extra';
import * as got from 'got';
import got, { HTTPError } from 'got';
import * as path from 'path';
import ProgressBar from 'progress';

Expand Down Expand Up @@ -34,8 +34,8 @@ export async function downloadToFile(targetFilePath: string, url: string): Promi
}
});
downloadStream.on('error', (error) => {
if (error.name === 'HTTPError' && error.statusCode === 404) {
error.message += ` for ${error.url}`;
if (error instanceof HTTPError && error.response.statusCode === 404) {
error.message += ` for ${error.response.url}`;
}
if (writeStream.destroy) {
writeStream.destroy(error);
Expand Down
40 changes: 17 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1746,15 +1746,6 @@
"@types/minimatch" "*"
"@types/node" "*"

"@types/got@^9.4.4":
version "9.6.12"
resolved "https://registry.yarnpkg.com/@types/got/-/got-9.6.12.tgz#fd42a6e1f5f64cd6bb422279b08c30bb5a15a56f"
integrity sha512-X4pj/HGHbXVLqTpKjA2ahI4rV/nNBc9mGO2I/0CgAra+F2dKgMXnENv2SRpemScBzBAI4vMelIVYViQxlSE6xA==
dependencies:
"@types/node" "*"
"@types/tough-cookie" "*"
form-data "^2.5.0"

"@types/html-minifier-terser@^6.0.0":
version "6.1.0"
resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#4fc33a00c1d0c16987b1a20cf92d20614c55ac35"
Expand Down Expand Up @@ -1941,11 +1932,6 @@
dependencies:
"@types/node" "*"

"@types/tough-cookie@*":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397"
integrity sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==

"@types/which@^2.0.0":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@types/which/-/which-2.0.1.tgz#27ecd67f915b7c3d6ba552135bb1eecd66e63501"
Expand Down Expand Up @@ -4779,15 +4765,6 @@ forever-agent@~0.6.1:
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=

form-data@^2.5.0:
version "2.5.1"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4"
integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.6"
mime-types "^2.1.12"

form-data@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f"
Expand Down Expand Up @@ -5226,6 +5203,23 @@ got@^11.7.0, got@^11.8.2:
p-cancelable "^2.0.0"
responselike "^2.0.0"

got@^11.8.5:
version "11.8.5"
resolved "https://registry.yarnpkg.com/got/-/got-11.8.5.tgz#ce77d045136de56e8f024bebb82ea349bc730046"
integrity sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==
dependencies:
"@sindresorhus/is" "^4.0.0"
"@szmarczak/http-timer" "^4.0.5"
"@types/cacheable-request" "^6.0.1"
"@types/responselike" "^1.0.0"
cacheable-lookup "^5.0.3"
cacheable-request "^7.0.2"
decompress-response "^6.0.0"
http2-wrapper "^1.0.0-beta.5.2"
lowercase-keys "^2.0.0"
p-cancelable "^2.0.0"
responselike "^2.0.0"

got@^9.6.0:
version "9.6.0"
resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
Expand Down

0 comments on commit 345250c

Please sign in to comment.