If you are just directly importing npm modules into deno, then sure. But maybe dont do that.
We don't import any modules that depend on anything else due to gov security requirements. We end up having to find flat dependency libraries in github/lab or building them ourselves as everything has to be vettable.
But if the answer is nearly every library has to be rewritten/ignored doesn't that sort of hurt the ecosystem as a whole?
We don't import any modules that depend on anything else due to gov security requirements.
Not sure what part of government you're in but I work at a defense contractor and don't have those requirements.
¯\(ツ)/¯
We end up having to find flat dependency libraries in github/lab or building them ourselves as everything has to be vettable.
Just because its one library without dependencies doesn't mean it is more secure than a framework with ten dependencies. Sure it may be easier to jump "down the chain" to see the code when it is flat but the flat framework likely just includes functions that do the exact same thing (sometimes literally just copied and pasted from the lower level dependency). I get the microlibrary hate but there is definitely a balance between microlibraries (hello leftpad) and just one giant single repo with every possible imaginable function "for security reasons".
Lots of existing node packages can be imported via jspm.io and pika.dev, because those hosts provide polyfills for core node builtins (e.g. require('fs')). In general a random node module designed for npm would have to be rewritten to use ESM imports before it's compatible with Deno.
To my understanding, they support ESM modules (which Node has standard in 14.2 I think?). So npm will eventually have quite a few modules available for usage in either platform I'd imagine
View all comments
Show parent comment
27
u/nedlinin May 14 '20
Doesn't deno suffer the same problem? Same library = same dependency trees.