@zlink-systems/zlink 0.17.3 → 0.17.6

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.
@@ -14,6 +14,7 @@ exports.closeCall = closeCall;
14
14
  exports.recvNativeError = recvNativeError;
15
15
  exports.submitNativeError = submitNativeError;
16
16
  exports.submitOrBackpressure = submitOrBackpressure;
17
+ const node_os_1 = require("node:os");
17
18
  const native_1 = require("../native/native");
18
19
  const socket_constants_1 = require("../../contracts/sockets/socket_constants");
19
20
  const errors_1 = require("../../contracts/errors/errors");
@@ -24,7 +25,7 @@ function readErrno() {
24
25
  return typeof native.errno === 'function' ? native.errno() : 0;
25
26
  }
26
27
  function isWouldBlock(errno = readErrno()) {
27
- return errno === 11;
28
+ return errno === node_os_1.constants.errno.EAGAIN;
28
29
  }
29
30
  function nativeErrorMessage(error, fallbackMessage) {
30
31
  return error instanceof Error && error.message ? error.message : fallbackMessage;
@@ -45,7 +45,7 @@ class small_msg_storage_t
45
45
  stack_size_ = count;
46
46
  return true;
47
47
  }
48
- if (count > std::numeric_limits<size_t>::max () / sizeof (zlink_msg_t)) {
48
+ if (count > (std::numeric_limits<size_t>::max) () / sizeof (zlink_msg_t)) {
49
49
  napi_throw_error (env, NULL, "message parts allocation failed");
50
50
  return false;
51
51
  }
@@ -106,9 +106,9 @@ class small_msg_storage_t
106
106
  }
107
107
 
