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

balena-request

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

balena-request - npm Package Compare versions

Comparing version 11.0.3 to 11.0.4-node-fix-body-overwrite-432ee302c8c55e629f4915146d4d1c7388d6b01b

8

build/request.js

@@ -174,3 +174,9 @@ "use strict";

const body = yield utils.getBody(response, options.responseFormat);
response = Object.assign(Object.assign({}, response), { body });
// We have to use Object.defineProperty in order to overwrite the body property
// for node-fetch without losing all the other properties/methods
Object.defineProperty(response, 'body', {
get() {
return body;
},
});
if (utils.isErrorCode(response.statusCode)) {

@@ -177,0 +183,0 @@ const responseError = utils.getErrorMessageFromResponse(response);

@@ -7,2 +7,7 @@ # Change Log

# v11.0.4
## (2020-07-14)
* Fix body overwriting on nodejs [Pagan Gazzard]
# v11.0.3

@@ -9,0 +14,0 @@ ## (2020-07-13)

@@ -202,3 +202,9 @@ /*

const body = await utils.getBody(response, options.responseFormat);
response = { ...response, body };
// We have to use Object.defineProperty in order to overwrite the body property
// for node-fetch without losing all the other properties/methods
Object.defineProperty(response, 'body', {
get() {
return body;
},
});

@@ -205,0 +211,0 @@ if (utils.isErrorCode(response.statusCode)) {

2

package.json
{
"name": "balena-request",
"version": "11.0.3",
"version": "11.0.4-node-fix-body-overwrite-432ee302c8c55e629f4915146d4d1c7388d6b01b",
"description": "Balena HTTP client",

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

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