difit 4.0.7 → 5.0.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.
Files changed (137) hide show
  1. package/README.ja.md +1 -3
  2. package/README.ko.md +1 -3
  3. package/README.md +6 -3
  4. package/README.zh.md +1 -3
  5. package/dist/cli/index.js +0 -39
  6. package/dist/cli/index.test.js +0 -374
  7. package/dist/cli/utils.d.ts +0 -2
  8. package/dist/cli/utils.js +1 -18
  9. package/dist/cli/utils.test.js +0 -16
  10. package/dist/client/assets/{arc-DX2p9X2Y.js → arc-47JvE2o4.js} +1 -1
  11. package/dist/client/assets/architecture-YZFGNWBL-CAofxL11.js +1 -0
  12. package/dist/client/assets/{architectureDiagram-Q4EWVU46-FixTWViB.js → architectureDiagram-Q4EWVU46-PEhI9x48.js} +1 -1
  13. package/dist/client/assets/{blockDiagram-DXYQGD6D-CUAMgGr9.js → blockDiagram-DXYQGD6D-SUrPMV8E.js} +1 -1
  14. package/dist/client/assets/{c4Diagram-AHTNJAMY-BM_HNNZe.js → c4Diagram-AHTNJAMY-BJ9pq9B3.js} +1 -1
  15. package/dist/client/assets/channel-DXpjokeU.js +1 -0
  16. package/dist/client/assets/{chunk-2KRD3SAO-DeT59g2K.js → chunk-2KRD3SAO-2O6hV_yw.js} +1 -1
  17. package/dist/client/assets/{chunk-336JU56O-CaGvJA86.js → chunk-336JU56O-C0NxME-U.js} +2 -2
  18. package/dist/client/assets/chunk-426QAEUC-DO73G5YJ.js +1 -0
  19. package/dist/client/assets/{chunk-4BX2VUAB-D9mNDl5f.js → chunk-4BX2VUAB-PjGa5t5G.js} +1 -1
  20. package/dist/client/assets/{chunk-4TB4RGXK-Df3b4HEG.js → chunk-4TB4RGXK-DKCtDLTf.js} +1 -1
  21. package/dist/client/assets/{chunk-55IACEB6-dCWLe_n4.js → chunk-55IACEB6-BUBhWZ5_.js} +1 -1
  22. package/dist/client/assets/{chunk-5FUZZQ4R-EScvXcSN.js → chunk-5FUZZQ4R-D52DoV-0.js} +1 -1
  23. package/dist/client/assets/{chunk-5PVQY5BW-ail-oj89.js → chunk-5PVQY5BW-Cpp0JjTq.js} +1 -1
  24. package/dist/client/assets/{chunk-67CJDMHE-CHeCIL1u.js → chunk-67CJDMHE-DFAAAXYj.js} +1 -1
  25. package/dist/client/assets/{chunk-7N4EOEYR-P0tNRVMZ.js → chunk-7N4EOEYR-DeLrWd_x.js} +1 -1
  26. package/dist/client/assets/{chunk-AA7GKIK3-DloBHWSo.js → chunk-AA7GKIK3-Pb9IU0o9.js} +1 -1
  27. package/dist/client/assets/{chunk-BSJP7CBP-CGLThsR8.js → chunk-BSJP7CBP-DvFe6BQg.js} +1 -1
  28. package/dist/client/assets/{chunk-CIAEETIT-rCt2IEMp.js → chunk-CIAEETIT-AytpwHlv.js} +1 -1
  29. package/dist/client/assets/{chunk-EDXVE4YY-DIJEIKIq.js → chunk-EDXVE4YY-DSprT5LQ.js} +1 -1
  30. package/dist/client/assets/{chunk-ENJZ2VHE-CdrdxFfV.js → chunk-ENJZ2VHE-DsQnPoSa.js} +1 -1
  31. package/dist/client/assets/{chunk-FMBD7UC4-BH_GgR9u.js → chunk-FMBD7UC4-CRzu5RUs.js} +1 -1
  32. package/dist/client/assets/{chunk-FOC6F5B3-D71VljSN.js → chunk-FOC6F5B3-GWMv90go.js} +1 -1
  33. package/dist/client/assets/{chunk-ICPOFSXX-2vcQKuhB.js → chunk-ICPOFSXX-LaB5P0SR.js} +1 -1
  34. package/dist/client/assets/{chunk-K5T4RW27-BWIFd7pZ.js → chunk-K5T4RW27-S036x5p5.js} +1 -1
  35. package/dist/client/assets/{chunk-KGLVRYIC-Ck8I8tdt.js → chunk-KGLVRYIC-DDzbiNrj.js} +1 -1
  36. package/dist/client/assets/{chunk-LIHQZDEY-Cc7TtI-w.js → chunk-LIHQZDEY-BoUwuY9Y.js} +1 -1
  37. package/dist/client/assets/{chunk-ORNJ4GCN-BMSqiphc.js → chunk-ORNJ4GCN-CopGHq93.js} +1 -1
  38. package/dist/client/assets/{chunk-OYMX7WX6-B5faFb53.js → chunk-OYMX7WX6-Do8-v0_P.js} +1 -1
  39. package/dist/client/assets/chunk-QZHKN3VN-BdzTLtlM.js +1 -0
  40. package/dist/client/assets/{chunk-U2HBQHQK-BILTfRyq.js → chunk-U2HBQHQK-CuugOH8t.js} +1 -1
  41. package/dist/client/assets/{chunk-X2U36JSP-D4-56gWx.js → chunk-X2U36JSP-ZX9AmJVa.js} +1 -1
  42. package/dist/client/assets/{chunk-XPW4576I-SxB401Zg.js → chunk-XPW4576I-DwqcIpF8.js} +1 -1
  43. package/dist/client/assets/{chunk-YZCP3GAM-CWXUVxFj.js → chunk-YZCP3GAM-w3hvGtGQ.js} +1 -1
  44. package/dist/client/assets/{chunk-ZZ45TVLE-CXjZua4f.js → chunk-ZZ45TVLE-CX35ksjr.js} +1 -1
  45. package/dist/client/assets/classDiagram-6PBFFD2Q-C9JPZQtl.js +1 -0
  46. package/dist/client/assets/classDiagram-v2-HSJHXN6E-BgDR8rt-.js +1 -0
  47. package/dist/client/assets/clone-BygUtDF6.js +1 -0
  48. package/dist/client/assets/{cose-bilkent-S5V4N54A-YToNpueF.js → cose-bilkent-S5V4N54A-DXfb_bs_.js} +1 -1
  49. package/dist/client/assets/{dagre-tvaMpP4D.js → dagre-BYBAH6EF.js} +1 -1
  50. package/dist/client/assets/{dagre-KV5264BT-QFYoTa0z.js → dagre-KV5264BT-Bj9WMi27.js} +1 -1
  51. package/dist/client/assets/{diagram-5BDNPKRD-DM0NNmEN.js → diagram-5BDNPKRD-DHnS0s39.js} +1 -1
  52. package/dist/client/assets/{diagram-G4DWMVQ6-TiLkMmwt.js → diagram-G4DWMVQ6-DdKcPnFw.js} +1 -1
  53. package/dist/client/assets/{diagram-MMDJMWI5-DM1ykqrB.js → diagram-MMDJMWI5-DfdNeC0p.js} +1 -1
  54. package/dist/client/assets/{diagram-TYMM5635-BEOLX1wr.js → diagram-TYMM5635-DwieVXZu.js} +1 -1
  55. package/dist/client/assets/{dist-CCBhd9az.js → dist-COv0rtkK.js} +1 -1
  56. package/dist/client/assets/{erDiagram-SMLLAGMA-DZcjZq6z.js → erDiagram-SMLLAGMA--nNfIX9m.js} +1 -1
  57. package/dist/client/assets/{flowDiagram-DWJPFMVM-B1AVT9es.js → flowDiagram-DWJPFMVM-BFk7GDSn.js} +1 -1
  58. package/dist/client/assets/{ganttDiagram-T4ZO3ILL-BCEXws9V.js → ganttDiagram-T4ZO3ILL-DlVKHIi_.js} +1 -1
  59. package/dist/client/assets/gitGraph-7Q5UKJZL-4fOTOOzG.js +1 -0
  60. package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-CVznBDOl.js → gitGraphDiagram-UUTBAWPF-ww35jb2y.js} +1 -1
  61. package/dist/client/assets/{graphlib-C4fWcyt1.js → graphlib-cvGsNSEN.js} +1 -1
  62. package/dist/client/assets/index-CrvsDrrA.js +79 -0
  63. package/dist/client/assets/{index-C16wNcPQ.css → index-v-PY_jQI.css} +1 -1
  64. package/dist/client/assets/info-OMHHGYJF-BcwRhjJb.js +1 -0
  65. package/dist/client/assets/{infoDiagram-42DDH7IO-D8Oxr-KJ.js → infoDiagram-42DDH7IO-CbZg29-f.js} +1 -1
  66. package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-BE9KniVE.js → ishikawaDiagram-UXIWVN3A-DbmLYe6W.js} +1 -1
  67. package/dist/client/assets/{journeyDiagram-VCZTEJTY-B3lGcz06.js → journeyDiagram-VCZTEJTY-m6lofB3D.js} +1 -1
  68. package/dist/client/assets/{kanban-definition-6JOO6SKY-Bs1QdB0j.js → kanban-definition-6JOO6SKY-zNyvW0z9.js} +1 -1
  69. package/dist/client/assets/{line-CO4-KhEq.js → line-DYCPrtIt.js} +1 -1
  70. package/dist/client/assets/{linear-CnaJKs0I.js → linear-BAKLx75z.js} +1 -1
  71. package/dist/client/assets/{mermaid-parser.core-CravK6bS.js → mermaid-parser.core-BGGMv1j6.js} +2 -2
  72. package/dist/client/assets/{mermaid.core-DTh9KJvF.js → mermaid.core-CMGQEZKx.js} +3 -3
  73. package/dist/client/assets/{mindmap-definition-QFDTVHPH-D2xU2hfX.js → mindmap-definition-QFDTVHPH-4Qsf3Hkp.js} +1 -1
  74. package/dist/client/assets/packet-4T2RLAQJ-LdDEUu30.js +1 -0
  75. package/dist/client/assets/pie-ZZUOXDRM-B-ezG4xa.js +1 -0
  76. package/dist/client/assets/{pieDiagram-DEJITSTG-CRX6y4IQ.js → pieDiagram-DEJITSTG-Cnlop37j.js} +1 -1
  77. package/dist/client/assets/{quadrantDiagram-34T5L4WZ-K2HFp8O8.js → quadrantDiagram-34T5L4WZ-CLFb7OC8.js} +1 -1
  78. package/dist/client/assets/radar-PYXPWWZC-D66LzHfH.js +1 -0
  79. package/dist/client/assets/{requirementDiagram-MS252O5E-C-8AW0uI.js → requirementDiagram-MS252O5E-CFMEftHL.js} +1 -1
  80. package/dist/client/assets/{sankeyDiagram-XADWPNL6-Bv-_ZFS5.js → sankeyDiagram-XADWPNL6-Bz_Rsg7k.js} +1 -1
  81. package/dist/client/assets/{sequenceDiagram-FGHM5R23-Bk4QYIPk.js → sequenceDiagram-FGHM5R23-C_UnEheO.js} +1 -1
  82. package/dist/client/assets/{src-XMuEuFcU.js → src-D4dXpp2L.js} +1 -1
  83. package/dist/client/assets/{stateDiagram-FHFEXIEX-CI1G7zGC.js → stateDiagram-FHFEXIEX-D5jyXLVB.js} +1 -1
  84. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CTyQGCYc.js +1 -0
  85. package/dist/client/assets/{timeline-definition-GMOUNBTQ-CnXv8xHg.js → timeline-definition-GMOUNBTQ-BtgnceD7.js} +1 -1
  86. package/dist/client/assets/treeView-SZITEDCU-BsI_6Qwy.js +1 -0
  87. package/dist/client/assets/treemap-W4RFUUIX-CzaM5y4Y.js +1 -0
  88. package/dist/client/assets/{vennDiagram-DHZGUBPP-M5x471Ar.js → vennDiagram-DHZGUBPP-DWtzk4wH.js} +1 -1
  89. package/dist/client/assets/wardley-RL74JXVD-C1IHEcDw.js +1 -0
  90. package/dist/client/assets/{wardleyDiagram-NUSXRM2D-BG99uPNN.js → wardleyDiagram-NUSXRM2D-D88r6BkP.js} +1 -1
  91. package/dist/client/assets/{xychartDiagram-5P7HB3ND-DO7Upr9G.js → xychartDiagram-5P7HB3ND-DkXj8P_J.js} +1 -1
  92. package/dist/client/index.html +2 -2
  93. package/dist/server/server.d.ts +0 -1
  94. package/dist/server/server.js +0 -3
  95. package/dist/server/server.test.js +0 -37
  96. package/dist/types/diff.d.ts +0 -12
  97. package/dist/utils/commentFormatting.test.js +0 -52
  98. package/package.json +4 -5
  99. package/dist/cli/tuiDeprecation.d.ts +0 -3
  100. package/dist/cli/tuiDeprecation.js +0 -16
  101. package/dist/cli/tuiDeprecation.test.d.ts +0 -1
  102. package/dist/cli/tuiDeprecation.test.js +0 -16
  103. package/dist/client/assets/architecture-YZFGNWBL-2zVtKbnG.js +0 -1
  104. package/dist/client/assets/channel-B_ddQhpW.js +0 -1
  105. package/dist/client/assets/chunk-426QAEUC-CMTCMPn4.js +0 -1
  106. package/dist/client/assets/chunk-QZHKN3VN-B-G9G-FB.js +0 -1
  107. package/dist/client/assets/classDiagram-6PBFFD2Q-DnUQ2iGN.js +0 -1
  108. package/dist/client/assets/classDiagram-v2-HSJHXN6E-Dwp5vuOB.js +0 -1
  109. package/dist/client/assets/clone-aWrl-obY.js +0 -1
  110. package/dist/client/assets/gitGraph-7Q5UKJZL-BE3Mcr-v.js +0 -1
  111. package/dist/client/assets/index-6LShOAAb.js +0 -79
  112. package/dist/client/assets/info-OMHHGYJF-CBpXVhw-.js +0 -1
  113. package/dist/client/assets/packet-4T2RLAQJ-abaJ3V5T.js +0 -1
  114. package/dist/client/assets/pie-ZZUOXDRM-B12dpA7V.js +0 -1
  115. package/dist/client/assets/radar-PYXPWWZC-BbBaJJN8.js +0 -1
  116. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-DQ0U-oto.js +0 -1
  117. package/dist/client/assets/treeView-SZITEDCU-CM0rCBUc.js +0 -1
  118. package/dist/client/assets/treemap-W4RFUUIX-CXoNE_rL.js +0 -1
  119. package/dist/client/assets/wardley-RL74JXVD-B_EtnvOk.js +0 -1
  120. package/dist/server/git-diff-tui.d.ts +0 -2
  121. package/dist/server/git-diff-tui.js +0 -100
  122. package/dist/server/git-diff-tui.test.d.ts +0 -1
  123. package/dist/server/git-diff-tui.test.js +0 -76
  124. package/dist/tui/App.d.ts +0 -10
  125. package/dist/tui/App.js +0 -92
  126. package/dist/tui/components/DiffViewer.d.ts +0 -8
  127. package/dist/tui/components/DiffViewer.js +0 -88
  128. package/dist/tui/components/FileList.d.ts +0 -8
  129. package/dist/tui/components/FileList.js +0 -48
  130. package/dist/tui/components/SideBySideDiffViewer.d.ts +0 -9
  131. package/dist/tui/components/SideBySideDiffViewer.js +0 -240
  132. package/dist/tui/components/StatusBar.d.ts +0 -8
  133. package/dist/tui/components/StatusBar.js +0 -19
  134. package/dist/tui/utils/parseDiff.d.ts +0 -2
  135. package/dist/tui/utils/parseDiff.js +0 -67
  136. package/dist/utils/createId.test.d.ts +0 -1
  137. package/dist/utils/createId.test.js +0 -48
