Deno recently released version 0.1.2, and it brought with it a small but significant number of changes. You can get the release here: https://github.com/denoland/deno/releases/tag/v0.1.2. Here’s the quick rundown.

HTTPS Imports

I reported in my Deno tutorial that importing scripts using https was not working yet. I am happy to announce that this is a thing of the past and Deno now supports importing scripts from HTTPS resource. The easiest way to get started is to create a Gist or Github repo and import your code into your Deno script.

import "https://gist.githubusercontent.com/NewLunarFire/f3e351fdd8417769ca53669381d0be4d/raw/967356c3e44f3a2e0b622036773957f3e00365ef/helloworld.ts"
// => Hello deno!

Importing files relative to a remotely fetched resource does not work properly at this time, so if you do this make sure your script is self-contained.

Temporary Directories

This was more of a requirement for tests, but you can now create temporary directories in Deno using makeTempDirSync. This creates a directory that is destroyed when the script ends.

As the name states, this is a synchronous call that creates a temporary directory in the current folder. As arguments, it takes the path to create the new directory in (or defaults to the current working directory), and optionally a prefix and suffix.

import { makeTempDirSync } from "deno";

const temp = makeTempDirSync({ dir: "/home/me/deno", prefix: "hello", suffix: "world" });

File Information

Another native call added to deno was the file information call, statSync and lStatSync. The former returns information on a file, while the latter returns information on a symlink. The call only takes the filename as an argument, and returns a FileInfo class that gives various information on the file.

import { statSync } from "deno";

const fileInfo = deno.statSync("example.txt");

fileInfo.isFile();
fileInfo.isSymlink();
fileInfo.isDirectory();

fileInfo.len; // File Size

fileInfo.modified; // Last modification date
fileInfo.accesssed; // Last access date
fileInfo.created; // Creation date

Conclusion

More deno features are coming soon. I will not make a writeup every time new features are added to deno but every few minor versions or so, or when significant improvements are made. The major improvement deno made with 0.1.2 is https imports, and was one of my major pain points when writing the tutorial on how to use Deno.