shell/CHANGELOG.md
AI Engineer 12690e8b91 feat(shell): 新增 Start 方法支持异步进程管理(by AI)
- 新增 Start(name, args, opts) 异步启动命令,立即返回 *Process
- Process 提供 Kill/Read/Write/Check 方法管理子进程生命周期
- stdout/stderr 默认流式输出到终端,同时缓冲供 Read 读取
- Kill 优雅终止:先 SIGTERM,200ms 后 SIGKILL
- 更新 CHANGELOG、README、TEST 文档

Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win>
2026-06-21 14:44:33 +08:00

31 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# CHANGELOG - shell
## v1.5.4 (2026-06-21)
- **新增 `Start` 方法和 `Process` 结构体**:
- `Start(name, args, opts)` 异步启动命令,立即返回 `*Process`,不等待命令完成。
- `Process` 提供 `Kill`/`Read`/`Write`/`Check` 方法,支持子进程生命周期管理和实时 I/O 交互。
- stdout/stderr 默认流式输出到父终端,同时缓冲(上限 512KB以供 `Read` 读取。
- `CatchSignal` 选项支持信号自动转发到子进程组。
- `Kill` 优雅终止:先 SIGTERM200ms 后 SIGKILLWindows 直接 Kill。
## v1.5.3 (2026-06-21)
- **重构与错误堆栈支持**:
- 重构 `js_export.go`,将 `Run``RunCommand` 注册为具名函数,并动态使用 `jsmod.MakeError` 包裹错误。
- 升级 `jsmod` 依赖至 v1.5.3`cast` 依赖至 v1.5.3。
## v1.5.2 (2026-06-11)
- **版本对齐**: 基础设施全局对齐 v1.5.2。
## v1.5.1 (2026-06-08)
- **JS 对齐**: 将所有注册到 `jsmod` 的导出方法名统一为 PascalCase`Run`, `RunCommand`),以消除 JS 与 Go 调用体感上的摩擦。
## [v1.3.2] - 2026-05-30
- **新增**: 注册到 `jsmod`,提供 `run``runCommand` 能力并标记为高危方法unsafeList
## [v1.0.4] - 2026-05-02
- **重构**: 优化颜色常量命名(如 TextBlack, BgBlack以符合 Go 现代规范。
- **重构**: 迁移测试用例至 'shell_test' 包以强化 API 测试封装。
- **修复**: 修复 RunCommand 中 '&&' 逻辑的短路行为,确保在子命令失败时中断执行。
- **优化**: 全面升级 README 文档增加核心设计哲学、API 深度指南及使用示例。
- **配置**: 对齐 go.mod 至 Go 1.25.0。