Skip to content
Myr

version.ts

This file

Path

apps/cli/src/version.ts

10 lines · 422 bytes · TypeScript

Last changed by

Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f

History of this file

Take it

Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f

lines 1–2why, one step back
1// Both bundlers (tsdown, `bun build --compile`) replace `import.meta.env.CLI_BUILD_VERSION`; an unbuilt run reads `0.0.0`.
2// Bun reads `import.meta.env` from the process env, so an unbuilt Bun run with it set reports that instead.

Merge build/1104 into mainoscabrielbefore adoption82cc398

lines 3–10why, one step back
3
4declare global {5 interface ImportMeta {6 readonly env: { readonly CLI_BUILD_VERSION?: string };7 }8}910export const cliVersion: string = import.meta.env.CLI_BUILD_VERSION ?? "0.0.0";