Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/add cjs extension #658

Closed
wants to merge 1 commit into from
Closed

Conversation

mtt-artis
Copy link

hello there

this PR allow to migrate cjs files

migrate in esm on windows seem complicated
so i make a transpilation in esm for my project except for migration part which is in cjs
tsup add the cjs extension to the file

@vercel
Copy link

vercel bot commented Aug 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2023 8:19am

@mtt-artis
Copy link
Author

but would be awesome if the migration works on window in esm :)

@koskimas
Copy link
Member

koskimas commented Aug 23, 2023

It does work. All you need to do is implement your own MigrationProvider. It's one function and probably around 20 lines of code.

https://kysely-org.github.io/kysely-apidoc/interfaces/MigrationProvider.html

The issue is just that the default FileMigrationProvider doesn't work on windows. But again, that class is about 20 lines of code. You can easily roll your own.

@mtt-artis
Copy link
Author

yes i agree it's not difficult to write my own migration file:

but

  • i think it's better if it works seamless by following the doc (no matter if esm/cjs and win/linux)
  • it could remove the question on the discord

i close this PR and link another that might resolve this
feel free to close it as well if you don't want/like it ;)
#659

thanks again for the lib, and the time you give to the community

@mtt-artis mtt-artis closed this Aug 27, 2023
@igalklebanov igalklebanov added the enhancement New feature or request label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants