Skip to content

feat: cx.with method #290#292

Merged
github-actions[bot] merged 5 commits intomainfrom
cx-fn
Jan 18, 2026
Merged

feat: cx.with method #290#292
github-actions[bot] merged 5 commits intomainfrom
cx-fn

Conversation

@black7375
Copy link
Contributor

@black7375 black7375 commented Jan 17, 2026

Description

implement cx.with method

Related Issue

Summary by CodeRabbit

  • New Features

    • Added cx.with() method for typed class name composition with transformer support.
  • Refactor

    • Enhanced class name type system with stricter primitive and composite type definitions.
    • Refined color token value interface with additional properties.
    • Narrowed public type exports for cleaner API surface.
  • Chores

    • Updated dependencies across packages including React, Vite, TypeScript, and tooling libraries.

✏️ Tip: You can customize this high-level summary in your review settings.

Additional context

Checklist

@changeset-bot
Copy link

changeset-bot bot commented Jan 17, 2026

⚠️ No Changeset found

Latest commit: fb4634c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Jan 17, 2026

📝 Walkthrough

Walkthrough

The PR updates dependencies across the monorepo to newer versions, adds a new cache path for the Vite config build output in GitHub Actions, and introduces significant changes to the CSS classname API by adding a new cx.with property and overhauling the type system with more granular type constraints.

Changes

Cohort / File(s) Summary
GitHub Actions & IDE Configuration
.github/actions/cache-dir/action.yml, .vscode/settings.json
Added default cache path for configs/vite-config-custom/dist; added spell-check dictionary words (Classable, Stringable, Valueable)
Root Package Scripts & DevDependencies
package.json
Modified task script to use yarn run -T; changed clean script operator; bumped devDependencies including turbo, vitest, prettier, @changesets packages, and type definitions
Configuration Package Dependencies
configs/eslint-config-custom/package.json
Updated @types/node, globals, prettier, yaml-eslint-parser to latest versions
Example Package Dependencies
examples/react-babel/package.json, examples/react-swc/package.json
Bumped react, react-dom, type definitions, @vitejs plugins, and globals to newer versions
Build Integration Package Dependencies
packages/esbuild/package.json, packages/integration/package.json, packages/vite/package.json
Updated esbuild, @vanilla-extract/integration, @vanilla-extract/esbuild-plugin, and @types/node dependencies
React Package Dependencies
packages/react/package.json
Updated react, react-dom, @types/react, and @types/react-dom to newer patch versions
CSS Classname API Overhaul
packages/css/src/classname/cx.ts, packages/css/src/classname/types.ts, packages/css/src/classname/index.ts, packages/css/src/index.ts
Introduced new cx.with property with typed constraints; completely redesigned type system with new primitive types (ClassStringable, ClassFalsy, ClassIgnored, ClassPrimitive), composite types (ClassToggle, generic ClassDictionary), and generic ClassValue; narrowed public exports to only ClassValue; refactored cxMultiple implementation
CSS Theme Types
packages/css/src/theme/types.ts
Expanded TokenColorValue interface with colorSpace, components, alpha, and hex properties; reformatted token definition interfaces
Type Formatting Updates
packages/react/src/index.ts, packages/transform-to-vanilla/src/transform.ts, packages/transform-to-vanilla/src/types/fontface-rule.ts, packages/transform-to-vanilla/src/types/style-rule.ts
Collapsed multi-line type constraints and interface extends clauses to single-line format without semantic changes

Possibly related PRs

Poem

🐰 A whisker-twitch of types so new,
With cx.with to constrain and construe,
ClassValue springs from primitive seed,
While versions bump to fill the need,
The classname realm now typed with care! ✨

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: cx.with method #290' is directly related to the main change: implementing a cx.with method. It is concise and clearly summarizes the primary feature being added.
Description check ✅ Passed The description includes required sections (Description, Related Issue) with appropriate content. The Description states 'implement cx.with method' and Related Issue references '#290'. However, Additional context and Checklist sections are empty, which are less critical.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

