feat: add support for TypeScript migration files

And add a guide to the documentation on how to set it up for NodeJS
This commit is contained in:
Joakim Carlstein 2023-12-20 12:06:20 +01:00 committed by Joakim Carlstein
parent 59eb90b8cb
commit 9a605a85f1
8 changed files with 163 additions and 14 deletions

View file

@ -17,7 +17,7 @@ const promisifyIfNeeded = <T extends Function>(fn: T) => {
};
const loaderJs: LoaderPlugin = {
loadableExtensions: ['.js', '.cjs', '.mjs'],
loadableExtensions: ['.js', '.cjs', '.mjs', '.ts', '.cts', '.mts'],
async loadMigration(migration) {
const migrationModule: unknown = await import(migration.filePath);