fix(kimi-code): add pino-pretty as runtime dependency

add pino-pretty to apps/kimi-code dependencies to fix server startup when pretty logging is enabled\nadd regression test verifying the dependency is declared\ninclude changeset for patch release
This commit is contained in:
haozhe.yang 2026-06-11 18:33:12 +08:00
parent 334e143057
commit 59b5e69308
4 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---
Fix server startup from npm-installed CLI packages when pretty logging is enabled.

View file

@ -78,6 +78,7 @@
"cli-highlight": "^2.1.11",
"commander": "^13.1.0",
"pathe": "^2.0.3",
"pino-pretty": "^13.0.0",
"semver": "^7.7.4",
"smol-toml": "^1.6.1",
"zod": "^4.3.6"

View file

@ -8,6 +8,8 @@
* Foreground startup behavior is exercised end-to-end in `server-e2e/`.
*/
import { readFileSync } from 'node:fs';
import { Command } from 'commander';
import { describe, expect, it, vi } from 'vitest';
@ -21,6 +23,14 @@ function makeProgram(): Command {
}
describe('kimi server', () => {
it('declares the pino pretty transport as a CLI runtime dependency', () => {
const packageJson = JSON.parse(
readFileSync(new URL('../../../package.json', import.meta.url), 'utf-8'),
) as { dependencies?: Record<string, string> };
expect(packageJson.dependencies).toHaveProperty('pino-pretty');
});
it('registers `server` with all six lifecycle subcommands plus `run`', () => {
const program = makeProgram();
const server = program.commands.find((c) => c.name() === 'server');

3
pnpm-lock.yaml generated
View file

@ -90,6 +90,9 @@ importers:
pathe:
specifier: ^2.0.3
version: 2.0.3
pino-pretty:
specifier: ^13.0.0
version: 13.1.3
semver:
specifier: ^7.7.4
version: 7.7.4