Skip to content

Commit

Permalink
feat: migrate to tsc, TypeScript 5 & NodeNext (#331)
Browse files Browse the repository at this point in the history
* chore: switch to tsc

* chore: apply rome formatting & linting changes

* chore: bump to typescript v5

* chore: remove tsup config

* chore: improve build step

* chore: add comment to version.ts

* chore: fix imports

* chore: add changeset

* chore: revert uts46 import changes

* chore: fix type imports

* chore: ignore tsbuildinfo

* fix: type issues

* chore: Contains -> Or

* chore: format

* chore: switch to nodenext module resolution (#309)

* fix: make `GetValue` return `{ value?: never }` for contract functions that are not payable (#310)

fix: GetValue type

* Version Packages (#311)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* refactor: use `@adraffy/ens-normalize` for ENS normalization (#313)

* refactor: use @adraffy/ens-normalize for ENS normalization

* docs: update

* Version Packages (#315)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: `transports` property type on `FallbackTransport` (#317)

* Version Packages (#318)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: migrate to nodenext module resolution

* chore: fix type imports

* chore: use `bundler` module resolution for playgrounds so that path aliases are simpler

* fix: ethers adapter signTransaction properties (#322)

* fix: ethers adapter

* test: boost coverage

* Version Packages (#324)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: skip invalid logs (#326)

* fix: skip invalid logs

* chore: format

* chore: changeset

* Version Packages (#327)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: tweaked error inheritence for `UserRejectedRequestError` & `SwitchChainError` (#328)

* feat: tweaked error inheritence for `UserRejectedRequestError` & `SwitchChainError`

* chore: format

* chore: switch to tsc

* chore: apply rome formatting & linting changes

* chore: bump to typescript v5

* chore: remove tsup config

* chore: improve build step

* chore: add comment to version.ts

* chore: fix imports

* chore: add changeset

* chore: fix type imports

* chore: ignore tsbuildinfo

* fix: type issues

* chore: Contains -> Or

* chore: format

* chore: format

---------

Co-authored-by: jxom <jakemoxey@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: awkweb <tom@meagher.co>

* Delete eleven-donkeys-lay.md

* Delete jsconfig.json

* Update cuddly-candles-begin.md

---------

Co-authored-by: Sebastian Lorenz <fubhy@fubhy.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: awkweb <tom@meagher.co>
  • Loading branch information
5 people committed Apr 7, 2023
1 parent 1211133 commit cd7b642
Show file tree
Hide file tree
Showing 588 changed files with 3,053 additions and 2,908 deletions.
6 changes: 6 additions & 0 deletions .changeset/cuddly-candles-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"viem": patch
---

Migrated to TypeScript 5.
Migrated build process from `tsup` to `tsc`.
4 changes: 0 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,3 @@ runs:
shell: bash
if: steps.cache-node-modules.outputs.cache-hit == 'true'
run: pnpm contracts:build
- name: Link Dependencies
shell: bash
if: steps.cache-node-modules.outputs.cache-hit == 'true'
run: pnpm dev
11 changes: 6 additions & 5 deletions .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@ jobs:
- name: Install Dependencies
run: pnpm i --ignore-scripts

- name: Build
run: pnpm build
env:
VITE_ANVIL_BLOCK_NUMBER: ${{ vars.VITE_ANVIL_BLOCK_NUMBER }}

- name: Set version
run: |
npm --no-git-tag-version version minor
npm --no-git-tag-version version $(npm pkg get version | sed 's/"//g')-$(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//').$(date +'%Y%m%dT%H%M%S')
pnpm bun scripts/updateVersion.ts
- name: Build
run: pnpm build
env:
VITE_ANVIL_BLOCK_NUMBER: ${{ vars.VITE_ANVIL_BLOCK_NUMBER }}

- id: publish
name: Publish to npm
Expand Down
2 changes: 1 addition & 1 deletion examples/_template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"viem": "latest"
},
"devDependencies": {
"typescript": "^4.9.3",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/blocks/fetching-blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"viem": "latest"
},
"devDependencies": {
"typescript": "^4.9.4",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/blocks/watching-blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"viem": "latest"
},
"devDependencies": {
"typescript": "^4.9.3",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/clients/public-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"viem": "latest"
},
"devDependencies": {
"typescript": "^4.9.3",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/clients/wallet-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-react": "^3.1.0",
"typescript": "^4.9.4",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/contracts/deploying-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-react": "^3.1.0",
"typescript": "^4.9.4",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/contracts/multicall/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"viem": "latest"
},
"devDependencies": {
"typescript": "^4.9.3",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/contracts/reading-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"viem": "latest"
},
"devDependencies": {
"typescript": "^4.9.3",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/contracts/writing-to-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-react": "^3.1.0",
"typescript": "^4.9.4",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/ens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"viem": "latest"
},
"devDependencies": {
"typescript": "^4.9.3",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/filters-and-logs/block-event-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"viem": "latest"
},
"devDependencies": {
"typescript": "^4.9.3",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/filters-and-logs/event-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"viem": "latest"
},
"devDependencies": {
"typescript": "^4.9.3",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/signing/typed-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-react": "^3.1.0",
"typescript": "^4.9.4",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/transactions/fetching-transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"viem": "latest"
},
"devDependencies": {
"typescript": "^4.9.4",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/transactions/sending-transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-react": "^3.1.0",
"typescript": "^4.9.4",
"typescript": "^5.0.3",
"vite": "^4.1.4"
}
}

2 comments on commit cd7b642

@vercel
Copy link

@vercel vercel bot commented on cd7b642 Apr 7, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on cd7b642 Apr 7, 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:

viem-playground – ./playgrounds/browser

viem-playground.vercel.app
viem-playground-wagmi-dev.vercel.app
viem-playground-git-main-wagmi-dev.vercel.app

Please sign in to comment.