• EnderMB@lemmy.world
    link
    fedilink
    arrow-up
    176
    ·
    1 year ago

    I’ve honestly never understood why someone at Google or Mozilla hasn’t decided to write a JavaScript Standard Library.

    I’m not opposed to NPM, because dumb shit like this happens everywhere. If such a package is used millions of times a day, perhaps it would make sense to standardise it and have it as part of the fucking browser or node runtime…

    • DefederateLemmyMl@feddit.nl
      link
      fedilink
      arrow-up
      48
      arrow-down
      2
      ·
      1 year ago

      I’ve honestly never understood why someone at Google or Mozilla hasn’t decided to write a JavaScript Standard Library.

    • seatwiggy@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      23
      ·
      1 year ago

      There’s a js runtime called bun that is 90-something% feature equivalent to node and also has built in alternatives to many packages like express and bcrypt. I haven’t used it myself so I can’t speak to its quality but it’s always nice to see a little competition

      • Dr. Moose@lemmy.world
        link
        fedilink
        English
        arrow-up
        16
        ·
        1 year ago

        So is Deno! You can easily import npm: and node: packages and run typescript without transpiling. With Bun and Deno there’s no reason to use Node tbh.

        • sfxrlz@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          1 year ago

          For starting new projects i absolut agree. At work we have a legacy react app that just will not run on bun and for deno we would probably have to rewrite some stuff.

          • Dr. Moose@lemmy.world
            link
            fedilink
            English
            arrow-up
            5
            ·
            1 year ago

            I’ve updated some legacy nodejs to Deno recently and it’s actually not bad! If you’re using serverless Denoflare is super convenient and DTN is a tool for building Deno to NPM (both esm and commonjs) so you can have easy backwards compatibility if needed, it even shims all of the Deno standard lib.

            It’s really impressive what Deno and Bun people have done - for the first time I actually somewhat enjoy server side JS!

            • sfxrlz@lemmy.world
              link
              fedilink
              arrow-up
              3
              ·
              1 year ago

              That sounds neat. For our nodejs server this could be done without too much effort. Will keep that in mind, thanks. But I also have to check for the cra app we’re having a lot of issues with.

      • oortjunk@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        1 year ago

        Bun is used by us in production, in dev, everywhere. It’s great. We don’t even use (p)npm to build js packages on our docker images for apps anymore.

    • rimjob_rainer@discuss.tchncs.de
      link
      fedilink
      arrow-up
      28
      arrow-down
      6
      ·
      1 year ago

      I wish they would replace JavaScript with something that was made for what it’s used for. JavaScript should have died years ago.

    • mindbleach@sh.itjust.works
      link
      fedilink
      arrow-up
      19
      ·
      1 year ago

      That’s basically how Javascript gets extended. I put off learning jQuery for so long that all the features I’d want are now standard.