Socket
Socket
Sign inDemoInstall

@octokit/request

Package Overview
Dependencies
Maintainers
2
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/request - npm Package Compare versions

Comparing version 5.4.15 to 5.5.0

10

dist-node/index.js

@@ -13,3 +13,3 @@ 'use strict';

const VERSION = "5.4.15";
const VERSION = "5.5.0";

@@ -21,2 +21,4 @@ function getBufferResponse(response) {

function fetchWrapper(requestOptions) {
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {

@@ -45,2 +47,8 @@ requestOptions.body = JSON.stringify(requestOptions.body);

if ("deprecation" in headers) {
const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
const deprecationLink = matches && matches.pop();
log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`);
}
if (status === 204 || status === 205) {

@@ -47,0 +55,0 @@ return;

@@ -6,2 +6,5 @@ import { isPlainObject } from "is-plain-object";

export default function fetchWrapper(requestOptions) {
const log = requestOptions.request && requestOptions.request.log
? requestOptions.request.log
: console;
if (isPlainObject(requestOptions.body) ||

@@ -30,2 +33,7 @@ Array.isArray(requestOptions.body)) {

}
if ("deprecation" in headers) {
const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
const deprecationLink = matches && matches.pop();
log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`);
}
if (status === 204 || status === 205) {

@@ -32,0 +40,0 @@ return;

2

dist-src/version.js

@@ -1,1 +0,1 @@

export const VERSION = "5.4.15";
export const VERSION = "5.5.0";

@@ -1,1 +0,1 @@

export declare const VERSION = "5.4.15";
export declare const VERSION = "5.5.0";

@@ -7,3 +7,3 @@ import { endpoint } from '@octokit/endpoint';

const VERSION = "5.4.15";
const VERSION = "5.5.0";

@@ -15,2 +15,5 @@ function getBufferResponse(response) {

function fetchWrapper(requestOptions) {
const log = requestOptions.request && requestOptions.request.log
? requestOptions.request.log
: console;
if (isPlainObject(requestOptions.body) ||

@@ -39,2 +42,7 @@ Array.isArray(requestOptions.body)) {

}
if ("deprecation" in headers) {
const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
const deprecationLink = matches && matches.pop();
log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`);
}
if (status === 204 || status === 205) {

@@ -41,0 +49,0 @@ return;

{
"name": "@octokit/request",
"description": "Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node",
"version": "5.4.15",
"version": "5.5.0",
"license": "MIT",

@@ -22,3 +22,3 @@ "files": [

"@octokit/request-error": "^2.0.0",
"@octokit/types": "^6.7.1",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",

@@ -41,8 +41,8 @@ "node-fetch": "^2.6.1",

"fetch-mock": "^9.3.1",
"jest": "^26.0.1",
"jest": "^27.0.0",
"lolex": "^6.0.0",
"prettier": "^2.0.1",
"prettier": "2.3.0",
"semantic-release": "^17.0.0",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"ts-jest": "^26.1.0",
"ts-jest": "^27.0.0",
"typescript": "^4.0.2"

@@ -49,0 +49,0 @@ },

@@ -347,2 +347,12 @@ # request.js

</tr>
<th align=left>
<code>options.request.log</code>
</th>
<th>
<code>object</code>
</th>
<td>
Used for internal logging. Defaults to <a href="https://developer.mozilla.org/en-US/docs/Web/API/console"><code>console</code></a>.
</td>
</tr>
<tr>

@@ -349,0 +359,0 @@ <th align=left>

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