diff --git a/__tests__/fixtures/mocks.ts b/__tests__/fixtures/mocks.ts index fc2a1dbb..f6768e9b 100644 --- a/__tests__/fixtures/mocks.ts +++ b/__tests__/fixtures/mocks.ts @@ -111,10 +111,12 @@ export const createOctokitMock = ( rest: { repos: { get: jest - .fn() + .fn< + () => Promise + >() .mockResolvedValue({ data: { owner: { type: ownerType } } - }) + } as RestEndpointMethodTypes['repos']['get']['response']) } } }) diff --git a/__tests__/index.test.ts b/__tests__/index.test.ts index 9681388f..38778768 100644 --- a/__tests__/index.test.ts +++ b/__tests__/index.test.ts @@ -2,8 +2,8 @@ import { jest } from '@jest/globals' // Mock functions const mockRun = jest.fn() -const mockGetInput = jest.fn() -const mockGetBooleanInput = jest.fn() +const mockGetInput = jest.fn<(name: string) => string>() +const mockGetBooleanInput = jest.fn<(name: string) => boolean>() // Mock @actions/core jest.unstable_mockModule('@actions/core', () => ({ diff --git a/package-lock.json b/package-lock.json index ac1d5af9..ff3f2106 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "nock": "^13.5.6", "prettier": "^3.8.3", "ts-jest": "^29.4.9", - "typescript": "^5.9.3", + "typescript": "^6.0.3", "typescript-eslint": "^8.58.2", "undici": "^7.24.4" }, @@ -9769,9 +9769,9 @@ } }, "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index b633af3a..2d5e11e3 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "nock": "^13.5.6", "prettier": "^3.8.3", "ts-jest": "^29.4.9", - "typescript": "^5.9.3", + "typescript": "^6.0.3", "typescript-eslint": "^8.58.2", "undici": "^7.24.4" } diff --git a/tsconfig.json b/tsconfig.json index 679afac9..23a9fb51 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,6 @@ "rootDir": "./src", "moduleResolution": "Bundler", "isolatedModules": true, - "baseUrl": "./", "sourceMap": true, "outDir": "./dist", "noImplicitAny": true, @@ -14,6 +13,7 @@ "forceConsistentCasingInFileNames": true, "strict": true, "skipLibCheck": true, + "ignoreDeprecations": "6.0", "newLine": "lf" }, "exclude": ["./dist", "./node_modules", "./__tests__", "./coverage"] diff --git a/tsconfig.lint.json b/tsconfig.lint.json index a08b5639..09b3baa8 100644 --- a/tsconfig.lint.json +++ b/tsconfig.lint.json @@ -1,8 +1,9 @@ { - "$schema": "https://json.schemastore.org/tsconfig", "extends": "./tsconfig.json", "compilerOptions": { - "noEmit": true + "rootDir": ".", + "noEmit": true, + "types": ["jest", "node"] }, "include": ["./__tests__/**/*", "./src/**/*"], "exclude": ["./dist", "./node_modules", "./coverage", "*.json"]