@keyv/compress-gzip 2.0.2 → 2.0.3
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/dist/index.cjs +5 -5
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/package.json +17 -14
package/dist/index.cjs
CHANGED
|
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
KeyvGzip: () => KeyvGzip,
|
|
24
|
-
default: () =>
|
|
24
|
+
default: () => index_default
|
|
25
25
|
});
|
|
26
|
-
module.exports = __toCommonJS(
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
27
|
var import_pako = require("pako");
|
|
28
28
|
var import_serialize = require("@keyv/serialize");
|
|
29
29
|
var KeyvGzip = class {
|
|
@@ -54,7 +54,7 @@ var KeyvGzip = class {
|
|
|
54
54
|
return { value: void 0, expires: void 0 };
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
var
|
|
57
|
+
var index_default = KeyvGzip;
|
|
58
58
|
// Annotate the CommonJS export names for ESM import in node:
|
|
59
59
|
0 && (module.exports = {
|
|
60
60
|
KeyvGzip
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeflateFunctionOptions, InflateOptions, Data } from 'pako';
|
|
2
2
|
|
|
3
3
|
type PakoDeflateOptions = DeflateFunctionOptions;
|
|
4
4
|
type PakoInflateOptions = InflateOptions & {
|
|
@@ -13,11 +13,11 @@ type Serialize = {
|
|
|
13
13
|
declare class KeyvGzip {
|
|
14
14
|
opts: Options;
|
|
15
15
|
constructor(options?: Options);
|
|
16
|
-
compress(value: pako.Data | string, options?: Options): Promise<Uint8Array
|
|
17
|
-
decompress(value: pako.Data, options?: Options): Promise<Uint8Array
|
|
16
|
+
compress(value: pako.Data | string, options?: Options): Promise<Uint8Array<ArrayBufferLike>>;
|
|
17
|
+
decompress(value: pako.Data, options?: Options): Promise<Uint8Array<ArrayBufferLike>>;
|
|
18
18
|
serialize({ value, expires }: Serialize): Promise<string>;
|
|
19
19
|
deserialize(data: string): Promise<{
|
|
20
|
-
value: Uint8Array
|
|
20
|
+
value: Uint8Array<ArrayBufferLike>;
|
|
21
21
|
expires: number | undefined;
|
|
22
22
|
} | {
|
|
23
23
|
value: undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeflateFunctionOptions, InflateOptions, Data } from 'pako';
|
|
2
2
|
|
|
3
3
|
type PakoDeflateOptions = DeflateFunctionOptions;
|
|
4
4
|
type PakoInflateOptions = InflateOptions & {
|
|
@@ -13,11 +13,11 @@ type Serialize = {
|
|
|
13
13
|
declare class KeyvGzip {
|
|
14
14
|
opts: Options;
|
|
15
15
|
constructor(options?: Options);
|
|
16
|
-
compress(value: pako.Data | string, options?: Options): Promise<Uint8Array
|
|
17
|
-
decompress(value: pako.Data, options?: Options): Promise<Uint8Array
|
|
16
|
+
compress(value: pako.Data | string, options?: Options): Promise<Uint8Array<ArrayBufferLike>>;
|
|
17
|
+
decompress(value: pako.Data, options?: Options): Promise<Uint8Array<ArrayBufferLike>>;
|
|
18
18
|
serialize({ value, expires }: Serialize): Promise<string>;
|
|
19
19
|
deserialize(data: string): Promise<{
|
|
20
|
-
value: Uint8Array
|
|
20
|
+
value: Uint8Array<ArrayBufferLike>;
|
|
21
21
|
expires: number | undefined;
|
|
22
22
|
} | {
|
|
23
23
|
value: undefined;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keyv/compress-gzip",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "gzip compression for keyv",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -12,13 +12,6 @@
|
|
|
12
12
|
"import": "./dist/index.js"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "rm -rf dist && tsup src/index.ts --format cjs,esm --dts --clean",
|
|
17
|
-
"prepare": "yarn build",
|
|
18
|
-
"test": "xo --fix && vitest run --coverage",
|
|
19
|
-
"test:ci": "xo && vitest --run --sequence.setupFiles=list",
|
|
20
|
-
"clean": "rm -rf node_modules && rm -rf .nyc_output && rm -rf ./dist && rm -rf coverage.lcov && rm -rf ./test/testdb.sqlite"
|
|
21
|
-
},
|
|
22
15
|
"xo": {
|
|
23
16
|
"rules": {
|
|
24
17
|
"import/no-named-as-default": "off",
|
|
@@ -53,12 +46,16 @@
|
|
|
53
46
|
"dependencies": {
|
|
54
47
|
"@types/pako": "^2.0.3",
|
|
55
48
|
"pako": "^2.1.0",
|
|
56
|
-
"@keyv/serialize": "
|
|
49
|
+
"@keyv/serialize": "^1.0.3"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"keyv": "^5.3.3"
|
|
57
53
|
},
|
|
58
54
|
"devDependencies": {
|
|
59
|
-
"
|
|
60
|
-
"tsd": "^0.31.
|
|
61
|
-
"xo": "^0.
|
|
55
|
+
"rimraf": "^6.0.1",
|
|
56
|
+
"tsd": "^0.31.2",
|
|
57
|
+
"xo": "^0.60.0",
|
|
58
|
+
"@keyv/test-suite": "^2.0.6"
|
|
62
59
|
},
|
|
63
60
|
"tsd": {
|
|
64
61
|
"directory": "test"
|
|
@@ -69,5 +66,11 @@
|
|
|
69
66
|
"files": [
|
|
70
67
|
"dist",
|
|
71
68
|
"LICENSE"
|
|
72
|
-
]
|
|
73
|
-
|
|
69
|
+
],
|
|
70
|
+
"scripts": {
|
|
71
|
+
"build": "rimraf dist && tsup src/index.ts --format cjs,esm --dts --clean",
|
|
72
|
+
"test": "xo --fix && vitest run --coverage",
|
|
73
|
+
"test:ci": "xo && vitest --run --sequence.setupFiles=list",
|
|
74
|
+
"clean": "rimraf node_modules ./dist ./coverage ./test/testdb.sqlite"
|
|
75
|
+
}
|
|
76
|
+
}
|