feat: add specific version support to changelog script
MODIFY
scripts/changelog.ts
scripts/changelog.ts
@@ -305,7 +305,7 @@ function updateVersion(releaseType: string, cwd: AbsoluteFilePath): string {
).stdout.toString().trim();
}
-export async function main(): Promise<void> {
+export async function main([version]: Array<string>): Promise<void> {
// Cache the current version for reverting
const currentVersion = await getCurrentVersion();
@@ -324,7 +324,7 @@ export async function main(): Promise<void> {
);
// Update the root package version
- const targetReleaseType = getReleaseType();
+ const targetReleaseType = version || getReleaseType();
const newVersion = updateVersion(targetReleaseType, ROOT);
reporter.success(
markup`The root package version was updated to <emphasis>${newVersion}</emphasis>.`,

feat: add specific version support to changelog script (#1106)