Skip to content

Commit b37b433

Browse files
committed
feat(config): add commit type release
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent eb266a9 commit b37b433

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

config/changelog.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ sade('changelog', true)
175175
{ section: ':bug: Fixes', type: Type.FIX },
176176
{ section: ':fire: Performance Improvements', type: Type.PERF },
177177
{ section: ':mechanical_arm: Refactors', type: Type.REFACTOR },
178+
{ hidden: true, type: Type.RELEASE },
178179
{ section: ':wastebasket: Reverts', type: Type.REVERT },
179180
{ hidden: true, type: Type.STYLE },
180181
{ section: ':white_check_mark: Testing', type: Type.TEST },

src/config/__snapshots__/rules.integration.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ exports[`integration:config/rules > @commitlint/lint > type-case > should error
212212
},
213213
{
214214
"level": 2,
215-
"message": "type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test, wip]",
215+
"message": "type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, release, revert, style, test, wip]",
216216
"name": "type-enum",
217217
"valid": false,
218218
},
@@ -240,7 +240,7 @@ exports[`integration:config/rules > @commitlint/lint > type-enum > should error
240240
[
241241
{
242242
"level": 2,
243-
"message": "type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test, wip]",
243+
"message": "type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, release, revert, style, test, wip]",
244244
"name": "type-enum",
245245
"valid": false,
246246
},
@@ -251,7 +251,7 @@ exports[`integration:config/rules > @commitlint/lint > type-max-length > should
251251
[
252252
{
253253
"level": 2,
254-
"message": "type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test, wip]",
254+
"message": "type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, release, revert, style, test, wip]",
255255
"name": "type-enum",
256256
"valid": false,
257257
},
@@ -268,7 +268,7 @@ exports[`integration:config/rules > @commitlint/lint > type-min-length > should
268268
[
269269
{
270270
"level": 2,
271-
"message": "type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test, wip]",
271+
"message": "type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, release, revert, style, test, wip]",
272272
"name": "type-enum",
273273
"valid": false,
274274
},

src/config/prompt.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const prompt: PromptConfig = {
4848
description: 'If issues are closed, the commit requires a body'
4949
},
5050
[PromptKind.SCOPE]: {
51-
description: 'What is the scope of this change?'
51+
description: 'Scope of change being committed'
5252
},
5353
[PromptKind.SUBJECT]: {
5454
description: 'Short, imperative tense description of the change'
@@ -79,27 +79,32 @@ const prompt: PromptConfig = {
7979
[Type.FEAT]: {
8080
description: '',
8181
emoji: '✨',
82-
title: 'Features'
82+
title: 'Feature'
8383
},
8484
[Type.FIX]: {
8585
description: '',
8686
emoji: '🐛',
87-
title: 'Fixes'
87+
title: 'Fix'
8888
},
8989
[Type.PERF]: {
9090
description: '',
9191
emoji: '🔥',
92-
title: 'Performance Improvements'
92+
title: 'Performance Improvement'
9393
},
9494
[Type.REFACTOR]: {
9595
description: '',
9696
emoji: '🦾',
97-
title: 'Refactors'
97+
title: 'Refactor'
98+
},
99+
[Type.RELEASE]: {
100+
description: '',
101+
emoji: '🎯',
102+
title: 'Release'
98103
},
99104
[Type.REVERT]: {
100105
description: '',
101106
emoji: '🗑️',
102-
title: 'Reverts'
107+
title: 'Revert'
103108
},
104109
[Type.STYLE]: {
105110
description: '',

src/enums/__tests__/type.spec-d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ describe('unit-d:enums/Type', () => {
5454
.toMatchTypeOf<'refactor'>()
5555
})
5656

57+
it('should match [RELEASE = "release"]', () => {
58+
expectTypeOf<typeof TestSubject>()
59+
.toHaveProperty('RELEASE')
60+
.toMatchTypeOf<'release'>()
61+
})
62+
5763
it('should match [REVERT = "revert"]', () => {
5864
expectTypeOf<typeof TestSubject>()
5965
.toHaveProperty('REVERT')

src/enums/type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ enum Type {
1919
FIX = 'fix',
2020
PERF = 'perf',
2121
REFACTOR = 'refactor',
22+
RELEASE = 'release',
2223
REVERT = 'revert',
2324
STYLE = 'style',
2425
TEST = 'test',

0 commit comments

Comments
 (0)