@govbr-ds/release-config 2.1.2 → 2.3.0

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 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
- * Arquivo com as configurações compartilhadas entre os projetos.
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',
@@ -36,18 +36,15 @@ module.exports = {
36
36
  prerelease: 'alpha',
37
37
  },
38
38
  ],
39
- /**
40
- * As configurações de cada plugin não podem ser sobrescritas.
41
- * Devem ser usadas por inteiro.
42
- */
43
39
  plugins: {
44
40
  commitAnalyzer: [
45
41
  '@semantic-release/commit-analyzer',
46
42
  {
47
43
  preset: 'conventionalcommits',
48
44
  releaseRules: [
49
- // breaking precisa estar no topo devido a como o plugin se comporta: https://github.com/semantic-release/commit-analyzer#releaserules
45
+ // breaking precisa estar no topo: https://github.com/semantic-release/commit-analyzer#releaserules
50
46
  { breaking: true, release: 'major' },
47
+ { type: '*!', release: 'major' },
51
48
  { type: 'build', release: false },
52
49
  { type: 'chore', release: false },
53
50
  { type: 'ci', release: false },
@@ -76,18 +73,16 @@ module.exports = {
76
73
  preset: 'conventionalcommits',
77
74
  presetConfig: {
78
75
  header: '# CHANGELOG',
79
- // O release notes/changelog vai ser gerado nessa ordem
80
76
  types: [
81
- { type: 'breaking', section: '💥 Breaking Changes' },
82
- { type: 'deprecated', section: '👎 Depreciado' },
83
- { type: 'feat', section: '✨ Novidades' },
84
- { type: 'removed', section: '🚧 Removido' },
85
- { type: 'docs', section: '📚 Documentação' },
86
- { type: 'fix', section: '🪲 Correções' },
87
- { type: 'ops', section: '🔧 Atividades Operacionais' },
88
- { type: 'perf', section: '🚀 Performance' },
89
- { type: 'refactor', section: '🔁 Refatorado' },
90
- { type: 'revert', section: '⏪ Revertido' },
77
+ { type: 'deprecated', section: '👎 DEPRECIADO' },
78
+ { type: 'feat', section: '✨ NOVIDADES' },
79
+ { type: 'removed', section: '🚧 REMOVIDO' },
80
+ { type: 'docs', section: '📚 DOCUMENTAÇÃO' },
81
+ { type: 'fix', section: '🐛 CORREÇÕES' },
82
+ { type: 'ops', section: '🔧 ATIVIDADES OPERACIONAIS' },
83
+ { type: 'perf', section: '🚀 PERFORMANCE' },
84
+ { type: 'refactor', section: '🔁 REFATORADO' },
85
+ { type: 'revert', section: '⏪ REVERTIDO' },
91
86
  { type: 'build', hidden: true },
92
87
  { type: 'chore', hidden: true },
93
88
  { type: 'ci', hidden: true },
@@ -100,7 +95,31 @@ module.exports = {
100
95
  noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
101
96
  },
102
97
  writerOpts: {
103
- commitsSort: ['subject', 'scope'],
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'],
104
123
  finalizeContext: (context) => {
105
124
  const date = new Date()
106
125
  context.date = date.toLocaleString('pt-BR', {
@@ -122,7 +141,7 @@ module.exports = {
122
141
  '@semantic-release/gitlab',
123
142
  {
124
143
  successComment:
125
- ':tada: Essa issue foi resolvida 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})',
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})',
126
145
  },
127
146
  ],
128
147
  npm: ['@semantic-release/npm'],
@@ -131,7 +150,7 @@ module.exports = {
131
150
  {
132
151
  assets: ['package.json', 'CHANGELOG.md'],
133
152
  message:
134
- 'chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes} \n\nEsse commit foi gerado automaticamente durante o processo de release',
153
+ 'chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes} \n\nCommit gerado automaticamente durante o processo de release',
135
154
  },
136
155
  ],
137
156
  },
package/package.json CHANGED
@@ -1,35 +1,36 @@
1
1
  {
2
2
  "name": "@govbr-ds/release-config",
3
- "version": "2.1.2",
4
- "description": "Configuração compartilhada do semantic-release para projetos do GovBR-DS no gitlab",
3
+ "version": "2.3.0",
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
- "conventional-changelog",
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",
28
- "md": "markdownlint **/*.{md,mdx} --fix",
29
- "prepare": "husky install"
26
+ "lint:md": "markdownlint --fix **/*.md -d -c .markdownlint.yml",
27
+ "prepare": "chmod +x ./node_modules/husky/lib/bin.js && husky install"
30
28
  },
31
29
  "lint-staged": {
32
- "*.{md,mdx}": "markdownlint --fix"
30
+ "*.md": [
31
+ "markdownlint -d -c .markdownlint.yml --fix **/*.md",
32
+ "prettier --write"
33
+ ]
33
34
  },
34
35
  "config": {
35
36
  "commitizen": {
@@ -37,19 +38,21 @@
37
38
  }
38
39
  },
39
40
  "dependencies": {
40
- "@govbr-ds/release-config": "^2.1.1",
41
+ "@govbr-ds/release-config": "^2.2.0",
41
42
  "@semantic-release/changelog": "^6.0.3",
42
43
  "@semantic-release/git": "^10.0.1",
43
- "@semantic-release/gitlab": "^12.0.1",
44
- "conventional-changelog-conventionalcommits": "^5.0.0",
45
- "semantic-release": "^21.0.1"
44
+ "@semantic-release/gitlab": "^12.0.6",
45
+ "conventional-changelog-conventionalcommits": "^7.0.2",
46
+ "js-yaml": "^4.1.0",
47
+ "semantic-release": "^22.0.5"
46
48
  },
47
49
  "devDependencies": {
48
50
  "@govbr-ds/commit-config": "latest",
49
51
  "git-pull-run": "^1.4.0",
50
52
  "husky": "^8.0.3",
51
- "lint-staged": "^13.2.1",
52
- "markdownlint-cli": "^0.33.0"
53
+ "lint-staged": "^15.0.1",
54
+ "markdownlint-cli": "^0.37.0",
55
+ "prettier": "^3.0.3"
53
56
  },
54
57
  "engines": {
55
58
  "node": ">=18"