Menu
Deno 1.5 brings faster bundling, tree-shaking

Deno 1.5 brings faster bundling, tree-shaking

Highlights of the latest upgrade of the Node.js alternative also feature an overhauled REPL and web platform APIs

Credit: Clément H

The developers of Deno, which is positioned as a secure runtime for JavaScript and TypeScript and rival to Node.js, have published Deno 1.5, a new version of the platform that improves bundling and REPL capabilities.

The deno bundle command in Deno 1.5 is billed to be as much as 15 times faster than in Deno 1.4, and now uses tree-shaking to remove unused code from the bundle. Also, work has been done to refactor Deno’s TypeScript compiler infrastructure, with aging bundler infrastructure replaced with a new bundler based on the swc TypeScript/JavaScript compiler. Bundles now are emitted as a standard ES module, with dynamic import now working correctly.

Other new features and improvements in Deno 1.5:

  • The REPL (read-eval-print-loop) has undergone major refactoring. It now features tab completion of object properties and methods and code syntax highlighting, with syntax highlighted if a terminal supports colors. Also, top-level await support is offered, with developers able to await promises in the REPL without having to wrap a call in an async IIFE.
  • Stricter type checks in stable, with the isolatedModules TypeScript compiler option enabled by default.
  • Web platform APIs alert, confirm, and prompt have been added. The alert API logs a message to the terminal and synchronously blocks until confirmation. The confirm API prompts the user with a message and synchronously blocks until the user responds, while prompt requests some input form the user and blocks synchronously until the user has entered text and pressed enter.
  • API additions and stabilizations, with Deno.fsync, Deno.fdatasync() and synchronous counterparts stabilized. These are low-level methods to ensure modified file data is written to the disk drive. Two new unstable APIs are introduced, including Deno.sleepSync(), to block the event loop, and Deno.systemCpuInfo(), to get information the number of available cores and CPU speed.
  • deno lint has been updated with a camelcase: rule to check if variable declrations use camelCase formatting. Hints for lint diagnostics are introduced, as well.
  • Changes have been made to std, including renaming the assertStringContains and assertArrayContains methods in std/testing.asserts.ts to asssertStringIncludes and assertArrayIncludes, respectively, to match the naming of the includes method on strings and arrays.
  • The deno fmt --ignore flag now is available without the --unstable flag. The flag can be used to ignore some files or folders from being formatted or checked by the formatter.

Users with earlier versions of Deno installed can run deno upgrade to update to version 1.5. Installation methods for first timers can be found in release notes. Deno was created by Node.js designer Ryan Dahl as a more secure alternative to Node.js. Deno 1.0 arrived in May.


Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Featured

Slideshows

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners

More than 500 channel leaders gathered in Auckland on 21 October at the ​Reseller News Innovation Awards ​2020 to celebrate the achievements of the New Zealand technology industry's top partners, start-ups, vendors, distributors and individuals.

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners
Meet the winners of the 2020 Reseller News Innovation Awards

Meet the winners of the 2020 Reseller News Innovation Awards

Reseller News honoured the standout players of the New Zealand channel in front of more than 500 technology leaders in Auckland on 21 October, recognising the achievements of top partners, start-ups, vendors, distributors and individuals.

Meet the winners of the 2020 Reseller News Innovation Awards
Meet the Reseller News 30 Under 30 Tech Awards 2020 winners

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners

This year’s Reseller News 30 Under 30 Tech Awards were held as an integral part of the first entirely virtual Emerging Leaders​ forum, an annual event dedicated to identifying, educating and showcasing the New Zealand technology market’s rising stars. The 30 Under 30 Tech Awards 2020 recognised the outstanding achievements and business excellence of 30 talented individuals​, across both young leaders and those just starting out. In this slideshow, Reseller News honours this year's winners and captures their thoughts about how their ideas of leadership have changed over time.​

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners
Show Comments