@github-actions
Copy link
Contributor

Triggered from #292 by @​black7375.

Checking if we can fast forward main (7aa2c45) to cx-fn (fb4634c).

Target branch (main):

commit 7aa2c457f83bb006b3f4391a9ec0fcaf3ce9bb94 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Mon Nov 24 00:00:00 2025 +0900

    Feat: `cx.multiple()` for declare multiple classes #291

Pull request (cx-fn):

commit fb4634c42ccfbdc3b82b24731c0e5d20c406c9c1 (pull_request/cx-fn)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Mon Dec 1 00:00:00 2025 +0900

    chore: bumpup dependency

It is possible to fast forward main (7aa2c45) to cx-fn (fb4634c). If you have write access to the target repository, you can add a comment with /fast-forward to fast forward main to cx-fn.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@configs/eslint-config-custom/package.json`:
- Around line 21-22: The upgrade to globals 17.0.0 split out the audioWorklet
environment which can break ESLint if your config implicitly relied on browser
globals; in the package.json where "@types/node" and "@typescript-eslint/parser"
are updated, verify your ESLint config (e.g., your shared config or .eslintrc)
explicitly enables the audioWorklet globals or declares them as readonly globals
(or adds the new "audioWorklet" env) instead of relying on "browser" alone, and
run lint to confirm no undefined-global errors; if you need to support older
setups, pin globals to a pre-17.x version or add explicit entries for
audioWorklet in the "globals" section of your ESLint config.
🧹 Nitpick comments (2)
packages/css/src/classname/cx.ts (2)

45-46: Consider guarding against inherited enumerable properties.

The for...in loop without hasOwnProperty check will iterate inherited enumerable properties. While this is typically safe with plain object literals, it could cause unexpected behavior if the input object has a modified prototype.

🔧 Optional: Use Object.keys or hasOwnProperty guard
 function cxMultiple<T extends ClassMultipleInput>(
   map: T
 ): ClassMultipleResult<T> {
   const result = {} as ClassMultipleResult<T>;

-  for (const key in map) {
-    result[key] = cxImpl(map[key]);
+  for (const key of Object.keys(map) as (keyof T)[]) {
+    result[key] = cxImpl(map[key]);
   }

   return result;
 }

68-69: Same inherited property concern applies here.

The for...in loop in cxWithMultiple has the same consideration as cxMultiple regarding inherited enumerable properties.

Comment on lines +21 to 22
"@types/node": "^25.0.5",
"@typescript-eslint/parser": "^8.46.2",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cd configs/eslint-config-custom && cat -n package.json

Repository: mincho-js/mincho

Length of output: 1150


🌐 Web query:

@types/node 25.0.5 release notes changelog breaking changes

💡 Result:

Short answer: There are no formal release notes/changelog entries published for @types/node patch releases (including 25.0.5). Changes are tracked in the DefinitelyTyped repo (commits/PRs for types/node), and users must inspect the commit/PR history for breaking/type changes. See DefinitelyTyped and the longstanding issue asking for a changelog. [1][2]

If you want, I can fetch the types/node commit/PR list that corresponds to the 25.0.5 publish and list the exact changes and any breaking edits. Which do you prefer?

Sources:

  • DefinitelyTyped repository (types/node). [1]
  • Issue asking where @types/node changelogs are located. [2]

🌐 Web query:

globals 17.0.0 release notes npm changelog

💡 Result:

Summary of globals v17.0.0 release (changelog / release notes)

  • Breaking

    • Split audioWorklet environment out from browser. [1]
  • Improvements

    • Updated globals data. [1]
    • Merge browser globals from both Chrome and Firefox sources. [1]
    • Added a bunBuiltin environment. [1]

Published as version 17.0.0 on the npm registry. [2]

Sources:
[1] globals v17.0.0 release notes (GitHub releases).
[2] globals package metadata on npm/jsDocs.


🌐 Web query:

prettier 3.7.4 release notes changelog breaking changes

💡 Result:

Summary — Prettier 3.7.4 (patch release)

  • Type: patch (no announced breaking changes). [1][2]
  • Notable fixes/changes:
    • LWC: avoid adding quotes around interpolations in markup (fix for cases where Prettier previously produced foo="{bar}" → now foo={bar}). [3][4]
    • TypeScript: fix duplicated comment when a comment appears inside a union type. [3]
    • Miscellaneous bugfixes and small changelog edits (see package changelog/commit). [2][5]

Sources

  • Prettier package listings / release metadata (v3.7.4). [1]
  • Source/commit notes showing the 3.7.4 release and changelog entries. [2][5]
  • Example changelog snippet showing LWC and TypeScript fixes. [3][4]

If you want, I can fetch the full CHANGELOG.md or the exact commit/PR links for each fix.


🌐 Web query:

yaml-eslint-parser 1.3.2 release notes changelog

💡 Result:

I couldn't find a dedicated "1.3.2" release entry, but sources show the package's latest published version is 1.3.2 and the repository includes a CHANGELOG.md you can check for release notes.

  • Version 1.3.2 (latest) — Snyk package page. [1]
  • Repository (contains CHANGELOG.md / project files) — ota-meshi/yaml-eslint-parser. [2]

If you want, I can open the repo CHANGELOG.md and extract the 1.3.2 entry for you.


Verify globals 17.0.0 breaking change doesn't affect your config.
The upgrade to globals 17.0.0 includes a breaking change: audioWorklet environment has been split out from the browser environment. If your ESLint config relies on browser globals (including audioWorklet), it will need adjustment.

Prettier 3.7.4 is a patch release with no breaking changes (TypeScript and LWC bugfixes only). @types/node and yaml-eslint-parser appear to be stable updates with no published compatibility concerns.

🤖 Prompt for AI Agents
In `@configs/eslint-config-custom/package.json` around lines 21 - 22, The upgrade
to globals 17.0.0 split out the audioWorklet environment which can break ESLint
if your config implicitly relied on browser globals; in the package.json where
"@types/node" and "@typescript-eslint/parser" are updated, verify your ESLint
config (e.g., your shared config or .eslintrc) explicitly enables the
audioWorklet globals or declares them as readonly globals (or adds the new
"audioWorklet" env) instead of relying on "browser" alone, and run lint to
confirm no undefined-global errors; if you need to support older setups, pin
globals to a pre-17.x version or add explicit entries for audioWorklet in the
"globals" section of your ESLint config.

@black7375
Copy link
Contributor Author

/fast-forward

@github-actions github-actions bot merged commit fb4634c into main Jan 18, 2026
12 checks passed
@github-actions
Copy link
Contributor

Triggered from #292 (comment) by @​black7375.

Trying to fast forward main (7aa2c45) to cx-fn (fb4634c).

Target branch (main):

commit 7aa2c457f83bb006b3f4391a9ec0fcaf3ce9bb94 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Mon Nov 24 00:00:00 2025 +0900

    Feat: `cx.multiple()` for declare multiple classes #291

Pull request (cx-fn):

commit fb4634c42ccfbdc3b82b24731c0e5d20c406c9c1 (pull_request/cx-fn)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Mon Dec 1 00:00:00 2025 +0900

    chore: bumpup dependency

Fast forwarding main (7aa2c45) to cx-fn (fb4634c).

$ git push origin fb4634c42ccfbdc3b82b24731c0e5d20c406c9c1:main
To https://github.com/mincho-js/mincho.git
   7aa2c45..fb4634c  fb4634c42ccfbdc3b82b24731c0e5d20c406c9c1 -> main

@github-actions github-actions bot deleted the cx-fn branch January 18, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant