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

@keyv/sqlite

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keyv/sqlite - npm Package Compare versions

Comparing version 3.5.0 to 3.5.1

7

package.json
{
"name": "@keyv/sqlite",
"version": "3.5.0",
"version": "3.5.1",
"description": "SQLite storage adapter for Keyv",
"main": "src/index.js",
"scripts": {
"test": "xo --fix && nyc ava",
"test": "xo && nyc ava",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov",

@@ -45,3 +45,4 @@ "clean": "rm -rf node_modules && rm -rf .nyc_output && rm -rf coverage.lcov && rm -rf ./test/testdb.sqlite"

"dependencies": {
"sqlite3": "^5.0.3"
"sqlite3": "^5.0.3",
"pify": "^5.0.0"
},

@@ -48,0 +49,0 @@ "devDependencies": {

@@ -16,3 +16,3 @@ 'use strict';

options.db = options.uri.replace(/^sqlite:\/\//, '');
this.close = {};
options.connect = () => new Promise((resolve, reject) => {

@@ -31,3 +31,3 @@ const db = new sqlite3.Database(options.db, error => {

})
.then(db => pify(db.all).bind(db));
.then(db => ({query: pify(db.all).bind(db), close: pify(db.close).bind(db)}));

@@ -42,7 +42,9 @@ this.opts = {table: 'keyv',

const connected = this.opts.connect()
.then(query => query(createTable).then(() => query))
.then(db => db.query(createTable).then(() => db))
.catch(error => this.emit('error', error));
this.query = (sqlString, ...parameter) => connected
.then(query => query(sqlString, ...parameter));
.then(db => db.query(sqlString, ...parameter));
this.close = () => connected.then(db => db.close);
}

@@ -154,4 +156,8 @@

}
disconnect() {
return this.close().then(() => undefined);
}
}
module.exports = KeyvSqlite;
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