Skip to content
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

refactor(deps): remove moment dep and usage #12611

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jan 20, 2024

  1. refactor(deps): remove moment dep and usage

    `moment` has been [deprecated since Sep 2020](https://momentjs.com/docs/#/-project-status/) and recommends using native `Intl` or newer libraries that make use of native `Intl`, such as `luxon` and `dayjs`
      - `moment` is also a very large dependency and hence is ripe for pruning and replacement as well
    
    - replace all usage of `moment` with regular `Date` functions
      - `valueOf()` works the same way for `Date` and `moment`
      - `diff` doesn't exist, but it's a one-liner helper
      - `format` doesn't exist, but we can also use a simple helper for that
    
    - shave off X kb by replacing ~15 LoC
    
    Signed-off-by: Anton Gilgur <[email protected]>
    agilgur5 committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    34678ed View commit details
    Browse the repository at this point in the history