News for hackers. Stuff that matters.
Re:Deno 1.0 by fsloth on Thursday May 14, 2020 @03:11AM (#23176390)
Why can't you download all the packages you use actually with your source code? That's how software has been built for decades...

I'm a desktop developer so I understand I'm the dinosaur in the room but I've never understood why you would not cache all the component packages next to your own source code.

Since this is straighforward to do I presume there is some tradeoff I've not thought about. Is it security? Do you want to get the latest packages automatically? But isn't that a security risk as well, as not all changes are improvements?

Re:Deno 1.0 by Cthulhu_ on Thursday May 14, 2020 @07:37AM (#23178255)
For Node, the main tradeoff is number and size of files. Usually the distribution of a node module (that which is downloaded into node_modules) contains the source, documentation, distribution, tests, etc. In my current project, it adds up to 500MB already.

They would do well to have an option to optimize dependencies for vendoring.

Re:Deno 1.0 by softawre on Thursday May 14, 2020 @11:35AM (#23180788)
You're right. We call this "vendoring" your dependencies. And it's a good way to do things.
Re:Deno 1.0 by emerongi on Thursday May 14, 2020 @06:40AM (#23177858)
You can commit your node_modules folder into your repository if you'd like.
Re:Deno 1.0 by IshKebab on Thursday May 14, 2020 @03:56AM (#23176705)
That is exactly what NPM does.
Re:Deno 1.0 by progx on Thursday May 14, 2020 @11:20AM (#23180588)
So build your own npm?