@kevlns/xlmerge 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -151,7 +151,7 @@ kevlns 工具家族共享同一套发布约定(tag 驱动、CI 护栏、MIT)
151
151
  | Package | Purpose | Status |
152
152
  | --- | --- | --- |
153
153
  | [`v-cli`](https://github.com/kevlns/v-cli) | 个人工具箱 CLI | v0.2.3 |
154
- | [`xlmerge`](https://github.com/kevlns/xlmerge) | Git 中 .xlsx/.xlsm 冲突可视化解决工具(本仓库) | v1.3.0 |
154
+ | [`xlmerge`](https://github.com/kevlns/xlmerge) | Git 中 .xlsx/.xlsm 冲突可视化解决工具(本仓库) | v1.3.1 |
155
155
  | [`u-cli-mod`](https://github.com/kevlns/u-cli-mod) | Unity 精确版本路由 + CLI + pipeline 包(Windows-first) | v0.1.4 |
156
156
 
157
157
  ## Compatibility
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevlns/xlmerge",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Visual resolver for unresolved Git merge conflicts in .xlsx/.xlsm workbooks: three-way sheet/row/cell diff, local UI, write-back and commit.",
5
5
  "bin": {
6
6
  "xlmerge": "bin/xlmerge.js"
@@ -30,6 +30,14 @@ SCRIPT_PATH = Path(__file__).resolve()
30
30
  PACKAGE_ROOT = SCRIPT_DIR.parent
31
31
 
32
32
 
33
+ def _configure_stdio() -> None:
34
+ """Keep structured CLI output UTF-8 even under legacy Windows code pages."""
35
+ for stream in (sys.stdout, sys.stderr):
36
+ reconfigure = getattr(stream, "reconfigure", None)
37
+ if callable(reconfigure):
38
+ reconfigure(encoding="utf-8", errors="replace")
39
+
40
+
33
41
  def _print(data) -> None:
34
42
  print(json.dumps(data, ensure_ascii=False, indent=2))
35
43
 
@@ -146,6 +154,7 @@ def build_parser() -> argparse.ArgumentParser:
146
154
 
147
155
 
148
156
  def main(argv: list[str] | None = None) -> int:
157
+ _configure_stdio()
149
158
  args = build_parser().parse_args(argv)
150
159
  try:
151
160
  # serve/apply 仅依赖 manifest(其 repoRoot 在 apply_manifest 内部解析),