difit 2.2.5 → 2.2.6

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.ja.md CHANGED
@@ -12,8 +12,17 @@
12
12
 
13
13
  ## ⚡ クイックスタート
14
14
 
15
+ まず試す
16
+
17
+ ```bash
18
+ npx difit # 最新コミットのdiffをWebUIで表示
19
+ ```
20
+
21
+ インストールして使う
22
+
15
23
  ```bash
16
- npx difit # 最新コミットのdiffをWebUIで表示
24
+ npm install -g difit
25
+ difit # 最新コミットのdiffをWebUIで表示
17
26
  ```
18
27
 
19
28
  ## 🚀 使い方
@@ -21,25 +30,25 @@ npx difit # 最新コミットのdiffをWebUIで表示
21
30
  ### 基本的な使い方
22
31
 
23
32
  ```bash
24
- npx difit <target> # 単一コミットのdiffを表示
25
- npx difit <target> [compare-with] # 2つのコミット/ブランチを比較
26
- npx difit --pr <github-pr-url> # GitHubプルリクエストをレビュー
33
+ difit <target> # 単一コミットのdiffを表示
34
+ difit <target> [compare-with] # 2つのコミット/ブランチを比較
35
+ difit --pr <github-pr-url> # GitHubプルリクエストをレビュー
27
36
  ```
28
37
 
29
38
  ### 単一コミットのレビュー
30
39
 
31
40
  ```bash
32
- npx difit # HEAD(最新)のコミット
33
- npx difit 6f4a9b7 # 特定のコミット
34
- npx difit feature # featureブランチの最新コミット
41
+ difit # HEAD(最新)のコミット
42
+ difit 6f4a9b7 # 特定のコミット
43
+ difit feature # featureブランチの最新コミット
35
44
  ```
36
45
 
37
46
  ### 2つのコミットを比較
38
47
 
39
48
  ```bash
40
- npx difit @ main # mainブランチと比較(@はHEADのエイリアス)
41
- npx difit feature main # ブランチ間を比較
42
- npx difit . origin/main # 作業ディレクトリとリモートmainを比較
49
+ difit @ main # mainブランチと比較(@はHEADのエイリアス)
50
+ difit feature main # ブランチ間を比較
51
+ difit . origin/main # 作業ディレクトリとリモートmainを比較
43
52
  ```
44
53
 
45
54
  ### 特別な引数
@@ -47,15 +56,15 @@ npx difit . origin/main # 作業ディレクトリとリモートmainを比較
47
56
  difitは一般的なdiffシナリオ用の特別なキーワードをサポートしています:
48
57
 
49
58
  ```bash
50
- npx difit . # すべての未コミット差分(ステージングエリア + 未ステージ)
51
- npx difit staged # ステージングエリアの差分
52
- npx difit working # 未ステージ差分のみ
59
+ difit . # すべての未コミット差分(ステージングエリア + 未ステージ)
60
+ difit staged # ステージングエリアの差分
61
+ difit working # 未ステージ差分のみ
53
62
  ```
54
63
 
55
64
  ### GitHub PR
56
65
 
57
66
  ```bash
58
- npx difit --pr https://github.com/owner/repo/pull/123
67
+ difit --pr https://github.com/owner/repo/pull/123
59
68
  ```
60
69
 
61
70
  difitは以下の方法でGitHub認証を自動的に処理します:
@@ -78,16 +87,16 @@ Enterprise ServerのPRを表示する場合、あなたのEnterprise Serverイ
78
87
 
79
88
  ```bash
80
89
  # 他のツールからのdiffを表示
81
- diff -u file1.txt file2.txt | npx difit
90
+ diff -u file1.txt file2.txt | difit
82
91
 
83
92
  # 保存されたパッチをレビュー
84
- cat changes.patch | npx difit
93
+ cat changes.patch | difit
85
94
 
86
95
  # マージベースとの比較
87
- git diff --merge-base main feature | npx difit
96
+ git diff --merge-base main feature | difit
88
97
 
89
98
  # 既存ファイル全体を新規追加として確認
90
- git diff -- /dev/null path/to/file | npx difit
99
+ git diff -- /dev/null path/to/file | difit
91
100
  ```
