@cloudpss/compress 0.4.7 → 0.4.9

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/package.json +4 -4
  2. package/src/index.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudpss/compress",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "author": "CloudPSS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@bokuweb/zstd-wasm": "^0.0.17",
31
- "@types/node": "^18.11.9",
31
+ "@types/node": "^18.14.2",
32
32
  "@types/pako": "^2.0.0",
33
33
  "brotli-wasm": "^1.3.1",
34
- "pretty-bytes": "^6.0.0",
35
- "type-fest": "^3.2.0",
34
+ "pretty-bytes": "^6.1.0",
35
+ "type-fest": "^3.6.1",
36
36
  "wasm-flate": "1.0.2"
37
37
  }
38
38
  }
package/src/index.ts CHANGED
@@ -13,7 +13,7 @@ const modules = {
13
13
  };
14
14
 
15
15
  /** 加载相关库 */
16
- function loadLib(algorithm: Exclude<CompressionAlgorithm, 'none'>): ReturnType<typeof modules[keyof typeof modules]> {
16
+ function loadLib(algorithm: Exclude<CompressionAlgorithm, 'none'>): ReturnType<(typeof modules)[keyof typeof modules]> {
17
17
  if (!(algorithm in modules)) throw new Error(`Unknown compression algorithm: ${algorithm}`);
18
18
  return modules[algorithm]();
19
19
  }