Socket
Socket
Sign inDemoInstall

hubkit

Package Overview
Dependencies
11
Maintainers
2
Versions
121
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.2.0 to 5.2.1

22

hubkit.js

@@ -503,13 +503,6 @@ if (typeof require !== 'undefined') {

case 'ghe':
if (fullOptions.host === 'https://api.github.com') return contents;
if (satisfiesGheVersion(fullOptions, arg)) return contents;
if (!fullOptions.gheVersion) {
throw new Error('Hubkit unable to process #ghe directive: gheVersion missing');
}
var neededVersion = arg.split('.').map(function(x) {return parseInt(x, 10);});
var actualVersion =
fullOptions.gheVersion.split('.').map(function(x) {return parseInt(x, 10);});
if (actualVersion[0] > neededVersion[0] ||
actualVersion[0] === neededVersion[0] && actualVersion[1] >= neededVersion[1]) {
return contents;
}
return '';

@@ -628,3 +621,5 @@ case 'scope':

}
if (options.apiVersion) config.headers['X-GitHub-Api-Version'] = options.apiVersion;
if (options.apiVersion && satisfiesGheVersion(options, '3.9')) {
config.headers['X-GitHub-Api-Version'] = options.apiVersion;
}
/* eslint-enable dot-notation */

@@ -688,3 +683,12 @@ }

function satisfiesGheVersion(options, minVersion) {
if (options.host === 'https://api.github.com') return true;
if (!options.gheVersion) return false;
var neededVersion = minVersion.split('.').map(function(x) {return parseInt(x, 10);});
var actualVersion = options.gheVersion.split('.').map(function(x) {return parseInt(x, 10);});
return actualVersion[0] > neededVersion[0] ||
actualVersion[0] === neededVersion[0] && actualVersion[1] >= neededVersion[1];
}
return Hubkit;
});
{
"name": "hubkit",
"version": "5.2.0",
"version": "5.2.1",
"description": "GitHub API library for JavaScript, promise-based, for both NodeJS and the browser",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc