@hpcc-js/wasm-zstd 1.9.1 → 1.11.0
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.js +10 -10
- package/dist/index.js.map +3 -3
- package/package.json +3 -3
- package/src/zstd.ts +9 -3
- package/types/zstd.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/wasm-zstd",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "hpcc-js - WASM zstd",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"update-major": "npx -y npm-check-updates -u"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@hpcc-js/esbuild-plugins": "1.
|
|
41
|
+
"@hpcc-js/esbuild-plugins": "1.8.0",
|
|
42
42
|
"@hpcc-js/wasm-util": "1.0.0"
|
|
43
43
|
},
|
|
44
44
|
"keywords": [
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
},
|
|
58
58
|
"homepage": "https://hpcc-systems.github.io/hpcc-js-wasm/",
|
|
59
59
|
"license": "Apache-2.0",
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "f539a56609708635b900faf022e9384707b1003c"
|
|
61
61
|
}
|
package/src/zstd.ts
CHANGED
|
@@ -7,7 +7,7 @@ type ZstdExports = MainModule["zstd"];
|
|
|
7
7
|
// Ref: http://facebook.github.io/zstd/zstd_manual.html
|
|
8
8
|
// Ref: https://github.com/facebook/zstd
|
|
9
9
|
|
|
10
|
-
let g_zstd: Promise<Zstd
|
|
10
|
+
let g_zstd: Promise<Zstd> | undefined;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* The Zstandard WASM library, provides a simplified wrapper around the Zstandard c++ library.
|
|
@@ -55,8 +55,14 @@ export class Zstd extends MainModuleEx<MainModule> {
|
|
|
55
55
|
/**
|
|
56
56
|
* Unloades the compiled wasm instance.
|
|
57
57
|
*/
|
|
58
|
-
static unload() {
|
|
59
|
-
|
|
58
|
+
static async unload() {
|
|
59
|
+
try {
|
|
60
|
+
const zstd = await g_zstd;
|
|
61
|
+
zstd?._zstd?.delete();
|
|
62
|
+
} finally {
|
|
63
|
+
reset();
|
|
64
|
+
g_zstd = undefined;
|
|
65
|
+
}
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
/**
|