@kriac/commitlint-config 0.2.0 → 0.3.0

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
@@ -1,61 +1 @@
1
- 'use strict';
2
-
3
- const czg = require('czg');
4
-
5
- const types = [
6
- {
7
- name: "feat: \u65B0\u529F\u80FD",
8
- value: "feat"
9
- },
10
- {
11
- name: "fix: \u4FEE\u590D\u95EE\u9898",
12
- value: "fix"
13
- },
14
- {
15
- name: "style: \u98CE\u683C\u6539\u52A8",
16
- value: "style"
17
- },
18
- {
19
- name: "performance: \u6027\u80FD\u4F18\u5316",
20
- value: "perf"
21
- },
22
- {
23
- name: "refactor: \u4EE3\u7801\u91CD\u6784",
24
- value: "refactor"
25
- },
26
- {
27
- name: "test: \u6D4B\u8BD5\u4EE3\u7801",
28
- value: "test"
29
- },
30
- {
31
- name: "documentation: \u6587\u6863",
32
- value: "docs"
33
- },
34
- {
35
- name: "chore: \u6742\u9879/\u5DE5\u7A0B\u4F9D\u8D56",
36
- value: "chore"
37
- }
38
- ];
39
- const typeValues = types.map((item) => {
40
- return item.value;
41
- });
42
-
43
- function index(opts) {
44
- return czg.defineConfig({
45
- // 提交类型
46
- types,
47
- // 提交作用域
48
- scopes: opts?.scopes || [],
49
- // 跳过问题
50
- skipQuestions: ["body", "breaking", "footerPrefix", "footer"],
51
- // 自定义规则
52
- rules: {
53
- // 必须要定义类型
54
- "type-empty": [2, "never"],
55
- // 类型必须在枚举范围内
56
- "type-enum": [2, "always", typeValues]
57
- }
58
- });
59
- }
60
-
61
- module.exports = index;
1
+ "use strict";var n=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var a in t)n(e,a,{get:t[a],enumerable:!0})},y=(e,t,a,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of i(t))!l.call(e,o)&&o!==a&&n(e,o,{get:()=>t[o],enumerable:!(p=u(t,o))||p.enumerable});return e};var c=e=>y(n({},"__esModule",{value:!0}),e);var x={};f(x,{default:()=>v});module.exports=c(x);var m=require("czg");var r=[{name:"feat: \u65B0\u529F\u80FD",value:"feat"},{name:"fix: \u4FEE\u590D\u95EE\u9898",value:"fix"},{name:"style: \u98CE\u683C\u6539\u52A8",value:"style"},{name:"performance: \u6027\u80FD\u4F18\u5316",value:"perf"},{name:"refactor: \u4EE3\u7801\u91CD\u6784",value:"refactor"},{name:"test: \u6D4B\u8BD5\u4EE3\u7801",value:"test"},{name:"documentation: \u6587\u6863",value:"docs"},{name:"chore: \u6742\u9879/\u5DE5\u7A0B\u4F9D\u8D56",value:"chore"}],s=r.map(e=>e.value);function v(e){let{scopes:t=[]}=e||{};return(0,m.defineConfig)({types:r,scopes:t,skipQuestions:["body","breaking","footerPrefix","footer"],rules:{"type-empty":[2,"never"],"type-enum":[2,"always",s]}})}
package/dist/index.d.cts CHANGED
@@ -13,4 +13,4 @@ interface PluginOptions {
13
13
 
14
14
  declare function export_default(opts?: PluginOptions): czg.UserConfig;
15
15
 
16
- export = export_default;
16
+ export { export_default as default };
package/dist/index.d.ts CHANGED
@@ -13,4 +13,4 @@ interface PluginOptions {
13
13
 
14
14
  declare function export_default(opts?: PluginOptions): czg.UserConfig;
15
15
 
16
- export = export_default;
16
+ export { export_default as default };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{defineConfig as n}from"czg";var t=[{name:"feat: \u65B0\u529F\u80FD",value:"feat"},{name:"fix: \u4FEE\u590D\u95EE\u9898",value:"fix"},{name:"style: \u98CE\u683C\u6539\u52A8",value:"style"},{name:"performance: \u6027\u80FD\u4F18\u5316",value:"perf"},{name:"refactor: \u4EE3\u7801\u91CD\u6784",value:"refactor"},{name:"test: \u6D4B\u8BD5\u4EE3\u7801",value:"test"},{name:"documentation: \u6587\u6863",value:"docs"},{name:"chore: \u6742\u9879/\u5DE5\u7A0B\u4F9D\u8D56",value:"chore"}],o=t.map(e=>e.value);function m(e){let{scopes:a=[]}=e||{};return n({types:t,scopes:a,skipQuestions:["body","breaking","footerPrefix","footer"],rules:{"type-empty":[2,"never"],"type-enum":[2,"always",o]}})}export{m as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kriac/commitlint-config",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "description": "@kriac/commitlint-config",
6
6
  "author": "Kriac",
7
7
  "homepage": "https://github.com/Kriac/lint-kit",
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "lint": "vue-tsc -b --noEmit",
18
- "build": "unbuild",
18
+ "build": "tsup",
19
19
  "release": "npm publish --access public"
20
20
  },
21
21
  "dependencies": {
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "25.0.10",
26
- "unbuild": "3.6.1",
26
+ "tsup": "8.5.1",
27
27
  "vue-tsc": "3.2.1"
28
28
  },
29
29
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "exports": {
34
34
  ".": {
35
35
  "types": "./dist/index.d.ts",
36
- "import": "./dist/index.mjs",
36
+ "import": "./dist/index.js",
37
37
  "require": "./dist/index.cjs"
38
38
  }
39
39
  }
package/dist/index.d.mts DELETED
@@ -1,16 +0,0 @@
1
- import * as czg from 'czg';
2
-
3
- /** 可选项 */
4
- interface Optional {
5
- name: string;
6
- value: string;
7
- }
8
- /** 插件选项 */
9
- interface PluginOptions {
10
- /** 扩展作用域 */
11
- scopes?: Optional[];
12
- }
13
-
14
- declare function export_default(opts?: PluginOptions): czg.UserConfig;
15
-
16
- export { export_default as default };
package/dist/index.mjs DELETED
@@ -1,59 +0,0 @@
1
- import { defineConfig } from 'czg';
2
-
3
- const types = [
4
- {
5
- name: "feat: \u65B0\u529F\u80FD",
6
- value: "feat"
7
- },
8
- {
9
- name: "fix: \u4FEE\u590D\u95EE\u9898",
10
- value: "fix"
11
- },
12
- {
13
- name: "style: \u98CE\u683C\u6539\u52A8",
14
- value: "style"
15
- },
16
- {
17
- name: "performance: \u6027\u80FD\u4F18\u5316",
18
- value: "perf"
19
- },
20
- {
21
- name: "refactor: \u4EE3\u7801\u91CD\u6784",
22
- value: "refactor"
23
- },
24
- {
25
- name: "test: \u6D4B\u8BD5\u4EE3\u7801",
26
- value: "test"
27
- },
28
- {
29
- name: "documentation: \u6587\u6863",
30
- value: "docs"
31
- },
32
- {
33
- name: "chore: \u6742\u9879/\u5DE5\u7A0B\u4F9D\u8D56",
34
- value: "chore"
35
- }
36
- ];
37
- const typeValues = types.map((item) => {
38
- return item.value;
39
- });
40
-
41
- function index(opts) {
42
- return defineConfig({
43
- // 提交类型
44
- types,
45
- // 提交作用域
46
- scopes: opts?.scopes || [],
47
- // 跳过问题
48
- skipQuestions: ["body", "breaking", "footerPrefix", "footer"],
49
- // 自定义规则
50
- rules: {
51
- // 必须要定义类型
52
- "type-empty": [2, "never"],
53
- // 类型必须在枚举范围内
54
- "type-enum": [2, "always", typeValues]
55
- }
56
- });
57
- }
58
-
59
- export { index as default };