@holochain/client 0.20.2 → 0.20.3-rc.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/lib/api/client.js CHANGED
@@ -42,7 +42,7 @@ export class WsClient extends Emittery {
42
42
  socket.addEventListener("error", (errorEvent) => {
43
43
  reject(new HolochainError("ConnectionError", `could not connect to Holochain Conductor API at ${url} - ${errorEvent.error}`));
44
44
  });
45
- socket.addEventListener("open", (_) => {
45
+ socket.addEventListener("open", () => {
46
46
  const client = new WsClient(socket, url, options);
47
47
  resolve(client);
48
48
  }, { once: true });
@@ -216,7 +216,7 @@ export class WsClient extends Emittery {
216
216
  this.socket.addEventListener("close", invalidTokenCloseListener, {
217
217
  once: true,
218
218
  });
219
- this.socket.addEventListener("open", async (_) => {
219
+ this.socket.addEventListener("open", async () => {
220
220
  const encodedMsg = encode({
221
221
  type: "authenticate",
222
222
  data: encode({ token }),
package/lib/api/common.js CHANGED
@@ -13,6 +13,7 @@ export const requesterTransformer = (requester, tag, transform = identityTransfo
13
13
  const response = await requester(input, timeout);
14
14
  return transform.output(response.value);
15
15
  };
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
17
  const identity = (x) => x;
17
18
  const identityTransformer = {
18
19
  input: identity,
@@ -31,6 +32,7 @@ export class HolochainError extends Error {
31
32
  }
32
33
  }
33
34
  // this determines the error format of all error responses
35
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
36
  export const catchError = (response) => {
35
37
  if (response.type === ERROR_TYPE) {
36
38
  const errorName = response.value.type;
@@ -145,7 +145,9 @@ export function hashFrom32AndType(hashCore, hashType) {
145
145
  *
146
146
  * @public
147
147
  */
148
- export function hashFromContentAndType(content, hashType) {
148
+ export function hashFromContentAndType(
149
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
150
+ content, hashType) {
149
151
  const hashCore = new Uint8Array(32);
150
152
  blake2b(hashCore.length).update(encode(content)).digest(hashCore);
151
153
  return Uint8Array.from([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holochain/client",
3
- "version": "0.20.2",
3
+ "version": "0.20.3-rc.0",
4
4
  "description": "A JavaScript client for the Holochain Conductor API",
5
5
  "author": "Holochain Foundation <info@holochain.org> (https://holochain.org)",
6
6
  "license": "CAL-1.0",
@@ -39,7 +39,7 @@
39
39
  "build:lib": "rimraf ./lib && tsc -p tsconfig.build.json",
40
40
  "build:docs": "api-extractor run --local && api-documenter markdown -i docs/temp -o docs",
41
41
  "build": "npm run build:lib && npm run build:docs",
42
- "prepublishOnly": "npm run build"
42
+ "prepublishOnly": "npm run lint && npm run build"
43
43
  },
44
44
  "dependencies": {
45
45
  "@bitgo/blake2b": "^3.2.4",