News for hackers. Stuff that matters.
Re:Deno 1.0 by piscisaureus on Wednesday May 13, 2020 @07:04PM (#23172896)
This is something that we'll further work out in future versions. For now you can use a lockfile: https://deno.land/manual/linking_to_external_code/integrity_...
Re:Deno 1.0 by hn_throwaway_99 on Wednesday May 13, 2020 @07:27PM (#23173088)
> Deno can store and check module subresource integrity for modules using a small JSON file. Use the --lock=lock.json to enable and specify lock file checking. To update or create a lock use --lock=lock.json --lock-write.

HALLELUJAH that there is a clear, simple separation of when (a) you expect a lock file to be checked to guarantee integrity and (b) when you want it to be generated. The complete insanity that was npm shrinkwrap and lockfiles for years, summed up in this stackoverflow post https://stackoverflow.com/questions/45022048/why-does-npm-in... , always baffled me in that it seemed like it could have just been so easily avoided about being explicit when you're writing a lockfile vs. when you're using it.

That said, why not be even MORE explicit about it, i.e. "--use-lock=lock.json" vs. "--write-lock=lock.json"?

Re:Deno 1.0 by xg15 on Wednesday May 13, 2020 @07:59PM (#23173361)
This looks really promising.

However, it still seems risky to me in case a library is not available. Is there a central repository planned? Or are you expected to vendor everything and ship your project with dependencies included?

Re:Deno 1.0 by marktolson on Wednesday May 13, 2020 @11:46PM (#23175046)
Instead of referring to the version could you refer to the hash? Then a simple integrity checker could confirm file changes.