[
https://issues.apache.org/jira/browse/METRON-1796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16636992#comment-16636992
]
ASF GitHub Bot commented on METRON-1796:
----------------------------------------
Github user ruffle1986 commented on a diff in the pull request:
https://github.com/apache/metron/pull/1219#discussion_r222315533
--- 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: https://issues.apache.org/jira/browse/METRON-1796
> 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:
> https://lists.apache.org/thread.html/2e4fafa4256ce14ebcd4433420974e24962884204418ade51f0e3bfb@%3Cdev.metron.apache.org%3E
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)