@varlet/release 0.0.3-alpha.1700239118439 → 0.0.4

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/LICENCE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2022 varlet
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 varlet
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,116 +1,125 @@
1
- <h1 align="center">Varlet Release</h1>
2
-
3
- <p align="center">
4
- <span>English</span> |
5
- <a href="https://github.com/varletjs/release/blob/main/README.zh-CN.md">中文</a>
6
- </p>
7
- <p align="center">
8
- <a href="https://www.npmjs.com/package/@varlet/release" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/npm/v/@varlet/release" alt="NPM Version" /></a>
9
- <a href="https://github.com/varletjs/release/blob/main/LICENCE" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/github/license/varletjs/release" alt="License" /></a>
10
- </p>
11
-
12
- ## Intro
13
-
14
- `Varlet Release` is a tool to release all packages and generate changelogs.
15
-
16
- ## Installation
17
-
18
- ### npm
19
-
20
- ```shell
21
- npm i @varlet/release -D
22
- ```
23
-
24
- ### yarn
25
-
26
- ```shell
27
- yarn add @varlet/release -D
28
- ```
29
-
30
- ### pnpm
31
-
32
- ```shell
33
- pnpm add @varlet/release -D
34
- ```
35
-
36
- ## Usage
37
-
38
- ### Using Command
39
-
40
- ```shell
41
- # Release all packages and generate changelogs
42
- npx vr release
43
-
44
- # Specify remote name
45
- npx vr release -r <remote>
46
- # or
47
- npx vr release --remote <remote>
48
-
49
- # Just generate changelogs
50
- npx vr changelog
51
-
52
- # Specify changelog filename
53
- npx vr changelog -f <filename>
54
- # or
55
- npx vr changelog --file <filename>
56
-
57
- ```
58
-
59
- ### Configuration
60
-
61
- #### release
62
-
63
- | Params | Instructions |
64
- | -------------------- | ------------------- |
65
- | -r --remote <remote> | Specify remote name |
66
-
67
- #### changelog
68
-
69
- | Params | Instructions |
70
- | --------------------------------- | -------------------------- |
71
- | -f --file <filename> | Specify changelog filename |
72
- | -rc --releaseCount <releaseCount> | Release count |
73
-
74
- ### Custom Handle
75
-
76
- #### Example
77
-
78
- ```js
79
- import { release, changelog } from '@varlet/release'
80
-
81
- // Do what you want to do...
82
- release()
83
- ```
84
-
85
- You can pass in a task that will be called before the publish after the package version is changed.
86
-
87
- ```js
88
- import { release, changelog } from '@varlet/release'
89
-
90
- async function task() {
91
- await doSomething1()
92
- await doSomething2()
93
- }
94
-
95
- release({ task })
96
- ```
97
-
98
- #### Types
99
-
100
- ```ts
101
- interface ReleaseCommandOptions {
102
- remote?: string
103
- task?(): Promise<void>
104
- }
105
- function release(options: ReleaseCommandOptions): Promise<void>
106
-
107
- interface ChangelogCommandOptions {
108
- file?: string
109
- releaseCount?: number
110
- }
111
- function changelog({ releaseCount, file }?: ChangelogCommandOptions): Promise<void>
112
- ```
113
-
114
- ## License
115
-
116
- [MIT](https://github.com/varletjs/release/blob/main/LICENCE)
1
+ <h1 align="center">Varlet Release</h1>
2
+
3
+ <p align="center">
4
+ <span>English</span> |
5
+ <a href="https://github.com/varletjs/release/blob/main/README.zh-CN.md">中文</a>
6
+ </p>
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@varlet/release" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/npm/v/@varlet/release" alt="NPM Version" /></a>
9
+ <a href="https://github.com/varletjs/release/blob/main/LICENCE" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/github/license/varletjs/release" alt="License" /></a>
10
+ </p>
11
+
12
+ ## Intro
13
+
14
+ `Varlet Release` is a tool to release all packages, generate changelogs and lint commit message.
15
+
16
+ ## Installation
17
+
18
+ ### npm
19
+
20
+ ```shell
21
+ npm i @varlet/release -D
22
+ ```
23
+
24
+ ### yarn
25
+
26
+ ```shell
27
+ yarn add @varlet/release -D
28
+ ```
29
+
30
+ ### pnpm
31
+
32
+ ```shell
33
+ pnpm add @varlet/release -D
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ### Using Command
39
+
40
+ ```shell
41
+ # Release all packages and generate changelogs
42
+ npx vr release
43
+
44
+ # Specify remote name
45
+ npx vr release -r <remote>
46
+ # or
47
+ npx vr release --remote <remote>
48
+
49
+ # Just generate changelogs
50
+ npx vr changelog
51
+
52
+ # Specify changelog filename
53
+ npx vr changelog -f <filename>
54
+ # or
55
+ npx vr changelog --file <filename>
56
+
57
+ # Lint commit message
58
+ npx vr lint-commit <gitMessagePath>
59
+ ```
60
+
61
+ ### Configuration
62
+
63
+ #### release
64
+
65
+ | Params | Instructions |
66
+ | ---------------------- | ------------------- |
67
+ | -r --remote \<remote\> | Specify remote name |
68
+
69
+ #### changelog
70
+
71
+ | Params | Instructions |
72
+ | ----------------------------------- | -------------------------- |
73
+ | -f --file \<filename\> | Specify changelog filename |
74
+ | -rc --releaseCount \<releaseCount\> | Release count |
75
+
76
+ #### lint-commit
77
+
78
+ | Params | Instructions |
79
+ | ------------------ | ---------------------------------------------------------------------------------------------------------------------- |
80
+ | \<gitMessagePath\> | The path of the temporary file to which the git message is submitted. The git hook commit-msg will pass this parameter |
81
+
82
+ ### Custom Handle
83
+
84
+ #### Example
85
+
86
+ ```js
87
+ import { release, changelog } from '@varlet/release'
88
+
89
+ // Do what you want to do...
90
+ release()
91
+ ```
92
+
93
+ You can pass in a task that will be called before the publish after the package version is changed.
94
+
95
+ ```js
96
+ import { release, changelog } from '@varlet/release'
97
+
98
+ async function task() {
99
+ await doSomething1()
100
+ await doSomething2()
101
+ }
102
+
103
+ release({ task })
104
+ ```
105
+
106
+ #### Types
107
+
108
+ ```ts
109
+ interface ReleaseCommandOptions {
110
+ remote?: string
111
+ task?(): Promise<void>
112
+ }
113
+ function release(options: ReleaseCommandOptions): Promise<void>
114
+
115
+ interface ChangelogCommandOptions {
116
+ file?: string
117
+ releaseCount?: number
118
+ }
119
+ function changelog({ releaseCount, file }?: ChangelogCommandOptions): Promise<void>
120
+ function commitLint(gitMessagePath: string): void
121
+ ```
122
+
123
+ ## License
124
+
125
+ [MIT](https://github.com/varletjs/release/blob/main/LICENCE)
package/README.zh-CN.md CHANGED
@@ -1,116 +1,125 @@
1
- <h1 align="center">Varlet Release</h1>
2
-
3
- <p align="center">
4
- <span>中文</span> |
5
- <a href="https://github.com/varletjs/release/blob/main/README.md">English</a>
6
- </p>
7
- <p align="center">
8
- <a href="https://www.npmjs.com/package/@varlet/release" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/npm/v/@varlet/release" alt="NPM Version" /></a>
9
- <a href="https://github.com/valetjs/release/blob/master/LICENSE" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/github/license/varletjs/release" alt="License" /></a>
10
- </p>
11
-
12
- ## 介绍
13
-
14
- `Varlet Release` 是一个用于发布所有包并生成变更日志的工具。
15
-
16
- ## 安装
17
-
18
- ### npm
19
-
20
- ```shell
21
- npm i @varlet/release -D
22
- ```
23
-
24
- ### yarn
25
-
26
- ```shell
27
- yarn add @varlet/release -D
28
- ```
29
-
30
- ### pnpm
31
-
32
- ```shell
33
- pnpm add @varlet/release -D
34
- ```
35
-
36
- ## 使用
37
-
38
- ### 使用命令
39
-
40
- ```shell
41
- # 发布所有包并生成变更日志
42
- npx vr release
43
-
44
- # 指定远程仓库名称
45
- npx vr release -r <remote>
46
- # or
47
- npx vr release --remote <remote>
48
-
49
- # 仅生成变更日志
50
- npx vr changelog
51
-
52
- # 指定变更日志文件名
53
- npx vr changelog -f <filename>
54
- # or
55
- npx vr changelog --file <filename>
56
-
57
- ```
58
-
59
- ### 配置
60
-
61
- #### release
62
-
63
- | 参数 | 说明 |
64
- | -------------------- | ---------------- |
65
- | -r --remote <remote> | 指定远程仓库名称 |
66
-
67
- #### changelog
68
-
69
- | 参数 | 说明 |
70
- | --------------------------------- | ------------------ |
71
- | -f --file <filename> | 指定变更日志文件名 |
72
- | -rc --releaseCount <releaseCount> | 发布数量 |
73
-
74
- ### 自定义处理
75
-
76
- #### 示例
77
-
78
- ```js
79
- import { release, changelog } from '@varlet/release'
80
-
81
- // Do what you want to do...
82
- release()
83
- ```
84
-
85
- 你可以传入一个 `task`,在包版本更改后,在发布之前会调用 `task`。
86
-
87
- ```js
88
- import { release, changelog } from '@varlet/release'
89
-
90
- async function task() {
91
- await doSomething1()
92
- await doSomething2()
93
- }
94
-
95
- release({ task })
96
- ```
97
-
98
- #### 类型
99
-
100
- ```ts
101
- interface ReleaseCommandOptions {
102
- remote?: string
103
- task?(): Promise<void>
104
- }
105
- function release(options: ReleaseCommandOptions): Promise<void>
106
-
107
- interface ChangelogCommandOptions {
108
- file?: string
109
- releaseCount?: number
110
- }
111
- function changelog({ releaseCount, file }?: ChangelogCommandOptions): Promise<void>
112
- ```
113
-
114
- ## License
115
-
116
- [MIT](https://github.com/varletjs/release/blob/main/LICENSE)
1
+ <h1 align="center">Varlet Release</h1>
2
+
3
+ <p align="center">
4
+ <span>中文</span> |
5
+ <a href="https://github.com/varletjs/release/blob/main/README.md">English</a>
6
+ </p>
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@varlet/release" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/npm/v/@varlet/release" alt="NPM Version" /></a>
9
+ <a href="https://github.com/valetjs/release/blob/master/LICENSE" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/github/license/varletjs/release" alt="License" /></a>
10
+ </p>
11
+
12
+ ## 介绍
13
+
14
+ `Varlet Release` 是一个用于发布所有包、生成变更日志和检测 `commit message` 的工具。
15
+
16
+ ## 安装
17
+
18
+ ### npm
19
+
20
+ ```shell
21
+ npm i @varlet/release -D
22
+ ```
23
+
24
+ ### yarn
25
+
26
+ ```shell
27
+ yarn add @varlet/release -D
28
+ ```
29
+
30
+ ### pnpm
31
+
32
+ ```shell
33
+ pnpm add @varlet/release -D
34
+ ```
35
+
36
+ ## 使用
37
+
38
+ ### 使用命令
39
+
40
+ ```shell
41
+ # 发布所有包并生成变更日志
42
+ npx vr release
43
+
44
+ # 指定远程仓库名称
45
+ npx vr release -r <remote>
46
+ # or
47
+ npx vr release --remote <remote>
48
+
49
+ # 仅生成变更日志
50
+ npx vr changelog
51
+
52
+ # 指定变更日志文件名
53
+ npx vr changelog -f <filename>
54
+ # or
55
+ npx vr changelog --file <filename>
56
+
57
+ # 检测 commit message
58
+ npx vr lint-commit <gitMessagePath>
59
+ ```
60
+
61
+ ### 配置
62
+
63
+ #### release
64
+
65
+ | 参数 | 说明 |
66
+ | ---------------------- | ---------------- |
67
+ | -r --remote \<remote\> | 指定远程仓库名称 |
68
+
69
+ #### changelog
70
+
71
+ | 参数 | 说明 |
72
+ | ----------------------------------- | ------------------ |
73
+ | -f --file \<filename\> | 指定变更日志文件名 |
74
+ | -rc --releaseCount \<releaseCount\> | 发布数量 |
75
+
76
+ #### lint-commit
77
+
78
+ | 参数 | 说明 |
79
+ | ------------------ | --------------------------------------------------------------------------- |
80
+ | \<gitMessagePath\> | 提交 `git message` 的临时文件路径。`git` 钩子 `commit-msg` 会传递这个参数。 |
81
+
82
+ ### 自定义处理
83
+
84
+ #### 示例
85
+
86
+ ```js
87
+ import { release, changelog } from '@varlet/release'
88
+
89
+ // Do what you want to do...
90
+ release()
91
+ ```
92
+
93
+ 你可以传入一个 `task`,在包版本更改后,在发布之前会调用 `task`。
94
+
95
+ ```js
96
+ import { release, changelog } from '@varlet/release'
97
+
98
+ async function task() {
99
+ await doSomething1()
100
+ await doSomething2()
101
+ }
102
+
103
+ release({ task })
104
+ ```
105
+
106
+ #### 类型
107
+
108
+ ```ts
109
+ interface ReleaseCommandOptions {
110
+ remote?: string
111
+ task?(): Promise<void>
112
+ }
113
+ function release(options: ReleaseCommandOptions): Promise<void>
114
+
115
+ interface ChangelogCommandOptions {
116
+ file?: string
117
+ releaseCount?: number
118
+ }
119
+ function changelog({ releaseCount, file }?: ChangelogCommandOptions): Promise<void>
120
+ function commitLint(gitMessagePath: string): void
121
+ ```
122
+
123
+ ## License
124
+
125
+ [MIT](https://github.com/varletjs/release/blob/main/LICENSE)
package/bin/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { release, changelog } from '../dist/index.js'
2
+ import { release, changelog, commitLint } from '../dist/index.js'
3
3
  import { Command } from 'commander'
4
4
 
5
5
  const program = new Command()
@@ -17,4 +17,9 @@ program
17
17
  .description('Generate changelog')
18
18
  .action(async (options) => changelog(options))
19
19
 
20
+ program
21
+ .command('commit-lint <gitMessagePath>')
22
+ .description('Lint commit message')
23
+ .action(async (option) => commitLint(option))
24
+
20
25
  program.parse()
package/dist/index.cjs CHANGED
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  changelog: () => changelog,
34
+ commitLint: () => commitLint,
34
35
  release: () => release
35
36
  });
36
37
  module.exports = __toCommonJS(src_exports);
@@ -226,8 +227,57 @@ async function release(options) {
226
227
  process.exit(1);
227
228
  }
228
229
  }
230
+
231
+ // src/commitLint.ts
232
+ var import_semver2 = __toESM(require("semver"), 1);
233
+ var import_fs_extra3 = __toESM(require("fs-extra"), 1);
234
+ var { readFileSync } = import_fs_extra3.default;
235
+ var COMMIT_MESSAGE_RE = /^(revert|fix|feat|docs|perf|test|types|style|build|chore|release|refactor)(\(.+\))?!?: (.|\n)+/;
236
+ function isVersionCommitMessage(message) {
237
+ return message.startsWith("v") && import_semver2.default.valid(message.slice(1));
238
+ }
239
+ function getCommitMessage(gitMessagePath) {
240
+ return readFileSync(gitMessagePath, "utf-8").trim();
241
+ }
242
+ function commitLint(gitMessagePath) {
243
+ const commitMessage = getCommitMessage(gitMessagePath);
244
+ if (!isVersionCommitMessage(commitMessage) && !COMMIT_MESSAGE_RE.test(commitMessage)) {
245
+ logger_default.error(`Commit message invalid`);
246
+ logger_default.warning(`The rules for commit messages are as follows
247
+
248
+ Example:
249
+
250
+ feat: add a new feature
251
+ feat(ui/button): add a new feature in the ui/button scope
252
+
253
+ fix: fix a bug
254
+ fix(ui/button): fix a bug in the ui/button scope
255
+
256
+ docs: fix an error in the documentation
257
+ docs(ui/button): fix a documentation error in the ui/button scope
258
+
259
+ Allowed types:
260
+ - fix
261
+ - feat
262
+ - docs
263
+ - perf
264
+ - test
265
+ - types
266
+ - style
267
+ - build
268
+ - chore
269
+ - release
270
+ - refactor
271
+ - revert
272
+
273
+ Commit message reference: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y
274
+ \u53C2\u8003\u962E\u4E00\u5CF0Commit message\u7F16\u5199\u6307\u5357: https://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html`);
275
+ process.exit(1);
276
+ }
277
+ }
229
278
  // Annotate the CommonJS export names for ESM import in node:
230
279
  0 && (module.exports = {
231
280
  changelog,
281
+ commitLint,
232
282
  release
233
283
  });
package/dist/index.d.cts CHANGED
@@ -10,4 +10,6 @@ interface ChangelogCommandOptions {
10
10
  }
11
11
  declare function changelog({ releaseCount, file }?: ChangelogCommandOptions): Promise<void>;
12
12
 
13
- export { changelog, release };
13
+ declare function commitLint(gitMessagePath: string): void;
14
+
15
+ export { changelog, commitLint, release };
package/dist/index.d.ts CHANGED
@@ -10,4 +10,6 @@ interface ChangelogCommandOptions {
10
10
  }
11
11
  declare function changelog({ releaseCount, file }?: ChangelogCommandOptions): Promise<void>;
12
12
 
13
- export { changelog, release };
13
+ declare function commitLint(gitMessagePath: string): void;
14
+
15
+ export { changelog, commitLint, release };
package/dist/index.js CHANGED
@@ -189,7 +189,56 @@ async function release(options) {
189
189
  process.exit(1);
190
190
  }
191
191
  }
192
+
193
+ // src/commitLint.ts
194
+ import semver2 from "semver";
195
+ import fse3 from "fs-extra";
196
+ var { readFileSync } = fse3;
197
+ var COMMIT_MESSAGE_RE = /^(revert|fix|feat|docs|perf|test|types|style|build|chore|release|refactor)(\(.+\))?!?: (.|\n)+/;
198
+ function isVersionCommitMessage(message) {
199
+ return message.startsWith("v") && semver2.valid(message.slice(1));
200
+ }
201
+ function getCommitMessage(gitMessagePath) {
202
+ return readFileSync(gitMessagePath, "utf-8").trim();
203
+ }
204
+ function commitLint(gitMessagePath) {
205
+ const commitMessage = getCommitMessage(gitMessagePath);
206
+ if (!isVersionCommitMessage(commitMessage) && !COMMIT_MESSAGE_RE.test(commitMessage)) {
207
+ logger_default.error(`Commit message invalid`);
208
+ logger_default.warning(`The rules for commit messages are as follows
209
+
210
+ Example:
211
+
212
+ feat: add a new feature
213
+ feat(ui/button): add a new feature in the ui/button scope
214
+
215
+ fix: fix a bug
216
+ fix(ui/button): fix a bug in the ui/button scope
217
+
218
+ docs: fix an error in the documentation
219
+ docs(ui/button): fix a documentation error in the ui/button scope
220
+
221
+ Allowed types:
222
+ - fix
223
+ - feat
224
+ - docs
225
+ - perf
226
+ - test
227
+ - types
228
+ - style
229
+ - build
230
+ - chore
231
+ - release
232
+ - refactor
233
+ - revert
234
+
235
+ Commit message reference: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y
236
+ \u53C2\u8003\u962E\u4E00\u5CF0Commit message\u7F16\u5199\u6307\u5357: https://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html`);
237
+ process.exit(1);
238
+ }
239
+ }
192
240
  export {
193
241
  changelog,
242
+ commitLint,
194
243
  release
195
244
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@varlet/release",
3
3
  "type": "module",
4
- "version": "0.0.3-alpha.1700239118439",
4
+ "version": "0.0.4",
5
5
  "description": "release all packages and generate changelogs",
6
6
  "keywords": [
7
7
  "varlet",
@@ -31,6 +31,14 @@
31
31
  "files": [
32
32
  "dist"
33
33
  ],
34
+ "simple-git-hooks": {
35
+ "pre-commit": "pnpm exec lint-staged --allow-empty --concurrent false",
36
+ "commit-msg": "pnpm run commit-lint $1"
37
+ },
38
+ "lint-staged": {
39
+ "*.{ts,tsx,js,vue,less}": "prettier --write",
40
+ "*.{ts,tsx,js,vue}": "eslint --fix"
41
+ },
34
42
  "packageManager": "pnpm@8.7.5",
35
43
  "engines": {
36
44
  "node": ">=16.0.0",
@@ -44,28 +52,30 @@
44
52
  "@types/semver": "^7.5.5",
45
53
  "@varlet/eslint-config": "^2.18.4",
46
54
  "eslint": "^8.53.0",
55
+ "lint-staged": "^15.2.0",
47
56
  "prettier": "^3.1.0",
57
+ "simple-git-hooks": "^2.9.0",
58
+ "tsup": "^8.0.1",
48
59
  "typescript": "^5.2.2",
49
60
  "unbuild": "^2.0.0"
50
61
  },
51
62
  "dependencies": {
52
63
  "commander": "^11.1.0",
53
64
  "conventional-changelog": "^5.1.0",
54
- "picocolors": "^1.0.0",
55
65
  "execa": "^8.0.1",
56
66
  "fs-extra": "^11.1.1",
57
67
  "glob": "^10.3.10",
58
68
  "inquirer": "^9.2.12",
59
69
  "nanospinner": "^1.1.0",
60
- "rslog": "^1.1.0",
61
- "semver": "^7.5.4",
62
- "tsup": "^7.2.0"
70
+ "picocolors": "^1.0.0",
71
+ "semver": "^7.5.4"
63
72
  },
64
73
  "scripts": {
65
74
  "preinstall": "npx only-allow pnpm",
66
75
  "dev": "tsup --watch",
67
76
  "build": "tsup",
68
77
  "release": "pnpm build && node bin/index.js release",
69
- "lint": "eslint --ext .ts,.js"
78
+ "lint": "eslint --ext .ts,.js",
79
+ "commit-lint": "node bin/index.js commit-lint"
70
80
  }
71
81
  }