metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.44k stars 205 forks source link

Do not require timezone data directly for cljs #898

Closed dvingo closed 11 months ago

dvingo commented 1 year ago

When making a release cljs build I noticed js-joda was around 700kb and then realized the malli.experimental.time namespace was pulling in all historical timezone data. See the note at the bottom of the package for more info: https://www.npmjs.com/package/@js-joda/timezone using the +/- 5 year range adds ~30kb.

This change requires ClojureScript users of malli to include the timezone data of their choice explicitly.

I had to convert the zone-id-gen to a function due to ZoneId now not being available until runtime.

ikitommi commented 11 months ago

This makes sense. Thanks!!