From 6c4e9ffda9b8ac297042dc9158a976411fcde61a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 01:30:40 +0000 Subject: [PATCH 1/2] Bump typescript from 5.9.3 to 6.0.3 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 6.0.3. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.3...v6.0.3) --- updated-dependencies: - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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" } From d3338bfd993086298cc73c937ddf55a8fe8549b9 Mon Sep 17 00:00:00 2001 From: ejahnGithub Date: Mon, 11 May 2026 17:40:04 -0400 Subject: [PATCH 2/2] Fix lint and test failures for TypeScript 6.0 bump - Remove deprecated 'baseUrl' compiler option (defaulted to current behavior) - Add 'ignoreDeprecations: 6.0' to silence moduleResolution deprecation surfaced through ts-jest 29 - Set 'rootDir: .' and 'types: [jest, node]' in tsconfig.lint.json so __tests__ are accepted by typed lint - Type jest.fn() factories explicitly with function signatures so @types/jest 30 + TS 6.0 stricter inference accept the mock APIs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- __tests__/fixtures/mocks.ts | 6 ++++-- __tests__/index.test.ts | 4 ++-- tsconfig.json | 2 +- tsconfig.lint.json | 5 +++-- 4 files changed, 10 insertions(+), 7 deletions(-) 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/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"]