libshv-js 7.1.7 → 7.1.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.
package/dist/chainpack.js CHANGED
@@ -91,14 +91,11 @@ class ChainPackReader {
91
91
  }
92
92
  const key = this.read();
93
93
  const val = this.read();
94
- if (map[rpcvalue_1.shvMapType] === 'metamap' && typeof key === 'string') {
95
- map[key] = val;
96
- }
97
- else if (map[rpcvalue_1.shvMapType] === 'metamap' && typeof key === 'number') {
98
- map[key] = val;
99
- }
100
- else if (map[rpcvalue_1.shvMapType] === 'map' && typeof key === 'string') {
94
+ if ((map[rpcvalue_1.shvMapType] === 'metamap' && typeof key === 'string') ||
95
+ (map[rpcvalue_1.shvMapType] === 'metamap' && typeof key === 'number') ||
96
+ (map[rpcvalue_1.shvMapType] === 'map' && typeof key === 'string')) {
101
97
  map[key] = val;
98
+ // eslint-disable-next-line unicorn/no-duplicate-if-branches -- the type system needs this branch
102
99
  }
103
100
  else if (map[rpcvalue_1.shvMapType] === 'imap' && typeof key === 'number') {
104
101
  map[key] = val;
package/dist/ws-client.js CHANGED
@@ -182,14 +182,12 @@ class WsClient {
182
182
  // eslint-disable-next-line unicorn/no-computed-property-existence-check
183
183
  if (rpcmessage_1.RPC_MESSAGE_ABORT in request.value) {
184
184
  const requestHandler = this.requestHandlers.get(requestId);
185
- // eslint-disable-next-line unicorn/no-computed-property-existence-check
186
185
  if (request.value[rpcmessage_1.RPC_MESSAGE_ABORT]) {
187
186
  this.abortedRequests.add(requestId);
188
187
  if (requestHandler?.options.onAbort !== undefined) {
189
188
  requestHandler.options.onAbort();
190
189
  }
191
190
  }
192
- // eslint-disable-next-line unicorn/no-computed-property-existence-check
193
191
  if (!request.value[rpcmessage_1.RPC_MESSAGE_ABORT] && requestHandler?.options.onProgressQuery !== undefined) {
194
192
  const progress = requestHandler.options.onProgressQuery();
195
193
  sendDelay(progress instanceof Promise ? await progress : progress);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libshv-js",
3
- "version": "7.1.7",
3
+ "version": "7.1.9",
4
4
  "description": "Typescript implementation of libshv",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -40,9 +40,9 @@
40
40
  "@typescript-eslint/parser": "^8.56.1",
41
41
  "@eslint/js": "^10.0.1",
42
42
  "eslint": "^10.0.0",
43
- "eslint-config-xo": "^0.53.2",
43
+ "eslint-config-xo": "^0.57.0",
44
44
  "eslint-formatter-unix": "^9.0.1",
45
- "eslint-plugin-unicorn": "^68.0.0",
45
+ "eslint-plugin-unicorn": "^71.0.0",
46
46
  "typescript": "^6.0.2",
47
47
  "typescript-eslint": "^8.46.1"
48
48
  }