From 2b70ed64672fc7ab36ff01242098fb0e5251f13b Mon Sep 17 00:00:00 2001 From: Takadenoshi Date: Wed, 19 Jul 2023 15:21:07 +0300 Subject: [PATCH 1/5] Changed default export at index to named export --- ...-client-change-default-export_2023-07-19-12-19.json | 10 ++++++++++ packages/libs/chainweb-stream-client/README.md | 2 +- .../etc/chainweb-stream-client.api.md | 3 +-- .../libs/chainweb-stream-client/src/examples/index.ts | 2 +- packages/libs/chainweb-stream-client/src/index.ts | 4 +--- 5 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 common/changes/@kadena/chainweb-stream-client/chore-chainweb-stream-client-change-default-export_2023-07-19-12-19.json diff --git a/common/changes/@kadena/chainweb-stream-client/chore-chainweb-stream-client-change-default-export_2023-07-19-12-19.json b/common/changes/@kadena/chainweb-stream-client/chore-chainweb-stream-client-change-default-export_2023-07-19-12-19.json new file mode 100644 index 0000000000..d5efbfbfc3 --- /dev/null +++ b/common/changes/@kadena/chainweb-stream-client/chore-chainweb-stream-client-change-default-export_2023-07-19-12-19.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@kadena/chainweb-stream-client", + "comment": "Changed default export at index to named export", + "type": "patch" + } + ], + "packageName": "@kadena/chainweb-stream-client" +} \ No newline at end of file diff --git a/packages/libs/chainweb-stream-client/README.md b/packages/libs/chainweb-stream-client/README.md index ee8c6ed3aa..610b7cb04e 100644 --- a/packages/libs/chainweb-stream-client/README.md +++ b/packages/libs/chainweb-stream-client/README.md @@ -45,7 +45,7 @@ yarn add @kadena/chainweb-stream-client ## Usage ```js -import ChainwebStreamClient from '@kadena/chainweb-stream-client'; +import { ChainwebStreamClient } from '@kadena/chainweb-stream-client'; const client = new ChainwebStreamClient({ network: 'mainnet01', diff --git a/packages/libs/chainweb-stream-client/etc/chainweb-stream-client.api.md b/packages/libs/chainweb-stream-client/etc/chainweb-stream-client.api.md index 5c86f63889..879becedf8 100644 --- a/packages/libs/chainweb-stream-client/etc/chainweb-stream-client.api.md +++ b/packages/libs/chainweb-stream-client/etc/chainweb-stream-client.api.md @@ -7,7 +7,7 @@ import EventEmitter from 'eventemitter2'; // @alpha (undocumented) -class ChainwebStream extends EventEmitter { +export class ChainwebStreamClient extends EventEmitter { constructor({ network, host, type, id, limit, connectTimeout, maxReconnects, heartbeatTimeout, confirmationDepth, }: IChainwebStreamConstructorArgs); // (undocumented) confirmationDepth: number; @@ -31,7 +31,6 @@ class ChainwebStream extends EventEmitter { // (undocumented) type: ChainwebStreamType; } -export default ChainwebStream; // @alpha (undocumented) export type ChainwebStreamType = 'event' | 'account'; diff --git a/packages/libs/chainweb-stream-client/src/examples/index.ts b/packages/libs/chainweb-stream-client/src/examples/index.ts index d374eac264..e7aac1943d 100644 --- a/packages/libs/chainweb-stream-client/src/examples/index.ts +++ b/packages/libs/chainweb-stream-client/src/examples/index.ts @@ -1,5 +1,5 @@ import type { ITransaction } from '../'; -import ChainwebStreamClient from '../'; +import { ChainwebStreamClient } from '../'; const client: ChainwebStreamClient = new ChainwebStreamClient({ // required diff --git a/packages/libs/chainweb-stream-client/src/index.ts b/packages/libs/chainweb-stream-client/src/index.ts index cacc804849..8032fa7c36 100644 --- a/packages/libs/chainweb-stream-client/src/index.ts +++ b/packages/libs/chainweb-stream-client/src/index.ts @@ -34,7 +34,7 @@ const DEFAULT_LIMIT: number = 100; /** * @alpha */ -class ChainwebStream extends EventEmitter { +export class ChainwebStreamClient extends EventEmitter { // chainweb network, e.g. mainnet01 public network: string; @@ -493,5 +493,3 @@ class ChainwebStream extends EventEmitter { this.emit('debug', debugMsg); } } - -export default ChainwebStream; From 3ee60b7073ec6915e5eba993f1dc113a2c65c446 Mon Sep 17 00:00:00 2001 From: Takadenoshi Date: Wed, 19 Jul 2023 17:01:51 +0300 Subject: [PATCH 2/5] README table fix, was broken by autoformatter --- .../libs/chainweb-stream-client/README.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/libs/chainweb-stream-client/README.md b/packages/libs/chainweb-stream-client/README.md index 610b7cb04e..4b3567022e 100644 --- a/packages/libs/chainweb-stream-client/README.md +++ b/packages/libs/chainweb-stream-client/README.md @@ -63,17 +63,17 @@ Find more detailed examples under `src/examples`. ## Constructor Options -| Key | Required | Description | Example Values | | | -| ----------------- | :------: | --------------------------------------------------------------- | ----------------------- | --------- | ----- | -| network | Yes | Chainweb network | \`mainnet01 | testnet04 | ...\` | -| type | Yes | Transaction type to stream (event/account) | \`event | account\` | | -| id | Yes | Account ID or module/event name | `k:abcdef01234..` | | | -| host | Yes | Chainweb-stream backend URL | `http://localhost:4000` | | | -| limit | No | Initial data load limit | 100 | | | -| connectTimeout | No | Connection timeout in ms | 10_000 | | | -| heartbeatTimeout | No | Stale connection timeout in ms | 30_000 | | | -| maxReconnects | No | How many reconnections to attempt before giving up | 5 | | | -| confirmationDepth | No | How many confirmations for a transaction to be considered final | 6 | | | +| Key | Required | Description | Example Values | +| ----------------- | :------: | --------------------------------------------------------------- | --------------------------- | +| network | Yes | Chainweb network | `mainnet01`/`testnet04`/... | +| type | Yes | Transaction type to stream (event/account) | `event`/`account` | +| id | Yes | Account ID or module/event name | `k:abcdef01234..` | +| host | Yes | Chainweb-stream backend URL | `http://localhost:4000` | +| limit | No | Initial data load limit | 100 | +| connectTimeout | No | Connection timeout in ms | 10_000 | +| heartbeatTimeout | No | Stale connection timeout in ms | 30_000 | +| maxReconnects | No | How many reconnections to attempt before giving up | 5 | +| confirmationDepth | No | How many confirmations for a transaction to be considered final | 6 | ## Considerations ⚠️ From 293914ee36078344bc687112ddfffdf2a035dcec Mon Sep 17 00:00:00 2001 From: Takadenoshi Date: Mon, 2 Oct 2023 13:37:53 +0200 Subject: [PATCH 3/5] changeset --- .changeset/modern-clocks-look.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/modern-clocks-look.md diff --git a/.changeset/modern-clocks-look.md b/.changeset/modern-clocks-look.md new file mode 100644 index 0000000000..28c0a6283b --- /dev/null +++ b/.changeset/modern-clocks-look.md @@ -0,0 +1,5 @@ +--- +'@kadena/chainweb-stream-client': minor +--- + +Changed default export at index to named export From c3c9fea223d3684bfe7610b39a74bc98b801bac7 Mon Sep 17 00:00:00 2001 From: Takadenoshi Date: Mon, 2 Oct 2023 13:46:12 +0200 Subject: [PATCH 4/5] bump version --- packages/libs/chainweb-stream-client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/libs/chainweb-stream-client/package.json b/packages/libs/chainweb-stream-client/package.json index 62a591dd88..891e06e150 100644 --- a/packages/libs/chainweb-stream-client/package.json +++ b/packages/libs/chainweb-stream-client/package.json @@ -1,6 +1,6 @@ { "name": "@kadena/chainweb-stream-client", - "version": "0.1.0", + "version": "0.1.1", "description": "Chainweb-stream client for browsers and node.js", "keywords": [], "repository": { From cf8dfb3d7c995072ec04ee618f54d39b4fde49f9 Mon Sep 17 00:00:00 2001 From: Takadenoshi Date: Tue, 3 Oct 2023 16:12:47 +0200 Subject: [PATCH 5/5] fix versioning --- .changeset/modern-clocks-look.md | 2 +- packages/libs/chainweb-stream-client/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/modern-clocks-look.md b/.changeset/modern-clocks-look.md index 28c0a6283b..2286b1d125 100644 --- a/.changeset/modern-clocks-look.md +++ b/.changeset/modern-clocks-look.md @@ -1,5 +1,5 @@ --- -'@kadena/chainweb-stream-client': minor +'@kadena/chainweb-stream-client': patch --- Changed default export at index to named export diff --git a/packages/libs/chainweb-stream-client/package.json b/packages/libs/chainweb-stream-client/package.json index 891e06e150..62a591dd88 100644 --- a/packages/libs/chainweb-stream-client/package.json +++ b/packages/libs/chainweb-stream-client/package.json @@ -1,6 +1,6 @@ { "name": "@kadena/chainweb-stream-client", - "version": "0.1.1", + "version": "0.1.0", "description": "Chainweb-stream client for browsers and node.js", "keywords": [], "repository": {