Skip to content

Commit

Permalink
chore: fix peer deps & remove unused packages (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdtfh authored Dec 6, 2023
1 parent 660ffa6 commit bc2afe3
Show file tree
Hide file tree
Showing 12 changed files with 397 additions and 3,150 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
name: Lint & Build
name: Lint, Typecheck & Test Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -31,3 +31,6 @@ jobs:
# NOTE: Lint needs to run after build because it checks the compiled files for types
- name: Lint
run: pnpm lint

- name: Typecheck examples/with-next
run: cd examples/with-next && pnpm tsc
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"turbo": "^1.10.14"
"turbo": "^1.10.16"
},
"engines": {
"node": ">=18"
}
}
9 changes: 4 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,15 @@
],
"dependencies": {
"buffer": "^6.0.3",
"viem": "^1.14.0",
"viem": "^1.19.11",
"zustand": "^4.3.3"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "6.7.4",
"@typescript-eslint/parser": "6.7.4",
"esbuild": "0.14.43",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"prettier": "^2.7.1",
"prettier-plugin-sort-imports-desc": "^1.0.0",
"tsup": "^7.2.0",
"typescript": "5.2.2"
"typescript": "^5.3.2"
}
}
4 changes: 2 additions & 2 deletions packages/core/src/types/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export enum AppErrorCodes {

export enum VerificationState {
PreparingClient = 'loading_widget',
WaitingForConnection = 'awaiting_connection',
WaitingForApp = 'awaiting_app',
WaitingForConnection = 'awaiting_connection', // Awaiting connection from the wallet
WaitingForApp = 'awaiting_app', // Awaiting user confirmation in wallet
Confirmed = 'confirmed',
Failed = 'failed',
}
2 changes: 1 addition & 1 deletion packages/react/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = {
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/promise-function-async': ['error', { checkArrowFunctions: false }],
'@typescript-eslint/sort-type-union-intersection-members': 'warn',
'@typescript-eslint/sort-type-constituents': 'warn',

'jsx-a11y/media-has-caption': 0,

Expand Down
15 changes: 5 additions & 10 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,18 @@
"framer-motion": "^7.6.7",
"posthog-js-lite": "2.4.0",
"qrcode": "^1.5.1",
"react-shadow": "^19.0.3",
"react-shadow": "^20.4.0",
"zustand": "^4.3.3"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@types/jest": "^29.5.0",
"@types/node": "18.11.9",
"@types/qrcode": "^1.5.0",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"@typescript-eslint/eslint-plugin": "5.20.0",
"@typescript-eslint/parser": "5.20.0",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"autoprefixer": "^10.4.13",
"eslint": "8.29.0",
"eslint": "8.54.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-compat": "^4.1.1",
"eslint-plugin-import": "2.26.0",
Expand All @@ -93,15 +90,13 @@
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-tailwindcss": "^3.7.1",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"postcss": "^8.4.31",
"prettier": "^2.7.1",
"prettier-plugin-sort-imports-desc": "^1.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "^3.2.4",
"tsup": "^7.2.0",
"typescript": "4.9.3"
"typescript": "^5.3.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const ERROR_MESSAGES: Record<AppErrorCodes, string> = {
[AppErrorCodes.MaxVerificationsReached]: __(
'You have already verified the maximum number of times for this action.'
),
[AppErrorCodes.AlreadySigned]: __('You have already verified for this action.'),
[AppErrorCodes.CredentialUnavailable]: __('It seems you do not have the credential required by this app.'),
[AppErrorCodes.MalformedRequest]: __(
'There was a problem with this request. Please try again or contact the app owner.'
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/lang/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const translations: Record<string, Record<string, string> | undefined> = {}

const getLang = (): Record<string, string> | undefined => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- apparently `navigator.languages` can be undefined
if (typeof navigator === 'undefined' || !navigator.languages) return
if (!navigator?.languages) return

const supportedLang = navigator.languages.find(l => translations[l] != undefined) ?? ''

Expand Down
1 change: 1 addition & 0 deletions packages/react/src/services/wld-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const useWorldBridge = (
}, [app_id, action, signal, action_description, createClient, ref_credential_types, bridge_url, connectorURI])

useEffect(() => {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
if (!connectorURI || result || errorCode) return

const interval = setInterval(() => void pollForUpdates(), 3000)
Expand Down
2 changes: 1 addition & 1 deletion packages/standalone/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = {
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/promise-function-async': ['error', { checkArrowFunctions: false }],
'@typescript-eslint/sort-type-union-intersection-members': 'warn',
'@typescript-eslint/sort-type-constituents': 'warn',

'jsx-a11y/media-has-caption': 0,

Expand Down
8 changes: 4 additions & 4 deletions packages/standalone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
"devDependencies": {
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"@typescript-eslint/eslint-plugin": "5.20.0",
"@typescript-eslint/parser": "5.20.0",
"eslint": "8.29.0",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"eslint": "8.54.0",
"prettier": "^2.8.8",
"prettier-plugin-sort-imports-desc": "^1.0.0",
"tsup": "^7.2.0",
"typescript": "4.9.3"
"typescript": "^5.3.2"
}
}
Loading

0 comments on commit bc2afe3

Please sign in to comment.