@govbr-ds/release-config 2.2.0 → 2.3.1
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.md +5 -2
- package/{shared.config.js → lib/shared.config.js} +34 -54
- package/package.json +16 -18
package/README.md
CHANGED
|
@@ -8,6 +8,10 @@ Compartilhar os padrões de commit entre os projetos do [GOVBR-DS](https://gov.b
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm install --save-dev @govbr-ds/release-config
|
|
11
|
+
|
|
12
|
+
ou
|
|
13
|
+
|
|
14
|
+
pnpm add -D @govbr-ds/release-config
|
|
11
15
|
```
|
|
12
16
|
|
|
13
17
|
## Plugins
|
|
@@ -50,8 +54,7 @@ module.exports = {
|
|
|
50
54
|
{
|
|
51
55
|
onSuccessTemplate: {
|
|
52
56
|
username: 'Username',
|
|
53
|
-
content:
|
|
54
|
-
"A versão v$npm_package_version do projeto LOREM IPSUM já está disponível!",
|
|
57
|
+
content: 'A versão v$npm_package_version do projeto LOREM IPSUM já está disponível!',
|
|
55
58
|
},
|
|
56
59
|
},
|
|
57
60
|
],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Cada projeto deve importar essa configuração e usar conforme o README.md
|
|
2
|
+
* Configurações compartilhadas do semantic-release.
|
|
4
3
|
*/
|
|
4
|
+
|
|
5
5
|
module.exports = {
|
|
6
6
|
branches: [
|
|
7
7
|
'main',
|
|
@@ -42,8 +42,9 @@ module.exports = {
|
|
|
42
42
|
{
|
|
43
43
|
preset: 'conventionalcommits',
|
|
44
44
|
releaseRules: [
|
|
45
|
-
// breaking precisa estar no topo
|
|
45
|
+
// breaking precisa estar no topo: https://github.com/semantic-release/commit-analyzer#releaserules
|
|
46
46
|
{ breaking: true, release: 'major' },
|
|
47
|
+
{ type: '*!', release: 'major' },
|
|
47
48
|
{ type: 'build', release: false },
|
|
48
49
|
{ type: 'chore', release: false },
|
|
49
50
|
{ type: 'ci', release: false },
|
|
@@ -73,12 +74,11 @@ module.exports = {
|
|
|
73
74
|
presetConfig: {
|
|
74
75
|
header: '# CHANGELOG',
|
|
75
76
|
types: [
|
|
76
|
-
{ type: 'breaking', section: '💥 BREAKING CHANGES' },
|
|
77
77
|
{ type: 'deprecated', section: '👎 DEPRECIADO' },
|
|
78
78
|
{ type: 'feat', section: '✨ NOVIDADES' },
|
|
79
79
|
{ type: 'removed', section: '🚧 REMOVIDO' },
|
|
80
80
|
{ type: 'docs', section: '📚 DOCUMENTAÇÃO' },
|
|
81
|
-
{ type: 'fix', section: '
|
|
81
|
+
{ type: 'fix', section: '🐛 CORREÇÕES' },
|
|
82
82
|
{ type: 'ops', section: '🔧 ATIVIDADES OPERACIONAIS' },
|
|
83
83
|
{ type: 'perf', section: '🚀 PERFORMANCE' },
|
|
84
84
|
{ type: 'refactor', section: '🔁 REFATORADO' },
|
|
@@ -95,51 +95,31 @@ module.exports = {
|
|
|
95
95
|
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
|
|
96
96
|
},
|
|
97
97
|
writerOpts: {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
]
|
|
124
|
-
|
|
125
|
-
for (const commit of breakingChangesCommits) {
|
|
126
|
-
const scope = commit.scope ? `**${commit.scope}**: ` : ''
|
|
127
|
-
const message = `${scope}${commit.header}`
|
|
128
|
-
breakingChangesSections.push(`- ${message}`)
|
|
129
|
-
if (
|
|
130
|
-
commit.notes?.some((note) =>
|
|
131
|
-
context.options.parserOpts.noteKeywords.some((keyword) =>
|
|
132
|
-
note.title.includes(keyword)
|
|
133
|
-
)
|
|
134
|
-
) &&
|
|
135
|
-
commit.body
|
|
136
|
-
) {
|
|
137
|
-
breakingChangesSections.push(` ${commit.body}`)
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
return breakingChangesSections.join('\n')
|
|
142
|
-
},
|
|
98
|
+
mainTemplate:
|
|
99
|
+
'{{> header}}\n' +
|
|
100
|
+
'\n' +
|
|
101
|
+
'{{#if noteGroups}}\n' +
|
|
102
|
+
'{{#each noteGroups}}\n' +
|
|
103
|
+
'\n' +
|
|
104
|
+
'### 💥 {{title}}\n' +
|
|
105
|
+
'\n' +
|
|
106
|
+
'{{#each notes}}\n' +
|
|
107
|
+
'* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}\n' +
|
|
108
|
+
'{{/each}}\n' +
|
|
109
|
+
'{{/each}}\n' +
|
|
110
|
+
'{{/if}}\n' +
|
|
111
|
+
'{{#each commitGroups}}\n' +
|
|
112
|
+
'\n' +
|
|
113
|
+
'{{#if title}}\n' +
|
|
114
|
+
'### {{title}}\n' +
|
|
115
|
+
'\n' +
|
|
116
|
+
'{{/if}}\n' +
|
|
117
|
+
'{{#each commits}}\n' +
|
|
118
|
+
'{{> commit root=@root}}\n' +
|
|
119
|
+
'{{/each}}\n' +
|
|
120
|
+
'\n' +
|
|
121
|
+
'{{/each}}\n',
|
|
122
|
+
commitsSort: ['scope', 'subject'],
|
|
143
123
|
finalizeContext: (context) => {
|
|
144
124
|
const date = new Date()
|
|
145
125
|
context.date = date.toLocaleString('pt-BR', {
|
|
@@ -160,7 +140,8 @@ module.exports = {
|
|
|
160
140
|
gitlab: [
|
|
161
141
|
'@semantic-release/gitlab',
|
|
162
142
|
{
|
|
163
|
-
successComment:
|
|
143
|
+
successComment:
|
|
144
|
+
':tada: Issue/Merge Request incluído(a) na versão ${nextRelease.version} :tada:\n\nPara mais detalhes:\n- [GitLab release]($CI_PROJECT_URL/-/releases/${nextRelease.version})\n- [GitLab tag]($CI_PROJECT_URL/-/tags/${nextRelease.version})',
|
|
164
145
|
},
|
|
165
146
|
],
|
|
166
147
|
npm: ['@semantic-release/npm'],
|
|
@@ -168,10 +149,9 @@ module.exports = {
|
|
|
168
149
|
'@semantic-release/git',
|
|
169
150
|
{
|
|
170
151
|
assets: ['package.json', 'CHANGELOG.md'],
|
|
171
|
-
message:
|
|
152
|
+
message:
|
|
153
|
+
'chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes} \n\nCommit gerado automaticamente durante o processo de release',
|
|
172
154
|
},
|
|
173
155
|
],
|
|
174
156
|
},
|
|
175
157
|
}
|
|
176
|
-
|
|
177
|
-
|
package/package.json
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govbr-ds/release-config",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"
|
|
3
|
+
"version": "2.3.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Configuração compartilhada do semantic-release para projetos do GovBR-DS",
|
|
5
6
|
"keywords": [
|
|
6
|
-
"gitlab",
|
|
7
7
|
"govbr-ds",
|
|
8
|
-
"
|
|
9
|
-
"semantic-release",
|
|
10
|
-
"semantic-release-config"
|
|
8
|
+
"semantic-release"
|
|
11
9
|
],
|
|
12
10
|
"homepage": "https://gov.br/ds/",
|
|
13
11
|
"bugs": {
|
|
14
|
-
"url": "https://gitlab.com/govbr-ds/govbr-ds-release-config/issues"
|
|
12
|
+
"url": "https://gitlab.com/govbr-ds/configs/govbr-ds-release-config/issues"
|
|
15
13
|
},
|
|
16
14
|
"repository": {
|
|
17
15
|
"type": "git",
|
|
18
|
-
"url": "git@gitlab.com:govbr-ds/govbr-ds-release-config.git"
|
|
16
|
+
"url": "git@gitlab.com:govbr-ds/configs/govbr-ds-release-config.git"
|
|
19
17
|
},
|
|
20
18
|
"license": "MIT",
|
|
21
19
|
"author": "SERPRO <govbr-ds@serpro.gov.br> (http://serpro.gov.br/)",
|
|
22
|
-
"main": "shared.config.js",
|
|
20
|
+
"main": "lib/shared.config.js",
|
|
23
21
|
"files": [
|
|
24
|
-
"shared.config.js"
|
|
22
|
+
"lib/shared.config.js"
|
|
25
23
|
],
|
|
26
24
|
"scripts": {
|
|
27
25
|
"commit": "git-cz",
|
|
@@ -40,20 +38,20 @@
|
|
|
40
38
|
}
|
|
41
39
|
},
|
|
42
40
|
"dependencies": {
|
|
43
|
-
"@govbr-ds/release-config": "^2.
|
|
41
|
+
"@govbr-ds/release-config": "^2.3.0",
|
|
44
42
|
"@semantic-release/changelog": "^6.0.3",
|
|
45
43
|
"@semantic-release/git": "^10.0.1",
|
|
46
|
-
"@semantic-release/gitlab": "^12.0.
|
|
47
|
-
"conventional-changelog-conventionalcommits": "^
|
|
48
|
-
"semantic-release": "^
|
|
44
|
+
"@semantic-release/gitlab": "^12.0.6",
|
|
45
|
+
"conventional-changelog-conventionalcommits": "^7.0.2",
|
|
46
|
+
"semantic-release": "^22.0.5"
|
|
49
47
|
},
|
|
50
48
|
"devDependencies": {
|
|
51
|
-
"@govbr-ds/commit-config": "
|
|
49
|
+
"@govbr-ds/commit-config": "^2.5.0",
|
|
52
50
|
"git-pull-run": "^1.4.0",
|
|
53
51
|
"husky": "^8.0.3",
|
|
54
|
-
"lint-staged": "^
|
|
55
|
-
"markdownlint-cli": "^0.
|
|
56
|
-
"prettier": "^3.0.
|
|
52
|
+
"lint-staged": "^15.0.2",
|
|
53
|
+
"markdownlint-cli": "^0.37.0",
|
|
54
|
+
"prettier": "^3.0.3"
|
|
57
55
|
},
|
|
58
56
|
"engines": {
|
|
59
57
|
"node": ">=18"
|