forked from wevm/viem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
206 lines (206 loc) · 7.52 KB
/
package.json
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
{
"private": true,
"type": "module",
"scripts": {
"bench": "vitest bench",
"bench:types": "TYPES=true vitest -c ./test/vitest.config.ts bench-d.ts",
"build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types",
"build:cjs": "pnpm build:trustedSetups:start && tsc --project ./tsconfig.build.json --module commonjs --outDir ./src/_cjs --removeComments --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./src/_cjs/package.json && pnpm build:trustedSetups:end",
"build:esm": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./src/_esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./src/_esm/package.json",
"build:trustedSetups:start": "mv src/node/trustedSetups.ts src/node/trustedSetups_esm.ts && mv src/node/trustedSetups_cjs.ts src/node/trustedSetups.ts",
"build:trustedSetups:end": "mv src/node/trustedSetups.ts src/node/trustedSetups_cjs.ts && mv src/node/trustedSetups_esm.ts src/node/trustedSetups.ts",
"build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./src/_types --emitDeclarationOnly --declaration --declarationMap",
"changeset:prepublish": "pnpm version:update && bun scripts/prepublishOnly.ts && pnpm build",
"changeset:publish": "pnpm changeset:prepublish && changeset publish",
"changeset:version": "changeset version && pnpm install --lockfile-only && pnpm version:update && pnpm format",
"clean": "rm -rf *.tsbuildinfo src/*.tsbuildinfo src/_esm src/_cjs src/_types",
"contracts:build": "forge build --config-path ./contracts/foundry.toml && bun scripts/generateTypedArtifacts.ts",
"deps": "pnpx taze -r",
"docs:dev": "pnpm --filter site dev",
"docs:build": "pnpm --filter site build",
"format": "biome format --write",
"lint": "biome check --fix",
"lint:repo": "sherif",
"lint:unused": "pnpm clean && knip",
"postinstall": "git submodule update --init --recursive && pnpm contracts:build",
"preconstruct": "bun scripts/preconstruct.ts",
"preinstall": "pnpx only-allow pnpm",
"prepare": "pnpm simple-git-hooks",
"prepublishOnly": "bun scripts/prepublishOnly.ts",
"size": "size-limit",
"test": "vitest -c ./test/vitest.config.ts dev",
"test:build": "publint --strict ./src && attw --pack ./src --ignore-rules false-esm",
"test:chains": "vitest test/scripts/chains.test.ts",
"test:ci": "CI=true vitest -c ./test/vitest.config.ts --coverage --retry=3 --bail=1",
"test:cov": "vitest dev -c ./test/vitest.config.ts --coverage",
"test:env": "pnpm test:env:bun && pnpm test:env:next && pnpm test:env:node && pnpm test:env:tsc && pnpm test:env:vite",
"test:env:bun": "pnpm --filter test-bun test",
"test:env:next": "pnpm --filter test-next test",
"test:env:node": "pnpm --filter test-node test",
"test:env:tsc": "pnpm --filter test-tsc test",
"test:env:vite": "pnpm --filter test-vite test",
"test:typecheck": "SKIP_GLOBAL_SETUP=true vitest --typecheck.only -c ./test/vitest.config.ts",
"test:ui": "vitest dev -c ./test/vitest.config.ts --ui",
"typecheck": "tsc --noEmit",
"vectors": "bun test vectors/**/*.test.ts",
"vectors:generate": "bun vectors/generate.ts",
"version:update": "bun scripts/updateVersion.ts"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@ark/attest": "^0.10.2",
"@biomejs/biome": "^1.8.0",
"@changesets/changelog-github": "^0.4.5",
"@changesets/cli": "^2.23.2",
"@ethereumjs/rlp": "^5.0.0",
"@pimlico/alto": "0.0.4",
"@size-limit/preset-big-lib": "^11.1.2",
"@types/bun": "^1.1.3",
"@types/node": "^20.14.0",
"@vitest/coverage-v8": "^1.0.4",
"@vitest/ui": "^1.0.4",
"bun": "^1.1.12",
"c-kzg": "^2.1.2",
"ethers": "^6.0.2",
"glob": "^10.4.1",
"knip": "^5.17.4",
"prool": "^0.0.16",
"publint": "^0.2.8",
"sherif": "^0.8.4",
"simple-git-hooks": "^2.8.1",
"size-limit": "^11.1.2",
"typescript": "5.5.2",
"vitest": "^1.0.4"
},
"trustedDependencies": ["c-kzg"],
"packageManager": "[email protected]",
"engines": {
"node": "22.x"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint"
},
"knip": {
"ignore": [".github/**", "environments/**", "vectors/**"],
"ignoreBinaries": ["dev", "forge", "only-allow", "printf"],
"ignoreDependencies": ["bun", "@size-limit/preset-big-lib"],
"ignoreWorkspaces": ["examples/**", "test"],
"vitest": {
"config": ["test/vitest.config.ts"],
"entry": ["**/*.{bench,bench-d,test,test-d,spec}.?(c|m)[jt]s?(x)"]
},
"workspaces": {
".": {
"project": "scripts/*.ts"
},
"src": {
"entry": [
"index.ts!",
"{account-abstraction,accounts,actions,celo,chains,ens,experimental,experimental/erc7739,linea,node,nonce,op-stack,siwe,utils,window,zksync}/index.ts!",
"chains/utils.ts!"
],
"ignore": ["node/trustedSetups_cjs.ts"]
},
"site": {
"project": ["**/*.ts", "**/*.tsx"]
}
}
},
"size-limit": [
{
"name": "import * from 'viem' (esm)",
"path": "./src/_esm/index.js",
"limit": "66.5 kB",
"import": "*"
},
{
"name": "const viem = require('viem') (cjs)",
"path": "./src/_cjs/index.js",
"limit": "78 kB"
},
{
"name": "import { createClient, http } from 'viem'",
"path": "./src/_esm/index.js",
"limit": "6.4 kB",
"import": "{ createClient, http }"
},
{
"name": "import * from 'viem/account-abstraction'",
"path": "./src/_esm/account-abstraction/index.js",
"limit": "45.5 kB",
"import": "*"
},
{
"name": "import { toCoinbaseSmartAccount } from 'viem/account-abstraction'",
"path": "./src/_esm/account-abstraction/index.js",
"limit": "35 kB",
"import": "{ toCoinbaseSmartAccount }"
},
{
"name": "import * from 'viem/accounts'",
"path": "./src/_esm/accounts/index.js",
"limit": "97 kB",
"import": "*"
},
{
"name": "import { privateKeyToAccount } from 'viem/accounts'",
"path": "./src/_esm/accounts/index.js",
"limit": "20 kB",
"import": "{ privateKeyToAccount }"
},
{
"name": "import * from 'viem/actions'",
"path": "./src/_esm/actions/index.js",
"limit": "51 kB",
"import": "*"
},
{
"name": "import { getBlockNumber } from 'viem/actions'",
"path": "./src/_esm/actions/index.js",
"limit": "1 kB",
"import": "{ getBlockNumber }"
},
{
"name": "import * from 'viem/chains'",
"path": "./src/_esm/chains/index.js",
"limit": "38 kB",
"import": "*"
},
{
"name": "import { mainnet } from 'viem/chains'",
"path": "./src/_esm/chains/index.js",
"limit": "500 B",
"import": "{ mainnet }"
},
{
"name": "import * from 'viem/chains/utils'",
"path": "./src/_esm/chains/utils.js",
"limit": "8 kB",
"import": "*"
},
{
"name": "import * from 'viem/ens'",
"path": "./src/_esm/ens/index.js",
"limit": "47 kB",
"import": "*"
},
{
"name": "import { getEnsAvatar } from 'viem/ens'",
"path": "./src/_esm/ens/index.js",
"limit": "23 kB",
"import": "{ getEnsAvatar }"
},
{
"name": "import * from 'viem/siwe'",
"path": "./src/_esm/siwe/index.js",
"limit": "32 kB",
"import": "*"
},
{
"name": "import { verifySiweMessage } from 'viem/siwe'",
"path": "./src/_esm/siwe/index.js",
"limit": "31 kB",
"import": "{ verifySiweMessage }"
}
]
}