date-fns / date-fns-upgrade

A tool for upgrading date-fns versions
8 stars 8 forks source link

chore(package): use wildcard version for 1.x/2.x isDate, typings, build script #12

Closed kamranayub closed 1 year ago

kamranayub commented 3 years ago

I'm using this package to help do a very large migration and I noticed that the only function being used is isDate from date-fns. However, we are actually looking at using date-fns 1.x and 2.x side-by-side using package aliasing to help do a granular migration but the problem is that this package will bring in date-fns 2.x even though there's no difference between behavior for isDate from v1 / v2, and there's an extra date-fns brought into the node_modules tree.

I'd have to dig into whether this impacts bundle size inadvertently but I don't see too much of an issue using a wildcard version if only depending on isDate.

Changes