Skip to content

Commit 5fc581e

Browse files
committed
feat: protect package-lock.json from fork merge conflicts
Add package-lock.json to .gitattributes with merge=ours strategy. This prevents lock file conflicts when merging PRs from forks that have run the cleanup script (which removes @anthropic-ai/sdk and @octokit/rest from package.json). Also updated README to explain how package-lock.json is handled during PR merges and what contributors should do when adding new dependencies.
1 parent 35b1811 commit 5fc581e

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
.github/workflows/claude-review.yml merge=ours
44
.github/workflows/template-cleanup.yml merge=ours
55
scripts/claude-pr-review.ts merge=ours
6+
7+
# Protect package-lock.json from fork cleanup changes
8+
# Main repo has extra devDependencies (@anthropic-ai/sdk, @octokit/rest)
9+
# that are removed in forks. Keep main repo's version during merges.
10+
package-lock.json merge=ours

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,19 @@ npm run start
402402

403403
Katkılarınızı bekliyoruz! Lütfen bir issue açın veya pull request gönderin.
404404

405+
### 📝 Pull Request Gönderirken Dikkat Edilmesi Gerekenler
406+
407+
**Yeni npm paketi eklediyseniz:**
408+
- PR açıklamasında hangi paketleri eklediğinizi belirtin
409+
- `package.json` değişikliklerinizi açıklayın
410+
- **Not:** `package-lock.json` değişiklikleri merge sırasında otomatik olarak yönetilir
411+
412+
**package-lock.json hakkında:**
413+
- Fork/clone yaptığınızda `npm run setup` çalıştırırsanız, bazı devDependencies kaldırılır
414+
- Bu normal bir durumdur ve `package-lock.json`'ınız farklı olacaktır
415+
- PR merge edilirken ana repository'nin `package-lock.json` dosyası korunur
416+
- Yeni paket eklemeleriniz `package.json` üzerinden tespit edilir ve merge sonrası yüklenir
417+
405418
## Lisans
406419

407420
MIT Lisansı - bu starter'ı herhangi bir proje için kullanmakta özgürsünüz.

0 commit comments

Comments
 (0)