From b376af3e460d88a3212d27e1542108ff025252ea Mon Sep 17 00:00:00 2001
From: afc163
Date: Wed, 1 Jul 2026 10:03:29 +0800
Subject: [PATCH 1/5] chore: standardize repository maintenance
---
.github/FUNDING.yml | 2 ++
.github/dependabot.yml | 27 ++++++++++++++++
.github/workflows/codeql.yml | 43 +++++++++++++++++++++++++
.github/workflows/test.yml | 24 ++++++++++++++
LICENSE | 21 +++++++++++++
README.md | 58 ++++++++++++++++++++++++++++++++--
README.zh-CN.md | 61 ++++++++++++++++++++++++++++++++++++
package.json | 4 +--
8 files changed, 235 insertions(+), 5 deletions(-)
create mode 100644 .github/FUNDING.yml
create mode 100644 .github/dependabot.yml
create mode 100644 .github/workflows/codeql.yml
create mode 100644 .github/workflows/test.yml
create mode 100644 LICENSE
create mode 100644 README.zh-CN.md
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..758659a
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,2 @@
+github: ant-design
+open_collective: ant-design
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..5e6c7fa
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,27 @@
+version: 2
+updates:
+ - package-ecosystem: npm
+ directory: '/'
+ schedule:
+ interval: weekly
+ day: monday
+ time: '21:00'
+ timezone: Asia/Shanghai
+ open-pull-requests-limit: 10
+ groups:
+ npm-dependencies:
+ patterns:
+ - '*'
+
+ - package-ecosystem: github-actions
+ directory: '/'
+ schedule:
+ interval: weekly
+ day: monday
+ time: '21:00'
+ timezone: Asia/Shanghai
+ open-pull-requests-limit: 10
+ groups:
+ github-actions:
+ patterns:
+ - '*'
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000..6082fc6
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,43 @@
+name: 'CodeQL'
+
+on:
+ push:
+ branches: ['master']
+ pull_request:
+ branches: ['master']
+ schedule:
+ - cron: '36 13 * * 3'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [javascript-typescript]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
+ with:
+ languages: ${{ matrix.language }}
+ queries: +security-and-quality
+
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
+ with:
+ category: '/language:${{ matrix.language }}'
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..e17c37b
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,24 @@
+name: ✅ test
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+permissions:
+ contents: read
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - uses: actions/setup-node@v6
+ with:
+ node-version: 22
+ - run: npm install --legacy-peer-deps
+ - run: npm run compile
+ - run: npm run test:only
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..378e691
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) react-component
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 64f79cb..06b65fe 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,61 @@
-# rc-np
+
+
@rc-component/np
+
Part of the Ant Design ecosystem.
+
🚀 Release helper for rc-component packages.
-version control for package publish
+
+
+
+
+
+
+
+
+
+English | [简体中文](./README.zh-CN.md)
+
+## Highlights
+
+| Area | Support |
+| ------- | ----------------------------------------- |
+| Purpose | Release helper for rc-component packages. |
+| Package | `@rc-component/np` |
+| Release | `@rc-component/np` / `rc-np` |
+
+## Install
+
+```bash
+npm install @rc-component/np --save-dev
+```
## Usage
+```bash
+npx rc-np
+```
+
+## API
+
+| Command | Description |
+| ------- | ---------------------------------- |
+| `rc-np` | Run the rc-component release flow. |
+
+## Development
+
+```bash
+npm install
+npm run compile
+npm run test:only
```
-$ rc-np
+
+## Release
+
+```bash
+npm run prepublishOnly
```
+
+This package is the release helper itself. `prepublishOnly` only verifies the build before publishing.
+
+## License
+
+@rc-component/np is released under the [MIT](./LICENSE) license.
diff --git a/README.zh-CN.md b/README.zh-CN.md
new file mode 100644
index 0000000..f0f3b14
--- /dev/null
+++ b/README.zh-CN.md
@@ -0,0 +1,61 @@
+
+
@rc-component/np
+
Ant Design 生态的一部分。
+
🚀 rc-component 包使用的发布辅助工具。
+
+
+
+
+
+
+
+
+
+
+简体中文 | [English](./README.md)
+
+## 亮点
+
+| 方向 | 支持 |
+| ---- | ----------------------------------- |
+| 定位 | rc-component 包使用的发布辅助工具。 |
+| 包名 | `@rc-component/np` |
+| 发布 | `@rc-component/np` / `rc-np` |
+
+## 安装
+
+```bash
+npm install @rc-component/np --save-dev
+```
+
+## 用法
+
+```bash
+npx rc-np
+```
+
+## API
+
+| 名称 | 说明 |
+| ------- | ---------------------------- |
+| `rc-np` | 运行 rc-component 发布流程。 |
+
+## 本地开发
+
+```bash
+npm install
+npm run compile
+npm run test:only
+```
+
+## 发布
+
+```bash
+npm run prepublishOnly
+```
+
+这个包本身就是发布辅助工具,`prepublishOnly` 只在发布前校验构建。
+
+## 许可证
+
+@rc-component/np 基于 [MIT](./LICENSE) 协议发布。
diff --git a/package.json b/package.json
index b3c6cce..2600440 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "@rc-component/np",
"version": "1.0.4",
- "description": "publish tools for version bumping and changelog generation",
+ "description": "🚀 Release helper for rc-component packages.",
"keywords": [
"publish"
],
@@ -31,7 +31,7 @@
"compile": "father build",
"prepublishOnly": "npm run compile",
"test": "npm run compile && npm run test:only",
- "test:only": "node ./bin/np.mjs"
+ "test:only": "jest --runInBand"
},
"dependencies": {
"@inquirer/prompts": "^7.2.3",
From f8ae012734d667c8fc81e92cd2d16ba9b1da4001 Mon Sep 17 00:00:00 2001
From: afc163
Date: Wed, 1 Jul 2026 11:59:35 +0800
Subject: [PATCH 2/5] chore: address review feedback
---
README.md | 8 +++++---
README.zh-CN.md | 8 +++++---
package.json | 2 +-
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 06b65fe..0844734 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@
-English | [简体中文](./README.zh-CN.md)
+English | 简体中文
## Highlights
@@ -43,18 +43,20 @@ npx rc-np
## Development
```bash
-npm install
+ut install
npm run compile
npm run test:only
```
## Release
+Maintainers can run the publish guard before releasing this package:
+
```bash
npm run prepublishOnly
```
-This package is the release helper itself. `prepublishOnly` only verifies the build before publishing.
+This package is the release helper itself, so the guard only verifies the build before publishing.
## License
diff --git a/README.zh-CN.md b/README.zh-CN.md
index f0f3b14..061ebd8 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -12,7 +12,7 @@
-简体中文 | [English](./README.md)
+简体中文 | English
## 亮点
@@ -43,18 +43,20 @@ npx rc-np
## 本地开发
```bash
-npm install
+ut install
npm run compile
npm run test:only
```
## 发布
+维护者发布此包前可以运行发布校验:
+
```bash
npm run prepublishOnly
```
-这个包本身就是发布辅助工具,`prepublishOnly` 只在发布前校验构建。
+这个包本身就是发布辅助工具,所以发布校验只检查构建产物。
## 许可证
diff --git a/package.json b/package.json
index 2600440..b64aaee 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,7 @@
"compile": "father build",
"prepublishOnly": "npm run compile",
"test": "npm run compile && npm run test:only",
- "test:only": "jest --runInBand"
+ "test:only": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --runInBand"
},
"dependencies": {
"@inquirer/prompts": "^7.2.3",
From 468cfa5be2055f4eb7be3945c269d45836955b90 Mon Sep 17 00:00:00 2001
From: afc163
Date: Wed, 1 Jul 2026 14:02:37 +0800
Subject: [PATCH 3/5] chore: align maintenance dependencies
---
package.json | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/package.json b/package.json
index b64aaee..0a9a916 100644
--- a/package.json
+++ b/package.json
@@ -35,24 +35,24 @@
},
"dependencies": {
"@inquirer/prompts": "^7.2.3",
- "babel-jest": "^29.7.0",
+ "babel-jest": "^30.4.1",
"chalk": "^4.1.2",
"escape-goat": "^4.0.0",
"fs-extra": "^10.1.0",
- "jest": "^29.2.1",
+ "jest": "^30.4.2",
"open": "^10.1.0",
"semver": "^7.6.3",
"simple-git": "^3.27.0",
"yargs-parser": "^21.1.1"
},
"devDependencies": {
- "@types/fs-extra": "^9.0.13",
- "@types/jest": "^29.2.0",
- "@types/node": "^22.7.5",
- "eslint": "^7.18.0",
- "father": "^4.0.0",
- "prettier": "^2.1.2",
- "typescript": "^5.0.0"
+ "@types/fs-extra": "^11.0.4",
+ "@types/jest": "^30.0.0",
+ "@types/node": "^26.0.1",
+ "eslint": "^9.39.4",
+ "father": "^4.6.24",
+ "prettier": "^3.9.4",
+ "typescript": "^6.0.3"
},
"engines": {
"node": ">=18.x"
From 4444909a420ad8c713ec4dbf0397ffefa46b1050 Mon Sep 17 00:00:00 2001
From: afc163
Date: Wed, 1 Jul 2026 14:26:41 +0800
Subject: [PATCH 4/5] docs: align Chinese README language switch
---
README.zh-CN.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 061ebd8..2e0e11f 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -12,7 +12,7 @@
-简体中文 | English
+English | 简体中文
## 亮点
From cc027fff2f5cae9a909441040c6610527d9f1849 Mon Sep 17 00:00:00 2001
From: afc163
Date: Wed, 1 Jul 2026 18:36:37 +0800
Subject: [PATCH 5/5] docs: use npm install in README
---
README.md | 2 +-
README.zh-CN.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 0844734..4a76384 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@ npx rc-np
## Development
```bash
-ut install
+npm install
npm run compile
npm run test:only
```
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 2e0e11f..c468de3 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -43,7 +43,7 @@ npx rc-np
## 本地开发
```bash
-ut install
+npm install
npm run compile
npm run test:only
```