@octokit/rest
Advanced tools
Comparing version 14.0.5 to 14.0.6
@@ -11,2 +11,3 @@ 'use strict' | ||
const debug = require('debug')('octokit:rest') | ||
const isArrayBuffer = require('is-array-buffer') | ||
const isStream = require('is-stream') | ||
@@ -26,3 +27,4 @@ | ||
if (requestOptions.body && !isStream(requestOptions.body)) { | ||
if (typeof requestOptions.body !== 'string') { | ||
// stringify body unless it’s an ArrayBuffer | ||
if (!isArrayBuffer(requestOptions.body) && !Buffer.isBuffer(requestOptions.body) && typeof requestOptions.body !== 'string') { | ||
requestOptions.body = JSON.stringify(requestOptions.body) | ||
@@ -29,0 +31,0 @@ } |
{ | ||
"name": "@octokit/rest", | ||
"version": "14.0.5", | ||
"version": "14.0.6", | ||
"publishConfig": { | ||
@@ -36,2 +36,3 @@ "access": "public" | ||
"https-proxy-agent": "^2.1.0", | ||
"is-array-buffer": "^1.0.0", | ||
"is-stream": "^1.1.0", | ||
@@ -60,2 +61,3 @@ "lodash": "^4.17.4", | ||
"standard-markdown": "^4.0.2", | ||
"string-to-arraybuffer": "^1.0.0", | ||
"typescript": "^2.6.2" | ||
@@ -62,0 +64,0 @@ }, |
Sorry, the diff of this file is too big to display
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
558428
14660
9
19
+ Addedis-array-buffer@^1.0.0
+ Addedis-array-buffer@1.0.1(transitive)