difit 1.0.1 → 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.
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -2,10 +2,15 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
5
+ <link rel="icon" type="image/png" href="/favicon.png" />
6
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
7
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
8
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
9
+ <link rel="icon" type="image/png" sizes="192x192" href="/icon-192x192.png" />
10
+ <link rel="icon" type="image/png" sizes="512x512" href="/icon-512x512.png" />
6
11
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
12
  <title>ReviewIt - Git Diff Viewer</title>
8
- <script type="module" crossorigin src="/assets/index-CczcbGc9.js"></script>
13
+ <script type="module" crossorigin src="/assets/index-DhzESvUd.js"></script>
9
14
  <link rel="stylesheet" crossorigin href="/assets/index-CpclbaYk.css">
10
15
  </head>
11
16
  <body>
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- import { DiffResponse } from '../types/diff.js';
1
+ import { type DiffResponse } from '../types/diff.js';
2
2
  export declare class GitDiffParser {
3
3
  private git;
4
4
  constructor(repoPath?: string);
@@ -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 = await this.parseUnifiedDiff(diffRaw, diffSummary.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
- async parseUnifiedDiff(diffText, summary) {
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++) {
@@ -1,6 +1,6 @@
1
- import express from 'express';
2
1
  import { join, dirname } from 'path';
3
2
  import { fileURLToPath } from 'url';
3
+ import express from 'express';
4
4
  import open from 'open';
5
5
  const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = dirname(__filename);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "difit",
3
- "version": "1.0.1",
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 . --ext .ts,.tsx",
28
- "lint:fix": "eslint . --ext .ts,.tsx --fix",
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",