Skip to content

fix(deps): update dependency @octokit/tsconfig to v2, explicitly mark type imports #588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"devDependencies": {
"@octokit/auth-app": "^4.0.0",
"@octokit/tsconfig": "^1.0.2",
"@octokit/tsconfig": "^2.0.0",
"@types/fetch-mock": "^7.2.4",
"@types/jest": "^29.0.0",
"@types/lolex": "^5.1.0",
Expand All @@ -50,7 +50,14 @@
"typescript": "^5.0.0"
},
"jest": {
"preset": "ts-jest",
"transform": {
"^.+\\.(ts|tsx)$": [
"ts-jest",
{
"tsconfig": "test/tsconfig.test.json"
}
]
},
"coverageThreshold": {
"global": {
"statements": 100,
Expand Down
4 changes: 2 additions & 2 deletions src/fetch-wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isPlainObject } from "is-plain-object";
import nodeFetch, { HeadersInit, Response } from "node-fetch";
import nodeFetch, { type HeadersInit, type Response } from "node-fetch";
import { RequestError } from "@octokit/request-error";
import { EndpointInterface } from "@octokit/types";
import type { EndpointInterface } from "@octokit/types";

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

Expand Down
2 changes: 1 addition & 1 deletion src/get-buffer-response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Response } from "node-fetch";
import type { Response } from "node-fetch";
export default function getBufferResponse(response: Response) {
return response.arrayBuffer();
}
2 changes: 1 addition & 1 deletion src/with-defaults.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fetchWrapper from "./fetch-wrapper";
import {
import type {
EndpointOptions,
EndpointInterface,
OctokitResponse,
Expand Down
4 changes: 2 additions & 2 deletions test/request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import stream from "stream";

import { getUserAgent } from "universal-user-agent";
import fetchMock from "fetch-mock";
import { Headers, RequestInit } from "node-fetch";
import { Headers, type RequestInit } from "node-fetch";
import { createAppAuth } from "@octokit/auth-app";
import lolex from "lolex";
import {
import type {
EndpointOptions,
RequestInterface,
ResponseHeaders,
Expand Down
9 changes: 9 additions & 0 deletions test/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"emitDeclarationOnly": false,
"noEmit": true,
"verbatimModuleSyntax": false
},
"include": ["src/**/*"]
}