Commit Graph

11 Commits

Author SHA1 Message Date
Pekka Enberg
6b59bcd51e javascript: Fix Statement.get() for boundary values 2025-08-19 16:35:44 +03:00
Pekka Enberg
692323ae9b bindings/javascript: Rename @tursodatabase/database/sync to compat
We already have a `@tursodatabase/sync` package so let's make the name of the
better-sqlite3 compatibility API package stand out.
2025-08-19 13:20:34 +03:00
Pekka Enberg
f2b2e4d4d8 Rename JavaScript package to @tursodatabase/database 2025-08-08 13:22:10 +03:00
Pekka Enberg
7a09eb0d4c Merge 'Fix JavaScript bindings packaging' from Nikita Sivukhin
This PR configure `#entry-point` import alias for javascript bindings in
order to use `browser.js` napi-rs generated file in browser context.
Also, this PR forces napi-rs to emit `index.js` entrypoint using ESM and
also use typescript for writing our wrapper code around napi-rs
bindings.
In order to make behaviour consistent when lib is imported through ESM
or CommonJS this PR also replace default export of `Database` by named
on. The problem is that `export default Database` will be logically
equivalent to `modules.export.default = Database` which is not the same
thing as `modules.export = Database` and this will need to access
additional `.default` field with CommonJs style imports (e.g. `new
require('@tursodatabase/turso').default(...)`). In order to remove this
difference - I just replaced default export with named one.

Closes #2488
2025-08-08 10:42:21 +03:00
Nikita Sivukhin
cbe0a7708e update tests 2025-08-08 01:21:37 +04:00
Pekka Enberg
b033333c8a javascript: Organize test cases better 2025-08-07 15:10:52 +03:00
Pekka Enberg
bae4406e32 testing/javascript: Enable iterate() test cases 2025-08-07 14:28:34 +03:00
Pekka Enberg
ba37e1dc9a testing/javascript: Enable some passing sync test cases 2025-08-06 09:25:22 +03:00
Pekka Enberg
6c6d74993c testing/javascript: Clean up after test runs 2025-07-29 16:17:11 +03:00
Pekka Enberg
c39f0e7557 testing/javascript: Add libsql to compatibility test suite 2025-07-29 16:09:49 +03:00
Pekka Enberg
cace7abcd2 testing: Add JavaScript compatibility test suite
This is essentially an import of the libSQL test suite.
2025-07-29 14:37:48 +03:00