Deno, the JavaScript runtime built by Ryan Dahl, has launched version 2.5, bringing improvements with the addition of Permission Sets, new testing hooks and improvements to Websockets. There is also a number of performance improvements as part of the release.
Deno 2.5 upgrades the runtime environment to V8 14.0 and TypeScript 5.9.2, unlocking access to newer JavaScript language features, performance improvements, and better TypeScript support. The release also includes changes to the Temporal API for date and time management, with the goal of making the --unstable-temporal
flag unnecessary in future versions.
One of the headline changes is support for permission sets in the configuration file, providing developers with more granular and declarative control over runtime permissions. By being able to define permission specifications in the deno.json
config file, different predefined permissions can be applied at runtime based on the command being run. Permission sets can be applied using the new permission-set flag, for example:
deno run --permission-set=process-data main.ts
In addition, Deno has enhanced its test API by adding setup and teardown hooks, giving test authors lifecycle control directly in Deno.test. There are four new hooks: Deno.test.beforeAll, Deno.test.beforeEach, Deno.test.afterAll
and Deno.test.afterEach
.
One user on reddit showed excitement towards the new hooks available in the testing API, however a comment over on YouTube argues the addition of beforeAll
is a late addition, adding it should have had feature parity with node sooner.
The bundle runtime API is also shipping, enabling programmatic bundling of modules at runtime. This feature enhances the deno bundle command shipped in version 2.4. The bundle API is currently experimental and the flag –unstable-bundle
must be used.
WebSocket headers have also been improved to allow for custom headers when initiating a new WebSocket connection, which can be beneficial for authentication or passing custom metadata and state. There is a note in the release blog that this new feature will not work in all browsers.
Deno 2.5 also includes performance optimizations. The emit cache now persists between updates unless the underlying deno_ast version changes, reducing unnecessary recompilation. Memory usage has been lowered in CommonJS module wrappers, improving Node.js interoperability, while conditional JSX transpilation skips processing entirely when JSX is disabled. Core APIs have seen similar refinements: structuredClone
now uses a faster internal implementation, and both Buffer.subarray
and Buffer.prototype.utf8Slice
have been optimized for binary data handling. Deno’s Node-API layer has received performance tuning to minimize overhead when loading native Node modules.
Deno is an open-source, secure JavaScript runtime, designed with first-class TypeScript support, integrated tooling, and purposeful default security. It has over 100k+ Stars on GitHub, 400k+ Active Community Users and 2M+ Community Modules. Deno v2.5 ships with a number of improvements and features, you are able to find the full list of changes over in the release article on the Deno website.