Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: bump attest #237

Merged
merged 10 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ jobs:
- name: Check types (--exactOptionalPropertyTypes false)
run: pnpm typecheck:propertyTypes

- name: Bench types
run: pnpm typebench

# Redundant with `pnpm typecheck`
# If Vitest adds special features in the future, e.g. type coverage, can add this back!
# - name: Test types
Expand Down
54 changes: 27 additions & 27 deletions docs/pages/api/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Converts `AbiParameter` to corresponding TypeScript primitive type.

| Name | Description | Type |
| ------------------- | -------------------------------------------------- | ----------------------------- |
| `TAbiParameter` | Parameter to convert to TypeScript representation. | `AbiParameter` |
| `TAbiParameterKind` | Kind to narrow by parameter type. | `AbiParameterKind` (optional) |
| returns | TypeScript primitive type. | `TType` (inferred) |
| `abiParameter` | Parameter to convert to TypeScript representation. | `AbiParameter` |
| `abiParameterKind` | Kind to narrow by parameter type. | `AbiParameterKind` (optional) |
| returns | TypeScript primitive type. | `type` (inferred) |

#### Example

Expand All @@ -37,9 +37,9 @@ Converts array of `AbiParameter` to corresponding TypeScript primitive types.

| Name | Description | Type |
| ------------------- | ---------------------------------------------------- | ----------------------------- |
| `TAbiParameters` | Parameters to convert to TypeScript representations. | `readonly AbiParameter[]` |
| `TAbiParameterKind` | Kind to narrow by parameter type. | `AbiParameterKind` (optional) |
| returns | TypeScript primitive types. | `TType[]` (inferred) |
| `abiParameters` | Parameters to convert to TypeScript representations. | `readonly AbiParameter[]` |
| `abiParameterKind` | Kind to narrow by parameter type. | `AbiParameterKind` (optional) |
| returns | TypeScript primitive types. | `type[]` (in ferred) |

#### Example

Expand All @@ -62,9 +62,9 @@ Converts `AbiType` to corresponding TypeScript primitive type.

| Name | Description | Type |
| ------------------- | ------------------------------------------------- | ----------------------------- |
| `TAbiType` | ABI type to convert to TypeScript representation. | `AbiType` |
| `TAbiParameterKind` | Kind to narrow by parameter type. | `AbiParameterKind` (optional) |
| returns | TypeScript primitive type. | `TType` (inferred) |
| `abiType` | ABI type to convert to TypeScript representation. | `AbiType` |
| `abiParameterKind` | Kind to narrow by parameter type. | `AbiParameterKind` (optional) |
| returns | TypeScript primitive type. | `type` (inferred) |

