From 2d3f7ee0108d3c683649adac0670c58cfee9170e Mon Sep 17 00:00:00 2001 From: Kostiantyn Smyrnov Date: Mon, 3 Apr 2023 22:34:46 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Updated=20build=20sy?= =?UTF-8?q?stem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Esm module only exported --- examples/client/package.json | 4 ++-- examples/client/src/App.tsx | 11 +++++----- examples/client/tsconfig.json | 3 ++- examples/client/yarn.lock | 10 ++++----- package.json | 27 +++++++++++++----------- src/index.ts | 1 + src/storage/local.ts | 1 + test/shared.queue.spec.ts | 2 ++ tsconfig.esm.json => tsconfig.build.json | 4 ++-- tsconfig.cjs.json | 12 ----------- tsconfig.json | 15 ++++++++----- 11 files changed, 45 insertions(+), 45 deletions(-) rename tsconfig.esm.json => tsconfig.build.json (60%) delete mode 100644 tsconfig.cjs.json diff --git a/examples/client/package.json b/examples/client/package.json index a739bec1..44f66338 100644 --- a/examples/client/package.json +++ b/examples/client/package.json @@ -16,10 +16,10 @@ "eslint-plugin-react-refresh": "^0.3.4", "react": "^18.2.0", "react-dom": "^18.2.0", - "typescript": "^4.9.3", + "typescript": "^5.0.3", "vite": "^4.1.0", "zod": "^3.21.4", - "@windingtree/sdk": "^0.1.0-beta.3" + "@windingtree/sdk": "latest" }, "eslintConfig": { "extends": [ diff --git a/examples/client/src/App.tsx b/examples/client/src/App.tsx index b20594f6..d84d45b1 100644 --- a/examples/client/src/App.tsx +++ b/examples/client/src/App.tsx @@ -7,11 +7,10 @@ import { contractConfig, serverAddress, } from '../../shared/types.js'; -import { isExpired } from '../../../src/utils/time.js'; import { RequestRecord } from '../../../src/client/requestsRegistry.js'; -import { createClient, Client } from '../../../src/client/index.js'; -import { ClientOptions, storage } from '@windingtree/sdk'; -// import { isExpired } from '@windingtree/sdk/utils'; +import { Client, createClient } from '../../../src/client/index.js'; +import { ClientOptions, storage, utils } from '../../../src/index.js'; +// import { Client, ClientOptions, RequestRecord, createClient, storage } from '@windingtree/sdk'; /** Default request expiration time */ const defaultExpire = '30s'; @@ -114,10 +113,10 @@ export const Requests = ({ requests, subscribed, onClear, onCancel }: RequestsPr {r.data.id} {JSON.stringify(r.data.query)} {subscribed && subscribed(r.data.id) ? '✅' : 'no'} - {isExpired(r.data.expire) || r.cancelled ? '✅' : 'no'} + {utils.isExpired(r.data.expire) || r.cancelled ? '✅' : 'no'} {r.offers.length} - {!r.cancelled && !isExpired(r.data.expire) ? ( + {!r.cancelled && !utils.isExpired(r.data.expire) ? (