Browse Source

chore: update copyright

master
Kiko Beats 3 years ago
parent
commit
9fd2e70545
No known key found for this signature in database GPG Key ID: 8FA93B22CCF04B96
  1. 5
      .gitignore
  2. 81
      README.md
  3. 77
      package.json
  4. 2
      packages/keyv-mongo/README.md
  5. 11
      packages/keyv-mongo/package.json
  6. 2
      packages/keyv-mysql/README.md
  7. 11
      packages/keyv-mysql/package.json
  8. 2
      packages/keyv-postgres/README.md
  9. 11
      packages/keyv-postgres/package.json
  10. 2
      packages/keyv-redis/README.md
  11. 11
      packages/keyv-redis/package.json
  12. 2
      packages/keyv-sql/README.md
  13. 11
      packages/keyv-sql/package.json
  14. 2
      packages/keyv-sqlite/README.md
  15. 11
      packages/keyv-sqlite/package.json
  16. 2
      packages/keyv-test-suite/README.md
  17. 11
      packages/keyv-test-suite/package.json
  18. 2
      packages/keyv/README.md
  19. 11
      packages/keyv/package.json

5
.gitignore

@ -82,4 +82,7 @@ Temporary Items
**/*.env
*.sqlite
*.sqlite
.env
.envrc

81
README.md

@ -4,7 +4,7 @@
<br>
</h1>
> Simple key-value storage with support for multiple backends
> Simple key-value storage with support for multiple backends.
![Last version](https://img.shields.io/github/tag/keyvhq/keyv.svg?style=flat-square)
[![Coverage Status](https://img.shields.io/coveralls/keyvhq/keyv.svg?style=flat-square)](https://coveralls.io/github/keyvhq/keyv)
@ -16,55 +16,46 @@ Keyv provides a consistent interface for key-value storage across multiple backe
There are a few existing modules similar to Keyv, however Keyv is different because it:
- Isn't bloated
- Has a simple Promise based API
- Suitable as a TTL based cache or persistent key-value store
- [Easily embeddable](#add-cache-support-to-your-module) inside another module
- Works with any storage that implements the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) API
- Handles all JSON types plus `Buffer`
- Supports namespaces
- Wide range of [**efficient, well tested**](#official-storage-adapters) storage adapters
- Connection errors are passed through (db failures won't kill your app)
- Supports the current active LTS version of Node.js or higher
## Usage
Install Keyv.
```
npm install --save keyv
- Isn't bloated.
- Has a simple Promise based API.
- Suitable as a TTL based cache or persistent key-value store.
- [Easily embeddable](#add-cache-support-to-your-module) inside another module.
- Works with any storage that implements the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) API.
- Handles all JSON types plus `Buffer`.
- Supports namespaces.
- Wide range of [**efficient, well tested**](#official-storage-adapters) storage adapters.
- Connection errors are passed through (db failures won't kill your app).
- Supports the current active LTS version of Node.js or higher.
## Installation
```bash
npm install @keyvhq/keyv --save
```
By default everything is stored in memory, you can optionally also install a storage adapter.
You can optionally install the storage adapter you want to use:
```
npm install --save @keyvhq/keyv-redis
npm install --save @keyvhq/keyv-mongo
npm install --save @keyvhq/keyv-sqlite
npm install --save @keyvhq/keyv-postgres
npm install --save @keyvhq/keyv-mysql
```bash
npm install @keyvhq/keyv-redis --save
npm install @keyvhq/keyv-mongo --save
npm install @keyvhq/keyv-sqlite --save
npm install @keyvhq/keyv-postgres --save
npm install @keyvhq/keyv-mysql --save
```
Create a new Keyv instance, passing your connection string if applicable. Keyv will automatically load the correct storage adapter.
```js
const Keyv = require('@keyvhq/keyv');
const KeyvRedis = require('@keyvhq/keyv-redis');
const KeyvMongo = require('@keyvhq/keyv-mongo');
const KeyvMySQL = require('@keyvhq/keyv-mysql');
const KeyvSQLite = require('@keyvhq/keyv-sqlite');
const KeyvPostgreSQL = require('@keyvhq/keyv-postgres');
If you don't provide a specific storage adapter, a in-memory storage adapter is used by default.
## Usage
// One of the following
const keyv = new Keyv();
Just create a new Keyv instance, passing your storage adapter:
```js
const keyv = new Keyv(); // in-memory, by default
const keyvRedis = new Keyv({ store: new KeyvRedis('redis://user:pass@localhost:6379')})
const keyv = new Keyv();
const keyv = new Keyv({ store: new KeyvMongo('mongodb://user:pass@localhost:27017/dbname')});
const keyv = new Keyv({ store: new KeyvSQLite('sqlite://path/to/database.sqlite')});
const keyv = new Keyv({ store: new KeyvPostgreSQL('postgresql://user:pass@localhost:5432/dbname')});
const keyv = new Keyv({ store: new KeyvMySQL('mysql://user:pass@localhost:3306/dbname')});
const keyvMongo = new Keyv({ store: new KeyvMongo('mongodb://user:pass@localhost:27017/dbname')});
const keyvSQLite = new Keyv({ store: new KeyvSQLite('sqlite://path/to/database.sqlite')});
const keyvPostgreSQL = new Keyv({ store: new KeyvPostgreSQL('postgresql://user:pass@localhost:5432/dbname')});
const keyvMySQL = new Keyv({ store: new KeyvMySQL('mysql://user:pass@localhost:3306/dbname')});
// Handle DB connection errors
keyv.on('error', err => console.log('Connection Error', err));
@ -107,7 +98,7 @@ const keyv = new Keyv({ serialize: JSON.stringify, deserialize: JSON.parse });
## Official Storage Adapters
The official storage adapters are covered by [over 150 integration tests](https://github.com/keyvhq/keyv/actions/runs/949262324) to guarantee consistent behaviour. They are lightweight, efficient wrappers over the DB clients making use of indexes and native TTLs where available.
The official storage adapters are covered by [over 150 integration tests](https://github.com/microlinkhq/keyv/actions/runs/949262324) to guarantee consistent behaviour. They are lightweight, efficient wrappers over the DB clients making use of indexes and native TTLs where available.
## Third-party Storage Adapters
@ -284,5 +275,7 @@ Returns a promise which is resolved when the entries have been cleared.
## License
**keyv** © [Luke Childs](https://github.com/lukechilds), Released under the [MIT](/LICENSE.md) License.<br>
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/keyvhq/keyv/contributors).
**keyv** © [Microlink](https://microlink.io), Released under the [MIT](https://github.com/microlinkhq/keyv/blob/master/LICENSE.md) License.<br>
Authored and maintained by [Microlink](https://microlink.io) with help from [contributors](https://github.com/microlinkhq/keyv/contributors).
> [microlink.io](https://microlink.io) · GitHub [@MicrolinkHQ](https://github.com/microlinkhq) · Twitter [@microlinkhq](https://twitter.com/microlinkhq)

77
package.json

@ -1,50 +1,38 @@
{
"name": "@keyvhq/monorepo",
"description": "Simple key-value storage with support for multiple backends",
"homepage": "https://github.com/keyvhq/keyv#readme",
"homepage": "https://github.com/microlinkhq/keyv#readme",
"version": "",
"author": {
"email": "lukechilds123@gmail.com",
"name": "Luke Childs",
"url": "http://lukechilds.co.uk"
"email": "hello@microlink.io",
"name": "microlink.io",
"url": "https://microlink.io"
},
"contributors": [
{
"name": "Casey Webb",
"email": "notcaseywebb@gmail.com"
"name": "Luke Childs",
"email": "lukechilds123@gmail.com"
},
{
"name": "Dan Dascalescu",
"email": "ddascalescu+github@gmail.com"
"name": "Jytesh",
"email": "44925963+Jytesh@users.noreply.github.com"
},
{
"name": "Dušan Simić",
"email": "dusan.simic1810@gmail.com"
"name": "Kiko Beats",
"email": "josefrancisco.verdu@gmail.com"
},
{
"name": "Jared Wray",
"email": "jaredwray@gmail.com"
"name": "Aditya Patadia",
"email": "adityapatadia@users.noreply.github.com"
},
{
"name": "Jitendra Adhikari",
"email": "jiten.adhikary@gmail.com"
"name": "Dan Dascalescu",
"email": "ddascalescu+github@gmail.com"
},
{
"name": "Jérôme Desboeufs",
"email": "jerome.desboeufs@gmail.com"
},
{
"name": "Kent C. Dodds",
"email": "me+github@kentcdodds.com"
},
{
"name": "Kiko Beats",
"email": "josefrancisco.verdu@gmail.com"
},
{
"name": "Mateu Aguiló Bosch",
"email": "mateu@lullabot.com"
},
{
"name": "MySidesTheyAreGone",
"email": "mysidestheyaregone@protonmail.com"
@ -64,14 +52,38 @@
{
"name": "chocolateboy",
"email": "chocolate@cpan.org"
},
{
"name": "Mateu Aguiló Bosch",
"email": "mateu@lullabot.com"
},
{
"name": "Jared Wray",
"email": "jaredwray@gmail.com"
},
{
"name": "Jitendra Adhikari",
"email": "jiten.adhikary@gmail.com"
},
{
"name": "Kent C. Dodds",
"email": "me+github@kentcdodds.com"
},
{
"name": "Casey Webb",
"email": "notcaseywebb@gmail.com"
},
{
"name": "Dušan Simić",
"email": "dusan.simic1810@gmail.com"
}
],
"repository": {
"type": "git",
"url": "git+https://github.com/keyvhq/keyv.git"
"url": "git+https://github.com/microlinkhq/keyv.git"
},
"bugs": {
"url": "https://github.com/keyvhq/keyv/issues"
"url": "https://github.com/microlinkhq/keyv/issues"
},
"keywords": [
"adapter",
@ -118,6 +130,7 @@
"update:check": "lerna exec ncu -- --errorLevel 2 && ncu -- --errorLevel 2"
},
"private": "true",
"license": "MIT",
"commitlint": {
"extends": [
"@commitlint/config-conventional"
@ -127,9 +140,6 @@
"*.js": [
"prettier-standard"
],
"*.md": [
"standard-markdown"
],
"package.json": [
"finepack"
]
@ -137,8 +147,5 @@
"simple-git-hooks": {
"commit-msg": "npx commitlint --edit",
"pre-commit": "npx lint-staged"
},
"workspaces": [
"packages/*"
]
}
}

2
packages/keyv-mongo/README.md

@ -36,4 +36,4 @@ const keyv = new Keyv('mongodb://user:pass@localhost:27017/dbname', { collection
## License
**keyv** © [Luke Childs](https://github.com/lukechilds), Released under the [MIT](/LICENSE.md) License.<br>
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/keyvhq/keyv/contributors).
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/microlinkhq/keyv/contributors).

11
packages/keyv-mongo/package.json

@ -1,16 +1,21 @@
{
"name": "@keyvhq/keyv-mongo",
"description": "MongoDB storage adapter for Keyv",
"homepage": "https://github.com/keyvhq/keyv",
"homepage": "https://github.com/microlinkhq/keyv",
"version": "0.2.0",
"main": "src/index.js",
"author": {
"email": "hello@microlink.io",
"name": "microlink.io",
"url": "https://microlink.io"
},
"repository": {
"directory": "packages/keyv-mongo",
"type": "git",
"url": "git+https://github.com/keyvhq/keyv.git"
"url": "git+https://github.com/microlinkhq/keyv.git"
},
"bugs": {
"url": "https://github.com/keyvhq/keyv/issues"
"url": "https://github.com/microlinkhq/keyv/issues"
},
"keywords": [
"adapter",

2
packages/keyv-mysql/README.md

@ -39,4 +39,4 @@ const keyv = new Keyv('mysql://user:pass@localhost:3306/dbname', {
## License
**keyv** © [Luke Childs](https://github.com/lukechilds), Released under the [MIT](/LICENSE.md) License.<br>
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/keyvhq/keyv/contributors).
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/microlinkhq/keyv/contributors).

11
packages/keyv-mysql/package.json

@ -1,16 +1,21 @@
{
"name": "@keyvhq/keyv-mysql",
"description": "MySQL/MariaDB storage adapter for Keyv",
"homepage": "https://github.com/keyvhq/keyv",
"homepage": "https://github.com/microlinkhq/keyv",
"version": "0.2.0",
"main": "src/index.js",
"author": {
"email": "hello@microlink.io",
"name": "microlink.io",
"url": "https://microlink.io"
},
"repository": {
"directory": "packages/keyv-mysql",
"type": "git",
"url": "git+https://github.com/keyvhq/keyv.git"
"url": "git+https://github.com/microlinkhq/keyv.git"
},
"bugs": {
"url": "https://github.com/keyvhq/keyv/issues"
"url": "https://github.com/microlinkhq/keyv/issues"
},
"keywords": [
"adapter",

2
packages/keyv-postgres/README.md

@ -36,4 +36,4 @@ const keyv = new Keyv('postgresql://user:pass@localhost:5432/dbname', { table: '
## License
**keyv** © [Luke Childs](https://github.com/lukechilds), Released under the [MIT](/LICENSE.md) License.<br>
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/keyvhq/keyv/contributors).
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/microlinkhq/keyv/contributors).

11
packages/keyv-postgres/package.json

@ -1,16 +1,21 @@
{
"name": "@keyvhq/keyv-postgres",
"description": "PostgreSQL storage adapter for Keyv",
"homepage": "https://github.com/keyvhq/keyv",
"homepage": "https://github.com/microlinkhq/keyv",
"version": "0.2.0",
"main": "src/index.js",
"author": {
"email": "hello@microlink.io",
"name": "microlink.io",
"url": "https://microlink.io"
},
"repository": {
"directory": "packages/postgres",
"type": "git",
"url": "git+https://github.com/keyvhq/keyv.git"
"url": "git+https://github.com/microlinkhq/keyv.git"
},
"bugs": {
"url": "https://github.com/keyvhq/keyv/issues"
"url": "https://github.com/microlinkhq/keyv/issues"
},
"keywords": [
"adapter",

2
packages/keyv-redis/README.md

@ -58,4 +58,4 @@ const keyv = new Keyv({ store: keyvRedis })
## License
**keyv** © [Luke Childs](https://github.com/lukechilds), Released under the [MIT](/LICENSE.md) License.<br>
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/keyvhq/keyv/contributors).
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/microlinkhq/keyv/contributors).

11
packages/keyv-redis/package.json

@ -1,16 +1,21 @@
{
"name": "@keyvhq/keyv-redis",
"description": "Redis storage adapter for Keyv",
"homepage": "https://github.com/keyvhq/keyv",
"homepage": "https://github.com/microlinkhq/keyv",
"version": "0.2.0",
"main": "src/index.js",
"author": {
"email": "hello@microlink.io",
"name": "microlink.io",
"url": "https://microlink.io"
},
"repository": {
"directory": "packages/keyv-redis",
"type": "git",
"url": "git+https://github.com/keyvhq/keyv.git"
"url": "git+https://github.com/microlinkhq/keyv.git"
},
"bugs": {
"url": "https://github.com/keyvhq/keyv/issues"
"url": "https://github.com/microlinkhq/keyv/issues"
},
"keywords": [
"adapter",

2
packages/keyv-sql/README.md

@ -15,4 +15,4 @@ Parent class containing the common logic for SQL based Keyv storage adapters:
## License
**keyv** © [Luke Childs](https://github.com/lukechilds), Released under the [MIT](/LICENSE.md) License.<br>
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/keyvhq/keyv/contributors).
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/microlinkhq/keyv/contributors).

11
packages/keyv-sql/package.json

@ -1,16 +1,21 @@
{
"name": "@keyvhq/keyv-sql",
"description": "Parent class for SQL based Keyv storage adapters",
"homepage": "https://github.com/keyvhq/keyv",
"homepage": "https://github.com/microlinkhq/keyv",
"version": "0.2.0",
"main": "src/index.js",
"author": {
"email": "hello@microlink.io",
"name": "microlink.io",
"url": "https://microlink.io"
},
"repository": {
"directory": "packages/keyv-sql",
"type": "git",
"url": "git+https://github.com/keyvhq/keyv.git"
"url": "git+https://github.com/microlinkhq/keyv.git"
},
"bugs": {
"url": "https://github.com/keyvhq/keyv/issues"
"url": "https://github.com/microlinkhq/keyv/issues"
},
"keywords": [
"adapter",

2
packages/keyv-sqlite/README.md

@ -37,4 +37,4 @@ const keyv = new Keyv('sqlite://path/to/database.sqlite', {
## License
**keyv** © [Luke Childs](https://github.com/lukechilds), Released under the [MIT](/LICENSE.md) License.<br>
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/keyvhq/keyv/contributors).
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/microlinkhq/keyv/contributors).

11
packages/keyv-sqlite/package.json

@ -1,16 +1,21 @@
{
"name": "@keyvhq/keyv-sqlite",
"description": "SQLite storage adapter for Keyv",
"homepage": "https://github.com/keyvhq/keyv",
"homepage": "https://github.com/microlinkhq/keyv",
"version": "0.2.0",
"main": "src/index.js",
"author": {
"email": "hello@microlink.io",
"name": "microlink.io",
"url": "https://microlink.io"
},
"repository": {
"directory": "packages/keyv-sqlite",
"type": "git",
"url": "git+https://github.com/keyvhq/keyv.git"
"url": "git+https://github.com/microlinkhq/keyv.git"
},
"bugs": {
"url": "https://github.com/keyvhq/keyv/issues"
"url": "https://github.com/microlinkhq/keyv/issues"
},
"keywords": [
"adapter",

2
packages/keyv-test-suite/README.md

@ -65,4 +65,4 @@ Take a look at [keyv-redis](https://github.com/lukechilds/keyv-redis) for an exa
## License
**keyv** © [Luke Childs](https://github.com/lukechilds), Released under the [MIT](/LICENSE.md) License.<br>
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/keyvhq/keyv/contributors).
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/microlinkhq/keyv/contributors).

11
packages/keyv-test-suite/package.json

@ -1,16 +1,21 @@
{
"name": "@keyvhq/keyv-test-suite",
"description": "Test suite for Keyv API compliancy",
"homepage": "https://github.com/keyvhq/keyv",
"homepage": "https://github.com/microlinkhq/keyv",
"version": "0.2.0",
"main": "src/index.js",
"author": {
"email": "hello@microlink.io",
"name": "microlink.io",
"url": "https://microlink.io"
},
"repository": {
"directory": "packages/keyv-test-suite",
"type": "git",
"url": "git+https://github.com/keyvhq/keyv.git"
"url": "git+https://github.com/microlinkhq/keyv.git"
},
"bugs": {
"url": "https://github.com/keyvhq/keyv/issues"
"url": "https://github.com/microlinkhq/keyv/issues"
},
"keywords": [
"cache",

2
packages/keyv/README.md

@ -286,4 +286,4 @@ Returns a promise which is resolved when the entries have been cleared.
## License
**keyv** © [Luke Childs](https://github.com/lukechilds), Released under the [MIT](/LICENSE.md) License.<br>
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/keyvhq/keyv/contributors).
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/microlinkhq/keyv/contributors).

11
packages/keyv/package.json

@ -1,16 +1,21 @@
{
"name": "@keyvhq/keyv",
"description": "Simple key-value storage with support for multiple backends",
"homepage": "https://github.com/keyvhq/keyv",
"homepage": "https://github.com/microlinkhq/keyv",
"version": "0.2.3",
"main": "src/index.js",
"author": {
"email": "hello@microlink.io",
"name": "microlink.io",
"url": "https://microlink.io"
},
"repository": {
"directory": "packages/keyv",
"type": "git",
"url": "git+https://github.com/keyvhq/keyv.git"
"url": "git+https://github.com/microlinkhq/keyv.git"
},
"bugs": {
"url": "https://github.com/keyvhq/keyv/issues"
"url": "https://github.com/microlinkhq/keyv/issues"
},
"keywords": [
"cache",

Loading…
Cancel
Save