-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip: dev updates * wip: refactor * refactor: register * fix: path * docs: update * ci: update workflows * fix: tests * fix: script * fix: publint * chore: changes * chore: fix knip * chore: knip * test: boost coverage * chore: symlink readme * chore: readme * chore: readme * chore: tweak * chore: changeset * chore: update keywords
- Loading branch information
Showing
158 changed files
with
2,250 additions
and
1,639 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
"abitype": minor | ||
--- | ||
|
||
**Breaking**: Renamed `'abitype/test`' entrypoint to `'abitype/abis'`. | ||
|
||
```diff | ||
- import { erc20Abi } from 'abitype/test' | ||
+ import { erc20Abi } from 'abitype/abis' | ||
``` | ||
|
||
**Breaking**: Removed `zeroAddress` export from `'abitype/abis'`. You can copy it directly into your project if you still need to use it. | ||
|
||
```diff | ||
- import { zeroAddress } from 'abitype/abis' | ||
+ export const zeroAddress = '0x0000000000000000000000000000000000000000' as const | ||
``` | ||
|
||
**Breaking**: Renamed `Config`, `DefaultConfig`, and `ResolvedConfig` to `Register`, `DefaultRegister`, and `ResolvedRegister` respectively. | ||
|
||
```diff | ||
- import { Config, DefaultConfig, ResolvedConfig } from 'abitype' | ||
+ import { Register, DefaultRegister, ResolvedRegister } from 'abitype' | ||
``` | ||
|
||
To configure ABIType, target `Register` instead of `Config`: | ||
|
||
```diff | ||
declare module 'abitype' { | ||
- export interface Config { | ||
+ export interface Register { | ||
BigIntType: bigint & { foo: 'bar' } | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@1.6.3/schema.json", | ||
"$schema": "https://unpkg.com/@changesets/config@2.1.0/schema.json", | ||
"access": "public", | ||
"baseBranch": "main", | ||
"changelog": [ | ||
"@changesets/changelog-github", | ||
{ "repo": "wagmi-dev/abitype" } | ||
], | ||
"commit": false, | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { | ||
"onlyUpdatePeerDependentsWhenOutOfRange": true | ||
}, | ||
"ignore": ["docs", "examples", "playground"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ runs: | |
|
||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install --ignore-scripts | ||
run: pnpm install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Release (Canary) | ||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
canary: | ||
name: Release canary | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies | ||
|
||
- name: Setup .npmrc file | ||
uses: actions/setup-node@v3 | ||
with: | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Set version | ||
run: | | ||
npm --no-git-tag-version version 0.0.0 | ||
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 | ||
|
||
- name: Publish to npm | ||
run: npm publish --tag $(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//') | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
auto-install-peers=false | ||
enable-pre-post-scripts=true | ||
link-workspace-packages=deep | ||
provenance=true | ||
strict-peer-dependencies=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import path from 'node:path' | ||
import { glob } from 'glob' | ||
|
||
// Generates package.json files to be published to NPM with only the necessary fields. | ||
|
||
console.log('Formatting package.json files.') | ||
|
||
// Get all package.json files | ||
const packagePaths = await glob('packages/**/package.json', { | ||
ignore: ['**/dist/**', '**/node_modules/**'], | ||
}) | ||
|
||
let count = 0 | ||
for (const packagePath of packagePaths) { | ||
type Package = Record<string, unknown> & { | ||
name?: string | undefined | ||
private?: boolean | undefined | ||
} | ||
const file = Bun.file(packagePath) | ||
const packageJson = (await file.json()) as Package | ||
|
||
// Skip private packages | ||
if (packageJson.private) continue | ||
|
||
count += 1 | ||
console.log(`${packageJson.name} — ${path.dirname(packagePath)}`) | ||
|
||
await Bun.write( | ||
`${packagePath}.tmp`, | ||
`${JSON.stringify(packageJson, undefined, 2)}\n`, | ||
) | ||
|
||
const { devDependencies: _dD, scripts: _s, ...rest } = packageJson | ||
await Bun.write(packagePath, `${JSON.stringify(rest, undefined, 2)}\n`) | ||
} | ||
|
||
console.log(`Done. Formatted ${count} ${count === 1 ? 'file' : 'files'}.`) |
Oops, something went wrong.
a12abfd
There was a problem hiding this comment.
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:
abitype – ./
abitype.vercel.app
abitype-git-main-wagmi-dev.vercel.app
abitype-wagmi-dev.vercel.app
abitype.dev