@icebreakers/commitlint-config 1.2.7 → 1.2.8

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/index.cjs CHANGED
@@ -67,7 +67,7 @@ function buildTypesConfig(options) {
67
67
  ];
68
68
  }
69
69
  if (!_optionalChain([options, 'access', _3 => _3.definitions, 'optionalAccess', _4 => _4.length])) {
70
- return { rule };
70
+ return rule ? { rule } : {};
71
71
  }
72
72
  const basePromptType = _optionalChain([_configconventional2.default, 'access', _5 => _5.prompt, 'optionalAccess', _6 => _6.questions, 'optionalAccess', _7 => _7.type]);
73
73
  const mergedEnum = {
@@ -77,9 +77,9 @@ function buildTypesConfig(options) {
77
77
  const { value, title, description, emoji } = definition;
78
78
  mergedEnum[value] = {
79
79
  ..._nullishCoalesce(mergedEnum[value], () => ( {})),
80
- title,
81
- description,
82
- emoji
80
+ ...title !== void 0 ? { title } : {},
81
+ ...description !== void 0 ? { description } : {},
82
+ ...emoji !== void 0 ? { emoji } : {}
83
83
  };
84
84
  }
85
85
  const prompt = {
@@ -92,7 +92,10 @@ function buildTypesConfig(options) {
92
92
  }
93
93
  }
94
94
  };
95
- return { rule, prompt };
95
+ return {
96
+ ...rule ? { rule } : {},
97
+ prompt
98
+ };
96
99
  }
97
100
  function buildScopeRules(options) {
98
101
  if (!options) {
package/dist/index.mjs CHANGED
@@ -67,7 +67,7 @@ function buildTypesConfig(options) {
67
67
  ];
68
68
  }
69
69
  if (!options.definitions?.length) {
70
- return { rule };
70
+ return rule ? { rule } : {};
71
71
  }
72
72
  const basePromptType = conventionalConfig.prompt?.questions?.type;
73
73
  const mergedEnum = {
@@ -77,9 +77,9 @@ function buildTypesConfig(options) {
77
77
  const { value, title, description, emoji } = definition;
78
78
  mergedEnum[value] = {
79
79
  ...mergedEnum[value] ?? {},
80
- title,
81
- description,
82
- emoji
80
+ ...title !== void 0 ? { title } : {},
81
+ ...description !== void 0 ? { description } : {},
82
+ ...emoji !== void 0 ? { emoji } : {}
83
83
  };
84
84
  }
85
85
  const prompt = {
@@ -92,7 +92,10 @@ function buildTypesConfig(options) {
92
92
  }
93
93
  }
94
94
  };
95
- return { rule, prompt };
95
+ return {
96
+ ...rule ? { rule } : {},
97
+ prompt
98
+ };
96
99
  }
97
100
  function buildScopeRules(options) {
98
101
  if (!options) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/commitlint-config",
3
3
  "type": "module",
4
- "version": "1.2.7",
4
+ "version": "1.2.8",
5
5
  "description": "Commitlint preset from Icebreaker's dev-configs",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -32,8 +32,16 @@
32
32
  "files": [
33
33
  "dist"
34
34
  ],
35
+ "peerDependencies": {
36
+ "conventional-changelog-conventionalcommits": ">=9.0.0"
37
+ },
38
+ "peerDependenciesMeta": {
39
+ "conventional-changelog-conventionalcommits": {
40
+ "optional": false
41
+ }
42
+ },
35
43
  "dependencies": {
36
- "@commitlint/config-conventional": "^20.4.1",
44
+ "@commitlint/config-conventional": "^20.4.2",
37
45
  "@commitlint/types": "^20.4.0",
38
46
  "conventional-changelog-conventionalcommits": "^9.1.0"
39
47
  },
@@ -45,6 +53,7 @@
45
53
  "test:dev": "vitest",
46
54
  "release": "pnpm publish",
47
55
  "lint": "eslint .",
48
- "lint:fix": "eslint . --fix"
56
+ "lint:fix": "eslint . --fix",
57
+ "typecheck": "tsc --noEmit"
49
58
  }
50
59
  }