@@ -8,7 +8,6 @@ const __filename = fileURLToPath(import.meta.url);
8
8
  const __dirname = dirname(__filename);
9
9
  import { formatCommentsOutput } from '../utils/commentFormatting.js';
10
10
  import { mergeCommentImports, normalizeCommentImports, serializeCommentImports, } from '../utils/commentImports.js';
11
- import { normalizeDiffViewMode } from '../utils/diffMode.js';
12
11
  import { buildEditorSpawnSpec, CUSTOM_EDITOR_ID, NONE_EDITOR_ID, resolveEditorOption, } from '../utils/editorOptions.js';
13
12
  import { getFileExtension } from '../utils/fileUtils.js';
14
13
  import { FileWatcherService } from './file-watcher.js';
@@ -65,7 +64,6 @@ export async function startServer(options) {
65
64
  const generatedStatusCache = new Map();
66
65
  const diffDataCache = new Map();
67
66
  const initialIgnoreWhitespace = options.ignoreWhitespace || false;
68
- const diffMode = normalizeDiffViewMode(options.mode);
69
67
  const parseBaseMode = (value) => {
70
68
  if (value === 'merge-base') {
71
69
  return 'merge-base';
@@ -203,7 +201,6 @@ export async function startServer(options) {
203
201
  res.json({
204
202
  ...responseDiffData,
205
203
  ignoreWhitespace,
206
- mode: diffMode,
207
204
  openInEditorAvailable: !options.stdinDiff,
208
205
  baseCommitish,
209
206
  targetCommitish,
@@ -833,43 +833,6 @@ describe('Server Integration Tests', () => {
833
833
  expect(response.status).toBe(404);
834
834
  });
835
835
  });
836
- describe('Mode option handling', () => {
837
- it('accepts mode option in server configuration', async () => {
838
- // Test that mode option is accepted without error
839
- const result = await startServer({
840
- selection: { targetCommitish: 'HEAD', baseCommitish: 'HEAD^' },
841
- mode: 'unified',
842
- });
843
- servers.push(result.server);
844
- expect(result.port).toBeGreaterThanOrEqual(4966);
845
- expect(result.url).toContain('http://localhost:');
846
- });
847
- it('accepts different mode values', async () => {
848
- const inlineResult = await startServer({
849
- selection: { targetCommitish: 'HEAD', baseCommitish: 'HEAD^' },
850
- mode: 'unified',
851
- });
852
- servers.push(inlineResult.server);
853
- const sideBySideResult = await startServer({
854
- selection: { targetCommitish: 'HEAD', baseCommitish: 'HEAD^' },
855
- mode: 'split',
856
- });
857
- servers.push(sideBySideResult.server);
858
- expect(inlineResult.port).toBeGreaterThanOrEqual(4966);
859
- expect(sideBySideResult.port).toBeGreaterThanOrEqual(4966);
860
- });
861
- it('mode option should be included in diff response', async () => {
862
- const result = await startServer({
863
- selection: { targetCommitish: 'HEAD', baseCommitish: 'HEAD^' },
864
- mode: 'inline',
865
- });
866
- servers.push(result.server);
867
- const response = await fetch(`http://localhost:${result.port}/api/diff`);
868
- const data = await response.json();
869
- // The mode should be included in the response
870
- expect(data).toHaveProperty('mode', 'unified');
871
- });
872
- });
873
836
  describe('Revision options API', () => {
874
837
  it('returns available revisions', async () => {
875
838
  const result = await startServer({
@@ -7,13 +7,6 @@ export interface DiffFile {
7
7
  chunks: DiffChunk[];
8
8
  isGenerated?: boolean;
9
9
  }
10
- export interface FileDiff {
11
- path: string;
12
- status: 'A' | 'M' | 'D';
13
- diff: string;
14
- additions: number;
15
- deletions: number;
16
- }
17
10
  export interface DiffChunk {
18
11
  header: string;
19
12
  oldStart: number;
@@ -28,11 +21,7 @@ export interface DiffLine {
28
21
  oldLineNumber?: number;
29
22
  newLineNumber?: number;
30
23
  }
31
- export interface ParsedDiff {
32
- chunks: DiffChunk[];
33
- }
34
24
  export type DiffViewMode = 'split' | 'unified';
35
- type LegacyDiffViewMode = 'side-by-side' | 'inline';
36
25
  export type DiffSide = 'old' | 'new';
37
26
  export type DiffLineRange = number | {
38
27
  start: number;
@@ -57,7 +46,6 @@ export interface DiffResponse {
57
46
  files: DiffFile[];
58
47
  ignoreWhitespace?: boolean;
59
48
  isEmpty?: boolean;
60
- mode?: DiffViewMode | LegacyDiffViewMode;
61
49
  openInEditorAvailable?: boolean;
62
50
  baseCommitish?: string;
63
51
  targetCommitish?: string;
@@ -10,10 +10,6 @@ describe('commentFormatting', () => {
10
10
  const result = formatCommentPrompt('src/utils/validation.ts', [100, 120], 'Extract validation logic');
11
11
  expect(result).toBe('src/utils/validation.ts:L100-L120\nExtract validation logic');
12
12
  });
13
- it('should handle line range as array correctly', () => {
14
- const result = formatCommentPrompt('src/api/client.ts', [75, 80], 'Add retry logic');
15
- expect(result).toBe('src/api/client.ts:L75-L80\nAdd retry logic');
16
- });
17
13
  it('should handle multi-line comment body', () => {
18
14
  const body = 'This is a comment\nwith multiple lines\nof text';
19
15
  const result = formatCommentPrompt('src/index.ts', 10, body);
@@ -23,14 +19,6 @@ describe('commentFormatting', () => {
23
19
  const result = formatCommentPrompt('src/components/@shared/Button.tsx', 15, 'Update styles');
24
20
  expect(result).toBe('src/components/@shared/Button.tsx:L15\nUpdate styles');
25
21
  });
26
- it('should handle undefined file path gracefully', () => {
27
- const result = formatCommentPrompt(undefined, 10, 'Comment body');
28
- expect(result).toBe('<unknown file>:L10\nComment body');
29
- });
30
- it('should handle null file path gracefully', () => {
31
- const result = formatCommentPrompt(null, 10, 'Comment body');
32
- expect(result).toBe('<unknown file>:L10\nComment body');
33
- });
34
22
  it('should handle empty string file path', () => {
35
23
  const result = formatCommentPrompt('', 10, 'Comment body');
36
24
  expect(result).toBe('<unknown file>:L10\nComment body');
@@ -104,26 +92,6 @@ const newCode = 42;
104
92
  const result = formatAllCommentsPrompt(comments);
105
93
  expect(result).toBe('src/App.tsx:L10\nFirst comment\n=====\nsrc/utils/helper.ts:L20-L25\nSecond comment');
106
94
  });
107
- it('should handle comments with line ranges', () => {
108
- const comments = [
109
- {
110
- id: '1',
111
- file: 'src/components/Form.tsx',
112
- line: [50, 75],
113
- body: 'Refactor form validation',
114
- timestamp: '2024-01-01T00:00:00Z',
115
- },
116
- {
117
- id: '2',
118
- file: 'src/api/endpoints.ts',
119
- line: [100, 150],
120
- body: 'Add error handling',
121
- timestamp: '2024-01-01T00:01:00Z',
122
- },
123
- ];
124
- const result = formatAllCommentsPrompt(comments);
125
- expect(result).toBe('src/components/Form.tsx:L50-L75\nRefactor form validation\n=====\nsrc/api/endpoints.ts:L100-L150\nAdd error handling');
126
- });
127
95
  it('should preserve comment order', () => {
128
96
  const comments = [
129
97
  {
@@ -226,25 +194,5 @@ const newCode = 42;
226
194
  expect(result).toContain('This is a complex issue that\nspans multiple lines\nand needs attention');
227
195
  expect(result).toContain('Total comments: 1');
228
196
  });
229
- it('should format output with correct structure', () => {
230
- const comments = [
231
- {
232
- id: '1',
233
- file: 'test.ts',
234
- line: 1,
235
- body: 'Test comment',
236
- timestamp: '2024-01-01T00:00:00Z',
237
- },
238
- ];
239
- const result = formatCommentsOutput(comments);
240
- const lines = result.split('\n');
241
- expect(lines[0]).toBe('');
242
- expect(lines[1]).toBe('📝 Comments from review session:');
243
- expect(lines[2]).toBe('='.repeat(50));
244
- expect(lines[3]).toBe('test.ts:L1');
245
- expect(lines[4]).toBe('Test comment');
246
- expect(lines[5]).toBe('='.repeat(50));
247
- expect(lines[6]).toBe('Total comments: 1');
248
- });
249
197
  });
250
198
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "difit",
3
- "version": "4.0.7",
3
+ "version": "5.0.1",
4
4
  "description": "A lightweight command-line tool that spins up a local web server to display Git commit diffs in a GitHub-like Files changed view",
5
5
  "keywords": [
6
6
  "cli",
@@ -67,7 +67,6 @@
67
67
  "commander": "^14.0.0",
68
68
  "diff": "^9.0.0",
69
69
  "express": "^5.1.0",
70
- "ink": "^7.0.0",
71
70
  "lucide-react": "^1.0.0",
72
71
  "mermaid": "^11.13.0",
73
72
  "open": "^11.0.0",
@@ -96,9 +95,9 @@
96
95
  "happy-dom": "^20.0.0",
97
96
  "knip": "^6.0.0",
98
97
  "lefthook": "^2.0.0",
99
- "oxfmt": "^0.46.0",
98
+ "oxfmt": "^0.47.0",
100
99
  "oxlint": "^1.49.0",
101
- "oxlint-tsgolint": "^0.21.0",
100
+ "oxlint-tsgolint": "^0.22.0",
102
101
  "playwright": "^1.54.1",
103
102
  "postcss": "^8.5.6",
104
103
  "tailwindcss": "^4.1.11",
@@ -110,5 +109,5 @@
110
109
  "engines": {
111
110
  "node": ">=21.0.0"
112
111
  },
113
- "packageManager": "pnpm@10.33.2"
112
+ "packageManager": "pnpm@11.0.0"
114
113
  }
@@ -1,3 +0,0 @@
1
- export declare const TUI_DEPRECATION_NOTICE_LINES: string[];
2
- export declare const TUI_DEPRECATION_PROMPT: string;
3
- export declare function warnAboutTuiDeprecation(waitForEnterFn?: (message: string) => Promise<void>): Promise<void>;
@@ -1,16 +0,0 @@
1
- import { waitForEnter } from './utils.js';
2
- const TUI_DEPRECATION_ISSUES_URL = 'https://github.com/yoshiko-pg/difit/issues';
3
- export const TUI_DEPRECATION_NOTICE_LINES = [
4
- `⚠️ TUI mode will be removed in the next major release because ongoing implementation of core features is difficult. If you have feedback, please open an issue: ${TUI_DEPRECATION_ISSUES_URL}`,
5
- `⚠️ tuiモードは継続的な主要機能の実装が難しいため次回のメジャーリリースで削除予定です。もしご意見がある場合はissueの起票をお願いします。 ${TUI_DEPRECATION_ISSUES_URL}`,
6
- ];
7
- export const TUI_DEPRECATION_PROMPT = [
8
- 'Press Enter to start TUI mode.',
9
- 'Enterを押すとtuiモードを起動します。',
10
- ].join('\n');
11
- export async function warnAboutTuiDeprecation(waitForEnterFn = waitForEnter) {
12
- for (const line of TUI_DEPRECATION_NOTICE_LINES) {
13
- console.warn(line);
14
- }
15
- await waitForEnterFn(`\n${TUI_DEPRECATION_PROMPT}\n`);
16
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,16 +0,0 @@
1
- import { afterEach, describe, expect, it, vi } from 'vitest';
2
- import { TUI_DEPRECATION_NOTICE_LINES, TUI_DEPRECATION_PROMPT, warnAboutTuiDeprecation, } from './tuiDeprecation.js';
3
- describe('TUI deprecation warning', () => {
4
- afterEach(() => {
5
- vi.restoreAllMocks();
6
- });
7
- it('shows bilingual warnings and waits for Enter before continuing', async () => {
8
- const consoleWarn = vi.spyOn(console, 'warn').mockImplementation(() => { });
9
- const waitForEnter = vi.fn().mockResolvedValue(undefined);
10
- await warnAboutTuiDeprecation(waitForEnter);
11
- expect(consoleWarn).toHaveBeenNthCalledWith(1, TUI_DEPRECATION_NOTICE_LINES[0]);
12
- expect(consoleWarn).toHaveBeenNthCalledWith(2, TUI_DEPRECATION_NOTICE_LINES[1]);
13
- expect(waitForEnter).toHaveBeenCalledWith(`\n${TUI_DEPRECATION_PROMPT}\n`);
14
- expect(consoleWarn.mock.invocationCallOrder[1]).toBeLessThan(waitForEnter.mock.invocationCallOrder[0]);
15
- });
16
- });
@@ -1 +0,0 @@
1
- import"./chunk-K5T4RW27-BWIFd7pZ.js";import{n as e}from"./chunk-7N4EOEYR-P0tNRVMZ.js";export{e as createArchitectureServices};
@@ -1 +0,0 @@
1
- import{it as e,rt as t}from"./chunk-ICPOFSXX-2vcQKuhB.js";var n=(n,r)=>e.lang.round(t.parse(n)[r]);export{n as t};
@@ -1 +0,0 @@
1
- import{h as e,p as t}from"./src-XMuEuFcU.js";import{b as n}from"./chunk-ICPOFSXX-2vcQKuhB.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);return r===`sandbox`&&(i=t((t(`#i${e}`).node()?.contentDocument??document).body)),i.select(`#${e}`)},`selectSvgElement`);export{r as t};
@@ -1 +0,0 @@
1
- import{h as e}from"./src-XMuEuFcU.js";var t=class{constructor(e){this.init=e,this.records=this.init()}static{e(this,`ImperativeState`)}reset(){this.records=this.init()}};export{t};
@@ -1 +0,0 @@
1
- import{h as e}from"./src-XMuEuFcU.js";import"./chunk-ICPOFSXX-2vcQKuhB.js";import"./chunk-5PVQY5BW-ail-oj89.js";import"./chunk-U2HBQHQK-BILTfRyq.js";import"./chunk-FMBD7UC4-BH_GgR9u.js";import"./chunk-BSJP7CBP-CGLThsR8.js";import"./chunk-ZZ45TVLE-CXjZua4f.js";import"./chunk-YZCP3GAM-CWXUVxFj.js";import"./chunk-55IACEB6-dCWLe_n4.js";import"./chunk-EDXVE4YY-DIJEIKIq.js";import"./chunk-X2U36JSP-D4-56gWx.js";import"./chunk-5FUZZQ4R-EScvXcSN.js";import"./chunk-ENJZ2VHE-CdrdxFfV.js";import"./chunk-336JU56O-CaGvJA86.js";import{i as t,n,r,t as i}from"./chunk-4TB4RGXK-Df3b4HEG.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -1 +0,0 @@
1
- import{h as e}from"./src-XMuEuFcU.js";import"./chunk-ICPOFSXX-2vcQKuhB.js";import"./chunk-5PVQY5BW-ail-oj89.js";import"./chunk-U2HBQHQK-BILTfRyq.js";import"./chunk-FMBD7UC4-BH_GgR9u.js";import"./chunk-BSJP7CBP-CGLThsR8.js";import"./chunk-ZZ45TVLE-CXjZua4f.js";import"./chunk-YZCP3GAM-CWXUVxFj.js";import"./chunk-55IACEB6-dCWLe_n4.js";import"./chunk-EDXVE4YY-DIJEIKIq.js";import"./chunk-X2U36JSP-D4-56gWx.js";import"./chunk-5FUZZQ4R-EScvXcSN.js";import"./chunk-ENJZ2VHE-CdrdxFfV.js";import"./chunk-336JU56O-CaGvJA86.js";import{i as t,n,r,t as i}from"./chunk-4TB4RGXK-Df3b4HEG.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -1 +0,0 @@
1
- import{i as e}from"./graphlib-C4fWcyt1.js";var t=4;function n(n){return e(n,t)}export{n as t};
@@ -1 +0,0 @@
1
- import"./chunk-K5T4RW27-BWIFd7pZ.js";import{n as e}from"./chunk-67CJDMHE-CHeCIL1u.js";export{e as createGitGraphServices};