@kvs/memorystorage 1.2.0 → 2.1.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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @kvs/memorystorage
1
+ # @kvs/memorystorage ![](https://badgen.net/bundlephobia/minzip/@kvs/memorystorage)
2
2
 
3
3
  In-Memory storage for [KVS](https://github.com/azu/kvs).
4
4
 
package/lib/index.js CHANGED
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -17,8 +8,11 @@ const storage_1 = require("@kvs/storage");
17
8
  // @ts-ignore
18
9
  // import localstorage from "localstorage-memory";
19
10
  const localstorage_memory_1 = __importDefault(require("./localstorage-memory"));
20
- const kvsMemoryStorage = (options) => __awaiter(void 0, void 0, void 0, function* () {
21
- return storage_1.kvsStorage(Object.assign(Object.assign({}, options), { storage: localstorage_memory_1.default }));
22
- });
11
+ const kvsMemoryStorage = async (options) => {
12
+ return (0, storage_1.kvsStorage)({
13
+ ...options,
14
+ storage: localstorage_memory_1.default
15
+ });
16
+ };
23
17
  exports.kvsMemoryStorage = kvsMemoryStorage;
24
18
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0CAAiE;AAEjE,aAAa;AACb,kDAAkD;AAClD,gFAAiD;AAS1C,MAAM,gBAAgB,GAAG,CAC5B,OAAwC,EACb,EAAE;IAC7B,OAAO,oBAAU,iCACV,OAAO,KACV,OAAO,EAAE,6BAAY,IACvB,CAAC;AACP,CAAC,CAAA,CAAC;AAPW,QAAA,gBAAgB,oBAO3B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,0CAAiE;AAEjE,aAAa;AACb,kDAAkD;AAClD,gFAAiD;AAS1C,MAAM,gBAAgB,GAAG,KAAK,EACjC,OAAwC,EACb,EAAE;IAC7B,OAAO,IAAA,oBAAU,EAAC;QACd,GAAG,OAAO;QACV,OAAO,EAAE,6BAAY;KACxB,CAAC,CAAC;AACP,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B"}
package/module/index.js CHANGED
@@ -1,17 +1,11 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
1
  import { kvsStorage } from "@kvs/storage";
11
2
  // @ts-ignore
12
3
  // import localstorage from "localstorage-memory";
13
4
  import localstorage from "./localstorage-memory";
14
- export const kvsMemoryStorage = (options) => __awaiter(void 0, void 0, void 0, function* () {
15
- return kvsStorage(Object.assign(Object.assign({}, options), { storage: localstorage }));
16
- });
5
+ export const kvsMemoryStorage = async (options) => {
6
+ return kvsStorage({
7
+ ...options,
8
+ storage: localstorage
9
+ });
10
+ };
17
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,cAAc,CAAC;AAEjE,aAAa;AACb,kDAAkD;AAClD,OAAO,YAAY,MAAM,uBAAuB,CAAC;AASjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,OAAwC,EACb,EAAE;IAC7B,OAAO,UAAU,iCACV,OAAO,KACV,OAAO,EAAE,YAAY,IACvB,CAAC;AACP,CAAC,CAAA,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,cAAc,CAAC;AAEjE,aAAa;AACb,kDAAkD;AAClD,OAAO,YAAY,MAAM,uBAAuB,CAAC;AASjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EACjC,OAAwC,EACb,EAAE;IAC7B,OAAO,UAAU,CAAC;QACd,GAAG,OAAO;QACV,OAAO,EAAE,YAAY;KACxB,CAAC,CAAC;AACP,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvs/memorystorage",
3
- "version": "1.2.0",
3
+ "version": "2.1.1",
4
4
  "description": "Node.js localstorage for KVS.",
5
5
  "keywords": [
6
6
  "kvs",
@@ -46,18 +46,17 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@jsdevtools/karma-config": "^3.1.7",
49
- "@kvs/common-test-case": "^1.2.0",
50
- "@types/mocha": "^8.0.1",
51
- "@types/node": "^14.0.27",
52
- "lerna": "^3.22.1",
53
- "mocha": "^8.1.1",
49
+ "@kvs/common-test-case": "^2.1.1",
50
+ "@types/mocha": "^9.0.0",
51
+ "@types/node": "^16.9.1",
52
+ "mocha": "^9.1.1",
54
53
  "prettier": "^2.0.5",
55
54
  "rimraf": "^3.0.2",
56
- "ts-loader": "^8.1.0",
55
+ "ts-loader": "^8.2.0",
57
56
  "typescript": "^4.2.4"
58
57
  },
59
58
  "publishConfig": {
60
59
  "access": "public"
61
60
  },
62
- "gitHead": "63a9bf838e8efa7690163d28476edd90e2c6b94c"
61
+ "gitHead": "d8ec6e0ba796bc2cab189a395bcda9754ffc4c9e"
63
62
  }
