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

@miniflare/d1

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@miniflare/d1 - npm Package Compare versions

Comparing version 2.12.2 to 2.13.0

28

dist/src/index.js

@@ -196,12 +196,26 @@ var __create = Object.create;

}
#query = (query) => {
const meta = { start: import_perf_hooks.performance.now() };
#prepareAndBind(query) {
const sql = splitSqlQuery(query.sql)[0];
const stmt = this.db.prepare(sql);
const params = normaliseParams(query.params);
if (params.length === 0)
return stmt;
try {
return stmt.bind(params);
} catch (e) {
try {
return stmt.bind(Object.fromEntries(params.map((v, i) => [i + 1, v])));
} catch {
}
throw e;
}
}
#query = (query) => {
const meta = { start: import_perf_hooks.performance.now() };
const stmt = this.#prepareAndBind(query);
let results;
if (stmt.reader) {
results = stmt.all(params);
results = stmt.all();
} else {
const result = stmt.run(params);
const result = stmt.run();
results = [];

@@ -215,8 +229,6 @@ meta.last_row_id = Number(result.lastInsertRowid);

const meta = { start: import_perf_hooks.performance.now() };
const sql = splitSqlQuery(query.sql)[0];
const stmt = this.db.prepare(sql);
const stmt = this.#prepareAndBind(query);
if (stmt.reader)
throw new Error(EXECUTE_RETURNS_DATA_MESSAGE);
const params = normaliseParams(query.params);
const result = stmt.run(params);
const result = stmt.run();
meta.last_row_id = Number(result.lastInsertRowid);

@@ -223,0 +235,0 @@ meta.changes = result.changes;

{
"name": "@miniflare/d1",
"version": "2.12.2",
"version": "2.13.0",
"description": "Workers D1 module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers",

@@ -39,8 +39,8 @@ "keywords": [

"dependencies": {
"@miniflare/core": "2.12.2",
"@miniflare/shared": "2.12.2"
"@miniflare/core": "2.13.0",
"@miniflare/shared": "2.13.0"
},
"devDependencies": {
"@miniflare/shared-test": "2.12.2"
"@miniflare/shared-test": "2.13.0"
}
}

Sorry, the diff of this file is not supported yet

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