Files
esengine/.changeset/cli-update-command.md
YHH aed91dbe45 feat(cli): add update command for ESEngine packages (#359)
* feat(cli): add update command for ESEngine packages

- Add 'update' command to check and update @esengine/* packages
- Support --check flag to only show available updates without installing
- Support --yes flag to skip confirmation prompt
- Display package update status with current vs latest version comparison
- Preserve version prefix (^ or ~) when updating
- Bump version to 1.4.0

* chore: add changeset for CLI update command

* fix(cli): handle 'latest' tag in update command

- Treat 'latest' and '*' version tags as needing update
- Pin to specific version (^x.x.x) when updating from 'latest'
- Show '(pin version)' hint in update status output

* fix(cli): minimize file system race condition in update command

Re-read package.json immediately before writing to reduce the window
for potential race conditions between reading and writing.

* fix(cli): use atomic file write to avoid race condition

Write to temp file first, then rename for atomic update.
2025-12-27 10:54:04 +08:00

12 lines
374 B
Markdown
Raw 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.
---
"@esengine/cli": minor
---
feat(cli): 添加 update 命令用于更新 ESEngine 包
- 新增 `esengine update` 命令检查并更新 @esengine/* 包到最新版本
- 支持 `--check` 参数仅检查可用更新而不安装
- 支持 `--yes` 参数跳过确认提示
- 显示包更新状态,对比当前版本与最新版本
- 更新时保留版本前缀(^ 或 ~