Gathering detailed insights and metrics for @142vip/changelog
Gathering detailed insights and metrics for @142vip/changelog
Gathering detailed insights and metrics for @142vip/changelog
Gathering detailed insights and metrics for @142vip/changelog
npm install @142vip/changelog
Typescript
Module System
Min. Node Version
Node Version
NPM Version
35.9
Supply Chain
79.8
Quality
81.8
Maintenance
100
Vulnerability
97.9
License
Cumulative downloads
Total Downloads
Last day
0%
Compared to previous day
Last week
-70%
Compared to previous week
Last month
-82.5%
Compared to previous month
Last year
0%
Compared to previous year
根据git
提交记录,自动生成CHANGELOG
文档
从 GitHub
提交信息Conventional Commits中生成更改日志。 这个模块实现参考了changelogen
和changelogithub
两个模块的实现。
非常感谢两位作者的实现思路
CHANGELOG
文档中标记破坏性改动CHANGELOG
文档中支持按照scope
进行分组展示CI
流水线,生成的CHANGELOG
记录支持展示代码贡献者Monorepo
模式,通过scopeName
配置,匹配git
提交信息中的scope
,过滤出组件包的提交记录1# output参数可以配置,支持做本地文档更新 2npx changelog --output CHANGELOG.md
1# 只本地生成创建版本的URL 2npx changelog --dry
1# .github/workflows/release.yml 2name: Release 3 4permissions: 5 contents: write 6 7on: 8 push: 9 tags: 10 - 'v*' 11 12jobs: 13 release: 14 runs-on: ubuntu-latest 15 steps: 16 - uses: actions/checkout@v4 17 with: 18 fetch-depth: 0 19 20 # 安装node版本,大于16 21 - uses: actions/setup-node@v4 22 with: 23 node-version: 16.x 24 25 # Github发布版本,并更新Release信息 26 - name: Release New Version 27 run: | 28 npx changelog 29 env: 30 GITHUB_TOKEN: ${{secrets.TOKEN}}
向 GitHub 推送以“v”开头的标签时,github actions
会被触发。
在142vip所有的开源仓库中,都可以通过@142vip/changelog
模块来实现发布,例如:
1# 2# CD持续交付 3# 4 5name: CD 6on: 7 push: 8 branches: 9 - next 10 workflow_dispatch: 11jobs: 12 # 版本发布 13 release: 14 name: 创建Github发布 15 runs-on: ubuntu-latest 16 # 主库next且执行release更新时执行 17 if: github.repository == '142vip/core-x' && startsWith(github.event.head_commit.message, 'chore(release):') 18 19 steps: 20 - name: Checkout Code 21 uses: actions/checkout@v4 22 with: 23 persist-credentials: false 24 # “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 25 fetch-depth: 0 26 27 # 安装PNPM 28 - name: PNPM Install 29 uses: pnpm/action-setup@v4 30 with: 31 version: 7.33.2 32 33 # 安装Node环境 34 - name: Install Node.js 35 uses: actions/setup-node@v4 36 with: 37 node-version: 20.12.2 38 # 淘宝镜像加速 39 registry-url: 'https://registry.npmmirror.com' 40 # 缓存 41 cache: pnpm 42 43 # 下载依赖,并执行初始化脚本:钩子函数、思维导图构建 44 - name: Install Dependencies 45 run: | 46 ./scripts/ci 47 48 - name: Build All Packages 49 run: | 50 pnpm build 51 52 # Github发布版本,并更新Release信息 53 - name: Release New Version 54 run: | 55 npx changelog 56 env: 57 GITHUB_TOKEN: ${{secrets.TOKEN}}
1 2# cli 参数帮助 3npx changelog -h 4 5@142vip/changelog/0.0.1-alpha.6 6 7Usage: @142vip/changelog [options] 8 9Options: 10 -v --version Package Version 11 -t, --tokens <path> GitHub Token 12 --from <ref> From tag 13 --to <ref> To tag 14 --github <path> GitHub Repository, e.g. @142vip/core-x 15 --name <name> Name of the release 16 --prerelease Mark release as prerelease 17 --output <path> Output to file instead of sending to GitHub 18 --scopeName <scopeName> Package name in Monorepo,Match the scope in the git commit information 19 --dry Dry run (default: false) 20 -h, --help display help for command
您可以将配置文件放在项目根目录中,名为 changelog.config.{json,ts,js,mjs,cjs}
或使用 @142vip/changelog
字段在package.json
中。
Copyright (c) 2019-present, 142vip 储凡
No vulnerabilities found.
No security vulnerabilities found.