Skip to content
Open
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
17 changes: 2 additions & 15 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,2 @@
# These are supported funding model platforms

github: ant-design # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: ant-design # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
github: ant-design
open_collective: ant-design
10 changes: 6 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
with:
category: '/language:${{ matrix.language }}'
22 changes: 22 additions & 0 deletions .github/workflows/react-doctor.yml
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
fetch-depth: 0
persist-credentials: false
- uses: millionco/react-doctor@0b4f4f4bd248a154e64eb508a48347f71154b3f3
33 changes: 33 additions & 0 deletions .github/workflows/surge-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Surge Preview

on:
pull_request:

permissions:
contents: read
pull-requests: write
checks: write

jobs:
preview:
runs-on: ubuntu-latest
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
if: ${{ env.SURGE_TOKEN != '' }}
with:
surge_token: ${{ env.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
dist: .doc
failOnError: false
setCommitStatus: false
build: |
npm install
npm run build
- name: Skip Surge preview
if: ${{ env.SURGE_TOKEN == '' }}
run: echo "SURGE_TOKEN is not configured; skip Surge preview."
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ name: ✅ test
on: [push, pull_request]
jobs:
test:
uses: react-component/rc-test/.github/workflows/test.yml@main
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
secrets: inherit
Comment on lines +5 to 6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 确认被引用的复用工作流是否存在
echo "== test-utoo.yml on default branch =="
gh api repos/react-component/rc-test/contents/.github/workflows/test-utoo.yml --jq '.path, .sha' 2>/dev/null || echo "NOT FOUND on default branch"

Repository: react-component/select

Length of output: 271


复用工作流引用应保持为可变 @main 以启用自动同步;文件存在性已确认,无需变更。

验证确认 react-component/rc-test/.github/workflows/test-utoo.yml 存在于目标仓库默认分支(SHA: 48f125d41587df9bc59ec7446ee5cc0b6527ad70)。此处引用 @main 属于常规复用工作流模式,旨在通过 secrets: inherit 自动获取最新配置变更,这与固定 SHA 的单一 Action 引用策略不同。鉴于文件存在且引用关系正确,原关于“策略不一致”的担忧不成立,无需强制固定 SHA。当前配置在目标文件存在且为可信组织的场景下是合理的。

🧰 Tools
🪛 zizmor (1.26.1)

[error] 5-5: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 5-5: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow

(secrets-inherit)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/test.yml around lines 5 - 6, The reusable workflow
reference in the test workflow should remain on the mutable `@main` ref and not be
changed to a fixed SHA. Keep the existing uses:
react-component/rc-test/.github/workflows/test-utoo.yml@main and secrets:
inherit as-is, since the target workflow file exists and this is the intended
reusable-workflow setup.

Source: Linters/SAST tools

300 changes: 139 additions & 161 deletions README.md

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
"prettier": "prettier --write --ignore-unknown .",
"lint": "eslint src/ docs/ tests/ --ext .tsx,.ts,.jsx,.js",
"test": "rc-test",
"tsc": "tsc --noEmit",
"now-build": "npm run build"
"tsc": "tsc --noEmit"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown"
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"@@/*": [".dumi/tmp/*"],
"@rc-component/select": ["src/index.ts"]
}
}
},
"include": [".dumirc.ts", ".fatherrc.js", "src", "tests", "docs"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Including .fatherrc.js in the include array without enabling "allowJs": true in compilerOptions causes TypeScript to throw an error during compilation (e.g., error TS6054: File '.fatherrc.js' has an unsupported extension). To resolve this, add "allowJs": true to the compilerOptions section of tsconfig.json.

}
5 changes: 4 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"framework": "umijs"
"framework": "umijs",
"installCommand": "npm install",
"buildCommand": "npm run build",
"outputDirectory": ".doc"
}
Loading