Feat: cx.multiple() for declare multiple classes#291
Feat: cx.multiple() for declare multiple classes#291github-actions[bot] merged 1 commit intomainfrom
cx.multiple() for declare multiple classes#291Conversation
|
📝 WalkthroughWalkthroughAdded a typed Changes
Sequence Diagram(s)(omitted — change is an internal API feature without multi-component sequential interactions) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
|
Triggered from #291 by @black7375. Checking if we can fast forward Target branch ( commit e9ebbb2bf988240c5b70bcfc97820bbfdfb27d96 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Sun Nov 23 00:00:00 2025 +0900
Chore: yarn audit configPull request ( commit 469d698de56d770278c9051fd79dcf943c4282a1 (pull_request/cx-fn)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Mon Nov 24 00:00:00 2025 +0900
Feat: `cx.multiple()` for declare multiple classesIt is possible to fast forward |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/css/src/classname/cx.ts`:
- Around line 118-121: The skipped test "handles bigint inputs" in cx.ts creates
a mismatch with the ClassValue type (which includes bigint) and upstream clsx
behavior; either re-enable the test by changing it.skip to it (to verify BigInt
handling in the cx function), or if BigInt support is intentionally unsupported,
remove bigint from the ClassValue union/type and delete the test, or add a clear
comment above the test explaining why it is skipped and referencing the
decision; search for the test title "handles bigint inputs" and the ClassValue
type to make the corresponding change so types and tests remain consistent.
🧹 Nitpick comments (1)
packages/css/src/classname/cx.ts (1)
30-32: Avoid mutating theclsxexport.
Object.assign(clsx, …)mutates a third‑party function object, which can leak side effects to other imports ofclsx. Prefer wrappingclsxand attachingmultipleto the wrapper instead.♻️ Proposed change
-export const cx = Object.assign(clsx, { - multiple: cxMultiple -}); +const cxBase: typeof clsx = (...inputs) => clsx(...inputs); +export const cx = Object.assign(cxBase, { + multiple: cxMultiple +});
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/css/src/classname/cx.tspackages/css/src/classname/types.ts
🧰 Additional context used
🧬 Code graph analysis (2)
packages/css/src/classname/cx.ts (1)
packages/css/src/classname/types.ts (2)
ClassMultipleInput(28-28)ClassMultipleResult(30-32)
packages/css/src/classname/types.ts (2)
packages/css/src/classname/index.ts (1)
ClassValue(3-3)packages/css/src/index.ts (1)
ClassValue(63-63)
🔇 Additional comments (4)
packages/css/src/classname/types.ts (1)
27-31: Confirm public re-exports for new types.If
ClassMultipleInput/ClassMultipleResultare meant to be part of the public API, please ensure they’re re-exported from the public barrels (e.g.,packages/css/src/classname/index.tsand/orpackages/css/src/index.ts) so consumers can import them consistently.packages/css/src/classname/cx.ts (3)
2-2: No concerns.
34-45: LGTM forcxMultipleimplementation.Iteration +
hasOwnPropertyguard is fine, and the result shape matches the declared types.
153-201: Nice coverage forcx.multiple.The tests cover mixed inputs, empty map, and type assertions well.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
|
Triggered from #291 by @black7375. Checking if we can fast forward Target branch ( commit e9ebbb2bf988240c5b70bcfc97820bbfdfb27d96 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Sun Nov 23 00:00:00 2025 +0900
Chore: yarn audit configPull request ( commit 7aa2c457f83bb006b3f4391a9ec0fcaf3ce9bb94 (pull_request/cx-fn)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Mon Nov 24 00:00:00 2025 +0900
Feat: `cx.multiple()` for declare multiple classes #291It is possible to fast forward |
|
/fast-forward |
|
Triggered from #291 (comment) by @black7375. Trying to fast forward Target branch ( commit e9ebbb2bf988240c5b70bcfc97820bbfdfb27d96 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Sun Nov 23 00:00:00 2025 +0900
Chore: yarn audit configPull request ( commit 7aa2c457f83bb006b3f4391a9ec0fcaf3ce9bb94 (pull_request/cx-fn)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Mon Nov 24 00:00:00 2025 +0900
Feat: `cx.multiple()` for declare multiple classes #291Fast forwarding $ git push origin 7aa2c457f83bb006b3f4391a9ec0fcaf3ce9bb94:main
To https://github.com/mincho-js/mincho.git
e9ebbb2..7aa2c45 7aa2c457f83bb006b3f4391a9ec0fcaf3ce9bb94 -> main |
Description
Related Issue
cx.multipleclassname function #289Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.
Additional context
Checklist