Skip to content

Commit

Permalink
fix(changelog-angular): updated source files to latest from mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Mar 5, 2023
1 parent 9bf8557 commit a831453
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 81 deletions.
10 changes: 5 additions & 5 deletions conventional-changelog-angular-custom/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url]
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coverage-image]][coverage-url]

> [conventional-changelog](https://github.com/ajoslin/conventional-changelog) >
> [angular](https://github.com/angular/angular) preset
Expand Down Expand Up @@ -120,9 +120,9 @@ A detailed explanation can be found in this [document](#commit-message-format).
https://david-dm.org/conventional-changelog/conventional-changelog-angular.svg?theme=shields.io
[daviddm-url]:
https://david-dm.org/conventional-changelog/conventional-changelog-angular
[coveralls-image]:
https://coveralls.io/repos/conventional-changelog/conventional-changelog-angular/badge.svg
[coveralls-url]:
https://coveralls.io/r/conventional-changelog/conventional-changelog-angular
[coverage-image]:
https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master
[coverage-url]:
https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master
[commit-message-format]:
https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

const Q = require('q');
const parserOpts = require('./parser-opts');
const writerOpts = require('./writer-opts');

module.exports = Q.all([parserOpts, writerOpts]).spread((parserOpts, writerOpts) => {
return { parserOpts, writerOpts };
});
module.exports = Promise.all([parserOpts, writerOpts]).then(([parserOpts, writerOpts]) => ({
parserOpts,
writerOpts
}));
12 changes: 7 additions & 5 deletions conventional-changelog-angular-custom/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
'use strict';
const Q = require('q');
const conventionalChangelog = require('./conventional-changelog');
const parserOpts = require('./parser-opts');
const recommendedBumpOpts = require('./conventional-recommended-bump');
const writerOpts = require('./writer-opts');

module.exports = Q.all([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts]).spread(
(conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts) => {
return { conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts };
}
module.exports = Promise.all([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts]).then(
([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts]) => ({
conventionalChangelog,
parserOpts,
recommendedBumpOpts,
writerOpts
})
);
7 changes: 3 additions & 4 deletions conventional-changelog-angular-custom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@favware/conventional-changelog-angular",
"version": "5.0.14",
"version": "5.0.15",
"description": "conventional-changelog angular preset",
"main": "index.js",
"scripts": {
Expand All @@ -27,16 +27,15 @@
],
"author": "Steve Mao",
"engines": {
"node": ">=10"
"node": ">=14"
},
"license": "ISC",
"bugs": {
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
},
"homepage": "https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular#readme",
"dependencies": {
"compare-func": "^2.0.0",
"q": "^1.5.1"
"compare-func": "^2.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
14 changes: 9 additions & 5 deletions conventional-changelog-angular-custom/parser-opts.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
'use strict';
'use strict'

module.exports = {
headerPattern: /^(\w*)(?:\((.*)\))?: (.*)$/,
headerCorrespondence: [ 'type', 'scope', 'subject' ],
noteKeywords: [ 'BREAKING CHANGE' ],
headerCorrespondence: [
'type',
'scope',
'subject'
],
noteKeywords: ['BREAKING CHANGE'],
revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
revertCorrespondence: [ 'header', 'hash' ]
};
revertCorrespondence: ['header', 'hash']
}
67 changes: 32 additions & 35 deletions conventional-changelog-angular-custom/templates/commit.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
*{{#if scope}}
**{{scope}}:**
{{~/if}}
{{#if subject}}
*{{#if scope}} **{{scope}}:**
{{~/if}} {{#if subject}}
{{~subject}}
{{~else}}
{{~header}}
{{~/if}}

{{~! commit link }}
{{#if @root.linkReferences~}}
{{~!-- commit link --}} {{#if @root.linkReferences~}}
([{{shortHash}}](
{{~#if @root.repository}}
{{~#if @root.host}}
Expand All @@ -26,39 +23,39 @@
{{~shortHash}}
{{~/if}}

{{~! commit references }}
{{~!-- commit references --}}
{{~#if references~}}
, closes
{{~#each references}}
{{#if @root.linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~#each references}} {{#if @root.linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/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}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.issue}}/{{this.issue}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}

16 changes: 7 additions & 9 deletions conventional-changelog-angular-custom/templates/footer.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{{#if noteGroups}}
{{#each noteGroups}}
{{#each noteGroups}}

###
{{title}}
### {{title}}

{{#each notes}}
*
{{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
{{/each}}
{{/each}}
{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
{{/each}}
{{/each}}

{{/if}}
{{/if}}
11 changes: 4 additions & 7 deletions conventional-changelog-angular-custom/templates/header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
##
{{~else~}}
#
{{~/if}}
{{#if @root.linkCompare~}}
{{~/if}} {{#if @root.linkCompare~}}
[{{version}}](
{{~#if @root.repository~}}
{{~#if @root.host}}
Expand All @@ -20,9 +19,7 @@
{{~else}}
{{~version}}
{{~/if}}
{{~#if title}}
"{{title}}"
{{~#if title}} "{{title}}"
{{~/if}}
{{~#if date}}
({{date}})
{{/if}}
{{~#if date}} ({{date}})
{{/if}}
3 changes: 1 addition & 2 deletions conventional-changelog-angular-custom/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
const conventionalChangelogCore = require('conventional-changelog-core');
const preset = require('../');
const expect = require('chai').expect;
const through = require('through2');
const path = require('path');
const fs = require('fs');
const tmp = require('tmp');
const { gitInit, gitDummyCommit, exec } = require('../../../tools/test-tools');
const { gitInit, gitDummyCommit, exec, through } = require('../../../tools/test-tools');
const betterThanBefore = require('better-than-before')();
const preparing = betterThanBefore.preparing;

Expand Down
9 changes: 4 additions & 5 deletions conventional-changelog-angular-custom/writer-opts.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
'use strict';

const compareFunc = require('compare-func');
const Q = require('q');
const readFile = Q.denodeify(require('fs').readFile);
const resolve = require('path').resolve;
const { readFile } = require('fs').promises;
const { resolve } = require('path');

module.exports = Q.all([
module.exports = Promise.all([
readFile(resolve(__dirname, './templates/template.hbs'), 'utf-8'),
readFile(resolve(__dirname, './templates/header.hbs'), 'utf-8'),
readFile(resolve(__dirname, './templates/commit.hbs'), 'utf-8'),
readFile(resolve(__dirname, './templates/footer.hbs'), 'utf-8')
]).spread((template, header, commit, footer) => {
]).then(([template, header, commit, footer]) => {
const writerOpts = getWriterOpts();

writerOpts.mainTemplate = template;
Expand Down

0 comments on commit a831453

Please sign in to comment.