From 1d636af56d213b311e79778a5bc5da7b856c6f0d Mon Sep 17 00:00:00 2001 From: Daniel Kennedy Date: Fri, 30 Jan 2026 14:15:49 -0500 Subject: [PATCH] Upgrade jest and typescript --- jest.config.ts | 18 +++++++++++++++--- tsconfig.json | 6 +++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 39b6cbb..8d3f65e 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -1,12 +1,24 @@ -module.exports = { +export default { clearMocks: true, moduleFileExtensions: ['js', 'ts'], roots: [''], testEnvironment: 'node', testMatch: ['**/*.test.ts'], - testRunner: 'jest-circus/runner', transform: { - '^.+\\.ts$': 'ts-jest' + '^.+\\.ts$': [ + 'ts-jest', + { + useESM: true, + diagnostics: { + ignoreCodes: [151002] + } + } + ] + }, + extensionsToTreatAsEsm: ['.ts'], + transformIgnorePatterns: ['node_modules/(?!(@actions)/)'], + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1' }, verbose: true } diff --git a/tsconfig.json b/tsconfig.json index 316f130..926f515 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,12 @@ { "compilerOptions": { - "target": "es6", - "module": "commonjs", + "target": "ES2022", + "module": "NodeNext", "outDir": "./lib", "rootDir": "./src", "strict": true, "noImplicitAny": false, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "esModuleInterop": true }, "exclude": ["node_modules", "**/*.test.ts", "jest.config.ts", "__tests__"]