fix(deps): update dependency @octokit/types to v14 (#731) · octokit/core.js@3700c41 (original) (raw)
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -27,10 +27,10 @@ | ||
| 27 | 27 | "license": "MIT", |
| 28 | 28 | "dependencies": { |
| 29 | 29 | "@octokit/auth-token": "^5.0.0", |
| 30 | -"@octokit/graphql": "^8.1.2", | |
| 31 | -"@octokit/request": "^9.2.1", | |
| 32 | -"@octokit/request-error": "^6.1.7", | |
| 33 | -"@octokit/types": "^13.6.2", | |
| 30 | +"@octokit/graphql": "^8.2.2", | |
| 31 | +"@octokit/request": "^9.2.3", | |
| 32 | +"@octokit/request-error": "^6.1.8", | |
| 33 | +"@octokit/types": "^14.0.0", | |
| 34 | 34 | "before-after-hook": "^3.0.2", |
| 35 | 35 | "universal-user-agent": "^7.0.0" |
| 36 | 36 | }, |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -12,6 +12,7 @@ import type { | ||
| 12 | 12 | OctokitPlugin, |
| 13 | 13 | RequestParameters, |
| 14 | 14 | ReturnTypeOf, |
| 15 | +StrictOmit, | |
| 15 | 16 | UnionToIntersection, |
| 16 | 17 | } from "./types.js"; |
| 17 | 18 | import { VERSION } from "./version.js"; |
| @@ -81,7 +82,10 @@ export class Octokit { | ||
| 81 | 82 | |
| 82 | 83 | constructor(options: OctokitOptions = {}) { |
| 83 | 84 | const hook = new Hook.Collection<Hooks>(); |
| 84 | -const requestDefaults: Required<RequestParameters> = { | |
| 85 | +const requestDefaults: StrictOmit< | |
| 86 | +Required<RequestParameters>, | |
| 87 | +"query" | "operationName" | |
| 88 | +> = { | |
| 85 | 89 | baseUrl: request.endpoint.DEFAULTS.baseUrl, |
| 86 | 90 | headers: {}, |
| 87 | 91 | request: Object.assign({}, options.request, { |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -63,3 +63,8 @@ export type Hooks = { | ||
| 63 | 63 | Error: unknown; |
| 64 | 64 | }; |
| 65 | 65 | }; |
| 66 | +export type StrictOmit<T, K extends keyof T> = { | |
| 67 | +[P in keyof T as P extends K ? never : P]: T[P]; | |
| 68 | +} & { | |
| 69 | +[parameter: string]: unknown; | |
| 70 | +}; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -116,7 +116,6 @@ describe("octokit.request()", () => { | ||
| 116 | 116 | accept: "application/vnd.github.v3.raw", |
| 117 | 117 | "user-agent": userAgent, |
| 118 | 118 | }, |
| 119 | -overwriteRoutes: false, | |
| 120 | 119 | }, |
| 121 | 120 | ); |
| 122 | 121 |