Skip to content

fix: print clean cli version to fix publish verify step#5

Merged
dmitriyzhuk merged 1 commit into
mainfrom
fix/cli-version-output
Jun 23, 2026
Merged

fix: print clean cli version to fix publish verify step#5
dmitriyzhuk merged 1 commit into
mainfrom
fix/cli-version-output

Conversation

@dmitriyzhuk

Copy link
Copy Markdown
Contributor

Проблема

Publish CLI на main упал на шаге Verify built binary reports the package version:

Built binary reports v[log] 0.1.10 but package.json is v0.1.10 — refusing to publish a stale dist.

citty прокидывает --version через consola, а её CI-репортёр (при CI=1) префиксит вывод [log] . Поэтому node dist/ranch.mjs --version в CI отдаёт [log] 0.1.10, и строгая проверка версии падает (хотя версия верная).

Фикс

Перехватываю top-level --version/-v в runMain и печатаю версию через console.log до citty — чистый вывод везде (CI, пайпы, интерактив). Заодно чинит ranch --version для пользователей в CI/скриптах.

Проверено локально с CI=true: --version и -v отдают 0.1.10, симуляция CI-шага проходит. Версия не бампается — 0.1.10 в npm не попала (publish упал раньше).

🤖 Generated with Claude Code

citty routes --version through consola, whose CI reporter prefixes output with [log], so node dist/ranch.mjs --version returned [log] 0.1.10 in CI and the publish stale-dist check failed. Intercept a top-level --version/-v in runMain and print the version with console.log before citty, so the output is clean everywhere.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dmitriyzhuk dmitriyzhuk merged commit 333e997 into main Jun 23, 2026
1 check passed
@dmitriyzhuk dmitriyzhuk mentioned this pull request Jun 23, 2026
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.

1 participant