Deno 2.0 aimed to address developer feedback by making it easier to adopt Deno in existing projects. Many developers couldn't use Deno at work because they had large Node.js projects that couldn't be migrated overnight. Deno 2.0 allows developers to run existing Node.js projects with minimal changes, while still benefiting from Deno's built-in tooling.
Deno 2.0 includes backwards compatibility with Node.js and npm, native support for package.json and node_modules, and a stabilized standard library. It also integrates more package management features, such as the ability to create node_modules from package.json and support for private npm registries.
Deno 2.0 supports all built-in Node.js modules, allowing developers to use existing libraries written for Node.js without modification. It also understands the node_modules folder, enabling compatibility with npm packages. Deno 2.0 provides a way to incrementally adopt Deno without requiring a complete rewrite of existing projects.
WinterCG is a community group within the W3C that aims to standardize server-side JavaScript runtime APIs. It seeks to define a common subset of APIs that all runtimes should support, moving away from outdated Node.js APIs and towards modern web standards. This effort is crucial for interoperability and future-proofing server-side JavaScript development.
Deno stands out for its stability, built-in tooling (like a formatter, linter, and test runner), and TypeScript support out of the box. It also offers features like compiling to a single executable and a more modern API surface compared to Node.js. Deno's ecosystem, such as the Fresh web framework, is tailored for Deno, making it a compelling choice for developers.
JSR is a new package registry designed to address the shortcomings of npm. It natively supports TypeScript, offers built-in documentation generation, and has a more secure publishing flow. Unlike npm, JSR is open source and encourages TypeScript-first and ESM-only packages, aiming to modernize the JavaScript ecosystem.
Deno does not monetize the open-source runtime itself. Instead, the company generates revenue through hosting services and enterprise consulting. This model ensures that the open-source runtime remains free and accessible while funding its continued development. Deno also plans to move JSR into a foundation to avoid single-entity ownership.
Fresh is a web framework built for Deno that uses Preact and focuses on server-side rendering with islands of interactivity. Unlike Next.js, Fresh does not send all JavaScript to the client, reducing initial load times and improving performance. It uses a file-based routing system and supports Preact Signals for state management.
Deno) is a free and open source JavaScript runtime built on Google’s V8 engine, Rust, and Tokio. It’s designed to offer a more secure and standardized alternative to Node.js, with native TypeScript support. Deno 2.0) just released and it’s a significant update, focusing on improved compatibility with Node.js and addressing developer feedback. Some of the key features are backwards compatibility with Node.js and npm, native support for package.json and node_modules, and a stabilized standard library.
Luca Casonato) is a Software Engineer for Deno and he spoke about the project on Software Engineering Daily in 2023. We’re excited to have Luca join the show again to talk about the many changes introduced in Deno 2.0.
)
Kevin Ball) or KBall, is the vice president of engineering at Mento and an independent coach for engineers and engineering leaders. He co-founded and served as CTO for two companies, founded the San Diego JavaScript meetup, and organizes the AI inaction discussion group through Latent Space.
Please click here to see the transcript of this episode.)
Sponsorship inquiries: [email protected])
The post Deno 2.0 with Luca Casonato) appeared first on Software Engineering Daily).