@octokit/core
Advanced tools
Comparing version 3.2.5 to 3.3.0
@@ -47,3 +47,3 @@ 'use strict'; | ||
const VERSION = "3.2.5"; | ||
const VERSION = "3.3.0"; | ||
@@ -57,2 +57,3 @@ class Octokit { | ||
request: Object.assign({}, options.request, { | ||
// @ts-ignore internal usage only, no need to type | ||
hook: hook.bind(null, "request") | ||
@@ -59,0 +60,0 @@ }), |
@@ -14,2 +14,3 @@ import { getUserAgent } from "universal-user-agent"; | ||
request: Object.assign({}, options.request, { | ||
// @ts-ignore internal usage only, no need to type | ||
hook: hook.bind(null, "request"), | ||
@@ -16,0 +17,0 @@ }), |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "3.2.5"; | ||
export const VERSION = "3.3.0"; |
import { HookCollection } from "before-after-hook"; | ||
import { request } from "@octokit/request"; | ||
import { graphql } from "@octokit/graphql"; | ||
import { Constructor, OctokitOptions, OctokitPlugin, ReturnTypeOf, UnionToIntersection } from "./types"; | ||
import { Constructor, Hooks, OctokitOptions, OctokitPlugin, ReturnTypeOf, UnionToIntersection } from "./types"; | ||
export declare class Octokit { | ||
@@ -37,5 +37,5 @@ static VERSION: string; | ||
}; | ||
hook: HookCollection; | ||
hook: HookCollection<Hooks>; | ||
auth: (...args: unknown[]) => Promise<unknown>; | ||
[key: string]: any; | ||
} |
import * as OctokitTypes from "@octokit/types"; | ||
import { RequestError } from "@octokit/request-error"; | ||
import { Octokit } from "."; | ||
@@ -31,2 +32,14 @@ export declare type RequestParameters = OctokitTypes.RequestParameters; | ||
} | void; | ||
export declare type Hooks = { | ||
request: { | ||
Options: OctokitTypes.EndpointOptions; | ||
Result: OctokitTypes.OctokitResponse<any>; | ||
Error: RequestError | Error; | ||
}; | ||
[key: string]: { | ||
Options: unknown; | ||
Result: unknown; | ||
Error: unknown; | ||
}; | ||
}; | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "3.2.5"; | ||
export declare const VERSION = "3.3.0"; |
@@ -7,3 +7,3 @@ import { getUserAgent } from 'universal-user-agent'; | ||
const VERSION = "3.2.5"; | ||
const VERSION = "3.3.0"; | ||
@@ -17,2 +17,3 @@ class Octokit { | ||
request: Object.assign({}, options.request, { | ||
// @ts-ignore internal usage only, no need to type | ||
hook: hook.bind(null, "request"), | ||
@@ -19,0 +20,0 @@ }), |
{ | ||
"name": "@octokit/core", | ||
"description": "Extendable client for GitHub's REST & GraphQL APIs", | ||
"version": "3.2.5", | ||
"version": "3.3.0", | ||
"license": "MIT", | ||
@@ -19,3 +19,3 @@ "files": [ | ||
], | ||
"repository": "https://github.com/octokit/core.js", | ||
"repository": "github:octokit/core.js", | ||
"dependencies": { | ||
@@ -25,4 +25,5 @@ "@octokit/auth-token": "^2.4.4", | ||
"@octokit/request": "^5.4.12", | ||
"@octokit/request-error": "^2.0.5", | ||
"@octokit/types": "^6.0.3", | ||
"before-after-hook": "^2.1.0", | ||
"before-after-hook": "^2.2.0", | ||
"universal-user-agent": "^6.0.0" | ||
@@ -29,0 +30,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
52101
481
7
Updatedbefore-after-hook@^2.2.0