@w5s/conventional-changelog 1.1.2 → 1.1.4
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/dist/writer-opts.js +8 -8
- package/package.json +2 -2
- package/src/writer-opts.ts +9 -9
- package/template/commit.hbs +1 -1
package/dist/writer-opts.js
CHANGED
|
@@ -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
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
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
|
|
24
|
-
headerPartial
|
|
23
|
+
mainTemplate,
|
|
24
|
+
headerPartial,
|
|
25
25
|
// eslint-disable-next-line unicorn/prefer-string-replace-all
|
|
26
|
-
commitPartial:
|
|
27
|
-
footerPartial
|
|
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.
|
|
3
|
+
"version": "1.1.4",
|
|
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": "
|
|
65
|
+
"gitHead": "a10793f9e40481a6e84451e57851a3af630ce953"
|
|
66
66
|
}
|
package/src/writer-opts.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Options } from 'conventional-changelog-writer';
|
|
2
1
|
import { readFileSync } from 'node:fs';
|
|
3
2
|
import { resolve, dirname } from 'node:path';
|
|
3
|
+
import type { Options } from 'conventional-changelog-writer';
|
|
4
4
|
import { createTransform } from './transform.js';
|
|
5
5
|
import { CommitConventionalType } from './data.js';
|
|
6
6
|
|
|
@@ -8,10 +8,10 @@ export interface WriterOptions extends Options {}
|
|
|
8
8
|
|
|
9
9
|
const basePath = resolve(dirname(__dirname), './template');
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
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
|
|
28
|
-
headerPartial
|
|
27
|
+
mainTemplate,
|
|
28
|
+
headerPartial,
|
|
29
29
|
// eslint-disable-next-line unicorn/prefer-string-replace-all
|
|
30
|
-
commitPartial:
|
|
31
|
-
footerPartial
|
|
30
|
+
commitPartial: commitPartial.replace(/{{gitUserInfo}}/g, author),
|
|
31
|
+
footerPartial,
|
|
32
32
|
};
|
package/template/commit.hbs
CHANGED