Skip to content

Commit

Permalink
chore: update dependencies [LIVE-8328] (#223)
Browse files Browse the repository at this point in the history
* chore: bump dependencies
update eslint configs
fix new lint issues
update tsconfig
add tsconfig $schema for prod ones missing the auto schema in vscode

* chore: format with prettier 3 defaults
  • Loading branch information
Justkant authored Sep 6, 2023
1 parent 3bf15ca commit 41c3b7b
Show file tree
Hide file tree
Showing 123 changed files with 3,146 additions and 3,043 deletions.
18 changes: 9 additions & 9 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
"author": "",
"license": "ISC",
"dependencies": {
"autoprefixer": "^10.4.14",
"next": "^13.4.4",
"nextra": "^2.7.1",
"nextra-theme-blog": "^2.7.1",
"nextra-theme-docs": "^2.7.1",
"postcss": "^8.4.24",
"autoprefixer": "^10.4.15",
"next": "^13.4.19",
"nextra": "^2.12.3",
"nextra-theme-blog": "^2.12.3",
"nextra-theme-docs": "^2.12.3",
"postcss": "^8.4.29",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.3.2"
"tailwindcss": "^3.3.3"
},
"devDependencies": {
"@types/node": "^20.2.5",
"typescript": "^5.1.3"
"@types/node": "^20.5.9",
"typescript": "^5.2.2"
}
}
30 changes: 15 additions & 15 deletions apps/wallet-api-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@
"dependencies": {
"@ledgerhq/wallet-api-core": "workspace:*",
"@ledgerhq/wallet-api-simulator": "workspace:*",
"@next/font": "13.4.4",
"@next/font": "13.4.19",
"@radix-ui/react-dropdown-menu": "^2.0.5",
"@radix-ui/react-icons": "^1.3.0",
"@tailwindcss/typography": "^0.5.9",
"@types/node": "20.2.5",
"@types/react": "18.2.7",
"@types/react-dom": "18.2.4",
"@uiw/codemirror-extensions-langs": "^4.21.2",
"@uiw/react-codemirror": "^4.21.2",
"@types/node": "20.5.9",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"@uiw/codemirror-extensions-langs": "^4.21.13",
"@uiw/react-codemirror": "^4.21.13",
"bufferutil": "^4.0.7",
"flowbite": "^1.6.5",
"next": "^13.4.4",
"flowbite": "^1.8.1",
"next": "^13.4.19",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "5.0.4",
"typescript": "5.2.2",
"utf-8-validate": "^6.0.3",
"uuid": "^9.0.0",
"zod": "^3.21.4"
"zod": "^3.22.2"
},
"devDependencies": {
"@types/uuid": "^9.0.1",
"autoprefixer": "^10.4.14",
"eslint": "^8.41.0",
"@types/uuid": "^9.0.3",
"autoprefixer": "^10.4.15",
"eslint": "^8.48.0",
"eslint-config-custom": "workspace:*",
"postcss": "^8.4.24",
"postcss": "^8.4.29",
"postcss-import": "^15.1.0",
"tailwindcss": "^3.3.2"
"tailwindcss": "^3.3.3"
}
}
2 changes: 1 addition & 1 deletion apps/wallet-api-tools/src/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function Editor() {
useEffect(() => {
const codeMirror = codeMirrorRef.current;

if (codeMirror && codeMirror.editor) {
if (codeMirror?.editor) {
codeMirror.editor.scrollTop = codeMirror.editor.scrollHeight;
}
}, [history]);
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.1",
"@tsconfig/node18": "^2.0.1",
"@tsconfig/strictest": "^2.0.1",
"eslint": "^8.41.0",
"@changesets/cli": "^2.26.2",
"eslint": "^8.48.0",
"eslint-config-custom": "workspace:*",
"husky": "^8.0.3",
"lint-staged": "^13.2.2",
"turbo": "^1.9.9"
"lint-staged": "^14.0.1",
"turbo": "^1.10.13"
},
"engines": {
"node": ">=16",
"pnpm": ">=7"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"dependencies": {
"@tsconfig/recommended": "^1.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/client-react/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
SharedArrayBuffer: "readonly",
},
parserOptions: {
project: ["./tsconfig.json"],
project: true,
tsconfigRootDir: __dirname,
},
settings: {
Expand Down
18 changes: 9 additions & 9 deletions packages/client-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
"@ledgerhq/wallet-api-client": "workspace:*"
},
"devDependencies": {
"@types/jest": "^29.5.1",
"@types/node": "^20.2.5",
"@types/react": "^18.2.7",
"eslint": "^8.41.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"@types/jest": "^29.5.4",
"@types/node": "^20.5.9",
"@types/react": "^18.2.21",
"eslint": "^8.48.0",
"jest": "^29.6.4",
"jest-environment-jsdom": "^29.6.4",
"jest-shared-config": "workspace:*",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"react": "^18.2.0",
"ts-jest": "^29.1.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
"typescript": "^5.2.2"
},
"peerDependencies": {
"react": "^16.8.0 || ^17 || ^18"
Expand Down
3 changes: 2 additions & 1 deletion packages/client-react/prod-esm.tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"module": "es2022",
"module": "ESNext",
"outDir": "./lib-es"
},
"include": ["src/**/*"]
Expand Down
1 change: 1 addition & 0 deletions packages/client-react/prod.tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { WalletAPIProviderContextValue } from "./types";

export function updateLoadableInState<
T extends keyof WalletAPIProviderContextValue["state"]
T extends keyof WalletAPIProviderContextValue["state"],
>(
setState: WalletAPIProviderContextValue["setState"],
key: T,
patch: Partial<WalletAPIProviderContextValue["state"][T]>
patch: Partial<WalletAPIProviderContextValue["state"][T]>,
) {
setState((oldState) => ({
...oldState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function WalletAPIProvider(props: WalletAPIProviderProps) {
const { children, transport } = props;
const [client, setClient] = useState<WalletAPIClient | null>(null);
const [state, setState] = useState<WalletAPIProviderContextState>(
initialContextValue.state
initialContextValue.state,
);

useEffect(() => {
Expand All @@ -26,7 +26,7 @@ export function WalletAPIProvider(props: WalletAPIProviderProps) {
state,
setState,
}),
[client, state, setState]
[client, state, setState],
);

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/client-react/src/hooks/useAccounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function useAccounts(): UseAccountsReturn {
accounts.updatedAt,
accounts.value,
updateData,
]
],
);

return results;
Expand Down
2 changes: 1 addition & 1 deletion packages/client-react/src/hooks/useCapabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function useCapabilities(): UseCapabilitiesReturn {
capabilities.updatedAt,
capabilities.value,
updateData,
]
],
);

return results;
Expand Down
2 changes: 1 addition & 1 deletion packages/client-react/src/hooks/useCurrencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function useCurrencies(): UseCurrenciesReturn {
currencies.updatedAt,
currencies.value,
updateData,
]
],
);

return results;
Expand Down
4 changes: 2 additions & 2 deletions packages/client-react/src/hooks/useRequestAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ export function useRequestAccount(): UseRequestAccountReturn {
}));
}
},
[client]
[client],
);

