diff --git a/jest.config.ts b/jest.config.ts index 1e38f5f..cf68216 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -26,7 +26,9 @@ const config: Config = { setupFilesAfterEnv: ['/jest.setup.ts'], testEnvironment: 'node', transform: { - '^.+.tsx?$': ['ts-jest', {}], + '^.+.tsx?$': ['ts-jest', { + tsconfig: 'tsconfig.dev.json', + }], }, modulePathIgnorePatterns: [ '/dist', diff --git a/package-lock.json b/package-lock.json index 1cea083..23ed885 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "devDependencies": { "@eslint/js": "^9.26.0", "@stylistic/eslint-plugin": "^4.2.0", + "@tsconfig/node22": "^22.0.2", "@types/bytes": "^3.1.5", "@types/express": "^5.0.1", "@types/http-cache-semantics": "^4.0.4", @@ -1402,6 +1403,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@tsconfig/node22": { + "version": "22.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node22/-/node22-22.0.2.tgz", + "integrity": "sha512-Kmwj4u8sDRDrMYRoN9FDEcXD8UpBSaPQQ24Gz+Gamqfm7xxn+GBR7ge/Z7pK8OXNGyUzbSwJj+TH6B+DS/epyA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", diff --git a/package.json b/package.json index f9311de..592e9c4 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "devDependencies": { "@eslint/js": "^9.26.0", "@stylistic/eslint-plugin": "^4.2.0", + "@tsconfig/node22": "^22.0.2", "@types/bytes": "^3.1.5", "@types/express": "^5.0.1", "@types/http-cache-semantics": "^4.0.4", diff --git a/tsconfig.dev.json b/tsconfig.dev.json index 3395ed7..f53f731 100644 --- a/tsconfig.dev.json +++ b/tsconfig.dev.json @@ -1,4 +1,7 @@ { "extends": "./tsconfig", - "exclude": ["node_modules"] + "exclude": ["node_modules"], + "compilerOptions": { + "isolatedModules": true, + } } diff --git a/tsconfig.json b/tsconfig.json index cbd5d39..3f0120d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,10 @@ { + "extends": "@tsconfig/node22/tsconfig.json", "compilerOptions": { "alwaysStrict": true, "esModuleInterop": true, "exactOptionalPropertyTypes": true, "forceConsistentCasingInFileNames": true, - "module": "commonjs", "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitOverride": true, @@ -22,7 +22,6 @@ "strictFunctionTypes": true, "strictNullChecks": true, "strictPropertyInitialization": true, - "target": "es6", "useUnknownInCatchVariables": true }, "include": ["src/**/*"],