keyv-registry 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -4
  2. package/package.json +1 -9
package/README.md CHANGED
@@ -19,6 +19,8 @@ Create Keyv stores from URI strings, resolving each adapter from the modules ins
19
19
  npm install keyv-registry
20
20
  ```
21
21
 
22
+ Requires Node.js >=16.
23
+
22
24
  Adapters are not bundled. Install the one your protocol needs alongside it:
23
25
 
24
26
  ```bash
@@ -37,7 +39,12 @@ Adapters are resolved with `require()`, so an adapter only has to be installed s
37
39
  ```typescript
38
40
  import createStore from 'keyv-registry';
39
41
 
40
- // Redis
42
+ // In-memory storage is built in and needs no adapter package.
43
+ const memory = await createStore('memory://');
44
+ await memory.set('greeting', 'hello');
45
+ console.log(await memory.get('greeting')); // hello
46
+
47
+ // Redis requires @keyv/redis and a running Redis server.
41
48
  const redis = await createStore('redis://localhost:6379');
42
49
 
43
50
  // PostgreSQL
@@ -46,9 +53,6 @@ const postgres = await createStore('postgresql://user:pass@localhost/db');
46
53
  // File-based storage
47
54
  const file = await createStore('file://~/.cache/myapp/data.json');
48
55
 
49
- // In-memory (built-in, no package needed)
50
- const memory = await createStore('memory://');
51
-
52
56
  // SQLite
53
57
  const sqlite = await createStore('sqlite:///path/to/db.sqlite');
54
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keyv-registry",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Protocol-based Keyv adapter registry",
5
5
  "keywords": [
6
6
  "keyv",
@@ -47,9 +47,7 @@
47
47
  "keyv": "^5.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@keyv/etcd": "*",
51
50
  "@keyv/redis": "*",
52
- "@keyv/sqlite": "*",
53
51
  "@types/mocha": "*",
54
52
  "@types/node": "*",
55
53
  "fs-remove-compat": "^1.0.4",
@@ -60,11 +58,5 @@
60
58
  },
61
59
  "engines": {
62
60
  "node": ">=16"
63
- },
64
- "allowScripts": {
65
- "node-filename-to-dist-paths": true,
66
- "node-semvers": true,
67
- "node-version-use": true,
68
- "thread-sleep-compat": true
69
61
  }
70
62
  }