@keyv/compress-gzip 2.0.3 → 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 CHANGED
@@ -24,8 +24,8 @@ __export(index_exports, {
24
24
  default: () => index_default
25
25
  });
26
26
  module.exports = __toCommonJS(index_exports);
27
- var import_pako = require("pako");
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) {
@@ -59,3 +59,4 @@ var index_default = KeyvGzip;
59
59
  0 && (module.exports = {
60
60
  KeyvGzip
61
61
  });
62
+ /* v8 ignore next -- @preserve */
package/dist/index.d.cts CHANGED
@@ -2,7 +2,7 @@ import { DeflateFunctionOptions, InflateOptions, Data } from 'pako';
2
2
 
3
3
  type PakoDeflateOptions = DeflateFunctionOptions;
4
4
  type PakoInflateOptions = InflateOptions & {
5
- to?: 'string';
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<ArrayBufferLike>>;
17
- decompress(value: pako.Data, options?: Options): Promise<Uint8Array<ArrayBufferLike>>;
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<ArrayBufferLike>;
20
+ value: Uint8Array<ArrayBuffer>;
21
21
  expires: number | undefined;
22
22
  } | {
23
23
  value: undefined;
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { DeflateFunctionOptions, InflateOptions, Data } from 'pako';
2
2
 
3
3
  type PakoDeflateOptions = DeflateFunctionOptions;
4
4
  type PakoInflateOptions = InflateOptions & {
5
- to?: 'string';
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<ArrayBufferLike>>;
17
- decompress(value: pako.Data, options?: Options): Promise<Uint8Array<ArrayBufferLike>>;
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<ArrayBufferLike>;
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 { inflate, deflate } from "pako";
3
- import { defaultSerialize, defaultDeserialize } from "@keyv/serialize";
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) {
@@ -34,3 +34,4 @@ export {
34
34
  KeyvGzip,
35
35
  index_default as default
36
36
  };
37
+ /* v8 ignore next -- @preserve */
package/package.json CHANGED
@@ -1,24 +1,21 @@
1
1
  {
2
2
  "name": "@keyv/compress-gzip",
3
- "version": "2.0.3",
3
+ "version": "6.0.0-alpha.1",
4
4
  "description": "gzip compression for keyv",
5
5
  "type": "module",
6
- "main": "dist/index.cjs",
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": "./dist/index.cjs",
12
- "import": "./dist/index.js"
13
- }
14
- },
15
- "xo": {
16
- "rules": {
17
- "import/no-named-as-default": "off",
18
- "import/extensions": "off",
19
- "@typescript-eslint/prefer-nullish-coalescing": "off",
20
- "@typescript-eslint/no-unsafe-argument": "off",
21
- "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
+ }
22
19
  }
23
20
  },
24
21
  "repository": {
@@ -44,18 +41,20 @@
44
41
  },
45
42
  "homepage": "https://github.com/jaredwray/keyv",
46
43
  "dependencies": {
47
- "@types/pako": "^2.0.3",
44
+ "@types/pako": "^2.0.4",
48
45
  "pako": "^2.1.0",
49
- "@keyv/serialize": "^1.0.3"
46
+ "@keyv/serialize": "^6.0.0-alpha.1"
50
47
  },
51
48
  "peerDependencies": {
52
- "keyv": "^5.3.3"
49
+ "keyv": "^6.0.0-alpha.1"
53
50
  },
54
51
  "devDependencies": {
55
- "rimraf": "^6.0.1",
56
- "tsd": "^0.31.2",
57
- "xo": "^0.60.0",
58
- "@keyv/test-suite": "^2.0.6"
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"
59
58
  },
60
59
  "tsd": {
61
60
  "directory": "test"
@@ -69,8 +68,10 @@
69
68
  ],
70
69
  "scripts": {
71
70
  "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",
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",
74
75
  "clean": "rimraf node_modules ./dist ./coverage ./test/testdb.sqlite"
75
76
  }
76
77
  }