nosir / cleave.js

Format input text content when you are typing...
http://nosir.github.io/cleave.js
Apache License 2.0
17.96k stars 1.62k forks source link

🔔 [Announcement from the creator]: Deprecated and New Start #723

Open nosir opened 11 months ago

nosir commented 11 months ago

Hi everyone,

As you may have noticed, this repo has not been updated for a while.

Firstly, I'd extend my apologies for the lack of updates and improvements. There have been personal circumstances that have impacted my ability to maintain this, that I don't wish to talk about that too much. The other challenges have been stemming from the project itself.

The code was originally written using a JavaScript pattern that is almost 15 years old, and the design has so many inherent flaws. Specifically, the implementation wrapped all the DOM manipulation together in the repo with all the formatting functions. This has been a significant obstacle and has resulted in numerous issues while trying to maintain the library.

E.g. Integrating this with other libraries like ReactJS, Angular, Vue, Ember, and keep updating with all the new releases has been extremely hard, and I'm sure this is not the right path for this lib. Fixing the cursor moving issue has been another problematic area due to the input field being constantly modified in the lifecycle, causing the cursor fixing logic to be scattered everywhere, every time someone touches one piece, submitted a PR, it breaks another part.

Given these challenges, I felt it increasingly counterproductive to continue working on the old version and patching it with more and more temporary fixes.

TLDR; So what's happening now for this library?

I've started a new zen version of cleave, and have migrated most part of the library to it: cleave-zen There are some key changes:

It's already published to NPM if you're keen to play around with it, the basic usage for credit card formatting as in ReactJS TypeScript project will be something like this:

Looking ahead, I plan to:

I can't promise anything, sadly promises are often easier made than kept in life, so again I truly appreciate your understanding, and hope to keep delivering a more versatile version of the lib with cleave-zen.

Best Max