Skip to content

fix(npm): prefer binary version output#2562

Draft
cyq1017 wants to merge 1 commit into
Hmbown:mainfrom
cyq1017:codex/2561-npm-version-binary
Draft

fix(npm): prefer binary version output#2562
cyq1017 wants to merge 1 commit into
Hmbown:mainfrom
cyq1017:codex/2561-npm-version-binary

Conversation

@cyq1017
Copy link
Copy Markdown
Contributor

@cyq1017 cyq1017 commented Jun 2, 2026

Fixes #2561.

Problem:

  • The npm wrapper handled --version / -V before launching the installed binary.
  • If the wrapper package metadata lagged behind a locally updated binary, codew -V could report an older version while the TUI showed the newer binary version.

Change:

  • Run the installed binary for version flags when it is available.
  • Keep the existing package metadata fallback when the binary cannot be resolved or spawned.
  • Add wrapper tests for both paths.

Verification:

  • node --test npm/codewhale/test/run.test.js
  • node --test npm/codewhale/test/*.test.js
  • node npm/codewhale/bin/codew.js --version
  • scripts/release/check-versions.sh
  • git diff --check

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cyq1017 has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

This was referenced Jun 2, 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