Skip to content

Commit 24ff6f2

Browse files
committed
knip it in the... (#4751)
1. make `knip` a part of `packages/thirdweb` 2. clean up all the things 3. ??? 4. profit <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on removing unused files, updating types, and deprecating constants. ### Detailed summary - Removed unused files related to benchmarks, wallets, and UI components - Updated type definitions in various files - Deprecated and replaced constant `ADDRESS_ZERO` with `ZERO_ADDRESS` > The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`, `packages/thirdweb/src/pay/utils/definitions.ts`, `packages/thirdweb/src/utils/hashing/sha256.ts`, `packages/thirdweb/src/wallets/eip5792/show-calls-status.ts`, `packages/thirdweb/src/extensions/modules/ClaimableERC20/mint.ts`, `packages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx`, `apps/portal/package.json`, `packages/thirdweb/src/extensions/modules/ClaimableERC721/mint.ts`, `packages/thirdweb/src/utils/hashing/hashMessage.ts`, `packages/thirdweb/src/react/native/ui/components/text.tsx`, `packages/thirdweb/src/utils/promise/resolve-promised-value.ts`, `packages/thirdweb/src/auth/core/verify-jwt.ts`, `packages/thirdweb/src/utils/hashing/keccak256.ts`, `packages/thirdweb/src/utils/uint8-array.ts`, `packages/thirdweb/src/react/core/design-system/CustomThemeProvider.tsx`, `packages/thirdweb/src/react/native/ui/connect/SendScreen.tsx`, `packages/thirdweb/src/react/web/ui/MediaRenderer/MediaRenderer.tsx`, `packages/thirdweb/src/gas/estimate-l1-fee.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx`, `packages/thirdweb/src/extensions/modules/MintableERC721/mintWithSignature.ts`, `packages/thirdweb/src/react/native/ui/connect/ExternalWalletsList.tsx`, `packages/thirdweb/src/exports/extensions/erc1155.ts`, `packages/thirdweb/src/extensions/modules/ClaimableERC1155/mint.ts`, `packages/thirdweb/src/extensions/modules/MintableERC1155/mintWithSignature.ts`, `packages/thirdweb/src/utils/encoding/helpers/trim.ts`, `packages/thirdweb/src/wallets/utils/getTokenBalance.ts`, `apps/dashboard/knip.json`, `packages/thirdweb/src/react/native/ui/connect/TokenListScreen.tsx`, `packages/thirdweb/src/extensions/vote/write/executeProposal.ts`, `packages/thirdweb/src/react/native/ui/components/spinner.tsx`, `packages/thirdweb/src/react/web/ui/MediaRenderer/ModelViewer.tsx`, `packages/thirdweb/src/transaction/extract-error.ts`, `packages/thirdweb/src/react/native/ui/components/button.tsx`, `packages/thirdweb/src/extensions/erc1155/write/updateTokenURI.ts`, `packages/thirdweb/src/wallets/interfaces/wallet.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts`, `packages/thirdweb/src/utils/storage/walletStorage.ts`, `packages/thirdweb/src/wallets/in-app/native/native-connector.ts`, `packages/thirdweb/src/extensions/erc20/write/sigMint.ts`, `packages/thirdweb/src/extensions/erc721/write/updateTokenURI.ts`, `packages/thirdweb/src/react/web/wallets/ecosystem/EcosystemWalletFormUI.tsx`, `packages/thirdweb/src/wallets/eip5792/wait-for-bundle.ts`, `packages/thirdweb/src/utils/jwt/jwt-header.ts`, `packages/thirdweb/src/extensions/modules/MintableERC20/mintWithSignature.ts`, `packages/thirdweb/src/exports/modules.ts`, `packages/thirdweb/src/react/web/wallets/in-app/InAppWalletFormUI.tsx`, `packages/thirdweb/src/transaction/actions/wait-for-tx-receipt.ts`, `packages/thirdweb/src/auth/core/generate-jwt.ts`, `packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts`, `packages/thirdweb/src/exports/extensions/erc1271.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts`, `packages/thirdweb/src/contract/deployment/publisher.ts`, `packages/thirdweb/src/extensions/erc721/drops/write/updateMetadata.ts`, `packages/thirdweb/src/extensions/erc1155/drops/write/updateMetadata.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-marketplace.ts`, `packages/thirdweb/src/wallets/in-app/native/auth/index.ts`, `packages/thirdweb/src/wallets/in-app/native/helpers/auth/middleware.ts`, `packages/thirdweb/src/utils/platform.ts`, `.github/CODEOWNERS`, `packages/thirdweb/src/wallets/in-app/web/lib/auth/index.ts`, `packages/thirdweb/src/react/core/utils/structuralSharing.ts`, `packages/thirdweb/src/react/core/hooks/transaction/useSendAndConfirmTransaction.ts`, `packages/thirdweb/src/extensions/prebuilts/get-required-transactions.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.tsx`, `packages/thirdweb/src/extensions/ens/resolve-l2-name.ts`, `packages/thirdweb/src/utils/any-evm/deploy-metadata.ts`, `packages/thirdweb/src/cli/commands/generate/utils.ts`, `packages/thirdweb/src/extensions/farcaster/eip712Signatures/keyRequestSignature.ts`, `packages/thirdweb/src/extensions/airdrop/write/airdropERC20WithSignature.ts`, `packages/thirdweb/src/extensions/airdrop/write/airdropERC721WithSignature.ts`, `packages/thirdweb/src/transaction/actions/zksync/send-eip712-transaction.ts`, `packages/thirdweb/src/wallets/in-app/web/utils/iFrameCommunication/InAppWalletIframeCommunicator.ts`, `packages/thirdweb/src/utils/any-evm/zksync/constants.ts`, `packages/thirdweb/src/extensions/marketplace/direct-listings/utils.ts`, `packages/thirdweb/src/transaction/actions/gasless/send-gasless-transaction.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-vote.ts`, `packages/thirdweb/src/react/web/ui/components/Drawer.tsx`, `packages/thirdweb/src/extensions/airdrop/write/airdropERC1155WithSignature.ts`, `packages/thirdweb/src/react/core/hooks/others/useWalletBalance.ts`, `packages/thirdweb/src/extensions/permissions/utils.ts`, `packages/thirdweb/src/wallets/in-app/native/helpers/auth/logout.ts`, `packages/thirdweb/src/wallets/smart/lib/utils.ts`, `packages/thirdweb/src/react/web/ui/components/buttons.tsx`, `packages/thirdweb/src/react/web/ui/prebuilt/thirdweb/ClaimButton/index.tsx`, `packages/thirdweb/src/wallets/wallet-connect/receiver/index.ts`, `packages/thirdweb/src/transaction/actions/gasless/providers/engine.ts`, `packages/thirdweb/src/transaction/actions/gasless/providers/openzeppelin.ts`, `packages/thirdweb/src/wallets/in-app/web/types.ts`, `packages/thirdweb/src/extensions/airdrop/write/claimERC20.ts`, `packages/thirdweb/test/globalSetup.ts`, `packages/thirdweb/src/extensions/erc721/read/getAllOwners.ts`, `packages/thirdweb/src/wallets/smart/lib/userop.ts`, `packages/thirdweb/src/wallets/in-app/native/helpers/wallet/retrieval.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/iframe-wallet.ts`, `packages/thirdweb/src/react/web/ui/TransactionButton/TransactionModal.tsx`, `packages/thirdweb/src/react/native/ui/connect/ConnectedModal.tsx`, `packages/thirdweb/src/extensions/erc4337/account/common.ts`, `packages/thirdweb/test/vitest.config.ts`, `packages/thirdweb/src/exports/extensions/farcaster.ts`, `packages/thirdweb/src/exports/chains.ts`, `packages/thirdweb/src/extensions/erc4337/account/permissions.test.ts`, `packages/thirdweb/src/wallets/in-app/core/constants/settings.ts`, `packages/thirdweb/scripts/typedoc.mjs`, `packages/thirdweb/src/extensions/airdrop/write/merkleInfoERC20.ts`, `packages/thirdweb/src/utils/extensions/drops/hash-entry.ts`, `packages/thirdweb/src/extensions/farcaster/eip712Signatures/registerSignature.ts`, `packages/thirdweb/src/react/native/ui/icons/svgs.ts`, `packages/thirdweb/src/transaction/actions/gasless/providers/biconomy.ts`, `packages/thirdweb/src/extensions/farcaster/eip712Signatures/addSignature.ts`, `packages/thirdweb/src/react/web/ui/AutoConnect/AutoConnect.tsx`, `packages/thirdweb/src/react/native/ui/AutoConnect/AutoConnect.tsx`, `packages/service-utils/package.json`, `packages/thirdweb/src/stories/utils.tsx`, `packages/thirdweb/src/react/core/utils/defaultTokens.ts`, `package.json`, `packages/thirdweb/knip.json`, `packages/thirdweb/src/pay/buyWithCrypto/getStatus.ts`, `packages/thirdweb/src/exports/extensions/marketplace.ts`, `packages/thirdweb/src/utils/semver.ts`, `packages/thirdweb/src/extensions/uniswap/read/getUniswapV3Pools.ts`, `apps/dashboard/package.json`, `packages/thirdweb/src/utils/royalty-engine.ts`, `packages/react-native-adapter/package.json`, `packages/thirdweb/src/wallets/in-app/core/authentication/types.ts`, `packages/thirdweb/src/contract/deployment/deploy-deterministic.ts`, `packages/thirdweb/src/contract/deployment/utils/infra.ts`, `packages/thirdweb/src/wallets/injected/index.ts`, `packages/thirdweb/src/wallets/smart/lib/packUserOp.ts`, `packages/thirdweb/src/wallets/in-app/native/helpers/storage/local.ts`, `packages/thirdweb/src/react/web/ui/components/ChainIcon.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.tsx`, `packages/thirdweb/src/wallets/in-app/native/helpers/constants.ts`, `packages/thirdweb/src/wallets/in-app/native/helpers/api/fetchers.ts`, `packages/thirdweb/package.json`, `packages/thirdweb/src/react/core/utils/walletIcon.ts`, `pnpm-lock.yaml` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent e9ae980 commit 24ff6f2

File tree

234 files changed

+2388
-9556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+2388
-9556
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ packages/thirdweb/src/react/ @joaquim-verges @gregfromstl @MananTank @jnsdls @ed
1111
packages/thirdweb/src/reactive/ @joaquim-verges @gregfromstl @MananTank @jnsdls
1212
packages/thirdweb/src/gas/ @joaquim-verges @jnsdls
1313
packages/thirdweb/src/pay/ @joaquim-verges @gregfromstl @MananTank @jnsdls @edwardysun
14-
packages/typedoc-gen/ @MananTank @jnsdls @joaquim-verges
1514
packages/service-utils/ @arcoraven @jnsdls @joaquim-verges
1615
packages/eslint-config-thirdweb/ @jnsdls @joaquim-verges
1716
packages/tw-tsconfig/ @jnsdls @joaquim-verges

apps/dashboard/knip.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"next": true,
44
"ignore": ["src/@/components/ui/**"],
55
"project": ["src/**"],
6-
"ignoreBinaries": ["only-allow", "knip", "biome"],
6+
"ignoreBinaries": ["only-allow", "biome"],
77
"ignoreDependencies": ["@storybook/blocks", "@thirdweb-dev/service-utils"]
88
}

apps/dashboard/package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,21 @@
111111
"@next/bundle-analyzer": "14.2.12",
112112
"@next/eslint-plugin-next": "14.2.12",
113113
"@playwright/test": "1.47.1",
114-
"@storybook/addon-essentials": "8.3.1",
115-
"@storybook/addon-interactions": "8.3.1",
116-
"@storybook/addon-links": "8.3.1",
117-
"@storybook/addon-onboarding": "8.3.1",
114+
"@storybook/addon-essentials": "8.3.2",
115+
"@storybook/addon-interactions": "8.3.2",
116+
"@storybook/addon-links": "8.3.2",
117+
"@storybook/addon-onboarding": "8.3.2",
118118
"@storybook/addon-viewport": "8.3.1",
119119
"@storybook/blocks": "8.3.1",
120120
"@storybook/nextjs": "8.3.1",
121-
"@storybook/react": "8.3.1",
122-
"@storybook/test": "8.3.1",
121+
"@storybook/react": "8.3.2",
122+
"@storybook/test": "8.3.2",
123123
"@types/color": "^3.0.6",
124124
"@types/node": "20.14.9",
125125
"@types/papaparse": "^5.3.14",
126126
"@types/pluralize": "^0.0.33",
127127
"@types/qrcode": "^1.5.5",
128-
"@types/react": "^18.3.7",
128+
"@types/react": "^18.3.8",
129129
"@types/react-dom": "^18",
130130
"@types/react-table": "^7.7.20",
131131
"@types/spdx-correct": "^3.1.3",
@@ -138,9 +138,10 @@
138138
"eslint-config-biome": "1.8.3",
139139
"eslint-plugin-react-compiler": "0.0.0-experimental-ca16900-20240916",
140140
"eslint-plugin-storybook": "^0.8.0",
141+
"knip": "^5.30.4",
141142
"next-sitemap": "^4.2.3",
142143
"postcss": "8.4.47",
143-
"storybook": "8.3.1",
144+
"storybook": "8.3.2",
144145
"tailwindcss": "3.4.12",
145146
"typescript": "5.6.2"
146147
}

apps/playground-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"devDependencies": {
4545
"@types/node": "20.14.9",
46-
"@types/react": "^18.3.7",
46+
"@types/react": "^18.3.8",
4747
"@types/react-dom": "^18",
4848
"eslint": "8.57.0",
4949
"eslint-config-next": "14.2.12",

apps/portal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@types/flexsearch": "^0.7.6",
5757
"@types/mdx": "^2.0.13",
5858
"@types/node": "20.14.9",
59-
"@types/react": "^18.3.7",
59+
"@types/react": "^18.3.8",
6060
"@types/react-dom": "^18",
6161
"@types/react-html-parser": "^2.0.6",
6262
"@types/tryghost__content-api": "^1.3.16",

apps/wallet-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"devDependencies": {
3838
"@types/node": "20.14.9",
39-
"@types/react": "^18.3.7",
39+
"@types/react": "^18.3.8",
4040
"@types/react-dom": "^18",
4141
"eslint": "8.57.0",
4242
"eslint-config-next": "14.2.12",

package.json

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,14 @@
4141
"hotlink-revert": "node ./scripts/hotlink/hotlink-revert.mjs"
4242
},
4343
"devDependencies": {
44-
"@biomejs/biome": "1.9.1",
44+
"@biomejs/biome": "1.9.2",
4545
"@changesets/changelog-github": "0.5.0",
4646
"@changesets/cli": "2.27.8",
4747
"@manypkg/cli": "0.21.4",
4848
"@manypkg/get-packages": "2.2.2",
49-
"@playwright/test": "1.47.1",
50-
"@size-limit/preset-big-lib": "11.1.5",
51-
"@types/bun": "1.1.9",
5249
"@types/node": "20.14.9",
53-
"@types/react": "^18.3.7",
54-
"@viem/anvil": "0.0.10",
55-
"@vitest/coverage-v8": "2.1.1",
56-
"dotenv-mono": "^1.3.14",
57-
"knip": "^5.30.2",
58-
"mitata": "0.1.14",
59-
"react": "18.3.1",
60-
"rimraf": "6.0.1",
61-
"sharp": "^0.33.5",
62-
"size-limit": "11.1.5",
6350
"turbo": "2.1.2",
64-
"typedoc-gen": "workspace:*",
65-
"typescript": "5.6.2",
66-
"vitest": "2.1.1",
67-
"yalc": "1.0.0-pre.53"
51+
"typescript": "5.6.2"
6852
},
6953
"manypkg": {
7054
"defaultBranch": "main"
@@ -95,5 +79,5 @@
9579
"@typescript-eslint/typescript-estree": "^7.14.1"
9680
}
9781
},
98-
"packageManager": "pnpm@9.10.0"
82+
"packageManager": "pnpm@9.11.0"
9983
}

packages/react-native-adapter/package.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,20 @@
2323
},
2424
"./package.json": "./package.json"
2525
},
26-
"files": [
27-
"dist/*",
28-
"src/*"
29-
],
26+
"files": ["dist/*", "src/*"],
3027
"dependencies": {
31-
"@aws-sdk/client-lambda": "3.651.1",
32-
"@aws-sdk/credential-providers": "3.651.1",
28+
"@aws-sdk/client-lambda": "3.656.0",
29+
"@aws-sdk/credential-providers": "3.654.0",
3330
"@mobile-wallet-protocol/client": "0.0.3",
34-
"@walletconnect/react-native-compat": "2.13.2",
35-
"aws-amplify": "5.3.19"
31+
"@walletconnect/react-native-compat": "2.13.2"
32+
},
33+
"devDependencies": {
34+
"rimraf": "6.0.1"
3635
},
3736
"peerDependencies": {
3837
"@coinbase/wallet-mobile-sdk": "^1",
3938
"@react-native-async-storage/async-storage": "^1 || ^2",
4039
"@react-native-community/netinfo": "^11",
41-
"amazon-cognito-identity-js": "^6",
4240
"expo-application": "^5",
4341
"expo-linking": "^6",
4442
"expo-web-browser": "^13",
@@ -62,8 +60,7 @@
6260
"build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
6361
"build:esm": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json",
6462
"build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
65-
"clean": "rimraf dist",
66-
"push": "yalc push"
63+
"clean": "rimraf dist"
6764
},
6865
"engines": {
6966
"node": ">=18"

packages/service-utils/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"devDependencies": {
4545
"@cloudflare/workers-types": "4.20240909.0",
4646
"@types/node": "20.14.9",
47-
"typescript": "5.6.2"
47+
"typescript": "5.6.2",
48+
"vitest": "2.1.1"
4849
},
4950
"scripts": {
5051
"format": "biome format ./src --write",
@@ -55,7 +56,6 @@
5556
"build:cjs": "tsc --noCheck --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
5657
"build:esm": "tsc --noCheck --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json",
5758
"build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
58-
"push": "yalc push",
5959
"test": "vitest run"
6060
}
6161
}

packages/thirdweb/benchmarks/README.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)