[
https://issues.apache.org/jira/browse/METRON-1796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639950#comment-16639950
]
ASF GitHub Bot commented on METRON-1796:
----------------------------------------
Github user nickwallen commented on a diff in the pull request:
https://github.com/apache/metron/pull/1219#discussion_r223045213
--- Diff: metron-interface/metron-alerts/package.json ---
@@ -22,17 +22,17 @@
"@angular/platform-browser": "^6.1.6",
"@angular/platform-browser-dynamic": "^6.1.6",
"@angular/router": "^6.1.6",
+ "@ruffle1986/pikaday-time": "^1.6.1",
"@types/bootstrap": "^4.1.1",
"@types/jquery": "^3.3.4",
"ace-builds": "^1.2.6",
"ajv": "^6.5.1",
"angular-confirmation-popover": "^4.2.0",
"bootstrap": "4.0.0-alpha.6",
"core-js": "^2.4.1",
+ "date-fns": "^1.29.0",
"font-awesome": "^4.7.0",
- "moment": "^2.22.2",
"ng2-dragula": "^1.5.0",
- "pikaday-time": "^1.6.1",
--- End diff --
Is this a fair statement of the facts? I want to make sure I understand.
* The [@owenmean/pikeday](https://github.com/owenmead/pikaday) dependency
is not a new dependency for us
* [@owenmean/pikeday](https://github.com/owenmead/pikaday) is a fork of a
popular library called [pikaday](https://github.com/dbushell/Pikaday) that has
some enhancements we use
* [@owenmean/pikeday](https://github.com/owenmead/pikaday) is a deprecated
library that is no longer maintained
* The only reason we had to touch the
[@owenmean/pikeday](https://github.com/owenmead/pikaday) dependency is because
it pulls in MomentJS
* There are only two ways to exclude MomentJS from being pulled in by
[@owenmean/pikeday](https://github.com/owenmead/pikaday)
* Option 1: Find a long-term replacement for
[@owenmean/pikeday](https://github.com/owenmead/pikaday) that has broader
community support
* Option 2: Directly forking it to
[@ruffle1986/pikaday-time](https://github.com/ruffle1986/pikaday) and excluding
MomentJS
* As part of this PR you chose to go with option 2, favoring expediency.
* You think we should do option 1 (find a long-term replacement for
[@owenmean/pikeday](https://github.com/owenmead/pikaday)) as a separate,
follow-on PR.
> [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)