@w5s/conventional-changelog 1.1.0 → 1.1.2

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/gitmoji.js CHANGED
@@ -65,7 +65,7 @@ var GitmojiCode;
65
65
  return new Map(entries.reduce((acc, [commitType, gitmojiUnicodeArray]) => acc
66
66
  .concat(gitmojiUnicodeArray.map((gitmojiUnicode) => [gitmojiUnicode, commitType]))
67
67
  .concat(gitmojiUnicodeArray.map((gitmojiUnicode) => [
68
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
68
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
69
69
  index.emoji.get(gitmojiUnicode)?.code,
70
70
  commitType,
71
71
  ])), []));
@@ -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 | string, options?: displayType.Options): string;
13
+ export declare function displayType(type: string, options?: displayType.Options): string;
14
14
  export declare namespace displayType {
15
15
  interface Options {
16
16
  readonly withEmoji?: boolean;
package/dist/transform.js CHANGED
@@ -62,7 +62,7 @@ function createTransform(config) {
62
62
  }
63
63
  if (host != null) {
64
64
  // User URLs.
65
- // eslint-disable-next-line unicorn/no-unsafe-regex, unicorn/prefer-string-replace-all
65
+ // eslint-disable-next-line unicorn/prefer-string-replace-all
66
66
  returnValue = returnValue.replace(/\B@([\da-z](?:-?[\d/a-z]){0,38})/g, (_, username) => username.includes('/') ? `@${username}` : `[@${username}](${host}/${username})`);
67
67
  }
68
68
  return returnValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/conventional-changelog",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
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",
@@ -53,8 +53,8 @@
53
53
  "devDependencies": {
54
54
  "@types/conventional-changelog-writer": "4.0.3",
55
55
  "@types/conventional-commits-parser": "3.0.3",
56
- "vite": "4.3.9",
57
- "vitest": "0.32.4"
56
+ "vite": "4.4.7",
57
+ "vitest": "0.33.0"
58
58
  },
59
59
  "engines": {
60
60
  "node": ">=16.0.0"
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "d1f8476f515b7be923ace0dba9ef86571f08747b"
65
+ "gitHead": "d3b4d1bae7d8b5b8f066ac5fc8ac196d282396bf"
66
66
  }
package/src/gitmoji.ts CHANGED
@@ -82,7 +82,7 @@ export namespace GitmojiCode {
82
82
 
83
83
  .concat(
84
84
  gitmojiUnicodeArray.map((gitmojiUnicode) => [
85
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
85
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
86
86
  index.emoji.get(gitmojiUnicode)?.code! as GitmojiCode,
87
87
  commitType,
88
88
  ])
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 | string, options: displayType.Options = {}): string {
24
+ export function displayType(type: string, options: displayType.Options = {}): string {
25
25
  const { withEmoji = true, language = 'en-US' } = options;
26
26
 
27
27
  if (CommitConventionalType.hasInstance(type)) {
@@ -90,7 +90,7 @@ export function createTransform(config: TransformConfig): WriterOptions.Transfor
90
90
  }
91
91
  if (host != null) {
92
92
  // User URLs.
93
- // eslint-disable-next-line unicorn/no-unsafe-regex, unicorn/prefer-string-replace-all
93
+ // eslint-disable-next-line unicorn/prefer-string-replace-all
94
94
  returnValue = returnValue.replace(/\B@([\da-z](?:-?[\d/a-z]){0,38})/g, (_, username: string) =>
95
95
  username.includes('/') ? `@${username}` : `[@${username}](${host}/${username})`
96
96
  );