:::info[NOTE]
Does not include full array or tuple conversion. Use [`AbiParameterToPrimitiveType`](#abiparametertoprimitivetype) to fully convert array and tuple types.
Expand All @@ -86,8 +86,8 @@ Extracts `AbiError` with name from `Abi`.

| Name | Description | Type |
| ------------ | -------------- | ------------------- |
| `TAbi` | ABI. | `Abi` |
| `TErrorName` | Name of error. | `string` (inferred) |
| `abi` | ABI. | `Abi` |
| `errorName` | Name of error. | `string` (inferred) |
| returns | ABI Error. | `AbiError` |

#### Example
Expand Down Expand Up @@ -115,7 +115,7 @@ Extracts all `AbiError` names from `Abi`.

| Name | Description | Type |
| ------- | ---------------- | ------------------- |
| `TAbi` | ABI. | `Abi` |
| `abi` | ABI. | `Abi` |
| returns | ABI Error names. | `string` (inferred) |

#### Example
Expand All @@ -139,7 +139,7 @@ Extracts all `AbiError` types from `Abi`.

| Name | Description | Type |
| ------- | ----------- | ------------------ |
| `TAbi` | ABI. | `Abi` |
| `abi` | ABI. | `Abi` |
| returns | ABI Errors. | `AbiError` (union) |

#### Example
Expand Down Expand Up @@ -171,8 +171,8 @@ Extracts `AbiEvent` with name from `Abi`.

| Name | Description | Type |
| ------------ | -------------- | ------------------- |
| `TAbi` | ABI. | `Abi` |
| `TEventName` | Name of event. | `string` (inferred) |
| `abi` | ABI. | `Abi` |
| `eventName` | Name of event. | `string` (inferred) |
| returns | ABI Event. | `AbiEvent` |

#### Example
Expand Down Expand Up @@ -228,7 +228,7 @@ Extracts all `AbiEvent` names from `Abi`.

| Name | Description | Type |
| ------- | ---------------- | ------------------- |
| `TAbi` | ABI. | `Abi` |
| `abi` | ABI. | `Abi` |
| returns | ABI Error names. | `string` (inferred) |

#### Example
Expand Down Expand Up @@ -270,7 +270,7 @@ Extracts all `AbiEvent` types from `Abi`.

| Name | Description | Type |
| ------- | ----------- | ------------------ |
| `TAbi` | ABI. | `Abi` |
| `abi` | ABI. | `Abi` |
| returns | ABI Events. | `AbiEvent` (union) |

#### Example
Expand Down Expand Up @@ -324,9 +324,9 @@ Extracts `AbiFunction` with name from `Abi`.

| Name | Description | Type |
| --------------------- | --------------------- | ------------------------------- |
| `TAbi` | ABI. | `Abi` |
| `TFunctionName` | Name of function. | `string` (inferred) |
| `TAbiStateMutability` | ABI state mutability. | `AbiStateMutability` (optional) |
| `abi` | ABI. | `Abi` |
| `functionName` | Name of function. | `string` (inferred) |
| `abiStateMutability` | ABI state mutability. | `AbiStateMutability` (optional) |
| returns | ABI Function. | `AbiFunction` |

#### Example
Expand Down Expand Up @@ -377,8 +377,8 @@ Extracts all `AbiFunction` names from `Abi`.

| Name | Description | Type |
| --------------------- | --------------------- | ------------------------------- |
| `TAbi` | ABI. | `Abi` |
| `TAbiStateMutability` | ABI state mutability. | `AbiStateMutability` (optional) |
| `abi` | ABI. | `Abi` |
| `abiStateMutability` | ABI state mutability. | `AbiStateMutability` (optional) |
| returns | ABI Event names. | `string` (inferred) |

#### Example
Expand Down Expand Up @@ -418,7 +418,7 @@ Extracts all `AbiFunction` types from `Abi`.

| Name | Description | Type |
| ------- | -------------- | --------------------- |
| `TAbi` | ABI. | `Abi` |
| `abi` | ABI. | `Abi` |
| returns | ABI Functions. | `AbiFunction` (union) |

#### Example
Expand Down Expand Up @@ -477,7 +477,7 @@ Checks if type is `Abi`.

| Name | Description | Type |
| ------- | ----------------------------------------------------- | --------- |
| `TAbi` | ABI. | `Abi` |
| `abi` | ABI. | `Abi` |
| returns | Boolean value. `true` if valid `Abi`, `false` if not. | `boolean` |

#### Example
Expand Down Expand Up @@ -517,7 +517,7 @@ Checks if type is `TypedData`.

| Name | Description | Type |
| ------------ | ----------------------------------------------------------- | ----------- |
| `TTypedData` | EIP-712 Typed Data schema. | `TypedData` |
| `typedData` | EIP-712 Typed Data schema. | `TypedData` |
| returns | Boolean value. `true` if valid `TypedData`, `false` if not. | `boolean` |

#### Example
Expand Down Expand Up @@ -548,8 +548,8 @@ Converts [EIP-712](https://eips.ethereum.org/EIPS/eip-712#definition-of-typed-st

| Name | Description | Type |
| ------------ | ------------------------------------ | -------------------------------------- |
| `TTypedData` | EIP-712 Typed Data schema. | `TypedData` |
| returns | TypeScript representation of schema. | `{ [name: string]: TType }` (inferred) |
| `typedData` | EIP-712 Typed Data schema. | `TypedData` |
| returns | TypeScript representation of schema. | `{ [name: string]: type }` (inferred) |

#### Example

Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@
"test:typecheck": "vitest typecheck -c ./packages/abitype/test/vitest.config.ts",
"test:update": "vitest --update",
"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\"",
"typebench": "pnpm run --r --parallel typebench",
"typecheck": "pnpm run --r --parallel typecheck && tsc --noEmit",
"typecheck:propertyTypes": "pnpm run --r --parallel typecheck --exactOptionalPropertyTypes false && tsc --noEmit --exactOptionalPropertyTypes false",
"typeperf": "pnpm run --r --parallel typeperf",
"version:update": "bun .scripts/updateVersion.ts"
},
"devDependencies": {
"@arktype/attest": "0.0.4",
"@arktype/attest": "0.8.0",
"@biomejs/biome": "^1.8.0",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.27.1",
Expand All @@ -46,11 +45,10 @@
"publint": "^0.2.7",
"sherif": "^0.8.4",
"simple-git-hooks": "^2.11.1",
"tsx": "^4.7.0",
"typescript": "5.0.4",
"typescript": "5.4.5",
"vitest": "^1.6.0"
},
"packageManager": "pnpm@9.0.4",
"packageManager": "pnpm@9.1.4",
"simple-git-hooks": {
"pre-commit": "pnpm format && pnpm lint:fix"
},
Expand Down
1 change: 0 additions & 1 deletion packages/abitype/jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"exclude": [
"src/**/*.bench.ts",
"src/**/*.test.ts",
"src/**/*.bench-d.ts",
"src/**/*.test-d.ts"
]
}
Expand Down
4 changes: 1 addition & 3 deletions packages/abitype/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
"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 && echo > ./dist/esm/package.json '{\"type\":\"module\",\"sideEffects\":false}'",
"build:esm+types": "tsc --project tsconfig.build.json --module nodenext --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types && echo > ./dist/esm/package.json '{\"type\":\"module\",\"sideEffects\":false}'",
"clean": "rm -rf dist tsconfig.tsbuildinfo abis zod",
"test:build": "publint --strict",
"typebench": "tsx src/**.bench-d.ts --benchPercentThreshold 20 --benchErrorOnThresholdExceeded",
"typecheck": "tsc --noEmit",
"typeperf": "tsc --noEmit --extendedDiagnostics --composite false --incremental false"
},
Expand All @@ -21,7 +20,6 @@
"src/**/*.ts",
"!dist/**/*.tsbuildinfo",
"!jsr.json",
"!src/**/*.bench-d.ts",
"!src/**/*.bench.ts",
"!src/**/*.test-d.ts",
"!src/**/*.test.ts"
Expand Down
101 changes: 0 additions & 101 deletions packages/abitype/src/utils.bench-d.ts

This file was deleted.

Loading
Loading