Paul Krill
Editor at Large

Latest Deno release supports NPM packages

news
May 26, 20232 mins

Deno 1.34 improves NPM and Node.js compatibility and adds support for Globs, TLS certificates, and more.

Flowers, celebration, surprise
Credit: New Africa/Shutterstock

Deno 1.34, the latest release of the JavaScript and TypeScript runtime positioned as an alternative to Node.js, improves compatibility with NPM and Node.js and enhances the developer experience, according to proponents.

With Deno 1.34, unveiled on May 25, deno compile supports NPM packages. Since Deno 1.6, introduced in December 2020, deno compile has allowed the compilation of projects into a single binary executable, which lets developers distribute and execute binaries on all major platforms without installing Deno dependencies. This feature—which simplifies deployment and speeds up startup time—has now been extended to NPM.

Prior to the Deno 1.34 release, deno compile also added support for web workers and dynamic imports. More work is on the horizon for this feature, including minimizing total binary size.

You can find instructions for installing Deno on the Deno installation page at Deno.com.

Like last month’s Deno 1.33 release, Deno 1.34 is a precursor to a planned Deno 2 release. Other new capabilities include:

  • Globs, which are patterns specifying sets of filenames with wildcard characters, are supported in the configuration file deno.json, deno.task, and CLI arguments for specifying files. The glob syntax is cross-platform, so it can be used on Windows, MacOS, or Linux.
  • TLS (transport layer security) certificates containing IP addresses are supported. This is useful for purposes such as Kubernetes pods, which often use IP addresses instead of domain names, and for DNS over HTTP/TLS, which needs an IP address for the server to avoid circular dependency on name resolution.
  • For NPM and Node.js compatibility, deno vendor handles NPM specifiers and will no longer raise an error when encountering them. Also, deno task runs pre and post scripts if present when executing a script from a package.json file similar to NPM.
  • It’s possible to specify a nodeModulesDir property in the deno.json file for explicitly enabling or disabling Deno’s use of the node_modules directory.
  • Deno 1.34 ships with the Google V8 11.5 JavaScript and TypeScript engine and TypeScript 5.04.
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