@keyv/compress-gzip 2.0.2 → 6.0.0-alpha.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/dist/index.cjs +7 -6
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -4
- package/package.json +33 -29
package/dist/index.cjs
CHANGED
|
@@ -18,14 +18,14 @@ 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(
|
|
27
|
-
var import_pako = require("pako");
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
27
|
var import_serialize = require("@keyv/serialize");
|
|
28
|
+
var import_pako = require("pako");
|
|
29
29
|
var KeyvGzip = class {
|
|
30
30
|
opts;
|
|
31
31
|
constructor(options) {
|
|
@@ -54,8 +54,9 @@ 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
|
|
61
61
|
});
|
|
62
|
+
/* v8 ignore next -- @preserve */
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeflateFunctionOptions, InflateOptions, Data } from 'pako';
|
|
2
2
|
|
|
3
3
|
type PakoDeflateOptions = DeflateFunctionOptions;
|
|
4
4
|
type PakoInflateOptions = InflateOptions & {
|
|
5
|
-
to?:
|
|
5
|
+
to?: "string";
|
|
6
6
|
};
|
|
7
7
|
type Options = PakoDeflateOptions & PakoInflateOptions;
|
|
8
8
|
type Serialize = {
|
|
@@ -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<ArrayBuffer>>;
|
|
17
|
+
decompress(value: pako.Data, options?: Options): Promise<Uint8Array<ArrayBuffer>>;
|
|
18
18
|
serialize({ value, expires }: Serialize): Promise<string>;
|
|
19
19
|
deserialize(data: string): Promise<{
|
|
20
|
-
value: Uint8Array
|
|
20
|
+
value: Uint8Array<ArrayBuffer>;
|
|
21
21
|
expires: number | undefined;
|
|
22
22
|
} | {
|
|
23
23
|
value: undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeflateFunctionOptions, InflateOptions, Data } from 'pako';
|
|
2
2
|
|
|
3
3
|
type PakoDeflateOptions = DeflateFunctionOptions;
|
|
4
4
|
type PakoInflateOptions = InflateOptions & {
|
|
5
|
-
to?:
|
|
5
|
+
to?: "string";
|
|
6
6
|
};
|
|
7
7
|
type Options = PakoDeflateOptions & PakoInflateOptions;
|
|
8
8
|
type Serialize = {
|
|
@@ -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<ArrayBuffer>>;
|
|
17
|
+
decompress(value: pako.Data, options?: Options): Promise<Uint8Array<ArrayBuffer>>;
|
|
18
18
|
serialize({ value, expires }: Serialize): Promise<string>;
|
|
19
19
|
deserialize(data: string): Promise<{
|
|
20
|
-
value: Uint8Array
|
|
20
|
+
value: Uint8Array<ArrayBuffer>;
|
|
21
21
|
expires: number | undefined;
|
|
22
22
|
} | {
|
|
23
23
|
value: undefined;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { defaultDeserialize, defaultSerialize } from "@keyv/serialize";
|
|
3
|
+
import { deflate, inflate } from "pako";
|
|
4
4
|
var KeyvGzip = class {
|
|
5
5
|
opts;
|
|
6
6
|
constructor(options) {
|
|
@@ -29,8 +29,9 @@ var KeyvGzip = class {
|
|
|
29
29
|
return { value: void 0, expires: void 0 };
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
var
|
|
32
|
+
var index_default = KeyvGzip;
|
|
33
33
|
export {
|
|
34
34
|
KeyvGzip,
|
|
35
|
-
|
|
35
|
+
index_default as default
|
|
36
36
|
};
|
|
37
|
+
/* v8 ignore next -- @preserve */
|
package/package.json
CHANGED
|
@@ -1,31 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keyv/compress-gzip",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.1",
|
|
4
4
|
"description": "gzip compression for keyv",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist/index.
|
|
7
|
-
"module": "dist/index.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"require":
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
"xo": {
|
|
23
|
-
"rules": {
|
|
24
|
-
"import/no-named-as-default": "off",
|
|
25
|
-
"import/extensions": "off",
|
|
26
|
-
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
27
|
-
"@typescript-eslint/no-unsafe-argument": "off",
|
|
28
|
-
"import/no-extraneous-dependencies": "off"
|
|
11
|
+
"require": {
|
|
12
|
+
"types": "./dist/index.d.cts",
|
|
13
|
+
"default": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"import": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
}
|
|
29
19
|
}
|
|
30
20
|
},
|
|
31
21
|
"repository": {
|
|
@@ -51,14 +41,20 @@
|
|
|
51
41
|
},
|
|
52
42
|
"homepage": "https://github.com/jaredwray/keyv",
|
|
53
43
|
"dependencies": {
|
|
54
|
-
"@types/pako": "^2.0.
|
|
44
|
+
"@types/pako": "^2.0.4",
|
|
55
45
|
"pako": "^2.1.0",
|
|
56
|
-
"@keyv/serialize": "
|
|
46
|
+
"@keyv/serialize": "^6.0.0-alpha.1"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"keyv": "^6.0.0-alpha.1"
|
|
57
50
|
},
|
|
58
51
|
"devDependencies": {
|
|
59
|
-
"@
|
|
60
|
-
"
|
|
61
|
-
"
|
|
52
|
+
"@biomejs/biome": "^2.3.13",
|
|
53
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
54
|
+
"rimraf": "^6.1.2",
|
|
55
|
+
"tsd": "^0.33.0",
|
|
56
|
+
"vitest": "^4.0.18",
|
|
57
|
+
"@keyv/test-suite": "^6.0.0-alpha.1"
|
|
62
58
|
},
|
|
63
59
|
"tsd": {
|
|
64
60
|
"directory": "test"
|
|
@@ -69,5 +65,13 @@
|
|
|
69
65
|
"files": [
|
|
70
66
|
"dist",
|
|
71
67
|
"LICENSE"
|
|
72
|
-
]
|
|
73
|
-
|
|
68
|
+
],
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "rimraf dist && tsup src/index.ts --format cjs,esm --dts --clean",
|
|
71
|
+
"lint": "biome check --write --error-on-warnings",
|
|
72
|
+
"lint:ci": "biome check --error-on-warnings",
|
|
73
|
+
"test": "pnpm lint && vitest run --coverage",
|
|
74
|
+
"test:ci": "pnpm lint:ci && vitest --run --sequence.setupFiles=list --coverage",
|
|
75
|
+
"clean": "rimraf node_modules ./dist ./coverage ./test/testdb.sqlite"
|
|
76
|
+
}
|
|
77
|
+
}
|