Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@libsql/client

Package Overview
Dependencies
Maintainers
3
Versions
93
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.8.0 to 0.8.1

19

lib-cjs/sqlite3.js

@@ -53,4 +53,11 @@ "use strict";

}
// note: we must always prepend file scheme in order for SQLite3 to recognize :memory: connection query parameters
const path = `${config.scheme}:${config.path}`;
let isInMemory = (0, config_1.isInMemoryConfig)(config);
if (isInMemory && config.syncUrl) {
throw new api_1.LibsqlError(`Embedded replica must use file for local db but URI with in-memory mode were provided instead: ${config.path}`, "URL_INVALID");
}
let path = config.path;
if (isInMemory) {
// note: we should prepend file scheme in order for SQLite3 to recognize :memory: connection query parameters
path = `${config.scheme}:${config.path}`;
}
const options = {

@@ -85,6 +92,6 @@ authToken: config.authToken,

let stmt;
if (typeof stmtOrSql === 'string') {
if (typeof stmtOrSql === "string") {
stmt = {
sql: stmtOrSql,
args: args || []
args: args || [],
};

@@ -170,6 +177,6 @@ }

let stmt;
if (typeof stmtOrSql === 'string') {
if (typeof stmtOrSql === "string") {
stmt = {
sql: stmtOrSql,
args: args || []
args: args || [],
};

@@ -176,0 +183,0 @@ }

import Database from "libsql";
import { Buffer } from "node:buffer";
import { LibsqlError } from "@libsql/core/api";
import { expandConfig } from "@libsql/core/config";
import { expandConfig, isInMemoryConfig } from "@libsql/core/config";
import { supportedUrlLink, transactionModeToBegin, ResultSetImpl, } from "@libsql/core/util";

@@ -32,4 +32,11 @@ export * from "@libsql/core/api";

}
// note: we must always prepend file scheme in order for SQLite3 to recognize :memory: connection query parameters
const path = `${config.scheme}:${config.path}`;
let isInMemory = isInMemoryConfig(config);
if (isInMemory && config.syncUrl) {
throw new LibsqlError(`Embedded replica must use file for local db but URI with in-memory mode were provided instead: ${config.path}`, "URL_INVALID");
}
let path = config.path;
if (isInMemory) {
// note: we should prepend file scheme in order for SQLite3 to recognize :memory: connection query parameters
path = `${config.scheme}:${config.path}`;
}
const options = {

@@ -63,6 +70,6 @@ authToken: config.authToken,

let stmt;
if (typeof stmtOrSql === 'string') {
if (typeof stmtOrSql === "string") {
stmt = {
sql: stmtOrSql,
args: args || []
args: args || [],
};

@@ -147,6 +154,6 @@ }

let stmt;
if (typeof stmtOrSql === 'string') {
if (typeof stmtOrSql === "string") {
stmt = {
sql: stmtOrSql,
args: args || []
args: args || [],
};

@@ -153,0 +160,0 @@ }

{
"name": "@libsql/client",
"version": "0.8.0",
"version": "0.8.1",
"keywords": [

@@ -105,3 +105,3 @@ "libsql",

"dependencies": {
"@libsql/core": "^0.8.0",
"@libsql/core": "^0.8.1",
"@libsql/hrana-client": "^0.6.2",

@@ -108,0 +108,0 @@ "js-base64": "^3.7.5",

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