Socket
Socket
Sign inDemoInstall

gaxios

Package Overview
Dependencies
5
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.2 to 2.3.0

4

build/src/common.d.ts

@@ -95,7 +95,7 @@ /// <reference types="node" />

*/
onRetryAttempt?: (err: GaxiosError) => void;
onRetryAttempt?: (err: GaxiosError) => Promise<void> | void;
/**
* Function to invoke which determines if you should retry
*/
shouldRetry?: (err: GaxiosError) => boolean;
shouldRetry?: (err: GaxiosError) => Promise<boolean> | boolean;
/**

@@ -102,0 +102,0 @@ * When there is no response, the number of retries to attempt. Defaults to 2.

@@ -54,3 +54,3 @@ "use strict";

const shouldRetryFn = config.shouldRetry || shouldRetryRequest;
if (!shouldRetryFn(err)) {
if (!(await shouldRetryFn(err))) {
return { shouldRetry: false, config: err.config };

@@ -57,0 +57,0 @@ }

# Changelog
## [2.3.0](https://www.github.com/googleapis/gaxios/compare/v2.2.2...v2.3.0) (2020-01-31)
### Features
* add promise support for onRetryAttempt and shouldRetry ([#223](https://www.github.com/googleapis/gaxios/issues/223)) ([061afa3](https://www.github.com/googleapis/gaxios/commit/061afa381a51d39823e63accf3dacd16e191f3b9))
### [2.2.2](https://www.github.com/googleapis/gaxios/compare/v2.2.1...v2.2.2) (2020-01-08)

@@ -4,0 +11,0 @@

{
"name": "gaxios",
"version": "2.2.2",
"version": "2.3.0",
"description": "A simple common HTTP client specifically for Google APIs and services.",

@@ -42,3 +42,3 @@ "main": "build/src/index.js",

"@types/extend": "^3.0.1",
"@types/mocha": "^5.2.6",
"@types/mocha": "^7.0.0",
"@types/mv": "^2.1.0",

@@ -54,3 +54,3 @@ "@types/ncp": "^2.0.1",

"codecov": "^3.2.0",
"execa": "^3.0.0",
"execa": "^4.0.0",
"express": "^4.16.4",

@@ -57,0 +57,0 @@ "gts": "^1.0.0",

@@ -119,6 +119,6 @@ # gaxios

// Function to invoke when a retry attempt is made.
onRetryAttempt?: (err: GaxiosError) => void;
onRetryAttempt?: (err: GaxiosError) => Promise<void> | void;
// Function to invoke which determines if you should retry
shouldRetry?: (err: GaxiosError) => boolean;
shouldRetry?: (err: GaxiosError) => Promise<boolean> | boolean;

@@ -125,0 +125,0 @@ // When there is no response, the number of retries to attempt. Defaults to 2.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc