Paul Krill
Editor at Large

Deno upgrade adds WebSocket API

news
Sep 15, 20202 mins

Deno 1.4 also brings stricter type checks, integrated test coverage, and automatic restarts

white outlet electrical outlet plug unplugged sad face
Credit: Getty Images

Deno, an alternative JavaScript runtime to Node.js, has been upgraded with capabilities including a WebSocket API and an early version of an automatic restart capability.

Deno 1.4, released September 13, is being called the largest feature release yet. Highlights include a web standard WebSocket API, for communicating with remote servers via the WebSocket protocol, and an integrated file watcher that can be used to restart any script when its dependencies change. To use the file watcher, developers run a script as they normally would but add the --watch flag. The unstable flag also must be used because this feature is not yet stable. 

Additionally, Deno 1.4 offers integrated test coverage, with developers able to run tests with deno test --coverage to get a summary of test coverage. Other new capabilities in Deno 1.4 include:

  • Stricter type checks in --unstable. TypeScript compiler options isolatedModules and importsNotUsedAsValues are now turned on by default.
  • The deno info tool for dependency analysis has been overhauled. Dependency analysis is now faster and less buggy.
  • CSS styling is now supported for console.log.
  • Lint supports complete eslint and typescript-esline recommended rules.
  • The deno doc documentation generator has received new features and fixes, including support for the export {foo}; syntax and reimports of multiple symbols with the same name.
  • The Visual Studio Code extension for Deno has been updated with capabilities such as IntelliSense for deno.land imports, providing autocomplete suggestions for module names on deno.land/x. 

Developers who already have Deno installed can upgrade by running deno upgrade. Those installing Deno for the first time can use several methods to access it, including the following:

# Using Shell (macOS and Linux):
curl -fsSL https://deno.land/x/install/install.sh | sh
# Using PowerShell (Windows):
iwr https://deno.land/x/install/install.ps1 -useb | iex

Deno 1.4 source code is available on GitHub.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author