fix: sqlite url config not working with relative paths#1167
Open
meufel wants to merge 1 commit intosequelize:mainfrom
Open
fix: sqlite url config not working with relative paths#1167meufel wants to merge 1 commit intosequelize:mainfrom
meufel wants to merge 1 commit intosequelize:mainfrom
Conversation
ca5cfd7 to
4b89ad7
Compare
4b89ad7 to
a81fb8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #965
Pull Request check-list
npm run testpass with this change (including linting)?Description of change
Related Issue: #965
Due to the way URLs are parsed for sqlite, it isn't possible to provide an URL config containing a relative path. This is now fixed by this pull request: As long as the relative path starts with
./or../it is resolved correctly.Breaking Changes
Since the host part of valid URLs cannot contain only dots this change won't be breaking in the real world.
Disclaimer
I added tests for this change but didn't really respect the magic of the test helpers since I didn't find a way to create a config containing a relative path URL with it. I hope that's okay. Otherwise, if somebody can help me there, I will update the test code.
I also didn't add any documentation for this change since I didn't find a proper location for it.