dmtrKovalenko / date-io

Abstraction over common javascript date management libraries
MIT License
719 stars 90 forks source link

chore(deps): bump date-fns to v3 #656

Closed frsimond closed 8 months ago

frsimond commented 8 months ago

I try here to solve #655 and support last version of date-fns with its breaking changes. I decided heer to keep a specific package for backwards compatibility. Not a fan of the resulting code duplication but it's a proposal.

dmtrKovalenko commented 8 months ago

I'm ok with duplication but we should probably bump the major version as well. Not sure for all of packages or not

frsimond commented 8 months ago

Ok. I totally agree that @date-io/date-fns should have a major version bump. I don't think we need to bump the version globally. Should I bump the version(s) myself in this PR ?

dmtrKovalenko commented 8 months ago

We can do that later, but what is requried right now it to ensure that the tests are running for both versions of date-fns and we have proper 100% coverage support

dmtrKovalenko commented 8 months ago

Sorry, why did you remove the date-fns-v2?

frsimond commented 8 months ago

Working on the tests, I decided to revert the date-fns-v2 because those have explicit reference to the date-fns package. And I dont know how to reference two different versions of the same dependency in the same file.

Furthermore, I think that keeping an old version might be overengineered if we do a major version bump on @date-io/date-fns

frsimond commented 8 months ago

@dmtrKovalenko do you think we should maintain a compatibility with date-fns v2 on master ? If so, we might have to change the structure of the repo a little bit to have package-specific tests files.

dmtrKovalenko commented 8 months ago

Thank you for contributation, I am going to merge this right and now and make another breaking changes that I wanted to make for a long time and will release a new version today