New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@libsql/client

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libsql/client - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3-pre.2

14

lib-cjs/sqlite3.js

@@ -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.2",
"version": "0.3.3-pre.2",
"keywords": [

@@ -24,3 +24,2 @@ "libsql",

"license": "MIT",
"type": "module",

@@ -70,7 +69,17 @@ "main": "lib-cjs/node.js",

"*": {
".": ["./lib-esm/node.d.ts"],
"http": ["./lib-esm/http.d.ts"],
"hrana": ["./lib-esm/hrana.d.ts"],
"sqlite3": ["./lib-esm/sqlite3.d.ts"],
"web": ["./lib-esm/web.d.ts"]
".": [
"./lib-esm/node.d.ts"
],
"http": [
"./lib-esm/http.d.ts"
],
"hrana": [
"./lib-esm/hrana.d.ts"
],
"sqlite3": [
"./lib-esm/sqlite3.d.ts"
],
"web": [
"./lib-esm/web.d.ts"
]
}

@@ -82,3 +91,2 @@ },

],
"scripts": {

@@ -95,10 +103,8 @@ "prepublishOnly": "npm run build",

},
"dependencies": {
"@libsql/hrana-client": "^0.5.0",
"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",

@@ -105,0 +111,0 @@ "@types/node": "^18.15.5",

@@ -6,7 +6,9 @@ # JavaScript & TypeScript SDK for libSQL

This is the source repository of the JavaScript & TypeScript SDK for libSQL. You can use it to interact with the following types of databases:
This is the source repository of the JavaScript & TypeScript SDK for libSQL.
- Local SQLite database files
- [libSQL sqld] instances (including [Turso])
You can use this SDK to interact with the following types of databases:
- Local SQLite/libSQL database files
- [Remote libSQL databases], including [Turso]
## Installation

@@ -88,3 +90,3 @@

A `file:` URL connects to a local SQLite database (using [better-sqlite3]).
A `file:` URL connects to a local SQLite database (using [libsql]).

@@ -132,9 +134,8 @@ - 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]: https://docs.turso.tech
[libSQL sqld]: https://github.com/libsql/sqld
[Remote libSQL databases]: https://github.com/libsql/sqld
[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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc