-
Notifications
You must be signed in to change notification settings - Fork 3
chore: standardize repository maintenance #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e135b99
chore: standardize repository maintenance
afc163 61d8f30
chore: align reusable test workflow
afc163 972695f
chore: address review feedback
afc163 d5836c9
chore: set up utoo for preview builds
afc163 8ff23c1
chore: use npm install for vercel preview
afc163 5cb68b8
chore: align maintenance dependencies
afc163 4517fcc
chore: fix upgraded test tooling
afc163 0bf15f4
docs: align Chinese README language switch
afc163 24bdd37
chore: fix upgraded tooling checks
afc163 1b5f8ee
chore: align TypeScript 6 tooling checks
afc163 bf7fb9d
docs: use npm install in README
afc163 ff1aefb
chore: migrate to native eslint flat config
afc163 4108164
chore: address review comments
afc163 fd173ff
ci: remove legacy preview workflow
afc163 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| github: ant-design | ||
| open_collective: ant-design |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | ||
| - '*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }}' |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: React Doctor | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [master] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
| statuses: write | ||
|
|
||
| jobs: | ||
| react-doctor: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - uses: millionco/react-doctor@0b4f4f4bd248a154e64eb508a48347f71154b3f3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Surge Preview | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| checks: write | ||
|
|
||
| jobs: | ||
| preview: | ||
| runs-on: ubuntu-latest | ||
| concurrency: | ||
| group: surge-preview-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Check Surge token | ||
| id: surge-token | ||
| env: | ||
| SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} | ||
| run: | | ||
| if [ -n "$SURGE_TOKEN" ]; then | ||
| echo "enabled=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "enabled=false" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| - name: Setup utoo | ||
| if: ${{ steps.surge-token.outputs.enabled == 'true' }} | ||
| uses: utooland/setup-utoo@v1 | ||
|
|
||
| - name: Build preview | ||
| if: ${{ steps.surge-token.outputs.enabled == 'true' }} | ||
| run: | | ||
| ut install | ||
| npm run build | ||
| - uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec | ||
| if: ${{ steps.surge-token.outputs.enabled == 'true' }} | ||
| env: | ||
| SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} | ||
| with: | ||
| surge_token: ${{ env.SURGE_TOKEN }} | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| dist: docs-dist | ||
| failOnError: false | ||
| setCommitStatus: false | ||
| - name: Skip Surge preview | ||
| if: ${{ steps.surge-token.outputs.enabled != 'true' }} | ||
| run: echo "SURGE_TOKEN is not configured; skip Surge preview." | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: ✅ test | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
| branches: [master] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| uses: react-component/rc-test/.github/workflows/test-utoo.yml@main | ||
| secrets: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,44 +1,73 @@ | ||
| # @rc-component/mini-decimal | ||
| <div align="center"> | ||
| <h1>@rc-component/mini-decimal</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>🧮 Small decimal calculator for precise string-based arithmetic.</p> | ||
|
|
||
| A mini decimal calculator which only support `add`, `multi` or compare operation for mini bundle size. | ||
| <p> | ||
| <a href="https://npmjs.org/package/@rc-component/mini-decimal"><img alt="NPM version" src="https://img.shields.io/npm/v/@rc-component/mini-decimal.svg?style=flat-square"></a> | ||
| <a href="https://npmjs.org/package/@rc-component/mini-decimal"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@rc-component/mini-decimal.svg?style=flat-square"></a> | ||
| <a href="https://github.com/react-component/mini-decimal/actions/workflows/test.yml"><img alt="build status" src="https://github.com/react-component/mini-decimal/actions/workflows/test.yml/badge.svg"></a> | ||
| <a href="https://app.codecov.io/gh/react-component/mini-decimal"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/react-component/mini-decimal/master.svg?style=flat-square"></a> | ||
| <a href="https://bundlephobia.com/package/@rc-component/mini-decimal"><img alt="bundle size" src="https://img.shields.io/bundlephobia/minzip/@rc-component/mini-decimal?style=flat-square"></a> | ||
| <a href="https://github.com/umijs/dumi"><img alt="dumi" src="https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square"></a> | ||
| </p> | ||
| </div> | ||
|
|
||
| [![NPM version][npm-image]][npm-url] [](https://github.com/umijs/dumi) [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![npm download][download-image]][download-url] | ||
| <p align="center">English | <a href="./README.zh-CN.md">简体中文</a></p> | ||
|
|
||
| [npm-image]: http://img.shields.io/npm/v/@rc-component/mini-decimal.svg?style=flat-square | ||
| [npm-url]: http://npmjs.org/package/@rc-component/mini-decimal | ||
| [github-actions-image]: https://github.com/react-component/mini-decimal/workflows/CI/badge.svg | ||
| [github-actions-url]: https://github.com/react-component/mini-decimal/actions | ||
| [codecov-image]: https://img.shields.io/codecov/c/github/react-component/mini-decimal/master.svg?style=flat-square | ||
| [codecov-url]: https://codecov.io/gh/react-component/mini-decimal/branch/master | ||
| [download-image]: https://img.shields.io/npm/dm/@rc-component/mini-decimal.svg?style=flat-square | ||
| [download-url]: https://npmjs.org/package/@rc-component/mini-decimal | ||
| ## Highlights | ||
|
|
||
| ## Development | ||
| | Area | Support | | ||
| | ------- | ------------------------------------------------------------- | | ||
| | Purpose | Small decimal calculator for precise string-based arithmetic. | | ||
| | Package | `@rc-component/mini-decimal` | | ||
| | Release | `@rc-component/np` / `rc-np` | | ||
|
|
||
| ## Install | ||
|
|
||
| ```bash | ||
| npm install | ||
| npm test | ||
| npm install @rc-component/mini-decimal | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ```tsx | ||
| ```tsx | pure | ||
| import getMiniDecimal from '@rc-component/mini-decimal'; | ||
|
|
||
| // Add | ||
| getMiniDecimal('0.1').add('0.2').toString(); // 0.3 | ||
|
|
||
| // Multi | ||
| getMiniDecimal('0.1').multi('0.2').toString(); // 0.02 | ||
| ``` | ||
|
|
||
| ## API | ||
|
|
||
| // Negate | ||
| getMiniDecimal('0.1').negate().toString(); // -0.1 | ||
| | Method | Description | | ||
| | ------------------- | ---------------------------------- | | ||
| | `add(value)` | Add another decimal value. | | ||
| | `multi(value)` | Multiply by another decimal value. | | ||
| | `negate()` | Return the negated value. | | ||
| | `equal(value)` | Check equality. | | ||
| | `lessEquals(value)` | Check whether the current value is less than or equal to another decimal value. | | ||
|
|
||
| // Equal | ||
| getMiniDecimal('0.1').equal('0.1'); // true | ||
| getMiniDecimal('0.1').equal('0.2'); // false | ||
| ## Development | ||
|
|
||
| // Less Equals | ||
| getMiniDecimal('0.1').lessEquals('0.2'); // true | ||
| getMiniDecimal('0.1').lessEquals('0.1'); // false | ||
| ```bash | ||
| npm install | ||
| npm test | ||
| npm run lint | ||
| npm run tsc | ||
| npm run compile | ||
| ``` | ||
|
|
||
| The dumi site runs at `http://localhost:8000`. | ||
|
|
||
| ## Release | ||
|
|
||
| ```bash | ||
| npm run prepublishOnly | ||
| ``` | ||
|
|
||
| The release flow is handled by `@rc-component/np` through the `rc-np` command when the package uses the shared release flow. | ||
|
|
||
| ## License | ||
|
|
||
| @rc-component/mini-decimal is released under the [MIT](./LICENSE) license. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| <div align="center"> | ||
| <h1>@rc-component/mini-decimal</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>🧮 用于精确字符串小数运算的轻量计算工具。</p> | ||
|
|
||
| <p> | ||
| <a href="https://npmjs.org/package/@rc-component/mini-decimal"><img alt="NPM version" src="https://img.shields.io/npm/v/@rc-component/mini-decimal.svg?style=flat-square"></a> | ||
| <a href="https://npmjs.org/package/@rc-component/mini-decimal"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@rc-component/mini-decimal.svg?style=flat-square"></a> | ||
| <a href="https://github.com/react-component/mini-decimal/actions/workflows/test.yml"><img alt="build status" src="https://github.com/react-component/mini-decimal/actions/workflows/test.yml/badge.svg"></a> | ||
| <a href="https://app.codecov.io/gh/react-component/mini-decimal"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/react-component/mini-decimal/master.svg?style=flat-square"></a> | ||
| <a href="https://bundlephobia.com/package/@rc-component/mini-decimal"><img alt="bundle size" src="https://img.shields.io/bundlephobia/minzip/@rc-component/mini-decimal?style=flat-square"></a> | ||
| <a href="https://github.com/umijs/dumi"><img alt="dumi" src="https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square"></a> | ||
| </p> | ||
| </div> | ||
|
|
||
| <p align="center"><a href="./README.md">English</a> | 简体中文</p> | ||
|
|
||
| ## 亮点 | ||
|
|
||
| | 方向 | 支持 | | ||
| | ---- | -------------------------------------- | | ||
| | 定位 | 用于精确字符串小数运算的轻量计算工具。 | | ||
| | 包名 | `@rc-component/mini-decimal` | | ||
| | 发布 | `@rc-component/np` / `rc-np` | | ||
|
|
||
| ## 安装 | ||
|
|
||
| ```bash | ||
| npm install @rc-component/mini-decimal | ||
| ``` | ||
|
|
||
| ## 用法 | ||
|
|
||
| ```tsx | pure | ||
| import getMiniDecimal from '@rc-component/mini-decimal'; | ||
|
|
||
| getMiniDecimal('0.1').add('0.2').toString(); // 0.3 | ||
| getMiniDecimal('0.1').multi('0.2').toString(); // 0.02 | ||
| ``` | ||
|
|
||
| ## API | ||
|
|
||
| | 名称 | 说明 | | ||
| | ------------------- | ------------------ | | ||
| | `add(value)` | 加上另一个小数值。 | | ||
| | `multi(value)` | 乘以另一个小数值。 | | ||
| | `negate()` | 返回相反数。 | | ||
| | `equal(value)` | 判断是否相等。 | | ||
| | `lessEquals(value)` | 判断当前值是否小于或等于另一个小数值。 | | ||
|
|
||
| ## 本地开发 | ||
|
|
||
| ```bash | ||
| npm install | ||
| npm test | ||
| npm run lint | ||
| npm run tsc | ||
| npm run compile | ||
| ``` | ||
|
|
||
| 本地 dumi 站点默认运行在 `http://localhost:8000`. | ||
|
|
||
| ## 发布 | ||
|
|
||
| ```bash | ||
| npm run prepublishOnly | ||
| ``` | ||
|
|
||
| 发布流程通过 `@rc-component/np` 提供的 `rc-np` 命令处理。 | ||
|
|
||
| ## 许可证 | ||
|
|
||
| @rc-component/mini-decimal 基于 [MIT](./LICENSE) 协议发布。 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.