Skip to content

Commit 71d7488

Browse files
renovate[bot]wolfy1339
andauthoredJun 13, 2023
fix(deps): update dependency @octokit/tsconfig to v2, explicitly mark type imports (#588)
Co-authored-by: wolfy1339 <webmaster@wolfy1339.com>
1 parent ab33ea2 commit 71d7488

7 files changed

+31
-15
lines changed
 

‎package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"devDependencies": {
3333
"@octokit/auth-app": "^4.0.0",
34-
"@octokit/tsconfig": "^1.0.2",
34+
"@octokit/tsconfig": "^2.0.0",
3535
"@types/fetch-mock": "^7.2.4",
3636
"@types/jest": "^29.0.0",
3737
"@types/lolex": "^5.1.0",
@@ -50,7 +50,14 @@
5050
"typescript": "^5.0.0"
5151
},
5252
"jest": {
53-
"preset": "ts-jest",
53+
"transform": {
54+
"^.+\\.(ts|tsx)$": [
55+
"ts-jest",
56+
{
57+
"tsconfig": "test/tsconfig.test.json"
58+
}
59+
]
60+
},
5461
"coverageThreshold": {
5562
"global": {
5663
"statements": 100,

‎src/fetch-wrapper.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { isPlainObject } from "is-plain-object";
2-
import nodeFetch, { HeadersInit, Response } from "node-fetch";
2+
import nodeFetch, { type HeadersInit, type Response } from "node-fetch";
33
import { RequestError } from "@octokit/request-error";
4-
import { EndpointInterface } from "@octokit/types";
4+
import type { EndpointInterface } from "@octokit/types";
55

66
import getBuffer from "./get-buffer-response";
77

‎src/get-buffer-response.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Response } from "node-fetch";
1+
import type { Response } from "node-fetch";
22
export default function getBufferResponse(response: Response) {
33
return response.arrayBuffer();
44
}

‎src/with-defaults.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fetchWrapper from "./fetch-wrapper";
2-
import {
2+
import type {
33
EndpointOptions,
44
EndpointInterface,
55
OctokitResponse,

‎test/request.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import stream from "stream";
33

44
import { getUserAgent } from "universal-user-agent";
55
import fetchMock from "fetch-mock";
6-
import { Headers, RequestInit } from "node-fetch";
6+
import { Headers, type RequestInit } from "node-fetch";
77
import { createAppAuth } from "@octokit/auth-app";
88
import lolex from "lolex";
9-
import {
9+
import type {
1010
EndpointOptions,
1111
RequestInterface,
1212
ResponseHeaders,

‎test/tsconfig.test.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"emitDeclarationOnly": false,
5+
"noEmit": true,
6+
"verbatimModuleSyntax": false
7+
},
8+
"include": ["src/**/*"]
9+
}

0 commit comments

Comments
 (0)
Please sign in to comment.