Skip to content

v0.6.0

Compare
Choose a tag to compare
@kazushisan kazushisan released this 23 Oct 05:54
· 409 commits to main since this release
0a1eda6

v0.6.0 introduces performance improvements!

Uses worker_threads for performance

ts-remove-unused now uses worker_threads to calculate edits for each file in parallel. Internally, the logic has been modified to calculate a dependency graph of files beforehand to delegate small tasks containing a subgraph of files to each worker.

image

(Tested on Macbook Pro 2021 – M1 Pro, 32GB)

The chart above shows the performance differences when ts-remove-unused is used for some examples. We can expect a 4x boost for large scale repositories like exclidraw.

breaking change: remove() is asynchronous

Due to this change, the remove() API will return a Promise. All parameters previously available will continue to work.

--experimental-recursive option

Some unused code may not be detected if it's a result of the modification of another file in the project. --experimental-recursive mode will detect files that need to be processed again due to an edit made by another file being processed and make sure that all unused code will be fixed/edited in one command.

Note that the recursive logic will result in a significantly longer execution time for large scale apps with lots of unused code. It's still in experimental phase and is not recommended for daily use.

What's Changed

🚀 Features

🧹 Chores

📖 Docs

Full Changelog: v0.5.2...v0.6.0