92
101
 
93
102
  ## ⚙️ CLIオプション
@@ -138,6 +147,29 @@ src/components/Button.tsx:L42-L48 # この行が自動的に追加されます
138
147
  - **モバイル言語**:Swift, Kotlin, Dart
139
148
  - **その他**:Python, Protobuf, YAML, Solidity, Vim Script
140
149
 
150
+ ## 🔍 自動生成ファイルの検出
151
+
152
+ difitは生成されたファイルを自動的に識別し、ビューをすっきりさせるために折りたたみます。これには以下が含まれます:
153
+
154
+ - ロックファイル (`package-lock.json`, `go.mod`, `Cargo.lock`, `Gemfile.lock` など)
155
+ - 圧縮されたファイル (`*.min.js`, `*.min.css`)
156
+ - ソースマップ (`*.map`)
157
+ - 生成されたコード:
158
+ - Orval (`*.msw.ts`, `*.zod.ts`, `*.api.ts`)
159
+ - Dart (`*.g.dart`, `*.freezed.dart`)
160
+ - C# (`*.g.cs`, `*.designer.cs`)
161
+ - Protobuf (`*.pb.go`, `*.pb.cc`, `*.pb.h`)
162
+ - フレームワーク:
163
+ - Ruby on Rails (`db/schema.rb`)
164
+ - Laravel (`_ide_helper.php`)
165
+ - Gradle (`gradle.lockfile`)
166
+ - Python (`uv.lock`, `pdm.lock`)
167
+ - 一般的な生成ファイル (`*.generated.cs`, `*.generated.ts`, `*.generated.js`)
168
+ - コンテンツベースの検出:
169
+ - `@generated` マーカーを含むファイル
170
+ - `DO NOT EDIT` ヘッダーを含むファイル
171
+ - 言語固有の自動生成ヘッダー (Go, Pythonなど)
172
+
141
173
  ## 🛠️ 開発
142
174
 
143
175
  ```bash
package/README.ko.md CHANGED
@@ -12,8 +12,17 @@
12
12
 
13
13
  ## ⚡ 빠른 시작
14
14
 
15
+ 먼저 시도해 보세요
16
+
17
+ ```bash
18
+ npx difit # WebUI에서 최신 커밋 diff 보기
19
+ ```
20
+
21
+ 설치하여 사용
22
+
15
23
  ```bash
16
- npx difit # WebUI에서 최신 커밋 diff 보기
24
+ npm install -g difit
25
+ difit # WebUI에서 최신 커밋 diff 보기
17
26
  ```
18
27
 
19
28
  ## 🚀 사용법
@@ -21,25 +30,25 @@ npx difit # WebUI에서 최신 커밋 diff 보기
21
30
  ### 기본 사용법
22
31
 
23
32
  ```bash
24
- npx difit <target> # 단일 커밋 diff 보기
25
- npx difit <target> [compare-with] # 두 커밋/브랜치 비교
26
- npx difit --pr <github-pr-url> # GitHub 풀 리퀘스트 검토
33
+ difit <target> # 단일 커밋 diff 보기
34
+ difit <target> [compare-with] # 두 커밋/브랜치 비교
35
+ difit --pr <github-pr-url> # GitHub 풀 리퀘스트 검토
27
36
  ```
28
37
 
29
38
  ### 단일 커밋 검토
30
39
 
31
40
  ```bash
32
- npx difit # HEAD (최신) 커밋
33
- npx difit 6f4a9b7 # 특정 커밋
34
- npx difit feature # feature 브랜치의 최신 커밋
41
+ difit # HEAD (최신) 커밋
42
+ difit 6f4a9b7 # 특정 커밋
43
+ difit feature # feature 브랜치의 최신 커밋
35
44
  ```
36
45
 
37
46
  ### 두 커밋 비교
38
47
 
39
48
  ```bash
