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

@keyv/postgres

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keyv/postgres - npm Package Compare versions

Comparing version 1.4.11 to 2.0.0

dist/cjs/index.d.ts

58

package.json
{
"name": "@keyv/postgres",
"version": "1.4.11",
"version": "2.0.0",
"description": "PostgreSQL storage adapter for Keyv",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"exports": {
".": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js"
}
},
"scripts": {
"build": "tsc --project tsconfig.dist.json",
"build": "rm -rf dist && tsc --project tsconfig.cjs.json && tsc --project tsconfig.esm.json",
"prepare": "yarn build",
"test": "xo && c8 ava --serial",
"test:ci": "xo && ava --serial",
"test": "xo --fix && vitest run --coverage",
"test:ci": "xo && vitest --run --sequence.setupFiles=list",
"clean": "rm -rf node_modules && rm -rf ./coverage"

@@ -17,28 +24,14 @@ },

"import/extensions": "off",
"n/file-extension-in-import": "off",
"unicorn/prefer-event-target": "off",
"promise/prefer-await-to-then": "off",
"unicorn/prefer-module": "off",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
"unicorn/prefer-node-protocol": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"ava/no-ignored-test-files": [
"error",
{
"extensions": [
"js",
"ts"
]
}
]
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off"
}
},
"ava": {
"require": [
"requirable",
"ts-node/register"
],
"extensions": [
"js",
"ts"
]
},
"repository": {

@@ -68,10 +61,10 @@ "type": "git",

"dependencies": {
"pg": "8.11.5"
"pg": "8.12.0"
},
"devDependencies": {
"@keyv/test-suite": "*",
"@types/pg": "^8.11.5",
"keyv": "*",
"requirable": "^1.0.5",
"tsd": "^0.31.0"
"@types/pg": "^8.11.6",
"keyv": "^5.0.0",
"tsd": "^0.31.1",
"xo": "^0.59.3"
},

@@ -82,7 +75,8 @@ "tsd": {

"engines": {
"node": ">= 14"
"node": ">= 18"
},
"files": [
"dist"
"dist",
"LICENSE"
]
}

@@ -1,2 +0,2 @@

# @keyv/postgres [<img width="100" align="right" src="https://jaredwray.com/images/keyv.svg" alt="keyv">](https://github.com/jaredwra/keyv)
# @keyv/postgres [<img width="100" align="right" src="https://jaredwray.com/images/keyv-symbol.svg" alt="keyv">](https://github.com/jaredwra/keyv)

@@ -23,5 +23,6 @@ > PostgreSQL storage adapter for Keyv

```js
const Keyv = require('keyv');
import Keyv from 'keyv';
import KeyvPostgres from '@keyv/postgres';
const keyv = new Keyv('postgresql://user:pass@localhost:5432/dbname');
const keyv = new Keyv(new KeyvPostgres('postgresql://user:pass@localhost:5432/dbname'));
keyv.on('error', handleConnectionError);

@@ -35,3 +36,3 @@ ```

```js
const keyv = new Keyv('postgresql://user:pass@localhost:5432/dbname', { table: 'cache' });
const keyv = new Keyv(new KeyvPostgres('postgresql://user:pass@localhost:5432/dbname'), { table: 'cache' });
```

@@ -44,3 +45,3 @@

```js
const keyv = new Keyv('postgresql://user:pass@localhost:5432/dbname', { schema: 'keyv' });
const keyv = new Keyv(new KeyvPostgres('postgresql://user:pass@localhost:5432/dbname'), { schema: 'keyv' });
```

@@ -50,3 +51,3 @@

When testing you can use our `docker-compose` postgresql instance by having docker installed and running. This will start a postgres server, run the tests, and stop the server:
When testing you can use our `docker compose` postgresql instance by having docker installed and running. This will start a postgres server, run the tests, and stop the server:

@@ -65,2 +66,2 @@ At the root of the Keyv mono repo:

MIT © Jared Wray
[MIT © Jared Wray](LISCENCE)
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