vvo / tzdb

🕰 Simplified, grouped and always up to date list of time zones, with major cities
MIT License
776 stars 54 forks source link

refactor: remove luxon from prod dependencies #219

Closed eblokhin closed 2 years ago

eblokhin commented 3 years ago

In my own project i've faced the problem when bundle had two versions of luxon (1.26 and 2). 1.26 came from this lib. Then i've found an open issue https://github.com/vvo/tzdb/issues/79 on the matter. So this PR's purpose is to remove luxon from production dependencies completely in favor of native Intl implementation.

I've checked how time zones are handled in luxon and decided not to reinvent the wheel. I've cloned some methods from it to get the same functionality, keep all the edge cases handled and avoid introducing new bugs. All cloned code is in utils/timeZones.js.

vvo commented 2 years ago

:tada: This PR is included in version 6.20.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

vvo commented 2 years ago

Hi @eblokhin. Thanks so much for sending this PR. I modified it a bit to add the license + linting and then merged it.

Awesome work :)