Skip to content

fix derive CLI version from package metadata#121

Open
NianJiuZst wants to merge 1 commit intoMiniMax-AI:mainfrom
NianJiuZst:codex/fix-version-source
Open

fix derive CLI version from package metadata#121
NianJiuZst wants to merge 1 commit intoMiniMax-AI:mainfrom
NianJiuZst:codex/fix-version-source

Conversation

@NianJiuZst
Copy link
Copy Markdown
Contributor

Summary

  • add a shared CLI_VERSION sourced from package.json when no build override is present
  • use the shared version for --version, User-Agent, and the update command
  • make build:dev reuse build.ts so it no longer hardcodes an old version
  • add regression coverage for dev-mode version output and User-Agent

Root cause

Several source paths fell back to stale hardcoded versions, including 1.0.4, while package.json is currently 1.0.12. The development build script also injected the stale version explicitly.

Validation

  • bun run dev --version
  • bun test test/version.test.ts test/client/http.test.ts
  • bun run typecheck
  • bunx eslint src/version.ts src/main.ts src/client/http.ts src/commands/update.ts build.ts test/version.test.ts test/client/http.test.ts
  • bun run build:dev
  • node dist/mmx.mjs --version
  • bun test

Note: full repository lint still has pre-existing failures in unrelated tests: test/auth/timeout-fix.test.ts and test/client/stream.test.ts.

@NianJiuZst NianJiuZst marked this pull request as ready for review April 29, 2026 18:04
@NianJiuZst NianJiuZst changed the title [codex] derive CLI version from package metadata fix derive CLI version from package metadata Apr 29, 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