@w5s/conventional-changelog 1.1.2 → 1.1.3

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.
@@ -6,10 +6,10 @@ const node_path_1 = require("node:path");
6
6
  const transform_js_1 = require("./transform.js");
7
7
  const data_js_1 = require("./data.js");
8
8
  const basePath = (0, node_path_1.resolve)((0, node_path_1.dirname)(__dirname), './template');
9
- const template = (0, node_fs_1.readFileSync)(`${basePath}/template.hbs`, 'utf8');
10
- const header = (0, node_fs_1.readFileSync)(`${basePath}/header.hbs`, 'utf8');
11
- const commit = (0, node_fs_1.readFileSync)(`${basePath}/commit.hbs`, 'utf8');
12
- const footer = (0, node_fs_1.readFileSync)(`${basePath}/footer.hbs`, 'utf8');
9
+ const mainTemplate = (0, node_fs_1.readFileSync)(`${basePath}/template.hbs`, 'utf8');
10
+ const headerPartial = (0, node_fs_1.readFileSync)(`${basePath}/header.hbs`, 'utf8');
11
+ const commitPartial = (0, node_fs_1.readFileSync)(`${basePath}/commit.hbs`, 'utf8');
12
+ const footerPartial = (0, node_fs_1.readFileSync)(`${basePath}/footer.hbs`, 'utf8');
13
13
  const author = (0, node_fs_1.readFileSync)(`${basePath}/author.hbs`, 'utf8');
14
14
  exports.defaultDisplayTypes = data_js_1.CommitConventionalType.findWhere((_) => _.changelog);
15
15
  exports.writerOpts = {
@@ -20,9 +20,9 @@ exports.writerOpts = {
20
20
  commitGroupsSort: 'title',
21
21
  commitsSort: ['scope', 'subject'],
22
22
  noteGroupsSort: 'title',
23
- mainTemplate: template,
24
- headerPartial: header,
23
+ mainTemplate,
24
+ headerPartial,
25
25
  // eslint-disable-next-line unicorn/prefer-string-replace-all
26
- commitPartial: commit.replace(/{{gitUserInfo}}/g, author),
27
- footerPartial: footer,
26
+ commitPartial: commitPartial.replace(/{{gitUserInfo}}/g, author),
27
+ footerPartial,
28
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/conventional-changelog",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Conventional changelog plugin for @w5s",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/w5s/project-config/blob/main/packages/conventional-changelog#readme",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "d3b4d1bae7d8b5b8f066ac5fc8ac196d282396bf"
65
+ "gitHead": "a078b8f62ac0ffe46e977bd68af1c2180b6900fc"
66
66
  }
@@ -8,10 +8,10 @@ export interface WriterOptions extends Options {}
8
8
 
9
9
  const basePath = resolve(dirname(__dirname), './template');
10
10
 
11
- const template = readFileSync(`${basePath}/template.hbs`, 'utf8');
12
- const header = readFileSync(`${basePath}/header.hbs`, 'utf8');
13
- const commit = readFileSync(`${basePath}/commit.hbs`, 'utf8');
14
- const footer = readFileSync(`${basePath}/footer.hbs`, 'utf8');
11
+ const mainTemplate = readFileSync(`${basePath}/template.hbs`, 'utf8');
12
+ const headerPartial = readFileSync(`${basePath}/header.hbs`, 'utf8');
13
+ const commitPartial = readFileSync(`${basePath}/commit.hbs`, 'utf8');
14
+ const footerPartial = readFileSync(`${basePath}/footer.hbs`, 'utf8');
15
15
  const author = readFileSync(`${basePath}/author.hbs`, 'utf8');
16
16
 
17
17
  export const defaultDisplayTypes = CommitConventionalType.findWhere((_) => _.changelog);
@@ -24,9 +24,9 @@ export const writerOpts: WriterOptions = {
24
24
  commitGroupsSort: 'title',
25
25
  commitsSort: ['scope', 'subject'],
26
26
  noteGroupsSort: 'title',
27
- mainTemplate: template,
28
- headerPartial: header,
27
+ mainTemplate,
28
+ headerPartial,
29
29
  // eslint-disable-next-line unicorn/prefer-string-replace-all
30
- commitPartial: commit.replace(/{{gitUserInfo}}/g, author),
31
- footerPartial: footer,
30
+ commitPartial: commitPartial.replace(/{{gitUserInfo}}/g, author),
31
+ footerPartial,
32
32
  };
@@ -1,4 +1,4 @@
1
- *{{#if scope}} **{{scope}}**:
1
+ -{{#if scope}} **{{scope}}**:
2
2
  {{~/if}} {{#if subject}}
3
3
  {{~subject}}
4
4
  {{~else}}