Closed felixguendling closed 1 month ago
Hey 👋
Thanks for raising this!
This project doesn't require any build step of TypeScript migration files before running commands. They just work at runtime, like in bun
and deno
.
We're currently writing migrations in JS (no translation needed to use it in the SvelteKit server hook).
Do you plan on running migrations from kysely-ctl
and SvelteKit server separately?
Would it be possible to relax this requirement, so TS and JS are both supported?
I'm leaning towards an allowJS
config option for migrations, off by default (trying to be TypeScript-first here).
We want to use kysely-ctl
in a script that resets the database to a specific state for end-to-end tests. So we delete everything (drop the database and recreate it), run the migrations from scratch and then add testing data.
A allowJS
flag in the configuration sounds like a great idea! 🥳
Thank you very much! It works and we switched from our ugly hack to the new version :-)
Hello! :wave: Thank you for this project!
We're currently writing migrations in JS (no translation needed to use it in the SvelteKit server hook).
By default,
kysely-ctl
skips JS files:WARN Ignoring 2024-07-01.js - not a TS file.
By removing these lines, I could make it work:
https://github.com/kysely-org/kysely-ctl/blob/230798d8c2256d62e075d7bab621c6734d48b5ef/src/kysely/ts-file-migration-provider.mts#L27-L30
Would it be possible to relax this requirement, so TS and JS are both supported?