Read the statement by Michael Teeuw here.
Any plan to replace "request" and "moment"?
-
Is there any plan to migrate away from “request” and “moment”?
https://github.com/request/request/issues/3142
https://github.com/moment/moment#project-statusThanks :)
-
-
I think we should open an issue in the github repo to discuss the
moment
stuff there, if it should be replaced and with what. Found this article.In the current mm release 2.16.0
request
is still a dev dependency but it is now totally removed on thedevelop
branch (and so in the next release). -
My concern as a module handler that has two modules that currently use Moment, how do I switch, either now or later?
-
@bkeyport now, and later, use the new library in your module and add it to your package.json.
then if the system provides it npm install will say ‘done’
and if the system doesn’t, then it will load it for your module… -
@sdetweil Just a question from myself, is there a preference from the platform side on what to use to replace request? I have just updated my module to use node-fetch. Are there preferences from the MMM platform side?
-
-
@sdetweil Thanks Sam. Yeah, I saw there are a few replacements for request. I had a look at axios previously as well.
-
@mumblebaj there are many options. I am planning to replace all with node-fetch (https://github.com/node-fetch/node-fetch), and concerning moment, I think I’d go for date-fns: https://date-fns.org/
-
@sdetweil ah, I had an old version that still included “request”. ID’ migrate my modules over to node-fetch!
About moment, I’d recommend taking a look at date-fns, many are moving over to it to replace moment - even tho the refactoring effort may not be trivial, the advantages seem to be more (including the smaller size of the final bundle)!