@kevlns/xlmerge 1.2.1-beta.3 → 1.2.1-beta.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevlns/xlmerge",
3
- "version": "1.2.1-beta.3",
3
+ "version": "1.2.1-beta.4",
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"
@@ -887,11 +887,17 @@ def _annotate_column_conflicts(
887
887
  return conflict_count
888
888
 
889
889
 
890
+ def _write_text_lf(path: Path, content: str) -> None:
891
+ """3.9-compatible LF write (Path.write_text gained `newline` only in 3.10)."""
892
+ with path.open("w", encoding="utf-8", newline="\n") as handle:
893
+ handle.write(content)
894
+
895
+
890
896
  def _write_projection(path: Path, rows: list[RowProjection]) -> None:
891
897
  content = "\n".join(row.text for row in rows)
892
898
  if content:
893
899
  content += "\n"
894
- path.write_text(content, encoding="utf-8", newline="\n")
900
+ _write_text_lf(path, content)
895
901
 
896
902
 
897
903
  def _write_sidecar(path: Path, layout: SheetLayout, rows: list[RowProjection]) -> None:
@@ -1474,7 +1480,7 @@ def analyze_workbooks(
1474
1480
  paths["ours"], paths["base"], paths["theirs"]
1475
1481
  )
1476
1482
  merge_output_path = sheet_dir / "git-merge-output.txt"
1477
- merge_output_path.write_text(merged_text, encoding="utf-8", newline="\n")
1483
+ _write_text_lf(merge_output_path, merged_text)
1478
1484
  segments = _parse_merge(merged_text, projection_fields)
1479
1485
  conflict_count = sum(segment["type"] == "conflict" for segment in segments)
1480
1486
  total_conflicts += conflict_count