clsx
2.1.1 · 23 Apr 2024MIT179.1M / weekRepositoryHomepagenpmAtom feed
Upgrading clsx From 1.0.1 to 2.1.1
11 releases in betweenevery note read
- 2
- changes to make
- 0
- advisories fixed
- 4
- new
- 10
- fixes
Before you upgrade
Tick each one off as you go- Breaking2.0.0
- Breaking1.1.0
Release by release
- Fixed
(types) Include
bigintinClassValuetype: (#96): 3d960ab Accommodates recent@types/reactchanges toReactNode. Thank you @ViliamKopecky~!
- Fixed
- New
Add new
clsx/litesubmodule forstring-only usage: 1a49142
- New
- Fixed
(perf) Cache
arguments.length&array.lengthfor 6% performance gain (#26): deff09b Adds 5 bytes (+2%) for ~3% avg performance gain Thank you @jalalazimi
- Fixed
- Breaking
Add
"exports"map for native ESM support (#57): 3ec8e9f, 0949868 Also supports TypeScript'snode16/nodenextmodule resolution Maintains CommonJS support (with fixed TS definitions) Thank you @remcohaszing~!
- Breaking
- Fixed
Ensure CommonJS and UMD entrypoints have the named
clsxexport too
- Fixed
- New
Add named
clsxexport alias (#43, #44): 56ab81f Thank you @danikaze~! This is purely an alias for the default export so that TypeScript users can avoid theesModuleInteropsetting. In other words, the followimportstatements are effectively identical, but the latter is preferred by TypeScript:
- New
- New
Guard all
toValcalls with truthy assertions: 4fa8811, 019ec02 - New
Reorder
typeofchecks for common case: 08a5a7f - Fixed
Remove needless spacer on string/number condition: ff11464
- Fixed
Remove unnecessary recursive caller for object keys: f43dd23
- New
- Breaking
Important: Because of this change, Internet Explorer 8 (and older) are no longer supported.If you happen to require support for these browsers, please continue to use the
1.0.xversion range. - Fixed
Use
Array.isArrayfor properArraytype-checking (#17): 0d6023a
- Breaking
26 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.