difit 1.0.2 → 1.0.3
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/dist/client/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="icon" type="image/png" sizes="512x512" href="/icon-512x512.png" />
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
12
12
|
<title>ReviewIt - Git Diff Viewer</title>
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-DhzESvUd.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="/assets/index-CpclbaYk.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
package/dist/server/git-diff.js
CHANGED
|
@@ -22,7 +22,7 @@ export class GitDiffParser {
|
|
|
22
22
|
}
|
|
23
23
|
const diffSummary = await this.git.diffSummary(diffArgs);
|
|
24
24
|
const diffRaw = await this.git.diff(diffArgs);
|
|
25
|
-
const files =
|
|
25
|
+
const files = this.parseUnifiedDiff(diffRaw, diffSummary.files);
|
|
26
26
|
return {
|
|
27
27
|
commit: resolvedCommit,
|
|
28
28
|
files,
|
|
@@ -32,7 +32,7 @@ export class GitDiffParser {
|
|
|
32
32
|
throw new Error(`Failed to parse diff for ${commitish}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
parseUnifiedDiff(diffText, summary) {
|
|
36
36
|
const files = [];
|
|
37
37
|
const fileBlocks = diffText.split(/^diff --git /m).slice(1);
|
|
38
38
|
for (let i = 0; i < fileBlocks.length; i++) {
|
package/dist/server/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "difit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
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
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"build": "tsc && vite build",
|
|
25
25
|
"build:cli": "tsc --project tsconfig.cli.json",
|
|
26
26
|
"start": "pnpm run build && pnpm run build:cli && node dist/cli/index.js",
|
|
27
|
-
"lint": "eslint .
|
|
28
|
-
"lint:fix": "eslint . --
|
|
27
|
+
"lint": "eslint .",
|
|
28
|
+
"lint:fix": "eslint . --fix",
|
|
29
29
|
"format": "prettier --write .",
|
|
30
30
|
"typecheck": "tsc --noEmit",
|
|
31
31
|
"test": "vitest run",
|
|
@@ -46,9 +46,11 @@
|
|
|
46
46
|
"simple-git": "^3.20.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
49
50
|
"@tailwindcss/forms": "^0.5.10",
|
|
50
51
|
"@tailwindcss/postcss": "^4.1.11",
|
|
51
52
|
"@tailwindcss/typography": "^0.5.16",
|
|
53
|
+
"@tsconfig/strictest": "^2.0.5",
|
|
52
54
|
"@types/express": "^4.17.21",
|
|
53
55
|
"@types/node": "^20.10.5",
|
|
54
56
|
"@types/prismjs": "^1.26.5",
|
|
@@ -59,8 +61,11 @@
|
|
|
59
61
|
"@vitejs/plugin-react": "^4.2.1",
|
|
60
62
|
"autoprefixer": "^10.4.21",
|
|
61
63
|
"eslint": "^8.56.0",
|
|
64
|
+
"eslint-config-prettier": "^10.1.5",
|
|
65
|
+
"eslint-plugin-import": "^2.32.0",
|
|
62
66
|
"eslint-plugin-react": "^7.33.2",
|
|
63
67
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
68
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
64
69
|
"lefthook": "^1.5.5",
|
|
65
70
|
"postcss": "^8.5.6",
|
|
66
71
|
"prettier": "^3.1.1",
|