Socket
Socket
Sign inDemoInstall

babel-plugin-optimize-clsx

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-optimize-clsx - npm Package Versions

2

2.6.2

Diff

Changelog

Source

2.6.2 (2021-06-18)

Bug Fixes

  • clone callee when wrapping referenced objects (16eef18), closes #20
merceyz
published 2.6.1 •

Changelog

Source

2.6.1 (2020-06-20)

Bug Fixes

  • remove peerDependency on babel/core (744391d)
  • collectCalls: write CallExpressions to the cache dir (17405f5)
  • createlookup: handle optional member expression (1af84b2)

Build System

merceyz
published 2.6.0 •

Changelog

Source

2.6.0 (2020-02-15)

Features

  • referenced-objects: handle multiple references (14a2e97)
  • optimize referenced objects (20575e9)
  • optimize: handle unnecessary "or" statements (fcdb75e)
  • use scope to get expressions (68becac)

Bug Fixes

  • optimize: handle the operator changing (3e92ddb)
  • removecalls: remove unsafe optimization (b0deb61)

Performance Improvements

  • createlookup: modify node instead of recreating it (4800a6b)
  • createlookup: skip lookup for just one item (f8d089d)

Build System

merceyz
published 2.5.0 •

Changelog

Source

2.5.0 (2019-10-07)

Bug Fixes

  • combinestrings: set cooked value for templateelement (5e25580), closes #15
  • extract: handle spread and method properties (51c8ced)
  • optimize: handle ConditionalExpression in LogicalExpression (fa05e72)

Build System

  • deps: upgrade dependencies (cd02789)
  • improve terser output (11ca28b)
  • remove rollup-plugin-commonjs (b994f88)

Features

  • collectcalls: include the location of the code (1ab1eab)
merceyz
published 2.4.1 •

Changelog

Source

2.4.1 (2019-08-18)

Build System

merceyz
published 2.4.0 •

Changelog

Source

2.4.0 (2019-08-18)

Bug Fixes

  • helper: compare literals correctly (d728a45)
  • stripliterals: handle all falsy values (721af56)
  • stripliterals: handle empty template literals (1e9295c)
  • stripliterals: remove more unnecessary truthy values (98d2a9d)

Build System

  • deps: add babel-plugin-lodash (cd37d10)
  • deps-dev: bump husky from 3.0.0 to 3.0.2 (#3) (de0ff50)
  • deps-dev: bump rollup from 1.17.0 to 1.19.4 (#12) (0cb7b7e)
  • deps-dev: bump standard-version from 6.0.1 to 7.0.0 (#6) (e699d1d)

Features

Performance Improvements

  • helper: avoid unnecessary compares (a5f1312)
  • helper: compare type of nodes directly (41ff13f)
  • helper: use switch statement over if else chain (b2874ad)
  • track removed calls to avoid crawling the AST (28188a8)
  • proptypes: skip traversing child nodes (ec883af)
  • combine visitors (#8) (d6a9a62)
merceyz
published 2.3.0 •

Changelog

Source

2.3.0 (2019-07-18)

Bug Fixes

  • handle template and string literals correctly (f90ddaf)

Build System

  • rimraf dist before each build (d3f9f1f)

Features

  • removecalls: handle arrays (524fa51)
  • stripliterals: handle conditionalExpressions (18e35ba)
  • collect calls before optimizing (c2537e5)
  • combinestrings: support template literals (3d63596)
  • removecalls: handle template literal (7ccf15f)
  • stripliterals: remove empty strings (8672550)

Tests

  • stripliterals: improve coverage (8b5c717)
merceyz
published 2.2.0 •

Changelog

Source

2.2.0 (2019-05-31)

Features

  • createlookup: handle multiple checks (950dd82)
  • create object key lookups (0630c91)
  • combinestrings: handle strings in arrays (62c4ce9)
  • removecalls: handle nested conditional expressions (2110589)
  • removecalls: handle single logical expression (0c453b3)
  • removecalls: handle string and logical expression as argument (2b59da8)

Tests

merceyz
published 2.1.0 •

Changelog

Source

2.1.0 (2019-05-27)

Bug Fixes

  • proptypes: handle isRequired and default value (aa244e3)

Build System

  • use rollup, babel, and terser (29e730f)

Features

  • combine string literals (0bc7671)
  • remove unnecessary function calls (3ea3d85)
  • remove unused imports (8d2ae5f)
  • strip literals (f206424)
  • use proptypes to minimize expressions (300b006)
merceyz
published 2.0.0 •

Changelog

Source

2.0.0 (2019-05-21)

Bug Fixes

  • combine: don't create an arrayExpression with just one item (699d6f5)
  • extract: transform static keys into string literals (#2) (213ff5b)
  • helper: use count instead of total length (5ffec80)

Features

  • add support for creating conditional expressions (dab4b1a)
  • get function name from imports (#1) (0c18712)

Performance Improvements

  • combine: skip if argument length is less than 2 (2bc0714)

BREAKING CHANGES

  • No longer matches on all clsx and classnames function calls, instead looks for imports(and require) and uses the names specified there. If the file doesn't contain imports nothing will be done, to get the old behaviour back you can set the functionNames option to ['clsx', 'classnames']
2
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc