Skip to content

Commit a3466b3

Browse files
committed
build: add conventional changelog configuration
1 parent ae35e30 commit a3466b3

File tree

4 files changed

+854
-5
lines changed

4 files changed

+854
-5
lines changed

CHANGELOG.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
## [0.0.3](https://github.com/my-mcp-hub/cat-mcp-server/compare/v0.0.2...v0.0.3) (2025-07-25)
2+
3+
4+
### ♻ Code Refactoring | 代码重构
5+
6+
* remove alias config from vitest config ([21e7a94](https://github.com/my-mcp-hub/cat-mcp-server/commit/21e7a9478a3b8242fd82ec2af332788037c5e47f))
7+
* remove comments and clean up type enum values ([fddb4fe](https://github.com/my-mcp-hub/cat-mcp-server/commit/fddb4fe5204c5101638bf31a9c648d31e9c6324d))
8+
9+
10+
### ✅ Tests | 测试
11+
12+
* rename client in vitest setup ([ac2eaef](https://github.com/my-mcp-hub/cat-mcp-server/commit/ac2eaef9afddee08ea6aae66364800f9f1c18897))
13+
14+
15+
### 🎫 Chores | 其他更新
16+
17+
* update coverage command to include lcov reporter ([827d9ad](https://github.com/my-mcp-hub/cat-mcp-server/commit/827d9ad01e71d8bce3c8a5dbcac72fd875bdb870))
18+
* update dependencies ([3688378](https://github.com/my-mcp-hub/cat-mcp-server/commit/3688378e4886148709fb17b850185a469607beab))
19+
* update dependencies ([a4870dc](https://github.com/my-mcp-hub/cat-mcp-server/commit/a4870dc46d50726da5f7757f276f246d3a0b9459))
20+
* update dependencies ([c1ace74](https://github.com/my-mcp-hub/cat-mcp-server/commit/c1ace7403f46d96429555df34cca3522b5e8befd))
21+
* update dependencies ([499d158](https://github.com/my-mcp-hub/cat-mcp-server/commit/499d15841ea5c5e56efaffc7036df5abac6ab6e9))
22+
23+
24+
### 🐛 Bug Fixes | Bug 修复
25+
26+
* cast process.env to Record<string, string> in test setup ([d5ef587](https://github.com/my-mcp-hub/cat-mcp-server/commit/d5ef5872573de20caea0357a28903109387f721b))
27+
28+
29+
### 📝 Documentation | 文档
30+
31+
* update README ([6ba2478](https://github.com/my-mcp-hub/cat-mcp-server/commit/6ba24784fa6ae28ad0efe31b430477f9e13a0da7))
32+
33+
34+
35+
## [0.0.2](https://github.com/my-mcp-hub/cat-mcp-server/compare/v0.0.1...v0.0.2) (2025-07-16)
36+
37+
38+
### 🎫 Chores | 其他更新
39+
40+
* bump version from 0.0.1 to 0.0.2 ([88ea2b6](https://github.com/my-mcp-hub/cat-mcp-server/commit/88ea2b651ab16373ff33cc0731f4c5bf0329771f))
41+
42+
43+
### 📝 Documentation | 文档
44+
45+
* update package name in readme examples ([e0abb21](https://github.com/my-mcp-hub/cat-mcp-server/commit/e0abb212590e1dd2fa51a958ce67a46cf6235ca1))
46+
47+
48+
49+
## [0.0.1](https://github.com/my-mcp-hub/cat-mcp-server/compare/d2e73d5ddbaba923baca61818fddc171b7c7594d...v0.0.1) (2025-07-16)
50+
51+
52+
### ♻ Code Refactoring | 代码重构
53+
54+
* pass options to registerTools for better configurability ([09344d9](https://github.com/my-mcp-hub/cat-mcp-server/commit/09344d9debcf2c97ef5d76ff3bfd09b47a20f2c7))
55+
* rename client ([29c53f6](https://github.com/my-mcp-hub/cat-mcp-server/commit/29c53f6fa6d832b38959afca251ab3017807c325))
56+
* **tools:** update tool registration to use new schema format ([27cdf28](https://github.com/my-mcp-hub/cat-mcp-server/commit/27cdf28ba8e23ec15a12c593eedaf0e23e1c2980))
57+
* update import paths to use @/ alias and fix build hooks ([2b2b06c](https://github.com/my-mcp-hub/cat-mcp-server/commit/2b2b06cff015718e9f4ac9cd3fc231bad8d690f7))
58+
59+
60+
### ✅ Tests | 测试
61+
62+
* simplify web server and update test configuration ([014c870](https://github.com/my-mcp-hub/cat-mcp-server/commit/014c870b5f57f102b6246b6a101b5e70e41012b6))
63+
64+
65+
### ✨ Features | 新功能
66+
67+
* add cat image generator as separate module ([ad90c35](https://github.com/my-mcp-hub/cat-mcp-server/commit/ad90c35e87492d681c8c11c3d86e3a578eaab900))
68+
* add environment variables for inspector process ([a61946a](https://github.com/my-mcp-hub/cat-mcp-server/commit/a61946a12e09a645eee5404f5bad13687d19911a))
69+
* add GenerateCatImage tool ([d2e73d5](https://github.com/my-mcp-hub/cat-mcp-server/commit/d2e73d5ddbaba923baca61818fddc171b7c7594d))
70+
* add vitest testing setup and CI workflow ([1963aa5](https://github.com/my-mcp-hub/cat-mcp-server/commit/1963aa5704661f414b11cc6d956afa38344bbdeb))
71+
72+
73+
### 🎫 Chores | 其他更新
74+
75+
* disable auto-open browser after first launch ([d2ed430](https://github.com/my-mcp-hub/cat-mcp-server/commit/d2ed430b7127978419b293bfb42e7bff34d244da))
76+
* remove unused dependencies ([24b1df7](https://github.com/my-mcp-hub/cat-mcp-server/commit/24b1df795f4778f054f448b848183fbf05be8419))
77+
* rename project ([b744eef](https://github.com/my-mcp-hub/cat-mcp-server/commit/b744eef9e22699699351babf8749074aba207313))
78+
* update dependencies ([50267a1](https://github.com/my-mcp-hub/cat-mcp-server/commit/50267a17a3060787531cfbec43b42d9b803c1aaa))
79+
* update dependencies ([ab372a2](https://github.com/my-mcp-hub/cat-mcp-server/commit/ab372a2679c3d5f450e3f522fe7874e9ca47c609))
80+
81+
82+
### 🐛 Bug Fixes | Bug 修复
83+
84+
* correct path construction for cat gif API ([ca1663c](https://github.com/my-mcp-hub/cat-mcp-server/commit/ca1663c7f1473e89b91f5e94c5c74f4989ea87d8))
85+
86+
87+

changelog-option.js

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
import compareFunc from 'compare-func'
2+
3+
export default {
4+
writerOpts: {
5+
transform: (commit, context) => {
6+
let discard = true
7+
const issues = []
8+
9+
const newCommit = {
10+
...commit,
11+
notes: commit.notes.map(note => ({
12+
...note,
13+
title: 'BREAKING CHANGES',
14+
})),
15+
}
16+
17+
if (newCommit.notes.length > 0) {
18+
discard = false
19+
}
20+
21+
const typeMap = {
22+
feat: '✨ Features | 新功能',
23+
fix: '🐛 Bug Fixes | Bug 修复',
24+
perf: '⚡ Performance Improvements | 性能优化',
25+
revert: '⏪ Reverts | 回退',
26+
refactor: '♻ Code Refactoring | 代码重构',
27+
test: '✅ Tests | 测试',
28+
build: '👷‍ Build System | 构建',
29+
chore: '🎫 Chores | 其他更新',
30+
style: '💄 Styles | 风格',
31+
ci: '🔧 Continuous Integration | CI 配置',
32+
docs: '📝 Documentation | 文档',
33+
}
34+
35+
if (typeMap[newCommit.type]) {
36+
newCommit.type = typeMap[newCommit.type]
37+
} else if (newCommit.type === 'revert' || newCommit.revert) {
38+
newCommit.type = typeMap['revert']
39+
} else if (discard) {
40+
return
41+
}
42+
43+
if (newCommit.scope === '*') {
44+
newCommit.scope = ''
45+
}
46+
47+
if (typeof newCommit.hash === 'string') {
48+
newCommit.shortHash = newCommit.hash.substring(0, 7)
49+
}
50+
51+
if (typeof newCommit.subject === 'string') {
52+
let url = context.repository ? `${context.host}/${context.owner}/${context.repository}` : context.repoUrl
53+
54+
if (url) {
55+
url = `${url}/issues/`
56+
newCommit.subject = newCommit.subject.replace(/#([0-9]+)/g, (_, issue) => {
57+
issues.push(issue)
58+
return `[#${issue}](${url}${issue})`
59+
})
60+
}
61+
62+
if (context.host) {
63+
newCommit.subject = newCommit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
64+
if (username.includes('/')) {
65+
return `@${username}`
66+
}
67+
return `[@${username}](${context.host}/${username})`
68+
})
69+
}
70+
}
71+
72+
newCommit.references = newCommit.references.filter(reference => {
73+
if (issues.indexOf(reference.issue) === -1) {
74+
return true
75+
}
76+
return false
77+
})
78+
79+
return newCommit
80+
},
81+
groupBy: 'type',
82+
commitGroupsSort: 'title',
83+
commitsSort: ['scope', 'subject'],
84+
noteGroupsSort: 'title',
85+
notesSort: compareFunc,
86+
},
87+
}

0 commit comments

Comments
 (0)