From 68c15eaa5c6aeb6609cbe7ef7268018b594bfabb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2020 01:22:09 +0800 Subject: [PATCH] chore(deps): bump got from 11.1.4 to 11.3.0 (#4922) Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: DIYgod --- lib/utils/got.js | 5 +---- package.json | 2 +- test/utils/got.js | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/utils/got.js b/lib/utils/got.js index ae7a51cdfc..544140166b 100644 --- a/lib/utils/got.js +++ b/lib/utils/got.js @@ -3,10 +3,7 @@ const config = require('@/config').value; const got = require('got'); const custom = got.extend({ - retry: { - limit: config.requestRetry, - statusCodes: [408, 413, 429, 500, 502, 503, 504, 404], // add 404 to default for unit test - }, + retry: config.requestRetry, hooks: { beforeRetry: [ (options, err, count) => { diff --git a/package.json b/package.json index 3d7c941ac2..a9b1c928dc 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "fanfou-sdk": "4.1.0", "git-rev-sync": "2.0.0", "googleapis": "52.1.0", - "got": "11.1.4", + "got": "11.3.0", "he": "1.2.0", "hooman": "1.2.5", "https-proxy-agent": "5.0.0", diff --git a/test/utils/got.js b/test/utils/got.js index 17bace932c..1c8e26e895 100644 --- a/test/utils/got.js +++ b/test/utils/got.js @@ -21,7 +21,7 @@ describe('got', () => { .times(config.requestRetry + 1) .reply(function () { requestRun(); - return [404, '0']; + return [503, '0']; }); try { diff --git a/yarn.lock b/yarn.lock index 695ff92ada..eda1d85195 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5792,10 +5792,10 @@ googleapis@52.1.0: google-auth-library "^6.0.0" googleapis-common "^4.3.0" -got@11.1.4: - version "11.1.4" - resolved "https://registry.yarnpkg.com/got/-/got-11.1.4.tgz#ecf0064aab26ae4b2989ab52aadd31a17e7bad63" - integrity sha512-z94KIXHhFSpJONuY6C6w1wC+igE7P1d0b5h3H2CvrOXn0/tum/OgFblIGUAxI5PBXukGLvKb9MJXVHW8vsYaBA== +got@11.3.0: + version "11.3.0" + resolved "https://registry.yarnpkg.com/got/-/got-11.3.0.tgz#25e8da8b0125b3b984613a6b719e678dd2e20406" + integrity sha512-yi/kiZY2tNMtt5IfbfX8UL3hAZWb2gZruxYZ72AY28pU5p0TZjZdl0uRsuaFbnC0JopdUi3I+Mh1F3dPQ9Dh0Q== dependencies: "@sindresorhus/is" "^2.1.1" "@szmarczak/http-timer" "^4.0.5"