Comparing version 2.1.0 to 2.2.0
@@ -15,2 +15,5 @@ /// <reference types="node" /> | ||
export declare type GaxiosPromise<T = any> = Promise<GaxiosResponse<T>>; | ||
export interface GaxiosXMLHttpRequest { | ||
responseURL: string; | ||
} | ||
export interface GaxiosResponse<T = any> { | ||
@@ -22,2 +25,3 @@ config: GaxiosOptions; | ||
headers: Headers; | ||
request: GaxiosXMLHttpRequest; | ||
} | ||
@@ -24,0 +28,0 @@ /** |
@@ -205,2 +205,6 @@ "use strict"; | ||
statusText: res.statusText, | ||
// XMLHttpRequestLike | ||
request: { | ||
responseURL: res.url, | ||
}, | ||
}; | ||
@@ -207,0 +211,0 @@ } |
@@ -82,2 +82,7 @@ "use strict"; | ||
const config = getConfig(err); | ||
// node-fetch raises an AbortError if signaled: | ||
// https://github.com/bitinn/node-fetch#request-cancellation-with-abortsignal | ||
if (err.name === 'AbortError') { | ||
return false; | ||
} | ||
// If there's no config, or retries are disabled, return. | ||
@@ -84,0 +89,0 @@ if (!config || config.retry === 0) { |
# Changelog | ||
## [2.2.0](https://www.github.com/googleapis/gaxios/compare/v2.1.1...v2.2.0) (2019-12-05) | ||
### Features | ||
* populate GaxiosResponse with raw response information (res.url) ([#189](https://www.github.com/googleapis/gaxios/issues/189)) ([53a7f54](https://www.github.com/googleapis/gaxios/commit/53a7f54cc0f20320d7a6a21a9a9f36050cec2eec)) | ||
### Bug Fixes | ||
* don't retry a request that is aborted intentionally ([#190](https://www.github.com/googleapis/gaxios/issues/190)) ([ba9777b](https://www.github.com/googleapis/gaxios/commit/ba9777b15b5262f8288a8bb3cca49a1de8427d8e)) | ||
* **deps:** pin TypeScript below 3.7.0 ([5373f07](https://www.github.com/googleapis/gaxios/commit/5373f0793a765965a8221ecad2f99257ed1b7444)) | ||
### [2.1.1](https://www.github.com/googleapis/gaxios/compare/v2.1.0...v2.1.1) (2019-11-15) | ||
### Bug Fixes | ||
* **docs:** snippets are now replaced in jsdoc comments ([#183](https://www.github.com/googleapis/gaxios/issues/183)) ([8dd1324](https://www.github.com/googleapis/gaxios/commit/8dd1324256590bd2f2e9015c813950e1cd8cb330)) | ||
## [2.1.0](https://www.github.com/googleapis/gaxios/compare/v2.0.3...v2.1.0) (2019-10-09) | ||
@@ -4,0 +24,0 @@ |
{ | ||
"name": "gaxios", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "A simple common HTTP client specifically for Google APIs and services.", | ||
@@ -51,3 +51,3 @@ "main": "build/src/index.js", | ||
"assert-rejects": "^1.0.0", | ||
"c8": "^5.0.1", | ||
"c8": "^6.0.0", | ||
"codecov": "^3.2.0", | ||
@@ -72,3 +72,3 @@ "execa": "^3.0.0", | ||
"null-loader": "^3.0.0", | ||
"puppeteer": "^1.12.2", | ||
"puppeteer": "^2.0.0", | ||
"sinon": "^7.2.5", | ||
@@ -78,3 +78,3 @@ "source-map-support": "^0.5.10", | ||
"ts-loader": "^6.0.0", | ||
"typescript": "~3.6.0", | ||
"typescript": "3.6.4", | ||
"webpack": "^4.29.5", | ||
@@ -81,0 +81,0 @@ "webpack-cli": "^3.2.3" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
50983
565
2