108
108
  if (heap_size_ == heap_capacity_) {
109
- if (heap_capacity_ > std::numeric_limits<size_t>::max () / 2
109
+ if (heap_capacity_ > (std::numeric_limits<size_t>::max) () / 2
110
110
  || heap_capacity_ * 2
111
- > std::numeric_limits<size_t>::max () / sizeof (zlink_msg_t))
111
+ > (std::numeric_limits<size_t>::max) () / sizeof (zlink_msg_t))
112
112
  return false;
113
113
  const size_t capacity = heap_capacity_ * 2;
114
114
  std::unique_ptr<zlink_msg_t[]> candidate (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zlink-systems/zlink",
3
- "version": "0.17.3",
3
+ "version": "0.17.6",
4
4
  "description": "zlink Node.js bindings \u2014 high-performance async messaging library",
5
5
  "license": "MPL-2.0",
6
6
  "author": "Zlink Systems",
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "package": "zlink-core",
4
- "version": "0.17.3",
4
+ "version": "0.17.5",
5
5
  "abiMajor": 0,
6
6
  "runtime": {
7
- "path": "lib/libzlink.so.0.17.3",
8
- "sha256": "dc518b5fde5b6fba348612774cb5d0976a9867890604430ba737b0b3bb565d40",
7
+ "path": "lib/libzlink.so.0.17.5",
8
+ "sha256": "52facd448e380ab8a73e2a5fd2d65b089ebeeef9f8f5e017b9ad1046702f4586",
9
9
  "soname": "libzlink.so.0"
10
10
  },
11
11
  "source": {
12
- "revision": "0761c1d4d06cec7fb207178e12fc28e5f2557c97",
12
+ "revision": "766dd1bb6e860a45ac2268363b45e26533b1626b",
13
13
  "dirty": false
14
14
  },
15
15
  "release": {
16
- "tag": "core/v0.17.3",
17
- "checksumsSha256": "c92058fba62fb9087a3a4220f0f9bc12816b5fcfe31c05edbea6929bcf023ed8"
16
+ "tag": "core/v0.17.5",
17
+ "checksumsSha256": "172420beaa6c624c0df1a39f031479b4a1de94076e93cc97bb0951acee712501"
18
18
  },
19
19
  "files": [
20
20
  {
@@ -27,11 +27,11 @@
27
27
  },
28
28
  {
29
29
  "path": "include/zlink.h",
30
- "sha256": "2f01c667960154f79c0e2c5c10a7bba72b129d025230b0c3efb951456cd420ea"
30
+ "sha256": "c40101e8147a019bc789dba11ed31dbc4335005126923e2a14215519faac55cb"
31
31
  },
32
32
  {
33
33
  "path": "include/zlink/common.h",
34
- "sha256": "8adb46869a3fb570e7a46a9c415f2dedb15fee1e2b3cfb640959f38876444ef4"
34
+ "sha256": "9a5375199dc6a2757ad2c511823ecfa40fc1ede066e069f86876d8aa6cd23b32"
35
35
  },
36
36
  {
37
37
  "path": "include/zlink/core/api.h",
@@ -51,23 +51,23 @@
51
51
  },
52
52
  {
53
53
  "path": "lib/cmake/zlink/zlinkConfig.cmake",
54
- "sha256": "b462641e7111910a0b0ed581c060e7846b2de6879683cfe9cc976171d7b1ba41"
54
+ "sha256": "98d61a8a976ae0f6c19e4561c08fc411956ecc6b0f16cc79c2708650e20da72d"
55
55
  },
56
56
  {
57
57
  "path": "lib/cmake/zlink/zlinkConfigVersion.cmake",
58
- "sha256": "755d8eef89428cfba9d3077400112f93666f9a59f93c01e61aed6dc730529ed8"
58
+ "sha256": "caaa33fd119eb1ce0916288bb18589a4cae13d446ffa55d08f1cb391af506f90"
59
59
  },
60
60
  {
61
- "path": "lib/libzlink.so.0.17.3",
62
- "sha256": "dc518b5fde5b6fba348612774cb5d0976a9867890604430ba737b0b3bb565d40"
61
+ "path": "lib/libzlink.so.0.17.5",
62
+ "sha256": "52facd448e380ab8a73e2a5fd2d65b089ebeeef9f8f5e017b9ad1046702f4586"
63
63
  },
64
64
  {
65
65
  "path": "share/zlink/release-checksums.txt",
66
- "sha256": "c92058fba62fb9087a3a4220f0f9bc12816b5fcfe31c05edbea6929bcf023ed8"
66
+ "sha256": "172420beaa6c624c0df1a39f031479b4a1de94076e93cc97bb0951acee712501"
67
67
  },
68
68
  {
69
69
  "path": "share/zlink/release-provenance.txt",
70
- "sha256": "c1e9373a9f7d65eefac89cd27685b3358c0147b9a7eb0b7a8bd7d8a841765a96"
70
+ "sha256": "f9f4364c763f94bbbfb8a8ed969069d5c7b021ab15686ddc98452d39dca3c6a8"
71
71
  }
72
72
  ]
73
73
  }
@@ -36,7 +36,7 @@ if (coreSource === 'local') {
36
36
  const configured = process.env.ZLINK_CORE_INSTALL_PREFIX
37
37
  || process.env.ZLINK_CORE_PACKAGE_PREFIX;
38
38
  if (!configured || !path.isAbsolute(configured)) {
39
- fail('ZLINK_CORE_INSTALL_PREFIX must name an absolute installed Core 0.17.3 package prefix');
39
+ fail('ZLINK_CORE_INSTALL_PREFIX must name an absolute installed Core 0.17.5 package prefix');
40
40
  }
41
41
 
42
42
  prefix = fs.realpathSync(configured);
@@ -48,7 +48,7 @@ if (coreSource === 'local') {
48
48
  const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
49
49
  if (manifest.package !== 'zlink-core' || !/^\d+\.\d+\.\d+$/.test(manifest.version || '')
50
50
  || Number(manifest.abiMajor) !== 0) {
51
- fail(`Installed Core package must have 0.17.3 provenance: ${manifestPath}`);
51
+ fail(`Installed Core package must have 0.17.5 provenance: ${manifestPath}`);
52
52
  }
53
53
  includeDir = path.join(prefix, 'include');
54
54
  libraryDirs = [path.join(prefix, 'lib'), path.join(prefix, 'lib64')];