Skip to content

Fix CLI_VERSION ReferenceError in pnpm dev#94

Merged
RomainCscn merged 1 commit into
mainfrom
romain/lin-71369-linear-release-pnpm-dev-crashes-cli_version-not-defined-18ea
May 21, 2026
Merged

Fix CLI_VERSION ReferenceError in pnpm dev#94
RomainCscn merged 1 commit into
mainfrom
romain/lin-71369-linear-release-pnpm-dev-crashes-cli_version-not-defined-18ea

Conversation

@RomainCscn
Copy link
Copy Markdown
Collaborator

CLI_VERSION is only injected by bun build --define, so pnpm dev (which runs via node --import=tsx) crashed with ReferenceError: CLI_VERSION is not defined. Replaced the raw global references in src/index.ts with the existing getCliVersion() helper from src/version.ts, which falls back to "dev" when the define isn't present.

Verified: pnpm dev --version now prints dev instead of crashing.

Replace raw CLI_VERSION global references in src/index.ts with the
getCliVersion() helper from src/version.ts, which safely falls back to
"dev" when the build-time define isn't injected.
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 21, 2026

LIN-71369

@RomainCscn RomainCscn marked this pull request as ready for review May 21, 2026 13:55
@RomainCscn RomainCscn enabled auto-merge (squash) May 21, 2026 13:55
@RomainCscn RomainCscn merged commit 24407d8 into main May 21, 2026
10 checks passed
@RomainCscn RomainCscn deleted the romain/lin-71369-linear-release-pnpm-dev-crashes-cli_version-not-defined-18ea branch May 21, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants