diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6697ee3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,55 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. + +## v0.0.1-alpha.1 (2024-07-24) + +### ✨ Features + +- 删除clean脚本,支持脚手架实现删除  -  by **chufan** [(6b76d)](https://github.com/142vip/core-x/commit/6b76dae) +- 增加各模块配置,支持build命令  -  by **chufan** [(2f6d3)](https://github.com/142vip/core-x/commit/2f6d3b5) +- 新增docs文档,静态页面搭建  -  by **chufan** [(6e84f)](https://github.com/142vip/core-x/commit/6e84fd1) +- 插件相关文档更新,丰富配置  -  by **chufan** [(48bdf)](https://github.com/142vip/core-x/commit/48bdfe2) +- 依赖更新,支持docs项目管理,配置.vite忽略  -  by **chufan** [(49851)](https://github.com/142vip/core-x/commit/49851de) +- 官方文档支持CI 自动化部署  -  by **142vip.cn** in https://github.com/142vip/core-x/issues/11 [(5a786)](https://github.com/142vip/core-x/commit/5a786d3) +- 文档网站内容更新,优化模块包  -  by **chufan** [(80903)](https://github.com/142vip/core-x/commit/80903ea) +- **@142vip/changelog**: + - 支持自定义版本名称  -  by **chufan** [(e062c)](https://github.com/142vip/core-x/commit/e062c06) +- **@142vip/fairy-cli**: + - 搭建基本结构,增加部分逻辑  -  by **chufan** [(44f43)](https://github.com/142vip/core-x/commit/44f43f8) + - 增加clean命令,支持在当前目录下指定删除  -  by **chufan** [(be939)](https://github.com/142vip/core-x/commit/be939b2) + - 支持turbo可选参数,删除turbo构建目录  -  by **chufan** [(7ba7b)](https://github.com/142vip/core-x/commit/7ba7be9) + - 支持vite缓存目录删除,增加--vite参数  -  by **chufan** [(0fb42)](https://github.com/142vip/core-x/commit/0fb42bb) + - 支持原生exec命令  -  by **142vip.cn** in https://github.com/142vip/core-x/issues/8 [(2e296)](https://github.com/142vip/core-x/commit/2e29629) + - 支持turbo命令,简化dev、build的使用  -  by **chufan** [(bad23)](https://github.com/142vip/core-x/commit/bad23ce) + - 模块包内增加turbo依赖,删除全局turbo依赖  -  by **chufan** [(a36b4)](https://github.com/142vip/core-x/commit/a36b40b) +- **@142vip/release-version**: + - 搭建基础框架,新增部分功能  -  by **chufan** [(29346)](https://github.com/142vip/core-x/commit/2934667) + - 支持bumpx多种配置文件格式  -  by **chufan** [(16a55)](https://github.com/142vip/core-x/commit/16a5540) +- **@142vip/vitepress**: + - 新增组件,支持i18n和基础配置  -  by **chufan** [(770fd)](https://github.com/142vip/core-x/commit/770fddf) +- **changelog**: + - 修改md文案  -  by **chufan** [(a2793)](https://github.com/142vip/core-x/commit/a2793cf) + - 测试scope  -  by **chufan** [(81283)](https://github.com/142vip/core-x/commit/8128340) + - 支持多模块生成日志文档  -  by **chufan** [(f4e42)](https://github.com/142vip/core-x/commit/f4e420e) + +### 🔥 Performance + +- 升级依赖和脚本  -  by **chufan** [(eba2b)](https://github.com/142vip/core-x/commit/eba2b91) + +### 🐛 Bug Fixes + +- 修复官方文档部署异常,新增部分链接  -  by **chufan** [(46ab1)](https://github.com/142vip/core-x/commit/46ab19a) + +### 💅 Refactors + +- **@142vip/release-version**: + - 结构与编码风格优化,配置bumpx命令  -  by **chufan** [(3680d)](https://github.com/142vip/core-x/commit/3680d42) + - 结构调整,简化代码,优化逻辑流程  -  by **chufan** [(d61f4)](https://github.com/142vip/core-x/commit/d61f4c7) + +### 📖 Documentation + +- 修改文档模块,支持项目包启动  -  by **chufan** [(e439a)](https://github.com/142vip/core-x/commit/e439a04) +- **@142vip/fairy-cli**: Update  -  by **chufan** [(96155)](https://github.com/142vip/core-x/commit/96155dc) + +**Release New Version v0.0.1-alpha.1 [👉 View Changes On GitHub](https://github.com/142vip/core-x/compare/v0.0.1-alpha.0...v0.0.1-alpha.1)** \ No newline at end of file diff --git a/package.json b/package.json index 896a5f8..d6233b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@142vip/core-x", - "version": "0.0.1-alpha.0", + "version": "0.0.1-alpha.1", "type": "module", "engines": { "node": "18.18.0", diff --git a/packages/release-version/package.json b/packages/release-version/package.json index 52c0fe0..6da48dd 100644 --- a/packages/release-version/package.json +++ b/packages/release-version/package.json @@ -38,6 +38,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { + "@142vip/changelog": "workspace:*", "@jsdevtools/ez-spawn": "^3.0.4", "c12": "^1.10.0", "cac": "^6.7.14", diff --git a/packages/release-version/src/bumpx-cli.ts b/packages/release-version/src/bumpx-cli.ts index 742ddef..d1fb626 100644 --- a/packages/release-version/src/bumpx-cli.ts +++ b/packages/release-version/src/bumpx-cli.ts @@ -71,7 +71,9 @@ export async function main() { options.progress = options.progress ? options.progress : progress // 执行版本升级 - await versionBump(options) + const result = await versionBump(options) + + console.log('result:', result) } catch (error) { errorHandler(error as Error) diff --git a/packages/release-version/src/core/version-bump.ts b/packages/release-version/src/core/version-bump.ts index fc8fedc..effb3e1 100644 --- a/packages/release-version/src/core/version-bump.ts +++ b/packages/release-version/src/core/version-bump.ts @@ -52,7 +52,13 @@ export async function versionBump(arg: (VersionBumpOptions) | string = {}): Prom if (operation.options.changelog) { console.log(symbols.info, 'Generate CHANGELOG.md By @142vip/changelog', operation.options.execute) - await ezSpawn.async(`npx changelog --output CHANGELOG.md --name v${operation.state.newVersion}`, { stdio: 'inherit' }) + try { + await ezSpawn.async(`npx changelog --output CHANGELOG.md --name v${operation.state.newVersion}`, { stdio: 'inherit' }) + } + catch (e) { + console.log(333, e) + } + console.log(symbols.success, 'Generate CHANGELOG.md Finished') } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9815653..7c5f59a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -254,6 +254,7 @@ importers: packages/release-version: specifiers: + '@142vip/changelog': workspace:* '@jsdevtools/ez-spawn': ^3.0.4 '@types/js-yaml': ^4.0.9 '@types/node': ^20.12.7 @@ -273,6 +274,7 @@ importers: rimraf: ^5.0.5 semver: ^7.6.0 dependencies: + '@142vip/changelog': link:../changelog '@jsdevtools/ez-spawn': 3.0.4 c12: 1.11.1 cac: 6.7.14 diff --git a/scripts/release b/scripts/release index 217c272..23b413a 100755 --- a/scripts/release +++ b/scripts/release @@ -9,7 +9,7 @@ ## ## 利用commit-and-tag-version生成changelog文档,并跳过commit、tag操作 -readonly generateChangeLog='npx changelog --output CHANGELOG.md --changelog && git add CHANGELOG.md' +readonly generateChangeLog='git add CHANGELOG.md' ## git提交信息 readonly commitInfo='chore(release): publish v%s' @@ -26,8 +26,7 @@ if [ "$currentBranch" = "next" ]; then npx lerna exec --scope "$appName" -- npx bumpp --preid alpha --no-tag --no-push else # 仓库版本更新 - echo npx bumpx --preid alpha --execute="'$generateChangeLog'" --commit "'$commitInfo'" --tag - npx bumpx --preid alpha --execute="$generateChangeLog" --commit "$commitInfo" --tag --push --all + npx bumpx --preid alpha --execute="$generateChangeLog" --changelog --commit "$commitInfo" --all fi else echo "当前分支是:$currentBranch ,版本迭代允许在next分支操作,并推送到远程!!!"