@varlet/release 0.0.2 → 0.0.3-alpha.1700238681993

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,116 @@
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 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)
package/README.zh-CN.md CHANGED
@@ -1,116 +1,116 @@
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` 是一个用于发布所有包并生成变更日志的工具。
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)
package/bin/index.js CHANGED
@@ -1,20 +1,20 @@
1
- #!/usr/bin/env node
2
- import { release, changelog } from '../dist/index.js'
3
- import { Command } from 'commander'
4
-
5
- const program = new Command()
6
-
7
- program
8
- .command('release')
9
- .option('-r --remote <remote>', 'Remote name')
10
- .description('Release all packages and generate changelogs')
11
- .action(async (options) => release(options))
12
-
13
- program
14
- .command('changelog')
15
- .option('-rc --releaseCount <releaseCount>', 'Release count')
16
- .option('-f --file <file>', 'Changelog filename')
17
- .description('Generate changelog')
18
- .action(async (options) => changelog(options))
19
-
20
- program.parse()
1
+ #!/usr/bin/env node
2
+ import { release, changelog } from '../dist/index.js'
3
+ import { Command } from 'commander'
4
+
5
+ const program = new Command()
6
+
7
+ program
8
+ .command('release')
9
+ .option('-r --remote <remote>', 'Remote name')
10
+ .description('Release all packages and generate changelogs')
11
+ .action(async (options) => release(options))
12
+
13
+ program
14
+ .command('changelog')
15
+ .option('-rc --releaseCount <releaseCount>', 'Release count')
16
+ .option('-f --file <file>', 'Changelog filename')
17
+ .description('Generate changelog')
18
+ .action(async (options) => changelog(options))
19
+
20
+ program.parse()
package/dist/index.cjs CHANGED
@@ -36,13 +36,34 @@ __export(src_exports, {
36
36
  module.exports = __toCommonJS(src_exports);
37
37
 
38
38
  // src/release.ts
39
- var import_nanospinner2 = require("nanospinner");
40
39
  var import_fs_extra2 = __toESM(require("fs-extra"), 1);
41
- var import_execa = require("execa");
42
- var import_rslog = require("rslog");
40
+
41
+ // src/logger.ts
42
+ var import_picocolors = __toESM(require("picocolors"), 1);
43
+ var logger_default = {
44
+ info(text) {
45
+ console.log(text);
46
+ },
47
+ success(text) {
48
+ console.log(import_picocolors.default.green(text));
49
+ },
50
+ warning(text) {
51
+ console.log(import_picocolors.default.yellow(text));
52
+ },
53
+ error(text) {
54
+ console.log(import_picocolors.default.red(text));
55
+ },
56
+ title(text) {
57
+ console.log(import_picocolors.default.cyan(text));
58
+ }
59
+ };
60
+
61
+ // src/release.ts
43
62
  var import_semver = __toESM(require("semver"), 1);
44
- var import_glob = require("glob");
45
63
  var import_inquirer = __toESM(require("inquirer"), 1);
64
+ var import_execa = require("execa");
65
+ var import_nanospinner2 = require("nanospinner");
66
+ var import_glob = require("glob");
46
67
  var import_path2 = require("path");
47
68
 
48
69
  // src/changelog.ts
@@ -84,7 +105,7 @@ async function publish(preRelease) {
84
105
  throw new Error("\n" + ret.stderr);
85
106
  } else {
86
107
  s.success({ text: "Publish all packages successfully" });
87
- ret.stdout && import_rslog.logger.info(ret.stdout);
108
+ ret.stdout && logger_default.info(ret.stdout);
88
109
  }
89
110
  }
90
111
  async function pushGit(version, remote = "origin") {
@@ -95,7 +116,7 @@ async function pushGit(version, remote = "origin") {
95
116
  await (0, import_execa.execa)("git", ["push", remote, `v${version}`]);
96
117
  const ret = await (0, import_execa.execa)("git", ["push"]);
97
118
  s.success({ text: "Push remote repository successfully" });
98
- ret.stdout && import_rslog.logger.info(ret.stdout);
119
+ ret.stdout && logger_default.info(ret.stdout);
99
120
  }
100
121
  function updateVersion(version) {
101
122
  const packageJsons = import_glob.glob.sync("packages/*/package.json");
@@ -160,11 +181,11 @@ async function release(options) {
160
181
  try {
161
182
  const currentVersion = readJSONSync((0, import_path2.resolve)(cwd, "package.json")).version;
162
183
  if (!currentVersion) {
163
- import_rslog.logger.error("Your package is missing the version field");
184
+ logger_default.error("Your package is missing the version field");
164
185
  return;
165
186
  }
166
187
  if (!await isWorktreeEmpty()) {
167
- import_rslog.logger.error("Git worktree is not empty, please commit changed");
188
+ logger_default.error("Git worktree is not empty, please commit changed");
168
189
  return;
169
190
  }
170
191
  if (!await confirmRefs(options.remote)) {
@@ -189,17 +210,17 @@ async function release(options) {
189
210
  await changelog();
190
211
  await pushGit(expectVersion, options.remote);
191
212
  }
192
- import_rslog.logger.success(`Release version ${expectVersion} successfully!`);
213
+ logger_default.success(`Release version ${expectVersion} successfully!`);
193
214
  if (isPreRelease) {
194
215
  try {
195
216
  await (0, import_execa.execa)("git", ["restore", "**/package.json"]);
196
217
  await (0, import_execa.execa)("git", ["restore", "package.json"]);
197
218
  } catch {
198
- import_rslog.logger.error("Restore package.json has failed, please restore manually");
219
+ logger_default.error("Restore package.json has failed, please restore manually");
199
220
  }
200
221
  }
201
222
  } catch (error) {
202
- import_rslog.logger.error(error.toString());
223
+ logger_default.error(error.toString());
203
224
  process.exit(1);
204
225
  }
205
226
  }
package/dist/index.js CHANGED
@@ -1,11 +1,32 @@
1
1
  // src/release.ts
2
- import { createSpinner as createSpinner2 } from "nanospinner";
3
2
  import fse2 from "fs-extra";
4
- import { execa } from "execa";
5
- import { logger } from "rslog";
3
+
4
+ // src/logger.ts
5
+ import pico from "picocolors";
6
+ var logger_default = {
7
+ info(text) {
8
+ console.log(text);
9
+ },
10
+ success(text) {
11
+ console.log(pico.green(text));
12
+ },
13
+ warning(text) {
14
+ console.log(pico.yellow(text));
15
+ },
16
+ error(text) {
17
+ console.log(pico.red(text));
18
+ },
19
+ title(text) {
20
+ console.log(pico.cyan(text));
21
+ }
22
+ };
23
+
24
+ // src/release.ts
6
25
  import semver from "semver";
7
- import { glob } from "glob";
8
26
  import inquirer from "inquirer";
27
+ import { execa } from "execa";
28
+ import { createSpinner as createSpinner2 } from "nanospinner";
29
+ import { glob } from "glob";
9
30
  import { resolve } from "path";
10
31
 
11
32
  // src/changelog.ts
@@ -47,7 +68,7 @@ async function publish(preRelease) {
47
68
  throw new Error("\n" + ret.stderr);
48
69
  } else {
49
70
  s.success({ text: "Publish all packages successfully" });
50
- ret.stdout && logger.info(ret.stdout);
71
+ ret.stdout && logger_default.info(ret.stdout);
51
72
  }
52
73
  }
53
74
  async function pushGit(version, remote = "origin") {
@@ -58,7 +79,7 @@ async function pushGit(version, remote = "origin") {
58
79
  await execa("git", ["push", remote, `v${version}`]);
59
80
  const ret = await execa("git", ["push"]);
60
81
  s.success({ text: "Push remote repository successfully" });
61
- ret.stdout && logger.info(ret.stdout);
82
+ ret.stdout && logger_default.info(ret.stdout);
62
83
  }
63
84
  function updateVersion(version) {
64
85
  const packageJsons = glob.sync("packages/*/package.json");
@@ -123,11 +144,11 @@ async function release(options) {
123
144
  try {
124
145
  const currentVersion = readJSONSync(resolve(cwd, "package.json")).version;
125
146
  if (!currentVersion) {
126
- logger.error("Your package is missing the version field");
147
+ logger_default.error("Your package is missing the version field");
127
148
  return;
128
149
  }
129
150
  if (!await isWorktreeEmpty()) {
130
- logger.error("Git worktree is not empty, please commit changed");
151
+ logger_default.error("Git worktree is not empty, please commit changed");
131
152
  return;
132
153
  }
133
154
  if (!await confirmRefs(options.remote)) {
@@ -152,17 +173,17 @@ async function release(options) {
152
173
  await changelog();
153
174
  await pushGit(expectVersion, options.remote);
154
175
  }
155
- logger.success(`Release version ${expectVersion} successfully!`);
176
+ logger_default.success(`Release version ${expectVersion} successfully!`);
156
177
  if (isPreRelease) {
157
178
  try {
158
179
  await execa("git", ["restore", "**/package.json"]);
159
180
  await execa("git", ["restore", "package.json"]);
160
181
  } catch {
161
- logger.error("Restore package.json has failed, please restore manually");
182
+ logger_default.error("Restore package.json has failed, please restore manually");
162
183
  }
163
184
  }
164
185
  } catch (error) {
165
- logger.error(error.toString());
186
+ logger_default.error(error.toString());
166
187
  process.exit(1);
167
188
  }
168
189
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@varlet/release",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.3-alpha.1700238681993",
5
5
  "description": "release all packages and generate changelogs",
6
6
  "keywords": [
7
7
  "varlet",
@@ -51,6 +51,7 @@
51
51
  "dependencies": {
52
52
  "commander": "^11.1.0",
53
53
  "conventional-changelog": "^5.1.0",
54
+ "picocolors": "^1.0.0",
54
55
  "execa": "^8.0.1",
55
56
  "fs-extra": "^11.1.1",
56
57
  "glob": "^10.3.10",
@@ -62,9 +63,9 @@
62
63
  },
63
64
  "scripts": {
64
65
  "preinstall": "npx only-allow pnpm",
65
- "dev": "node bin/index.js",
66
- "build": "tsc --noEmit && tsup",
67
- "release": "pnpm build && pnpm dev release",
68
- "lint": "tsc --noEmit && eslint --ext .ts,.js"
66
+ "dev": "tsup --watch",
67
+ "build": "tsup",
68
+ "release": "pnpm build && node bin/index.js release",
69
+ "lint": "eslint --ext .ts,.js"
69
70
  }
70
71
  }