@libsql/client
Advanced tools
Comparing version 0.3.3-pre.2 to 0.3.3
@@ -21,3 +21,3 @@ "use strict"; | ||
exports.Sqlite3Transaction = exports.Sqlite3Client = exports._createClient = exports.createClient = void 0; | ||
const libsql_1 = __importDefault(require("libsql")); | ||
const better_sqlite3_1 = __importDefault(require("better-sqlite3")); | ||
const node_buffer_1 = require("node:buffer"); | ||
@@ -56,3 +56,3 @@ const api_js_1 = require("./api.js"); | ||
const options = {}; | ||
const db = new libsql_1.default(path, options); | ||
const db = new better_sqlite3_1.default(path, options); | ||
try { | ||
@@ -83,3 +83,3 @@ executeStmt(db, "SELECT 1 AS checkThatTheDatabaseCanBeOpened", config.intMode); | ||
this.#checkNotClosed(); | ||
const db = new libsql_1.default(this.#path, this.#options); | ||
const db = new better_sqlite3_1.default(this.#path, this.#options); | ||
try { | ||
@@ -94,3 +94,3 @@ return executeStmt(db, stmt, this.#intMode); | ||
this.#checkNotClosed(); | ||
const db = new libsql_1.default(this.#path, this.#options); | ||
const db = new better_sqlite3_1.default(this.#path, this.#options); | ||
try { | ||
@@ -113,3 +113,3 @@ executeStmt(db, (0, util_js_1.transactionModeToBegin)(mode), this.#intMode); | ||
this.#checkNotClosed(); | ||
const db = new libsql_1.default(this.#path, this.#options); | ||
const db = new better_sqlite3_1.default(this.#path, this.#options); | ||
try { | ||
@@ -126,3 +126,3 @@ executeStmt(db, (0, util_js_1.transactionModeToBegin)(mode), this.#intMode); | ||
this.#checkNotClosed(); | ||
const db = new libsql_1.default(this.#path, this.#options); | ||
const db = new better_sqlite3_1.default(this.#path, this.#options); | ||
try { | ||
@@ -325,3 +325,3 @@ return executeMultiple(db, sql); | ||
function mapSqliteError(e) { | ||
if (e instanceof libsql_1.default.SqliteError) { | ||
if (e instanceof better_sqlite3_1.default.SqliteError) { | ||
return new api_js_1.LibsqlError(e.message, e.code, e); | ||
@@ -328,0 +328,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import Database from "libsql"; | ||
import Database from "better-sqlite3"; | ||
import type { Config, IntMode, Client, Transaction, TransactionMode, ResultSet, InStatement } from "./api.js"; | ||
@@ -3,0 +3,0 @@ import type { ExpandedConfig } from "./config.js"; |
@@ -1,2 +0,2 @@ | ||
import Database from "libsql"; | ||
import Database from "better-sqlite3"; | ||
import { Buffer } from "node:buffer"; | ||
@@ -3,0 +3,0 @@ import { LibsqlError } from "./api.js"; |
{ | ||
"name": "@libsql/client", | ||
"version": "0.3.3-pre.2", | ||
"version": "0.3.3", | ||
"keywords": [ | ||
@@ -101,7 +101,8 @@ "libsql", | ||
"dependencies": { | ||
"@libsql/hrana-client": "^0.5.0", | ||
"js-base64": "^3.7.5", | ||
"libsql": "^0.1.4" | ||
"@libsql/hrana-client": "^0.5.1", | ||
"better-sqlite3": "^8.0.1", | ||
"js-base64": "^3.7.5" | ||
}, | ||
"devDependencies": { | ||
"@types/better-sqlite3": "^7.6.3", | ||
"@types/jest": "^29.2.5", | ||
@@ -108,0 +109,0 @@ "@types/node": "^18.15.5", |
@@ -89,3 +89,3 @@ # JavaScript & TypeScript SDK for libSQL | ||
A `file:` URL connects to a local SQLite database (using [libsql]). | ||
A `file:` URL connects to a local SQLite database (using [better-sqlite3]). | ||
@@ -136,5 +136,5 @@ - This is only supported on Node.js. It will not work in the browser or with most hosted environments that don't provide access to a local filesystem. | ||
[turso-cli-token]: https://docs.turso.tech/reference/turso-cli#authentication-tokens-for-client-access | ||
[libsql]: https://github.com/libsql/libsql | ||
[better-sqlite3]: https://github.com/WiseLibs/better-sqlite3 | ||
[hrana-client-ts]: https://github.com/libsql/hrana-client-ts | ||
[Web fetch API]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API | ||
[turso-js-ts]: https://docs.turso.tech/reference/client-access/javascript-typescript-sdk |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
144973
7
+ Addedbetter-sqlite3@^8.0.1
+ Addedbase64-js@1.5.1(transitive)
+ Addedbetter-sqlite3@8.7.0(transitive)
+ Addedbindings@1.5.0(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedchownr@1.1.4(transitive)
+ Addeddecompress-response@6.0.0(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addeddetect-libc@2.0.3(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedexpand-template@2.0.3(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedgithub-from-package@0.0.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedini@1.3.8(transitive)
+ Addedmimic-response@3.1.0(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp-classic@0.5.3(transitive)
+ Addednapi-build-utils@1.0.2(transitive)
+ Addednode-abi@3.71.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedprebuild-install@7.1.2(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedsimple-concat@1.0.1(transitive)
+ Addedsimple-get@4.0.1(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedtar-fs@2.1.1(transitive)
+ Addedtar-stream@2.2.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedlibsql@^0.1.4
- Removed@libsql/darwin-arm64@0.1.34(transitive)
- Removed@libsql/darwin-x64@0.1.34(transitive)
- Removed@libsql/linux-arm64-gnu@0.1.34(transitive)
- Removed@libsql/linux-arm64-musl@0.1.34(transitive)
- Removed@libsql/linux-x64-gnu@0.1.34(transitive)
- Removed@libsql/linux-x64-musl@0.1.34(transitive)
- Removed@libsql/win32-x64-msvc@0.1.34(transitive)
- Removed@neon-rs/load@0.0.4(transitive)
- Removeddetect-libc@2.0.2(transitive)
- Removedlibsql@0.1.34(transitive)
Updated@libsql/hrana-client@^0.5.1