• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Any plan to replace "request" and "moment"?

Scheduled Pinned Locked Moved Unsolved Feature Requests
61 Posts 8 Posters 21.7k Views 8 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 0 Offline
    0m4r Module Developer
    last edited by 0m4r Aug 22, 2021, 2:52 PM Aug 22, 2021, 2:49 PM

    Is there any plan to migrate away from “request” and “moment”?

    https://github.com/request/request/issues/3142
    https://github.com/moment/moment#project-status

    Thanks :)

    https://github.com/0m4r

    S K 0 3 Replies Last reply Aug 22, 2021, 2:57 PM Reply Quote 1
    • S Offline
      sdetweil @0m4r
      last edited by sdetweil Aug 22, 2021, 2:57 PM Aug 22, 2021, 2:57 PM

      @0m4r we have already moved away from request… it was removed in 2.16

      I hadn’t seen moment status
      I think we moved to moment.tz in calendar

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • K Offline
        karsten13 @0m4r
        last edited by Aug 22, 2021, 6:53 PM

        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 the develop branch (and so in the next release).

        0 1 Reply Last reply Aug 29, 2021, 8:26 AM Reply Quote 1
        • B Online
          BKeyport Module Developer
          last edited by Aug 23, 2021, 2:21 AM

          My concern as a module handler that has two modules that currently use Moment, how do I switch, either now or later?

          The "E" in "Javascript" stands for "Easy"

          S C 2 Replies Last reply Aug 23, 2021, 2:42 AM Reply Quote 0
          • S Offline
            sdetweil @BKeyport
            last edited by Aug 23, 2021, 2:42 AM

            @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…

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            M 1 Reply Last reply Aug 23, 2021, 11:41 AM Reply Quote 2
            • M Offline
              mumblebaj Module Developer @sdetweil
              last edited by Aug 23, 2021, 11:41 AM

              @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?

              Check out my modules at: https://github.com/mumblebaj?tab=repositories

              S 0 2 Replies Last reply Aug 23, 2021, 11:45 AM Reply Quote 0
              • S Offline
                sdetweil @mumblebaj
                last edited by Aug 23, 2021, 11:45 AM

                @mumblebaj no preference…

                I use axios

                see this list
                https://github.com/request/request/issues/3143

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                M 1 Reply Last reply Aug 23, 2021, 11:49 AM Reply Quote 1
                • M Offline
                  mumblebaj Module Developer @sdetweil
                  last edited by Aug 23, 2021, 11:49 AM

                  @sdetweil Thanks Sam. Yeah, I saw there are a few replacements for request. I had a look at axios previously as well.

                  Check out my modules at: https://github.com/mumblebaj?tab=repositories

                  1 Reply Last reply Reply Quote 0
                  • 0 Offline
                    0m4r Module Developer @mumblebaj
                    last edited by Aug 29, 2021, 8:15 AM

                    @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/

                    https://github.com/0m4r

                    1 Reply Last reply Reply Quote 0
                    • 0 Offline
                      0m4r Module Developer @0m4r
                      last edited by Aug 29, 2021, 8:24 AM

                      @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)!

                      https://github.com/0m4r

                      B 1 Reply Last reply Aug 30, 2021, 3:21 AM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 7
                      • 1 / 7
                      1 / 7
                      • First post
                        1/61
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy