Repository navigation
v0.6.1 — fix UTF-8 BOM in settings.json parsing
cce v0.6.1 — 修复带 BOM 的 settings.json 解析 / fix BOM-prefixed settings.json parsing
带 UTF-8 BOM 的 ~/.claude/settings.json 会被 cce 误判为无法解析、当成空配置处理(Unexpected token '')。Windows 上不少编辑器写文件会自动加 BOM。Claude 本体会先剥掉 BOM 再解析,cce 现在行为对齐。
A ~/.claude/settings.json carrying a UTF-8 BOM was wrongly reported as unparseable and treated as empty (Unexpected token ''). Many editors on Windows add a BOM when saving. Claude itself strips the BOM before parsing — cce now matches that behavior.
修复 / Fixes
- BOM 容错 / BOM tolerance:新增
parseJson(),解析前剥掉开头的 U+FEFF。用户可编辑文件的读取(settings.json的 env 读取、cce 主配置加载与语言探测)统一走它。非法 JSON 仍照常报错。/ NewparseJson()strips a leading U+FEFF before parsing; all user-editable file reads (settings.json env, cce config load + language peek) route through it. Genuinely invalid JSON still errors as before.
升级 / Upgrade
cce update 或 / or npm i -g @xiaofuzhou/cce@latest
Full changelog: v0.6.0...v0.6.1