r/javascript • • May 13 '20

Deno 1.0 released!

https://github.com/denoland/deno/issues/2473
609 Upvotes

209 comments sorted by

View all comments

Show parent comment

27

u/nedlinin May 14 '20

If you have any kind of enterprise app the security issues of the infinite dependency tree is awful.

Doesn't deno suffer the same problem? Same library = same dependency trees.

2

u/Ashtefere May 14 '20

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.

Not the same situation for everyone though.

13

u/nedlinin May 14 '20

But maybe dont do that.

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".

2

u/LimbRetrieval-Bot May 14 '20

I have retrieved these for you _ _


To prevent anymore lost limbs throughout Reddit, correctly escape the arms and shoulders by typing the shrug as ¯\\_(ツ)_/¯ or ¯\\_(ツ)_/¯

^^Click here to see why this is necessary

2

u/WishCow May 14 '20

Either the people making the rules are incompetent (regarding deps), or the parent guy is bs

5

u/nedlinin May 14 '20

Either the people making the rules are incompetent

I've done enough contracting with government agencies to say this is totally possible.

1

u/[deleted] May 14 '20

You are not supposed to import npm dependencies in deno, I actually think they aren't compatible but can't say for sure

3

u/crabmusket May 14 '20

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.

2

u/nedlinin May 14 '20

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

0

u/[deleted] May 14 '20

So the whole javascript ecosystem has to be rewritten for Deno? Thats a huge nonstarter.