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

hubkit

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubkit - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

bower.json
{
"name": "hubkit",
"version": "0.3.0",
"version": "0.3.1",
"homepage": "https://github.com/pkaminski/hubkit",

@@ -5,0 +5,0 @@ "authors": [

@@ -151,2 +151,11 @@ if (typeof require !== 'undefined') {

}
// If the request failed due to CORS, it may be because it was both preflighted and
// redirected. Attempt to recover by reissuing it as a simple request without preflight,
// which requires getting rid of all extraneous headers.
if (cacheable &&
/Origin is not allowed by Access-Control-Allow-Origin/.test(error.originalMessage)) {
cacheable = false;
retry();
return;
}
var value, retryDelay;

@@ -340,3 +349,10 @@ if (options.onError) value = options.onError(error);

if (req.agent) req.agent(options.agent);
if (options.token) req.set('Authorization', 'token ' + options.token);
if (options.token) {
if (typeof module === 'undefined' && (
options.method === 'GET' || options.method === 'HEAD')) {
req.query({'access_token': options.token});
} else {
req.set('Authorization', 'token ' + options.token);
}
}
if (!options.token && options.username && options.password) {

@@ -352,5 +368,8 @@ req.auth(options.username, options.password);

// Work around Firefox bug that forces caching. We can't use Cache-Control because it's not
// allowed by Github's cross-domain request headers.
// allowed by Github's cross-domain request headers, and because we want to keep our requests
// simple to avoid CORS preflight whenever possible.
// https://bugzilla.mozilla.org/show_bug.cgi?id=428916
req.set('If-Modified-Since', 'Sat, 1 Jan 2000 00:00:00 GMT');
if (typeof module === 'undefined') {
req.query({'_nocache': Math.round(Math.random() * 1000000)});
}
}

@@ -357,0 +376,0 @@

{
"name": "hubkit",
"version": "0.3.0",
"version": "0.3.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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc