Skip to content

Commit 03af7c3

Browse files
authored
Cumulative update of dependencies (#987)
* Update deps * Update licenses
1 parent 72afbce commit 03af7c3

File tree

4 files changed

+170
-352
lines changed

4 files changed

+170
-352
lines changed

.licenses/npm/@octokit/plugin-retry.dep.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7405,7 +7405,7 @@ var Bottleneck = _interopDefault(__nccwpck_require__(1174));
74057405
var requestError = __nccwpck_require__(537);
74067406

74077407
// @ts-ignore
7408-
async function errorRequest(octokit, state, error, options) {
7408+
async function errorRequest(state, octokit, error, options) {
74097409
if (!error.request || !error.request.request) {
74107410
// address https://github.com/octokit/plugin-retry.js/issues/8
74117411
throw error;
@@ -7420,11 +7420,9 @@ async function errorRequest(octokit, state, error, options) {
74207420
throw error;
74217421
}
74227422

7423-
// @ts-ignore
7424-
// @ts-ignore
7425-
async function wrapRequest(state, request, options) {
7423+
// @ts-nocheck
7424+
async function wrapRequest(state, octokit, request, options) {
74267425
const limiter = new Bottleneck();
7427-
// @ts-ignore
74287426
limiter.on("failed", function (error, info) {
74297427
const maxRetries = ~~error.request.request.retries;
74307428
const after = ~~error.request.request.retryAfter;
@@ -7435,23 +7433,22 @@ async function wrapRequest(state, request, options) {
74357433
return after * state.retryAfterBaseValue;
74367434
}
74377435
});
7438-
return limiter.schedule(requestWithGraphqlErrorHandling.bind(null, request), options);
7436+
return limiter.schedule(requestWithGraphqlErrorHandling.bind(null, state, octokit, request), options);
74397437
}
7440-
// @ts-ignore
7441-
async function requestWithGraphqlErrorHandling(request, options) {
7438+
async function requestWithGraphqlErrorHandling(state, octokit, request, options) {
74427439
const response = await request(request, options);
74437440
if (response.data && response.data.errors && /Something went wrong while executing your query/.test(response.data.errors[0].message)) {
74447441
// simulate 500 request error for retry handling
74457442
const error = new requestError.RequestError(response.data.errors[0].message, 500, {
74467443
request: options,
74477444
response
74487445
});
7449-
throw error;
7446+
return errorRequest(state, octokit, error, options);
74507447
}
74517448
return response;
74527449
}
74537450

7454-
const VERSION = "4.1.1";
7451+
const VERSION = "4.1.3";
74557452
function retry(octokit, octokitOptions) {
74567453
const state = Object.assign({
74577454
enabled: true,
@@ -7460,8 +7457,8 @@ function retry(octokit, octokitOptions) {
74607457
retries: 3
74617458
}, octokitOptions.retry);
74627459
if (state.enabled) {
7463-
octokit.hook.error("request", errorRequest.bind(null, octokit, state));
7464-
octokit.hook.wrap("request", wrapRequest.bind(null, state));
7460+
octokit.hook.error("request", errorRequest.bind(null, state, octokit));
7461+
octokit.hook.wrap("request", wrapRequest.bind(null, state, octokit));
74657462
}
74667463
return {
74677464
retry: {

0 commit comments

Comments
 (0)