Repository navigation
fix(version): unify hardcoded version strings to pkg.version (v0.8.0) - #5
Merged
Merged
Conversation
- cli/index.ts: .version("0.1.0") → .version(pkg.version)
- mcp/server.ts: SERVER_VERSION = pkg.version
- archive/ttsmod.ts: TOOL_VERSION = pkg.version
- archive/detect.ts / assets/check.ts / assets/fetch.ts / host/s3.ts:
user-agent string now built from pkg.version
All 7 sites now follow the pattern established in hub/control.ts:111
(import pkg from "../../package.json" with { type: "json" }).
Future version bumps only need to update package.json.
Also:
- Bump package.json version to 0.8.0 (MINOR — hub contract extension)
- Add CHANGELOG [0.8.0] section + backfill [0.7.1] section
- Update archive-ttsmod.test.ts to assert version === pkg.version
- Update phase4.acceptance.test.ts TODO comment to reference pkg.version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
7 处 version 硬编码统一为
pkg.version(与 hub/control.ts:111 先例一致):src/cli/index.ts:89.version("0.1.0").version(pkg.version)src/mcp/server.ts:65SERVER_VERSION = "0.1.0"SERVER_VERSION = pkg.versionsrc/archive/ttsmod.ts:110TOOL_VERSION = "0.1.0"TOOL_VERSION = pkg.versionsrc/archive/detect.ts:292user-agent: "tts-toolkit/0.1.0"`tts-toolkit/${pkg.version}`src/assets/check.ts:42src/assets/fetch.ts:78src/host/s3.ts:62附带
package.jsonversion 0.7.1 → 0.8.0(MINOR bump,hub 契约扩展)package-lock.json同步archive-ttsmod.test.ts断言同步改为version: pkg.versionphase4.acceptance.test.tsTODO 注释同步验收
npm run build干净(tsc 无错)npm test→ 2057 passed / 70 skipped / 0 failed(基线不破)node dist/cli/index.js --version→0.8.0✓后续
merge 后打
v0.8.0tag,release.yml 自动发 npm(v8-final Stage D)。