manuelmhtr / countries-and-timezones

Minimalistic library to work with countries and timezones data
MIT License
224 stars 67 forks source link

v2.1.2: Fixes TS constants declarations. #40

Closed manuelmhtr closed 2 years ago

manuelmhtr commented 2 years ago

Another proposal to close This is a temporary solution to https://github.com/manuelmhtr/countries-and-timezones/issues/38

manuelmhtr commented 2 years ago

Hi @kherock @benj-dobs About https://github.com/manuelmhtr/countries-and-timezones/pull/39, I also think it's important to keep the CountryCode and TimezoneName types.

I came with this workaround to modify the .d.ts file after being exported by Rollup. It's not the cleanest solution but it might work while rollup-plugin-dts plugin gets improved.

Do you think it may work? Am I missing something?

benj-dobs commented 2 years ago

This seems like a pretty good (hopefully temporary) workaround in my opinion - it lets us get a fix out quickly without breaking any existing integrations. @kherock's suggestion of patching rollup-plugin-dts would be neater in the long run.

manuelmhtr commented 2 years ago

Ok, then I propose the next plan:

  1. I'll merge this PR as a temporary solution.
  2. @benj-dobs is there any from https://github.com/manuelmhtr/countries-and-timezones/pull/39 that you think we need to add? Maybe the change in include?
  3. Once the change in rollup-plugin-dts is ready, remove this solution.