• fizzle@quokk.au
    link
    fedilink
    English
    arrow-up
    3
    ·
    17 小时前

    Is there another nodejs alternative that supports typescript in a similar way?

    • Kissaki@programming.dev
      link
      fedilink
      English
      arrow-up
      11
      ·
      17 小时前

      Does Deno fit your needs? It is also a drop-in replacement to a large degree, but is somewhat focused on improving the related tooling environment.

      I’m not very involved in the (non-browser) JS ecosystem, but it’s my tool of choice.

      • lorty@lemmy.ml
        link
        fedilink
        arrow-up
        6
        ·
        12 小时前

        I second Deno. Did a few small projects with it and I have no complaints.

      • moonpiedumplings@programming.dev
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        13 小时前

        Deno is pretty interesting because it has built in sandboxing. By default, no code can even access the network. Everything must be explicitly allowed, including network access and environment variables: https://docs.deno.com/runtime/fundamentals/security/

        Access can be scoped pretty granularly as well, only allowing access to specific websites or env variables.

        I really like this model since it offers a strong protection against secrets stealers, which have hit NPM extremely frequently. No more of malicious NPM packages scraping the whole system to find secrets.

        It does have a performance tradeoff compared to Bun. Bun is (was?) the fastest, Node was the slowest, Deno was in the middle.

      • fizzle@quokk.au
        link
        fedilink
        English
        arrow-up
        2
        ·
        16 小时前

        This looks nice actually. I can’t remember but I think there was some disadvantage compared to bun.