Skip to content

chore: standardize rc tween one config#139

Closed
afc163 wants to merge 13 commits into
masterfrom
codex/standardize-rc-config
Closed

chore: standardize rc tween one config#139
afc163 wants to merge 13 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Rename package metadata and docs to @rc-component/tween-one while preserving legacy rc-tween-one aliases for local compatibility.
  • Redesign README with Ant Design ecosystem branding, Bundlephobia badge, scoped npm install, usage, development checks, and release notes.
  • Remove now.json and now-build, add Vercel config, Surge preview, React Doctor, CodeQL, FUNDING, and the reusable test-utoo.yml workflow.
  • Update docs demos to use scoped imports and keep the old React 16 / dumi 1 / father-build stack stable.
  • Pin old-stack install compatibility with --legacy-peer-deps, a root Babel 7 dependency, and a cheerio override required by Enzyme.

Verification

  • npm install --legacy-peer-deps --ignore-scripts --no-audit --loglevel=warn --package-lock=false --prefer-offline --progress=false
  • npm run tsc
  • npm run lint
  • npm test -- --runInBand
  • npm run coverage -- --runInBand
  • npm run build
  • npm run compile
  • npx vercel build --yes

Refs ant-design/ant-design#58514

Summary by CodeRabbit

  • 新功能

    • 站点现已更新为新的包与文档名称,相关示例、链接和引用已同步到新标识。
    • 新增多项自动化检查与预览流程,提升代码质量和在线预览体验。
  • 文档

    • 文档内容与示例已全面更新,安装、使用、插件和 API 说明更完整。
    • 示例页面中的引用路径已统一更新,便于正常查看与运行。
  • 修复

    • 优化构建与发布配置,减少预览、文档生成和部署过程中的异常。

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tween-one Ready Ready Preview, Comment Jun 27, 2026 2:10pm

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@afc163, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 16 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6ce50203-fa16-4e3e-a66f-7b22f45844a4

📥 Commits

Reviewing files that changed from the base of the PR and between d9a8ba7 and 49a2200.

📒 Files selected for processing (7)
  • .github/workflows/surge-preview.yml
  • README.md
  • README.zh-CN.md
  • docs/examples/followMouse.tsx
  • docs/index.md
  • package.json
  • src/TweenOne.tsx

Walkthrough

The PR renames the package to @rc-component/tween-one, updates docs and examples to use scoped imports, adjusts TweenOne runtime assignment logic, and adds or replaces CI, preview, and deployment configuration.

Changes

Scoped Package Migration

Layer / File(s) Summary
Package metadata and resolution
package.json, tsconfig.json, typings/global/index.d.ts, .umirc.ts, docs/index.md, .github/FUNDING.yml
Package metadata, TS path mappings, global module declarations, Umi docs settings, docs index metadata, and funding metadata switch to the scoped package and new output directories.
TweenOne assignment handling
src/TweenOne.tsx
TweenOne now assigns animRef.current through an explicit conditional and keeps the reset-style path's style merge unchanged.
README and API docs
README.md
The README landing page, API tables, plugin docs, and group references are rewritten for @rc-component/tween-one.
General example imports
docs/demo/group.md, docs/demo/plugin-gradient.md, docs/examples/animParam.tsx, docs/examples/attr.tsx, docs/examples/blurFilter.tsx, docs/examples/component.tsx, docs/examples/componentFragment.tsx, docs/examples/control.tsx, docs/examples/easingPath.tsx, docs/examples/followMouse.tsx, docs/examples/group.tsx, docs/examples/resetStyle.tsx, docs/examples/simple.tsx, docs/examples/type.tsx, docs/examples/useInTable.tsx
Demo and example files switch Tween and TweenOneGroup imports to the scoped package, with a few local formatting adjustments kept in place.
SVG and plugin examples
docs/examples/numberDance.tsx, docs/examples/pathMotion.tsx, docs/examples/svg.tsx, docs/examples/svgDraw.tsx
The SVG-related examples switch their imports to the scoped package and update the SVGMorph path data.
Automation and deployment config
.github/workflows/codeql.yml, .github/workflows/main.yml, .github/workflows/react-doctor.yml, .github/workflows/surge-preview.yml, .gitignore, .prettierignore, now.json, vercel.json
GitHub Actions, ignore rules, deployment config, and now.json switch the repo's CI, preview, and build outputs to the new setup.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

૮˘ᵕ˘ა 我是一只小兔子,跳进新名字的春天,
@rc-component/tween-one 闪闪亮亮在眼前。
文档翻页,例子轻弹,
CI 与预览也一起开餐。
啃口胡萝卜,咚咚收工啦 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题与本次将项目配置标准化为 tween-one 相关的改动一致,能概括主要方向。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/standardize-rc-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

React Doctor found 5 issues in 3 files · 5 warnings · score 65 / 100 (Needs work) · vs master

5 warnings

docs/examples/component.tsx

  • ⚠️ L46 findDOMNode breaks component encapsulation no-find-dom-node

docs/examples/type.tsx

  • ⚠️ L31 Time or random value in JSX rendering-hydration-mismatch-time
  • ⚠️ L42 Time or random value in JSX rendering-hydration-mismatch-time

src/TweenOne.tsx

  • ⚠️ L69 Chained array iterations js-combine-iterations
  • ⚠️ L73 findDOMNode breaks component encapsulation no-find-dom-node

Reviewed by React Doctor for commit 49a2200. See inline comments for fixes.

@socket-security

socket-security Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​rc-component/​np@​1.0.4751006984100
Addednpm/​gh-pages@​6.3.09910010082100

View full report

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the package to the scoped @rc-component/tween-one namespace, updating configuration files, documentation, and examples accordingly. Feedback on the changes points out a potential runtime TypeError in src/TweenOne.tsx when accessing children.props without optional chaining, as well as a missing cleanup function for a mousemove event listener in docs/examples/followMouse.tsx that could lead to a memory leak.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/TweenOne.tsx Outdated
Comment thread docs/examples/followMouse.tsx
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

❌ Deploy failed

PR preview ❌ Failed ❌ Failed
🔗 Preview https://react-component-tween-one-preview-pr-139.surge.sh (may be unavailable)
📝 Commited74b7b
🪵 LogsView logs
📋 Build log (last lines)
npm warn exec The following package was not found and will be installed: surge@0.27.4

   Running as afc163@gmail.com (Student)

        project: ./docs-dist
         domain: react-component-tween-one-preview-pr-139.surge.sh
           size: 4 files, 3.1 MB


   Error - Deployment did not succeed.

🤖 Powered by surge-preview

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.89%. Comparing base (831fd29) to head (49a2200).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #139   +/-   ##
=======================================
  Coverage   89.89%   89.89%           
=======================================
  Files           7        7           
  Lines         366      366           
  Branches      139      140    +1     
=======================================
  Hits          329      329           
  Misses         37       37           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with 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.

Inline comments:
In @.github/workflows/codeql.yml:
- Around line 37-38: CodeQL workflow is using autobuild, which bypasses the
repository’s required dependency-install flags and can fail on the legacy
dependency stack. Replace the Autobuild step in codeql.yml with explicit install
and build steps that use the same npm install arguments already used elsewhere,
and ensure the CodeQL analysis targets the project after that manual build; use
the existing codeql-action setup/analyze flow and the workflow job around the
Autobuild step as the place to update.

In @.github/workflows/main.yml:
- Around line 13-15: The reusable workflow invocation is inheriting every secret
from the current repository, which is too broad for this test job. Update the
workflow reference in the test job to avoid blanket secret forwarding: remove
the inherit behavior and pass only the specific secrets the called workflow
actually needs, or drop the secrets mapping entirely if it only relies on the
default GITHUB_TOKEN. Use the test job definition and the reusable workflow call
to locate the change.

In `@docs/index.md`:
- Line 2: The front matter title in docs/index.md starts with a reserved YAML
character, so it must be quoted to remain valid across parsers. Update the title
field for `@rc-component/tween-one` to use a quoted scalar in the front matter so
the docs build does not fail; this change is isolated to the title entry and
does not affect the rest of the markdown content.

In `@package.json`:
- Around line 49-50: The docs:build script uses POSIX-only NODE_OPTIONS
assignment, which breaks on Windows shells. Update the package.json scripts so
docs:build uses a cross-platform approach with cross-env, and ensure the build
command still invokes dumi build with NODE_OPTIONS set correctly.

In `@README.md`:
- Line 147: The section heading currently duplicates the earlier Plugins title,
which can trigger MD024 and create unstable anchors. Update this heading in the
README to a more specific name, such as Plugin APIs, and make sure the
surrounding section content still matches the new title.
- Around line 181-191: The section heading is inconsistent with the actual
plugin name used in the example and API, so update the README heading from
PathPlugin to PathMotionPlugin. Keep the surrounding example and PathMotion API
text aligned with the identifiers already used in the snippet, especially
PathMotionPlugin and PathMotion, so readers see one consistent plugin name
throughout the section.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 69bf1434-b8ca-4357-91c6-48f64acd9513

📥 Commits

Reviewing files that changed from the base of the PR and between 831fd29 and d9a8ba7.

📒 Files selected for processing (35)
  • .github/FUNDING.yml
  • .github/workflows/codeql.yml
  • .github/workflows/main.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • .prettierignore
  • .umirc.ts
  • README.md
  • docs/demo/group.md
  • docs/demo/plugin-gradient.md
  • docs/examples/animParam.tsx
  • docs/examples/attr.tsx
  • docs/examples/blurFilter.tsx
  • docs/examples/component.tsx
  • docs/examples/componentFragment.tsx
  • docs/examples/control.tsx
  • docs/examples/easingPath.tsx
  • docs/examples/followMouse.tsx
  • docs/examples/group.tsx
  • docs/examples/numberDance.tsx
  • docs/examples/pathMotion.tsx
  • docs/examples/resetStyle.tsx
  • docs/examples/simple.tsx
  • docs/examples/svg.tsx
  • docs/examples/svgDraw.tsx
  • docs/examples/type.tsx
  • docs/examples/useInTable.tsx
  • docs/index.md
  • now.json
  • package.json
  • src/TweenOne.tsx
  • tsconfig.json
  • typings/global/index.d.ts
  • vercel.json
💤 Files with no reviewable changes (1)
  • now.json

Comment thread .github/workflows/codeql.yml
Comment thread .github/workflows/main.yml
Comment thread docs/index.md Outdated
Comment thread package.json
Comment thread README.md
Comment thread README.md Outdated
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/afc163s-projects?upgradeToPro=build-rate-limit

@socket-security

socket-security Bot commented Jun 26, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm yargs is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?npm/@rc-component/np@1.0.4npm/father@2.30.23npm/yargs@17.7.3

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/yargs@17.7.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Comment thread package.json Outdated
@afc163

afc163 commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

Per maintainer direction, @rc-component/tween-one is removed from this standardization scope. Closing this PR without merging.

@afc163 afc163 closed this Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants