libshv-js 7.1.2 → 7.1.4

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
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CHAINPACK_PROTOCOL_TYPE = exports.ChainPackWriter = exports.ChainPackReader = exports.fromChainPack = exports.toChainPack = void 0;
4
- /* eslint-disable no-bitwise */
4
+ /* eslint-disable no-bitwise -- we do a lot of bit stuff when parsing chainpack */
5
5
  const cpon_1 = require("./cpon");
6
6
  const rpcvalue_1 = require("./rpcvalue");
7
7
  const cpcontext_1 = require("./cpcontext");
@@ -79,7 +79,7 @@ class ChainPackReader {
79
79
  constructor(data) {
80
80
  this.ctx = data instanceof cpcontext_1.UnpackContext ? data : new cpcontext_1.UnpackContext(data);
81
81
  }
82
- /* eslint-disable complexity */
82
+ /* eslint-disable complexity -- we might simplify this at some point, but it works now */
83
83
  read() {
84
84
  let meta;
85
85
  let codePointAt = this.ctx.getByte();
package/dist/cpcontext.js CHANGED
@@ -56,7 +56,7 @@ class PackContext {
56
56
  }
57
57
  }
58
58
  writeCharCodeUtf8(charcode) {
59
- /* eslint-disable no-bitwise */
59
+ /* eslint-disable no-bitwise -- we do a lot of bit stuff when parsing chainpack */
60
60
  if (charcode < 0x80) {
61
61
  this.putByte(charcode);
62
62
  }
package/dist/cpon.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fromCpon = exports.toCpon = exports.CPON_PROTOCOL_TYPE = exports.CponReader = exports.CponWriter = exports.utf8ToString = exports.OneLiners = exports.stringifyDate = void 0;
4
- /* eslint-disable no-bitwise */
4
+ /* eslint-disable no-bitwise -- we do a lot of bit stuff when parsing cpon */
5
5
  const rpcvalue_1 = require("./rpcvalue");
6
6
  const cpcontext_1 = require("./cpcontext");
7
7
  const stringifyDate = (dt) => {
@@ -162,7 +162,7 @@ class CponReader {
162
162
  const LF = '\n'.codePointAt(0);
163
163
  const KEY_DELIM = ':'.codePointAt(0);
164
164
  const FIELD_DELIM = ','.codePointAt(0);
165
- /* eslint-disable max-depth */
165
+ /* eslint-disable max-depth -- oh well */
166
166
  while (true) {
167
167
  let b = this.ctx.peekByte();
168
168
  if (b < 1) {
package/dist/rpcvalue.js CHANGED
@@ -48,13 +48,10 @@ const withOffset = (date, utcOffset) => {
48
48
  exports.withOffset = withOffset;
49
49
  const shvMapType = Symbol('shvMapType');
50
50
  exports.shvMapType = shvMapType;
51
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
52
51
  const isShvMap = (x) => typeof x === 'object' && x[shvMapType] === 'map';
53
52
  exports.isShvMap = isShvMap;
54
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
55
53
  const isIMap = (x) => typeof x === 'object' && x[shvMapType] === 'imap';
56
54
  exports.isIMap = isIMap;
57
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
58
55
  const isMetaMap = (x) => typeof x === 'object' && x[shvMapType] === 'metamap';
59
56
  exports.isMetaMap = isMetaMap;
60
57
  const typeName = (x) => {
@@ -76,19 +73,16 @@ const typeName = (x) => {
76
73
  }
77
74
  };
78
75
  exports.typeName = typeName;
79
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
80
76
  const makeMetaMap = (x = {}) => ({
81
77
  ...x,
82
78
  [shvMapType]: 'metamap',
83
79
  });
84
80
  exports.makeMetaMap = makeMetaMap;
85
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
86
81
  const makeIMap = (x = {}) => ({
87
82
  ...x,
88
83
  [shvMapType]: 'imap',
89
84
  });
90
85
  exports.makeIMap = makeIMap;
91
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
92
86
  const makeMap = (x = {}) => ({
93
87
  ...x,
94
88
  [shvMapType]: 'map',
package/dist/ws-client.js CHANGED
@@ -11,7 +11,6 @@ const DEFAULT_TIMEOUT = 5000;
11
11
  const DEFAULT_PING_INTERVAL = 30 * 1000;
12
12
  const defaultParseMessage = (rpcVal) => {
13
13
  // Assume rpcVal is a valid RpcMessage - no runtime validation
14
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
15
14
  const rpcMsg = rpcVal;
16
15
  return rpcMsg;
17
16
  };
@@ -100,7 +99,7 @@ const createErrorClass = (code) => class extends RpcError {
100
99
  super(makeErrInfo(errInfoOrMsg, code));
101
100
  }
102
101
  };
103
- /* eslint-disable @typescript-eslint/naming-convention */
102
+ /* eslint-disable @typescript-eslint/naming-convention -- We want class names like this */
104
103
  exports.InvalidRequest = createErrorClass(rpcmessage_1.ErrorCode.InvalidRequest);
105
104
  exports.MethodNotFound = createErrorClass(rpcmessage_1.ErrorCode.MethodNotFound);
106
105
  exports.InvalidParams = createErrorClass(rpcmessage_1.ErrorCode.InvalidParams);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libshv-js",
3
- "version": "7.1.2",
3
+ "version": "7.1.4",
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.51.0",
43
+ "eslint-config-xo": "^0.52.0",
44
44
  "eslint-formatter-unix": "^9.0.1",
45
- "eslint-plugin-unicorn": "^64.0.0",
45
+ "eslint-plugin-unicorn": "^65.0.0",
46
46
  "typescript": "^6.0.2",
47
47
  "typescript-eslint": "^8.46.1"
48
48
  }