Skip to content

Commit f5bfc35

Browse files
authored
chore: merge pull request #11 from addon-stack/develop
Simplify and clean up release-it configuration
2 parents 5a291e0 + ff864e1 commit f5bfc35

File tree

1 file changed

+21
-25
lines changed

1 file changed

+21
-25
lines changed

.release-it.cjs

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ module.exports = () => {
142142
skipChecks: true,
143143
provenance: true,
144144
access: "public",
145-
registry: "https://registry.npmjs.org/",
146145
versionArgs: ["--no-git-tag-version"],
147146
},
148147

@@ -168,41 +167,38 @@ module.exports = () => {
168167
contributors,
169168
},
170169

171-
recommendedBumpOpts: {
172-
preset: "conventionalcommits",
173-
whatBump: commits => {
174-
let isMajor = false;
175-
let isMinor = false;
176-
let isPatch = false;
170+
whatBump: commits => {
171+
let isMajor = false;
172+
let isMinor = false;
173+
let isPatch = false;
177174

178-
for (const commit of commits) {
179-
if (commit.notes?.some(n => /BREAKING CHANGE/i.test(n.title || n.text || ""))) {
180-
isMajor = true;
181-
break;
182-
}
175+
for (const commit of commits) {
176+
if (commit.notes?.some(n => /BREAKING CHANGE/i.test(n.title || n.text || ""))) {
177+
isMajor = true;
178+
break;
179+
}
183180

184-
const type = (commit.type || "").toLowerCase();
181+
const type = (commit.type || "").toLowerCase();
185182

186-
if (type === "feat") {
187-
isMinor = true;
188-
}
183+
if (type === "feat") {
184+
isMinor = true;
185+
}
189186

190-
if (["fix", "perf", "refactor", "ci"].includes(type)) {
191-
isPatch = true;
192-
}
187+
if (["fix", "perf", "refactor", "ci"].includes(type)) {
188+
isPatch = true;
193189
}
190+
}
194191

195-
if (isMajor) return {level: 0};
196-
if (isMinor) return {level: 1};
197-
if (isPatch) return {level: 2};
192+
if (isMajor) return {level: 0};
193+
if (isMinor) return {level: 1};
194+
if (isPatch) return {level: 2};
198195

199-
return null;
200-
},
196+
return null;
201197
},
202198
writerOpts: {
203199
headerPartial:
204200
"## 🚀 Release {{#if name}}`{{name}}` {{else}}{{#if @root.pkg}}`{{@root.pkg.name}}` {{/if}}{{/if}}v{{version}} ({{date}})\n\n",
205-
footerPartial: `{{#if @root.contributors.length}}\n### 🙌 Contributors\n\n{{#each @root.contributors}}- {{#if url}}{{#if name}}[{{name}}]({{url}}){{#if login}} (@{{login}}){{/if}}{{else}}[@{{login}}]({{url}}){{/if}}{{else}}{{#if email}}{{#if name}}[{{name}}]({{email}}){{else}}{{email}}{{/if}}{{else}}{{name}}{{/if}}{{/if}} — {{count}} commits\n{{/each}}{{/if}}`,
201+
footerPartial: `{{#if @root.contributors.length}}\n### 🙌 Contributors\n\n{{#each @root.contributors}}- {{#if url}}{{#if name}}[{{name}}]({{url}}){{#if login}} (@{{login}}){{/if}}{{else}}[@{{login}}]({{url}}){{/if}}{{else}}{{#if email}}{{#if name}}[{{name}}](mailto:{{email}}){{else}}{{email}}{{/if}}{{else}}{{name}}{{/if}}{{/if}} — commits: {{count}}\n{{/each}}{{/if}}`,
206202
mainTemplate:
207203
"{{> header}}\n" +
208204
"{{#if noteGroups}}\n### 💥 Breaking Changes\n\n{{#each noteGroups}}{{#each notes}}* {{{text}}}\n\n{{/each}}{{/each}}{{/if}}" +

0 commit comments

Comments
 (0)