mirror of
https://github.com/hanzoai/viem.git
synced 2026-10-30 19:36:39 +00:00
- src/ -> src-old/, test/ -> test-old/; the test/tempo submodule and trusted-setups/ keep their paths - new src/: core/internal helpers (types, errors, uid, lru, regex, wait, poll, stringify, observe, promise), Errors module (BaseError extends ox Errors.BaseError; setConfig replaces setErrorConfig), Hex/Bytes/Rlp namespaces re-exporting ox - v2 unit suites ported into colocated _test/ directories (202 tests); test/src/utils.ts createHttpServer extracted from the v2 test infra - tooling: exports map regenerated from the new tree; version:update writes src/version.ts; vite fmt/lint/test exclude the frozen trees; knip entry/ignores rewritten; size-limit reset to the root entry (7 kB); @noble/* and @scure/* removed from published dependencies Co-Authored-By: Claude Fable 5 <[email protected]>
11 lines
404 B
TypeScript
11 lines
404 B
TypeScript
import { join } from 'node:path'
|
|
|
|
// Writes the current package.json version to `./src/version.ts`.
|
|
const versionFilePath = join(import.meta.dir, '../src/version.ts')
|
|
const packageJsonPath = join(import.meta.dir, '../package.json')
|
|
const packageVersion = (await Bun.file(packageJsonPath).json()).version
|
|
Bun.write(
|
|
versionFilePath,
|
|
`/** @internal */\nexport const version = '${packageVersion}'\n`,
|
|
)
|