@octokit/core
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -11,3 +11,3 @@ 'use strict'; | ||
const VERSION = "2.3.0"; | ||
const VERSION = "2.4.0"; | ||
@@ -88,3 +88,6 @@ class Octokit { | ||
constructor(...args) { | ||
super(Object.assign({}, defaults, args[0] || {})); | ||
const options = args[0] || {}; | ||
super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? { | ||
userAgent: `${options.userAgent} ${defaults.userAgent}` | ||
} : null)); | ||
} | ||
@@ -91,0 +94,0 @@ |
@@ -82,3 +82,8 @@ import { getUserAgent } from "universal-user-agent"; | ||
constructor(...args) { | ||
super(Object.assign({}, defaults, args[0] || {})); | ||
const options = args[0] || {}; | ||
super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent | ||
? { | ||
userAgent: `${options.userAgent} ${defaults.userAgent}` | ||
} | ||
: null)); | ||
} | ||
@@ -85,0 +90,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "2.3.0"; | ||
export const VERSION = "2.4.0"; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.3.0"; | ||
export declare const VERSION = "2.4.0"; |
@@ -7,3 +7,3 @@ import { getUserAgent } from 'universal-user-agent'; | ||
const VERSION = "2.3.0"; | ||
const VERSION = "2.4.0"; | ||
@@ -85,3 +85,8 @@ class Octokit { | ||
constructor(...args) { | ||
super(Object.assign({}, defaults, args[0] || {})); | ||
const options = args[0] || {}; | ||
super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent | ||
? { | ||
userAgent: `${options.userAgent} ${defaults.userAgent}` | ||
} | ||
: null)); | ||
} | ||
@@ -88,0 +93,0 @@ }; |
{ | ||
"name": "@octokit/core", | ||
"description": "Extendable client for GitHub's REST & GraphQL APIs", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
43659
363