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

@octokit/rest

Package Overview
Dependencies
Maintainers
3
Versions
297
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/rest - npm Package Compare versions

Comparing version 15.2.6 to 15.2.7

5

lib/defaults.js
module.exports = {
agent: undefined, // https://nodejs.org/api/https.html#https_class_https_agent
headers: {},
requestMedia: 'application/vnd.github.v3+json',
headers: {
accept: 'application/vnd.github.v3+json'
},
timeout: 0,
baseUrl: 'https://api.github.com'
}

3

lib/parse-client-options.js

@@ -12,4 +12,3 @@ module.exports = parseOptions

'agent',
'headers',
'requestMedia'
'headers'
]

@@ -16,0 +15,0 @@

@@ -42,4 +42,2 @@ 'use strict'

.then(response => {
const contentType = response.headers.get('content-type')
for (const keyAndValue of response.headers.entries()) {

@@ -53,2 +51,11 @@ headers[keyAndValue[0]] = keyAndValue[1]

// GitHub API returns 200 for HEAD requsets
if (requestOptions.method === 'HEAD') {
if (response.status < 400) {
return
}
throw new HttpError(response.statusText, response.status, headers)
}
if (response.status === 304) {

@@ -67,2 +74,3 @@ requestOptions.url = response.headers.location

const contentType = response.headers.get('content-type')
if (/application\/json/.test(contentType)) {

@@ -69,0 +77,0 @@ return response.json()

{
"name": "@octokit/rest",
"version": "15.2.6",
"version": "15.2.7",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

@@ -61,4 +61,4 @@ # rest.js

timeout: 0, // 0 means no request timeout
requestMedia: 'application/vnd.github.v3+json',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit/rest.js v1.2.3' // v1.2.3 will be current version

@@ -65,0 +65,0 @@ },

Sorry, the diff of this file is too big to display

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