package/CHANGELOG.md DELETED
@@ -1,82 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [1.2.0](https://github.com/azu/kvs/compare/v1.1.0...v1.2.0) (2021-04-17)
7
-
8
-
9
- ### Features
10
-
11
- * **types:** Use Key Remapping in Mapped Types. ([#17](https://github.com/azu/kvs/issues/17)) ([7c099be](https://github.com/azu/kvs/commit/7c099be4ae39adedba78d111574347395e024362))
12
-
13
-
14
- ### BREAKING CHANGES
15
-
16
- * **types:** require TypeScript 4.1+
17
-
18
- It aims to support to following schema:
19
-
20
- ```ts
21
- const storage = kvs<{
22
- [index: string]: string;
23
- }>;
24
- ```
25
-
26
-
27
-
28
-
29
-
30
- # [1.1.0](https://github.com/azu/kvs/compare/v1.0.0...v1.1.0) (2020-10-29)
31
-
32
-
33
- ### Features
34
-
35
- * drop localstorage-memory ([#15](https://github.com/azu/kvs/issues/15)) ([75c66a8](https://github.com/azu/kvs/commit/75c66a866260bd337f7a3146557fea0356fda2d2))
36
- * **examples:** add basic example ([#14](https://github.com/azu/kvs/issues/14)) ([351215d](https://github.com/azu/kvs/commit/351215d6c04158201768036caaa6e792c72717ea))
37
-
38
-
39
-
40
-
41
-
42
- # [1.0.0](https://github.com/azu/kvs/compare/v0.3.1...v1.0.0) (2020-08-22)
43
-
44
- **Note:** Version bump only for package @kvs/memorystorage
45
-
46
-
47
-
48
-
49
-
50
- # [0.3.0](https://github.com/azu/kvs/compare/v0.2.1...v0.3.0) (2020-08-22)
51
-
52
- **Note:** Version bump only for package @kvs/memorystorage
53
-
54
-
55
-
56
-
57
-
58
- ## [0.2.1](https://github.com/azu/kvs/compare/v0.2.0...v0.2.1) (2020-08-22)
59
-
60
- **Note:** Version bump only for package @kvs/memorystorage
61
-
62
-
63
-
64
-
65
-
66
- # [0.2.0](https://github.com/azu/kvs/compare/v0.1.0...v0.2.0) (2020-08-08)
67
-
68
-
69
- ### Features
70
-
71
- * **@kvs/memorystorage:** migrate to Schema type ([84d75f4](https://github.com/azu/kvs/commit/84d75f4407b33119da6d4745adea611f2b80404e))
72
-
73
-
74
-
75
-
76
-
77
- # 0.1.0 (2020-08-08)
78
-
79
-
80
- ### Features
81
-
82
- * **@kvs/memorystorage:** add in memory implementation ([553247b](https://github.com/azu/kvs/commit/553247b76a8bbacb03deaee4cfd3b787d74ecd65))