by dmitriid · 4y ago · 0 comments
Again looks like package.json with many manual steps in between (where to get those import maps is the first question).
Also, apparently non-composable etc. https://news.ycombinator.com/item?id=32469280
> Deno's philosophy is to be aligned with web browser standards.
And yet they want to be able to run npm packages...
You create the import map by figuring out what dependencies you want to use and crafting it and your code to reference them. You can do anything--you can import five different versions of the same library but under different names if you want. This was not something even possible with node and npm. You can make it as simple or as complex as your needs require. For most people they'll keep it simple and drop a few import urls directly in their source, never even needing to touch a tool or other file to worry about dependencies.
They're giving users what they want, an ability to run packages which haven't been ported to work with deno yet. The blog post explicitly makes this clear. This is not some grand conspiracy like so many replies seem to be trying to imply.
Ah yes. Truly the same amount of effort as package.json.
How exactly do you figure out all dependencies (including transitive ones) and "craft" that?
Edit TIL you can install as many versions under different names as you want with npm: https://medium.com/weekly-webtips/how-to-install-multiple-ve...
> This is not some grand conspiracy like so many replies seem to be trying to imply.
There's no conspiracy. All the awkward workarounds with tedious manual steps to recreate a package.json "dependencies" field are frankly laughable. Deno should bite the bullet and automate this since they already have the dependency resolution built in. No need to "craft" anything.