palantir / blueprint

A React-based UI toolkit for the web
https://blueprintjs.com/
Apache License 2.0
20.5k stars 2.15k forks source link

Upgrade to date-fns v3 #6744

Open justinbhopper opened 3 months ago

justinbhopper commented 3 months ago

Feature request

BlueprintJS is currently using date-fns v2, which had a big issue of polluting the global namespace with their TypeScript definitions. This causes conflicts with anyone consuming date-fns v2 or any library including it as a dependency (e.g. BlueprintJS). I can give examples of side effects if that helps decide priority.

This pollution is unavoidable. It's impossible to tell TypeScript to ignore their definitions.

date-fns fixed this in v3 (3 months ago). It would be great if BlueprintJS could upgrade to latest!

adidahiya commented 3 months ago

Blueprint could not upgrade to date-fns v3 for the past few months because date-fns-tz was incompatible with v3. However, it looks like a PR to bump to v3 in date-fns-tz just merged very recently: https://github.com/marnusw/date-fns-tz/pull/265

So it should be possible to upgrade Blueprint to date-fns v3 after date-fns-tz releases its next stable major version.

ericjeney commented 2 months ago

date-fns-tz v3.0.0 has released: https://github.com/marnusw/date-fns-tz/releases/tag/v3.0.0