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

@keyv/postgres

Package Overview
Dependencies
Maintainers
0
Versions
37
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 2.0.3 to 2.0.4

5

dist/index.d.ts
import EventEmitter from 'events';
import { KeyvStoreAdapter } from 'keyv';
import Keyv, { KeyvStoreAdapter } from 'keyv';
import { PoolConfig } from 'pg';

@@ -32,3 +32,4 @@

}
declare const createKeyv: (options?: KeyvPostgresOptions) => Keyv<any>;
export { KeyvPostgres, KeyvPostgres as default };
export { KeyvPostgres, type KeyvPostgresOptions, createKeyv, KeyvPostgres as default };

3

dist/index.js
// src/index.ts
import EventEmitter from "events";
import Keyv from "keyv";

@@ -137,6 +138,8 @@ // src/pool.ts

};
var createKeyv = (options) => new Keyv({ store: new KeyvPostgres(options) });
var src_default = KeyvPostgres;
export {
KeyvPostgres,
createKeyv,
src_default as default
};
{
"name": "@keyv/postgres",
"version": "2.0.3",
"description": "PostgreSQL storage adapter for Keyv",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.js"
}
},
"scripts": {
"build": "rimraf ./dist && tsup src/index.ts --format cjs,esm --dts --clean",
"prepare": "yarn build",
"test": "xo --fix && vitest run --coverage",
"test:ci": "xo && vitest --run --sequence.setupFiles=list",
"clean": "rimraf ./node_modules ./coverage ./dist"
},
"xo": {
"rules": {
"import/no-named-as-default": "off",
"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",
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "off"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/jaredwray/keyv.git"
},
"keywords": [
"postgres",
"postgresql",
"sql",
"keyv",
"storage",
"adapter",
"key",
"value",
"store",
"cache",
"ttl"
],
"author": "Jared Wray <me@jaredwray.com> (http://jaredwray.com",
"license": "MIT",
"bugs": {
"url": "https://github.com/jaredwray/keyv/issues"
},
"homepage": "https://github.com/jaredwray/keyv",
"dependencies": {
"pg": "8.13.0"
},
"devDependencies": {
"@keyv/test-suite": "*",
"@types/pg": "^8.11.10",
"keyv": "^5.0.1",
"rimraf": "^6.0.1",
"tsd": "^0.31.2",
"xo": "^0.59.3"
},
"tsd": {
"directory": "test"
},
"engines": {
"node": ">= 18"
},
"files": [
"dist",
"LICENSE"
]
}
"name": "@keyv/postgres",
"version": "2.0.4",
"description": "PostgreSQL storage adapter for Keyv",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.js"
}
},
"xo": {
"rules": {
"import/no-named-as-default": "off",
"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",
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "off"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/jaredwray/keyv.git"
},
"keywords": [
"postgres",
"postgresql",
"sql",
"keyv",
"storage",
"adapter",
"key",
"value",
"store",
"cache",
"ttl"
],
"author": "Jared Wray <me@jaredwray.com> (http://jaredwray.com",
"license": "MIT",
"bugs": {
"url": "https://github.com/jaredwray/keyv/issues"
},
"homepage": "https://github.com/jaredwray/keyv",
"dependencies": {
"pg": "8.13.1",
"keyv": "*"
},
"devDependencies": {
"@keyv/test-suite": "*",
"@types/pg": "^8.11.10",
"rimraf": "^6.0.1",
"tsd": "^0.31.2",
"xo": "^0.59.3"
},
"tsd": {
"directory": "test"
},
"engines": {
"node": ">= 18"
},
"files": [
"dist",
"LICENSE"
],
"scripts": {
"build": "rimraf ./dist && tsup src/index.ts --format cjs,esm --dts --clean",
"test": "xo --fix && vitest run --coverage",
"test:ci": "xo && vitest --run --sequence.setupFiles=list",
"clean": "rimraf ./node_modules ./coverage ./dist"
}
}

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

You can also use a helper function to create `Keyv` with `KeyvPostgres` store.
```js
import {createKeyv} from '@keyv/postgres';
const keyv = createKeyv({ uri: 'postgresql://user:pass@localhost:5432/dbname', table: 'cache', schema: 'keyv' });
```
## Testing

@@ -53,3 +61,3 @@

```shell
yarn test:services:start
pnpm test:services:start
```

@@ -59,3 +67,3 @@

```shell
yarn test
pnpm test
```

@@ -62,0 +70,0 @@

Sorry, the diff of this file is not supported yet

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