Repository navigation
refactor: convert ne_NP & sr_Cyrl_RS locales to TypeScript - #724
Conversation
|
@yoyo837 is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. Walkthrough尼泊尔语和塞尔维亚语西里尔文分页语言包现在将词条对象声明为 Changes分页语言包导出
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~8 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to Both locale modules preserve their exported data, and generated declarations target the package’s configured paths. No actionable merge-blocking risk is established. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. 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. 兔子捧起语言包, Comment |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The conversions follow existing locale conventions and preserve runtime data.
Review effort: Balanced
Findings: None
What changed in this PR
Converts the remaining JavaScript locales to TypeScript so declarations are emitted for consumers.
Changes:
- Adds
PaginationLocaletyping. - Preserves locale data while standardizing comments and exports.
| File | Description |
|---|---|
src/locale/ne_NP.ts |
Converts the Nepali locale to TypeScript. |
src/locale/sr_Cyrl_RS.ts |
Converts the Serbian Cyrillic locale to TypeScript. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #724 +/- ##
=======================================
Coverage 99.69% 99.69%
=======================================
Files 4 4
Lines 332 332
Branches 153 153
=======================================
Hits 331 331
Misses 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🤔 This PR
src/locale/ne_NP.js→ne_NP.tsandsr_Cyrl_RS.js→sr_Cyrl_RS.ts— the only two.jsfiles undersrc/locale(the other 73 locales are all.ts).💡 Motivation
package.jsonmaps the types of./locale/*to./es/locale/*.d.ts, but no declarations are emitted for.jssources. As a result, TypeScript consumers cannot resolve these two entry points at all:@rc-component/pagination/locale/ne_NP@rc-component/pagination/locale/sr_Cyrl_RSFor example, ant-design currently falls back to
en_USfor itsne_NPlocale because the typed import does not resolve (see line 1 ofcomponents/locale/ne_NP.tsin ant-design/ant-design).🔧 Changes
.js→.tsconversion: addsPaginationLocaletyping and normalizes section comments to match the other locale files. No data changes.✅ Verification
father buildnow emitses/locale/ne_NP.d.tsandes/locale/sr_Cyrl_RS.d.tstsc --noEmit, eslint and prettier all passnpm test: 222 tests / 130 snapshots passSummary by CodeRabbit