lego icon indicating copy to clipboard operation
lego copied to clipboard

Replace `moment` with `luxon`

Open ivarnakken opened this issue 3 years ago • 1 comments

There's a bunch of problems with moment, e.g. being mutable and not having native timezone support. These are causing security vulnerability issues, and given that the project has been designated a legacy project by its maintainers in 2020, it should for obvious reasons be replaced.

luxon was created by some of the moment developers, and serves to be a better replacement and the worthy successor. It has been in development for some time now, and I think it is ready (but more investigation should preferably be given).

Since this would require a ton of (relatively easy) work with huge caution, I'll label this as a hard issue.

ivarnakken avatar Aug 25 '22 09:08 ivarnakken

I've heard good things about date-fns, and I know there are multiple other alternatives. It might be worth doing a bit of research into different libraries before doing a lot of work on this.

But we should definitely replace moment, it's also a huge library and not tree-shakable so it adds a lot to our bundle size.

eikhr avatar Aug 25 '22 09:08 eikhr