parser icon indicating copy to clipboard operation
parser copied to clipboard

fix: replace moment with dayjs

Open touchRED opened this issue 2 years ago • 4 comments
trafficstars

#731

Replaces Moment with DayJS, a 2kb library with an almost identical API.

Note:

  • DayJS doesn't ship with an equivalent to Moment's parseFormat method used here. I'm not quite sure how long it could take to recreate this method, and I don't believe the moment-parseformat plugin can function without Moment installed. Thoughts?

touchRED avatar Mar 21 '23 19:03 touchRED

Nice! There are tons of examples of real-world timestamps in the fixture files which we can test here as well. I think the best we can aim for here is an equal success rate against all those timestamps to what we were getting with moment.

johnholdun avatar Mar 21 '23 19:03 johnholdun

@johnholdun yep i'm running through all the tests now, realized moment was called in more of those than I expected. More to come!

touchRED avatar Mar 21 '23 19:03 touchRED

@johnholdun clearly the updates we spoke about last week took significantly longer than I expected! Now that test-node is passing I'm going to clean things up, leave comments, etc. Question for you: in order to get test-web to pass, do I need to run yarn release and push up new dist files?

touchRED avatar Mar 29 '23 17:03 touchRED

Hey is this issue still be worked on?

appinteractive avatar Mar 01 '24 10:03 appinteractive