Paul Krill
Editor at Large

Deno 1.33 debuts built-in key-value database

news
May 2, 20233 mins
Development Libraries and FrameworksJavaScriptWeb Development

Currently in beta, Deno KV is a strongly consistent key-value database integrated into the open-source Deno runtime and designed for JavaScript, with the ability to store any JavaScript structured serializable value.

command line
Credit: Thinkstock

With newly published Deno 1.33, the projectโ€™s developers are preparing users of the JavaScript/TypeScript runtime for the planned, ambitious Deno 2 release. Part of that push is the debut in Deno 1.33 of the Deno KV key-value database.

Unveiled April 28, Deno 1.33 takes steps toward meeting the goals of Deno 2.0, which is due in coming months. These goals include โ€œeffortlessโ€ coding, โ€œbest in classโ€ performance, and โ€œuncompromisingโ€ security.

In Deno 1.33, new capabilities include the built-in Deno KV key-value database for stateful app development, either locally or on the Deno Deploy serverless JavaScript hosting service. When running locally, Deno KV is backed by SQLite. When running on Deno Deploy, the database is backed by FoundationDB, managed by Deno, and globally replicated across 35 cloud regions. Currently in beta, Deno KV is an unstable API and long-term data durability is not yet guaranteed.

Also with Deno 1.33, the deno.json schema has been flattened to make it easier to read and write. Nested options such as "lint.files.exclude" or "fmt.options.lineWidth" now are available at the top level of their respective sections.

As a quality-of-life improvement, Deno 1.33 allows for fewer permission checks for dynamic imports, improving startup time. This change will make it easier to conditionally execute some code in certain conditions, such as when developers have a CLI tool with many subcommands and they want to conditionally load handlers only when the subcommand is invoked. Other use cases include only loading a polyform when needed and executing debugging code in a server application only when an environmental variable is present.

Deno 1.33 can be installed from deno.com. Other features in Deno 1.33 include:

  • To improve performance, overhauls have been made to the HTTP server and the client and server for WebSockets. Work continues on improving these.
  • For NPM and Node compatibility, node:crypto, node:http, and node:vm capabilities have been improved since the last release.
  • Pre-loading of files occurs when initializing the language server, mitigating a situation where certain functionality did not work unless a file had been opened.
  • For the CLI, a new โ€“-no-run flag has been added to the deno bench subcommand to cache resolved bench files without running them. Also, a cross-platform unset command was added to the shell in deno task to allow deletion of environment and shell variables.
  • The Deno.run API is being deprecated. With the stabilization of the Deno.Command API in Deno 1.31, Deno.Command is now the recommended way to spawn subprocesses.

Deno 1.33 follows the March 2023 release of Deno 1.32, which offered enhanced Node.js compatibility, and Deno 1.32.1, which fixed a critical security issue pertaining to the improper handling of the resizable ArrayBuffer in async built-in functions.

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