-
Notifications
You must be signed in to change notification settings - Fork 2.3k
WIP: Replace moment with luxon #1327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Replace moment with luxon #1327
Conversation
luxon has an immutable API and that's better anyways
Shouldn't most of these changes be in For example, rather than removing Or is the plan to drop support for moment? |
If you add luxon support alongside moment, yes, but when I replace moment I need to change all the examples, which contain userland code :)
That's a good suggestion, thanks.
I tried to probe what is desired in previous issues/pull request, but feel I got no definitive answer, so my plan currently is to drop moment entirely, yes. Mostly because it's easier, we only need to bump the major version. A preview version can be published under a Does that make sense? |
Fine by me. 😃 It will be a major breaking change, but at CCAP we're handling most conversions to/from moment in a single place, which should be relatively easy to switch to luxon. I don't know how common that is though. How long would we expect to maintain a 1.x branch while users transition? |
I don't have experience running a popular library, so I don't really know what a time frame would be. 3–6 months of backporting bugfixes, but not adding features feels alright to me. Maybe we could release a codemod to make the transition easier? The necessary changes are mainly mechanic, subtle differences exist though. |
I have no clear picture of the usage of Luxon vs Moment currently but would it be an idea to implement it in a way that we can run Luxon next to moment? Giving the users the flexibility to use whatever library they want to use (Luxon, Moment, Pure JS dates, etc.) Another route would be to remove moment altogether (something like #1059). |
If NPM download stats are worth anything, moment is ~240x as popular 🙃
I mean yeah, that technically works and sounds nice, but there are a couple of things to consider:
Personally I think that's too much, but it's up to you to decide I guess. I'm fine with whatever decision you make :) |
My two cents (with barely 5 minutes of library usage):
I'd leave out everything else for users to implement. Although I haven't worked with |
Id definitely be on the Raw JS dates bandwagon. I hate including extra libraries where I van avoid it. and ES6/7 makes working with most things in vanilla js pretty simple compared to how it used to be. Id be happy to help out if someone has something specific that needs work |
Moment was removed in #1527. |
Hi, this is work-in-progress. I just wanted to get the ball rolling on #1283 / #382 and prevent someone else from doing duplicate work. Is there a
dev
branch or similar? I wouldn't want to merge this in master.Plan:
date_utils
to work with that and make its tests passdo separatelyI actually need this to test code correctness)prettier
config is different, oopscloneDate