@libsql/client
Advanced tools
Comparing version 0.3.4 to 0.3.5-pre.1
@@ -21,3 +21,3 @@ "use strict"; | ||
exports.Sqlite3Transaction = exports.Sqlite3Client = exports._createClient = exports.createClient = void 0; | ||
const better_sqlite3_1 = __importDefault(require("better-sqlite3")); | ||
const libsql_1 = __importDefault(require("libsql")); | ||
const node_buffer_1 = require("node:buffer"); | ||
@@ -56,3 +56,3 @@ const api_js_1 = require("./api.js"); | ||
const options = {}; | ||
const db = new better_sqlite3_1.default(path, options); | ||
const db = new libsql_1.default(path, options); | ||
try { | ||
@@ -83,3 +83,3 @@ executeStmt(db, "SELECT 1 AS checkThatTheDatabaseCanBeOpened", config.intMode); | ||
this.#checkNotClosed(); | ||
const db = new better_sqlite3_1.default(this.#path, this.#options); | ||
const db = new libsql_1.default(this.#path, this.#options); | ||
try { | ||
@@ -94,3 +94,3 @@ return executeStmt(db, stmt, this.#intMode); | ||
this.#checkNotClosed(); | ||
const db = new better_sqlite3_1.default(this.#path, this.#options); | ||
const db = new libsql_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 better_sqlite3_1.default(this.#path, this.#options); | ||
const db = new libsql_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 better_sqlite3_1.default(this.#path, this.#options); | ||
const db = new libsql_1.default(this.#path, this.#options); | ||
try { | ||
@@ -325,3 +325,3 @@ return executeMultiple(db, sql); | ||
function mapSqliteError(e) { | ||
if (e instanceof better_sqlite3_1.default.SqliteError) { | ||
if (e instanceof libsql_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 "better-sqlite3"; | ||
import Database from "libsql"; | ||
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 "better-sqlite3"; | ||
import Database from "libsql"; | ||
import { Buffer } from "node:buffer"; | ||
@@ -3,0 +3,0 @@ import { LibsqlError } from "./api.js"; |
{ | ||
"name": "@libsql/client", | ||
"version": "0.3.4", | ||
"version": "0.3.5-pre.1", | ||
"keywords": [ | ||
@@ -102,7 +102,6 @@ "libsql", | ||
"@libsql/hrana-client": "^0.5.2", | ||
"better-sqlite3": "^8.0.1", | ||
"js-base64": "^3.7.5" | ||
"js-base64": "^3.7.5", | ||
"libsql": "^0.1.4" | ||
}, | ||
"devDependencies": { | ||
"@types/better-sqlite3": "^7.6.3", | ||
"@types/jest": "^29.2.5", | ||
@@ -109,0 +108,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 [better-sqlite3]). | ||
A `file:` URL connects to a local SQLite database (using [libsql]). | ||
@@ -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 | ||
[better-sqlite3]: https://github.com/WiseLibs/better-sqlite3 | ||
[libsql]: https://github.com/libsql/libsql | ||
[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
6
144822
+ Addedlibsql@^0.1.4
+ Added@libsql/darwin-arm64@0.1.34(transitive)
+ Added@libsql/darwin-x64@0.1.34(transitive)
+ Added@libsql/linux-arm64-gnu@0.1.34(transitive)
+ Added@libsql/linux-arm64-musl@0.1.34(transitive)
+ Added@libsql/linux-x64-gnu@0.1.34(transitive)
+ Added@libsql/linux-x64-musl@0.1.34(transitive)
+ Added@libsql/win32-x64-msvc@0.1.34(transitive)
+ Added@neon-rs/load@0.0.4(transitive)
+ Addeddetect-libc@2.0.2(transitive)
+ Addedlibsql@0.1.34(transitive)
- Removedbetter-sqlite3@^8.0.1
- Removedbase64-js@1.5.1(transitive)
- Removedbetter-sqlite3@8.7.0(transitive)
- Removedbindings@1.5.0(transitive)
- Removedbl@4.1.0(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedchownr@1.1.4(transitive)
- Removeddecompress-response@6.0.0(transitive)
- Removeddeep-extend@0.6.0(transitive)
- Removeddetect-libc@2.0.3(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedexpand-template@2.0.3(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedfs-constants@1.0.0(transitive)
- Removedgithub-from-package@0.0.0(transitive)
- Removedieee754@1.2.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedini@1.3.8(transitive)
- Removedmimic-response@3.1.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp-classic@0.5.3(transitive)
- Removednapi-build-utils@1.0.2(transitive)
- Removednode-abi@3.71.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedprebuild-install@7.1.2(transitive)
- Removedpump@3.0.2(transitive)
- Removedrc@1.2.8(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsemver@7.6.3(transitive)
- Removedsimple-concat@1.0.1(transitive)
- Removedsimple-get@4.0.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedstrip-json-comments@2.0.1(transitive)
- Removedtar-fs@2.1.1(transitive)
- Removedtar-stream@2.2.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwrappy@1.0.2(transitive)