From a12abfdc94db8836edf1333aa9d8dd1ab6e87b82 Mon Sep 17 00:00:00 2001 From: awkweb Date: Wed, 11 Oct 2023 11:48:49 -0400 Subject: [PATCH] refactor: dev updates (#198) * 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 --- .changeset/angry-walls-sneeze.md | 35 + .changeset/config.json | 9 +- .github/CONTRIBUTING.md | 2 +- .github/ISSUE_TEMPLATE/bug_report.yml | 2 - .github/ISSUE_TEMPLATE/config.yml | 2 +- .../actions/install-dependencies/action.yml | 2 +- .github/pull_request_template.md | 8 +- .github/workflows/canary.yml | 37 + .../{on-push-to-main.yml => changesets.yml} | 40 +- .../{on-pull-request.yml => pull-request.yml} | 3 +- .github/workflows/snapshot.yml | 22 - .github/workflows/verify.yml | 42 +- .gitignore | 7 +- .npmrc | 5 + .scripts/formatPackageJson.ts | 37 + .scripts/generateProxyPackages.ts | 58 + .scripts/preconstruct.ts | 88 + .scripts/restorePackageJson.ts | 30 + .scripts/updateVersion.ts | 44 + .vscode/extensions.json | 5 +- .vscode/settings.json | 22 +- .vscode/workspace.code-workspace | 8 +- README.md | 97 +- rome.json => biome.json | 12 +- docs/.vitepress/config.ts | 75 +- docs/.vitepress/sidebar.ts | 63 + docs/.vitepress/theme/index.ts | 2 +- .../theme/{custom.css => styles.css} | 63 +- docs/api/{test.md => abis.md} | 12 +- docs/api/zod.md | 7 +- docs/config.md | 28 +- docs/guide/getting-started.md | 10 +- docs/index.md | 7 +- docs/package.json | 8 +- docs/tsconfig.json | 1 + docs/vercel.json | 9 +- examples/tsconfig.json | 13 - package.json | 176 +- CHANGELOG.md => packages/abitype/CHANGELOG.md | 0 packages/abitype/README.md | 98 + packages/abitype/package.json | 84 + {src => packages/abitype/src}/abi.test-d.ts | 2 +- {src => packages/abitype/src}/abi.ts | 22 +- .../abitype/src/abis}/human-readable.ts | 0 .../abitype/src/abis/json.ts | 0 {src => packages/abitype/src}/errors.test.ts | 0 {src => packages/abitype/src}/errors.ts | 0 .../abitype/src/exports/abis.test.ts | 27 +- .../abitype/src/exports/abis.ts | 30 +- .../abitype/src/exports}/index.test.ts | 2 +- .../abitype/src/exports}/index.ts | 42 +- packages/abitype/src/exports/zod.test.ts | 36 + packages/abitype/src/exports/zod.ts | 28 + .../__snapshots__/formatAbi.test.ts.snap | 0 .../__snapshots__/parseAbi.test.ts.snap | 0 .../human-readable/errors/abiItem.test.ts | 0 .../src}/human-readable/errors/abiItem.ts | 0 .../errors/abiParameter.test.ts | 0 .../human-readable/errors/abiParameter.ts | 0 .../human-readable/errors/signature.test.ts | 0 .../src}/human-readable/errors/signature.ts | 0 .../errors/splitParameters.test.ts | 0 .../human-readable/errors/splitParameters.ts | 0 .../src}/human-readable/errors/struct.test.ts | 0 .../src}/human-readable/errors/struct.ts | 0 .../src}/human-readable/formatAbi.bench.ts | 0 .../src}/human-readable/formatAbi.test-d.ts | 2 +- .../src}/human-readable/formatAbi.test.ts | 2 +- .../abitype/src}/human-readable/formatAbi.ts | 0 .../human-readable/formatAbiItem.bench.ts | 0 .../human-readable/formatAbiItem.test-d.ts | 0 .../src}/human-readable/formatAbiItem.test.ts | 2 +- .../src}/human-readable/formatAbiItem.ts | 0 .../formatAbiParameter.bench.ts | 0 .../formatAbiParameter.test-d.ts | 1 - .../human-readable/formatAbiParameter.test.ts | 0 .../src}/human-readable/formatAbiParameter.ts | 0 .../formatAbiParameters.test-d.ts | 0 .../formatAbiParameters.test.ts | 0 .../human-readable/formatAbiParameters.ts | 0 .../src}/human-readable/parseAbi.bench.ts | 0 .../src}/human-readable/parseAbi.test-d.ts | 2 +- .../src}/human-readable/parseAbi.test.ts | 2 +- .../abitype/src}/human-readable/parseAbi.ts | 0 .../src}/human-readable/parseAbiItem.bench.ts | 0 .../human-readable/parseAbiItem.test-d.ts | 2 +- .../src}/human-readable/parseAbiItem.test.ts | 0 .../src}/human-readable/parseAbiItem.ts | 2 +- .../human-readable/parseAbiParameter.bench.ts | 0 .../parseAbiParameter.test-d.ts | 1 - .../human-readable/parseAbiParameter.test.ts | 0 .../src}/human-readable/parseAbiParameter.ts | 2 +- .../parseAbiParameters.test-d.ts | 1 - .../human-readable/parseAbiParameters.test.ts | 0 .../src}/human-readable/parseAbiParameters.ts | 2 +- .../src}/human-readable/runtime/cache.ts | 0 .../human-readable/runtime/signatures.test.ts | 0 .../src}/human-readable/runtime/signatures.ts | 0 .../human-readable/runtime/structs.test.ts | 0 .../src}/human-readable/runtime/structs.ts | 0 .../src}/human-readable/runtime/utils.test.ts | 4 + .../src}/human-readable/runtime/utils.ts | 20 +- .../human-readable/types/signatures.test-d.ts | 0 .../src}/human-readable/types/signatures.ts | 4 +- .../human-readable/types/structs.test-d.ts | 67 +- .../src}/human-readable/types/structs.ts | 0 .../src}/human-readable/types/utils.test-d.ts | 11 +- .../src}/human-readable/types/utils.ts | 33 +- .../abitype/src}/narrow.test-d.ts | 0 {src => packages/abitype/src}/narrow.test.ts | 0 {src => packages/abitype/src}/narrow.ts | 0 {src => packages/abitype/src}/regex.ts | 0 packages/abitype/src/register.test-d.ts | 27 + .../abitype/src/register.ts | 169 +- {src => packages/abitype/src}/types.test-d.ts | 0 {src => packages/abitype/src}/types.ts | 0 {src => packages/abitype/src}/utils.test-d.ts | 5 +- {src => packages/abitype/src}/utils.ts | 16 +- {src => packages/abitype/src}/version.ts | 0 {src => packages/abitype/src}/zod.test-d.ts | 5 +- {src => packages/abitype/src}/zod.test.ts | 43 +- {src => packages/abitype/src}/zod.ts | 0 {test => packages/abitype/test}/setup.ts | 4 +- packages/abitype/tsconfig.build.json | 8 + packages/abitype/tsconfig.json | 6 + packages/register-tests/default/package.json | 11 + .../default/src/address.test-d.ts | 8 + .../register-tests/default/src/register.ts | 5 + packages/register-tests/default/tsconfig.json | 5 + playground/package.json | 8 - playground/trace.ts | 12 - playground/tsconfig.json | 14 - playgrounds/functions/package.json | 11 + .../functions/src}/read.test-d.ts | 18 +- .../functions/src}/read.ts | 2 +- .../functions/src}/reads.test-d.ts | 51 +- .../functions/src}/reads.ts | 0 .../functions/src}/signTypedData.test-d.ts | 0 .../functions/src}/signTypedData.ts | 4 +- .../functions/src}/types.ts | 10 +- .../functions/src}/watchEvent.test-d.ts | 12 +- .../functions/src}/watchEvent.ts | 0 .../functions/src}/write.test-d.ts | 33 +- .../functions/src}/write.ts | 0 playgrounds/functions/tsconfig.json | 5 + playgrounds/performance/index.ts | 6 + .../performance}/package.json | 2 +- playgrounds/performance/tsconfig.json | 13 + pnpm-lock.yaml | 1615 ++++++++++------- pnpm-workspace.yaml | 7 +- scripts/prepublishOnly.ts | 20 - scripts/updateVersion.ts | 9 - src/config.test-d.ts | 34 - tsconfig.build.json | 14 - tsconfig.json | 6 +- tsconfig.node.json | 11 - vitest.config.ts | 11 +- vitest.workspace.ts | 27 + 158 files changed, 2250 insertions(+), 1639 deletions(-) create mode 100644 .changeset/angry-walls-sneeze.md create mode 100644 .github/workflows/canary.yml rename .github/workflows/{on-push-to-main.yml => changesets.yml} (51%) rename .github/workflows/{on-pull-request.yml => pull-request.yml} (94%) delete mode 100644 .github/workflows/snapshot.yml create mode 100644 .npmrc create mode 100644 .scripts/formatPackageJson.ts create mode 100644 .scripts/generateProxyPackages.ts create mode 100644 .scripts/preconstruct.ts create mode 100644 .scripts/restorePackageJson.ts create mode 100644 .scripts/updateVersion.ts mode change 100644 => 120000 README.md rename rome.json => biome.json (86%) create mode 100644 docs/.vitepress/sidebar.ts rename docs/.vitepress/theme/{custom.css => styles.css} (64%) rename docs/api/{test.md => abis.md} (81%) delete mode 100644 examples/tsconfig.json rename CHANGELOG.md => packages/abitype/CHANGELOG.md (100%) create mode 100644 packages/abitype/README.md create mode 100644 packages/abitype/package.json rename {src => packages/abitype/src}/abi.test-d.ts (99%) rename {src => packages/abitype/src}/abi.ts (93%) rename {src/test => packages/abitype/src/abis}/human-readable.ts (100%) rename src/test/abis.ts => packages/abitype/src/abis/json.ts (100%) rename {src => packages/abitype/src}/errors.test.ts (100%) rename {src => packages/abitype/src}/errors.ts (100%) rename src/test.test.ts => packages/abitype/src/exports/abis.test.ts (88%) rename src/test.ts => packages/abitype/src/exports/abis.ts (80%) rename {src => packages/abitype/src/exports}/index.test.ts (95%) rename {src => packages/abitype/src/exports}/index.ts (65%) create mode 100644 packages/abitype/src/exports/zod.test.ts create mode 100644 packages/abitype/src/exports/zod.ts rename {src => packages/abitype/src}/human-readable/__snapshots__/formatAbi.test.ts.snap (100%) rename {src => packages/abitype/src}/human-readable/__snapshots__/parseAbi.test.ts.snap (100%) rename {src => packages/abitype/src}/human-readable/errors/abiItem.test.ts (100%) rename {src => packages/abitype/src}/human-readable/errors/abiItem.ts (100%) rename {src => packages/abitype/src}/human-readable/errors/abiParameter.test.ts (100%) rename {src => packages/abitype/src}/human-readable/errors/abiParameter.ts (100%) rename {src => packages/abitype/src}/human-readable/errors/signature.test.ts (100%) rename {src => packages/abitype/src}/human-readable/errors/signature.ts (100%) rename {src => packages/abitype/src}/human-readable/errors/splitParameters.test.ts (100%) rename {src => packages/abitype/src}/human-readable/errors/splitParameters.ts (100%) rename {src => packages/abitype/src}/human-readable/errors/struct.test.ts (100%) rename {src => packages/abitype/src}/human-readable/errors/struct.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbi.bench.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbi.test-d.ts (98%) rename {src => packages/abitype/src}/human-readable/formatAbi.test.ts (85%) rename {src => packages/abitype/src}/human-readable/formatAbi.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbiItem.bench.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbiItem.test-d.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbiItem.test.ts (97%) rename {src => packages/abitype/src}/human-readable/formatAbiItem.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbiParameter.bench.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbiParameter.test-d.ts (99%) rename {src => packages/abitype/src}/human-readable/formatAbiParameter.test.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbiParameter.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbiParameters.test-d.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbiParameters.test.ts (100%) rename {src => packages/abitype/src}/human-readable/formatAbiParameters.ts (100%) rename {src => packages/abitype/src}/human-readable/parseAbi.bench.ts (100%) rename {src => packages/abitype/src}/human-readable/parseAbi.test-d.ts (98%) rename {src => packages/abitype/src}/human-readable/parseAbi.test.ts (95%) rename {src => packages/abitype/src}/human-readable/parseAbi.ts (100%) rename {src => packages/abitype/src}/human-readable/parseAbiItem.bench.ts (100%) rename {src => packages/abitype/src}/human-readable/parseAbiItem.test-d.ts (99%) rename {src => packages/abitype/src}/human-readable/parseAbiItem.test.ts (100%) rename {src => packages/abitype/src}/human-readable/parseAbiItem.ts (98%) rename {src => packages/abitype/src}/human-readable/parseAbiParameter.bench.ts (100%) rename {src => packages/abitype/src}/human-readable/parseAbiParameter.test-d.ts (99%) rename {src => packages/abitype/src}/human-readable/parseAbiParameter.test.ts (100%) rename {src => packages/abitype/src}/human-readable/parseAbiParameter.ts (98%) rename {src => packages/abitype/src}/human-readable/parseAbiParameters.test-d.ts (99%) rename {src => packages/abitype/src}/human-readable/parseAbiParameters.test.ts (100%) rename {src => packages/abitype/src}/human-readable/parseAbiParameters.ts (98%) rename {src => packages/abitype/src}/human-readable/runtime/cache.ts (100%) rename {src => packages/abitype/src}/human-readable/runtime/signatures.test.ts (100%) rename {src => packages/abitype/src}/human-readable/runtime/signatures.ts (100%) rename {src => packages/abitype/src}/human-readable/runtime/structs.test.ts (100%) rename {src => packages/abitype/src}/human-readable/runtime/structs.ts (100%) rename {src => packages/abitype/src}/human-readable/runtime/utils.test.ts (99%) rename {src => packages/abitype/src}/human-readable/runtime/utils.ts (96%) rename src/human-readable/types/signatures-test-d.ts => packages/abitype/src/human-readable/types/signatures.test-d.ts (100%) rename {src => packages/abitype/src}/human-readable/types/signatures.ts (98%) rename {src => packages/abitype/src}/human-readable/types/structs.test-d.ts (82%) rename {src => packages/abitype/src}/human-readable/types/structs.ts (100%) rename {src => packages/abitype/src}/human-readable/types/utils.test-d.ts (99%) rename {src => packages/abitype/src}/human-readable/types/utils.ts (94%) rename {src => packages/abitype/src}/narrow.test-d.ts (100%) rename {src => packages/abitype/src}/narrow.test.ts (100%) rename {src => packages/abitype/src}/narrow.ts (100%) rename {src => packages/abitype/src}/regex.ts (100%) create mode 100644 packages/abitype/src/register.test-d.ts rename src/config.ts => packages/abitype/src/register.ts (55%) rename {src => packages/abitype/src}/types.test-d.ts (100%) rename {src => packages/abitype/src}/types.ts (100%) rename {src => packages/abitype/src}/utils.test-d.ts (99%) rename {src => packages/abitype/src}/utils.ts (96%) rename {src => packages/abitype/src}/version.ts (100%) rename {src => packages/abitype/src}/zod.test-d.ts (99%) rename {src => packages/abitype/src}/zod.test.ts (95%) rename {src => packages/abitype/src}/zod.ts (100%) rename {test => packages/abitype/test}/setup.ts (65%) create mode 100644 packages/abitype/tsconfig.build.json create mode 100644 packages/abitype/tsconfig.json create mode 100644 packages/register-tests/default/package.json create mode 100644 packages/register-tests/default/src/address.test-d.ts create mode 100644 packages/register-tests/default/src/register.ts create mode 100644 packages/register-tests/default/tsconfig.json delete mode 100644 playground/package.json delete mode 100644 playground/trace.ts delete mode 100644 playground/tsconfig.json create mode 100644 playgrounds/functions/package.json rename {examples => playgrounds/functions/src}/read.test-d.ts (94%) rename {examples => playgrounds/functions/src}/read.ts (96%) rename {examples => playgrounds/functions/src}/reads.test-d.ts (82%) rename {examples => playgrounds/functions/src}/reads.ts (100%) rename {examples => playgrounds/functions/src}/signTypedData.test-d.ts (100%) rename {examples => playgrounds/functions/src}/signTypedData.ts (91%) rename {examples => playgrounds/functions/src}/types.ts (95%) rename {examples => playgrounds/functions/src}/watchEvent.test-d.ts (88%) rename {examples => playgrounds/functions/src}/watchEvent.ts (100%) rename {examples => playgrounds/functions/src}/write.test-d.ts (86%) rename {examples => playgrounds/functions/src}/write.ts (100%) create mode 100644 playgrounds/functions/tsconfig.json create mode 100644 playgrounds/performance/index.ts rename {examples => playgrounds/performance}/package.json (79%) create mode 100644 playgrounds/performance/tsconfig.json delete mode 100644 scripts/prepublishOnly.ts delete mode 100644 scripts/updateVersion.ts delete mode 100644 src/config.test-d.ts delete mode 100644 tsconfig.build.json delete mode 100644 tsconfig.node.json create mode 100644 vitest.workspace.ts diff --git a/.changeset/angry-walls-sneeze.md b/.changeset/angry-walls-sneeze.md new file mode 100644 index 00000000..0ec24b20 --- /dev/null +++ b/.changeset/angry-walls-sneeze.md @@ -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' } + } +} +``` \ No newline at end of file diff --git a/.changeset/config.json b/.changeset/config.json index b2106178..cc7924f4 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -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"] + } } diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c53402c3..58c090e7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -174,7 +174,7 @@ Edit the `playground/trace.ts` file to include whatever code you want to test an pnpm trace ``` -This outputs a `trace/trace.json` file. You can open that file in a trace analysis app, like [Perfetto](https://ui.perfetto.dev) or `chrome://tracing`. +This outputs a `playgrounds/performance/out/trace.json` file. You can open that file in a trace analysis app, like [Perfetto](https://ui.perfetto.dev) or `chrome://tracing`.
↑ back to top diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ff4ae602..61517767 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -62,5 +62,3 @@ body: required: true - label: Followed the [Code of Conduct](https://github.com/wagmi-dev/.github/blob/main/CODE_OF_CONDUCT.md). required: true - - label: Read the [Contributing Guide](https://github.com/wagmi-dev/abitype/blob/main/.github/CONTRIBUTING.md). - required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 53b65b74..2295676d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -5,4 +5,4 @@ contact_links: about: Ask questions and discuss with other community members. - name: Feature Request url: https://github.com/wagmi-dev/abitype/discussions/new?category=ideas - about: Requests features or brainstorm ideas for new functionality. + about: Requests features or brainstorm ideas for new functionality. \ No newline at end of file diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml index 0567393f..4fab0642 100644 --- a/.github/actions/install-dependencies/action.yml +++ b/.github/actions/install-dependencies/action.yml @@ -15,4 +15,4 @@ runs: - name: Install dependencies shell: bash - run: pnpm install --ignore-scripts \ No newline at end of file + run: pnpm install \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index b2555248..394bf369 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,8 +4,8 @@ What changes are made in this PR? Is it a feature or a bug fix? ## Additional Information -- [ ] I read the [contributing guide](https://github.com/wagmi-dev/abitype/blob/main/.github/CONTRIBUTING.md) -- [ ] I added documentation related to the changes made. -- [ ] I added or updated tests related to the changes made. +Before submitting this issue, please make sure you do the following. -Your ENS/address: +- [ ] Read the [contributing guide](https://github.com/wagmi-dev/abitype/blob/main/.github/CONTRIBUTING.md) +- [ ] Added documentation related to the changes made. +- [ ] Added or updated tests (and snapshots) related to the changes made. diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml new file mode 100644 index 00000000..c3939256 --- /dev/null +++ b/.github/workflows/canary.yml @@ -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 }} diff --git a/.github/workflows/on-push-to-main.yml b/.github/workflows/changesets.yml similarity index 51% rename from .github/workflows/on-push-to-main.yml rename to .github/workflows/changesets.yml index 7d90f973..6def92fd 100644 --- a/.github/workflows/on-push-to-main.yml +++ b/.github/workflows/changesets.yml @@ -1,4 +1,4 @@ -name: Main +name: Changesets on: push: branches: [main] @@ -13,41 +13,10 @@ jobs: uses: ./.github/workflows/verify.yml secrets: inherit - canary: - name: Release canary - needs: verify - 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 minor - npm --no-git-tag-version version $(npm pkg get version | sed 's/"//g')-canary.$(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 canary - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - changesets: - name: Changesets + name: Create pull request or publish needs: verify + permissions: write-all runs-on: ubuntu-latest timeout-minutes: 5 @@ -66,7 +35,8 @@ jobs: with: title: 'chore: version packages' commit: 'chore: version packages' - publish: pnpm changeset:release + createGithubReleases: ${{ github.ref == 'refs/heads/main' }} + publish: pnpm changeset:publish version: pnpm changeset:version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/pull-request.yml similarity index 94% rename from .github/workflows/on-pull-request.yml rename to .github/workflows/pull-request.yml index 7bc2f134..8b3264b8 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,4 +1,4 @@ -name: Pull request +name: Pull Request on: pull_request: types: [opened, reopened, synchronize, ready_for_review] @@ -43,4 +43,5 @@ jobs: - name: Report build size uses: preactjs/compressed-size-action@v2 with: + pattern: 'packages/**/dist/**' repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml deleted file mode 100644 index 9645a419..00000000 --- a/.github/workflows/snapshot.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Snapshot - -on: workflow_dispatch - -jobs: - snapshot: - name: Publish Snapshot - runs-on: ubuntu-latest - steps: - - name: Clone repository - uses: actions/checkout@v4 - - - name: Install dependencies - uses: ./.github/actions/install-dependencies - - - name: Publish snapshots - uses: seek-oss/changesets-snapshot@v0 - with: - pre-publish: pnpm build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 808c132d..3872a685 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -1,6 +1,7 @@ name: Verify on: workflow_call: + workflow_dispatch: jobs: lint: @@ -16,7 +17,18 @@ jobs: uses: ./.github/actions/install-dependencies - name: Lint code - run: pnpm lint + run: pnpm format && pnpm lint:fix + + - name: Update package versions + run: pnpm version:update + + - uses: stefanzweifel/git-auto-commit-action@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + commit_message: 'chore: format' + commit_user_name: 'github-actions[bot]' + commit_user_email: 'github-actions[bot]@users.noreply.github.com' build: name: Build @@ -33,13 +45,19 @@ jobs: - name: Build run: pnpm build + - name: Publint + run: pnpm test:build + + - name: Check for unused files, dependencies, and exports + run: pnpm knip --production --ignore-internal + types: name: Types runs-on: ubuntu-latest timeout-minutes: 5 strategy: matrix: - version: ['5.0.4', '5.1.3', 'latest'] + version: ['5.0.4', '5.1.3', '5.2.2', 'latest'] steps: - name: Clone repository @@ -51,25 +69,24 @@ jobs: - name: Use `typescript@${{ matrix.version }}` run: pnpm add -D -w typescript@${{ matrix.version }} - - name: Build - run: pnpm build + - name: Link packages + run: pnpm preconstruct - name: Check types run: pnpm typecheck - name: Check types (--exactOptionalPropertyTypes false) run: pnpm typecheck:propertyTypes - - - name: Test types - run: pnpm test:typecheck + + # Redundant with `pnpm typecheck` + # If Vitest adds special features in the future, e.g. type coverage, can add this back! + # - name: Test types + # run: pnpm test:typecheck test: name: Test runs-on: ubuntu-latest timeout-minutes: 5 - strategy: - matrix: - version: ['5.0.4', '5.1.3', 'latest'] steps: - name: Clone repository @@ -78,13 +95,8 @@ jobs: - name: Install dependencies uses: ./.github/actions/install-dependencies - - name: Use `typescript@${{ matrix.version }}` - run: pnpm add -D -w typescript@${{ matrix.version }} - - name: Run tests run: pnpm test:cov - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 28b8ee5a..56651542 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,8 @@ coverage dist node_modules tsconfig*.tsbuildinfo -trace bench -!examples/trace +playgrounds/performance/out # local env files .env @@ -18,3 +17,7 @@ bench .env.test.local .env.production.local .envrc + +# proxy packages +packages/abitype/abis +packages/abitype/zod \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..b595aca0 --- /dev/null +++ b/.npmrc @@ -0,0 +1,5 @@ +auto-install-peers=false +enable-pre-post-scripts=true +link-workspace-packages=deep +provenance=true +strict-peer-dependencies=false \ No newline at end of file diff --git a/.scripts/formatPackageJson.ts b/.scripts/formatPackageJson.ts new file mode 100644 index 00000000..5a1337d8 --- /dev/null +++ b/.scripts/formatPackageJson.ts @@ -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 & { + 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'}.`) diff --git a/.scripts/generateProxyPackages.ts b/.scripts/generateProxyPackages.ts new file mode 100644 index 00000000..5abd95d6 --- /dev/null +++ b/.scripts/generateProxyPackages.ts @@ -0,0 +1,58 @@ +import fs from 'node:fs/promises' +import path from 'node:path' +import { glob } from 'glob' + +// Generates proxy packages for package.json#exports. + +console.log('Generating proxy packages.') + +// 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 & { + name?: string | undefined + private?: boolean | undefined + exports?: + | Record + | undefined + } + const file = Bun.file(packagePath) + const packageJson = (await file.json()) as Package + + // Skip private packages + if (packageJson.private) continue + if (!packageJson.exports) continue + + count += 1 + console.log(`${packageJson.name} — ${path.dirname(packagePath)}`) + + const dir = path.resolve(path.dirname(packagePath)) + + for (const [key, exports] of Object.entries(packageJson.exports)) { + // Skip `package.json` export + if (/package\.json$/.test(key)) continue + if (key === '.') continue + if (typeof exports === 'string') continue + if (!exports.default) continue + + const proxyDir = path.resolve(dir, key) + await fs.mkdir(proxyDir, { recursive: true }) + + const types = path.relative(key, exports.types) + const main = path.relative(key, exports.default) + await Bun.write( + `${proxyDir}/package.json`, + `${JSON.stringify({ type: 'module', types, main }, undefined, 2)}\n`, + ) + } +} + +console.log( + `Done. Generated proxy packages for ${count} ${ + count === 1 ? 'package' : 'packages' + }.`, +) diff --git a/.scripts/preconstruct.ts b/.scripts/preconstruct.ts new file mode 100644 index 00000000..ba733921 --- /dev/null +++ b/.scripts/preconstruct.ts @@ -0,0 +1,88 @@ +import fs from 'node:fs/promises' +import path from 'node:path' +import { glob } from 'glob' + +// Symlinks package sources to dist for local development + +console.log('Setting up packages for development.') + +// Get all package.json files +const packagePaths = await glob('**/package.json', { + ignore: ['**/dist/**', '**/node_modules/**'], +}) + +let count = 0 +for (const packagePath of packagePaths) { + type Package = { + bin?: Record | undefined + exports?: + | Record + | undefined + name?: string | undefined + private?: boolean | undefined + } + const file = Bun.file(packagePath) + const packageJson = (await file.json()) as Package + + // Skip private packages + if (packageJson.private && packageJson.name !== '@wagmi/test') continue + if (!packageJson.exports) continue + if (packageJson.bin) continue + + count += 1 + console.log(`${packageJson.name} — ${path.dirname(packagePath)}`) + + const dir = path.resolve(path.dirname(packagePath)) + + // Empty dist directory + const dist = path.resolve(dir, 'dist') + let files: string[] = [] + try { + files = await fs.readdir(dist) + } catch { + await fs.mkdir(dist) + } + + const promises = [] + for (const file of files) { + promises.push( + fs.rm(path.join(dist, file), { recursive: true, force: true }), + ) + } + await Promise.all(promises) + + // Link exports to dist locations + for (const [key, exports] of Object.entries(packageJson.exports)) { + // Skip `package.json` exports + if (/package\.json$/.test(key)) continue + if (typeof exports === 'string') continue + + // Link exports to dist locations + for (const [type, value] of Object.entries(exports) as [ + type: 'types' | 'default', + value: string, + ][]) { + const srcDir = path.resolve( + dir, + path + .dirname(value) + .replace(`dist/${type === 'default' ? 'esm' : type}`, 'src'), + ) + let srcFileName: string + if (key === '.') srcFileName = 'index.ts' + else srcFileName = path.basename(`${key}.ts`) + const srcFilePath = path.resolve(srcDir, srcFileName) + + const distDir = path.resolve(dir, path.dirname(value)) + const distFileName = path.basename(value) + const distFilePath = path.resolve(distDir, distFileName) + + await fs.mkdir(distDir, { recursive: true }) + + // Symlink src to dist file + await fs.symlink(srcFilePath, distFilePath, 'file') + } + } +} + +console.log(`Done. Set up ${count} ${count === 1 ? 'package' : 'packages'}.`) diff --git a/.scripts/restorePackageJson.ts b/.scripts/restorePackageJson.ts new file mode 100644 index 00000000..d16a0664 --- /dev/null +++ b/.scripts/restorePackageJson.ts @@ -0,0 +1,30 @@ +import fs from 'node:fs/promises' +import path from 'node:path' +import { glob } from 'glob' + +// Restores package.json files from package.json.tmp files. + +console.log('Restoring package.json files.') + +// Get all package.json files +const packagePaths = await glob('packages/**/package.json.tmp', { + ignore: ['**/dist/**', '**/node_modules/**'], +}) + +let count = 0 +for (const packagePath of packagePaths) { + type Package = { name?: string | undefined } & Record + const file = Bun.file(packagePath) + const packageJson = (await file.json()) as Package + + count += 1 + console.log(`${packageJson.name} — ${path.dirname(packagePath)}`) + + await Bun.write( + packagePath.replace('.tmp', ''), + `${JSON.stringify(packageJson, undefined, 2)}\n`, + ) + await fs.rm(packagePath) +} + +console.log(`Done. Restored ${count} ${count === 1 ? 'file' : 'files'}.`) diff --git a/.scripts/updateVersion.ts b/.scripts/updateVersion.ts new file mode 100644 index 00000000..15e326c2 --- /dev/null +++ b/.scripts/updateVersion.ts @@ -0,0 +1,44 @@ +import path from 'node:path' +import { glob } from 'glob' + +// Updates package version.ts files (so you can use the version in code without importing package.json). + +console.log('Updating version files.') + +// Get all package.json files +const packagePaths = await glob('**/package.json', { + ignore: ['**/dist/**', '**/node_modules/**'], +}) + +let count = 0 +for (const packagePath of packagePaths) { + type Package = { + name?: string | undefined + private?: boolean | undefined + version?: string | 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} — ${packageJson.version}`) + + const versionFilePath = path.resolve( + path.dirname(packagePath), + 'src', + 'version.ts', + ) + await Bun.write( + versionFilePath, + `export const version = '${packageJson.version}'\n`, + ) +} + +console.log( + `Done. Updated version file for ${count} ${ + count === 1 ? 'package' : 'packages' + }.`, +) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 063e8999..4a086601 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,8 @@ { "recommendations": [ - "rome.rome", + "biomejs.biome", "orta.vscode-twoslash-queries", - "TypeHoles.ts-versions-switcher" + "TypeHoles.ts-versions-switcher", + "Vue.volar" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 38edeb97..4922e5d5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,21 +1,29 @@ { - "editor.defaultFormatter": "rome.rome", + "editor.defaultFormatter": "biomejs.biome", "editor.formatOnSave": true, - "typescript.tsdk": "node_modules/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true, + "typescript.preferences.importModuleSpecifier": "shortest", + "typescript.tsdk": "node_modules/typescript/lib", "editor.codeActionsOnSave": { - "source.organizeImports.rome": true + "quickfix.biome": true, + "source.organizeImports.biome": true }, "[json]": { - "editor.defaultFormatter": "rome.rome" + "editor.defaultFormatter": "biomejs.biome" }, "[javascript]": { - "editor.defaultFormatter": "rome.rome" + "editor.defaultFormatter": "biomejs.biome" }, "[javascriptreact]": { - "editor.defaultFormatter": "rome.rome" + "editor.defaultFormatter": "biomejs.biome" }, "[typescript]": { - "editor.defaultFormatter": "rome.rome" + "editor.defaultFormatter": "biomejs.biome" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[vue]": { + "editor.defaultFormatter": "Vue.volar" } } diff --git a/.vscode/workspace.code-workspace b/.vscode/workspace.code-workspace index d6078c31..78b36328 100644 --- a/.vscode/workspace.code-workspace +++ b/.vscode/workspace.code-workspace @@ -1,16 +1,12 @@ { "folders": [ - { - "name": "abitype", - "path": "../" - }, { "name": "docs", "path": "../docs" }, { - "name": "examples", - "path": "../examples" + "name": "packages", + "path": "../packages" }, { "name": "playground", diff --git a/README.md b/README.md deleted file mode 100644 index 8f891cb4..00000000 --- a/README.md +++ /dev/null @@ -1,96 +0,0 @@ -
- -

- - - - ABIType logo - - -

- - - ---- - -Strict TypeScript types for Ethereum ABIs. ABIType provides utilities and type definitions for ABI properties and values, covering the [Contract ABI Specification](https://docs.soliditylang.org/en/latest/abi-spec.html), as well as [EIP-712](https://eips.ethereum.org/EIPS/eip-712) Typed Data. - -```ts -import type { AbiParametersToPrimitiveTypes, ExtractAbiFunction, ExtractAbiFunctionNames } from 'abitype' -import { erc20Abi } from 'abitype/test' - -type FunctionNames = ExtractAbiFunctionNames -// ^? type FunctionNames = "symbol" | "name" | "allowance" | "balanceOf" | "decimals" | "totalSupply" - -type TransferInputTypes = AbiParametersToPrimitiveTypes< - // ^? type TransferInputTypes = readonly [`0x${string}`, bigint] - ExtractAbiFunction['inputs'] -> -``` - -Works great for adding blazing fast [autocomplete](https://twitter.com/awkweb/status/1555678944770367493) and type checking to functions, variables, or your own types. No need to generate types with third-party tools – just use your ABI and let TypeScript do the rest! - -## TL;DR - -ABIType might be a good option for your project if: - -- You want to [typecheck](https://abitype.dev/api/types.html) your ABIs or EIP-712 Typed Data. -- You want to add type inference and autocomplete to your library based on user-provided ABIs or EIP-712 Typed Data, like [wagmi](https://wagmi.sh) and [viem](https://viem.sh). -- You need to [convert ABI types](https://abitype.dev/api/utilities.html#abiparameterstoprimitivetypes) (e.g. `'string'`) to TypeScript types (e.g. `string`) or other type transformations. -- You need to validate ABIs at [runtime](https://abitype.dev/api/zod.html) (e.g. after fetching from external resource). -- You don’t want to set up a build process to generate types (e.g. TypeChain). - -## Install - -```bash -pnpm add abitype -``` - -```bash -npm i abitype -``` - -```bash -yarn add abitype -``` - -## Documentation - -For full documentation, visit [abitype.dev](https://abitype.dev). - -## Community - -If you have questions or need help, reach out to the community at the [ABIType GitHub Discussions](https://github.com/wagmi-dev/abitype/discussions). - -## Sponsor - -If you find ABIType useful, please consider supporting development on [GitHub Sponsors](https://github.com/sponsors/wagmi-dev?metadata_campaign=abitype_readme) or sending crypto to `wagmi-dev.eth`. Thank you 🙏 - -## Contributing - -If you're interested in contributing to ABIType, please read our [contributing docs](https://github.com/wagmi-dev/abitype/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**. diff --git a/README.md b/README.md new file mode 120000 index 00000000..823f995f --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +packages/abitype/README.md \ No newline at end of file diff --git a/rome.json b/biome.json similarity index 86% rename from rome.json rename to biome.json index 48c226e8..b407c76d 100644 --- a/rome.json +++ b/biome.json @@ -1,12 +1,6 @@ { "files": { - "ignore": [ - "CHANGELOG.md", - "pnpm-lock.yaml", - "trace/**", - "tsconfig.json", - "tsconfig.*.json" - ] + "ignore": ["CHANGELOG.md", "pnpm-lock.yaml", "trace/**", "tsconfig.*.json"] }, "formatter": { "enabled": true, @@ -19,11 +13,13 @@ "enabled": true, "rules": { "recommended": true, + "complexity": { + "noBannedTypes": "off" + }, "correctness": { "noUnusedVariables": "error" }, "nursery": { - "noBannedTypes": "off", "useExhaustiveDependencies": "error", "useGroupedTypeImport": "off" }, diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index da4e839f..9977b6f9 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,9 +1,10 @@ import footNote from 'markdown-it-footnote' -import { ScriptTarget } from 'typescript' +import ts from 'typescript' import { defineConfig } from 'vitepress' import { withTwoslash } from 'vitepress-plugin-shiki-twoslash' -import { version } from '../../package.json' +import { version } from '../../packages/abitype/package.json' +import { getSidebar } from './sidebar' export default withTwoslash( defineConfig({ @@ -40,7 +41,7 @@ export default withTwoslash( 'script', { src: 'https://cdn.usefathom.com/script.js', - ['data-site']: 'WKTTIYCY', + 'data-site': 'WKTTIYCY', defer: '', }, ], @@ -93,65 +94,7 @@ export default withTwoslash( }, ], outline: [2, 3], - sidebar: { - '/': [ - { - text: 'Guide', - items: [ - { - text: 'What is ABIType?', - link: '/', - }, - { - text: 'Getting Started', - link: '/guide/getting-started', - }, - { - text: 'Walkthrough', - link: '/guide/walkthrough', - }, - { - text: 'Comparisons', - link: '/guide/comparisons', - }, - ], - }, - { - text: 'API', - items: [ - { - text: 'Types', - link: '/api/types', - }, - { - text: 'Utilities', - link: '/api/utilities', - }, - { - text: 'Human-Readable', - link: '/api/human', - }, - { - text: 'Test', - link: '/api/test', - }, - { - text: 'Zod', - link: '/api/zod', - }, - ], - }, - { - text: 'Config', - items: [ - { - text: 'Reference', - link: '/config', - }, - ], - }, - ], - }, + sidebar: getSidebar(), siteTitle: false, socialLinks: [ { icon: 'twitter', link: 'https://twitter.com/wagmi_sh' }, @@ -162,7 +105,13 @@ export default withTwoslash( twoslash: { addTryButton: true, defaultCompilerOptions: { - target: ScriptTarget.ESNext, + paths: { + // Source - reference source files so we don't need to build packages to get types (speeds things up) + abitype: ['../../packages/abitype/src/exports'], + 'abitype/*': ['../../packages/abitype/src/exports/*'], + }, + strict: true, + target: ts.ScriptTarget.ESNext, }, }, vue: { diff --git a/docs/.vitepress/sidebar.ts b/docs/.vitepress/sidebar.ts new file mode 100644 index 00000000..23f354f8 --- /dev/null +++ b/docs/.vitepress/sidebar.ts @@ -0,0 +1,63 @@ +import { DefaultTheme } from 'vitepress' + +export function getSidebar() { + return { + '/': [ + { + text: 'Guide', + items: [ + { + text: 'What is ABIType?', + link: '/', + }, + { + text: 'Getting Started', + link: '/guide/getting-started', + }, + { + text: 'Walkthrough', + link: '/guide/walkthrough', + }, + { + text: 'Comparisons', + link: '/guide/comparisons', + }, + ], + }, + { + text: 'API', + items: [ + { + text: 'Types', + link: '/api/types', + }, + { + text: 'Utilities', + link: '/api/utilities', + }, + { + text: 'Human-Readable', + link: '/api/human', + }, + { + text: 'ABIs', + link: '/api/abis', + }, + { + text: 'Zod', + link: '/api/zod', + }, + ], + }, + { + text: 'Config', + items: [ + { + text: 'Reference', + link: '/config', + }, + ], + }, + ], + } satisfies DefaultTheme.Sidebar +} diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index f136fe3d..5f6f0df3 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,6 +1,6 @@ import 'vitepress-plugin-shiki-twoslash/styles.css' import defaultTheme from 'vitepress/theme' -import './custom.css' +import './styles.css' export default defaultTheme diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/styles.css similarity index 64% rename from docs/.vitepress/theme/custom.css rename to docs/.vitepress/theme/styles.css index 06dd0df0..df93a95c 100644 --- a/docs/.vitepress/theme/custom.css +++ b/docs/.vitepress/theme/styles.css @@ -115,62 +115,31 @@ img.resizable-img { * VitePress Twoslash * -------------------------------------------------------------------------- */ -/* Dark/light theme */ -:root:not(.dark) { - --vp-code-block-bg: rgba(125,125,125,0.04); - --vp-code-copy-code-active-text: var(--vp-c-text-2); - --vp-code-copy-code-hover-bg: rgba(125,125,125,0.1); - --vp-code-tab-divider: var(--vp-c-mute-dark); - --vp-code-tab-hover-text-color: var(--vp-c-text-1); - /* fix contrast: lang name on gray code block */ - --vp-c-text-dark-3: rgba(180, 180, 180, 0.7); -} -:root.dark { - --vp-code-block-bg: rgba(0,0,0,0.2); - /* fix lang name: check the same above (this is the default) */ - --vp-c-text-dark-3: rgba(235, 235, 235, 0.38); -} - -/* Hide block based on theme */ -html:not(.dark) pre.shiki[class*="dark"] { + /* + * Hide block based on theme + * `[class*='-dark']` matches `'vitesse-dark'` + * `[class*='-light']` matches `'vitesse-light'` + */ + html:not(.dark) pre.shiki[class*='-dark'] { display: none; } -html:not(.dark) pre.shiki[class*="light"] { +html:not(.dark) pre.shiki[class*='-light'] { display: block; } -html.dark pre.shiki[class*="dark"] { - display: block; +html.dark pre.shiki[class*='-dark'] { + display: block; } -html.dark pre.shiki[class*="light"] { +html.dark pre.shiki[class*='-light'] { display: none; } -/* VitePress Twoslash */ :root { - --vp-twoslash-c-annotation-fg: var(--vp-c-text-1); - - --vp-twoslash-c-brand: var(--vp-c-brand); - - --vp-twoslash-c-error-bg: var(--vp-c-red-dimm-2); - --vp-twoslash-c-error-fg: var(--vp-c-text-1); - - --vp-twoslash-c-logger-error-bg: var(--vp-c-red-dimm-2); - --vp-twoslash-c-logger-error-fg: var(--vp-c-red-dark); - --vp-twoslash-c-logger-fg: var(--vp-c-text-1); - --vp-twoslash-c-logger-log-bg: var(--vp-c-mute-dark); - --vp-twoslash-c-logger-log-fg: var(--vp-c-gray); - --vp-twoslash-c-logger-warn-bg: var(--vp-c-yellow-dimm-2); - --vp-twoslash-c-logger-warn-fg: var(--vp-c-yellow-dark); - - --vp-twoslash-c-lsp-bg: var(--vp-c-bg-elv); - --vp-twoslash-c-lsp-border: var(--vp-c-divider); - --vp-twoslash-c-lsp-fg: var(--vp-c-text-1); - --vp-twoslash-c-lsp-underline: var(--vp-c-text-2); - --vp-twoslash-lsp-shadow: var(--vp-shadow-2); - - --vp-twoslash-c-query-bg: var(--vp-c-mute-dark); - --vp-twoslash-c-query-fg-2: var(--vp-c-text-2); - --vp-twoslash-c-query-fg: var(--vp-c-text-1); + --vp-twoslash-c-error-bg: var(--vp-c-red-soft); + --vp-twoslash-c-query-bg: var(--vp-c-bg-soft); +} + +.error > span { + padding-right: 44px; } /** Fix overflow hidden when tooltip is shown */ diff --git a/docs/api/test.md b/docs/api/abis.md similarity index 81% rename from docs/api/test.md rename to docs/api/abis.md index 95fc5f8d..9bc1cbbe 100644 --- a/docs/api/test.md +++ b/docs/api/abis.md @@ -5,13 +5,7 @@ title: 'Test' # Test -ABIType exports some test utilities and constants to make playing around and testing your code easier via the `'abitype/test'` entrypoint. - -## Constants - -```ts twoslash -import { zeroAddress } from 'abitype/test' -``` +ABIType exports some test utilities and constants to make playing around and testing your code easier via the `'abitype/abis'` entrypoint. ### ABIs @@ -28,7 +22,7 @@ import { wethAbi, writingEditionsFactoryAbi, eip165Abi, -} from 'abitype/test' +} from 'abitype/abis' ``` ### Human-Readable ABIs @@ -45,5 +39,5 @@ import { wagmiMintExampleHumanReadableAbi, wethHumanReadableAbi, writingEditionsFactoryHumanReadableAbi, -} from 'abitype/test' +} from 'abitype/abis' ``` diff --git a/docs/api/zod.md b/docs/api/zod.md index c0cdc1d9..f4dccc0e 100644 --- a/docs/api/zod.md +++ b/docs/api/zod.md @@ -12,19 +12,18 @@ ABIType exports the [core types](/api/types) as [Zod](https://github.com/colinha Install the Zod peer dependency: ::: code-group - ```bash [pnpm] pnpm add zod ``` - +```bash [bun] +bun add zod +``` ```bash [npm] npm i zod ``` - ```bash [yarn] yarn add zod ``` - ::: ## Usage diff --git a/docs/config.md b/docs/config.md index 7433f490..65889c7e 100644 --- a/docs/config.md +++ b/docs/config.md @@ -13,22 +13,22 @@ ABIType's types are customizable using [declaration merging](https://www.typescr ```ts twoslash declare module 'abitype' { - export interface Config { + export interface Register { BigIntType: bigint & { foo: 'bar' } } } -import { ResolvedConfig } from 'abitype' -type Result = ResolvedConfig['BigIntType'] +import { ResolvedRegister } from 'abitype' +type Result = ResolvedRegister['BigIntType'] // ^? ``` ::: info Extending Config from third-party packages -If you are using ABIType via another package (e.g. [`wagmi`](https://wagmi.sh)), you can customize the ABIType's types by targeting the package's `abitype` module: +If you are using ABIType via another package (e.g. [`viem`](https://viem.sh)), you can customize the ABIType's types by targeting the package's `abitype` module: ```ts -declare module 'wagmi/node_modules/abitype' { - export interface Config { +declare module 'viem/node_modules/abitype' { + export interface Register { BigIntType: MyCustomBigIntType } } @@ -52,7 +52,7 @@ TypeScript type to use for `address` values. ```ts twoslash declare module 'abitype' { - export interface Config { + export interface Register { AddressType: `0x${string}` } } @@ -67,7 +67,7 @@ Maximum depth for nested array types (e.g. `string[][]`). When `false`, there is ```ts twoslash declare module 'abitype' { - export interface Config { + export interface Register { ArrayMaxDepth: false } } @@ -82,7 +82,7 @@ TypeScript type to use for `int` and `uint` values, where `M > 48`. ```ts twoslash declare module 'abitype' { - export interface Config { + export interface Register { BigIntType: bigint } } @@ -97,7 +97,7 @@ TypeScript type to use for `bytes` values. ```ts twoslash declare module 'abitype' { - export interface Config { + export interface Register { BytesType: { inputs: `0x${string}` | Uint8Array outputs: `0x${string}` @@ -115,7 +115,7 @@ Lower bound for fixed-length arrays. ```ts twoslash declare module 'abitype' { - export interface Config { + export interface Register { FixedArrayMinLength: 1 } } @@ -130,7 +130,7 @@ Upper bound for fixed-length arrays. ```ts twoslash declare module 'abitype' { - export interface Config { + export interface Register { FixedArrayMinLength: 99 } } @@ -145,7 +145,7 @@ TypeScript type to use for `int` and `uint` values, where `M <= 48`. ```ts twoslash declare module 'abitype' { - export interface Config { + export interface Register { IntType: number } } @@ -160,7 +160,7 @@ When set, validates `AbiParameter`'s `type` against `AbiType`. ```ts twoslash declare module 'abitype' { - export interface Config { + export interface Register { StrictAbiType: false } } diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 12b2cdff..e6b4f334 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -13,11 +13,12 @@ This section will help you start using ABIType in your TypeScript project. You c ```bash [pnpm] pnpm add abitype ``` - +```bash [bun] +bun add abitype +``` ```bash [npm] npm i abitype ``` - ```bash [yarn] yarn add abitype ``` @@ -41,13 +42,14 @@ import { narrow } from 'abitype' const erc20Abi = narrow([...]) ``` -Once your ABIs are set up correctly, you can use the exported [types](/api/types) and [utilities](/api/utilities) to work with them. You can also import already set-up ABIs from the `abitype/test` entrypoint to get started quickly. +Once your ABIs are set up correctly, you can use the exported [types](/api/types) and [utilities](/api/utilities) to work with them. You can also import already set-up ABIs from the `abitype/abis` entrypoint to get started quickly. ```ts twoslash import { ExtractAbiFunctionNames } from 'abitype' -import { erc20Abi } from 'abitype/test' +import { erc20Abi } from 'abitype/abis' type Result = ExtractAbiFunctionNames +// ^? ``` ## What's next? diff --git a/docs/index.md b/docs/index.md index 55d162a4..a7f75edd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -48,7 +48,7 @@ Strict TypeScript types for Ethereum ABIs. ABIType provides utilities and type d ```ts twoslash import { AbiParametersToPrimitiveTypes, ExtractAbiFunction } from 'abitype' -import { erc20Abi } from 'abitype/test' +import { erc20Abi } from 'abitype/abis' type TransferInputTypes = AbiParametersToPrimitiveTypes< // ^? @@ -76,11 +76,12 @@ Read the [Getting Started](/guide/getting-started) guide to learn more how to us ```bash [pnpm] pnpm add abitype ``` - +```bash [bun] +bun add abitype +``` ```bash [npm] npm i abitype ``` - ```bash [yarn] yarn add abitype ``` diff --git a/docs/package.json b/docs/package.json index b91a69ef..ffcd2bff 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,9 +1,10 @@ { "name": "docs", "private": true, + "type": "module", "scripts": { "dev": "vitepress dev", - "build": "vitepress build", + "build": "rm -r ../node_modules/.cache/twoslash & vitepress build", "serve": "vitepress serve" }, "devDependencies": { @@ -12,8 +13,9 @@ "abitype": "workspace:*", "ethers": "^6.5.1", "markdown-it-footnote": "^3.0.3", - "vitepress": "1.0.0-beta.1", - "vitepress-plugin-shiki-twoslash": "0.0.6", + "vite": "^4.4.9", + "vitepress": "1.0.0-rc.20", + "vitepress-plugin-shiki-twoslash": "^0.0.6", "vue": "^3.3.4" } } diff --git a/docs/tsconfig.json b/docs/tsconfig.json index cdfdec5d..58d7b6d1 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -18,5 +18,6 @@ "target": "esnext", "types": ["vite/client", "vitepress"] }, + "include": ["./*.ts", "./.vitepress/**/*.ts", "./.vitepress/**/*.vue"], "exclude": ["dist", "node_modules"] } diff --git a/docs/vercel.json b/docs/vercel.json index bd6fd8fa..c53b3c0a 100644 --- a/docs/vercel.json +++ b/docs/vercel.json @@ -1,3 +1,10 @@ { - "cleanUrls": true + "cleanUrls": true, + "redirects": [ + { + "source": "/api/test", + "destination": "/api/abis", + "permanent": true + } + ] } diff --git a/examples/tsconfig.json b/examples/tsconfig.json deleted file mode 100644 index 5abe1211..00000000 --- a/examples/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../tsconfig.base.json", - "compilerOptions": { - "moduleResolution": "bundler", - "baseUrl": ".", - "paths": { - "abitype": ["../src"], - "abitype/*": ["../src/*"] - } - }, - "include": ["*.ts"], - "exclude": [], -} diff --git a/package.json b/package.json index a5ebda15..b02cb4eb 100644 --- a/package.json +++ b/package.json @@ -1,146 +1,84 @@ { - "name": "abitype", - "description": "Strict TypeScript types for Ethereum ABIs", - "version": "0.9.10", - "license": "MIT", - "repository": "wagmi-dev/abitype", + "private": true, + "type": "module", "scripts": { "bench": "vitest bench", - "build": "pnpm run clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:types", - "build:cjs": "tsc --project tsconfig.build.json --module commonjs --moduleResolution node10 --outDir ./dist/cjs --removeComments --verbatimModuleSyntax false && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'", - "build:esm": "tsc --project tsconfig.build.json --module es2015 --moduleResolution node10 --outDir ./dist/esm --removeComments && echo > ./dist/esm/package.json '{\"type\":\"module\",\"sideEffects\":false}'", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "changeset": "changeset", - "changeset:release": "pnpm build && changeset publish", - "changeset:version": "changeset version && pnpm install --lockfile-only && pnpm bun scripts/updateVersion.ts", - "clean": "rimraf dist *.tsbuildinfo", - "docs:dev": "pnpm -r --filter docs dev", - "docs:build": "pnpm -r --filter docs build", - "docs:preview": "pnpm -r --filter docs preview", - "format": "rome format . --write", - "lint": "rome check .", + "build": "pnpm run --r --filter \"./packages/**\" build", + "changeset:publish": "pnpm version:update && pnpm build && bun .scripts/generateProxyPackages.ts && changeset publish", + "changeset:version": "changeset version && pnpm version:update", + "clean": "pnpm run --r --parallel clean", + "deps": "pnpx taze -r", + "docs:dev": "rimraf node_modules/.cache/twoslash && pnpm -r --filter docs dev", + "format": "biome format . --write", + "lint": "biome check .", "lint:fix": "pnpm lint --apply", - "preinstall": "npx only-allow pnpm", + "lint:unused": "pnpm clean && knip", + "postinstall": "pnpm preconstruct", + "preconstruct": "bun .scripts/preconstruct.ts", + "preinstall": "npx only-allow@1.1.1 pnpm", "prepare": "npx simple-git-hooks", - "prepublishOnly": "pnpm bun scripts/prepublishOnly.ts", + "prepublishOnly": "bun .scripts/formatPackageJson.ts", "test": "vitest", + "test:build": "pnpm run --r --parallel test:build", "test:cov": "vitest run --coverage", "test:typecheck": "vitest typecheck", "test:update": "vitest --update", - "trace": "tsc --noEmit --generateTrace ./trace --incremental false --project playground/tsconfig.json", - "typecheck": "tsc --noEmit", - "typecheck:propertyTypes": "tsc --noEmit --exactOptionalPropertyTypes false" - }, - "files": [ - "dist", - "!dist/**/*.tsbuildinfo", - "src/**/*.ts", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/**/*.bench.ts" - ], - "sideEffects": false, - "type": "module", - "main": "./dist/cjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", - "typings": "./dist/types/index.d.ts", - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.js" - }, - "./config": { - "types": "./dist/types/config.d.ts", - "import": "./dist/esm/config.js", - "require": "./dist/cjs/config.js" - }, - "./test": { - "types": "./dist/types/test.d.ts", - "import": "./dist/esm/test.js", - "require": "./dist/cjs/test.js" - }, - "./zod": { - "types": "./dist/types/zod.d.ts", - "import": "./dist/esm/zod.js", - "require": "./dist/cjs/zod.js" - }, - "./package.json": "./package.json" - }, - "typesVersions": { - "*": { - "config": [ - "./dist/types/config.d.ts" - ], - "test": [ - "./dist/types/test.d.ts" - ], - "zod": [ - "./dist/types/zod.d.ts" - ] - } - }, - "peerDependencies": { - "typescript": ">=5.0.4", - "zod": "^3 >=3.22.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - }, - "zod": { - "optional": true - } + "trace": "tsc --noEmit --generateTrace ./playgrounds/performance/out --incremental false --project playgrounds/performance/tsconfig.json && echo \"Open playgrounds/performance/out/trace.json in https://ui.perfetto.dev\"", + "typecheck": "pnpm run --r --parallel typecheck && tsc --noEmit", + "typecheck:propertyTypes": "pnpm run --r --parallel typecheck --exactOptionalPropertyTypes false && tsc --noEmit --exactOptionalPropertyTypes false", + "version:update": "bun .scripts/updateVersion.ts" }, "devDependencies": { + "@biomejs/biome": "1.2.2", "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.0", - "@ethersproject/abi": "^5.7.0", - "@types/fs-extra": "^11.0.1", - "@types/node": "18.16.3", - "@vitest/coverage-c8": "^0.30.1", - "bun": "^0.5.7", - "ethers": "^6.5.1", - "fs-extra": "^11.1.0", + "@vitest/coverage-v8": "0.34.5", + "bun": "1.0.1", + "bun-types": "^1.0.3", + "glob": "^10.3.10", + "knip": "^2.29.0", + "publint": "^0.2.2", "rimraf": "^5.0.1", - "rome": "^12.1.3", "simple-git-hooks": "^2.8.1", "typescript": "5.0.4", "typescript@5.1.3": "npm:typescript@5.1.3", - "vitest": "^0.30.1", - "zod": "^3.22.4" - }, - "contributors": [ - "jxom.eth ", - "awkweb.eth " - ], - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/wagmi-dev" - } - ], - "keywords": [ - "abi", - "eth", - "ethereum", - "typescript", - "web3" - ], - "simple-git-hooks": { - "pre-commit": "pnpm format && pnpm lint:fix" + "typescript@5.2.2": "npm:typescript@5.2.2", + "vitest": "0.34.5" }, - "packageManager": "pnpm@8.3.1", + "packageManager": "pnpm@8.8.0", "pnpm": { "overrides": { "remark-shiki-twoslash>shiki": "^0.14.1", "shiki-twoslash>shiki": "^0.14.1" }, "peerDependencyRules": { - "ignoreMissing": [ - "@algolia/client-search" - ] + "ignoreMissing": ["@algolia/client-search", "search-insights"] + } + }, + "simple-git-hooks": { + "pre-commit": "pnpm format && pnpm lint:fix" + }, + "knip": { + "ignoreBinaries": ["dev"], + "ignoreDependencies": ["only-allow"], + "ignoreWorkspaces": [ + "docs", + "packages/register-tests/**", + "playgrounds/**" + ], + "workspaces": { + ".": { + "entry": ".scripts/*.ts" + }, + "packages/abitype": { + "entry": [ + "src/exports/{abis,index,zod}.ts!", + "**/*.bench.ts", + "**/*.test.ts", + "**/*.test-d.ts" + ], + "ignoreDependencies": ["zod"] + } } } } diff --git a/CHANGELOG.md b/packages/abitype/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to packages/abitype/CHANGELOG.md diff --git a/packages/abitype/README.md b/packages/abitype/README.md new file mode 100644 index 00000000..78973af1 --- /dev/null +++ b/packages/abitype/README.md @@ -0,0 +1,98 @@ +
+ +

+ + + + ABIType logo + + +

+ +

+ Strict TypeScript types for Ethereum ABIs +

+ +

+ +--- + +Strict TypeScript types for Ethereum ABIs. ABIType provides utilities and type definitions for ABI properties and values, covering the [Contract ABI Specification](https://docs.soliditylang.org/en/latest/abi-spec.html), as well as [EIP-712](https://eips.ethereum.org/EIPS/eip-712) Typed Data. + +```ts +import type { AbiParametersToPrimitiveTypes, ExtractAbiFunction, ExtractAbiFunctionNames } from 'abitype' +import { erc20Abi } from 'abitype/abis' + +type FunctionNames = ExtractAbiFunctionNames +// ^? type FunctionNames = "symbol" | "name" | "allowance" | "balanceOf" | "decimals" | "totalSupply" + +type TransferInputTypes = AbiParametersToPrimitiveTypes< + // ^? type TransferInputTypes = readonly [`0x${string}`, bigint] + ExtractAbiFunction['inputs'] +> +``` + +Works great for adding blazing fast [autocomplete](https://twitter.com/awkweb/status/1555678944770367493) and type checking to functions, variables, or your own types. No need to generate types with third-party tools – just use your ABI and let TypeScript do the rest! + +## TL;DR + +ABIType might be a good option for your project if: + +- You want to [typecheck](https://abitype.dev/api/types.html) your ABIs or EIP-712 Typed Data. +- You want to add type inference and autocomplete to your library based on user-provided ABIs or EIP-712 Typed Data, like [wagmi](https://wagmi.sh) and [viem](https://viem.sh). +- You need to [convert ABI types](https://abitype.dev/api/utilities.html#abiparameterstoprimitivetypes) (e.g. `'string'`) to TypeScript types (e.g. `string`) or other type transformations. +- You need to validate ABIs at [runtime](https://abitype.dev/api/zod.html) (e.g. after fetching from external resource). +- You don’t want to set up a build process to generate types (e.g. TypeChain). + +## Documentation + +For documentation and guides, visit [abitype.dev](https://abitype.dev). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss ABIType on GitHub](https://github.com/wagmi-dev/abitype/discussions) + +For casual chit-chat with others using the library: + +[Join the Wagmi Discord](https://discord.gg/SghfWBKexF) + +## Sponsors + +If you find ABIType useful or use it for work, please consider supporting development on [GitHub Sponsors](https://github.com/sponsors/wagmi-dev?metadata_campaign=abitype_readme) or sending crypto to `wagmi-dev.eth`. Thank you 🙏 + +## Contributing + +Contributions to ABIType are greatly appreciated! If you're interested in contributing to ABIType, please read the [Contributing Guide](https://github.com/wagmi-dev/abitype/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**. \ No newline at end of file diff --git a/packages/abitype/package.json b/packages/abitype/package.json new file mode 100644 index 00000000..44154312 --- /dev/null +++ b/packages/abitype/package.json @@ -0,0 +1,84 @@ +{ + "name": "abitype", + "description": "Strict TypeScript types for Ethereum ABIs", + "version": "0.9.10", + "license": "MIT", + "repository": "wagmi-dev/abitype", + "scripts": { + "build": "pnpm run clean && pnpm run build:cjs && pnpm run build:esm+types", + "build:cjs": "tsc --project tsconfig.build.json --module commonjs --moduleResolution node10 --outDir ./dist/cjs --removeComments --verbatimModuleSyntax false && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'", + "build:esm+types": "tsc --project tsconfig.build.json --module es2020 --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types", + "clean": "rm -rf dist tsconfig.tsbuildinfo abis zod", + "test:build": "publint --strict", + "typecheck": "tsc --noEmit" + }, + "files": [ + "dist", + "!dist/**/*.tsbuildinfo", + "src/**/*.ts", + "!src/**/*.test.ts", + "!src/**/*.test-d.ts", + "!src/**/*.bench.ts", + "/abis", + "/zod" + ], + "sideEffects": false, + "type": "module", + "main": "./dist/cjs/exports/index.js", + "module": "./dist/esm/exports/index.js", + "types": "./dist/types/exports/index.d.ts", + "typings": "./dist/types/exports/index.d.ts", + "exports": { + ".": { + "types": "./dist/types/exports/index.d.ts", + "import": "./dist/esm/exports/index.js", + "default": "./dist/cjs/exports/index.js" + }, + "./abis": { + "types": "./dist/types/exports/abis.d.ts", + "import": "./dist/esm/exports/abis.js", + "default": "./dist/cjs/exports/abis.js" + }, + "./zod": { + "types": "./dist/types/exports/zod.d.ts", + "import": "./dist/esm/exports/zod.js", + "default": "./dist/cjs/exports/zod.js" + }, + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "abis": ["./dist/types/exports/abis.d.ts"], + "zod": ["./dist/types/exports/zod.d.ts"] + } + }, + "peerDependencies": { + "typescript": ">=5.0.4", + "zod": "^3 >=3.22.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "zod": { + "optional": true + } + }, + "devDependencies": { + "@ethersproject/abi": "^5.7.0", + "ethers": "^6.5.1", + "zod": "^3.22.4" + }, + "contributors": ["awkweb.eth ", "jxom.eth "], + "funding": "https://github.com/sponsors/wagmi-dev", + "keywords": [ + "abi", + "eth", + "ethereum", + "typescript", + "types", + "web3", + "viem", + "wagmi" + ] +} diff --git a/src/abi.test-d.ts b/packages/abitype/src/abi.test-d.ts similarity index 99% rename from src/abi.test-d.ts rename to packages/abitype/src/abi.test-d.ts index 879b0afa..f6b85d5f 100644 --- a/src/abi.test-d.ts +++ b/packages/abitype/src/abi.test-d.ts @@ -24,7 +24,7 @@ import type { TypedData, TypedDataType, } from './abi.js' -import { wagmiMintExampleAbi } from './test/abis.js' +import { wagmiMintExampleAbi } from './abis/json.js' test('Address', () => { assertType
('0xA0Cf798816D4b9b9866b5330EEa46a18382f251e') diff --git a/src/abi.ts b/packages/abitype/src/abi.ts similarity index 93% rename from src/abi.ts rename to packages/abitype/src/abi.ts index baa870f1..3ae275d8 100644 --- a/src/abi.ts +++ b/packages/abitype/src/abi.ts @@ -1,19 +1,19 @@ -import type { ResolvedConfig } from './config.js' +import type { ResolvedRegister } from './register.js' import type { Pretty, Range } from './types.js' -export type Address = ResolvedConfig['AddressType'] +export type Address = ResolvedRegister['AddressType'] //////////////////////////////////////////////////////////////////////////////////////////////////// // Solidity Types // Could use `Range`, but listed out for zero overhead -// rome-ignore format: no formatting -export type MBytes = +// biome-ignore format: no formatting +type MBytes = | '' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 -// rome-ignore format: no formatting +// biome-ignore format: no formatting export type MBits = | '' | 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 88 | 96 | 104 | 112 | 120 | 128 | 136 | 144 | 152 @@ -37,8 +37,8 @@ export type SolidityInt = `${'u' | ''}int${MBits}` // `(u)int`: (un)signed in // | `${'u' | ''}fixed${MBits}x${Range<1, 20>[number]}` export type SolidityFixedArrayRange = Range< - ResolvedConfig['FixedArrayMinLength'], - ResolvedConfig['FixedArrayMaxLength'] + ResolvedRegister['FixedArrayMinLength'], + ResolvedRegister['FixedArrayMaxLength'] >[number] export type SolidityFixedArraySizeLookup = { [Prop in SolidityFixedArrayRange as `${Prop}`]: Prop @@ -51,9 +51,9 @@ export type SolidityFixedArraySizeLookup = { type _BuildArrayTypes< T extends string, Depth extends readonly number[] = [], -> = ResolvedConfig['ArrayMaxDepth'] extends false +> = ResolvedRegister['ArrayMaxDepth'] extends false ? `${T}[${string}]` - : Depth['length'] extends ResolvedConfig['ArrayMaxDepth'] + : Depth['length'] extends ResolvedRegister['ArrayMaxDepth'] ? T : T extends `${any}[${SolidityFixedArrayRange | ''}]` ? _BuildArrayTypes @@ -84,7 +84,7 @@ export type AbiType = | SolidityInt | SolidityString | SolidityTuple -type ResolvedAbiType = ResolvedConfig['StrictAbiType'] extends true +type ResolvedAbiType = ResolvedRegister['StrictAbiType'] extends true ? AbiType : string @@ -220,7 +220,7 @@ export type Abi = readonly ( export type TypedDataDomain = { chainId?: number | undefined name?: string | undefined - salt?: ResolvedConfig['BytesType']['outputs'] | undefined + salt?: ResolvedRegister['BytesType']['outputs'] | undefined verifyingContract?: Address | undefined version?: string | undefined } diff --git a/src/test/human-readable.ts b/packages/abitype/src/abis/human-readable.ts similarity index 100% rename from src/test/human-readable.ts rename to packages/abitype/src/abis/human-readable.ts diff --git a/src/test/abis.ts b/packages/abitype/src/abis/json.ts similarity index 100% rename from src/test/abis.ts rename to packages/abitype/src/abis/json.ts diff --git a/src/errors.test.ts b/packages/abitype/src/errors.test.ts similarity index 100% rename from src/errors.test.ts rename to packages/abitype/src/errors.test.ts diff --git a/src/errors.ts b/packages/abitype/src/errors.ts similarity index 100% rename from src/errors.ts rename to packages/abitype/src/errors.ts diff --git a/src/test.test.ts b/packages/abitype/src/exports/abis.test.ts similarity index 88% rename from src/test.test.ts rename to packages/abitype/src/exports/abis.test.ts index 3faa4844..89f794dd 100644 --- a/src/test.test.ts +++ b/packages/abitype/src/exports/abis.test.ts @@ -1,21 +1,10 @@ import { expect, it } from 'vitest' -import * as Exports from './test.js' +import * as Exports from './abis.js' -it('should expose correct exports', () => { +it('exports', () => { expect(Object.keys(Exports)).toMatchInlineSnapshot(` [ - "customSolidityErrorsAbi", - "ensAbi", - "ensRegistryWithFallbackAbi", - "erc20Abi", - "nestedTupleArrayAbi", - "nounsAuctionHouseAbi", - "seaportAbi", - "wagmiMintExampleAbi", - "wethAbi", - "writingEditionsFactoryAbi", - "eip165Abi", "customSolidityErrorsHumanReadableAbi", "ensHumanReadableAbi", "ensRegistryWithFallbackHumanReadableAbi", @@ -27,7 +16,17 @@ it('should expose correct exports', () => { "wethHumanReadableAbi", "writingEditionsFactoryHumanReadableAbi", "eip165HumanReadableAbi", - "zeroAddress", + "customSolidityErrorsAbi", + "ensAbi", + "ensRegistryWithFallbackAbi", + "erc20Abi", + "nestedTupleArrayAbi", + "nounsAuctionHouseAbi", + "seaportAbi", + "wagmiMintExampleAbi", + "wethAbi", + "writingEditionsFactoryAbi", + "eip165Abi", ] `) }) diff --git a/src/test.ts b/packages/abitype/src/exports/abis.ts similarity index 80% rename from src/test.ts rename to packages/abitype/src/exports/abis.ts index eca402eb..23e38147 100644 --- a/src/test.ts +++ b/packages/abitype/src/exports/abis.ts @@ -1,4 +1,16 @@ -export const zeroAddress = '0x0000000000000000000000000000000000000000' as const +export { + customSolidityErrorsHumanReadableAbi, + ensHumanReadableAbi, + ensRegistryWithFallbackHumanReadableAbi, + erc20HumanReadableAbi, + nestedTupleArrayHumanReadableAbi, + nounsAuctionHouseHumanReadableAbi, + seaportHumanReadableAbi, + wagmiMintExampleHumanReadableAbi, + wethHumanReadableAbi, + writingEditionsFactoryHumanReadableAbi, + eip165HumanReadableAbi, +} from '../abis/human-readable.js' export { customSolidityErrorsAbi, @@ -12,18 +24,4 @@ export { wethAbi, writingEditionsFactoryAbi, eip165Abi, -} from './test/abis.js' - -export { - customSolidityErrorsHumanReadableAbi, - ensHumanReadableAbi, - ensRegistryWithFallbackHumanReadableAbi, - erc20HumanReadableAbi, - nestedTupleArrayHumanReadableAbi, - nounsAuctionHouseHumanReadableAbi, - seaportHumanReadableAbi, - wagmiMintExampleHumanReadableAbi, - wethHumanReadableAbi, - writingEditionsFactoryHumanReadableAbi, - eip165HumanReadableAbi, -} from './test/human-readable.js' +} from '../abis/json.js' diff --git a/src/index.test.ts b/packages/abitype/src/exports/index.test.ts similarity index 95% rename from src/index.test.ts rename to packages/abitype/src/exports/index.test.ts index e6e7d5f3..d758c52c 100644 --- a/src/index.test.ts +++ b/packages/abitype/src/exports/index.test.ts @@ -2,7 +2,7 @@ import { expect, it } from 'vitest' import * as Exports from './index.js' -it('should expose correct exports', () => { +it('exports', () => { expect(Object.keys(Exports)).toMatchInlineSnapshot(` [ "BaseError", diff --git a/src/index.ts b/packages/abitype/src/exports/index.ts similarity index 65% rename from src/index.ts rename to packages/abitype/src/exports/index.ts index 525c5165..519c1bdf 100644 --- a/src/index.ts +++ b/packages/abitype/src/exports/index.ts @@ -30,14 +30,18 @@ export type { TypedDataDomain, TypedDataParameter, TypedDataType, -} from './abi.js' +} from '../abi.js' -export type { Config, DefaultConfig, ResolvedConfig } from './config.js' +export { BaseError } from '../errors.js' -export { BaseError } from './errors.js' +export type { Narrow } from '../narrow.js' +export { narrow } from '../narrow.js' -export type { Narrow } from './narrow.js' -export { narrow } from './narrow.js' +export type { + Register, + DefaultRegister, + ResolvedRegister, +} from '../register.js' export type { AbiParameterToPrimitiveType, @@ -55,7 +59,7 @@ export type { IsAbi, IsTypedData, TypedDataToPrimitiveTypes, -} from './utils.js' +} from '../utils.js' //////////////////////////////////////////////////////////////////////////////////////////////////// // Human-Readable @@ -63,45 +67,45 @@ export type { export { formatAbi, type FormatAbi, -} from './human-readable/formatAbi.js' +} from '../human-readable/formatAbi.js' export { formatAbiItem, type FormatAbiItem, -} from './human-readable/formatAbiItem.js' +} from '../human-readable/formatAbiItem.js' export { formatAbiParameter, type FormatAbiParameter, -} from './human-readable/formatAbiParameter.js' +} from '../human-readable/formatAbiParameter.js' export { formatAbiParameters, type FormatAbiParameters, -} from './human-readable/formatAbiParameters.js' +} from '../human-readable/formatAbiParameters.js' -export { parseAbi, type ParseAbi } from './human-readable/parseAbi.js' +export { parseAbi, type ParseAbi } from '../human-readable/parseAbi.js' export { parseAbiItem, type ParseAbiItem, -} from './human-readable/parseAbiItem.js' +} from '../human-readable/parseAbiItem.js' export { parseAbiParameter, type ParseAbiParameter, -} from './human-readable/parseAbiParameter.js' +} from '../human-readable/parseAbiParameter.js' export { parseAbiParameters, type ParseAbiParameters, -} from './human-readable/parseAbiParameters.js' +} from '../human-readable/parseAbiParameters.js' export { UnknownTypeError, InvalidAbiItemError, UnknownSolidityTypeError, -} from './human-readable/errors/abiItem.js' +} from '../human-readable/errors/abiItem.js' export { InvalidAbiTypeParameterError, @@ -111,14 +115,14 @@ export { InvalidParameterError, InvalidAbiParametersError, InvalidAbiParameterError, -} from './human-readable/errors/abiParameter.js' +} from '../human-readable/errors/abiParameter.js' export { InvalidStructSignatureError, InvalidSignatureError, UnknownSignatureError, -} from './human-readable/errors/signature.js' +} from '../human-readable/errors/signature.js' -export { InvalidParenthesisError } from './human-readable/errors/splitParameters.js' +export { InvalidParenthesisError } from '../human-readable/errors/splitParameters.js' -export { CircularReferenceError } from './human-readable/errors/struct.js' +export { CircularReferenceError } from '../human-readable/errors/struct.js' diff --git a/packages/abitype/src/exports/zod.test.ts b/packages/abitype/src/exports/zod.test.ts new file mode 100644 index 00000000..008260db --- /dev/null +++ b/packages/abitype/src/exports/zod.test.ts @@ -0,0 +1,36 @@ +import { expect, it } from 'vitest' + +import * as Exports from './zod.js' + +it('exports', () => { + expect(Object.keys(Exports)).toMatchInlineSnapshot(` + [ + "Address", + "SolidityAddress", + "SolidityBool", + "SolidityBytes", + "SolidityFunction", + "SolidityString", + "SolidityTuple", + "SolidityInt", + "SolidityArrayWithoutTuple", + "SolidityArrayWithTuple", + "SolidityArray", + "AbiParameter", + "AbiEventParameter", + "AbiStateMutability", + "AbiFunction", + "AbiConstructor", + "AbiFallback", + "AbiReceive", + "AbiEvent", + "AbiError", + "AbiItemType", + "Abi", + "TypedDataDomain", + "TypedDataType", + "TypedDataParameter", + "TypedData", + ] + `) +}) diff --git a/packages/abitype/src/exports/zod.ts b/packages/abitype/src/exports/zod.ts new file mode 100644 index 00000000..bb5414ce --- /dev/null +++ b/packages/abitype/src/exports/zod.ts @@ -0,0 +1,28 @@ +export { + Address, + SolidityAddress, + SolidityBool, + SolidityBytes, + SolidityFunction, + SolidityString, + SolidityTuple, + SolidityInt, + SolidityArrayWithoutTuple, + SolidityArrayWithTuple, + SolidityArray, + AbiParameter, + AbiEventParameter, + AbiStateMutability, + AbiFunction, + AbiConstructor, + AbiFallback, + AbiReceive, + AbiEvent, + AbiError, + AbiItemType, + Abi, + TypedDataDomain, + TypedDataType, + TypedDataParameter, + TypedData, +} from '../zod.js' diff --git a/src/human-readable/__snapshots__/formatAbi.test.ts.snap b/packages/abitype/src/human-readable/__snapshots__/formatAbi.test.ts.snap similarity index 100% rename from src/human-readable/__snapshots__/formatAbi.test.ts.snap rename to packages/abitype/src/human-readable/__snapshots__/formatAbi.test.ts.snap diff --git a/src/human-readable/__snapshots__/parseAbi.test.ts.snap b/packages/abitype/src/human-readable/__snapshots__/parseAbi.test.ts.snap similarity index 100% rename from src/human-readable/__snapshots__/parseAbi.test.ts.snap rename to packages/abitype/src/human-readable/__snapshots__/parseAbi.test.ts.snap diff --git a/src/human-readable/errors/abiItem.test.ts b/packages/abitype/src/human-readable/errors/abiItem.test.ts similarity index 100% rename from src/human-readable/errors/abiItem.test.ts rename to packages/abitype/src/human-readable/errors/abiItem.test.ts diff --git a/src/human-readable/errors/abiItem.ts b/packages/abitype/src/human-readable/errors/abiItem.ts similarity index 100% rename from src/human-readable/errors/abiItem.ts rename to packages/abitype/src/human-readable/errors/abiItem.ts diff --git a/src/human-readable/errors/abiParameter.test.ts b/packages/abitype/src/human-readable/errors/abiParameter.test.ts similarity index 100% rename from src/human-readable/errors/abiParameter.test.ts rename to packages/abitype/src/human-readable/errors/abiParameter.test.ts diff --git a/src/human-readable/errors/abiParameter.ts b/packages/abitype/src/human-readable/errors/abiParameter.ts similarity index 100% rename from src/human-readable/errors/abiParameter.ts rename to packages/abitype/src/human-readable/errors/abiParameter.ts diff --git a/src/human-readable/errors/signature.test.ts b/packages/abitype/src/human-readable/errors/signature.test.ts similarity index 100% rename from src/human-readable/errors/signature.test.ts rename to packages/abitype/src/human-readable/errors/signature.test.ts diff --git a/src/human-readable/errors/signature.ts b/packages/abitype/src/human-readable/errors/signature.ts similarity index 100% rename from src/human-readable/errors/signature.ts rename to packages/abitype/src/human-readable/errors/signature.ts diff --git a/src/human-readable/errors/splitParameters.test.ts b/packages/abitype/src/human-readable/errors/splitParameters.test.ts similarity index 100% rename from src/human-readable/errors/splitParameters.test.ts rename to packages/abitype/src/human-readable/errors/splitParameters.test.ts diff --git a/src/human-readable/errors/splitParameters.ts b/packages/abitype/src/human-readable/errors/splitParameters.ts similarity index 100% rename from src/human-readable/errors/splitParameters.ts rename to packages/abitype/src/human-readable/errors/splitParameters.ts diff --git a/src/human-readable/errors/struct.test.ts b/packages/abitype/src/human-readable/errors/struct.test.ts similarity index 100% rename from src/human-readable/errors/struct.test.ts rename to packages/abitype/src/human-readable/errors/struct.test.ts diff --git a/src/human-readable/errors/struct.ts b/packages/abitype/src/human-readable/errors/struct.ts similarity index 100% rename from src/human-readable/errors/struct.ts rename to packages/abitype/src/human-readable/errors/struct.ts diff --git a/src/human-readable/formatAbi.bench.ts b/packages/abitype/src/human-readable/formatAbi.bench.ts similarity index 100% rename from src/human-readable/formatAbi.bench.ts rename to packages/abitype/src/human-readable/formatAbi.bench.ts diff --git a/src/human-readable/formatAbi.test-d.ts b/packages/abitype/src/human-readable/formatAbi.test-d.ts similarity index 98% rename from src/human-readable/formatAbi.test-d.ts rename to packages/abitype/src/human-readable/formatAbi.test-d.ts index 6b2749fa..c6085fb3 100644 --- a/src/human-readable/formatAbi.test-d.ts +++ b/packages/abitype/src/human-readable/formatAbi.test-d.ts @@ -1,7 +1,7 @@ import { expectTypeOf, test } from 'vitest' import type { Abi } from '../abi.js' -import { seaportAbi } from '../test/abis.js' +import { seaportAbi } from '../abis/json.js' import type { FormatAbi } from './formatAbi.js' import { formatAbi } from './formatAbi.js' diff --git a/src/human-readable/formatAbi.test.ts b/packages/abitype/src/human-readable/formatAbi.test.ts similarity index 85% rename from src/human-readable/formatAbi.test.ts rename to packages/abitype/src/human-readable/formatAbi.test.ts index 1097ed9b..bde5e065 100644 --- a/src/human-readable/formatAbi.test.ts +++ b/packages/abitype/src/human-readable/formatAbi.test.ts @@ -1,6 +1,6 @@ import { expect, test } from 'vitest' -import { customSolidityErrorsAbi, seaportAbi } from '../test/abis.js' +import { customSolidityErrorsAbi, seaportAbi } from '../abis/json.js' import { formatAbi } from './formatAbi.js' test('formatAbi', () => { diff --git a/src/human-readable/formatAbi.ts b/packages/abitype/src/human-readable/formatAbi.ts similarity index 100% rename from src/human-readable/formatAbi.ts rename to packages/abitype/src/human-readable/formatAbi.ts diff --git a/src/human-readable/formatAbiItem.bench.ts b/packages/abitype/src/human-readable/formatAbiItem.bench.ts similarity index 100% rename from src/human-readable/formatAbiItem.bench.ts rename to packages/abitype/src/human-readable/formatAbiItem.bench.ts diff --git a/src/human-readable/formatAbiItem.test-d.ts b/packages/abitype/src/human-readable/formatAbiItem.test-d.ts similarity index 100% rename from src/human-readable/formatAbiItem.test-d.ts rename to packages/abitype/src/human-readable/formatAbiItem.test-d.ts diff --git a/src/human-readable/formatAbiItem.test.ts b/packages/abitype/src/human-readable/formatAbiItem.test.ts similarity index 97% rename from src/human-readable/formatAbiItem.test.ts rename to packages/abitype/src/human-readable/formatAbiItem.test.ts index be01bbcf..11fa54ec 100644 --- a/src/human-readable/formatAbiItem.test.ts +++ b/packages/abitype/src/human-readable/formatAbiItem.test.ts @@ -1,6 +1,6 @@ import { expect, test } from 'vitest' -import { seaportAbi } from '../test/abis.js' +import { seaportAbi } from '../abis/json.js' import { formatAbiItem } from './formatAbiItem.js' test('default', () => { diff --git a/src/human-readable/formatAbiItem.ts b/packages/abitype/src/human-readable/formatAbiItem.ts similarity index 100% rename from src/human-readable/formatAbiItem.ts rename to packages/abitype/src/human-readable/formatAbiItem.ts diff --git a/src/human-readable/formatAbiParameter.bench.ts b/packages/abitype/src/human-readable/formatAbiParameter.bench.ts similarity index 100% rename from src/human-readable/formatAbiParameter.bench.ts rename to packages/abitype/src/human-readable/formatAbiParameter.bench.ts diff --git a/src/human-readable/formatAbiParameter.test-d.ts b/packages/abitype/src/human-readable/formatAbiParameter.test-d.ts similarity index 99% rename from src/human-readable/formatAbiParameter.test-d.ts rename to packages/abitype/src/human-readable/formatAbiParameter.test-d.ts index d71235ee..617ce43c 100644 --- a/src/human-readable/formatAbiParameter.test-d.ts +++ b/packages/abitype/src/human-readable/formatAbiParameter.test-d.ts @@ -1,7 +1,6 @@ import { expectTypeOf, test } from 'vitest' import type { AbiParameter } from '../abi.js' - import type { FormatAbiParameter } from './formatAbiParameter.js' import { formatAbiParameter } from './formatAbiParameter.js' diff --git a/src/human-readable/formatAbiParameter.test.ts b/packages/abitype/src/human-readable/formatAbiParameter.test.ts similarity index 100% rename from src/human-readable/formatAbiParameter.test.ts rename to packages/abitype/src/human-readable/formatAbiParameter.test.ts diff --git a/src/human-readable/formatAbiParameter.ts b/packages/abitype/src/human-readable/formatAbiParameter.ts similarity index 100% rename from src/human-readable/formatAbiParameter.ts rename to packages/abitype/src/human-readable/formatAbiParameter.ts diff --git a/src/human-readable/formatAbiParameters.test-d.ts b/packages/abitype/src/human-readable/formatAbiParameters.test-d.ts similarity index 100% rename from src/human-readable/formatAbiParameters.test-d.ts rename to packages/abitype/src/human-readable/formatAbiParameters.test-d.ts diff --git a/src/human-readable/formatAbiParameters.test.ts b/packages/abitype/src/human-readable/formatAbiParameters.test.ts similarity index 100% rename from src/human-readable/formatAbiParameters.test.ts rename to packages/abitype/src/human-readable/formatAbiParameters.test.ts diff --git a/src/human-readable/formatAbiParameters.ts b/packages/abitype/src/human-readable/formatAbiParameters.ts similarity index 100% rename from src/human-readable/formatAbiParameters.ts rename to packages/abitype/src/human-readable/formatAbiParameters.ts diff --git a/src/human-readable/parseAbi.bench.ts b/packages/abitype/src/human-readable/parseAbi.bench.ts similarity index 100% rename from src/human-readable/parseAbi.bench.ts rename to packages/abitype/src/human-readable/parseAbi.bench.ts diff --git a/src/human-readable/parseAbi.test-d.ts b/packages/abitype/src/human-readable/parseAbi.test-d.ts similarity index 98% rename from src/human-readable/parseAbi.test-d.ts rename to packages/abitype/src/human-readable/parseAbi.test-d.ts index 7e762a43..d7366033 100644 --- a/src/human-readable/parseAbi.test-d.ts +++ b/packages/abitype/src/human-readable/parseAbi.test-d.ts @@ -2,7 +2,7 @@ import { expectTypeOf, test } from 'vitest' import type { Abi } from '../abi.js' -import { seaportHumanReadableAbi } from '../test/human-readable.js' +import { seaportHumanReadableAbi } from '../abis/human-readable.js' import type { IsAbi } from '../utils.js' import type { ParseAbi } from './parseAbi.js' import { parseAbi } from './parseAbi.js' diff --git a/src/human-readable/parseAbi.test.ts b/packages/abitype/src/human-readable/parseAbi.test.ts similarity index 95% rename from src/human-readable/parseAbi.test.ts rename to packages/abitype/src/human-readable/parseAbi.test.ts index 33bb2795..1b99a6de 100644 --- a/src/human-readable/parseAbi.test.ts +++ b/packages/abitype/src/human-readable/parseAbi.test.ts @@ -3,7 +3,7 @@ import { expect, test } from 'vitest' import { customSolidityErrorsHumanReadableAbi, seaportHumanReadableAbi, -} from '../test/human-readable.js' +} from '../abis/human-readable.js' import { parseAbi } from './parseAbi.js' test('parseAbi', () => { diff --git a/src/human-readable/parseAbi.ts b/packages/abitype/src/human-readable/parseAbi.ts similarity index 100% rename from src/human-readable/parseAbi.ts rename to packages/abitype/src/human-readable/parseAbi.ts diff --git a/src/human-readable/parseAbiItem.bench.ts b/packages/abitype/src/human-readable/parseAbiItem.bench.ts similarity index 100% rename from src/human-readable/parseAbiItem.bench.ts rename to packages/abitype/src/human-readable/parseAbiItem.bench.ts diff --git a/src/human-readable/parseAbiItem.test-d.ts b/packages/abitype/src/human-readable/parseAbiItem.test-d.ts similarity index 99% rename from src/human-readable/parseAbiItem.test-d.ts rename to packages/abitype/src/human-readable/parseAbiItem.test-d.ts index 7f3e19b9..06afde30 100644 --- a/src/human-readable/parseAbiItem.test-d.ts +++ b/packages/abitype/src/human-readable/parseAbiItem.test-d.ts @@ -99,7 +99,7 @@ test('parseAbiItem', () => { readonly inputs: readonly [ { readonly type: 'tuple' - readonly components: [ + readonly components: readonly [ { readonly type: 'string' }, diff --git a/src/human-readable/parseAbiItem.test.ts b/packages/abitype/src/human-readable/parseAbiItem.test.ts similarity index 100% rename from src/human-readable/parseAbiItem.test.ts rename to packages/abitype/src/human-readable/parseAbiItem.test.ts diff --git a/src/human-readable/parseAbiItem.ts b/packages/abitype/src/human-readable/parseAbiItem.ts similarity index 98% rename from src/human-readable/parseAbiItem.ts rename to packages/abitype/src/human-readable/parseAbiItem.ts index ce51ad5a..da3a83a6 100644 --- a/src/human-readable/parseAbiItem.ts +++ b/packages/abitype/src/human-readable/parseAbiItem.ts @@ -1,7 +1,7 @@ import type { Abi } from '../abi.js' -import { InvalidAbiItemError } from '../index.js' import type { Narrow } from '../narrow.js' import type { Error, Filter } from '../types.js' +import { InvalidAbiItemError } from './errors/abiItem.js' import { isStructSignature } from './runtime/signatures.js' import { parseStructs } from './runtime/structs.js' import { parseSignature } from './runtime/utils.js' diff --git a/src/human-readable/parseAbiParameter.bench.ts b/packages/abitype/src/human-readable/parseAbiParameter.bench.ts similarity index 100% rename from src/human-readable/parseAbiParameter.bench.ts rename to packages/abitype/src/human-readable/parseAbiParameter.bench.ts diff --git a/src/human-readable/parseAbiParameter.test-d.ts b/packages/abitype/src/human-readable/parseAbiParameter.test-d.ts similarity index 99% rename from src/human-readable/parseAbiParameter.test-d.ts rename to packages/abitype/src/human-readable/parseAbiParameter.test-d.ts index 0606b1e6..297c8fb2 100644 --- a/src/human-readable/parseAbiParameter.test-d.ts +++ b/packages/abitype/src/human-readable/parseAbiParameter.test-d.ts @@ -1,7 +1,6 @@ import { expectTypeOf, test } from 'vitest' import type { AbiParameter } from '../abi.js' - import type { ParseAbiParameter } from './parseAbiParameter.js' import { parseAbiParameter } from './parseAbiParameter.js' diff --git a/src/human-readable/parseAbiParameter.test.ts b/packages/abitype/src/human-readable/parseAbiParameter.test.ts similarity index 100% rename from src/human-readable/parseAbiParameter.test.ts rename to packages/abitype/src/human-readable/parseAbiParameter.test.ts diff --git a/src/human-readable/parseAbiParameter.ts b/packages/abitype/src/human-readable/parseAbiParameter.ts similarity index 98% rename from src/human-readable/parseAbiParameter.ts rename to packages/abitype/src/human-readable/parseAbiParameter.ts index 15d813cd..7399eea3 100644 --- a/src/human-readable/parseAbiParameter.ts +++ b/packages/abitype/src/human-readable/parseAbiParameter.ts @@ -1,7 +1,7 @@ import type { AbiParameter } from '../abi.js' -import { InvalidAbiParameterError } from '../index.js' import type { Narrow } from '../narrow.js' import type { Error, Filter } from '../types.js' +import { InvalidAbiParameterError } from './errors/abiParameter.js' import { isStructSignature, modifiers } from './runtime/signatures.js' import { parseStructs } from './runtime/structs.js' import { parseAbiParameter as parseAbiParameter_ } from './runtime/utils.js' diff --git a/src/human-readable/parseAbiParameters.test-d.ts b/packages/abitype/src/human-readable/parseAbiParameters.test-d.ts similarity index 99% rename from src/human-readable/parseAbiParameters.test-d.ts rename to packages/abitype/src/human-readable/parseAbiParameters.test-d.ts index 5190a069..e3e469fa 100644 --- a/src/human-readable/parseAbiParameters.test-d.ts +++ b/packages/abitype/src/human-readable/parseAbiParameters.test-d.ts @@ -1,7 +1,6 @@ import { expectTypeOf, test } from 'vitest' import type { AbiParameter } from '../abi.js' - import type { ParseAbiParameters } from './parseAbiParameters.js' import { parseAbiParameters } from './parseAbiParameters.js' diff --git a/src/human-readable/parseAbiParameters.test.ts b/packages/abitype/src/human-readable/parseAbiParameters.test.ts similarity index 100% rename from src/human-readable/parseAbiParameters.test.ts rename to packages/abitype/src/human-readable/parseAbiParameters.test.ts diff --git a/src/human-readable/parseAbiParameters.ts b/packages/abitype/src/human-readable/parseAbiParameters.ts similarity index 98% rename from src/human-readable/parseAbiParameters.ts rename to packages/abitype/src/human-readable/parseAbiParameters.ts index 4c1c97ce..9bf122a2 100644 --- a/src/human-readable/parseAbiParameters.ts +++ b/packages/abitype/src/human-readable/parseAbiParameters.ts @@ -1,7 +1,7 @@ import type { AbiParameter } from '../abi.js' -import { InvalidAbiParametersError } from '../index.js' import type { Narrow } from '../narrow.js' import type { Error, Filter } from '../types.js' +import { InvalidAbiParametersError } from './errors/abiParameter.js' import { isStructSignature, modifiers } from './runtime/signatures.js' import { parseStructs } from './runtime/structs.js' import { splitParameters } from './runtime/utils.js' diff --git a/src/human-readable/runtime/cache.ts b/packages/abitype/src/human-readable/runtime/cache.ts similarity index 100% rename from src/human-readable/runtime/cache.ts rename to packages/abitype/src/human-readable/runtime/cache.ts diff --git a/src/human-readable/runtime/signatures.test.ts b/packages/abitype/src/human-readable/runtime/signatures.test.ts similarity index 100% rename from src/human-readable/runtime/signatures.test.ts rename to packages/abitype/src/human-readable/runtime/signatures.test.ts diff --git a/src/human-readable/runtime/signatures.ts b/packages/abitype/src/human-readable/runtime/signatures.ts similarity index 100% rename from src/human-readable/runtime/signatures.ts rename to packages/abitype/src/human-readable/runtime/signatures.ts diff --git a/src/human-readable/runtime/structs.test.ts b/packages/abitype/src/human-readable/runtime/structs.test.ts similarity index 100% rename from src/human-readable/runtime/structs.test.ts rename to packages/abitype/src/human-readable/runtime/structs.test.ts diff --git a/src/human-readable/runtime/structs.ts b/packages/abitype/src/human-readable/runtime/structs.ts similarity index 100% rename from src/human-readable/runtime/structs.ts rename to packages/abitype/src/human-readable/runtime/structs.ts diff --git a/src/human-readable/runtime/utils.test.ts b/packages/abitype/src/human-readable/runtime/utils.test.ts similarity index 99% rename from src/human-readable/runtime/utils.test.ts rename to packages/abitype/src/human-readable/runtime/utils.test.ts index 58a64b64..88818b7a 100644 --- a/src/human-readable/runtime/utils.test.ts +++ b/packages/abitype/src/human-readable/runtime/utils.test.ts @@ -543,6 +543,10 @@ test.each([ 'uint tokenId', ], }, + { + params: ' ', + expected: [], + }, ])('splitParameters($params)', ({ params, expected }) => { expect(splitParameters(params)).toEqual(expected) }) diff --git a/src/human-readable/runtime/utils.ts b/packages/abitype/src/human-readable/runtime/utils.ts similarity index 96% rename from src/human-readable/runtime/utils.ts rename to packages/abitype/src/human-readable/runtime/utils.ts index 18906036..2356893a 100644 --- a/src/human-readable/runtime/utils.ts +++ b/packages/abitype/src/human-readable/runtime/utils.ts @@ -245,16 +245,8 @@ export function splitParameters( current = '', depth = 0, ): readonly string[] { - if (params === '') { - if (current === '') return result - if (depth !== 0) throw new InvalidParenthesisError({ current, depth }) - - result.push(current.trim()) - return result - } - - const length = params.length - // rome-ignore lint/correctness/noUnreachable: recursive + const length = params.trim().length + // biome-ignore lint/correctness/noUnreachable: recursive for (let i = 0; i < length; i++) { const char = params[i] const tail = params.slice(i + 1) @@ -272,7 +264,11 @@ export function splitParameters( } } - return [] + if (current === '') return result + if (depth !== 0) throw new InvalidParenthesisError({ current, depth }) + + result.push(current.trim()) + return result } export function isSolidityType( @@ -291,6 +287,7 @@ export function isSolidityType( const protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/ +/** @internal */ export function isSolidityKeyword(name: string) { return ( name === 'address' || @@ -304,6 +301,7 @@ export function isSolidityKeyword(name: string) { ) } +/** @internal */ export function isValidDataLocation( type: string, isArray: boolean, diff --git a/src/human-readable/types/signatures-test-d.ts b/packages/abitype/src/human-readable/types/signatures.test-d.ts similarity index 100% rename from src/human-readable/types/signatures-test-d.ts rename to packages/abitype/src/human-readable/types/signatures.test-d.ts diff --git a/src/human-readable/types/signatures.ts b/packages/abitype/src/human-readable/types/signatures.ts similarity index 98% rename from src/human-readable/types/signatures.ts rename to packages/abitype/src/human-readable/types/signatures.ts index 33f9a698..711f1c84 100644 --- a/src/human-readable/types/signatures.ts +++ b/packages/abitype/src/human-readable/types/signatures.ts @@ -69,7 +69,7 @@ export type IsStructSignature = T extends StructSignature< ? IsName : false -export type ConstructorSignature = +type ConstructorSignature = `constructor(${TTail}` export type IsConstructorSignature = T extends ConstructorSignature ? T extends ValidConstructorSignatures @@ -227,7 +227,7 @@ export type IsValidCharacter = : IsValidCharacter : false -// rome-ignore format: no formatting +// biome-ignore format: no formatting type ValidCharacters = // uppercase letters | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' diff --git a/src/human-readable/types/structs.test-d.ts b/packages/abitype/src/human-readable/types/structs.test-d.ts similarity index 82% rename from src/human-readable/types/structs.test-d.ts rename to packages/abitype/src/human-readable/types/structs.test-d.ts index 49b61d8e..2999eb67 100644 --- a/src/human-readable/types/structs.test-d.ts +++ b/packages/abitype/src/human-readable/types/structs.test-d.ts @@ -18,29 +18,34 @@ test('ParseStructs', () => { ] > expectTypeOf().toEqualTypeOf<{ - Name: readonly [ - { - readonly type: 'tuple' - readonly name: 'foo' - readonly components: readonly [{ type: 'string'; name: 'bar' }] - }, - ] - Foo: readonly [{ readonly type: 'string'; readonly name: 'bar' }] Person: readonly [ { - readonly type: 'tuple' readonly name: 'name' + readonly type: 'tuple' readonly components: readonly [ { - readonly type: 'tuple' readonly name: 'foo' - readonly components: [ - { readonly type: 'string'; readonly name: 'bar' }, + readonly type: 'tuple' + readonly components: readonly [ + { + readonly type: 'string' + readonly name: 'bar' + }, ] }, ] }, ] + Foo: readonly [{ readonly type: 'string'; readonly name: 'bar' }] + Name: readonly [ + { + readonly type: 'tuple' + readonly name: 'foo' + readonly components: readonly [ + { readonly type: 'string'; readonly name: 'bar' }, + ] + }, + ] }>() expectTypeOf< @@ -112,8 +117,8 @@ test('ParseStruct', () => { >().toEqualTypeOf<{ readonly name: 'Foo' readonly components: [ - { type: 'string'; name: 'foo' }, - { type: 'string'; name: 'bar' }, + { readonly type: 'string'; readonly name: 'foo' }, + { readonly type: 'string'; readonly name: 'bar' }, ] }>() expectTypeOf>().toEqualTypeOf<{ @@ -124,8 +129,8 @@ test('ParseStruct', () => { readonly name: 'Foo' readonly components: [ { - type: 'Bar' - name: 'bar' + readonly type: 'Bar' + readonly name: 'bar' }, ] }>() @@ -146,15 +151,15 @@ test('ResolveStructs', () => { expectTypeOf().toEqualTypeOf< readonly [ { - readonly type: 'tuple' readonly name: 'name' + readonly type: 'tuple' readonly components: readonly [ { - readonly type: 'tuple' readonly name: 'foo' + readonly type: 'tuple' readonly components: readonly [ - { readonly type: 'string'; readonly name: 'bar' }, - { readonly type: 'uint16'; readonly name: 'baz' }, + { type: 'string'; name: 'bar' }, + { type: 'uint16'; name: 'baz' }, ] }, ] @@ -186,23 +191,31 @@ test('ResolveStructs', () => { test('ParseStructProperties', () => { expectTypeOf>().toEqualTypeOf< - [{ type: 'string' }] + [{ readonly type: 'string' }] >() expectTypeOf>().toEqualTypeOf< - [{ type: 'string'; name: 'foo' }] - >() - expectTypeOf>().toEqualTypeOf< - [{ type: 'string' }, { type: 'string' }] + [{ readonly type: 'string'; readonly name: 'foo' }] >() + expectTypeOf< + ParseStructProperties<'string; string;'> extends [ + { readonly type: 'string' }, + { readonly type: 'string' }, + ] + ? true + : false + >().toEqualTypeOf() expectTypeOf< ParseStructProperties<'string foo; string bar;'> >().toEqualTypeOf< - [{ type: 'string'; name: 'foo' }, { type: 'string'; name: 'bar' }] + [ + { readonly type: 'string'; readonly name: 'foo' }, + { readonly type: 'string'; readonly name: 'bar' }, + ] >() expectTypeOf>().toEqualTypeOf<[]>() expectTypeOf>().toEqualTypeOf<[]>() expectTypeOf>().toEqualTypeOf< - [{ type: 'string' }] + [{ readonly type: 'string' }] >() }) diff --git a/src/human-readable/types/structs.ts b/packages/abitype/src/human-readable/types/structs.ts similarity index 100% rename from src/human-readable/types/structs.ts rename to packages/abitype/src/human-readable/types/structs.ts diff --git a/src/human-readable/types/utils.test-d.ts b/packages/abitype/src/human-readable/types/utils.test-d.ts similarity index 99% rename from src/human-readable/types/utils.test-d.ts rename to packages/abitype/src/human-readable/types/utils.test-d.ts index 062be61a..6cb98d58 100644 --- a/src/human-readable/types/utils.test-d.ts +++ b/packages/abitype/src/human-readable/types/utils.test-d.ts @@ -383,9 +383,14 @@ test('ParseAbiParameters', () => { expectTypeOf>().toEqualTypeOf< readonly [{ readonly type: 'string' }] >() - expectTypeOf>().toEqualTypeOf< - readonly [{ readonly type: 'string' }, { readonly type: 'string' }] - >() + expectTypeOf< + ParseAbiParameters<['string', 'string']> extends readonly [ + { readonly type: 'string' }, + { readonly type: 'string' }, + ] + ? true + : false + >().toEqualTypeOf() }) test('ParseAbiParameter', () => { diff --git a/src/human-readable/types/utils.ts b/packages/abitype/src/human-readable/types/utils.ts similarity index 94% rename from src/human-readable/types/utils.ts rename to packages/abitype/src/human-readable/types/utils.ts index 2d74ad04..1c5a17ef 100644 --- a/src/human-readable/types/utils.ts +++ b/packages/abitype/src/human-readable/types/utils.ts @@ -4,7 +4,7 @@ import type { AbiType, SolidityFixedArrayRange, } from '../../abi.js' -import type { ResolvedConfig } from '../../config.js' +import type { ResolvedRegister } from '../../register.js' import type { Error, IsUnknown, Merge, Pretty, Trim } from '../../types.js' import type { ErrorSignature, @@ -102,11 +102,11 @@ export type ParseSignature< } : never) -export type ParseOptions = { +type ParseOptions = { Modifier?: Modifier Structs?: StructLookup | unknown } -export type DefaultParseOptions = object +type DefaultParseOptions = object export type ParseAbiParameters< T extends readonly string[], @@ -214,7 +214,7 @@ export type _ValidateAbiParameter = ) extends infer Parameter ? // Validate `type` against `AbiType` ( - ResolvedConfig['StrictAbiType'] extends true + ResolvedRegister['StrictAbiType'] extends true ? Parameter extends { type: AbiType } ? Parameter : Merge< @@ -233,7 +233,9 @@ export type _ValidateAbiParameter = Parameter2['type'] extends `${infer Prefix extends | 'u' | ''}int${infer Suffix extends `[${string}]` | ''}` - ? Merge + ? Pretty< + Merge + > : Parameter2 : never : never @@ -260,13 +262,12 @@ export type _ParseFunctionParametersAndStateMutability< } : never -export type _ParseConstructorParametersAndStateMutability< - TSignature extends string, -> = TSignature extends `constructor(${infer Parameters}) payable` - ? { Inputs: Parameters; StateMutability: 'payable' } - : TSignature extends `constructor(${infer Parameters})` - ? { Inputs: Parameters; StateMutability: 'nonpayable' } - : never +type _ParseConstructorParametersAndStateMutability = + TSignature extends `constructor(${infer Parameters}) payable` + ? { Inputs: Parameters; StateMutability: 'payable' } + : TSignature extends `constructor(${infer Parameters})` + ? { Inputs: Parameters; StateMutability: 'nonpayable' } + : never export type _ParseTuple< T extends `(${string})${string}`, @@ -350,9 +351,11 @@ export type _SplitNameOrModifier< ? Options extends { Modifier: Modifier } ? // TODO: Check that modifier is allowed Trimmed extends `${infer Mod extends Options['Modifier']} ${infer Name}` - ? { readonly name: Trim } & (Mod extends 'indexed' - ? { readonly indexed: true } - : object) + ? Pretty< + { readonly name: Trim } & (Mod extends 'indexed' + ? { readonly indexed: true } + : object) + > : Trimmed extends Options['Modifier'] ? Trimmed extends 'indexed' ? { readonly indexed: true } diff --git a/src/narrow.test-d.ts b/packages/abitype/src/narrow.test-d.ts similarity index 100% rename from src/narrow.test-d.ts rename to packages/abitype/src/narrow.test-d.ts diff --git a/src/narrow.test.ts b/packages/abitype/src/narrow.test.ts similarity index 100% rename from src/narrow.test.ts rename to packages/abitype/src/narrow.test.ts diff --git a/src/narrow.ts b/packages/abitype/src/narrow.ts similarity index 100% rename from src/narrow.ts rename to packages/abitype/src/narrow.ts diff --git a/src/regex.ts b/packages/abitype/src/regex.ts similarity index 100% rename from src/regex.ts rename to packages/abitype/src/regex.ts diff --git a/packages/abitype/src/register.test-d.ts b/packages/abitype/src/register.test-d.ts new file mode 100644 index 00000000..0c2bbee3 --- /dev/null +++ b/packages/abitype/src/register.test-d.ts @@ -0,0 +1,27 @@ +import { assertType, test } from 'vitest' + +import type { ResolvedRegister } from './register.js' + +test('ResolvedRegister', () => { + assertType(false) + assertType(1) + assertType(99) + + type AddressType = ResolvedRegister['AddressType'] + assertType('0x0000000000000000000000000000000000000000') + + type BytesType = ResolvedRegister['BytesType'] + assertType({ + inputs: '0xfoobarbaz', + outputs: '0xfoobarbaz', + }) + + type IntType = ResolvedRegister['IntType'] + assertType(123) + + type BigIntType = ResolvedRegister['BigIntType'] + assertType(123n) + + type StrictAbiType = ResolvedRegister['StrictAbiType'] + assertType(false) +}) diff --git a/src/config.ts b/packages/abitype/src/register.ts similarity index 55% rename from src/config.ts rename to packages/abitype/src/register.ts index a51ea2ee..30bf6883 100644 --- a/src/config.ts +++ b/packages/abitype/src/register.ts @@ -1,57 +1,37 @@ -import type { IsUnknown } from './types.js' +export type Register = {} -/** - * Override `Config` to customize type options - * - * @example - * declare module 'abitype' { - * export interface Config { - * FixedArrayMaxLength: 6 - * } - * } - */ -export interface Config { - [key: string]: unknown -} - -/** - * Default {@link Config} options - */ -export interface DefaultConfig { - /** Maximum depth for nested array types (e.g. string[][]) */ - ArrayMaxDepth: false - /** Lower bound for fixed array length */ - FixedArrayMinLength: 1 - /** Upper bound for fixed array length */ - FixedArrayMaxLength: 99 - - /** TypeScript type to use for `address` values */ - AddressType: `0x${string}` - /** TypeScript type to use for `bytes` values */ - BytesType: { - /** TypeScript type to use for `bytes` input values */ - inputs: `0x${string}` - /** TypeScript type to use for `bytes` output values */ - outputs: `0x${string}` +export type ResolvedRegister = { + /** + * TypeScript type to use for `address` values + * @default `0x${string}` + */ + AddressType: Register extends { AddressType: infer type } + ? type + : DefaultRegister['AddressType'] + /** + * TypeScript type to use for `int` and `uint` values, where `M > 48` + * @default bigint + */ + BigIntType: Register extends { BigIntType: infer type } + ? type + : DefaultRegister['BigIntType'] + /** + * TypeScript type to use for `bytes` values + * @default { inputs: `0x${string}`; outputs: `0x${string}`; } + */ + BytesType: Register extends { + BytesType: infer type extends { inputs: unknown; outputs: unknown } } - /** TypeScript type to use for `int` and `uint` values, where `M > 48` */ - BigIntType: bigint - /** TypeScript type to use for `int` and `uint` values, where `M <= 48` */ - IntType: number - - /** When set, validates {@link AbiParameter}'s `type` against {@link AbiType} */ - StrictAbiType: false -} + ? type + : DefaultRegister['BytesType'] + /** + * TypeScript type to use for `int` and `uint` values, where `M <= 48` + * @default number + */ + IntType: Register extends { IntType: infer type } + ? type + : DefaultRegister['IntType'] -/** - * Resolved {@link Config} between user defined options and {@link DefaultConfig} - * - * @example - * import { ResolvedConfig } from 'abitype' - * - * ResolvedConfig['BigIntType'] - */ -export interface ResolvedConfig { /** * Maximum depth for nested array types (e.g. string[][]) * @@ -60,54 +40,29 @@ export interface ResolvedConfig { * * @default false */ - ArrayMaxDepth: Config['ArrayMaxDepth'] extends number | false - ? Config['ArrayMaxDepth'] - : DefaultConfig['ArrayMaxDepth'] + ArrayMaxDepth: Register extends { + ArrayMaxDepth: infer type extends number | false + } + ? type + : DefaultRegister['ArrayMaxDepth'] /** * Lower bound for fixed array length * @default 1 */ - FixedArrayMinLength: Config['FixedArrayMinLength'] extends number - ? Config['FixedArrayMinLength'] - : DefaultConfig['FixedArrayMinLength'] + FixedArrayMinLength: Register extends { + FixedArrayMinLength: infer type extends number + } + ? type + : DefaultRegister['FixedArrayMinLength'] /** * Upper bound for fixed array length * @default 99 */ - FixedArrayMaxLength: Config['FixedArrayMaxLength'] extends number - ? Config['FixedArrayMaxLength'] - : DefaultConfig['FixedArrayMaxLength'] - - /** - * TypeScript type to use for `address` values - * @default `0x${string}` - */ - AddressType: IsUnknown extends true - ? DefaultConfig['AddressType'] - : Config['AddressType'] - - /** - * TypeScript type to use for `bytes` values - * @default { inputs: `0x${string}`; outputs: `0x${string}`; } - */ - BytesType: Config['BytesType'] extends { inputs: unknown; outputs: unknown } - ? Config['BytesType'] - : DefaultConfig['BytesType'] - - /** - * TypeScript type to use for `int` and `uint` values, where `M > 48` - * @default bigint - */ - BigIntType: IsUnknown extends true - ? DefaultConfig['BigIntType'] - : Config['BigIntType'] - /** - * TypeScript type to use for `int` and `uint` values, where `M <= 48` - * @default number - */ - IntType: IsUnknown extends true - ? DefaultConfig['IntType'] - : Config['IntType'] + FixedArrayMaxLength: Register extends { + FixedArrayMaxLength: infer type extends number + } + ? type + : DefaultRegister['FixedArrayMaxLength'] /** * When set, validates {@link AbiParameter}'s `type` against {@link AbiType} @@ -117,7 +72,33 @@ export interface ResolvedConfig { * * @default false */ - StrictAbiType: Config['StrictAbiType'] extends true - ? Config['StrictAbiType'] - : DefaultConfig['StrictAbiType'] + StrictAbiType: Register extends { StrictAbiType: infer type extends boolean } + ? type + : DefaultRegister['StrictAbiType'] +} + +export type DefaultRegister = { + /** Maximum depth for nested array types (e.g. string[][]) */ + ArrayMaxDepth: false + /** Lower bound for fixed array length */ + FixedArrayMinLength: 1 + /** Upper bound for fixed array length */ + FixedArrayMaxLength: 99 + + /** TypeScript type to use for `address` values */ + AddressType: `0x${string}` + /** TypeScript type to use for `bytes` values */ + BytesType: { + /** TypeScript type to use for `bytes` input values */ + inputs: `0x${string}` + /** TypeScript type to use for `bytes` output values */ + outputs: `0x${string}` + } + /** TypeScript type to use for `int` and `uint` values, where `M > 48` */ + BigIntType: bigint + /** TypeScript type to use for `int` and `uint` values, where `M <= 48` */ + IntType: number + + /** When set, validates {@link AbiParameter}'s `type` against {@link AbiType} */ + StrictAbiType: false } diff --git a/src/types.test-d.ts b/packages/abitype/src/types.test-d.ts similarity index 100% rename from src/types.test-d.ts rename to packages/abitype/src/types.test-d.ts diff --git a/src/types.ts b/packages/abitype/src/types.ts similarity index 100% rename from src/types.ts rename to packages/abitype/src/types.ts diff --git a/src/utils.test-d.ts b/packages/abitype/src/utils.test-d.ts similarity index 99% rename from src/utils.test-d.ts rename to packages/abitype/src/utils.test-d.ts index c7dbfb13..f92a0f1b 100644 --- a/src/utils.test-d.ts +++ b/packages/abitype/src/utils.test-d.ts @@ -1,7 +1,6 @@ import { assertType, expectTypeOf, test } from 'vitest' import type { Abi } from './abi.js' -import { zeroAddress } from './test.js' import { customSolidityErrorsAbi, ensRegistryWithFallbackAbi, @@ -10,7 +9,7 @@ import { wagmiMintExampleAbi, wethAbi, writingEditionsFactoryAbi, -} from './test/abis.js' +} from './abis/json.js' import type { AbiParameterToPrimitiveType, AbiParametersToPrimitiveTypes, @@ -29,6 +28,8 @@ import type { TypedDataToPrimitiveTypes, } from './utils.js' +const zeroAddress = '0x0000000000000000000000000000000000000000' + test('AbiTypeToPrimitiveType', () => { test('address', () => { assertType>(zeroAddress) diff --git a/src/utils.ts b/packages/abitype/src/utils.ts similarity index 96% rename from src/utils.ts rename to packages/abitype/src/utils.ts index 44de08b6..4ad1816d 100644 --- a/src/utils.ts +++ b/packages/abitype/src/utils.ts @@ -19,7 +19,7 @@ import type { TypedDataParameter, TypedDataType, } from './abi.js' -import type { ResolvedConfig } from './config.js' +import type { ResolvedRegister } from './register.js' import type { Error, Merge, Pretty, Tuple } from './types.js' /** @@ -42,13 +42,13 @@ type PrimitiveTypeLookup< TAbiType extends AbiType, TAbiParameterKind extends AbiParameterKind = AbiParameterKind, > = { - [_ in SolidityAddress]: ResolvedConfig['AddressType'] + [_ in SolidityAddress]: ResolvedRegister['AddressType'] } & { [_ in SolidityBool]: boolean } & { - [_ in SolidityBytes]: ResolvedConfig['BytesType'][TAbiParameterKind] + [_ in SolidityBytes]: ResolvedRegister['BytesType'][TAbiParameterKind] } & { - [_ in SolidityFunction]: `${ResolvedConfig['AddressType']}${string}` + [_ in SolidityFunction]: `${ResolvedRegister['AddressType']}${string}` } & { [_ in SolidityInt]: TAbiType extends `${'u' | ''}int${infer TBits}` ? TBits extends keyof BitsTypeLookup @@ -67,11 +67,11 @@ type GreaterThan48Bits = Exclude type LessThanOrEqualTo48Bits = Exclude type NoBits = Exclude type BitsTypeLookup = { - [_ in `${LessThanOrEqualTo48Bits}`]: ResolvedConfig['IntType'] + [_ in `${LessThanOrEqualTo48Bits}`]: ResolvedRegister['IntType'] } & { - [_ in `${GreaterThan48Bits}`]: ResolvedConfig['BigIntType'] + [_ in `${GreaterThan48Bits}`]: ResolvedRegister['BigIntType'] } & { - [_ in NoBits]: ResolvedConfig['BigIntType'] + [_ in NoBits]: ResolvedRegister['BigIntType'] } /** @@ -156,7 +156,7 @@ export type AbiParameterToPrimitiveType< : // 4. If type is not basic, tuple, or array, we don't know what the type is. // This can happen when a fixed-length array is out of range (`Size` doesn't exist in `SolidityFixedArraySizeLookup`), // the array has depth greater than `Config['ArrayMaxDepth']`, etc. - ResolvedConfig['StrictAbiType'] extends true + ResolvedRegister['StrictAbiType'] extends true ? TAbiParameter['type'] extends infer TAbiType extends string ? Error<`Unknown type '${TAbiType}'.`> : never diff --git a/src/version.ts b/packages/abitype/src/version.ts similarity index 100% rename from src/version.ts rename to packages/abitype/src/version.ts diff --git a/src/zod.test-d.ts b/packages/abitype/src/zod.test-d.ts similarity index 99% rename from src/zod.test-d.ts rename to packages/abitype/src/zod.test-d.ts index e6072296..c13f607b 100644 --- a/src/zod.test-d.ts +++ b/packages/abitype/src/zod.test-d.ts @@ -1,3 +1,5 @@ +import { describe, expectTypeOf, test } from 'vitest' + import type { Abi, AbiConstructor, @@ -9,7 +11,7 @@ import { customSolidityErrorsAbi, ensRegistryWithFallbackAbi, erc20Abi, -} from './test/abis.js' +} from './abis/json.js' import { Abi as AbiSchema, AbiConstructor as AbiConstructorSchema, @@ -17,7 +19,6 @@ import { AbiEvent as AbiEventSchema, AbiParameter as AbiParameterSchema, } from './zod.js' -import { describe, expectTypeOf, test } from 'vitest' describe('Zod Types', () => { describe('Abi', () => { diff --git a/src/zod.test.ts b/packages/abitype/src/zod.test.ts similarity index 95% rename from src/zod.test.ts rename to packages/abitype/src/zod.test.ts index 4453fe84..165952e9 100644 --- a/src/zod.test.ts +++ b/packages/abitype/src/zod.test.ts @@ -1,6 +1,5 @@ import { describe, expect, it, test } from 'vitest' -import { zeroAddress } from './test.js' import { customSolidityErrorsAbi, ensAbi, @@ -10,7 +9,7 @@ import { wagmiMintExampleAbi, wethAbi, writingEditionsFactoryAbi, -} from './test/abis.js' +} from './abis/json.js' import { Abi, AbiConstructor, @@ -36,40 +35,6 @@ import { SolidityTuple, TypedData, } from './zod.js' -import * as Exports from './zod.js' - -it('should expose correct exports', () => { - expect(Object.keys(Exports)).toMatchInlineSnapshot(` - [ - "Address", - "SolidityAddress", - "SolidityBool", - "SolidityBytes", - "SolidityFunction", - "SolidityString", - "SolidityTuple", - "SolidityInt", - "SolidityArrayWithoutTuple", - "SolidityArrayWithTuple", - "SolidityArray", - "AbiParameter", - "AbiEventParameter", - "AbiStateMutability", - "AbiFunction", - "AbiConstructor", - "AbiFallback", - "AbiReceive", - "AbiEvent", - "AbiError", - "AbiItemType", - "Abi", - "TypedDataDomain", - "TypedDataType", - "TypedDataParameter", - "TypedData", - ] - `) -}) describe('AbiSchema', () => { it('returns valid schema', () => { @@ -696,9 +661,9 @@ test('AbiItemType', () => { }) test('AddressType', () => { - expect(Address.parse(zeroAddress)).toMatchInlineSnapshot( - '"0x0000000000000000000000000000000000000000"', - ) + expect( + Address.parse('0x0000000000000000000000000000000000000000'), + ).toMatchInlineSnapshot('"0x0000000000000000000000000000000000000000"') expect(() => Address.parse('0x')).toThrowErrorMatchingInlineSnapshot(` "[ { diff --git a/src/zod.ts b/packages/abitype/src/zod.ts similarity index 100% rename from src/zod.ts rename to packages/abitype/src/zod.ts diff --git a/test/setup.ts b/packages/abitype/test/setup.ts similarity index 65% rename from test/setup.ts rename to packages/abitype/test/setup.ts index dee77ffc..f59a0488 100644 --- a/test/setup.ts +++ b/packages/abitype/test/setup.ts @@ -1,7 +1,5 @@ import { vi } from 'vitest' vi.mock('../src/version.ts', () => { - return { - version: 'x.y.z', - } + return { version: 'x.y.z' } }) diff --git a/packages/abitype/tsconfig.build.json b/packages/abitype/tsconfig.build.json new file mode 100644 index 00000000..6adddf67 --- /dev/null +++ b/packages/abitype/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src/**/*.ts"], + "exclude": ["src/**/*.bench.ts", "src/**/*.test.ts", "src/**/*.test-d.ts"], + "compilerOptions": { + "sourceMap": true + } +} diff --git a/packages/abitype/tsconfig.json b/packages/abitype/tsconfig.json new file mode 100644 index 00000000..eda8d474 --- /dev/null +++ b/packages/abitype/tsconfig.json @@ -0,0 +1,6 @@ +{ + // This configuration is used for local development and type checking. + "extends": "./tsconfig.build.json", + "include": ["src/**/*.ts", "test/**/*.ts"], + "exclude": [] +} diff --git a/packages/register-tests/default/package.json b/packages/register-tests/default/package.json new file mode 100644 index 00000000..74e93966 --- /dev/null +++ b/packages/register-tests/default/package.json @@ -0,0 +1,11 @@ +{ + "name": "default-register", + "private": true, + "type": "module", + "scripts": { + "typecheck": "tsc --noEmit" + }, + "dependencies": { + "abitype": "workspace:*" + } +} diff --git a/packages/register-tests/default/src/address.test-d.ts b/packages/register-tests/default/src/address.test-d.ts new file mode 100644 index 00000000..87c3eaba --- /dev/null +++ b/packages/register-tests/default/src/address.test-d.ts @@ -0,0 +1,8 @@ +import { type Address } from 'abitype' +import { expectTypeOf, test } from 'vitest' + +test('default', async () => { + expectTypeOf
().toEqualTypeOf< + `0x${string}` & { _tag: 'AddressType' } + >() +}) diff --git a/packages/register-tests/default/src/register.ts b/packages/register-tests/default/src/register.ts new file mode 100644 index 00000000..52b81046 --- /dev/null +++ b/packages/register-tests/default/src/register.ts @@ -0,0 +1,5 @@ +declare module 'abitype' { + interface Register { + AddressType: `0x${string}` & { _tag: 'AddressType' } + } +} diff --git a/packages/register-tests/default/tsconfig.json b/packages/register-tests/default/tsconfig.json new file mode 100644 index 00000000..77a211db --- /dev/null +++ b/packages/register-tests/default/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig.base.json", + "include": ["src/**/*.ts"], + "exclude": [] +} diff --git a/playground/package.json b/playground/package.json deleted file mode 100644 index 90ff996f..00000000 --- a/playground/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "playground", - "private": true, - "type": "module", - "devDependencies": { - "abitype": "workspace:*" - } -} diff --git a/playground/trace.ts b/playground/trace.ts deleted file mode 100644 index 9c3b4073..00000000 --- a/playground/trace.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { parseAbi } from 'abitype' -import { seaportHumanReadableAbi } from 'abitype/test' - -import { read } from '../examples/read.js' - -// open trace in https://ui.perfetto.dev -const result = read({ - abi: parseAbi(seaportHumanReadableAbi), - functionName: 'getOrderStatus', - args: ['0x'], -}) -result diff --git a/playground/tsconfig.json b/playground/tsconfig.json deleted file mode 100644 index 127cf4f9..00000000 --- a/playground/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../tsconfig.base.json", - "compilerOptions": { - "moduleResolution": "bundler", - "baseUrl": ".", - "paths": { - "abitype": ["../src"], - "abitype/*": ["../src/*"] - } - }, - "include": ["trace.ts"], - "exclude": [], -} - diff --git a/playgrounds/functions/package.json b/playgrounds/functions/package.json new file mode 100644 index 00000000..f1006691 --- /dev/null +++ b/playgrounds/functions/package.json @@ -0,0 +1,11 @@ +{ + "name": "functions", + "private": true, + "type": "module", + "scripts": { + "typecheck": "tsc --noEmit" + }, + "dependencies": { + "abitype": "workspace:*" + } +} diff --git a/examples/read.test-d.ts b/playgrounds/functions/src/read.test-d.ts similarity index 94% rename from examples/read.test-d.ts rename to playgrounds/functions/src/read.test-d.ts index 69df7bce..34dc82fa 100644 --- a/examples/read.test-d.ts +++ b/playgrounds/functions/src/read.test-d.ts @@ -1,10 +1,10 @@ -import type { Abi, Address, ResolvedConfig } from 'abitype' +import type { Abi, Address, ResolvedRegister } from 'abitype' import { parseAbi } from 'abitype' import { wagmiMintExampleAbi, wagmiMintExampleHumanReadableAbi, writingEditionsFactoryAbi, -} from 'abitype/test' +} from 'abitype/abis' import { assertType, expectTypeOf, test } from 'vitest' import { read, readWagmiMintExample, useRead } from './read.js' @@ -62,7 +62,7 @@ test('read', () => { functionName: 'balanceOf', args: ['0x'], }) - assertType(result) + assertType(result) }) }) @@ -246,15 +246,3 @@ expectTypeOf( args: [123n, '0x'], }), ).toEqualTypeOf() - -const abi2 = parseAbi([ - 'function foo(address) view returns (uint)', - // 'function foo(address) view returns (string)', -]) -const res = read({ - abi: abi2, - functionName: 'foo', - args: ['0x'], -}) -res -// ^? diff --git a/examples/read.ts b/playgrounds/functions/src/read.ts similarity index 96% rename from examples/read.ts rename to playgrounds/functions/src/read.ts index 97a881ff..925b0f09 100644 --- a/examples/read.ts +++ b/playgrounds/functions/src/read.ts @@ -1,5 +1,5 @@ import { type Abi } from 'abitype' -import type { wagmiMintExampleAbi } from 'abitype/test' +import type { wagmiMintExampleAbi } from 'abitype/abis' import type { ContractParameters, diff --git a/examples/reads.test-d.ts b/playgrounds/functions/src/reads.test-d.ts similarity index 82% rename from examples/reads.test-d.ts rename to playgrounds/functions/src/reads.test-d.ts index 3947c2e2..99156c20 100644 --- a/examples/reads.test-d.ts +++ b/playgrounds/functions/src/reads.test-d.ts @@ -1,11 +1,10 @@ -import { type Address, type ResolvedConfig, parseAbi } from 'abitype' +import { type Address, type ResolvedRegister, parseAbi } from 'abitype' import { nestedTupleArrayAbi, nounsAuctionHouseAbi, wagmiMintExampleAbi, writingEditionsFactoryAbi, - zeroAddress, -} from 'abitype/test' +} from 'abitype/abis' import { assertType, expectTypeOf, test } from 'vitest' import { reads, useReads } from './reads.js' @@ -28,11 +27,11 @@ test('args', () => { [ string, readonly [ - ResolvedConfig['BigIntType'], - ResolvedConfig['BigIntType'], - ResolvedConfig['BigIntType'], - ResolvedConfig['BigIntType'], - ResolvedConfig['AddressType'], + ResolvedRegister['BigIntType'], + ResolvedRegister['BigIntType'], + ResolvedRegister['BigIntType'], + ResolvedRegister['BigIntType'], + ResolvedRegister['AddressType'], boolean, ], ] @@ -45,7 +44,7 @@ test('args', () => { { abi: wagmiMintExampleAbi, functionName: 'balanceOf', - args: [zeroAddress], + args: ['0x'], }, { abi: wagmiMintExampleAbi, @@ -54,9 +53,9 @@ test('args', () => { }, ], }) - assertType<[ResolvedConfig['BigIntType'], ResolvedConfig['AddressType']]>( - result, - ) + assertType< + [ResolvedRegister['BigIntType'], ResolvedRegister['AddressType']] + >(result) }) test('Read bytes input types', () => { @@ -92,7 +91,7 @@ test('args', () => { abi: writingEditionsFactoryAbi, functionName: 'getSalt', args: [ - zeroAddress, + '0x', { name: 'Test', symbol: '$TEST', @@ -101,8 +100,8 @@ test('args', () => { contentURI: 'arweave://digest', price: 0.1, limit: 100n, - fundingRecipient: zeroAddress, - renderer: zeroAddress, + fundingRecipient: '0x', + renderer: '0x', nonce: 123n, fee: 0, }, @@ -110,7 +109,7 @@ test('args', () => { }, ], }) - assertType<[void, ResolvedConfig['BytesType']['outputs']]>(result) + assertType<[void, ResolvedRegister['BytesType']['outputs']]>(result) }) }) @@ -139,7 +138,7 @@ test('behavior', () => { { abi: writingEditionsFactoryAbi, functionName: 'predictDeterministicAddress', - args: [zeroAddress, zeroAddress], + args: ['0x', '0x'], }, { abi: [ @@ -156,7 +155,7 @@ test('behavior', () => { }, ], functionName: 'balanceOf', - args: [[zeroAddress], [zeroAddress], 1n], + args: [['0x'], ['0x'], 1n], }, ], }) @@ -224,19 +223,3 @@ const res2 = useReads({ ], }) expectTypeOf(res2).toEqualTypeOf<[readonly [Address, number], boolean]>() - -const abi2 = parseAbi([ - 'function foo(address) view returns (uint)', - // 'function foo(address) view returns (string)', -]) -const res_ = useReads({ - contracts: [ - { - abi: abi2, - functionName: 'foo', - args: ['0x'], - }, - ], -}) -res_ -// ^? diff --git a/examples/reads.ts b/playgrounds/functions/src/reads.ts similarity index 100% rename from examples/reads.ts rename to playgrounds/functions/src/reads.ts diff --git a/examples/signTypedData.test-d.ts b/playgrounds/functions/src/signTypedData.test-d.ts similarity index 100% rename from examples/signTypedData.test-d.ts rename to playgrounds/functions/src/signTypedData.test-d.ts diff --git a/examples/signTypedData.ts b/playgrounds/functions/src/signTypedData.ts similarity index 91% rename from examples/signTypedData.ts rename to playgrounds/functions/src/signTypedData.ts index 4f0c2b3d..20dd4967 100644 --- a/examples/signTypedData.ts +++ b/playgrounds/functions/src/signTypedData.ts @@ -1,5 +1,5 @@ import type { - ResolvedConfig, + ResolvedRegister, TypedData, TypedDataDomain, TypedDataToPrimitiveTypes, @@ -33,4 +33,4 @@ export type SignTypedDataParameters< : message } -export type SignTypedDataReturnType = ResolvedConfig['BytesType']['outputs'] +export type SignTypedDataReturnType = ResolvedRegister['BytesType']['outputs'] diff --git a/examples/types.ts b/playgrounds/functions/src/types.ts similarity index 95% rename from examples/types.ts rename to playgrounds/functions/src/types.ts index 38c36dbc..0d3a6d4f 100644 --- a/examples/types.ts +++ b/playgrounds/functions/src/types.ts @@ -7,7 +7,7 @@ import { type Address, type ExtractAbiFunction, type ExtractAbiFunctionNames, - type ResolvedConfig, + type ResolvedRegister, } from 'abitype' export type ContractParameters< @@ -134,14 +134,14 @@ type MaybePartialBy = TKeys extends keyof TType type ReadonlyWiden = | (TType extends Function ? TType : never) - | (TType extends ResolvedConfig['BigIntType'] ? bigint : never) + | (TType extends ResolvedRegister['BigIntType'] ? bigint : never) | (TType extends boolean ? boolean : never) - | (TType extends ResolvedConfig['IntType'] ? number : never) + | (TType extends ResolvedRegister['IntType'] ? number : never) | (TType extends string ? TType extends Address ? Address - : TType extends ResolvedConfig['BytesType']['inputs'] - ? ResolvedConfig['BytesType'] + : TType extends ResolvedRegister['BytesType']['inputs'] + ? ResolvedRegister['BytesType'] : string : never) | (TType extends readonly [] ? readonly [] : never) diff --git a/examples/watchEvent.test-d.ts b/playgrounds/functions/src/watchEvent.test-d.ts similarity index 88% rename from examples/watchEvent.test-d.ts rename to playgrounds/functions/src/watchEvent.test-d.ts index 76df50b9..abd0017b 100644 --- a/examples/watchEvent.test-d.ts +++ b/playgrounds/functions/src/watchEvent.test-d.ts @@ -1,5 +1,5 @@ -import type { Abi, ResolvedConfig } from 'abitype' -import { wagmiMintExampleAbi, writingEditionsFactoryAbi } from 'abitype/test' +import type { Abi, ResolvedRegister } from 'abitype' +import { wagmiMintExampleAbi, writingEditionsFactoryAbi } from 'abitype/abis' import { assertType, test } from 'vitest' import { watchEvent } from './watchEvent.js' @@ -43,9 +43,9 @@ test('args', () => { abi: wagmiMintExampleAbi, eventName: 'Transfer', onEmit(from, to, tokenId) { - assertType(from) - assertType(to) - assertType(tokenId) + assertType(from) + assertType(to) + assertType(tokenId) }, }) }) @@ -118,7 +118,7 @@ test('behavior', () => { ], eventName: 'Foo', onEmit(name) { - assertType(name) + assertType(name) }, }) }) diff --git a/examples/watchEvent.ts b/playgrounds/functions/src/watchEvent.ts similarity index 100% rename from examples/watchEvent.ts rename to playgrounds/functions/src/watchEvent.ts diff --git a/examples/write.test-d.ts b/playgrounds/functions/src/write.test-d.ts similarity index 86% rename from examples/write.test-d.ts rename to playgrounds/functions/src/write.test-d.ts index 14dd30e0..e371b0b4 100644 --- a/examples/write.test-d.ts +++ b/playgrounds/functions/src/write.test-d.ts @@ -1,4 +1,4 @@ -import type { Abi, ResolvedConfig } from 'abitype' +import type { Abi, ResolvedRegister } from 'abitype' import { parseAbi } from 'abitype' import { ensRegistryWithFallbackAbi, @@ -7,8 +7,7 @@ import { wagmiMintExampleAbi, wagmiMintExampleHumanReadableAbi, writingEditionsFactoryAbi, - zeroAddress, -} from 'abitype/test' +} from 'abitype/abis' import { assertType, test } from 'vitest' import { write } from './write.js' @@ -35,12 +34,12 @@ test('args', () => { const result1 = write({ abi: wagmiMintExampleAbi, functionName: 'approve', - args: [zeroAddress, 123n], + args: ['0x', 123n], }) const result2 = write({ abi: wagmiMintExampleAbi, functionName: 'transferFrom', - args: [zeroAddress, zeroAddress, 123n], + args: ['0x', '0x', 123n], }) assertType(result1) assertType(result2) @@ -59,14 +58,14 @@ test('args', () => { contentURI: 'arweave://digest', price: 0.1, limit: 100n, - fundingRecipient: zeroAddress, - renderer: zeroAddress, + fundingRecipient: '0x', + renderer: '0x', nonce: 123n, fee: 0, }, ], }) - assertType(result) + assertType(result) write({ abi: parseAbi([ @@ -98,9 +97,9 @@ test('return types', () => { const result = write({ abi: ensRegistryWithFallbackAbi, functionName: 'setSubnodeOwner', - args: ['0xfoo', '0xbar', zeroAddress], + args: ['0xfoo', '0xbar', '0x'], }) - assertType(result) + assertType(result) }) test('tuple', () => { @@ -126,7 +125,7 @@ test('return types', () => { type Output = { name: string symbol: string - fundingRecipient: ResolvedConfig['AddressType'] + fundingRecipient: ResolvedRegister['AddressType'] } const result = write({ abi, @@ -143,8 +142,8 @@ test('return types', () => { }) assertType< readonly { - x: ResolvedConfig['BigIntType'] - y: ResolvedConfig['BigIntType'] + x: ResolvedRegister['BigIntType'] + y: ResolvedRegister['BigIntType'] }[] >(result) }) @@ -164,14 +163,14 @@ test('behavior', () => { const result1 = write({ abi: wagmiMintExampleAbi, functionName: 'safeTransferFrom', - args: [zeroAddress, zeroAddress, 123n], + args: ['0x', '0x', 123n], }) assertType(result1) const result2 = write({ abi: wagmiMintExampleAbi, functionName: 'safeTransferFrom', - args: [zeroAddress, zeroAddress, 123n, '0xfoo'], + args: ['0x', '0x', 123n, '0xfoo'], }) assertType(result2) }) @@ -226,14 +225,14 @@ test('behavior', () => { functionName: 'foo', args: ['bar'], }) - assertType(result) + assertType(result) }) test('human readable', () => { const result = write({ abi: parseAbi(wagmiMintExampleHumanReadableAbi), functionName: 'safeTransferFrom', - args: [zeroAddress, zeroAddress, 123n], + args: ['0x', '0x', 123n], }) assertType(result) }) diff --git a/examples/write.ts b/playgrounds/functions/src/write.ts similarity index 100% rename from examples/write.ts rename to playgrounds/functions/src/write.ts diff --git a/playgrounds/functions/tsconfig.json b/playgrounds/functions/tsconfig.json new file mode 100644 index 00000000..373242ec --- /dev/null +++ b/playgrounds/functions/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src/**/*.ts"], + "exclude": [] +} diff --git a/playgrounds/performance/index.ts b/playgrounds/performance/index.ts new file mode 100644 index 00000000..2dd6ac3d --- /dev/null +++ b/playgrounds/performance/index.ts @@ -0,0 +1,6 @@ +import { parseAbi } from 'abitype' +import { seaportHumanReadableAbi } from 'abitype/abis' + +// open `out/trace.json` in https://ui.perfetto.dev +const result = parseAbi(seaportHumanReadableAbi) +result[0] diff --git a/examples/package.json b/playgrounds/performance/package.json similarity index 79% rename from examples/package.json rename to playgrounds/performance/package.json index 53a3cd8e..70f0029f 100644 --- a/examples/package.json +++ b/playgrounds/performance/package.json @@ -1,5 +1,5 @@ { - "name": "examples", + "name": "performance", "private": true, "type": "module", "devDependencies": { diff --git a/playgrounds/performance/tsconfig.json b/playgrounds/performance/tsconfig.json new file mode 100644 index 00000000..59e94f48 --- /dev/null +++ b/playgrounds/performance/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "moduleResolution": "NodeNext", + "baseUrl": ".", + "paths": { + "abitype": ["../../packages/abitype/src"], + "abitype/*": ["../../packages/abitype/src/*"] + } + }, + "include": ["index.ts"], + "exclude": [] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b1514fc..8154c8dd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,5 +1,9 @@ lockfileVersion: '6.0' +settings: + autoInstallPeers: false + excludeLinksFromLockfile: false + overrides: remark-shiki-twoslash>shiki: ^0.14.1 shiki-twoslash>shiki: ^0.14.1 @@ -8,39 +12,36 @@ importers: .: devDependencies: + '@biomejs/biome': + specifier: 1.2.2 + version: 1.2.2 '@changesets/changelog-github': specifier: ^0.4.8 version: 0.4.8 '@changesets/cli': specifier: ^2.26.0 version: 2.26.1 - '@ethersproject/abi': - specifier: ^5.7.0 - version: 5.7.0 - '@types/fs-extra': - specifier: ^11.0.1 - version: 11.0.1 - '@types/node': - specifier: 18.16.3 - version: 18.16.3 - '@vitest/coverage-c8': - specifier: ^0.30.1 - version: 0.30.1(vitest@0.30.1) + '@vitest/coverage-v8': + specifier: 0.34.5 + version: 0.34.5(vitest@0.34.5) bun: - specifier: ^0.5.7 - version: 0.5.9 - ethers: - specifier: ^6.5.1 - version: 6.5.1 - fs-extra: - specifier: ^11.1.0 - version: 11.1.1 + specifier: 1.0.1 + version: 1.0.1 + bun-types: + specifier: ^1.0.3 + version: 1.0.4 + glob: + specifier: ^10.3.10 + version: 10.3.10 + knip: + specifier: ^2.29.0 + version: 2.30.1 + publint: + specifier: ^0.2.2 + version: 0.2.3 rimraf: specifier: ^5.0.1 version: 5.0.1 - rome: - specifier: ^12.1.3 - version: 12.1.3 simple-git-hooks: specifier: ^2.8.1 version: 2.8.1 @@ -50,12 +51,12 @@ importers: typescript@5.1.3: specifier: npm:typescript@5.1.3 version: /typescript@5.1.3 + typescript@5.2.2: + specifier: npm:typescript@5.2.2 + version: /typescript@5.2.2 vitest: - specifier: ^0.30.1 - version: 0.30.1 - zod: - specifier: ^3.22.4 - version: 3.22.4 + specifier: 0.34.5 + version: 0.34.5 docs: devDependencies: @@ -67,34 +68,55 @@ importers: version: 3.0.0 abitype: specifier: workspace:* - version: link:.. + version: link:../packages/abitype ethers: specifier: ^6.5.1 version: 6.5.1 markdown-it-footnote: specifier: ^3.0.3 version: 3.0.3 + vite: + specifier: ^4.4.9 + version: 4.4.11(@types/node@18.16.3) vitepress: - specifier: 1.0.0-beta.1 - version: 1.0.0-beta.1(@types/node@18.16.3)(search-insights@2.6.0) + specifier: 1.0.0-rc.20 + version: 1.0.0-rc.20 vitepress-plugin-shiki-twoslash: - specifier: 0.0.6 - version: 0.0.6(typescript@5.0.4)(vitepress@1.0.0-beta.1) + specifier: ^0.0.6 + version: 0.0.6(typescript@5.0.4)(vitepress@1.0.0-rc.20) vue: specifier: ^3.3.4 version: 3.3.4 - examples: + packages/abitype: devDependencies: + '@ethersproject/abi': + specifier: ^5.7.0 + version: 5.7.0 + ethers: + specifier: ^6.5.1 + version: 6.5.1 + zod: + specifier: ^3.22.4 + version: 3.22.4 + + packages/register-tests/default: + dependencies: + abitype: + specifier: workspace:* + version: link:../../abitype + + playgrounds/functions: + dependencies: abitype: specifier: workspace:* - version: link:.. + version: link:../../packages/abitype - playground: + playgrounds/performance: devDependencies: abitype: specifier: workspace:* - version: link:.. + version: link:../../packages/abitype packages: @@ -102,31 +124,33 @@ packages: resolution: {integrity: sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg==} dev: true - /@algolia/autocomplete-core@1.9.2(algoliasearch@4.17.0)(search-insights@2.6.0): - resolution: {integrity: sha512-hkG80c9kx9ClVAEcUJbTd2ziVC713x9Bji9Ty4XJfKXlxlsx3iXsoNhAwfeR4ulzIUg7OE5gez0UU1zVDdG7kg==} + /@algolia/autocomplete-core@1.9.3(algoliasearch@4.20.0): + resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.9.2(algoliasearch@4.17.0)(search-insights@2.6.0) - '@algolia/autocomplete-shared': 1.9.2(algoliasearch@4.17.0) + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(algoliasearch@4.20.0) + '@algolia/autocomplete-shared': 1.9.3(algoliasearch@4.20.0) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights dev: true - /@algolia/autocomplete-plugin-algolia-insights@1.9.2(algoliasearch@4.17.0)(search-insights@2.6.0): - resolution: {integrity: sha512-2LVsf4W66hVHQ3Ua/8k15oPlxjELCztbAkQm/hP42Sw+GLkHAdY1vaVRYziaWq64+Oljfg6FKkZHCdgXH+CGIA==} + /@algolia/autocomplete-plugin-algolia-insights@1.9.3(algoliasearch@4.20.0): + resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} peerDependencies: search-insights: '>= 1 < 3' + peerDependenciesMeta: + search-insights: + optional: true dependencies: - '@algolia/autocomplete-shared': 1.9.2(algoliasearch@4.17.0) - search-insights: 2.6.0 + '@algolia/autocomplete-shared': 1.9.3(algoliasearch@4.20.0) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch dev: true - /@algolia/autocomplete-preset-algolia@1.9.2(algoliasearch@4.17.0): - resolution: {integrity: sha512-pqgIm2GNqtCT59Y1ICctIPrYTi34+wNPiNWEclD/yDzp5uDUUsyGe5XrUjCNyQRTKonAlmYxoaEHOn8FWgmBHA==} + /@algolia/autocomplete-preset-algolia@1.9.3(algoliasearch@4.20.0): + resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' @@ -134,12 +158,12 @@ packages: '@algolia/client-search': optional: true dependencies: - '@algolia/autocomplete-shared': 1.9.2(algoliasearch@4.17.0) - algoliasearch: 4.17.0 + '@algolia/autocomplete-shared': 1.9.3(algoliasearch@4.20.0) + algoliasearch: 4.20.0 dev: true - /@algolia/autocomplete-shared@1.9.2(algoliasearch@4.17.0): - resolution: {integrity: sha512-XxX6YDn+7LG+SmdpXEOnj7fc3TjiVpQ0CbGhjLwrd2tYr6LVY2D4Iiu/iuYJ4shvVDWWnpwArSk0uIWC/8OPUA==} + /@algolia/autocomplete-shared@1.9.3(algoliasearch@4.20.0): + resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' @@ -147,97 +171,105 @@ packages: '@algolia/client-search': optional: true dependencies: - algoliasearch: 4.17.0 + algoliasearch: 4.20.0 dev: true - /@algolia/cache-browser-local-storage@4.17.0: - resolution: {integrity: sha512-myRSRZDIMYB8uCkO+lb40YKiYHi0fjpWRtJpR/dgkaiBlSD0plRyB6lLOh1XIfmMcSeBOqDE7y9m8xZMrXYfyQ==} + /@algolia/cache-browser-local-storage@4.20.0: + resolution: {integrity: sha512-uujahcBt4DxduBTvYdwO3sBfHuJvJokiC3BP1+O70fglmE1ShkH8lpXqZBac1rrU3FnNYSUs4pL9lBdTKeRPOQ==} dependencies: - '@algolia/cache-common': 4.17.0 + '@algolia/cache-common': 4.20.0 dev: true - /@algolia/cache-common@4.17.0: - resolution: {integrity: sha512-g8mXzkrcUBIPZaulAuqE7xyHhLAYAcF2xSch7d9dABheybaU3U91LjBX6eJTEB7XVhEsgK4Smi27vWtAJRhIKQ==} + /@algolia/cache-common@4.20.0: + resolution: {integrity: sha512-vCfxauaZutL3NImzB2G9LjLt36vKAckc6DhMp05An14kVo8F1Yofb6SIl6U3SaEz8pG2QOB9ptwM5c+zGevwIQ==} dev: true - /@algolia/cache-in-memory@4.17.0: - resolution: {integrity: sha512-PT32ciC/xI8z919d0oknWVu3kMfTlhQn3MKxDln3pkn+yA7F7xrxSALysxquv+MhFfNAcrtQ/oVvQVBAQSHtdw==} + /@algolia/cache-in-memory@4.20.0: + resolution: {integrity: sha512-Wm9ak/IaacAZXS4mB3+qF/KCoVSBV6aLgIGFEtQtJwjv64g4ePMapORGmCyulCFwfePaRAtcaTbMcJF+voc/bg==} dependencies: - '@algolia/cache-common': 4.17.0 + '@algolia/cache-common': 4.20.0 dev: true - /@algolia/client-account@4.17.0: - resolution: {integrity: sha512-sSEHx9GA6m7wrlsSMNBGfyzlIfDT2fkz2u7jqfCCd6JEEwmxt8emGmxAU/0qBfbhRSuGvzojoLJlr83BSZAKjA==} + /@algolia/client-account@4.20.0: + resolution: {integrity: sha512-GGToLQvrwo7am4zVkZTnKa72pheQeez/16sURDWm7Seyz+HUxKi3BM6fthVVPUEBhtJ0reyVtuK9ArmnaKl10Q==} dependencies: - '@algolia/client-common': 4.17.0 - '@algolia/client-search': 4.17.0 - '@algolia/transporter': 4.17.0 + '@algolia/client-common': 4.20.0 + '@algolia/client-search': 4.20.0 + '@algolia/transporter': 4.20.0 dev: true - /@algolia/client-analytics@4.17.0: - resolution: {integrity: sha512-84ooP8QA3mQ958hQ9wozk7hFUbAO+81CX1CjAuerxBqjKIInh1fOhXKTaku05O/GHBvcfExpPLIQuSuLYziBXQ==} + /@algolia/client-analytics@4.20.0: + resolution: {integrity: sha512-EIr+PdFMOallRdBTHHdKI3CstslgLORQG7844Mq84ib5oVFRVASuuPmG4bXBgiDbcsMLUeOC6zRVJhv1KWI0ug==} dependencies: - '@algolia/client-common': 4.17.0 - '@algolia/client-search': 4.17.0 - '@algolia/requester-common': 4.17.0 - '@algolia/transporter': 4.17.0 + '@algolia/client-common': 4.20.0 + '@algolia/client-search': 4.20.0 + '@algolia/requester-common': 4.20.0 + '@algolia/transporter': 4.20.0 dev: true - /@algolia/client-common@4.17.0: - resolution: {integrity: sha512-jHMks0ZFicf8nRDn6ma8DNNsdwGgP/NKiAAL9z6rS7CymJ7L0+QqTJl3rYxRW7TmBhsUH40wqzmrG6aMIN/DrQ==} + /@algolia/client-common@4.20.0: + resolution: {integrity: sha512-P3WgMdEss915p+knMMSd/fwiHRHKvDu4DYRrCRaBrsfFw7EQHon+EbRSm4QisS9NYdxbS04kcvNoavVGthyfqQ==} dependencies: - '@algolia/requester-common': 4.17.0 - '@algolia/transporter': 4.17.0 + '@algolia/requester-common': 4.20.0 + '@algolia/transporter': 4.20.0 dev: true - /@algolia/client-personalization@4.17.0: - resolution: {integrity: sha512-RMzN4dZLIta1YuwT7QC9o+OeGz2cU6eTOlGNE/6RcUBLOU3l9tkCOdln5dPE2jp8GZXPl2yk54b2nSs1+pAjqw==} + /@algolia/client-personalization@4.20.0: + resolution: {integrity: sha512-N9+zx0tWOQsLc3K4PVRDV8GUeOLAY0i445En79Pr3zWB+m67V+n/8w4Kw1C5LlbHDDJcyhMMIlqezh6BEk7xAQ==} dependencies: - '@algolia/client-common': 4.17.0 - '@algolia/requester-common': 4.17.0 - '@algolia/transporter': 4.17.0 + '@algolia/client-common': 4.20.0 + '@algolia/requester-common': 4.20.0 + '@algolia/transporter': 4.20.0 dev: true - /@algolia/client-search@4.17.0: - resolution: {integrity: sha512-x4P2wKrrRIXszT8gb7eWsMHNNHAJs0wE7/uqbufm4tZenAp+hwU/hq5KVsY50v+PfwM0LcDwwn/1DroujsTFoA==} + /@algolia/client-search@4.20.0: + resolution: {integrity: sha512-zgwqnMvhWLdpzKTpd3sGmMlr4c+iS7eyyLGiaO51zDZWGMkpgoNVmltkzdBwxOVXz0RsFMznIxB9zuarUv4TZg==} dependencies: - '@algolia/client-common': 4.17.0 - '@algolia/requester-common': 4.17.0 - '@algolia/transporter': 4.17.0 + '@algolia/client-common': 4.20.0 + '@algolia/requester-common': 4.20.0 + '@algolia/transporter': 4.20.0 dev: true - /@algolia/logger-common@4.17.0: - resolution: {integrity: sha512-DGuoZqpTmIKJFDeyAJ7M8E/LOenIjWiOsg1XJ1OqAU/eofp49JfqXxbfgctlVZVmDABIyOz8LqEoJ6ZP4DTyvw==} + /@algolia/logger-common@4.20.0: + resolution: {integrity: sha512-xouigCMB5WJYEwvoWW5XDv7Z9f0A8VoXJc3VKwlHJw/je+3p2RcDXfksLI4G4lIVncFUYMZx30tP/rsdlvvzHQ==} dev: true - /@algolia/logger-console@4.17.0: - resolution: {integrity: sha512-zMPvugQV/gbXUvWBCzihw6m7oxIKp48w37QBIUu/XqQQfxhjoOE9xyfJr1KldUt5FrYOKZJVsJaEjTsu+bIgQg==} + /@algolia/logger-console@4.20.0: + resolution: {integrity: sha512-THlIGG1g/FS63z0StQqDhT6bprUczBI8wnLT3JWvfAQDZX5P6fCg7dG+pIrUBpDIHGszgkqYEqECaKKsdNKOUA==} dependencies: - '@algolia/logger-common': 4.17.0 + '@algolia/logger-common': 4.20.0 dev: true - /@algolia/requester-browser-xhr@4.17.0: - resolution: {integrity: sha512-aSOX/smauyTkP21Pf52pJ1O2LmNFJ5iHRIzEeTh0mwBeADO4GdG94cAWDILFA9rNblq/nK3EDh3+UyHHjplZ1A==} + /@algolia/requester-browser-xhr@4.20.0: + resolution: {integrity: sha512-HbzoSjcjuUmYOkcHECkVTwAelmvTlgs48N6Owt4FnTOQdwn0b8pdht9eMgishvk8+F8bal354nhx/xOoTfwiAw==} dependencies: - '@algolia/requester-common': 4.17.0 + '@algolia/requester-common': 4.20.0 dev: true - /@algolia/requester-common@4.17.0: - resolution: {integrity: sha512-XJjmWFEUlHu0ijvcHBoixuXfEoiRUdyzQM6YwTuB8usJNIgShua8ouFlRWF8iCeag0vZZiUm4S2WCVBPkdxFgg==} + /@algolia/requester-common@4.20.0: + resolution: {integrity: sha512-9h6ye6RY/BkfmeJp7Z8gyyeMrmmWsMOCRBXQDs4mZKKsyVlfIVICpcSibbeYcuUdurLhIlrOUkH3rQEgZzonng==} dev: true - /@algolia/requester-node-http@4.17.0: - resolution: {integrity: sha512-bpb/wDA1aC6WxxM8v7TsFspB7yBN3nqCGs2H1OADolQR/hiAIjAxusbuMxVbRFOdaUvAIqioIIkWvZdpYNIn8w==} + /@algolia/requester-node-http@4.20.0: + resolution: {integrity: sha512-ocJ66L60ABSSTRFnCHIEZpNHv6qTxsBwJEPfYaSBsLQodm0F9ptvalFkHMpvj5DfE22oZrcrLbOYM2bdPJRHng==} dependencies: - '@algolia/requester-common': 4.17.0 + '@algolia/requester-common': 4.20.0 dev: true - /@algolia/transporter@4.17.0: - resolution: {integrity: sha512-6xL6H6fe+Fi0AEP3ziSgC+G04RK37iRb4uUUqVAH9WPYFI8g+LYFq6iv5HS8Cbuc5TTut+Bwj6G+dh/asdb9uA==} + /@algolia/transporter@4.20.0: + resolution: {integrity: sha512-Lsii1pGWOAISbzeyuf+r/GPhvHMPHSPrTDWNcIzOE1SG1inlJHICaVe2ikuoRjcpgxZNU54Jl+if15SUCsaTUg==} + dependencies: + '@algolia/cache-common': 4.20.0 + '@algolia/logger-common': 4.20.0 + '@algolia/requester-common': 4.20.0 + dev: true + + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + engines: {node: '>=6.0.0'} dependencies: - '@algolia/cache-common': 4.17.0 - '@algolia/logger-common': 4.17.0 - '@algolia/requester-common': 4.17.0 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.18 dev: true /@babel/code-frame@7.21.4: @@ -299,6 +331,74 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true + /@biomejs/biome@1.2.2: + resolution: {integrity: sha512-fXwXi56ZdaKO/N3rTmhWw41UxstoviODk+wia4WWNSlm23r8xJ/NxjaZ88scV2IsmsFHqc8rmwb2dkrStAdIEw==} + engines: {node: '>=14.*'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.2.2 + '@biomejs/cli-darwin-x64': 1.2.2 + '@biomejs/cli-linux-arm64': 1.2.2 + '@biomejs/cli-linux-x64': 1.2.2 + '@biomejs/cli-win32-arm64': 1.2.2 + '@biomejs/cli-win32-x64': 1.2.2 + dev: true + + /@biomejs/cli-darwin-arm64@1.2.2: + resolution: {integrity: sha512-Fx1IURKhoqH6wPawtKLT6wcfMSjRRcNK8+VWau0iDOjXvNtjJpSmICbU89B7Vt/gZRwPqkfDMBkFwm6V5vFTSQ==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-darwin-x64@1.2.2: + resolution: {integrity: sha512-JNaAFOI/ZisnmzvcFNd73geJxaFaN2L4YsWM6cgBeKyLY/ycl9C/PBTFfEmeB1c7f5XIIal8P2cj47kLJpN5Ig==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-arm64@1.2.2: + resolution: {integrity: sha512-JHXRnfhOLx8UO/Fcyn2c5pFRri0XKqRZm2wf5oH5GSfLVpckDw2X15dYGbu3nmfM/3pcAaTV46pUpjrCnaAieg==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-linux-x64@1.2.2: + resolution: {integrity: sha512-5Zr+iM7lUKsw81p9PkXRESuH2/AhRZ6RCWkgE+FSLcxMhXy/4RDR+o2YQDsJM6cWKIzOJM05vDHTGrDq7vXE4A==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-win32-arm64@1.2.2: + resolution: {integrity: sha512-HvUcG2p++RvYP0zfOqh+DgiUUH+JI/uETr0kzWlOJ9F3lsG525pkywg4RSd4OvJd7Wpd3wt3UpN/A4IEJaVmbA==} + engines: {node: '>=14.*'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@biomejs/cli-win32-x64@1.2.2: + resolution: {integrity: sha512-bfaFJwqJ9ApFga2o88OaROSd3pasYRzRGXHJWAE9VUUKdSNSTYxHOqVrNvV54yYPtL6Kt9xkuZa4HNu9it3TaA==} + engines: {node: '>=14.*'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@changesets/apply-release-plan@6.1.3: resolution: {integrity: sha512-ECDNeoc3nfeAe1jqJb5aFQX7CqzQhD2klXRez2JDb/aVpGUbX673HgKrnrgJRuQR/9f2TtLoYIzrGB9qwD77mg==} dependencies: @@ -502,14 +602,14 @@ packages: prettier: 2.8.8 dev: true - /@docsearch/css@3.5.0: - resolution: {integrity: sha512-Ob5FQLubplcBNihAVtriR59FRBeP8u69F6mu4L4yIr60KfsPc10bOV0DoPErJw0zF9IBN2cNLW9qdmt8zWPxyg==} + /@docsearch/css@3.5.2: + resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} dev: true - /@docsearch/js@3.5.0(search-insights@2.6.0): - resolution: {integrity: sha512-WqB+z+zVKSXDkGq028nClT9RvMzfFlemZuIulX5ZwWkdUtl4k7M9cmZA/c6kuZf7FG24XQsMHWuBjeUo9hLRyA==} + /@docsearch/js@3.5.2: + resolution: {integrity: sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==} dependencies: - '@docsearch/react': 3.5.0(search-insights@2.6.0) + '@docsearch/react': 3.5.2 preact: 10.13.2 transitivePeerDependencies: - '@algolia/client-search' @@ -519,12 +619,13 @@ packages: - search-insights dev: true - /@docsearch/react@3.5.0(search-insights@2.6.0): - resolution: {integrity: sha512-3IG8mmSMzSHNGy2S1VuPyYU9tFCxFpj5Ov8SYwsSHM4yMvFsaO9oFxXocA5lSenliIELhuOuS5+BdxHa/Qlf2A==} + /@docsearch/react@3.5.2: + resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' react: '>= 16.8.0 < 19.0.0' react-dom: '>= 16.8.0 < 19.0.0' + search-insights: '>= 1 < 3' peerDependenciesMeta: '@types/react': optional: true @@ -532,18 +633,44 @@ packages: optional: true react-dom: optional: true + search-insights: + optional: true dependencies: - '@algolia/autocomplete-core': 1.9.2(algoliasearch@4.17.0)(search-insights@2.6.0) - '@algolia/autocomplete-preset-algolia': 1.9.2(algoliasearch@4.17.0) - '@docsearch/css': 3.5.0 - algoliasearch: 4.17.0 + '@algolia/autocomplete-core': 1.9.3(algoliasearch@4.20.0) + '@algolia/autocomplete-preset-algolia': 1.9.3(algoliasearch@4.20.0) + '@docsearch/css': 3.5.2 + algoliasearch: 4.20.0 transitivePeerDependencies: - '@algolia/client-search' - - search-insights dev: true - /@esbuild/android-arm64@0.17.18: - resolution: {integrity: sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==} + /@ericcornelissen/bash-parser@0.5.2: + resolution: {integrity: sha512-4pIMTa1nEFfMXitv7oaNEWOdM+zpOZavesa5GaiWTgda6Zk32CFGxjUp/iIaN0PwgUW1yTq/fztSjbpE8SLGZQ==} + engines: {node: '>=4'} + dependencies: + array-last: 1.3.0 + babylon: 6.18.0 + compose-function: 3.0.3 + deep-freeze: 0.0.1 + filter-iterator: 0.0.1 + filter-obj: 1.1.0 + has-own-property: 0.1.0 + identity-function: 1.0.0 + is-iterable: 1.1.1 + iterable-lookahead: 1.0.0 + lodash.curry: 4.1.1 + magic-string: 0.16.0 + map-obj: 2.0.0 + object-pairs: 0.1.0 + object-values: 1.0.0 + reverse-arguments: 1.0.0 + shell-quote-word: 1.0.1 + to-pascal-case: 1.0.0 + unescape-js: 1.1.4 + dev: true + + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -551,8 +678,8 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.17.18: - resolution: {integrity: sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==} + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -560,8 +687,8 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.17.18: - resolution: {integrity: sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==} + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -569,8 +696,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.17.18: - resolution: {integrity: sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==} + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -578,8 +705,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.17.18: - resolution: {integrity: sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==} + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -587,8 +714,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.17.18: - resolution: {integrity: sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==} + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -596,8 +723,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.17.18: - resolution: {integrity: sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==} + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -605,8 +732,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.17.18: - resolution: {integrity: sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==} + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -614,8 +741,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.17.18: - resolution: {integrity: sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==} + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -623,8 +750,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.17.18: - resolution: {integrity: sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==} + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -632,8 +759,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.17.18: - resolution: {integrity: sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==} + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -641,8 +768,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.17.18: - resolution: {integrity: sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==} + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -650,8 +777,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.17.18: - resolution: {integrity: sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==} + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -659,8 +786,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.17.18: - resolution: {integrity: sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==} + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -668,8 +795,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.17.18: - resolution: {integrity: sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==} + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -677,8 +804,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.17.18: - resolution: {integrity: sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==} + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -686,8 +813,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.17.18: - resolution: {integrity: sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==} + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -695,8 +822,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.17.18: - resolution: {integrity: sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==} + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -704,8 +831,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.17.18: - resolution: {integrity: sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==} + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -713,8 +840,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.17.18: - resolution: {integrity: sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==} + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -722,8 +849,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.17.18: - resolution: {integrity: sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==} + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -731,8 +858,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.17.18: - resolution: {integrity: sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==} + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -916,11 +1043,32 @@ packages: engines: {node: '>=8'} dev: true + /@jest/schemas@29.6.3: + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@sinclair/typebox': 0.27.8 + dev: true + + /@jridgewell/gen-mapping@0.3.3: + resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.18 + dev: true + /@jridgewell/resolve-uri@3.1.0: resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} dev: true + /@jridgewell/set-array@1.1.2: + resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} + engines: {node: '>=6.0.0'} + dev: true + /@jridgewell/sourcemap-codec@1.4.14: resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} dev: true @@ -985,48 +1133,63 @@ packages: fastq: 1.15.0 dev: true - /@oven/bun-darwin-aarch64@0.5.9: - resolution: {integrity: sha512-4AfiEln+yA5FzR1mEpcd8816ziq0rPT9IQOFMmGbtMLXvYRfWul3ywaquI7nl8c8RU3Lzu5Itlwirx65DKJ19A==} + /@npmcli/map-workspaces@3.0.4: + resolution: {integrity: sha512-Z0TbvXkRbacjFFLpVpV0e2mheCh+WzQpcqL+4xp49uNJOxOnIAPZyXtUxZ5Qn3QBTGKA11Exjd9a5411rBrhDg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + '@npmcli/name-from-folder': 2.0.0 + glob: 10.3.10 + minimatch: 9.0.1 + read-package-json-fast: 3.0.2 + dev: true + + /@npmcli/name-from-folder@2.0.0: + resolution: {integrity: sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /@oven/bun-darwin-aarch64@1.0.1: + resolution: {integrity: sha512-73YfDA7+ZRQc/U3d0bjeJVsvSg4UVOhOadlRsZtRN8OYew1fshx91DZnfNBGjLMQP0hG8bk5PxGWbKmqp7MsJg==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@oven/bun-darwin-x64-baseline@0.5.9: - resolution: {integrity: sha512-hhsUtMHor9h4fQozPOzSy82P0smT8xaFJouumJv6ekxngZ5Xa13BWfUJZsdTcB+pBsdMUC8V8MRfNFyfiZZiog==} + /@oven/bun-darwin-x64-baseline@1.0.1: + resolution: {integrity: sha512-p28kziO67RMjhCiWbao9iCFUJaxmbhfPzy4nNEve7nGXJVB4wMq9Hr+DNp1VYbEyt1auXowF2+u4v3zDlM/ILw==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@oven/bun-darwin-x64@0.5.9: - resolution: {integrity: sha512-YYYg9qIFcvwQqO4GKs7SkpOLCERxHUKpmrZ7yl0DWPAfZWm7xqoTOs1ceCgAUygkKZ9/eLcj5VD8qjhth4Ynyg==} + /@oven/bun-darwin-x64@1.0.1: + resolution: {integrity: sha512-hg638foFQdmo0+Jri6LAQhhpcbaE3Fb2youY1m/iFhVhH6Xuzt8izAgq30imT9qfd+FlcY8bRnjJN8uSGrvQrw==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@oven/bun-linux-aarch64@0.5.9: - resolution: {integrity: sha512-D0kZM+VDLhxPKXnczG3d2LlrzWp+bv6LIhjIC/2UTUNdipjO5tFHoCbsQvcPpg+hJYsj0We43pdFPbIC7cL+dg==} + /@oven/bun-linux-aarch64@1.0.1: + resolution: {integrity: sha512-XvjyARKiIWZ5RAHT3oZtjbZZGf/bJFCDAAJxM4mxMjZKqmulWb+erHyylcXDb0tmnJ2uGWDHio4lnN5PoDs7hg==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@oven/bun-linux-x64-baseline@0.5.9: - resolution: {integrity: sha512-HO4HMmOMRz7SWEUR4P+iZe3RHDgkrYkNmW1clKIddgrVNf3pS+lKOZBW/GcX2cjjHMRp6vcjPvOxa9oXfqLuVA==} + /@oven/bun-linux-x64-baseline@1.0.1: + resolution: {integrity: sha512-mwzDqoZnqwJXNsTN4q9FHnaPaTwFwRSCvxzkn8PqV2mKkOF4H+KUR/VZuZ18lYlixD7hCj1plbpx/B59pp293g==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@oven/bun-linux-x64@0.5.9: - resolution: {integrity: sha512-ORE/a3XpDZPZwL/2dvlkJOt3lBd637eonsluY49IcjhYci3eDXKA3S6A2x9H7MVTUhv8G7z6fDztRVh+W7Rz6A==} + /@oven/bun-linux-x64@1.0.1: + resolution: {integrity: sha512-ZVg0wd8px/j0fB61xGDR9vqmpjlWKglbjM7YZbp/OwDXRrEzLwZ+COMzauVCWojRiyWx9VQja1cjpfWBlKfF2g==} cpu: [x64] os: [linux] requiresBuild: true @@ -1040,53 +1203,19 @@ packages: dev: true optional: true - /@rometools/cli-darwin-arm64@12.1.3: - resolution: {integrity: sha512-AmFTUDYjBuEGQp/Wwps+2cqUr+qhR7gyXAUnkL5psCuNCz3807TrUq/ecOoct5MIavGJTH6R4aaSL6+f+VlBEg==} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@rometools/cli-darwin-x64@12.1.3: - resolution: {integrity: sha512-k8MbWna8q4LRlb005N2X+JS1UQ+s3ZLBBvwk4fP8TBxlAJXUz17jLLu/Fi+7DTTEmMhM84TWj4FDKW+rNar28g==} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@rometools/cli-linux-arm64@12.1.3: - resolution: {integrity: sha512-X/uLhJ2/FNA3nu5TiyeNPqiD3OZoFfNfRvw6a3ut0jEREPvEn72NI7WPijH/gxSz55znfQ7UQ6iM4DZumUknJg==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rometools/cli-linux-x64@12.1.3: - resolution: {integrity: sha512-csP17q1eWiUXx9z6Jr/JJPibkplyKIwiWPYNzvPCGE8pHlKhwZj3YHRuu7Dm/4EOqx0XFIuqqWZUYm9bkIC8xg==} - cpu: [x64] - os: [linux] - requiresBuild: true + /@sinclair/typebox@0.27.8: + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - optional: true - /@rometools/cli-win32-arm64@12.1.3: - resolution: {integrity: sha512-RymHWeod57EBOJY4P636CgUwYA6BQdkQjh56XKk4pLEHO6X1bFyMet2XL7KlHw5qOTalzuzf5jJqUs+vf3jdXQ==} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@rometools/cli-win32-x64@12.1.3: - resolution: {integrity: sha512-yHSKYidqJMV9nADqg78GYA+cZ0hS1twANAjiFibQdXj9aGzD+s/IzIFEIi/U/OBLvWYg/SCw0QVozi2vTlKFDQ==} - cpu: [x64] - os: [win32] - requiresBuild: true + /@snyk/github-codeowners@1.1.0: + resolution: {integrity: sha512-lGFf08pbkEac0NYgVf4hdANpAgApRjNByLXB+WBip3qj1iendOIyAwP2GKkKbQMNVy2r1xxDf0ssfWscoiC+Vw==} + engines: {node: '>=8.10'} + hasBin: true + dependencies: + commander: 4.1.1 + ignore: 5.2.4 + p-map: 4.0.0 dev: true - optional: true /@types/chai-subset@1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} @@ -1098,13 +1227,6 @@ packages: resolution: {integrity: sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==} dev: true - /@types/fs-extra@11.0.1: - resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==} - dependencies: - '@types/jsonfile': 6.1.1 - '@types/node': 18.16.3 - dev: true - /@types/is-ci@3.0.0: resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==} dependencies: @@ -1115,12 +1237,6 @@ packages: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} dev: true - /@types/jsonfile@6.1.1: - resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} - dependencies: - '@types/node': 18.16.3 - dev: true - /@types/linkify-it@3.0.2: resolution: {integrity: sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==} dev: true @@ -1138,6 +1254,13 @@ packages: '@types/mdurl': 1.0.2 dev: true + /@types/markdown-it@13.0.2: + resolution: {integrity: sha512-Tla7hH9oeXHOlJyBFdoqV61xWE9FZf/y2g+gFVwQ2vE1/eBzjUno5JCd3Hdb5oATve5OF6xNjZ/4VIZhVVx+hA==} + dependencies: + '@types/linkify-it': 3.0.2 + '@types/mdurl': 1.0.2 + dev: true + /@types/mdurl@1.0.2: resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} dev: true @@ -1170,8 +1293,8 @@ packages: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} dev: true - /@types/web-bluetooth@0.0.17: - resolution: {integrity: sha512-4p9vcSmxAayx72yn70joFoL44c9MO/0+iVEBIQXe3v2h2SiAsEIo/G5v6ObFWvNKRFjbrVadNf9LqEEZeQPzdA==} + /@types/web-bluetooth@0.0.18: + resolution: {integrity: sha512-v/ZHEj9xh82usl8LMR3GarzFY1IrbXJw5L4QfQhokjRV91q+SelFqxQWSep1ucXEZ22+dSTwLFkXeur25sPIbw==} dev: true /@typescript/twoslash@3.1.0: @@ -1200,65 +1323,63 @@ packages: - supports-color dev: true - /@vitejs/plugin-vue@4.2.3(vite@4.3.9)(vue@3.3.4): - resolution: {integrity: sha512-R6JDUfiZbJA9cMiguQ7jxALsgiprjBeHL5ikpXfJCH62pPHtI+JdJ5xWj6Ev73yXSlYl86+blXn1kZHQ7uElxw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - vite: ^4.0.0 - vue: ^3.2.25 - dependencies: - vite: 4.3.9(@types/node@18.16.3) - vue: 3.3.4 - dev: true - - /@vitest/coverage-c8@0.30.1(vitest@0.30.1): - resolution: {integrity: sha512-/Wa3dtSuckpdngAmiCwowaEXXgJkqPrtfvrs9HTB9QoEfNbZWPu4E4cjEn4lJZb4qcGf4fxFtUA2f9DnDNAzBA==} + /@vitest/coverage-v8@0.34.5(vitest@0.34.5): + resolution: {integrity: sha512-97xjhRTSdmeeHCm2nNHhT3hLsMYkAhHXm/rwj6SZ3voka8xiCJrwgtfIjoZIFEL4OO0KezGmVuHWQXcMunULIA==} peerDependencies: - vitest: '>=0.30.0 <1' + vitest: '>=0.32.0 <1' dependencies: - c8: 7.13.0 + '@ampproject/remapping': 2.2.1 + '@bcoe/v8-coverage': 0.2.3 + istanbul-lib-coverage: 3.2.0 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.5 + magic-string: 0.30.4 picocolors: 1.0.0 - std-env: 3.3.2 - vitest: 0.30.1 + std-env: 3.4.3 + test-exclude: 6.0.0 + v8-to-istanbul: 9.1.0 + vitest: 0.34.5 + transitivePeerDependencies: + - supports-color dev: true - /@vitest/expect@0.30.1: - resolution: {integrity: sha512-c3kbEtN8XXJSeN81iDGq29bUzSjQhjES2WR3aColsS4lPGbivwLtas4DNUe0jD9gg/FYGIteqOenfU95EFituw==} + /@vitest/expect@0.34.5: + resolution: {integrity: sha512-/3RBIV9XEH+nRpRMqDJBufKIOQaYUH2X6bt0rKSCW0MfKhXFLYsR5ivHifeajRSTsln0FwJbitxLKHSQz/Xwkw==} dependencies: - '@vitest/spy': 0.30.1 - '@vitest/utils': 0.30.1 - chai: 4.3.7 + '@vitest/spy': 0.34.5 + '@vitest/utils': 0.34.5 + chai: 4.3.10 dev: true - /@vitest/runner@0.30.1: - resolution: {integrity: sha512-W62kT/8i0TF1UBCNMRtRMOBWJKRnNyv9RrjIgdUryEe0wNpGZvvwPDLuzYdxvgSckzjp54DSpv1xUbv4BQ0qVA==} + /@vitest/runner@0.34.5: + resolution: {integrity: sha512-RDEE3ViVvl7jFSCbnBRyYuu23XxmvRTSZWW6W4M7eC5dOsK75d5LIf6uhE5Fqf809DQ1+9ICZZNxhIolWHU4og==} dependencies: - '@vitest/utils': 0.30.1 - concordance: 5.0.4 + '@vitest/utils': 0.34.5 p-limit: 4.0.0 - pathe: 1.1.0 + pathe: 1.1.1 dev: true - /@vitest/snapshot@0.30.1: - resolution: {integrity: sha512-fJZqKrE99zo27uoZA/azgWyWbFvM1rw2APS05yB0JaLwUIg9aUtvvnBf4q7JWhEcAHmSwbrxKFgyBUga6tq9Tw==} + /@vitest/snapshot@0.34.5: + resolution: {integrity: sha512-+ikwSbhu6z2yOdtKmk/aeoDZ9QPm2g/ZO5rXT58RR9Vmu/kB2MamyDSx77dctqdZfP3Diqv4mbc/yw2kPT8rmA==} dependencies: - magic-string: 0.30.0 - pathe: 1.1.0 - pretty-format: 27.5.1 + magic-string: 0.30.4 + pathe: 1.1.1 + pretty-format: 29.7.0 dev: true - /@vitest/spy@0.30.1: - resolution: {integrity: sha512-YfJeIf37GvTZe04ZKxzJfnNNuNSmTEGnla2OdL60C8od16f3zOfv9q9K0nNii0NfjDJRt/CVN/POuY5/zTS+BA==} + /@vitest/spy@0.34.5: + resolution: {integrity: sha512-epsicsfhvBjRjCMOC/3k00mP/TBGQy8/P0DxOFiWyLt55gnZ99dqCfCiAsKO17BWVjn4eZRIjKvcqNmSz8gvmg==} dependencies: - tinyspy: 2.1.0 + tinyspy: 2.2.0 dev: true - /@vitest/utils@0.30.1: - resolution: {integrity: sha512-/c8Xv2zUVc+rnNt84QF0Y0zkfxnaGhp87K2dYJMLtLOIckPzuxLVzAtFCicGFdB4NeBHNzTRr1tNn7rCtQcWFA==} + /@vitest/utils@0.34.5: + resolution: {integrity: sha512-ur6CmmYQoeHMwmGb0v+qwkwN3yopZuZyf4xt1DBBSGBed8Hf9Gmbm/5dEWqgpLPdRx6Av6jcWXrjcKfkTzg/pw==} dependencies: - concordance: 5.0.4 + diff-sequences: 29.6.3 loupe: 2.3.6 - pretty-format: 27.5.1 + pretty-format: 29.7.0 dev: true /@vue/compiler-core@3.3.4: @@ -1348,20 +1469,20 @@ packages: resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} dev: true - /@vueuse/core@10.1.2(vue@3.3.4): - resolution: {integrity: sha512-roNn8WuerI56A5uiTyF/TEYX0Y+VKlhZAF94unUfdhbDUI+NfwQMn4FUnUscIRUhv3344qvAghopU4bzLPNFlA==} + /@vueuse/core@10.5.0(vue@3.3.4): + resolution: {integrity: sha512-z/tI2eSvxwLRjOhDm0h/SXAjNm8N5ld6/SC/JQs6o6kpJ6Ya50LnEL8g5hoYu005i28L0zqB5L5yAl8Jl26K3A==} dependencies: - '@types/web-bluetooth': 0.0.17 - '@vueuse/metadata': 10.1.2 - '@vueuse/shared': 10.1.2(vue@3.3.4) - vue-demi: 0.14.0(vue@3.3.4) + '@types/web-bluetooth': 0.0.18 + '@vueuse/metadata': 10.5.0 + '@vueuse/shared': 10.5.0(vue@3.3.4) + vue-demi: 0.14.6(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue dev: true - /@vueuse/integrations@10.1.2(focus-trap@7.4.3)(vue@3.3.4): - resolution: {integrity: sha512-wUpG3Wv6LiWerOwCzOAM0iGhNQ4vfFUTkhj/xQy7TLXduh2M3D8N08aS0KqlxsejY6R8NLxydDIM+68QfHZZ8Q==} + /@vueuse/integrations@10.5.0(focus-trap@7.5.3)(vue@3.3.4): + resolution: {integrity: sha512-fm5sXLCK0Ww3rRnzqnCQRmfjDURaI4xMsx+T+cec0ngQqHx/JgUtm8G0vRjwtonIeTBsH1Q8L3SucE+7K7upJQ==} peerDependencies: async-validator: '*' axios: '*' @@ -1401,23 +1522,23 @@ packages: universal-cookie: optional: true dependencies: - '@vueuse/core': 10.1.2(vue@3.3.4) - '@vueuse/shared': 10.1.2(vue@3.3.4) - focus-trap: 7.4.3 - vue-demi: 0.14.0(vue@3.3.4) + '@vueuse/core': 10.5.0(vue@3.3.4) + '@vueuse/shared': 10.5.0(vue@3.3.4) + focus-trap: 7.5.3 + vue-demi: 0.14.6(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue dev: true - /@vueuse/metadata@10.1.2: - resolution: {integrity: sha512-3mc5BqN9aU2SqBeBuWE7ne4OtXHoHKggNgxZR2K+zIW4YLsy6xoZ4/9vErQs6tvoKDX6QAqm3lvsrv0mczAwIQ==} + /@vueuse/metadata@10.5.0: + resolution: {integrity: sha512-fEbElR+MaIYyCkeM0SzWkdoMtOpIwO72x8WsZHRE7IggiOlILttqttM69AS13nrDxosnDBYdyy3C5mR1LCxHsw==} dev: true - /@vueuse/shared@10.1.2(vue@3.3.4): - resolution: {integrity: sha512-1uoUTPBlgyscK9v6ScGeVYDDzlPSFXBlxuK7SfrDGyUTBiznb3mNceqhwvZHjtDRELZEN79V5uWPTF1VDV8svA==} + /@vueuse/shared@10.5.0(vue@3.3.4): + resolution: {integrity: sha512-18iyxbbHYLst9MqU1X1QNdMHIjks6wC7XTVf0KNOv5es/Ms6gjVFCAAWTVP2JStuGqydg3DT+ExpFORUEi9yhg==} dependencies: - vue-demi: 0.14.0(vue@3.3.4) + vue-demi: 0.14.6(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -1428,8 +1549,8 @@ packages: engines: {node: '>=0.4.0'} dev: true - /acorn@8.8.2: - resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} + /acorn@8.10.0: + resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} hasBin: true dev: true @@ -1438,23 +1559,31 @@ packages: resolution: {integrity: sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==} dev: true - /algoliasearch@4.17.0: - resolution: {integrity: sha512-JMRh2Mw6sEnVMiz6+APsi7lx9a2jiDFF+WUtANaUVCv6uSU9UOLdo5h9K3pdP6frRRybaM2fX8b1u0nqICS9aA==} + /aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + dev: true + + /algoliasearch@4.20.0: + resolution: {integrity: sha512-y+UHEjnOItoNy0bYO+WWmLWBlPwDjKHW6mNHrPi0NkuhpQOOEbrkwQH/wgKFDLh7qlKjzoKeiRtlpewDPDG23g==} dependencies: - '@algolia/cache-browser-local-storage': 4.17.0 - '@algolia/cache-common': 4.17.0 - '@algolia/cache-in-memory': 4.17.0 - '@algolia/client-account': 4.17.0 - '@algolia/client-analytics': 4.17.0 - '@algolia/client-common': 4.17.0 - '@algolia/client-personalization': 4.17.0 - '@algolia/client-search': 4.17.0 - '@algolia/logger-common': 4.17.0 - '@algolia/logger-console': 4.17.0 - '@algolia/requester-browser-xhr': 4.17.0 - '@algolia/requester-common': 4.17.0 - '@algolia/requester-node-http': 4.17.0 - '@algolia/transporter': 4.17.0 + '@algolia/cache-browser-local-storage': 4.20.0 + '@algolia/cache-common': 4.20.0 + '@algolia/cache-in-memory': 4.20.0 + '@algolia/client-account': 4.20.0 + '@algolia/client-analytics': 4.20.0 + '@algolia/client-common': 4.20.0 + '@algolia/client-personalization': 4.20.0 + '@algolia/client-search': 4.20.0 + '@algolia/logger-common': 4.20.0 + '@algolia/logger-console': 4.20.0 + '@algolia/requester-browser-xhr': 4.20.0 + '@algolia/requester-common': 4.20.0 + '@algolia/requester-node-http': 4.20.0 + '@algolia/transporter': 4.20.0 dev: true /ansi-colors@4.1.3: @@ -1506,6 +1635,14 @@ packages: sprintf-js: 1.0.3 dev: true + /argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true + + /arity-n@1.0.4: + resolution: {integrity: sha512-fExL2kFDC1Q2DUOx3whE/9KoN66IzkY4b4zUHUBFM1ojEYjZZYDcUW3bek/ufGionX9giIKDC5redH2IlGqcQQ==} + dev: true + /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: @@ -1513,6 +1650,13 @@ packages: is-array-buffer: 3.0.2 dev: true + /array-last@1.3.0: + resolution: {integrity: sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==} + engines: {node: '>=0.10.0'} + dependencies: + is-number: 4.0.0 + dev: true + /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} @@ -1542,6 +1686,11 @@ packages: engines: {node: '>= 0.4'} dev: true + /babylon@6.18.0: + resolution: {integrity: sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==} + hasBin: true + dev: true + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true @@ -1553,10 +1702,6 @@ packages: is-windows: 1.0.2 dev: true - /blueimp-md5@2.19.0: - resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} - dev: true - /bn.js@4.12.0: resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} dev: true @@ -1565,10 +1710,6 @@ packages: resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} dev: true - /body-scroll-lock@4.0.0-beta.0: - resolution: {integrity: sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==} - dev: true - /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -1599,38 +1740,23 @@ packages: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} dev: true - /bun@0.5.9: - resolution: {integrity: sha512-gX4ped5KlWCf6HZId0O4lU2hcbfELeL3Sp6uKjbsTZR3Wu1/grOuXI/jrKd38aFiPdgMnWR0+mWcKuQuIbMUzw==} + /bun-types@1.0.4: + resolution: {integrity: sha512-MIXp8MXPqzjjDrBs2fNzODFgFB+Mkl/OdTsPjYaefRoBt+Bk8VEJc3S1bbs6pvBi/wCpPf/ZSmzfIyZ5w4gAMg==} + dev: true + + /bun@1.0.1: + resolution: {integrity: sha512-rdrGbCuDKrwidZ+I05k127JyvKiLIsIov1/Qcf1u1s0zv+e1csjA/7cSOQ1AjmdZ1sqm0VFx/N1rccZ91SQylw==} cpu: [arm64, x64] os: [darwin, linux] hasBin: true requiresBuild: true optionalDependencies: - '@oven/bun-darwin-aarch64': 0.5.9 - '@oven/bun-darwin-x64': 0.5.9 - '@oven/bun-darwin-x64-baseline': 0.5.9 - '@oven/bun-linux-aarch64': 0.5.9 - '@oven/bun-linux-x64': 0.5.9 - '@oven/bun-linux-x64-baseline': 0.5.9 - dev: true - - /c8@7.13.0: - resolution: {integrity: sha512-/NL4hQTv1gBL6J6ei80zu3IiTrmePDKXKXOTLpHvcIWZTVYQlDhVWjjWvkhICylE8EwwnMVzDZugCvdx0/DIIA==} - engines: {node: '>=10.12.0'} - hasBin: true - dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@istanbuljs/schema': 0.1.3 - find-up: 5.0.0 - foreground-child: 2.0.0 - istanbul-lib-coverage: 3.2.0 - istanbul-lib-report: 3.0.0 - istanbul-reports: 3.1.5 - rimraf: 3.0.2 - test-exclude: 6.0.0 - v8-to-istanbul: 9.1.0 - yargs: 16.2.0 - yargs-parser: 20.2.9 + '@oven/bun-darwin-aarch64': 1.0.1 + '@oven/bun-darwin-x64': 1.0.1 + '@oven/bun-darwin-x64-baseline': 1.0.1 + '@oven/bun-linux-aarch64': 1.0.1 + '@oven/bun-linux-x64': 1.0.1 + '@oven/bun-linux-x64-baseline': 1.0.1 dev: true /cac@6.7.14: @@ -1659,14 +1785,14 @@ packages: engines: {node: '>=6'} dev: true - /chai@4.3.7: - resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} + /chai@4.3.10: + resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 - check-error: 1.0.2 + check-error: 1.0.3 deep-eql: 4.1.3 - get-func-name: 2.0.0 + get-func-name: 2.0.2 loupe: 2.3.6 pathval: 1.1.1 type-detect: 4.0.8 @@ -1689,12 +1815,19 @@ packages: supports-color: 7.2.0 dev: true + /chalk@5.3.0: + resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + dev: true + /chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true - /check-error@1.0.2: - resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} + /check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + dependencies: + get-func-name: 2.0.2 dev: true /ci-info@3.8.0: @@ -1702,6 +1835,11 @@ packages: engines: {node: '>=8'} dev: true + /clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + dev: true + /cliui@6.0.0: resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} dependencies: @@ -1710,14 +1848,6 @@ packages: wrap-ansi: 6.2.0 dev: true - /cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - /cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -1730,6 +1860,7 @@ packages: /clone@1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} + requiresBuild: true dev: true /color-convert@1.9.3: @@ -1753,22 +1884,19 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true - /concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + /commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} dev: true - /concordance@5.0.4: - resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} - engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} + /compose-function@3.0.3: + resolution: {integrity: sha512-xzhzTJ5eC+gmIzvZq+C3kCJHsp9os6tJkrigDRZclyGtOKINbZtE8n1Tzmeh32jW+BUDPbvZpibwvJHBLGMVwg==} dependencies: - date-time: 3.1.0 - esutils: 2.0.3 - fast-diff: 1.2.0 - js-string-escape: 1.0.1 - lodash: 4.17.21 - md5-hex: 3.0.1 - semver: 7.5.0 - well-known-symbols: 2.0.0 + arity-n: 1.0.4 + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true /convert-source-map@1.9.0: @@ -1822,13 +1950,6 @@ packages: resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} dev: true - /date-time@3.1.0: - resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} - engines: {node: '>=6'} - dependencies: - time-zone: 1.0.0 - dev: true - /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -1861,8 +1982,13 @@ packages: type-detect: 4.0.8 dev: true + /deep-freeze@0.0.1: + resolution: {integrity: sha512-Z+z8HiAvsGwmjqlphnHW5oz6yWlOwu6EQfFTjmeTWlDeda3FS2yv3jhq35TX/ewmsnqB+RX2IdsIOyjJCQN5tg==} + dev: true + /defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + requiresBuild: true dependencies: clone: 1.0.4 dev: true @@ -1880,6 +2006,11 @@ packages: engines: {node: '>=8'} dev: true + /diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1896,6 +2027,14 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true + /easy-table@1.2.0: + resolution: {integrity: sha512-OFzVOv03YpvtcWGe5AayU5G2hgybsg3iqA6drU8UaoZyB9jLGMTrz9+asnLp/E+6qPh88yEI1gvyZFZ41dmgww==} + dependencies: + ansi-regex: 5.0.1 + optionalDependencies: + wcwidth: 1.0.1 + dev: true + /elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} dependencies: @@ -1993,34 +2132,34 @@ packages: is-symbol: 1.0.4 dev: true - /esbuild@0.17.18: - resolution: {integrity: sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==} + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.17.18 - '@esbuild/android-arm64': 0.17.18 - '@esbuild/android-x64': 0.17.18 - '@esbuild/darwin-arm64': 0.17.18 - '@esbuild/darwin-x64': 0.17.18 - '@esbuild/freebsd-arm64': 0.17.18 - '@esbuild/freebsd-x64': 0.17.18 - '@esbuild/linux-arm': 0.17.18 - '@esbuild/linux-arm64': 0.17.18 - '@esbuild/linux-ia32': 0.17.18 - '@esbuild/linux-loong64': 0.17.18 - '@esbuild/linux-mips64el': 0.17.18 - '@esbuild/linux-ppc64': 0.17.18 - '@esbuild/linux-riscv64': 0.17.18 - '@esbuild/linux-s390x': 0.17.18 - '@esbuild/linux-x64': 0.17.18 - '@esbuild/netbsd-x64': 0.17.18 - '@esbuild/openbsd-x64': 0.17.18 - '@esbuild/sunos-x64': 0.17.18 - '@esbuild/win32-arm64': 0.17.18 - '@esbuild/win32-ia32': 0.17.18 - '@esbuild/win32-x64': 0.17.18 + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 dev: true /escalade@3.1.1: @@ -2043,11 +2182,6 @@ packages: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} dev: true - /esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - dev: true - /ethers@6.5.1: resolution: {integrity: sha512-jDpCnUGcyn39hnRUEtrulDZOtJcIPEz4Whccl3N9qhwdLsn1ELuDM9TgGgGJq6ph0p8/Uri+Wezmo/r69E+xkA==} engines: {node: '>=14.0.0'} @@ -2077,10 +2211,6 @@ packages: tmp: 0.0.33 dev: true - /fast-diff@1.2.0: - resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} - dev: true - /fast-glob@3.2.12: resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} engines: {node: '>=8.6.0'} @@ -2092,6 +2222,17 @@ packages: micromatch: 4.0.5 dev: true + /fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + /fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: @@ -2110,6 +2251,15 @@ packages: to-regex-range: 5.0.1 dev: true + /filter-iterator@0.0.1: + resolution: {integrity: sha512-v4lhL7Qa8XpbW3LN46CEnmhGk3eHZwxfNl5at20aEkreesht4YKb/Ba3BUIbnPhAC/r3dmu7ABaGk6MAvh2alA==} + dev: true + + /filter-obj@1.1.0: + resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==} + engines: {node: '>=0.10.0'} + dev: true + /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -2133,10 +2283,10 @@ packages: pkg-dir: 4.2.0 dev: true - /focus-trap@7.4.3: - resolution: {integrity: sha512-BgSSbK4GPnS2VbtZ50VtOv1Sti6DIkj3+LkVjiWMNjLeAp1SH1UlLx3ULu/DCu4vq5R4/uvTm+zrvsMsuYmGLg==} + /focus-trap@7.5.3: + resolution: {integrity: sha512-7UsT/eSJcTPF0aZp73u7hBRTABz26knRRTJfoTGFCQD5mUImLIIOwWWCrtoQdmWa7dykBi6H+Cp5i3S/kvsMeA==} dependencies: - tabbable: 6.1.2 + tabbable: 6.2.0 dev: true /for-each@0.3.3: @@ -2145,14 +2295,6 @@ packages: is-callable: 1.2.7 dev: true - /foreground-child@2.0.0: - resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} - engines: {node: '>=8.0.0'} - dependencies: - cross-spawn: 7.0.3 - signal-exit: 3.0.7 - dev: true - /foreground-child@3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} @@ -2161,15 +2303,6 @@ packages: signal-exit: 4.0.2 dev: true - /fs-extra@11.1.1: - resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} - engines: {node: '>=14.14'} - dependencies: - graceful-fs: 4.2.11 - jsonfile: 6.1.0 - universalify: 2.0.0 - dev: true - /fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -2223,8 +2356,8 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: true - /get-func-name@2.0.0: - resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} + /get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} dev: true /get-intrinsic@1.2.0: @@ -2250,16 +2383,16 @@ packages: is-glob: 4.0.3 dev: true - /glob@10.2.6: - resolution: {integrity: sha512-U/rnDpXJGF414QQQZv5uVsabTVxMSwzS5CH0p3DRCIV6ownl4f7PzGnkGmvlum2wB+9RlJWJZ6ACU1INnBqiPA==} + /glob@10.3.10: + resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} engines: {node: '>=16 || 14 >=14.17'} hasBin: true dependencies: foreground-child: 3.1.1 - jackspeak: 2.2.1 + jackspeak: 2.3.6 minimatch: 9.0.1 minipass: 6.0.2 - path-scurry: 1.9.2 + path-scurry: 1.10.1 dev: true /glob@7.2.3: @@ -2273,6 +2406,17 @@ packages: path-is-absolute: 1.0.1 dev: true + /glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + dev: true + /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} @@ -2292,6 +2436,17 @@ packages: slash: 3.0.0 dev: true + /globby@13.2.2: + resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + dir-glob: 3.0.1 + fast-glob: 3.3.1 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 4.0.0 + dev: true + /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: @@ -2325,6 +2480,10 @@ packages: engines: {node: '>=8'} dev: true + /has-own-property@0.1.0: + resolution: {integrity: sha512-14qdBKoonU99XDhWcFKZTShK+QV47qU97u8zzoVo9cL5TZ3BmBHXogItSt9qJjR0KUMFRhcCW8uGIGl8nkl7Aw==} + dev: true + /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: @@ -2389,6 +2548,17 @@ packages: safer-buffer: 2.1.2 dev: true + /identity-function@1.0.0: + resolution: {integrity: sha512-kNrgUK0qI+9qLTBidsH85HjDLpZfrrS0ElquKKe/fJFdB3D7VeKdXXEvOPDUHSHOzdZKCAAaQIWWyp0l2yq6pw==} + dev: true + + /ignore-walk@5.0.1: + resolution: {integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + minimatch: 5.1.6 + dev: true + /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -2487,6 +2657,11 @@ packages: is-extglob: 2.1.1 dev: true + /is-iterable@1.1.1: + resolution: {integrity: sha512-EdOZCr0NsGE00Pot+x1ZFx9MJK3C6wy91geZpXwvwexDLJvA4nzYyZf7r+EIwSeVsOLDdBz7ATg9NqKTzuNYuQ==} + engines: {node: '>= 4'} + dev: true + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -2499,6 +2674,11 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-number@4.0.0: + resolution: {integrity: sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==} + engines: {node: '>=0.10.0'} + dev: true + /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -2575,25 +2755,41 @@ packages: engines: {node: '>=8'} dev: true - /istanbul-lib-report@3.0.0: - resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==} - engines: {node: '>=8'} + /istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} dependencies: istanbul-lib-coverage: 3.2.0 - make-dir: 3.1.0 + make-dir: 4.0.0 supports-color: 7.2.0 dev: true + /istanbul-lib-source-maps@4.0.1: + resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + engines: {node: '>=10'} + dependencies: + debug: 4.3.4 + istanbul-lib-coverage: 3.2.0 + source-map: 0.6.1 + transitivePeerDependencies: + - supports-color + dev: true + /istanbul-reports@3.1.5: resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} engines: {node: '>=8'} dependencies: html-escaper: 2.0.2 - istanbul-lib-report: 3.0.0 + istanbul-lib-report: 3.0.1 dev: true - /jackspeak@2.2.1: - resolution: {integrity: sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==} + /iterable-lookahead@1.0.0: + resolution: {integrity: sha512-hJnEP2Xk4+44DDwJqUQGdXal5VbyeWLaPyDl2AQc242Zr7iqz4DgpQOrEzglWVMGHMDCkguLHEKxd1+rOsmgSQ==} + engines: {node: '>=4'} + dev: true + + /jackspeak@2.3.6: + resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} engines: {node: '>=14'} dependencies: '@isaacs/cliui': 8.0.2 @@ -2601,13 +2797,13 @@ packages: '@pkgjs/parseargs': 0.11.0 dev: true - /js-sha3@0.8.0: - resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + /jiti@1.20.0: + resolution: {integrity: sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==} + hasBin: true dev: true - /js-string-escape@1.0.1: - resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} - engines: {node: '>= 0.8'} + /js-sha3@0.8.0: + resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} dev: true /js-tokens@4.0.0: @@ -2622,10 +2818,22 @@ packages: esprima: 4.0.1 dev: true + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true + /json-parse-even-better-errors@3.0.0: + resolution: {integrity: sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + /jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true @@ -2636,14 +2844,6 @@ packages: graceful-fs: 4.2.11 dev: true - /jsonfile@6.1.0: - resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} - dependencies: - universalify: 2.0.0 - optionalDependencies: - graceful-fs: 4.2.11 - dev: true - /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -2654,6 +2854,30 @@ packages: engines: {node: '>=6'} dev: true + /knip@2.30.1: + resolution: {integrity: sha512-wiJkdflTL61lu37LLCNhZORkyvVM5ScW/50CjnbeeXvNEZI+Z9dYRKwK0w4sVtfo/vQ9rBruKJa1sR+Wo3rC6g==} + engines: {node: '>=16.17.0 <17 || >=18.6.0'} + hasBin: true + dependencies: + '@ericcornelissen/bash-parser': 0.5.2 + '@npmcli/map-workspaces': 3.0.4 + '@snyk/github-codeowners': 1.1.0 + chalk: 5.3.0 + easy-table: 1.2.0 + fast-glob: 3.2.12 + globby: 13.2.2 + jiti: 1.20.0 + js-yaml: 4.1.0 + micromatch: 4.0.5 + minimist: 1.2.8 + pretty-ms: 8.0.0 + strip-json-comments: 5.0.1 + summary: 2.1.0 + typescript: 5.0.4 + zod: 3.22.4 + zod-validation-error: 1.5.0(zod@3.22.4) + dev: true + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true @@ -2687,18 +2911,18 @@ packages: p-locate: 5.0.0 dev: true - /lodash.startcase@4.4.0: - resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + /lodash.curry@4.1.1: + resolution: {integrity: sha512-/u14pXGviLaweY5JI0IUzgzF2J6Ne8INyzAZjImcryjgkZ+ebruBxy2/JaOOkTqScddcYtakjhSaeemV8lR0tA==} dev: true - /lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + /lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} dev: true /loupe@2.3.6: resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} dependencies: - get-func-name: 2.0.0 + get-func-name: 2.0.2 dev: true /lru-cache@4.1.5: @@ -2725,6 +2949,12 @@ packages: hasBin: true dev: true + /magic-string@0.16.0: + resolution: {integrity: sha512-c4BEos3y6G2qO0B9X7K0FVLOPT9uGrjYwYRLFmDqyl5YMboUviyecnXWp94fJTSMwPw2/sf+CEYt5AGpmklkkQ==} + dependencies: + vlq: 0.2.3 + dev: true + /magic-string@0.30.0: resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} engines: {node: '>=12'} @@ -2732,11 +2962,18 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /make-dir@3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} + /magic-string@0.30.4: + resolution: {integrity: sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} dependencies: - semver: 6.3.0 + semver: 7.5.4 dev: true /map-obj@1.0.1: @@ -2744,6 +2981,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /map-obj@2.0.0: + resolution: {integrity: sha512-TzQSV2DiMYgoF5RycneKVUzIa9bQsj/B3tTgsE3dOGqlzHnGIDaC7XBE7grnA+8kZPnfqSGFe95VHc2oc0VFUQ==} + engines: {node: '>=4'} + dev: true + /map-obj@4.3.0: resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} engines: {node: '>=8'} @@ -2757,13 +2999,6 @@ packages: resolution: {integrity: sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w==} dev: true - /md5-hex@3.0.1: - resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} - engines: {node: '>=8'} - dependencies: - blueimp-md5: 2.19.0 - dev: true - /meow@6.1.1: resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} engines: {node: '>=8'} @@ -2813,6 +3048,13 @@ packages: brace-expansion: 1.1.11 dev: true + /minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimatch@9.0.1: resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==} engines: {node: '>=16 || 14 >=14.17'} @@ -2829,6 +3071,10 @@ packages: kind-of: 6.0.3 dev: true + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + /minipass@6.0.2: resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==} engines: {node: '>=16 || 14 >=14.17'} @@ -2843,13 +3089,18 @@ packages: engines: {node: '>= 8.0.0'} dev: true - /mlly@1.2.0: - resolution: {integrity: sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==} + /mlly@1.4.2: + resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} dependencies: - acorn: 8.8.2 - pathe: 1.1.0 - pkg-types: 1.0.2 - ufo: 1.1.1 + acorn: 8.10.0 + pathe: 1.1.1 + pkg-types: 1.0.3 + ufo: 1.3.1 + dev: true + + /mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} dev: true /ms@2.1.2: @@ -2883,6 +3134,34 @@ packages: validate-npm-package-license: 3.0.4 dev: true + /npm-bundled@2.0.1: + resolution: {integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + npm-normalize-package-bin: 2.0.0 + dev: true + + /npm-normalize-package-bin@2.0.0: + resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dev: true + + /npm-normalize-package-bin@3.0.1: + resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /npm-packlist@5.1.3: + resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + dependencies: + glob: 8.1.0 + ignore-walk: 5.0.1 + npm-bundled: 2.0.1 + npm-normalize-package-bin: 2.0.0 + dev: true + /object-inspect@1.12.3: resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} dev: true @@ -2892,6 +3171,15 @@ packages: engines: {node: '>= 0.4'} dev: true + /object-pairs@0.1.0: + resolution: {integrity: sha512-3ECr6K831I4xX/Mduxr9UC+HPOz/d6WKKYj9p4cmC8Lg8p7g8gitzsxNX5IWlSIgFWN/a4JgrJaoAMKn20oKwA==} + dev: true + + /object-values@1.0.0: + resolution: {integrity: sha512-+8hwcz/JnQ9EpLIXzN0Rs7DLsBpJNT/xYehtB/jU93tHYr5BFEO8E+JGQNOSqE7opVzz5cGksKFHt7uUJVLSjQ==} + engines: {node: '>=0.10.0'} + dev: true + /object.assign@4.1.4: resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} engines: {node: '>= 0.4'} @@ -2964,6 +3252,13 @@ packages: engines: {node: '>=6'} dev: true + /p-map@4.0.0: + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} + dependencies: + aggregate-error: 3.1.0 + dev: true + /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -2979,6 +3274,11 @@ packages: lines-and-columns: 1.2.4 dev: true + /parse-ms@3.0.0: + resolution: {integrity: sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==} + engines: {node: '>=12'} + dev: true + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -2998,8 +3298,8 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true - /path-scurry@1.9.2: - resolution: {integrity: sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==} + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} dependencies: lru-cache: 9.1.1 @@ -3011,8 +3311,8 @@ packages: engines: {node: '>=8'} dev: true - /pathe@1.1.0: - resolution: {integrity: sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==} + /pathe@1.1.1: + resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} dev: true /pathval@1.1.1: @@ -3040,16 +3340,16 @@ packages: find-up: 4.1.0 dev: true - /pkg-types@1.0.2: - resolution: {integrity: sha512-hM58GKXOcj8WTqUXnsQyJYXdeAPbythQgEF3nTcEo+nkD49chjQ9IKm/QJy9xf6JakXptz86h7ecP2024rrLaQ==} + /pkg-types@1.0.3: + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} dependencies: jsonc-parser: 3.2.0 - mlly: 1.2.0 - pathe: 1.1.0 + mlly: 1.4.2 + pathe: 1.1.1 dev: true - /postcss@8.4.23: - resolution: {integrity: sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==} + /postcss@8.4.24: + resolution: {integrity: sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -3057,8 +3357,8 @@ packages: source-map-js: 1.0.2 dev: true - /postcss@8.4.24: - resolution: {integrity: sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==} + /postcss@8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -3086,19 +3386,36 @@ packages: hasBin: true dev: true - /pretty-format@27.5.1: - resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + /pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - ansi-regex: 5.0.1 + '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 17.0.2 + react-is: 18.2.0 + dev: true + + /pretty-ms@8.0.0: + resolution: {integrity: sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==} + engines: {node: '>=14.16'} + dependencies: + parse-ms: 3.0.0 dev: true /pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} dev: true + /publint@0.2.3: + resolution: {integrity: sha512-Ml/rLotRiRTCbqL8CtWURiWDPzHtjv1SKU2E91R0ZG4mDJS3/rNQXYttM+Wt5t0JZ09MyAXIa/TYOt5OVUlYAQ==} + engines: {node: '>=16'} + hasBin: true + dependencies: + npm-packlist: 5.1.3 + picocolors: 1.0.0 + sade: 1.8.1 + dev: true + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true @@ -3108,8 +3425,16 @@ packages: engines: {node: '>=8'} dev: true - /react-is@17.0.2: - resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} + /react-is@18.2.0: + resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + dev: true + + /read-package-json-fast@3.0.2: + resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + json-parse-even-better-errors: 3.0.0 + npm-normalize-package-bin: 3.0.1 dev: true /read-pkg-up@7.0.1: @@ -3172,7 +3497,7 @@ packages: '@typescript/vfs': 1.3.4 fenceparser: 1.1.1 regenerator-runtime: 0.13.11 - shiki: 0.14.1 + shiki: 0.14.2 shiki-twoslash: 3.1.2(typescript@5.0.4) tslib: 2.1.0 typescript: 5.0.4 @@ -3209,11 +3534,8 @@ packages: engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true - /rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - dependencies: - glob: 7.2.3 + /reverse-arguments@1.0.0: + resolution: {integrity: sha512-/x8uIPdTafBqakK0TmPNJzgkLP+3H+yxpUJhCQHsLBg1rYEVNR2D8BRYNWQhVBjyOd7oo1dZRVzIkwMY2oqfYQ==} dev: true /rimraf@5.0.1: @@ -3221,37 +3543,30 @@ packages: engines: {node: '>=14'} hasBin: true dependencies: - glob: 10.2.6 + glob: 10.3.10 dev: true - /rollup@3.21.2: - resolution: {integrity: sha512-c4vC+JZ3bbF4Kqq2TtM7zSKtSyMybFOjqmomFax3xpfYaPZDZ4iz8NMIuBRMjnXOcKYozw7bC6vhJjiWD6JpzQ==} + /rollup@3.29.4: + resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: fsevents: 2.3.2 dev: true - /rome@12.1.3: - resolution: {integrity: sha512-e+ff72hxDpe/t5/Us7YRBVw3PBET7SeczTQNn6tvrWdrCaAw3qOukQQ+tDCkyFtS4yGsnhjrJbm43ctNbz27Yg==} - engines: {node: '>=14.*'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@rometools/cli-darwin-arm64': 12.1.3 - '@rometools/cli-darwin-x64': 12.1.3 - '@rometools/cli-linux-arm64': 12.1.3 - '@rometools/cli-linux-x64': 12.1.3 - '@rometools/cli-win32-arm64': 12.1.3 - '@rometools/cli-win32-x64': 12.1.3 - dev: true - /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 dev: true + /sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + dependencies: + mri: 1.2.0 + dev: true + /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: @@ -3264,23 +3579,13 @@ packages: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true - /search-insights@2.6.0: - resolution: {integrity: sha512-vU2/fJ+h/Mkm/DJOe+EaM5cafJv/1rRTZpGJTuFPf/Q5LjzgMDsqPdSaZsAe+GAWHHsfsu+rQSAn6c8IGtBEVw==} - engines: {node: '>=8.16.0'} - dev: true - /semver@5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true dev: true - /semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - dev: true - - /semver@7.5.0: - resolution: {integrity: sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==} + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} hasBin: true dependencies: @@ -3315,6 +3620,10 @@ packages: engines: {node: '>=8'} dev: true + /shell-quote-word@1.0.1: + resolution: {integrity: sha512-lT297f1WLAdq0A4O+AknIFRP6kkiI3s8C913eJ0XqBxJbZPGWUNkRQk2u8zk4bEAjUJ5i+fSLwB6z1HzeT+DEg==} + dev: true + /shiki-twoslash@3.1.2(typescript@5.0.4): resolution: {integrity: sha512-JBcRIIizi+exIA/OUhYkV6jtyeZco0ykCkIRd5sgwIt1Pm4pz+maoaRZpm6SkhPwvif4fCA7xOtJOykhpIV64Q==} peerDependencies: @@ -3323,14 +3632,14 @@ packages: '@typescript/twoslash': 3.1.0 '@typescript/vfs': 1.3.4 fenceparser: 1.1.1 - shiki: 0.14.1 + shiki: 0.14.2 typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /shiki@0.14.1: - resolution: {integrity: sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==} + /shiki@0.14.2: + resolution: {integrity: sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==} dependencies: ansi-sequence-parser: 1.1.0 jsonc-parser: 3.2.0 @@ -3338,8 +3647,8 @@ packages: vscode-textmate: 8.0.0 dev: true - /shiki@0.14.2: - resolution: {integrity: sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==} + /shiki@0.14.4: + resolution: {integrity: sha512-IXCRip2IQzKwxArNNq1S+On4KPML3Yyn8Zzs/xRgcgOWIr8ntIK3IKzjFPfjy/7kt9ZMjc+FItfqHRBg8b6tNQ==} dependencies: ansi-sequence-parser: 1.1.0 jsonc-parser: 3.2.0 @@ -3379,6 +3688,11 @@ packages: engines: {node: '>=8'} dev: true + /slash@4.0.0: + resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} + engines: {node: '>=12'} + dev: true + /smartwrap@2.0.2: resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} engines: {node: '>=6'} @@ -3439,8 +3753,8 @@ packages: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true - /std-env@3.3.2: - resolution: {integrity: sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==} + /std-env@3.4.3: + resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==} dev: true /stream-transform@2.1.3: @@ -3467,6 +3781,10 @@ packages: strip-ansi: 7.0.1 dev: true + /string.fromcodepoint@0.2.1: + resolution: {integrity: sha512-n69H31OnxSGSZyZbgBlvYIXlrMhJQ0dQAX1js1QDhpaUH6zmU3QYlj07bCwCNlPOu3oRXIubGPl2gDGnHsiCqg==} + dev: true + /string.prototype.trim@1.2.7: resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} engines: {node: '>= 0.4'} @@ -3518,10 +3836,19 @@ packages: min-indent: 1.0.1 dev: true + /strip-json-comments@5.0.1: + resolution: {integrity: sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==} + engines: {node: '>=14.16'} + dev: true + /strip-literal@1.0.1: resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} dependencies: - acorn: 8.8.2 + acorn: 8.10.0 + dev: true + + /summary@2.1.0: + resolution: {integrity: sha512-nMIjMrd5Z2nuB2RZCKJfFMjgS3fygbeyGk9PxPPaJR1RIcyN9yn4A63Isovzm3ZtQuEkLBVgMdPup8UeLH7aQw==} dev: true /supports-color@5.5.0: @@ -3543,8 +3870,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /tabbable@6.1.2: - resolution: {integrity: sha512-qCN98uP7i9z0fIS4amQ5zbGBOq+OSigYeGvPy7NDk8Y9yncqDZ9pRPgfsc2PJIVM9RrJj7GIfuRgmjoUU9zTHQ==} + /tabbable@6.2.0: + resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} dev: true /term-size@2.2.1: @@ -3561,22 +3888,17 @@ packages: minimatch: 3.1.2 dev: true - /time-zone@1.0.0: - resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} - engines: {node: '>=4'} - dev: true - /tinybench@2.5.0: resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} dev: true - /tinypool@0.4.0: - resolution: {integrity: sha512-2ksntHOKf893wSAH4z/+JbPpi92esw8Gn9N2deXX+B0EO92hexAVI9GIZZPx7P5aYo5KULfeOSt3kMOmSOy6uA==} + /tinypool@0.7.0: + resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} engines: {node: '>=14.0.0'} dev: true - /tinyspy@2.1.0: - resolution: {integrity: sha512-7eORpyqImoOvkQJCSkL0d0mB4NHHIFAy4b1u8PHdDa7SjGS2njzl6/lyGoZLm+eyYEtlUmFGE0rFj66SWxZgQQ==} + /tinyspy@2.2.0: + resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==} engines: {node: '>=14.0.0'} dev: true @@ -3592,6 +3914,16 @@ packages: engines: {node: '>=4'} dev: true + /to-no-case@1.0.2: + resolution: {integrity: sha512-Z3g735FxuZY8rodxV4gH7LxClE4H0hTIyHNIHdk+vpQxjLm0cwnKXq/OFVZ76SOQmto7txVcwSCwkU5kqp+FKg==} + dev: true + + /to-pascal-case@1.0.0: + resolution: {integrity: sha512-QGMWHqM6xPrcQW57S23c5/3BbYb0Tbe9p+ur98ckRnGDwD4wbbtDiYI38CfmMKNB5Iv0REjs5SNDntTwvDxzZA==} + dependencies: + to-space-case: 1.0.0 + dev: true + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -3599,6 +3931,12 @@ packages: is-number: 7.0.0 dev: true + /to-space-case@1.0.0: + resolution: {integrity: sha512-rLdvwXZ39VOn1IxGL3V6ZstoTbwLRckQmn/U8ZDLuWwIXNpuZDhQ3AiRUlhTbOXFVE9C+dR51wM0CBDhk31VcA==} + dependencies: + to-no-case: 1.0.2 + dev: true + /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true @@ -3670,8 +4008,14 @@ packages: hasBin: true dev: true - /ufo@1.1.1: - resolution: {integrity: sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==} + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /ufo@1.3.1: + resolution: {integrity: sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==} dev: true /unbox-primitive@1.0.2: @@ -3683,6 +4027,12 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /unescape-js@1.1.4: + resolution: {integrity: sha512-42SD8NOQEhdYntEiUQdYq/1V/YHwr1HLwlHuTJB5InVVdOSbgI6xu8jK5q65yIzuFCfczzyDF/7hbGzVbyCw0g==} + dependencies: + string.fromcodepoint: 0.2.1 + dev: true + /unist-util-is@4.1.0: resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==} dev: true @@ -3707,11 +4057,6 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /universalify@2.0.0: - resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} - engines: {node: '>= 10.0.0'} - dev: true - /v8-to-istanbul@9.1.0: resolution: {integrity: sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==} engines: {node: '>=10.12.0'} @@ -3728,20 +4073,21 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite-node@0.30.1(@types/node@18.16.3): - resolution: {integrity: sha512-vTikpU/J7e6LU/8iM3dzBo8ZhEiKZEKRznEMm+mJh95XhWaPrJQraT/QsT2NWmuEf+zgAoMe64PKT7hfZ1Njmg==} + /vite-node@0.34.5(@types/node@18.16.3): + resolution: {integrity: sha512-RNZ+DwbCvDoI5CbCSQSyRyzDTfFvFauvMs6Yq4ObJROKlIKuat1KgSX/Ako5rlDMfVCyMcpMRMTkJBxd6z8YRA==} engines: {node: '>=v14.18.0'} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.4 - mlly: 1.2.0 - pathe: 1.1.0 + mlly: 1.4.2 + pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.3.3(@types/node@18.16.3) + vite: 4.4.11(@types/node@18.16.3) transitivePeerDependencies: - '@types/node' - less + - lightningcss - sass - stylus - sugarss @@ -3749,13 +4095,14 @@ packages: - terser dev: true - /vite@4.3.3(@types/node@18.16.3): - resolution: {integrity: sha512-MwFlLBO4udZXd+VBcezo3u8mC77YQk+ik+fbc0GZWGgzfbPP+8Kf0fldhARqvSYmtIWoAJ5BXPClUbMTlqFxrA==} + /vite@4.4.11(@types/node@18.16.3): + resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: '@types/node': '>= 14' less: '*' + lightningcss: ^1.21.0 sass: '*' stylus: '*' sugarss: '*' @@ -3765,38 +4112,7 @@ packages: optional: true less: optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': 18.16.3 - esbuild: 0.17.18 - postcss: 8.4.23 - rollup: 3.21.2 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /vite@4.3.9(@types/node@18.16.3): - resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: + lightningcss: optional: true sass: optional: true @@ -3808,41 +4124,48 @@ packages: optional: true dependencies: '@types/node': 18.16.3 - esbuild: 0.17.18 - postcss: 8.4.24 - rollup: 3.21.2 + esbuild: 0.18.20 + postcss: 8.4.31 + rollup: 3.29.4 optionalDependencies: fsevents: 2.3.2 dev: true - /vitepress-plugin-shiki-twoslash@0.0.6(typescript@5.0.4)(vitepress@1.0.0-beta.1): + /vitepress-plugin-shiki-twoslash@0.0.6(typescript@5.0.4)(vitepress@1.0.0-rc.20): resolution: {integrity: sha512-CjMF01Vb/zwOKKCqq6QmkJbTJnRxipv8oiPjRWTjzH2jPaQH4gGCF2fZHS7uY53J3gbU3GwtrXI02J6axLYmbg==} peerDependencies: vitepress: '>=1.0.0-alpha.61' dependencies: remark-shiki-twoslash: 3.1.3(typescript@5.0.4) - vitepress: 1.0.0-beta.1(@types/node@18.16.3)(search-insights@2.6.0) + vitepress: 1.0.0-rc.20 transitivePeerDependencies: - supports-color - typescript dev: true - /vitepress@1.0.0-beta.1(@types/node@18.16.3)(search-insights@2.6.0): - resolution: {integrity: sha512-V2yyCwQ+v9fh7rbnGDLp8M7vHa9sLElexXf/JHtBOsOwv7ed9wt1QI4WUagYgKR3TeoJT9v2s6f0UaQSne0EvQ==} + /vitepress@1.0.0-rc.20: + resolution: {integrity: sha512-CykMUJ8JLxLcGWek0ew3wln4RYbsOd1+0YzXITTpajggpynm2S331TNkJVOkHrMRc6GYe3y4pS40GfgcW0ZwAw==} hasBin: true + peerDependencies: + markdown-it-mathjax3: ^4.3.2 + postcss: ^8.4.30 + peerDependenciesMeta: + markdown-it-mathjax3: + optional: true + postcss: + optional: true dependencies: - '@docsearch/css': 3.5.0 - '@docsearch/js': 3.5.0(search-insights@2.6.0) - '@vitejs/plugin-vue': 4.2.3(vite@4.3.9)(vue@3.3.4) + '@docsearch/css': 3.5.2 + '@docsearch/js': 3.5.2 + '@types/markdown-it': 13.0.2 '@vue/devtools-api': 6.5.0 - '@vueuse/core': 10.1.2(vue@3.3.4) - '@vueuse/integrations': 10.1.2(focus-trap@7.4.3)(vue@3.3.4) - body-scroll-lock: 4.0.0-beta.0 - focus-trap: 7.4.3 + '@vueuse/core': 10.5.0(vue@3.3.4) + '@vueuse/integrations': 10.5.0(focus-trap@7.5.3)(vue@3.3.4) + focus-trap: 7.5.3 mark.js: 8.11.1 minisearch: 6.1.0 - shiki: 0.14.2 - vite: 4.3.9(@types/node@18.16.3) + shiki: 0.14.4 + vite: 4.4.11(@types/node@18.16.3) vue: 3.3.4 transitivePeerDependencies: - '@algolia/client-search' @@ -3857,6 +4180,7 @@ packages: - idb-keyval - jwt-decode - less + - lightningcss - nprogress - qrcode - react @@ -3870,8 +4194,8 @@ packages: - universal-cookie dev: true - /vitest@0.30.1: - resolution: {integrity: sha512-y35WTrSTlTxfMLttgQk4rHcaDkbHQwDP++SNwPb+7H8yb13Q3cu2EixrtHzF27iZ8v0XCciSsLg00RkPAzB/aA==} + /vitest@0.34.5: + resolution: {integrity: sha512-CPI68mmnr2DThSB3frSuE5RLm9wo5wU4fbDrDwWQQB1CWgq9jQVoQwnQSzYAjdoBOPoH2UtXpOgHVge/uScfZg==} engines: {node: '>=v14.18.0'} hasBin: true peerDependencies: @@ -3904,31 +4228,30 @@ packages: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 '@types/node': 18.16.3 - '@vitest/expect': 0.30.1 - '@vitest/runner': 0.30.1 - '@vitest/snapshot': 0.30.1 - '@vitest/spy': 0.30.1 - '@vitest/utils': 0.30.1 - acorn: 8.8.2 + '@vitest/expect': 0.34.5 + '@vitest/runner': 0.34.5 + '@vitest/snapshot': 0.34.5 + '@vitest/spy': 0.34.5 + '@vitest/utils': 0.34.5 + acorn: 8.10.0 acorn-walk: 8.2.0 cac: 6.7.14 - chai: 4.3.7 - concordance: 5.0.4 + chai: 4.3.10 debug: 4.3.4 local-pkg: 0.4.3 - magic-string: 0.30.0 - pathe: 1.1.0 + magic-string: 0.30.4 + pathe: 1.1.1 picocolors: 1.0.0 - source-map: 0.6.1 - std-env: 3.3.2 + std-env: 3.4.3 strip-literal: 1.0.1 tinybench: 2.5.0 - tinypool: 0.4.0 - vite: 4.3.3(@types/node@18.16.3) - vite-node: 0.30.1(@types/node@18.16.3) + tinypool: 0.7.0 + vite: 4.4.11(@types/node@18.16.3) + vite-node: 0.34.5(@types/node@18.16.3) why-is-node-running: 2.2.2 transitivePeerDependencies: - less + - lightningcss - sass - stylus - sugarss @@ -3936,6 +4259,10 @@ packages: - terser dev: true + /vlq@0.2.3: + resolution: {integrity: sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==} + dev: true + /vscode-oniguruma@1.7.0: resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} dev: true @@ -3944,8 +4271,8 @@ packages: resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} dev: true - /vue-demi@0.14.0(vue@3.3.4): - resolution: {integrity: sha512-gt58r2ogsNQeVoQ3EhoUAvUsH9xviydl0dWJj7dabBC/2L4uBId7ujtCwDRD0JhkGsV1i0CtfLAeyYKBht9oWg==} + /vue-demi@0.14.6(vue@3.3.4): + resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} engines: {node: '>=12'} hasBin: true requiresBuild: true @@ -3979,11 +4306,6 @@ packages: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: true - /well-known-symbols@2.0.0: - resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} - engines: {node: '>=6'} - dev: true - /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: @@ -4118,11 +4440,6 @@ packages: decamelize: 1.2.0 dev: true - /yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - dev: true - /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -4145,19 +4462,6 @@ packages: yargs-parser: 18.1.3 dev: true - /yargs@16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - dev: true - /yargs@17.7.1: resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==} engines: {node: '>=12'} @@ -4181,6 +4485,15 @@ packages: engines: {node: '>=12.20'} dev: true + /zod-validation-error@1.5.0(zod@3.22.4): + resolution: {integrity: sha512-/7eFkAI4qV0tcxMBB/3+d2c1P6jzzZYdYSlBuAklzMuCrJu5bzJfHS0yVAS87dRHVlhftd6RFJDIvv03JgkSbw==} + engines: {node: '>=16.0.0'} + peerDependencies: + zod: ^3.18.0 + dependencies: + zod: 3.22.4 + dev: true + /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} dev: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fb4f503e..c13129a0 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,5 @@ -prefer-workspace-packages: true packages: - - '.' - 'docs' - - 'examples' - - 'playground' + - 'packages/*' + - 'packages/register-tests/*' + - 'playgrounds/*' diff --git a/scripts/prepublishOnly.ts b/scripts/prepublishOnly.ts deleted file mode 100644 index 4972ae2e..00000000 --- a/scripts/prepublishOnly.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { readJsonSync, writeJsonSync } from 'fs-extra' -import path from 'path' - -// Generates a package.json to be published to NPM with only the necessary fields. -const packageJsonPath = path.join(__dirname, '../package.json') -const tmpPackageJson = readJsonSync(packageJsonPath) - -writeJsonSync(`${packageJsonPath}.tmp`, tmpPackageJson, { spaces: 2 }) - -const { - ['simple-git-hooks']: _sgh, - devDependencies: _dD, - packageManager: _pM, - pnpm: _p, - scripts: _s, - // NOTE: We explicitly don't want to publish the type field. We create a separate package.json for `dist/cjs` and `dist/esm` that has the type field. - type: _t, - ...rest -} = tmpPackageJson -writeJsonSync(packageJsonPath, rest, { spaces: 2 }) diff --git a/scripts/updateVersion.ts b/scripts/updateVersion.ts deleted file mode 100644 index 4b0da0b2..00000000 --- a/scripts/updateVersion.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { readJsonSync, writeFileSync } from 'fs-extra' -import path from 'path' - -// Writes the current package.json version to `./src/version.ts`. -const versionFilePath = path.join(__dirname, '../src/version.ts') -const packageJsonPath = path.join(__dirname, '../package.json') -const packageVersion = readJsonSync(packageJsonPath).version - -writeFileSync(versionFilePath, `export const version = '${packageVersion}'\n`) diff --git a/src/config.test-d.ts b/src/config.test-d.ts deleted file mode 100644 index c5ba875d..00000000 --- a/src/config.test-d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { assertType, test } from 'vitest' - -import type { ResolvedConfig } from './config.js' - -// For testing updates to config properties: -// declare module './config.js' { -// export interface Config { -// FixedArrayMaxLength: 6 -// } -// } - -test('Config', () => { - assertType(false) - assertType(1) - assertType(99) - - type AddressType = ResolvedConfig['AddressType'] - assertType('0x0000000000000000000000000000000000000000') - - type BytesType = ResolvedConfig['BytesType'] - assertType({ - inputs: '0xfoobarbaz', - outputs: '0xfoobarbaz', - }) - - type IntType = ResolvedConfig['IntType'] - assertType(123) - - type BigIntType = ResolvedConfig['BigIntType'] - assertType(123n) - - type StrictAbiType = ResolvedConfig['StrictAbiType'] - assertType(false) -}) diff --git a/tsconfig.build.json b/tsconfig.build.json deleted file mode 100644 index 85baf55a..00000000 --- a/tsconfig.build.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - // This file is used to compile the for cjs and esm (see package.json build scripts). It should exclude all test files. - "extends": "./tsconfig.base.json", - "include": ["src"], - "exclude": [ - "src/**/*.test.ts", - "src/**/*.test-d.ts", - "src/**/*.bench.ts" - ], - "compilerOptions": { - "sourceMap": true, - "rootDir": "./src" - } -} diff --git a/tsconfig.json b/tsconfig.json index 10812e8c..2d2e9169 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,9 @@ { // This configuration is used for local development and type checking. "extends": "./tsconfig.base.json", - "include": ["examples", "src", "test"], + "include": [".scripts/**/*.ts", "vitest.workspace.ts"], "exclude": [], - "references": [{ "path": "./tsconfig.node.json" }], + "compilerOptions": { + "types": ["bun-types"] + } } diff --git a/tsconfig.node.json b/tsconfig.node.json deleted file mode 100644 index a46e511f..00000000 --- a/tsconfig.node.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - // This configuration is used for local development and type checking of configuration and script files that are not part of the build. - "include": ["vite.config.ts", "scripts"], - "compilerOptions": { - "strict": true, - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true - } -} diff --git a/vitest.config.ts b/vitest.config.ts index 358cd4aa..fc750a76 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -7,16 +7,7 @@ export default defineConfig({ reporters: ['verbose'], }, coverage: { - exclude: [ - 'src/test/**', - 'src/**/*.test.ts', - 'src/**/index.ts', - 'src/test.ts', - ], - reporter: ['text', 'json', 'html'], + reporter: process.env.CI ? ['lcov'] : ['text', 'json', 'html'], }, - environment: 'node', - include: ['src/**/*.test.ts'], - setupFiles: ['./test/setup.ts'], }, }) diff --git a/vitest.workspace.ts b/vitest.workspace.ts new file mode 100644 index 00000000..6009e332 --- /dev/null +++ b/vitest.workspace.ts @@ -0,0 +1,27 @@ +import path from 'path' +import { defineWorkspace } from 'vitest/config' + +const resolve = { + alias: { + abitype: path.resolve(__dirname, './packages/abitype/src'), + }, +} + +export default defineWorkspace([ + { + test: { + name: 'abitype', + environment: 'node', + setupFiles: ['./packages/abitype/test/setup.ts'], + include: ['./packages/abitype/**/*.test.ts'], + }, + }, + { + resolve, + test: { + name: 'default-register', + environment: 'node', + include: ['./packages/default-register/**/*.test.ts'], + }, + }, +])