Skip to content

Update dependency clsx to v2

Renovate requested to merge renovate/clsx-2.x into main

This MR contains the following updates:

Package Type Update Change
clsx dependencies major ^1.2.1 -> ^2.0.0

Release Notes

lukeed/clsx (clsx)

v2.1.1

Compare Source

Patches

Chores

  • Add licenses.dev badge: 684509c This service recursively analyzes entire dependency graphs to ensure that a package (or your project) is using permissive licenses. For example, here's a results table for polka@next and a larger astro example.

Full Changelog: https://github.com/lukeed/clsx/compare/v2.1.0...v2.1.1

v2.1.0

Compare Source

Features

  • Add new clsx/lite submodule for string-only usage: 1a49142

    This is a 140b version of clsx that is ideal for Tailwind and/or React contexts, which typically follow this clsx usage pattern:

    clsx('foo bar', props.maybe && 'conditional classes', props.className);

    Important: This clsx/lite module ignores all non-string arguments and is therefore not a 1:1 replacement for clsx itself!

    import { clsx } from 'clsx';
    import { clsx as lite } from 'clsx/lite';
    
    // strings-only usage is identical
    clsx('foo', null, 'bar', true && 'baz'); //=> "foo bar baz"
    lite('foo', null, 'bar', true && 'baz'); //=> "foo bar baz"
    
    // clsx/lite ignores all non-strings
    clsx('foo', { a: true, b: false, c: true }); //=> "foo a c"
    lite('foo', { a: true, b: false, c: true }); //=> "foo"

Full Changelog: https://github.com/lukeed/clsx/compare/v2.0.1...v2.1.0

v2.0.1

Compare Source

Patches

  • (perf) Cache arguments.length & array.length for 6% performance gain (#​26): deff09b Adds 5 bytes (+2%) for ~3% avg performance gain Thank you @​jalalazimi

Chores


Full Changelog: https://github.com/lukeed/clsx/compare/v2.0.0...v2.0.1

v2.0.0

Compare Source

Breaking

  • Add "exports" map for native ESM support (#​57): 3ec8e9f, 0949868 Also supports TypeScript's node16/nodenext module resolution Maintains CommonJS support (with fixed TS definitions) Thank you @​remcohaszing~!

Chores


Full Changelog: https://github.com/lukeed/clsx/compare/v1.2.1...v2.0.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Merge request reports