Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: ant-design
open_collective: ant-design
27 changes: 27 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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:
- '*'
43 changes: 43 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -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 }}'
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
60 changes: 57 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,63 @@
# rc-np
<div align="center">
<h1>@rc-component/np</h1>
<p><sub><a href="https://ant.design"><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" style="vertical-align: -0.125em;" /></a> Part of the Ant Design ecosystem.</sub></p>
<p>🚀 Release helper for rc-component packages.</p>

version control for package publish
<p>
<a href="https://npmjs.org/package/@rc-component/np"><img alt="NPM version" src="https://img.shields.io/npm/v/@rc-component/np.svg?style=flat-square"></a>
<a href="https://npmjs.org/package/@rc-component/np"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@rc-component/np.svg?style=flat-square"></a>
<a href="https://bundlephobia.com/package/@rc-component/np"><img alt="bundle size" src="https://img.shields.io/bundlephobia/minzip/%40rc-component%2Fnp?style=flat-square"></a>
<a href="https://github.com/react-component/np/actions/workflows/test.yml"><img alt="build status" src="https://github.com/react-component/np/actions/workflows/test.yml/badge.svg"></a>
<a href="https://app.codecov.io/gh/react-component/np"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/react-component/np/master.svg?style=flat-square"></a>
</p>
</div>

<p align="center">English | <a href="./README.zh-CN.md">简体中文</a></p>

## 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
```
$ rc-np

## API

| Command | Description |
| ------- | ---------------------------------- |
| `rc-np` | Run the rc-component release flow. |

## Development

```bash
npm 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, so the guard only verifies the build before publishing.

## License

@rc-component/np is released under the [MIT](./LICENSE) license.
63 changes: 63 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<div align="center">
<h1>@rc-component/np</h1>
<p><sub><a href="https://ant.design"><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" style="vertical-align: -0.125em;" /></a> Ant Design 生态的一部分。</sub></p>
<p>🚀 rc-component 包使用的发布辅助工具。</p>

<p>
<a href="https://npmjs.org/package/@rc-component/np"><img alt="NPM version" src="https://img.shields.io/npm/v/@rc-component/np.svg?style=flat-square"></a>
<a href="https://npmjs.org/package/@rc-component/np"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@rc-component/np.svg?style=flat-square"></a>
<a href="https://bundlephobia.com/package/@rc-component/np"><img alt="bundle size" src="https://img.shields.io/bundlephobia/minzip/%40rc-component%2Fnp?style=flat-square"></a>
<a href="https://github.com/react-component/np/actions/workflows/test.yml"><img alt="build status" src="https://github.com/react-component/np/actions/workflows/test.yml/badge.svg"></a>
<a href="https://app.codecov.io/gh/react-component/np"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/react-component/np/master.svg?style=flat-square"></a>
</p>
</div>

<p align="center"><a href="./README.md">English</a> | 简体中文</p>

## 亮点

| 方向 | 支持 |
| ---- | ----------------------------------- |
| 定位 | 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
```

这个包本身就是发布辅助工具,所以发布校验只检查构建产物。

## 许可证

@rc-component/np 基于 [MIT](./LICENSE) 协议发布。
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
],
Expand Down Expand Up @@ -31,28 +31,28 @@
"compile": "father build",
"prepublishOnly": "npm run compile",
"test": "npm run compile && npm run test:only",
"test:only": "node ./bin/np.mjs"
"test:only": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --runInBand"
},
"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"
Expand Down