@w5s/conventional-changelog 1.0.0-alpha.1 โ 1.0.0-alpha.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.
- package/README.md +6 -6
- package/lib/gitmoji.js +3 -3
- package/lib/transform.d.ts +1 -1
- package/package.json +6 -6
- package/src/gitmoji.ts +3 -3
- package/src/transform.ts +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=# W5s Commitlint configuration _(${name})_) -->
|
|
2
|
-
# W5s Commitlint configuration _(@w5s/
|
|
2
|
+
# W5s Commitlint configuration _(@w5s/conventional-changelog)_
|
|
3
3
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
4
4
|
|
|
5
5
|
[![NPM Version][package-version-svg]][package-url]
|
|
6
6
|
[![License][license-image]][license-url]
|
|
7
7
|
|
|
8
8
|
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=> ${description}&unknownTxt= ) -->
|
|
9
|
-
>
|
|
9
|
+
> Conventional changelog plugin for @w5s
|
|
10
10
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=```console\nnpm install --save-dev ${name} @commitlint/cli\n```) -->
|
|
15
15
|
```console
|
|
16
|
-
npm install --save-dev @w5s/
|
|
16
|
+
npm install --save-dev @w5s/conventional-changelog @commitlint/cli
|
|
17
17
|
```
|
|
18
18
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
19
19
|
|
|
@@ -25,7 +25,7 @@ In the `package.json` of your project
|
|
|
25
25
|
```json
|
|
26
26
|
{
|
|
27
27
|
"commitlint": {
|
|
28
|
-
"extends": ["@w5s/
|
|
28
|
+
"extends": ["@w5s/conventional-changelog"]
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
```
|
|
@@ -62,10 +62,10 @@ npm exec --no -- commitlint --edit $1
|
|
|
62
62
|
<!-- VARIABLES -->
|
|
63
63
|
|
|
64
64
|
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square) -->
|
|
65
|
-
[package-version-svg]: https://img.shields.io/npm/v/@w5s/
|
|
65
|
+
[package-version-svg]: https://img.shields.io/npm/v/@w5s/conventional-changelog.svg?style=flat-square
|
|
66
66
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
67
67
|
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}) -->
|
|
68
|
-
[package-url]: https://www.npmjs.com/package/@w5s/
|
|
68
|
+
[package-url]: https://www.npmjs.com/package/@w5s/conventional-changelog
|
|
69
69
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
70
70
|
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square) -->
|
|
71
71
|
[license-image]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
|
package/lib/gitmoji.js
CHANGED
|
@@ -51,16 +51,16 @@ var GitmojiCode;
|
|
|
51
51
|
docs: ['๐'],
|
|
52
52
|
style: ['๐จ', '๐จ'],
|
|
53
53
|
refactor: ['โป๏ธ', '๐๏ธ'],
|
|
54
|
-
test: ['โ
'],
|
|
54
|
+
test: ['โ
', '๐งช'],
|
|
55
55
|
perf: ['โก๏ธ'],
|
|
56
56
|
revert: ['โช๏ธ'],
|
|
57
57
|
ci: ['๐ท', '๐'],
|
|
58
58
|
wip: ['๐ง'],
|
|
59
59
|
build: [],
|
|
60
|
-
chore: [],
|
|
60
|
+
chore: ['๐ง'],
|
|
61
61
|
};
|
|
62
62
|
const entries = Array.from(
|
|
63
|
-
// @ts-ignore
|
|
63
|
+
// @ts-ignore entries are not well typed
|
|
64
64
|
Object.entries(data));
|
|
65
65
|
return new Map(entries.reduce((acc, [commitType, gitmojiUnicodeArray]) => acc
|
|
66
66
|
.concat(gitmojiUnicodeArray.map((gitmojiUnicode) => [gitmojiUnicode, commitType]))
|
package/lib/transform.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface TransformConfig {
|
|
|
10
10
|
language?: Language;
|
|
11
11
|
}
|
|
12
12
|
export declare function displayScope(scope: string | null | undefined, scopeDisplayNameMap: Record<string, string>): string | undefined;
|
|
13
|
-
export declare function displayType(type: CommitConventionalType, options?: displayType.Options): string;
|
|
13
|
+
export declare function displayType(type: CommitConventionalType | string, options?: displayType.Options): string;
|
|
14
14
|
export declare namespace displayType {
|
|
15
15
|
interface Options {
|
|
16
16
|
readonly withEmoji?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/conventional-changelog",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.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",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "concurrently \"npm:build:*\" \":\"",
|
|
34
|
-
"build:
|
|
34
|
+
"build:tsc": "tsc -b tsconfig.build.json",
|
|
35
35
|
"clean": "concurrently \"npm:clean:*\" \":\"",
|
|
36
|
-
"clean:
|
|
37
|
-
"docs": "
|
|
36
|
+
"clean:tsc": "rm -rf lib",
|
|
37
|
+
"docs": "node ../../markdown.mjs",
|
|
38
38
|
"format": "concurrently \"npm:format:*\" \":\"",
|
|
39
39
|
"format:src": "eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
|
|
40
40
|
"lint": "concurrently \"npm:lint:*\" \":\"",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"gitmojis": "^3.13.4"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@jest/globals": "29.4.
|
|
68
|
+
"@jest/globals": "29.4.2",
|
|
69
69
|
"@types/conventional-changelog-writer": "4.0.2",
|
|
70
70
|
"@types/conventional-commits-parser": "3.0.3"
|
|
71
71
|
},
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "918c1157da6808ff19124ee96a4fe499f0da1877"
|
|
79
79
|
}
|
package/src/gitmoji.ts
CHANGED
|
@@ -61,17 +61,17 @@ export namespace GitmojiCode {
|
|
|
61
61
|
docs: ['๐'] as GitmojiCode.Unicode[],
|
|
62
62
|
style: ['๐จ', '๐จ'] as GitmojiCode.Unicode[],
|
|
63
63
|
refactor: ['โป๏ธ', '๐๏ธ'] as GitmojiCode.Unicode[],
|
|
64
|
-
test: ['โ
'] as GitmojiCode.Unicode[],
|
|
64
|
+
test: ['โ
', '๐งช'] as GitmojiCode.Unicode[],
|
|
65
65
|
perf: ['โก๏ธ'] as GitmojiCode.Unicode[],
|
|
66
66
|
revert: ['โช๏ธ'] as GitmojiCode.Unicode[],
|
|
67
67
|
ci: ['๐ท', '๐'] as GitmojiCode.Unicode[],
|
|
68
68
|
wip: ['๐ง'] as GitmojiCode.Unicode[],
|
|
69
69
|
build: [] as GitmojiCode.Unicode[],
|
|
70
|
-
chore: [] as GitmojiCode.Unicode[],
|
|
70
|
+
chore: ['๐ง'] as GitmojiCode.Unicode[],
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
const entries = Array.from<[CommitConventionalType, GitmojiCode.Unicode[]]>(
|
|
74
|
-
// @ts-ignore
|
|
74
|
+
// @ts-ignore entries are not well typed
|
|
75
75
|
Object.entries(data)
|
|
76
76
|
);
|
|
77
77
|
return new Map(
|
package/src/transform.ts
CHANGED
|
@@ -21,7 +21,7 @@ export function displayScope(scope: string | null | undefined, scopeDisplayNameM
|
|
|
21
21
|
: scopeDisplayNameMap[scope];
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export function displayType(type: CommitConventionalType, options: displayType.Options = {}): string {
|
|
24
|
+
export function displayType(type: CommitConventionalType | string, options: displayType.Options = {}): string {
|
|
25
25
|
const { withEmoji = true, language = 'en-US' } = options;
|
|
26
26
|
|
|
27
27
|
if (CommitConventionalType.hasInstance(type)) {
|