From 2b2936b3ed981419e44e2c3ea4867329ad85ba5b Mon Sep 17 00:00:00 2001 From: JJ Adonis Date: Thu, 15 Dec 2022 09:55:21 +0800 Subject: [PATCH] feature(store): update to es2019 (#12) --- package.json | 8 ++-- packages/walletkit-core/package.json | 3 +- packages/walletkit-ui/package.json | 9 ++-- packages/walletkit-ui/src/store/block.ts | 4 +- packages/walletkit-ui/tsconfig.build.json | 12 +----- pnpm-lock.yaml | 52 +++++++++++------------ tsconfig.base.json | 4 +- 7 files changed, 41 insertions(+), 51 deletions(-) diff --git a/package.json b/package.json index d56067e..ca8f666 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,10 @@ "@birthdayresearch/eslint-config": "^0.3.2", "@birthdayresearch/sticky-turbo": "^0.3.2", "@waveshq/walletkit-core": "workspace:*", - "@waveshq/standard-web": "^0.18.0", - "@waveshq/standard-web-linter": "^0.18.0", - "@waveshq/standard-defichain-jellyfishsdk": "^0.18.0", - "@waveshq/standard-prettier": "^0.18.0" + "@waveshq/standard-web": "^0.19.0", + "@waveshq/standard-web-linter": "^0.19.0", + "@waveshq/standard-defichain-jellyfishsdk": "^0.19.0", + "@waveshq/standard-prettier": "^0.19.0" }, "eslintConfig": { "extends": [ diff --git a/packages/walletkit-core/package.json b/packages/walletkit-core/package.json index 3c798a7..32dda85 100644 --- a/packages/walletkit-core/package.json +++ b/packages/walletkit-core/package.json @@ -13,7 +13,8 @@ "scripts": { "build": "tsc -b ./tsconfig.build.json", "test": "jest --maxWorkers=100%", - "lint": "eslint ." + "lint": "eslint .", + "clean": "rm -rf dist" }, "jest": { "preset": "@birthdayresearch/sticky-jest" diff --git a/packages/walletkit-ui/package.json b/packages/walletkit-ui/package.json index 63aa629..e8ebc64 100644 --- a/packages/walletkit-ui/package.json +++ b/packages/walletkit-ui/package.json @@ -9,9 +9,9 @@ ], "dependencies": { "@birthdayresearch/sticky-jest": "^0.3.2", - "@waveshq/standard-web": "^0.18.0", - "@waveshq/standard-web-linter": "^0.18.0", - "@waveshq/standard-defichain-jellyfishsdk": "^0.18.0", + "@waveshq/standard-web": "^0.19.0", + "@waveshq/standard-web-linter": "^0.19.0", + "@waveshq/standard-defichain-jellyfishsdk": "^0.19.0", "@waveshq/walletkit-core": "workspace:*", "bignumber.js": "^9.1.1", "immer": "^9.0.16", @@ -26,7 +26,8 @@ "scripts": { "build": "tsc -b ./tsconfig.build.json", "test": "jest --maxWorkers=100%", - "lint": "eslint ." + "lint": "eslint .", + "clean": "rm -rf dist" }, "jest": { "preset": "@birthdayresearch/sticky-jest", diff --git a/packages/walletkit-ui/src/store/block.ts b/packages/walletkit-ui/src/store/block.ts index a793943..1a99707 100644 --- a/packages/walletkit-ui/src/store/block.ts +++ b/packages/walletkit-ui/src/store/block.ts @@ -22,7 +22,7 @@ const initialState: BlockState = { lastSuccessfulSync: undefined, }; -const block = createSlice({ +export const block = createSlice({ name: "block", initialState, reducers: { @@ -55,5 +55,3 @@ const block = createSlice({ }, }, }); - -export { block }; diff --git a/packages/walletkit-ui/tsconfig.build.json b/packages/walletkit-ui/tsconfig.build.json index e649f90..1b7e368 100644 --- a/packages/walletkit-ui/tsconfig.build.json +++ b/packages/walletkit-ui/tsconfig.build.json @@ -3,18 +3,8 @@ "include": ["./src"], "exclude": ["**/*.unit.ts"], "compilerOptions": { - "target": "ESNext", - "lib": ["dom", "dom.iterable", "esnext"], - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, "jsx": "react", "outDir": "./dist", - "rootDir": "./src", - "composite": true, - "declaration": true, - "declarationMap": true, - "sourceMap": true + "rootDir": "./src" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2813f47..ccce6a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,18 +6,18 @@ importers: specifiers: '@birthdayresearch/eslint-config': ^0.3.2 '@birthdayresearch/sticky-turbo': ^0.3.2 - '@waveshq/standard-defichain-jellyfishsdk': ^0.18.0 - '@waveshq/standard-prettier': ^0.18.0 - '@waveshq/standard-web': ^0.18.0 - '@waveshq/standard-web-linter': ^0.18.0 + '@waveshq/standard-defichain-jellyfishsdk': ^0.19.0 + '@waveshq/standard-prettier': ^0.19.0 + '@waveshq/standard-web': ^0.19.0 + '@waveshq/standard-web-linter': ^0.19.0 '@waveshq/walletkit-core': workspace:* devDependencies: '@birthdayresearch/eslint-config': 0.3.2_typescript@4.9.4 '@birthdayresearch/sticky-turbo': 0.3.2 - '@waveshq/standard-defichain-jellyfishsdk': 0.18.0 - '@waveshq/standard-prettier': 0.18.0_e7u5tpybn3aag54biwlhh5atyq - '@waveshq/standard-web': 0.18.0_ym2lyl6exwerw7eywugdmsc5se - '@waveshq/standard-web-linter': 0.18.0_pfdqwu4op3ya37d2btxzqvhfm4 + '@waveshq/standard-defichain-jellyfishsdk': 0.19.0 + '@waveshq/standard-prettier': 0.19.0_e7u5tpybn3aag54biwlhh5atyq + '@waveshq/standard-web': 0.19.0_ym2lyl6exwerw7eywugdmsc5se + '@waveshq/standard-web-linter': 0.19.0_pfdqwu4op3ya37d2btxzqvhfm4 '@waveshq/walletkit-core': link:packages/walletkit-core packages/walletkit-core: @@ -31,9 +31,9 @@ importers: '@birthdayresearch/sticky-jest': ^0.3.2 '@testing-library/jest-dom': ^5.16.5 '@testing-library/react': ^13.4.0 - '@waveshq/standard-defichain-jellyfishsdk': ^0.18.0 - '@waveshq/standard-web': ^0.18.0 - '@waveshq/standard-web-linter': ^0.18.0 + '@waveshq/standard-defichain-jellyfishsdk': ^0.19.0 + '@waveshq/standard-web': ^0.19.0 + '@waveshq/standard-web-linter': ^0.19.0 '@waveshq/walletkit-core': workspace:* bignumber.js: ^9.1.1 immer: ^9.0.16 @@ -42,9 +42,9 @@ importers: smart-buffer: ^4.2.0 dependencies: '@birthdayresearch/sticky-jest': 0.3.2_3vm2xah52xviuhfzvoq2fyl7ve - '@waveshq/standard-defichain-jellyfishsdk': 0.18.0 - '@waveshq/standard-web': 0.18.0_s36ihefiqldidvltlj3jhp33oi - '@waveshq/standard-web-linter': 0.18.0_rsrorrpfqoe5pmgf4axxk6jweq + '@waveshq/standard-defichain-jellyfishsdk': 0.19.0 + '@waveshq/standard-web': 0.19.0_s36ihefiqldidvltlj3jhp33oi + '@waveshq/standard-web-linter': 0.19.0_rsrorrpfqoe5pmgf4axxk6jweq '@waveshq/walletkit-core': link:../walletkit-core bignumber.js: 9.1.1 immer: 9.0.16 @@ -1400,8 +1400,8 @@ packages: '@typescript-eslint/types': 5.46.1 eslint-visitor-keys: 3.3.0 - /@waveshq/standard-defichain-jellyfishsdk/0.18.0: - resolution: {integrity: sha512-VmH1cjOw/iLfmwsyKZ7FPYDI0ifI7/koG9urgLCptNlkns1j1pKdLW/qqvYD0YnnNTAzZpuXGisJcaOViKyvgg==} + /@waveshq/standard-defichain-jellyfishsdk/0.19.0: + resolution: {integrity: sha512-TrlvAFE4t8KUUegmbujPYegzXfcIETNdo9uGYdplyOwqTSdpcV+76aepE4MoE77AgoXUMVLtAfsTzcW2k+zwvQ==} dependencies: '@defichain/jellyfish-address': 3.10.0_defichain@3.10.0 '@defichain/jellyfish-api-core': 3.10.0_defichain@3.10.0 @@ -1418,8 +1418,8 @@ packages: transitivePeerDependencies: - encoding - /@waveshq/standard-prettier/0.18.0_e7u5tpybn3aag54biwlhh5atyq: - resolution: {integrity: sha512-n0lGpUcsjX3ws8CxJjmQaSuAdMI3TGwW+pWAlxNzvbFOdE4Gz4sEUDkb0JYKp4gTnOQVxvJ37KXotqqXOEF80w==} + /@waveshq/standard-prettier/0.19.0_e7u5tpybn3aag54biwlhh5atyq: + resolution: {integrity: sha512-lW3WqG6Xu4KkTFDbXRrEYw65bC5RJKlxNgJD+8iLeugwD1IDc4aIoHnm9xr97lR6wmGlcHvTY4NszPcSDSzI4w==} dependencies: eslint: 8.29.0 eslint-config-airbnb: 19.0.4_u6r7wmyqgznou2plc6ye67x2ku @@ -1442,8 +1442,8 @@ packages: - supports-color dev: true - /@waveshq/standard-web-linter/0.18.0_pfdqwu4op3ya37d2btxzqvhfm4: - resolution: {integrity: sha512-rOiDs8RtfT9MsbuKD3ijNy7p4LqnMemIrK0VDI99khUEiTVTcZUHWLgiFR5SjPE9a/fUh3KwDC6t++Z5BVIQFQ==} + /@waveshq/standard-web-linter/0.19.0_pfdqwu4op3ya37d2btxzqvhfm4: + resolution: {integrity: sha512-SeRAufzPYUoLHIgZjCp8h7kXPqlvapwhY8ndEBx3Ejqz6iHkfKymESLs2TcNWRAND50lXLyq7vA+u1fqoolbBA==} dependencies: eslint: 8.29.0 eslint-config-airbnb: 19.0.4_u6r7wmyqgznou2plc6ye67x2ku @@ -1479,8 +1479,8 @@ packages: - supports-color dev: true - /@waveshq/standard-web-linter/0.18.0_rsrorrpfqoe5pmgf4axxk6jweq: - resolution: {integrity: sha512-rOiDs8RtfT9MsbuKD3ijNy7p4LqnMemIrK0VDI99khUEiTVTcZUHWLgiFR5SjPE9a/fUh3KwDC6t++Z5BVIQFQ==} + /@waveshq/standard-web-linter/0.19.0_rsrorrpfqoe5pmgf4axxk6jweq: + resolution: {integrity: sha512-SeRAufzPYUoLHIgZjCp8h7kXPqlvapwhY8ndEBx3Ejqz6iHkfKymESLs2TcNWRAND50lXLyq7vA+u1fqoolbBA==} dependencies: eslint: 8.29.0 eslint-config-airbnb: 19.0.4_u6r7wmyqgznou2plc6ye67x2ku @@ -1516,8 +1516,8 @@ packages: - supports-color dev: false - /@waveshq/standard-web/0.18.0_s36ihefiqldidvltlj3jhp33oi: - resolution: {integrity: sha512-ZdTrbzvx0J8wnedg/PtgxoIrjs+f2XOtv8dC0xY9sA+/KRDkwjb9Fia5ZBduakCEgVm2fLk/yv/gO83HUmcuAg==} + /@waveshq/standard-web/0.19.0_s36ihefiqldidvltlj3jhp33oi: + resolution: {integrity: sha512-ZAG1Rws035sY/aita5E6zlE8w+REiNibbXyhNv3Uxwuwh4C3zBDbxrkqvYjX680n2BmHIITR1mQRnJrfFHvfRg==} dependencies: '@netlify/ipx': 1.3.2 '@reduxjs/toolkit': 1.9.1_k4ae6lp43ej6mezo3ztvx6pykq @@ -1549,8 +1549,8 @@ packages: - utf-8-validate dev: false - /@waveshq/standard-web/0.18.0_ym2lyl6exwerw7eywugdmsc5se: - resolution: {integrity: sha512-ZdTrbzvx0J8wnedg/PtgxoIrjs+f2XOtv8dC0xY9sA+/KRDkwjb9Fia5ZBduakCEgVm2fLk/yv/gO83HUmcuAg==} + /@waveshq/standard-web/0.19.0_ym2lyl6exwerw7eywugdmsc5se: + resolution: {integrity: sha512-ZAG1Rws035sY/aita5E6zlE8w+REiNibbXyhNv3Uxwuwh4C3zBDbxrkqvYjX680n2BmHIITR1mQRnJrfFHvfRg==} dependencies: '@netlify/ipx': 1.3.2 '@reduxjs/toolkit': 1.9.1_k4ae6lp43ej6mezo3ztvx6pykq diff --git a/tsconfig.base.json b/tsconfig.base.json index dbf7c82..e2f79db 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -2,8 +2,8 @@ "$schema": "https://json.schemastore.org/tsconfig", "display": "walletkit", "compilerOptions": { - "lib": ["esnext", "dom"], - "target": "ESNext", + "lib": ["es2019", "dom", "dom.iterable"], + "target": "es2019", "module": "commonjs", "moduleResolution": "node", "strict": true,