The developers of Deno, which is positioned as and rival to , have published Deno 1.5, a new version of the platform that improves bundling and REPL capabilities.
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
awaitsupport is offered, with developers able to
awaitpromises in the REPL without having to wrap a call in an async IIFE.
- Stricter type checks in stable, with the
isolatedModulesTypeScript compiler option enabled by default.
- Web platform APIs
prompthave been added. The
alertAPI logs a message to the terminal and synchronously blocks until confirmation. The
confirmAPI prompts the user with a message and synchronously blocks until the user responds, while
promptrequests some input form the user and blocks synchronously until the user has entered text and pressed
- API additions and stabilizations, with
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 linthas been updated with a
camelcase:rule to check if variable declrations use
camelCaseformatting. Hints for lint diagnostics are introduced, as well.
- Changes have been made to std, including renaming the a
assertArrayContainsmethods in std/testing.asserts.ts to
assertArrayIncludes, respectively, to match the naming of the
includesmethod on strings and arrays.
deno fmt --ignoreflag now is available without the
--unstableflag. 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 . Deno was created by as a more secure alternative to Node.js. .
Copyright © 2020 IDG Communications, Inc.