fix: sqlite url config not working with relative paths #1167
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 test
pass 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.