const result = useMemo(
() => ({
requestAccount,
...state,
}),
[requestAccount, state]
[requestAccount, state],
);

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function useSignAndBroadcastTransaction(): UseSignAndBroadcastTransaction
}

const transactionHash = await client.transaction.signAndBroadcast(
...params
...params,
);

setState((oldState) => ({
Expand All @@ -58,15 +58,15 @@ export function useSignAndBroadcastTransaction(): UseSignAndBroadcastTransaction
}));
}
},
[client]
[client],
);

const result = useMemo(
() => ({
signAndBroadcastTransaction,
...state,
}),
[signAndBroadcastTransaction, state]
[signAndBroadcastTransaction, state],
);

return result;
Expand Down
4 changes: 2 additions & 2 deletions packages/client-react/src/hooks/useSignMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ export function useSignMessage(): UseSignMessageReturn {
}));
}
},
[client]
[client],
);

const result = useMemo(
() => ({
signMessage,
...state,
}),
[signMessage, state]
[signMessage, state],
);

return result;
Expand Down
6 changes: 3 additions & 3 deletions packages/client-react/src/hooks/useSignTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { WalletAPIProviderContext } from "../components/WalletAPIProvider/contex
type UseSignTransactionState = {
pending: boolean;
signature: Buffer | null;
error: unknown | null;
error: unknown;
};

