Skip to content

feat: export helpers used by sibling packages - #202

Open
nrps9909 wants to merge 1 commit into
react-component:masterfrom
nrps9909:codex/export-textarea-helpers
Open

feat: export helpers used by sibling packages#202
nrps9909 wants to merge 1 commit into
react-component:masterfrom
nrps9909:codex/export-textarea-helpers

Conversation

@nrps9909

@nrps9909nrps9909 commented Aug 27, 2026

Copy link
Copy Markdown

Summary

  • export CommonInputProps, useCount, and resolveOnChange from the package root
  • add a root-export regression test
  • keep the existing implementations and runtime behavior unchanged

Motivation

The sibling @rc-component/textarea package currently consumes these declarations and helpers through @rc-component/input/lib/* deep imports. The current father-plugin compile check rejects package-internal es/lib imports, so textarea cannot migrate to supported root imports until input exposes the symbols it already relies on.

HolderRef and BaseInputProps are already available from the root; this completes the remaining sibling-package surface without moving or duplicating implementation code.

Validation

  • focused root-export test: 1 passed
  • full suite: 11 suites, 128 tests, 22 snapshots passed
  • npm run tsc
  • npm run lint (0 errors; 2 existing hook warnings)
  • npm run compile (ESM, CJS, declarations, and Less)
  • generated ESM and CJS index.d.ts files expose all three symbols
  • git diff --check

I checked every current open PR changed-file list; none modifies src/index.tsx or adds this root-export surface.

AI assistance disclosure: Codex was used to trace the sibling package compile failure, verify the current public exports, implement the root exports and regression, run validation, audit open PR overlap, and draft this description. All cited results were verified on the submitted head.

Summary by CodeRabbit

  • 新功能

    • 新增并公开导出 CommonInputProps 类型。
    • 新增并公开导出 useCount Hook。
    • 新增并公开导出 resolveOnChange 工具函数。
  • 测试

    • 增加根入口导出验证,确保新增类型和函数可正常使用。

@vercel

vercelBot commented Aug 27, 2026

Copy link
Copy Markdown

@nrps9909 is attempting to deploy a commit to the afc163's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitaiBot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 80780283-35b2-487b-b234-8759b278c2ed

📥 Commits

Reviewing files that changed from the base of the PR and between 52086bb and 15d0406.

📒 Files selected for processing (2)
  • src/index.tsx
  • tests/rootExports.test.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

根入口新增 CommonInputPropsuseCountresolveOnChange 的导出。新增测试验证类型导入以及两个函数导出的可用性。

Changes

根导出

Layer / File(s)Summary
根导出验证
tests/rootExports.test.tsx
测试导入 CommonInputPropsresolveOnChangeuseCount,并验证空对象符合类型以及两个导出均为函数。

Estimated code review effort: 1 (简单) | ~5 minutes

Merge Risk:⚪ Minimal · up to 15d04

The PR exposes existing helpers from the package root without changing their implementations or runtime behavior and adds regression coverage. No actionable merge-blocking risk remains beyond normal checks and review.

Poem

小兔检查根出口,
类型和函数排成行。
useCount 轻轻跳,
resolveOnChange 发新光。
空对象通过类型门,
测试落下安心章。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ Passed标题准确概括了主要变更:从包根导出供 sibling packages 使用的辅助 API。标题简洁、明确,并与 PR 内容一致。
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Sign up for freeto 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.

1 participant

@nrps9909