@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 CHANGED
@@ -1,19 +1,19 @@
1
1
  <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=# W5s Commitlint configuration _(${name})_) -->
2
- # W5s Commitlint configuration _(@w5s/commitlint-config)_
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
- > Commitlint configuration presets
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/commitlint-config @commitlint/cli
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/commitlint-config"]
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/commitlint-config.svg?style=flat-square
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/commitlint-config
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]))
@@ -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.1",
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:src": "tsc",
34
+ "build:tsc": "tsc -b tsconfig.build.json",
35
35
  "clean": "concurrently \"npm:clean:*\" \":\"",
36
- "clean:src": "rm -rf lib/*",
37
- "docs": "md-magic --path '**/*.md' --ignore='node_modules'",
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.1",
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": "dd093c2907cf8e136f4adec9a14b176e0851de17"
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)) {