type SignTransactionParams = Parameters<WalletAPIClient["transaction"]["sign"]>;
Expand Down Expand Up @@ -52,15 +52,15 @@ export function useSignTransaction(): UseSignTransactionReturn {
}));
}
},
[client]
[client],
);

const result = useMemo(
() => ({
signTransaction,
...state,
}),
[signTransaction, state]
[signTransaction, state],
);

return result;
Expand Down
2 changes: 1 addition & 1 deletion packages/client-react/src/hooks/useUserId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function useUserId(): UseUserIdReturn {
error: userId.error,
updateData,
}),
[userId.error, userId.loading, userId.updatedAt, userId.value, updateData]
[userId.error, userId.loading, userId.updatedAt, userId.value, updateData],
);

return results;
Expand Down
2 changes: 1 addition & 1 deletion packages/client-react/src/hooks/useWalletAPIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function useWalletAPIClient(): UseWalletAPIClientReturn {
() => ({
client,
}),
[client]
[client],
);

return results;
Expand Down
2 changes: 1 addition & 1 deletion packages/client-react/src/hooks/useWalletInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function useWalletInfo(): UseAccountReturn {
walletInfo.updatedAt,
walletInfo.value,
updateData,
]
],
);

return results;
Expand Down
2 changes: 1 addition & 1 deletion packages/client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
SharedArrayBuffer: "readonly",
},
parserOptions: {
project: ["./tsconfig.json"],
project: true,
tsconfigRootDir: __dirname,
},
rules: {
Expand Down
20 changes: 10 additions & 10 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
"test": "jest"
},
"dependencies": {
"@ledgerhq/hw-transport": "^6.28.4",
"@ledgerhq/hw-transport": "^6.28.8",
"@ledgerhq/wallet-api-core": "workspace:*",
"bignumber.js": "^9.1.1"
"bignumber.js": "^9.1.2"
},
"devDependencies": {
"@types/jest": "^29.5.1",
"@types/node": "^20.2.5",
"eslint": "^8.41.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"@types/jest": "^29.5.4",
"@types/node": "^20.5.9",
"eslint": "^8.48.0",
"jest": "^29.6.4",
"jest-environment-jsdom": "^29.6.4",
"jest-shared-config": "workspace:*",
"prettier": "^2.8.8",
"ts-jest": "^29.1.0",
"prettier": "^3.0.3",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
"typescript": "^5.2.2"
}
}
3 changes: 2 additions & 1 deletion packages/client/prod-esm.tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"module": "es2022",
"module": "ESNext",
"outDir": "./lib-es"
},
"include": ["src/**/*"]
Expand Down
1 change: 1 addition & 0 deletions packages/client/prod.tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
Expand Down
Loading

2 comments on commit 41c3b7b

@vercel
Copy link

@vercel vercel bot commented on 41c3b7b Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-api – ./apps/docs

wallet-api-ledgerhq.vercel.app
wallet.api.live.ledger.com
wallet-api-git-main-ledgerhq.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 41c3b7b Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-api-wallet-api-tools – ./apps/wallet-api-tools

wallet-api-wallet-api-tools-ledgerhq.vercel.app
wallet-api-wallet-api-tools.vercel.app
wallet-api-wallet-api-tools-git-main-ledgerhq.vercel.app

Please sign in to comment.