tursodatabase / libsql-client-ts

TypeScript/JavaScript client API for libSQL
https://docs.turso.tech/sdk/ts/quickstart
MIT License
289 stars 37 forks source link

Support `file:` URLs with relative paths #19

Closed honzasp closed 1 year ago

honzasp commented 1 year ago

We want to support relative file: URLs like file:local.db, which refers to file local.db in the current directory. Unfortunately, these URLs are not valid according to RFC 8089, which defines the "file" URI scheme, so the standard URL object from JavaScript is not able to parse them correctly.

For this reason, this PR introduces a custom parser that parses URIs according to the general syntax from RFC 3983, without applying scheme-specific restrictions.

honzasp commented 1 year ago

bors merge

bors[bot] commented 1 year ago

Build succeeded: