@holochain/client 0.20.2 → 0.21.0-dev.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/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  [![Project](https://img.shields.io/badge/Project-Holochain-blue.svg?style=flat-square)](http://holochain.org/)
2
2
  [![Discord](https://img.shields.io/badge/Discord-DEV.HC-blue.svg?style=flat-square)](https://discord.gg/k55DS5dmPH)
3
3
  [![License: CAL 1.0](https://img.shields.io/badge/License-CAL%201.0-blue.svg)](https://github.com/holochain/cryptographic-autonomy-license)
4
- ![Integration Tests](https://github.com/holochain/holochain-client-js/actions/workflows/integration-test.yml/badge.svg?branch=main)
5
- ![Bundling Tests](https://github.com/holochain/holochain-client-js/actions/workflows/bundling-test.yml/badge.svg?branch=main)
6
- [![Twitter Follow](https://img.shields.io/twitter/follow/holochain.svg?style=social&label=Follow)](https://twitter.com/holochain)
4
+ [![Integration Tests](https://github.com/holochain/holochain-client-js/actions/workflows/integration-test.yml/badge.svg?branch=main)](https://github.com/holochain/holochain-client-js/actions/workflows/integration-test.yml)
5
+ [![Bundling Tests](https://github.com/holochain/holochain-client-js/actions/workflows/bundling-test.yml/badge.svg?branch=main)](https://github.com/holochain/holochain-client-js/actions/workflows/bundling-test.yml)
6
+ [![Twitter Follow](https://img.shields.io/twitter/follow/holochain.svg?style=social&label=Follow)](https://x.com/holochain)
7
7
 
8
8
  # Holochain Client - JavaScript
9
9
 
@@ -15,12 +15,12 @@ A JavaScript client for the Holochain Conductor API (works with browsers as well
15
15
 
16
16
  ## Installation
17
17
 
18
+ **JS client v0.21.x** is compatible with **Holochain v0.7.x**.
19
+
18
20
  **JS client v0.20.x** is compatible with **Holochain v0.6.x**.
19
21
 
20
22
  **JS client v0.19.x** is compatible with **Holochain v0.5.x**.
21
23
 
22
- **JS client v0.18.x** is compatible with **Holochain v0.4.x**.
23
-
24
24
  To install from NPM, run
25
25
  ```bash
26
26
  npm install --save-exact @holochain/client
@@ -387,7 +387,7 @@ export type AppManifest = {
387
387
  name: string;
388
388
  description?: string;
389
389
  roles: Array<AppRoleManifest>;
390
- membrane_proofs_deferred: boolean;
390
+ allow_deferred_memproofs: boolean;
391
391
  };
392
392
  /**
393
393
  * @public
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.21.0-dev.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",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "homepage": "https://github.com/holochain/holochain-client-js#readme",
20
20
  "engines": {
21
- "node": ">=18.0.0 || >=20.0.0 || >= 22.0.0"
21
+ "node": ">=20.0.0 || >=22.0.0 || >= 24.0.0"
22
22
  },
23
23
  "main": "lib/index.js",
24
24
  "module": "lib/index.js",
@@ -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",
@@ -48,7 +48,7 @@
48
48
  "isomorphic-ws": "^5.0.0",
49
49
  "js-base64": "^3.7.8",
50
50
  "js-sha512": "^0.9.0",
51
- "libsodium-wrappers": "^0.8",
51
+ "libsodium-wrappers": "^0.7.15",
52
52
  "lodash-es": "^4.17.21",
53
53
  "ws": "^8.18.3"
54
54
  },