mirror of
https://github.com/hanzoai/viem.git
synced 2026-10-30 19:36:39 +00:00
* ci: harden publish workflow * ci: remove jsr publishing config --------- Co-authored-by: jxom <[email protected]>
8 lines
397 B
TypeScript
8 lines
397 B
TypeScript
import { join } from 'node:path'
|
|
|
|
// Writes the current package.json version to `./src/errors/version.ts`.
|
|
const versionFilePath = join(import.meta.dir, '../src/errors/version.ts')
|
|
const packageJsonPath = join(import.meta.dir, '../src/package.json')
|
|
const packageVersion = (await Bun.file(packageJsonPath).json()).version
|
|
Bun.write(versionFilePath, `export const version = '${packageVersion}'\n`)
|