sindresorhus / ora

Elegant terminal spinner
MIT License
9.08k stars 269 forks source link

Improve performance of the `.clear()` method #182

Closed G-Rath closed 3 years ago

G-Rath commented 3 years ago

Rebasing of #171 with tests cherry picked across

Closes #171 Closes #170

sindresorhus commented 3 years ago

Thanks :)

G-Rath commented 3 years ago

@sindresorhus I figure the answer will be "No" but have to ask: is there anyway of getting a v5/commonjs release of this? I like that you're pushing the industry towards faster adoption of ESM and think that's a good thing, but currently I'm not able to do it myself yet due to being very time-limited (+ jest not having good enough support for ESM yet, which feeds into time because I can't consider moving to other libraries right now as it's what we use at work).

I wouldn't expect to have any further versions on v5 afterwards, but this one is something of a game-changer for our Windows users since currently it's a very flashy experience and I've not been able to find any strong alternatives that don't either have this same flaw or others.

I'd be happy to do as much of the work as possible to make it as easy for you as possible :)

sindresorhus commented 3 years ago

I don't have any plans to backport. It's not only because of ESM, but also because every change to the rendering risks breaking someone's use-case and I prefer to only have this change in a major release. This is also not a a critical change. Windows users have been seeing flickering for years and have not done anything about it until now. Windows users in general are also used to a worse experience (slower terminal, less compatible with tools, missing Unicode support, etc).