40
- npx difit @ main # main 브랜치와 비교 (@는 HEAD의 별칭)
41
- npx difit feature main # 브랜치 간 비교
42
- npx difit . origin/main # 작업 디렉토리와 원격 main 비교
49
+ difit @ main # main 브랜치와 비교 (@는 HEAD의 별칭)
50
+ difit feature main # 브랜치 간 비교
51
+ difit . origin/main # 작업 디렉토리와 원격 main 비교
43
52
  ```
44
53
 
45
54
  ### 특수 인수
@@ -47,15 +56,15 @@ npx difit . origin/main # 작업 디렉토리와 원격 main 비교
47
56
  difit은 일반적인 diff 시나리오를 위한 특수 키워드를 지원합니다:
48
57
 
49
58
  ```bash
50
- npx difit . # 모든 커밋되지 않은 변경 사항 (스테이징 영역 + 미스테이징)
51
- npx difit staged # 스테이징 영역 변경 사항
52
- npx difit working # 미스테이징 변경 사항만
59
+ difit . # 모든 커밋되지 않은 변경 사항 (스테이징 영역 + 미스테이징)
60
+ difit staged # 스테이징 영역 변경 사항
61
+ difit working # 미스테이징 변경 사항만
53
62
  ```
54
63
 
55
64
  ### GitHub PR
56
65
 
57
66
  ```bash
58
- npx difit --pr https://github.com/owner/repo/pull/123
67
+ difit --pr https://github.com/owner/repo/pull/123
59
68
  ```
60
69
 
61
70
  difit은 다음 방법으로 GitHub 인증을 자동으로 처리합니다:
@@ -78,16 +87,16 @@ Enterprise Server PR의 경우 귀하의 Enterprise Server 인스턴스에서
78
87
 
79
88
  ```bash
80
89
  # 다른 도구의 diff 보기
81
- diff -u file1.txt file2.txt | npx difit
90
+ diff -u file1.txt file2.txt | difit
82
91
 
83
92
  # 저장된 패치 검토
84
- cat changes.patch | npx difit
93
+ cat changes.patch | difit
85
94
 
86
95
  # 머지 베이스와 비교
87
- git diff --merge-base main feature | npx difit
96
+ git diff --merge-base main feature | difit
88
97
 
89
98
  # 기존 파일 전체를 신규 추가처럼 검토
90
- git diff -- /dev/null path/to/file | npx difit
99
+ git diff -- /dev/null path/to/file | difit
91
100
  ```
92
101
 
93
102
  ## ⚙️ CLI 옵션
@@ -138,6 +147,29 @@ src/components/Button.tsx:L42-L48 # 이 줄은 자동으로 추가됩니다
138
147
  - **모바일 언어**: Swift, Kotlin, Dart
139
148
  - **기타**: Python, Protobuf, YAML, Solidity, Vim 스크립트
140
149
 
150
+ ## 🔍 자동 생성 파일 감지
151
+
152
+ difit은 생성된 파일을 자동으로 식별하고 접어서 뷰를 깔끔하게 유지합니다. 여기에는 다음이 포함됩니다:
153
+
154
+ - 잠금 파일 (`package-lock.json`, `go.mod`, `Cargo.lock`, `Gemfile.lock` 등)
155
+ - 축소된 파일 (`*.min.js`, `*.min.css`)
156
+ - 소스 맵 (`*.map`)
157
+ - 생성된 코드:
158
+ - Orval (`*.msw.ts`, `*.zod.ts`, `*.api.ts`)
159
+ - Dart (`*.g.dart`, `*.freezed.dart`)
160
+ - C# (`*.g.cs`, `*.designer.cs`)
161
+ - Protobuf (`*.pb.go`, `*.pb.cc`, `*.pb.h`)
162
+ - 프레임워크:
163
+ - Ruby on Rails (`db/schema.rb`)
164
+ - Laravel (`_ide_helper.php`)
165
+ - Gradle (`gradle.lockfile`)
166
+ - Python (`uv.lock`, `pdm.lock`)
167
+ - 일반적인 생성 파일 (`*.generated.cs`, `*.generated.ts`, `*.generated.js`)
168
+ - 콘텐츠 기반 감지:
169
+ - `@generated` 마커가 포함된 파일
170
+ - `DO NOT EDIT` 헤더가 포함된 파일
171
+ - 언어별 생성 헤더 (Go, Python 등)
172
+
141
173
  ## 🛠️ 개발
142
174
 
143
175
  ```bash
package/README.md CHANGED
@@ -12,8 +12,17 @@
12
12
 
13
13
  ## ⚡ Quick Start
14
14
 
15
+ Try it first
16
+
17
+ ```bash
18
+ npx difit # View the latest commit diff in WebUI
19
+ ```
20
+
21
+ Install and use
22
+
15
23
  ```bash
16
- npx difit # View the latest commit diff in WebUI
24
+ npm install -g difit
25
+ difit # View the latest commit diff in WebUI
17
26
  ```
18
27
 
19
28
  ## 🚀 Usage
@@ -21,25 +30,25 @@ npx difit # View the latest commit diff in WebUI
21
30
  ### Basic Usage
22
31
 
23
32
  ```bash
24
- npx difit <target> # View single commit diff
25
- npx difit <target> [compare-with] # Compare two commits/branches
26
- npx difit --pr <github-pr-url> # Review GitHub pull request
33
+ difit <target> # View single commit diff
34
+ difit <target> [compare-with] # Compare two commits/branches
35
+ difit --pr <github-pr-url> # Review GitHub pull request
27
36
  ```
28
37
 
29
38
  ### Single commit review
30
39
 
31
40
  ```bash
32
- npx difit # HEAD (latest) commit
33
- npx difit 6f4a9b7 # Specific commit
34
- npx difit feature # Latest commit on feature branch
41
+ difit # HEAD (latest) commit
42
+ difit 6f4a9b7 # Specific commit
43
+ difit feature # Latest commit on feature branch
35
44
  ```
36
45
 
37
46
  ### Compare two commits
38
47
 
39
48
  ```bash
40
- npx difit @ main # Compare with main branch (@ is alias for HEAD)
41
- npx difit feature main # Compare branches
42
- npx difit . origin/main # Compare working directory with remote main
49
+ difit @ main # Compare with main branch (@ is alias for HEAD)
50
+ difit feature main # Compare branches
51
+ difit . origin/main # Compare working directory with remote main
43
52
  ```
44
53
 
45
54
  ### Special Arguments
@@ -47,15 +56,15 @@ npx difit . origin/main # Compare working directory with remote main
47
56
  difit supports special keywords for common diff scenarios:
48
57
 
49
58
  ```bash
50
- npx difit . # All uncommitted changes (staging area + unstaged)
51
- npx difit staged # Staging area changes
52
- npx difit working # Unstaged changes only
59
+ difit . # All uncommitted changes (staging area + unstaged)
60
+ difit staged # Staging area changes
61
+ difit working # Unstaged changes only
53
62
  ```
54
63
 
55
64
  ### GitHub PR
56
65
 
57
66
  ```bash
58
- npx difit --pr https://github.com/owner/repo/pull/123
67
+ difit --pr https://github.com/owner/repo/pull/123
59
68
  ```
60
69
 
61
70
  difit automatically handles GitHub authentication using:
@@ -78,16 +87,16 @@ By using a pipe to pass unified diffs via stdin, you can view diffs from any too
78
87
 
79
88
  ```bash
80
89
  # View diffs from other tools
81
- diff -u file1.txt file2.txt | npx difit
90
+ diff -u file1.txt file2.txt | difit
82
91
 
83
92
  # Review saved patches
84
- cat changes.patch | npx difit
93
+ cat changes.patch | difit
85
94
 
86
95
  # Compare against merge base
87
- git diff --merge-base main feature | npx difit
96
+ git diff --merge-base main feature | difit
88
97
 
89
98
  # Review an entire existing file as newly added
90
- git diff -- /dev/null path/to/file | npx difit
99
+ git diff -- /dev/null path/to/file | difit
91
100
  ```
92
101
 
93
102
  ## ⚙️ CLI Options
@@ -138,6 +147,29 @@ This section is unnecessary
138
147
  - **Mobile Languages**: Swift, Kotlin, Dart
139
148
  - **Others**: Python, Protobuf, YAML, Solidity, Vim script
140
149
 
150
+ ## 🔍 Detecting Auto-generated Files
151
+
152
+ difit automatically identifies and collapses generated files to keep your view clean. This includes:
153
+
154
+ - Lock files (`package-lock.json`, `go.mod`, `Cargo.lock`, `Gemfile.lock`, etc.)
155
+ - Minified files (`*.min.js`, `*.min.css`)
156
+ - Source maps (`*.map`)
157
+ - Generated code:
158
+ - Orval (`*.msw.ts`, `*.zod.ts`, `*.api.ts`)
159
+ - Dart (`*.g.dart`, `*.freezed.dart`)
160
+ - C# (`*.g.cs`, `*.designer.cs`)
161
+ - Protobuf (`*.pb.go`, `*.pb.cc`, `*.pb.h`)
162
+ - Frameworks:
163
+ - Ruby on Rails (`db/schema.rb`)
164
+ - Laravel (`_ide_helper.php`)
165
+ - Gradle (`gradle.lockfile`)
166
+ - Python (`uv.lock`, `pdm.lock`)
167
+ - Generic generated files (`*.generated.cs`, `*.generated.ts`, `*.generated.js`)
168
+ - Content-based detection:
169
+ - Files containing `@generated` marker
170
+ - Files containing `DO NOT EDIT` header
171
+ - Language-specific generated headers (Go, Python, etc.)
172
+
141
173
  ## 🛠️ Development
142
174
 
143
175
  ```bash
package/README.zh.md CHANGED
@@ -12,8 +12,17 @@
12
12
 
13
13
  ## ⚡ 快速开始
14
14
 
15
+ 先试用一下
16
+
17
+ ```bash
18
+ npx difit # 在 WebUI 中查看最新提交的差异
19
+ ```
20
+
21
+ 安装后使用
22
+
15
23
  ```bash
16
- npx difit # WebUI 中查看最新提交的差异
24
+ npm install -g difit
25
+ difit # 在 WebUI 中查看最新提交的差异
17
26
  ```
18
27
 
19
28
  ## 🚀 使用方法
@@ -21,25 +30,25 @@ npx difit # 在 WebUI 中查看最新提交的差异
21
30
  ### 基本用法
22
31
 
23
32
  ```bash
24
- npx difit <target> # 查看单个提交差异
25
- npx difit <target> [compare-with] # 比较两个提交/分支
26
- npx difit --pr <github-pr-url> # 审查 GitHub 拉取请求
33
+ difit <target> # 查看单个提交差异
34
+ difit <target> [compare-with] # 比较两个提交/分支
35
+ difit --pr <github-pr-url> # 审查 GitHub 拉取请求
27
36
  ```
28
37
 
29
38
  ### 单个提交审查
30
39
 
31
40
  ```bash
32
- npx difit # HEAD(最新)提交
33
- npx difit 6f4a9b7 # 特定提交
34
- npx difit feature # feature 分支上的最新提交
41
+ difit # HEAD(最新)提交
42
+ difit 6f4a9b7 # 特定提交
43
+ difit feature # feature 分支上的最新提交
35
44
  ```
36
45
 
37
46
  ### 比较两个提交
38
47
 
39
48
  ```bash
