From b2e8540b75f19144f623df4e68ee1d3f645bf001 Mon Sep 17 00:00:00 2001 From: Tycho Bokdam Date: Thu, 24 Oct 2024 15:13:32 +0200 Subject: [PATCH] chore: Misc --- dist/commit.hbs | 62 +++++++++++++++++++++++++++++++++++++++++++--- dist/commit1.hbs | 41 ++++-------------------------- dist/commit2.hbs | 31 +++-------------------- dist/header.hbs | 26 ++++++++++++++++++- dist/header1.hbs | 20 ++------------- dist/header2.hbs | 10 +------- dist/index.js | 18 +++++++------- dist/package.json | 3 --- dist/template.hbs | 3 ++- dist/template1.hbs | 13 +++++++--- dist/template2.hbs | 14 +++-------- 11 files changed, 119 insertions(+), 122 deletions(-) delete mode 100644 dist/package.json diff --git a/dist/commit.hbs b/dist/commit.hbs index c84b85f9..e10a0d90 100644 --- a/dist/commit.hbs +++ b/dist/commit.hbs @@ -1,5 +1,61 @@ -* {{#if message}}{{message}}{{else}}{{header}}{{/if}} +*{{#if scope}} **{{scope}}:** +{{~/if}} {{#if subject}} + {{~subject}} +{{~else}} + {{~header}} +{{~/if}} -{{~!-- commit hash --}} {{#if @root.linkReferences}}([{{shortHash}}]({{#if @root.host}}{{@root.host}}/{{/if}}{{#if @root.owner}}{{@root.owner}}/{{/if}}{{@root.repository}}/{{@root.commit}}/{{hash}})){{else}}{{hash~}}{{/if}} +{{~!-- commit link --}} {{#if @root.linkReferences~}} + ([{{shortHash}}]( + {{~#if @root.repository}} + {{~#if @root.host}} + {{~@root.host}}/ + {{~/if}} + {{~#if @root.owner}} + {{~@root.owner}}/ + {{~/if}} + {{~@root.repository}} + {{~else}} + {{~@root.repoUrl}} + {{~/if}}/ + {{~@root.commit}}/{{hash}})) +{{~else}} + {{~shortHash}} +{{~/if}} + +{{~!-- commit references --}} +{{~#if references~}} + , closes + {{~#each references}} {{#if @root.linkReferences~}} + [ + {{~#if this.owner}} + {{~this.owner}}/ + {{~/if}} + {{~this.repository}}#{{this.issue}}]( + {{~#if @root.repository}} + {{~#if @root.host}} + {{~@root.host}}/ + {{~/if}} + {{~#if this.repository}} + {{~#if this.owner}} + {{~this.owner}}/ + {{~/if}} + {{~this.repository}} + {{~else}} + {{~#if @root.owner}} + {{~@root.owner}}/ + {{~/if}} + {{~@root.repository}} + {{~/if}} + {{~else}} + {{~@root.repoUrl}} + {{~/if}}/ + {{~@root.issue}}/{{this.issue}}) + {{~else}} + {{~#if this.owner}} + {{~this.owner}}/ + {{~/if}} + {{~this.repository}}#{{this.issue}} + {{~/if}}{{/each}} +{{~/if}} -{{~!-- commit references --}}{{#if references}}, closes{{~#each references}} {{#if @root.linkReferences}}[{{#if this.owner}}{{this.owner}}/{{/if}}{{this.repository}}#{{this.issue}}]({{#if @root.host}}{{@root.host}}/{{/if}}{{#if this.repository}}{{#if this.owner}}{{this.owner}}/{{/if}}{{this.repository}}{{else}}{{#if @root.owner}}{{@root.owner}}/{{/if}}{{@root.repository}}{{/if}}/{{@root.issue}}/{{this.issue}}){{else}}{{#if this.owner}}{{this.owner}}/{{/if}}{{this.repository}}#{{this.issue}}{{/if}}{{/each}}{{/if}} diff --git a/dist/commit1.hbs b/dist/commit1.hbs index e10a0d90..641c2f37 100644 --- a/dist/commit1.hbs +++ b/dist/commit1.hbs @@ -5,23 +5,11 @@ {{~header}} {{~/if}} -{{~!-- commit link --}} {{#if @root.linkReferences~}} - ([{{shortHash}}]( - {{~#if @root.repository}} - {{~#if @root.host}} - {{~@root.host}}/ - {{~/if}} - {{~#if @root.owner}} - {{~@root.owner}}/ - {{~/if}} - {{~@root.repository}} - {{~else}} - {{~@root.repoUrl}} - {{~/if}}/ - {{~@root.commit}}/{{hash}})) +{{~!-- commit link --}}{{~#if hash}} {{#if @root.linkReferences~}} + ([{{shortHash}}]({{commitUrlFormat}})) {{~else}} {{~shortHash}} -{{~/if}} +{{~/if}}{{~/if}} {{~!-- commit references --}} {{~#if references~}} @@ -31,31 +19,12 @@ {{~#if this.owner}} {{~this.owner}}/ {{~/if}} - {{~this.repository}}#{{this.issue}}]( - {{~#if @root.repository}} - {{~#if @root.host}} - {{~@root.host}}/ - {{~/if}} - {{~#if this.repository}} - {{~#if this.owner}} - {{~this.owner}}/ - {{~/if}} - {{~this.repository}} - {{~else}} - {{~#if @root.owner}} - {{~@root.owner}}/ - {{~/if}} - {{~@root.repository}} - {{~/if}} - {{~else}} - {{~@root.repoUrl}} - {{~/if}}/ - {{~@root.issue}}/{{this.issue}}) + {{~this.repository}}{{this.prefix}}{{this.issue}}]({{issueUrlFormat}}) {{~else}} {{~#if this.owner}} {{~this.owner}}/ {{~/if}} - {{~this.repository}}#{{this.issue}} + {{~this.repository}}{{this.prefix}}{{this.issue}} {{~/if}}{{/each}} {{~/if}} diff --git a/dist/commit2.hbs b/dist/commit2.hbs index 641c2f37..c84b85f9 100644 --- a/dist/commit2.hbs +++ b/dist/commit2.hbs @@ -1,30 +1,5 @@ -*{{#if scope}} **{{scope}}:** -{{~/if}} {{#if subject}} - {{~subject}} -{{~else}} - {{~header}} -{{~/if}} +* {{#if message}}{{message}}{{else}}{{header}}{{/if}} -{{~!-- commit link --}}{{~#if hash}} {{#if @root.linkReferences~}} - ([{{shortHash}}]({{commitUrlFormat}})) -{{~else}} - {{~shortHash}} -{{~/if}}{{~/if}} - -{{~!-- commit references --}} -{{~#if references~}} - , closes - {{~#each references}} {{#if @root.linkReferences~}} - [ - {{~#if this.owner}} - {{~this.owner}}/ - {{~/if}} - {{~this.repository}}{{this.prefix}}{{this.issue}}]({{issueUrlFormat}}) - {{~else}} - {{~#if this.owner}} - {{~this.owner}}/ - {{~/if}} - {{~this.repository}}{{this.prefix}}{{this.issue}} - {{~/if}}{{/each}} -{{~/if}} +{{~!-- commit hash --}} {{#if @root.linkReferences}}([{{shortHash}}]({{#if @root.host}}{{@root.host}}/{{/if}}{{#if @root.owner}}{{@root.owner}}/{{/if}}{{@root.repository}}/{{@root.commit}}/{{hash}})){{else}}{{hash~}}{{/if}} +{{~!-- commit references --}}{{#if references}}, closes{{~#each references}} {{#if @root.linkReferences}}[{{#if this.owner}}{{this.owner}}/{{/if}}{{this.repository}}#{{this.issue}}]({{#if @root.host}}{{@root.host}}/{{/if}}{{#if this.repository}}{{#if this.owner}}{{this.owner}}/{{/if}}{{this.repository}}{{else}}{{#if @root.owner}}{{@root.owner}}/{{/if}}{{@root.repository}}{{/if}}/{{@root.issue}}/{{this.issue}}){{else}}{{#if this.owner}}{{this.owner}}/{{/if}}{{this.repository}}#{{this.issue}}{{/if}}{{/each}}{{/if}} diff --git a/dist/header.hbs b/dist/header.hbs index 26eb2f0e..fc781c4b 100644 --- a/dist/header.hbs +++ b/dist/header.hbs @@ -1 +1,25 @@ -{{#if isPatch}}##{{else}}#{{/if}} {{#if @root.linkCompare}}[{{version}}]({{@root.host}}/{{#if @root.owner}}{{@root.owner}}/{{/if}}{{@root.repository}}/compare/{{previousTag}}...{{currentTag}}){{else}}{{version}}{{/if}}{{#if title}} "{{title}}"{{/if}}{{#if date}} ({{date}}){{/if}} +{{#if isPatch~}} + ## +{{~else~}} + # +{{~/if}} {{#if @root.linkCompare~}} + [{{version}}]( + {{~#if @root.repository~}} + {{~#if @root.host}} + {{~@root.host}}/ + {{~/if}} + {{~#if @root.owner}} + {{~@root.owner}}/ + {{~/if}} + {{~@root.repository}} + {{~else}} + {{~@root.repoUrl}} + {{~/if~}} + /compare/{{previousTag}}...{{currentTag}}) +{{~else}} + {{~version}} +{{~/if}} +{{~#if title}} "{{title}}" +{{~/if}} +{{~#if date}} ({{date}}) +{{/if}} diff --git a/dist/header1.hbs b/dist/header1.hbs index fc781c4b..d7efc8fb 100644 --- a/dist/header1.hbs +++ b/dist/header1.hbs @@ -1,21 +1,5 @@ -{{#if isPatch~}} - ## -{{~else~}} - # -{{~/if}} {{#if @root.linkCompare~}} - [{{version}}]( - {{~#if @root.repository~}} - {{~#if @root.host}} - {{~@root.host}}/ - {{~/if}} - {{~#if @root.owner}} - {{~@root.owner}}/ - {{~/if}} - {{~@root.repository}} - {{~else}} - {{~@root.repoUrl}} - {{~/if~}} - /compare/{{previousTag}}...{{currentTag}}) +## {{#if @root.linkCompare~}} + [{{version}}]({{compareUrlFormat}}) {{~else}} {{~version}} {{~/if}} diff --git a/dist/header2.hbs b/dist/header2.hbs index d7efc8fb..26eb2f0e 100644 --- a/dist/header2.hbs +++ b/dist/header2.hbs @@ -1,9 +1 @@ -## {{#if @root.linkCompare~}} - [{{version}}]({{compareUrlFormat}}) -{{~else}} - {{~version}} -{{~/if}} -{{~#if title}} "{{title}}" -{{~/if}} -{{~#if date}} ({{date}}) -{{/if}} +{{#if isPatch}}##{{else}}#{{/if}} {{#if @root.linkCompare}}[{{version}}]({{@root.host}}/{{#if @root.owner}}{{@root.owner}}/{{/if}}{{@root.repository}}/compare/{{previousTag}}...{{currentTag}}){{else}}{{version}}{{/if}}{{#if title}} "{{title}}"{{/if}}{{#if date}} ({{date}}){{/if}} diff --git a/dist/index.js b/dist/index.js index adcfb9c4..51e00208 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5641,9 +5641,9 @@ const { resolve } = __nccwpck_require__(6928) async function createWriterOpts () { const [template, header, commit, footer] = await Promise.all([ - readFile(__nccwpck_require__.ab + "template1.hbs", 'utf-8'), - readFile(__nccwpck_require__.ab + "header1.hbs", 'utf-8'), - readFile(__nccwpck_require__.ab + "commit1.hbs", 'utf-8'), + readFile(__nccwpck_require__.ab + "template.hbs", 'utf-8'), + readFile(__nccwpck_require__.ab + "header.hbs", 'utf-8'), + readFile(__nccwpck_require__.ab + "commit.hbs", 'utf-8'), readFile(__nccwpck_require__.ab + "footer.hbs", 'utf-8') ]) const writerOpts = getWriterOpts() @@ -5985,9 +5985,9 @@ async function createWriterOpts (config) { commit, footer ] = await Promise.all([ - readFile(__nccwpck_require__.ab + "template2.hbs", 'utf-8'), - readFile(__nccwpck_require__.ab + "header2.hbs", 'utf-8'), - readFile(__nccwpck_require__.ab + "commit2.hbs", 'utf-8'), + readFile(__nccwpck_require__.ab + "template1.hbs", 'utf-8'), + readFile(__nccwpck_require__.ab + "header1.hbs", 'utf-8'), + readFile(__nccwpck_require__.ab + "commit1.hbs", 'utf-8'), readFile(__nccwpck_require__.ab + "footer1.hbs", 'utf-8') ]) const writerOpts = getWriterOpts(finalConfig) @@ -6803,9 +6803,9 @@ const { resolve } = __nccwpck_require__(6928) async function createWriterOpts () { const [template, header, commit] = await Promise.all([ - readFile(__nccwpck_require__.ab + "template.hbs", 'utf-8'), - readFile(__nccwpck_require__.ab + "header.hbs", 'utf-8'), - readFile(__nccwpck_require__.ab + "commit.hbs", 'utf-8') + readFile(__nccwpck_require__.ab + "template2.hbs", 'utf-8'), + readFile(__nccwpck_require__.ab + "header2.hbs", 'utf-8'), + readFile(__nccwpck_require__.ab + "commit2.hbs", 'utf-8') ]) const writerOpts = getWriterOpts() diff --git a/dist/package.json b/dist/package.json deleted file mode 100644 index 3dbc1ca5..00000000 --- a/dist/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/dist/template.hbs b/dist/template.hbs index 923a3833..38e15d24 100644 --- a/dist/template.hbs +++ b/dist/template.hbs @@ -9,7 +9,8 @@ {{#each commits}} {{> commit root=@root}} {{/each}} -{{/each}} +{{/each}} +{{> footer}} diff --git a/dist/template1.hbs b/dist/template1.hbs index 38e15d24..3b194f06 100644 --- a/dist/template1.hbs +++ b/dist/template1.hbs @@ -1,5 +1,15 @@ {{> header}} +{{#if noteGroups}} +{{#each noteGroups}} + +### ⚠ {{title}} + +{{#each notes}} +* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}} +{{/each}} +{{/each}} +{{/if}} {{#each commitGroups}} {{#if title}} @@ -11,6 +21,3 @@ {{/each}} {{/each}} -{{> footer}} - - diff --git a/dist/template2.hbs b/dist/template2.hbs index 3b194f06..923a3833 100644 --- a/dist/template2.hbs +++ b/dist/template2.hbs @@ -1,15 +1,5 @@ {{> header}} -{{#if noteGroups}} -{{#each noteGroups}} - -### ⚠ {{title}} - -{{#each notes}} -* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}} -{{/each}} -{{/each}} -{{/if}} {{#each commitGroups}} {{#if title}} @@ -19,5 +9,7 @@ {{#each commits}} {{> commit root=@root}} {{/each}} - {{/each}} + + +