@openzim/libzim 3.2.1 → 3.2.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/Changelog CHANGED
@@ -1,3 +1,11 @@
1
+ 3.2.3
2
+ * FIX: Module (finally) properly in ESM format
3
+
4
+ 3.2.2
5
+ * FIX: Module properly in ESM format
6
+ * FIX: Upgrade version of node-gyp
7
+ * NEW: macOS14 in the CI
8
+
1
9
  3.2.1
2
10
  * NEW: Use libzim 9.2.1
3
11
  * FIX: Module properly in ESM format
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- const bindings = require("bindings");
1
+ import bindings from "bindings";
2
2
 
3
- const {
3
+ export const {
4
4
  Archive,
5
5
  Entry,
6
6
  IntegrityCheck,
@@ -15,19 +15,3 @@ const {
15
15
  StringItem,
16
16
  FileItem,
17
17
  } = bindings("zim_binding");
18
-
19
- module.exports = {
20
- Archive,
21
- Entry,
22
- IntegrityCheck,
23
- Compression,
24
- Blob,
25
- Searcher,
26
- Query,
27
- SuggestionSearcher,
28
- Creator,
29
- StringProvider,
30
- FileProvider,
31
- StringItem,
32
- FileItem,
33
- };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@openzim/libzim",
3
3
  "main": "dist/index.js",
4
4
  "types": "dist/index.d.js",
5
- "version": "3.2.1",
5
+ "version": "3.2.3",
6
6
  "description": "Libzim bindings for NodeJS",
7
7
  "type": "module",
8
8
  "scripts": {
@@ -14,8 +14,9 @@
14
14
  "build": "node-gyp rebuild -v && npm run bundle",
15
15
  "download": "node ./download-libzim.js",
16
16
  "bundle": "node ./bundle-libzim.js",
17
- "test": "jest",
17
+ "test": "jest --testPathIgnorePatterns=test/dist.test.ts",
18
18
  "test-mem-leak": "node -r ts-node/register test/makeLargeZim.ts",
19
+ "test:dist": "npm run build && jest",
19
20
  "lint": "npx eslint .",
20
21
  "lint:fix": "npx eslint . --fix"
21
22
  },
@@ -49,7 +50,7 @@
49
50
  "exec-then": "^1.3.1",
50
51
  "mkdirp": "^1.0.4",
51
52
  "node-addon-api": "^5.0.0",
52
- "node-gyp": "^9.3.1",
53
+ "node-gyp": "^10.1.0",
53
54
  "tqdm": "^2.0.3",
54
55
  "ts-node": "^10.9.1",
55
56
  "tsconfig-paths": "^4.0.0"
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
- const bindings = require("bindings");
1
+ import bindings from "bindings";
2
2
 
3
- const {
3
+ export const {
4
4
  Archive,
5
5
  Entry,
6
6
  IntegrityCheck,
@@ -15,19 +15,3 @@ const {
15
15
  StringItem,
16
16
  FileItem,
17
17
  } = bindings("zim_binding");
18
-
19
- module.exports = {
20
- Archive,
21
- Entry,
22
- IntegrityCheck,
23
- Compression,
24
- Blob,
25
- Searcher,
26
- Query,
27
- SuggestionSearcher,
28
- Creator,
29
- StringProvider,
30
- FileProvider,
31
- StringItem,
32
- FileItem,
33
- };