chore: move to tsdown (#1211)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Ralph Khreish
2025-09-17 21:55:53 +02:00
committed by GitHub
parent 0e8c42c7cb
commit 3c41a113fe
16 changed files with 776 additions and 6366 deletions

19
jest.resolver.cjs Normal file
View File

@@ -0,0 +1,19 @@
const { defaultResolver } = require('jest-resolve');
module.exports = function customResolver(request, options) {
const resolve = options.defaultResolver || defaultResolver;
try {
return resolve(request, options);
} catch (error) {
if (request.startsWith('.') && request.endsWith('.js')) {
try {
return resolve(request.replace(/\.js$/, '.ts'), options);
} catch (tsError) {
tsError.cause = tsError.cause ?? error;
throw tsError;
}
}
throw error;
}
};