DEV Community

Discussion on: Deno, first approach

dorshinar profile image
Dor Shinar

Hi! Thank you for the article! Deno indeed seems very interesting, and it's a project I'll keep an eye on. However I do have some questions regarding dependency resolution:

  1. How can I tell what version of a dependency I'm installing? An untagged file can change at will, there doesn't seem to be any version control on them
  2. How can I update dependencies for a single project if all of my dependencies are installed globally?
  3. Is there an alternative to a package-lock.json file, so all of my installations are identical?
lsagetlethias profile image
Lilian Saget-Lethias Author

Hello :)

1/ 3/ So dependency management is not the main goal of Deno. Dependencies should be handled and maintained by the source where the dependency file is fetched (e.g. raw.githubuser).

Basically dependencies are "locked" with git ref (branch, sha, tag).

But, to ease the process, Deno recently released a new feature in 0.23 (the article is for 0.21): lockfile !

1/ 2/ If you want to have a more centralized way to handle all your dependencies, you can have a file named deps.ts that act as a dependency barrel (e.g. ) ; also, import map is another option