Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gaxios

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gaxios - npm Package Compare versions

Comparing version 5.1.1 to 5.1.2

15

build/src/common.js

@@ -22,3 +22,2 @@ "use strict";

this.config = options;
this.response.data = translateData(options.responseType, response.data);
this.code = response.status.toString();

@@ -28,16 +27,2 @@ }

exports.GaxiosError = GaxiosError;
function translateData(responseType, data) {
switch (responseType) {
case 'stream':
return data;
case 'json':
return JSON.parse(JSON.stringify(data));
case 'arraybuffer':
return JSON.parse(Buffer.from(data).toString('utf8'));
case 'blob':
return JSON.parse(data.text());
default:
return JSON.parse(data.text());
}
}
//# sourceMappingURL=common.js.map

@@ -130,12 +130,2 @@ "use strict";

if (!opts.validateStatus(translatedResponse.status)) {
if (opts.responseType === 'stream') {
let response = '';
await new Promise(resolve => {
translatedResponse.data.on('data', chunk => {
response += chunk;
});
translatedResponse.data.on('end', resolve);
});
translatedResponse.data = response;
}
throw new common_1.GaxiosError(`Request failed with status code ${translatedResponse.status}`, opts, translatedResponse);

@@ -142,0 +132,0 @@ }

7

CHANGELOG.md
# Changelog
## [5.1.2](https://github.com/googleapis/gaxios/compare/v5.1.1...v5.1.2) (2023-06-25)
### Bug Fixes
* Revert changes to error handling due to downstream breakage ([#544](https://github.com/googleapis/gaxios/issues/544)) ([64fbf07](https://github.com/googleapis/gaxios/commit/64fbf07f3697f40b75a9e7dbe8bff7f6243a9e12))
## [5.1.1](https://github.com/googleapis/gaxios/compare/v5.1.0...v5.1.1) (2023-06-23)

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

2

package.json
{
"name": "gaxios",
"version": "5.1.1",
"version": "5.1.2",
"description": "A simple common HTTP client specifically for Google APIs and services.",

@@ -5,0 +5,0 @@ "main": "build/src/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc