Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated (#1) #4391

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@tmm @jxom

/packages/connectors/src/metaMask @ecp4224 @omridan159 @abretonc7s @elefantel @BjornGunnarsson @EdouardBougon
/packages/connectors/src/safe @DaniSomoza @dasanra @mikhailxyz @yagopv
/packages/connectors/src/walletConnect @ganchoradkov @glitch-txs @ignaciosantise @tomiir
55 changes: 47 additions & 8 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- > [!IMPORTANT] -->
<!-- > Wagmi is participating in Gitcoin Grants round 21. Consider <a href="https://explorer.gitcoin.co/#/round/42161/389/74">supporting the project</a>. Thank you. 🙏 -->

<br>

<p align="center">
Expand Down Expand Up @@ -70,14 +73,20 @@ Contributions to Wagmi are greatly appreciated! If you're interested in contribu

If you find Wagmi useful or use it for work, please consider [sponsoring Wagmi](https://github.com/sponsors/wevm?metadata_campaign=gh_readme_support). Thank you 🙏

<a href="https://paradigm.xyz">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/paradigm-dark.svg">
<img alt="paradigm logo" src="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/paradigm-light.svg" width="auto" height="70">
</picture>
</a>

<br>
<p>
<a href="https://paradigm.xyz">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/paradigm-dark.svg">
<img alt="paradigm logo" src="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/paradigm-light.svg" width="auto" height="70">
</picture>
</a>
<a href="https://ithaca.xyz">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/ithaca-dark.svg">
<img alt="ithaca logo" src="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/ithaca-light.svg" width="auto" height="70">
</picture>
</a>
</p>

<p>
<a href="https://twitter.com/family">
Expand Down Expand Up @@ -194,6 +203,36 @@ If you find Wagmi useful or use it for work, please consider [sponsoring Wagmi](
<img alt="brave logo" src="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/brave-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://linea.build">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/linea-dark.svg">
<img alt="linea logo" src="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/linea-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://uniswap.org">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/uniswap-dark.svg">
<img alt="uniswap logo" src="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/uniswap-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://biconomy.io">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wevm/.github/b0276d897be98a4c94ad1d1c72ce99a1020eeb58/content/sponsors/biconomy-dark.svg">
<img alt="biconomy logo" src="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/biconomy-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://thirdweb.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/thirdweb-dark.svg">
<img alt="thirdweb logo" src="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/thirdweb-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://uxuy.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/uxuy-dark.svg">
<img alt="uxuy logo" src="https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/uxuy-light.svg" width="auto" height="50">
</picture>
</a>
</p>

[Sponsor Wagmi](https://github.com/sponsors/wevm?metadata_campaign=gh_readme_support_bottom)
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
workflow_dispatch:

jobs:
lint:
name: Lint
check:
name: Check
permissions:
contents: write
runs-on: ubuntu-latest
Expand All @@ -14,15 +14,17 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PTOKEN }}

- name: Install dependencies
uses: wevm/actions/.github/actions/pnpm@main

- name: Lint repo
run: pnpm lint:repo
- name: Check repo
run: pnpm check:repo

- name: Lint code
run: pnpm lint
- name: Check code
run: pnpm check

- name: Update package versions
run: pnpm version:update
Expand All @@ -37,7 +39,7 @@ jobs:

build:
name: Build
needs: lint
needs: check
runs-on: ubuntu-latest
timeout-minutes: 5

Expand All @@ -59,13 +61,13 @@ jobs:

types:
name: Types
needs: lint
needs: check
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
typescript-version: ['5.0.4', '5.1.6', '5.2.2', '5.3.3', '5.4.5', '5.5.2']
viem-version: ['2.17.0', 'latest']
viem-version: ['2.21.28', 'latest']

steps:
- name: Clone repository
Expand All @@ -80,9 +82,9 @@ jobs:
run: pnpm preconstruct

- name: Check types
run: pnpm typecheck
run: pnpm check:types

# Redundant with `pnpm typecheck`
# Redundant with `pnpm check:types`
# If Vitest adds special features in the future, e.g. type coverage, can add this back!
# - name: Test types
# run: pnpm test:typecheck
Expand Down
14 changes: 1 addition & 13 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,7 @@
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"[javascript][javascriptreact][json][typescript][typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[vue]": {
Expand Down
59 changes: 32 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
"dev:react": "pnpm --filter vite-react dev",
"dev:vue": "pnpm --filter vite-vue dev",
"docs:dev": "pnpm --filter site dev",
"check": "biome check --write",
"check:repo": "sherif -i viem",
"check:types": "pnpm run --r --parallel check:types && tsc --noEmit",
"check:unused": "pnpm clean && knip",
"format": "biome format --write",
"lint": "biome check --write",
"lint:repo": "sherif",
"lint:unused": "pnpm clean && knip",
"postinstall": "pnpm preconstruct",
"preconstruct": "bun scripts/preconstruct.ts",
"preinstall": "pnpx only-allow pnpm",
"prepare": "pnpm simple-git-hooks",
"test": "vitest",
"test:build": "pnpm run --r --parallel test:build",
"test:build": "bun scripts/generateProxyPackages.ts && pnpm run --r --parallel test:build",
"test:cli": "vitest --project @wagmi/cli",
"test:core": "vitest --project @wagmi/core",
"test:create-wagmi": "vitest --project create-wagmi",
Expand All @@ -36,32 +37,31 @@
"test:update": "vitest --update",
"test:ui": "vitest --ui",
"test:vue": "vitest --project @wagmi/vue",
"typecheck": "pnpm run --r --parallel typecheck && tsc --noEmit",
"version:update": "bun scripts/updateVersion.ts",
"version:update:viem": "bun scripts/updateViemVersion.ts"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@biomejs/biome": "^1.8.0",
"@arethetypeswrong/cli": "^0.16.4",
"@biomejs/biome": "^1.9.4",
"@changesets/changelog-github": "0.4.6",
"@changesets/cli": "^2.27.1",
"@types/bun": "^1.1.1",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"@changesets/cli": "^2.27.8",
"@types/bun": "^1.1.10",
"@vitest/coverage-v8": "^2.1.1",
"@vitest/ui": "^2.1.1",
"@wagmi/test": "workspace:*",
"bun": "^1.1.7",
"glob": "^10.3.12",
"happy-dom": "^12.2.1",
"knip": "^5.13.0",
"prool": "^0.0.11",
"publint": "^0.2.7",
"sherif": "^0.8.4",
"bun": "^1.1.29",
"glob": "^10.4.5",
"happy-dom": "^15.7.4",
"knip": "^5.30.6",
"prool": "^0.0.16",
"publint": "^0.2.11",
"sherif": "^1.0.0",
"simple-git-hooks": "^2.11.1",
"typescript": "5.5.2",
"viem": "2.17.0",
"vitest": "^1.6.0"
"typescript": "5.5.4",
"viem": "2.21.28",
"vitest": "^2.1.1"
},
"packageManager": "pnpm@9.4.0",
"packageManager": "pnpm@9.11.0",
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
Expand All @@ -76,7 +76,7 @@
"node": "22.x"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint"
"pre-commit": "pnpm check"
},
"knip": {
"ignore": ["**/templates/**", "**/hardhat.config.js"],
Expand All @@ -99,8 +99,7 @@
"ignore": ["test/{constants,setup,utils}.ts"]
},
"packages/connectors": {
"entry": "src/exports/index.ts!",
"ignoreDependencies": ["@walletconnect/modal"]
"entry": "src/exports/index.ts!"
},
"packages/core": {
"entry": "src/exports/{actions,chains,codegen,experimental,index,internal,query}.ts!",
Expand All @@ -111,7 +110,10 @@
"entry": "src/cli.ts!"
},
"packages/react": {
"entry": "src/exports/{actions,chains,codegen,connectors,experimental,index,query}.ts!",
"entry": [
"src/exports/{actions,chains,codegen,connectors,experimental,index,query}.ts!",
"src/exports/actions/experimental.ts!"
],
"ignore": ["test/setup.ts"]
},
"packages/test": {
Expand All @@ -121,7 +123,10 @@
]
},
"packages/vue": {
"entry": "src/exports/{actions,chains,connectors,index,nuxt,query}.ts!",
"entry": [
"src/exports/{actions,chains,connectors,index,nuxt,query}.ts!",
"src/exports/actions/experimental.ts!"
],
"ignore": ["src/nuxt/runtime/*", "test/setup.ts"],
"ignoreDependencies": ["nuxt"]
},
Expand Down
12 changes: 12 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @wagmi/cli

