metron-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (METRON-1796) [UI] Migrate off moment.js
Date Wed, 03 Oct 2018 13:52:00 GMT


ASF GitHub Bot commented on METRON-1796:

Github user ruffle1986 commented on a diff in the pull request:
    --- Diff: metron-interface/metron-alerts/package.json ---
    @@ -46,9 +46,7 @@
         "@types/ace": "0.0.32",
         "@types/es6-promise": "0.0.33",
         "@types/jasmine": "2.5.38",
    -    "@types/moment": "^2.13.0",
         "@types/node": "~6.0.60",
    -    "@types/pikaday-time": "^1.4.2",
    --- End diff --
    The reason why I removed this is because moment.js is the dependency of this to make it
able to add the type `moment` to the return value of the `getMoment` method. Therefore moment.js
has to be inside the node_modules folder but we wan't to avoid it to be there. 
    I don't see any benefits of having the type definitions of pikaday-time in the code base.

> [UI] Migrate off moment.js
> --------------------------
>                 Key: METRON-1796
>                 URL:
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Tamas Fodor
>            Assignee: Tamas Fodor
>            Priority: Minor
> Remove Moment.js and replace with another smaller library.
> Moment.js requires us to import the entire library vs. a few necessary modules.
> Moment.js can prevent bundlers from supporting tree-shaking.
> By removing Moment.js, we can decrease our overall bundle size and prevent issues with
tree-shaking in the future.
> Here you can find the discussion on the mailing list:

This message was sent by Atlassian JIRA

View raw message