1. 25
    1. 11

      I get the reason for this, but am a little bummed. Deno was a great chance to step away from the tirefire of the NPM/node ecosystem and start fresh.

      We want Deno to be accessible and solve people’s problems

      …so they have decided to reintroduce all of the problems of the packages on NPM. T_T

      I know it’s a little heavy-handed, but forcing people to bring over the stuff they actually care about to a better language (Typescript) is maybe the right answer.

      1. 10

        Deno was a great chance to step away from the tirefire of the NPM/node ecosystem and start fresh.

        Those systems never get used at dayjobs, and never provide an upgrade path for people trying to get off the legacy platform.

        You need an upgrade path from the old thing to become dominant.

      2. 3

        I agree. There is simply so much crap on npm that nuking it and forging a new path appears the preferable option - I suppose a lack of meaningful uptake due to reliance on npm packages forces this, but still, it is a disappointment.

        1. 2

          I suppose nothing forces to use that when you don’t need it. But it might be handy for when it is required to get a job done fast.

      3. 2

        I dunno, not having a package management story at all is its own tire fire waiting to happen.

        1. 1

          What do you mean by package management story?

          1. 1

            As of now Deno has no package manager and unsafe defaults for third party dependencies, including resolution (via DNS!) and linking at runtime. NPM at least locks dependency versions by default and offers protection against takeover attacks in addition to offering a way to automate dependency updates.

            Whatever problems exist with NPM aren’t solved by going backwards in time instead.

    2. 6

      Seems like all the hype about bun.sh’s speed got them worried. I would imagine they were planning on working on the performance, but sounds like it got kicked into gear:

      We know there’s been a lot of chatter recently about runtime speed. Competition is good for the ecosystem!

    3. 4

      We’ve been working on some updates that will allow Deno to easily import npm packages and make the vast majority of npm packages work in Deno within the next three months.

      On the one hand, good on them for recognizing a major limitation and doing something about it. On the other hand…

      import express from "npm:express@5";

      This syntax introduces yet another module resolution algorithm in addition to and incompatible with the ones that already exist in:

      • The browser spec
      • Node
      • webpack, Vite, and other bundlers and build tools
      • The TypeScript language server

      I’m sure they’d like to avoid reinventing package.json, but it seems like there ought to be someplace outside of the source where package installations can be managed instead of hacking npm into the module name.

      1. 5

        I don’t see it THAT bad… it builds on the same logic as the node:xxx modules in Node.js. That is the closest to a standard in regard to backend JavaScript.

      2. 3

        but it seems like there ought to be someplace outside of the source where package installations can be managed

        I agree 100%. But that’s sort of a fundamental issue with Deno’s whole approach. In reality, it’s extremely useful to use abstract package names in the source and provide a mapping between abstract package name and concrete package implementation externally. Deno’s (and Go’s) rejection of that idea is unfortunate imo. Go has mostly reversed their direction, where the import URLs are now abstract package identifiers which are resolved using go.mod; maybe Deno should do the same.

        1. 2

          Deno does have a go.mod equivalent: https://deno.land/manual/linking_to_external_code/import_maps

          (This is a standard and was not invented by Deno. https://wicg.github.io/import-maps/)

          As well as a lock file for integrity checking: https://deno.land/manual/linking_to_external_code/integrity_checking

          (This is Deno-specific)

      3. 3

        Yeah, like: one thing that really confused me was why they didn’t do something like import express from npm("express@5"), which, although I suspect (honestly, I think) isn’t technically a valid import syntax, has the benefit that it could simply expand out to e.g. https://esm.sh/express@5, and therefore keep the existing, clean import system Deno already has.

        I feel for Deno. They’re between a rock and a hard place on innovating v. breaking all backwards compatibility. But I feel as if this is a small step in the wrong direction that’ll be very, very hard to unwind from.