## 2.1.17

### Patch Changes

- [#4370](https://github.com/wevm/wagmi/pull/4370) [`cb58b1ea3ad40e77210f24eb598f9d2306db998c`](https://github.com/wevm/wagmi/commit/cb58b1ea3ad40e77210f24eb598f9d2306db998c) Thanks [@talentlessguy](https://github.com/talentlessguy)! - Bumped internal dependencies.

## 2.1.16

### Patch Changes

- [#4224](https://github.com/wevm/wagmi/pull/4224) [`b0eb89c2a0781bb3434996fa53ee7ceb3bb44db9`](https://github.com/wevm/wagmi/commit/b0eb89c2a0781bb3434996fa53ee7ceb3bb44db9) Thanks [@roderik](https://github.com/roderik)! - Fixed package detection for Bun.

## 2.1.15

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@wagmi/cli",
"description": "Manage and generate code from Ethereum ABIs",
"version": "2.1.15",
"version": "2.1.17",
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -11,10 +11,10 @@
"scripts": {
"build": "pnpm run clean && pnpm run build:esm+types",
"build:esm+types": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types",
"check:types": "tsc --noEmit",
"clean": "rm -rf dist tsconfig.tsbuildinfo config plugins",
"dev": "bun src/cli.ts",
"test:build": "publint --strict && attw --pack --ignore-rules cjs-resolves-to-esm",
"typecheck": "tsc --noEmit"
"test:build": "publint --strict && attw --pack --ignore-rules cjs-resolves-to-esm"
},
"files": [
"dist/**",
Expand Down Expand Up @@ -67,7 +67,7 @@
"bundle-require": "^4.0.2",
"cac": "^6.7.14",
"change-case": "^5.4.4",
"chokidar": "^3.5.3",
"chokidar": "4.0.1",
"dedent": "^0.7.0",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
Expand All @@ -89,7 +89,7 @@
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.12.10",
"fixturez": "^1.1.0",
"msw": "^2.2.14"
"msw": "^2.4.9"
},
"contributors": ["awkweb.eth <[email protected]>", "jxom.eth <[email protected]>"],
"funding": "https://github.com/sponsors/wevm",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/generate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Abi } from 'abitype'
import { Abi as AbiSchema } from 'abitype/zod'
import { camelCase } from 'change-case'
import type { FSWatcher, WatchOptions } from 'chokidar'
import type { ChokidarOptions, FSWatcher } from 'chokidar'
import { watch } from 'chokidar'
import { default as dedent } from 'dedent'
import { default as fs } from 'fs-extra'
Expand Down Expand Up @@ -53,7 +53,7 @@ export async function generate(options: Generate = {}) {
type Watcher = FSWatcher & { config?: Watch }
const watchers: Watcher[] = []
const watchWriteDelay = 100
const watchOptions: WatchOptions = {
const watchOptions: ChokidarOptions = {
atomic: true,
// awaitWriteFinish: true,
ignoreInitial: true,
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/exports/plugins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ test('exports', () => {
"etherscan",
"fetch",
"foundry",
"foundryDefaultExcludes",
"hardhat",
"hardhatDefaultExcludes",
"react",
"sourcify",
]
Expand Down
12 changes: 10 additions & 2 deletions packages/cli/src/exports/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ export { etherscan, type EtherscanConfig } from '../plugins/etherscan.js'

export { fetch, type FetchConfig } from '../plugins/fetch.js'

export { foundry, type FoundryConfig } from '../plugins/foundry.js'
export {
foundry,
foundryDefaultExcludes,
type FoundryConfig,
} from '../plugins/foundry.js'

export { hardhat, type HardhatConfig } from '../plugins/hardhat.js'
export {
hardhat,
hardhatDefaultExcludes,
type HardhatConfig,
} from '../plugins/hardhat.js'

export { react, type ReactConfig } from '../plugins/react.js'

Expand Down
Loading