Skip to content

Releases: hoangnhan2ka3/twg

v6.0.2

15 Sep 07:00
Compare
Choose a tag to compare

Added

  • Type TransformerOptions (previously ReplacerOptions) can now be imported from each entry point.

Refactor

  • Refactor all export statement to the end of files due to tsup dts export issue.
  • Fixed some misleading import statement.

Docs

  • Add Migration Guide to docs.
  • Add README.md to benchmark folder.
  • Add Types definition section to api.md.

Full Changelog: v6.0.1...v6.0.2

v6.0.1

14 Sep 18:31
Compare
Choose a tag to compare

Fixed

  • Fixed misleading src module on bundle.

Full Changelog: v6.0.0...v6.0.1

v6.0.0 🎉

14 Sep 18:23
Compare
Choose a tag to compare

Breaking change

  • Rename replacer() function to transformer().
  • Remove */replacer entry point, transformer() now is in the same entry point as twg(), also with createTwg() function. That means transformer() function will be combined/located in the same file with twg(), to take advantage of its API without rewrite it in another entry.

Core change

  • Deprecated reducer() and parser() functions because twg() can handle it now.
  • Change toVal() function's logic to handle mapping key with values process.
  • Add bigint to ClassValue type (related to this clsx issue).

Refactor

  • Change native object detecting convention from "🚀" to 1.
  • Refactor some JSDoc for functions and fix typo.
  • Delete unused bracket pair in combiner() function.
  • Refactor ClassValue import path to src/index in every entry point.

Chore

  • Bump @types/node version to v22.5.5.
  • Add benchmark with clsx.

Full Changelog: v5.0.11...v6.0.0

v5.0.11

13 Sep 19:25
Compare
Choose a tag to compare

Refactor

  • Refactor toVal() and createTwg() function's logic to use && instead of if statement.

Chore

  • Update JSDoc for toVal() and createTwg() function.

Full Changelog: v5.0.10...v5.0.11

v5.0.10

13 Sep 17:24
Compare
Choose a tag to compare

Docs

  • Update Version comparison table.
  • Update bundle size section in docs.

Chore

  • Remove unused console.log in transformer() function of extend version.

Full Changelog: v5.0.9...v5.0.10

v5.0.9

13 Sep 16:47
Compare
Choose a tag to compare

Core change

  • Remove unused !innerPath.node.shorthand condition in both extend and extend/lite version.
  • Better handling nestingCallee option in extend version.

Refactor

  • Refactor toVal() function logic in extend version.
  • Make reducer() function's filter more concise.

Chore

  • Bump pnpm version to 9.10.0.
  • Update pnpm-lock.yaml.
  • Add more default test cases for twg() and replacer() function.

Full Changelog: v5.0.8...v5.0.9

v5.0.8

13 Sep 15:06
Compare
Choose a tag to compare

Refactor

  • Import exactly what is needed from @babel in ast.ts to improve tree-shaking.

Full Changelog: v5.0.7...v5.0.8

v5.0.7

13 Sep 05:18
Compare
Choose a tag to compare

Docs

  • Sync npm README.md with GitHub README.md.

Chore

  • Bump terser and other dev dependencies version.
  • Update tests for compatibility with [email protected].

Full Changelog: v5.0.6...v5.0.7

v5.0.6

08 Sep 14:28
Compare
Choose a tag to compare

Docs

  • Update twg thumbnail image.
  • Update twg logo in the start of every docs.

Chore

  • Update twg logo in the start of every markdown file.

v5.0.5

07 Sep 18:17
Compare
Choose a tag to compare

Core change

  • Added conditions to remove the path in case the key in ObjectProperty is not Identifier and StringLiteral for extend version.

Chore

  • Add more test cases for extend version.

Full Changelog: v5.0.4...v5.0.5