compare-versions
compare-versions copied to clipboard
feat: use TypeScript
Due to inconsistencies in maintaining the CJS and ESM version of this package separately, we're moving to TypeScript to be able to build two identical output bundles. This should also keep types more in sync with code changes.
This PR is open to comments and reviews. Once tested more thoroughly it's expected to be released a v5.
Coverage remained the same at 100.0% when pulling c3bfab9345e0b874365ccf79462489d67bdd4277 on typescript into 01f5d9fa0fa3986ca7308c3bf5004a8aa5e26c9d on master.
I have this repo where I rewrote compare-versions in typescript. If you want to take any inspiration from it, feel free to use anything: https://github.com/jvanderen1/compare-versions
Would this PR still support commonjs? I like how https://github.com/jvanderen1/compare-versions keeps that support
I went ahead and published @jvanderen1/compare-versions!
Would this PR still support commonjs? I like how https://github.com/jvanderen1/compare-versions keeps that support
Yes, we intend to support CJS (through UMD) as well as ESM.