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

Using full file URL when importing migrations - Fixes #201 #202

Conversation

MikesGlitch
Copy link
Contributor

@MikesGlitch MikesGlitch commented Nov 19, 2023

Fixes #201

Updated the dynamic import file path to use File URL (which also works on windows)

e.g. Instead of:

D:\\PATH\\TO\\MIGRATIONS  

it's importing:

file:///D:/PATH/TO/MIGRATIONS

@MikesGlitch MikesGlitch marked this pull request as ready for review November 19, 2023 13:14
@MikesGlitch MikesGlitch changed the title using full uri when importing migrations so ESM wil work on windows Using full file URL when importing migrations - Fixes #201 Nov 19, 2023
@wesleytodd
Copy link
Collaborator

Ah the joy of URL's with ESM. Yeah this is a good change. I have not been super active on this repo lately, but I can probably try and get this published as a patch version.

@MikesGlitch
Copy link
Contributor Author

Ah the joy of URL's with ESM. Yeah this is a good change. I have not been super active on this repo lately, but I can probably try and get this published as a patch version.

Sweet. Thanks!

I noticed the github actions failing during the lint step on files that weren't touched - something to do with spaces at the beginning of some files. That's pre-existing so haven't touched it. Let me know if you need help to fix & that/what the deal is with the lint/tests.

Will keep an eye out on the patch version.

@wesleytodd
Copy link
Collaborator

No worries on the lint failures, I agree they look unrelated and it worked fine locally. I made a comment on another PR which was near ready to merge (#200) but looks like they didn't respond so I guess I can just push the release.

@wesleytodd
Copy link
Collaborator

Oh, and thanks for the great contribution!

@wesleytodd
Copy link
Collaborator

published as v2.0.1

@MikesGlitch MikesGlitch deleted the fix/#201-ERR_UNSUPPORTED_ESM_URL_SCHEME-on-windows branch December 7, 2023 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERR_UNSUPPORTED_ESM_URL_SCHEME on Windows with ESM
2 participants