Home Update Deno 1.5 brings sooner bundling, tree-shaking

Deno 1.5 brings sooner bundling, tree-shaking

276
Deno 1.5 brings faster bundling, tree-shaking


The builders of Deno, which is positioned as a safe runtime for JavaScript and TypeScript and rival to Node.js, have revealed Deno 1.5, a brand new model of the platform that improves bundling and REPL capabilities.

The deno bundle command in Deno 1.5 is billed to be as a lot as 15 occasions sooner than in Deno 1.4, and now makes use of tree-shaking to take away unused code from the bundle. Also, work has been performed to refactor Deno’s TypeScript compiler infrastructure, with getting old bundler infrastructure changed with a brand new bundler based mostly on the swc TypeScript/JavaScript compiler. Bundles now are emitted as an ordinary ES module, with dynamic import now working appropriately.

Other new options and enhancements in Deno 1.5:

  • The REPL (read-eval-print-loop) has undergone main refactoring. It now options tab completion of object properties and strategies and code syntax highlighting, with syntax highlighted if a terminal helps colours. Also, top-level await help is obtainable, with builders in a position to await guarantees within the REPL with out having to wrap a name in an async IIFE.
  • Stricter sort checks in secure, with the isolatedModules TypeScript compiler choice enabled by default.
  • Web platform APIs alert, verify, and immediate have been added. The alert API logs a message to the terminal and synchronously blocks till affirmation. The verify API prompts the person with a message and synchronously blocks till the person responds, whereas immediate requests some enter kind the person and blocks synchronously till the person has entered textual content and pressed enter.
  • API additions and stabilizations, with Deno.fsync, Deno.fdatasync() and synchronous counterparts stabilized. These are low-level strategies to make sure modified file information is written to the disk drive. Two new unstable APIs are launched, together with Deno.sleepSync(), to dam the occasion loop, and Deno.systemCpuInfo(), to get data the variety of out there cores and CPU velocity.
  • deno lint has been up to date with a camelcase: rule to examine if variable declrations use camelCase formatting. Hints for lint diagnostics are launched, as effectively.
  • Changes have been made to std, together with renaming the assertStringContains and assertArrayContains strategies in std/testing.asserts.ts to asssertStringIncludes and assertArrayIncludes, respectively, to match the naming of the consists of methodology on strings and arrays.
  • The deno fmt --ignore flag now could be out there with out the --unstable flag. The flag can be utilized to disregard some recordsdata or…



Source hyperlink

LEAVE A REPLY

Please enter your comment!
Please enter your name here