40
- npx difit @ main # 与 main 分支比较(@ 是 HEAD 的别名)
41
- npx difit feature main # 比较分支
42
- npx difit . origin/main # 比较工作目录与远程 main
49
+ difit @ main # 与 main 分支比较(@ 是 HEAD 的别名)
50
+ difit feature main # 比较分支
51
+ difit . origin/main # 比较工作目录与远程 main
43
52
  ```
44
53
 
45
54
  ### 特殊参数
@@ -47,15 +56,15 @@ npx difit . origin/main # 比较工作目录与远程 main
47
56
  difit 支持常见差异场景的特殊关键字:
48
57
 
49
58
  ```bash
50
- npx difit . # 所有未提交的更改(暂存区 + 未暂存)
51
- npx difit staged # 暂存区更改
52
- npx difit working # 仅未暂存的更改
59
+ difit . # 所有未提交的更改(暂存区 + 未暂存)
60
+ difit staged # 暂存区更改
61
+ difit working # 仅未暂存的更改
53
62
  ```
54
63
 
55
64
  ### GitHub PR
56
65
 
57
66
  ```bash
58
- npx difit --pr https://github.com/owner/repo/pull/123
67
+ difit --pr https://github.com/owner/repo/pull/123
59
68
  ```
60
69
 
61
70
  difit 使用以下方式自动处理 GitHub 认证:
@@ -78,16 +87,16 @@ difit 使用以下方式自动处理 GitHub 认证:
78
87
 
79
88
  ```bash
80
89
  # 查看来自其他工具的差异
81
- diff -u file1.txt file2.txt | npx difit
90
+ diff -u file1.txt file2.txt | difit
82
91
 
83
92
  # 审查保存的补丁
84
- cat changes.patch | npx difit
93
+ cat changes.patch | difit
85
94
 
86
95
  # 与合并基础比较
87
- git diff --merge-base main feature | npx difit
96
+ git diff --merge-base main feature | difit
88
97
 
89
98
  # 将整个现有文件视为新添加进行审查
90
- git diff -- /dev/null path/to/file | npx difit
99
+ git diff -- /dev/null path/to/file | difit
91
100
  ```
92
101
 
93
102
  ## ⚙️ CLI 选项
@@ -138,6 +147,29 @@ src/components/Button.tsx:L42-L48 # 此行自动添加
138
147
  - **移动语言**:Swift, Kotlin, Dart
139
148
  - **其他**:Python, Protobuf, YAML, Solidity, Vim Script
140
149
 
150
+ ## 🔍 检测自动生成文件
151
+
152
+ difit 自动识别并折叠生成的文件以保持视图整洁。这包括:
153
+
154
+ - 锁定文件 (`package-lock.json`, `go.mod`, `Cargo.lock`, `Gemfile.lock` 等)
155
+ - 压缩文件 (`*.min.js`, `*.min.css`)
156
+ - 源映射 (`*.map`)
157
+ - 生成的代码:
158
+ - Orval (`*.msw.ts`, `*.zod.ts`, `*.api.ts`)
159
+ - Dart (`*.g.dart`, `*.freezed.dart`)
160
+ - C# (`*.g.cs`, `*.designer.cs`)
161
+ - Protobuf (`*.pb.go`, `*.pb.cc`, `*.pb.h`)
162
+ - 框架:
163
+ - Ruby on Rails (`db/schema.rb`)
164
+ - Laravel (`_ide_helper.php`)
165
+ - Gradle (`gradle.lockfile`)
166
+ - Python (`uv.lock`, `pdm.lock`)
167
+ - 通用生成文件 (`*.generated.cs`, `*.generated.ts`, `*.generated.js`)
168
+ - 基于内容的检测:
169
+ - 包含 `@generated` 标记的文件
170
+ - 包含 `DO NOT EDIT` 标头的文件
171
+ - 特定语言的生成标头 (Go, Python 等)
172
+
141
173
  ## 🛠️ 开发
142
174
 
143
175
  ```bash