|
| 1 | + |
| 2 | +## 🔥 Conventional Commit টাইপগুলোর পূর্ণ তালিকা (সাথে ব্যাখ্যা) |
| 3 | + |
| 4 | +| Type | অর্থ / ব্যবহারের সময় | SemVer impact | |
| 5 | +| ------------ | --------------------------------------------------------------------------------- | -------------- | |
| 6 | +| **feat** | নতুন feature যোগ করা | **minor** bump | |
| 7 | +| **fix** | কোনো bug fix করা | **patch** bump | |
| 8 | +| **docs** | শুধুমাত্র documentation পরিবর্তন | নেই | |
| 9 | +| **style** | কোডের ফরম্যাট, স্পেস, লিন্ট ফিক্স (কোনো লজিক চেঞ্জ না) | নেই | |
| 10 | +| **refactor** | কোডের গঠন বা লজিক রিফ্যাক্টর (feature বা bug fix নয়) | নেই | |
| 11 | +| **perf** | পারফরম্যান্স উন্নয়ন করা (যেমন ফাংশন অপ্টিমাইজ করা) | **patch** bump | |
| 12 | +| **test** | টেস্ট কোড যোগ বা আপডেট | নেই | |
| 13 | +| **chore** | build scripts, dependency updates, config changes ইত্যাদি | নেই | |
| 14 | +| **build** | build system বা dependency সম্পর্কিত পরিবর্তন (webpack, npm ইত্যাদি) | নেই | |
| 15 | +| **ci** | continuous integration সম্পর্কিত পরিবর্তন (GitHub Actions, Travis ইত্যাদি) | নেই | |
| 16 | +| **revert** | পূর্বের কোনো commit revert করা (যেমন: “revert: feat(auth): remove token refresh”) | সাধারণত patch | |
| 17 | +| **merge** | merge commit বোঝাতে (কখনও কখনও auto generated হয়) | নেই | |
| 18 | +| **deps** | dependency update (npm update ইত্যাদি) — `chore` এর sub-type হিসেবে | নেই | |
| 19 | +| **security** | security issue fix (যেমন XSS বা auth bug fix) | **patch** bump | |
| 20 | +| **wip** | work in progress (অস্থায়ী, production merge এর আগে) | নেই | |
| 21 | +| **release** | version bump বা changelog update করা | নেই | |
| 22 | +| **hotfix** | urgent bug fix (production issue) — কিছু টিম আলাদা করে রাখে | **patch** bump | |
| 23 | +| **config** | project configuration file পরিবর্তন (lint, prettier, env ইত্যাদি) | নেই | |
| 24 | +| **init** | প্রজেক্ট বা নতুন মডিউলের প্রথম commit | নেই | |
| 25 | +| **deps-dev** | শুধু devDependencies আপডেট করলে | নেই | |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## ⚙️ উদাহরণসমূহ |
| 30 | + |
| 31 | +```bash |
| 32 | +feat(auth): add OTP-based login |
| 33 | +fix(router): prevent crash on invalid param |
| 34 | +docs(readme): update installation guide |
| 35 | +style(button): fix indentation |
| 36 | +refactor(api): simplify data fetching logic |
| 37 | +perf(image): compress images for faster load |
| 38 | +test(user): add unit tests for register function |
| 39 | +chore(release): update changelog and version |
| 40 | +build(npm): add postinstall script |
| 41 | +ci(github): update actions workflow |
| 42 | +revert: revert "feat(auth): add OTP-based login" |
| 43 | +security(auth): fix JWT token leakage |
| 44 | +config(eslint): add new lint rules |
| 45 | +init(project): initial commit with Next.js setup |
| 46 | +``` |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## ⚡ Bonus Tip — “Breaking Change” বোঝানো |
| 51 | + |
| 52 | +যদি তুমি এমন কোনো পরিবর্তন করো যা **পুরনো কোড ভেঙে ফেলবে**, |
| 53 | +তাহলে commit এ নিচের দুইভাবে তা জানাও 👇 |
| 54 | + |
| 55 | +### 🧩 Option 1 — `!` ব্যবহার করে |
| 56 | + |
| 57 | +```bash |
| 58 | +feat!: remove old login endpoint |
| 59 | +``` |
| 60 | + |
| 61 | +### 🧩 Option 2 — Footer এ লিখে |
| 62 | + |
| 63 | +```bash |
| 64 | +feat(api): update response format |
| 65 | + |
| 66 | +BREAKING CHANGE: /users endpoint now returns paginated data. |
| 67 | +``` |
| 68 | + |
| 69 | +👉 এই `BREAKING CHANGE` keyword দিলে Semantic Versioning অনুযায়ী **major version bump** হয়। |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +## 🧠 এক কথায় মনে রাখো |
| 74 | + |
| 75 | +| Type Group | Purpose | |
| 76 | +| ------------------- | ---------------------------------------- | |
| 77 | +| **Feature related** | feat, fix, perf, hotfix, security | |
| 78 | +| **Maintenance** | chore, build, ci, config, deps, deps-dev | |
| 79 | +| **Code quality** | style, refactor, test | |
| 80 | +| **Docs & Info** | docs, release | |
| 81 | +| **Meta** | revert, init, merge, wip | |
0 commit comments