Deno is not compatible with Node “by design”. So if you want to make your modules accessible for both runtimes, you actually have to write two versions. Garrone Joseph found this impractical and developed Denoify: A tool for only modules in two runtimes.
Deno is actually not compatible with the Node ecosystem. Ryan Dahl, Deno inventor with a Node past, has emphasized this again and again in recent years. Dahl structured Deno fundamentally differently from Node, so that Node modules don’t simply run on Deno. This is a clear stance – but not necessarily a position shared by all developers who work with Deno and want to develop modules for it. Garrone Joseph belongs to this group of developers who see the strict separation of ecosystems as a disadvantage. And as is usual in the WebTech world, he has now simply created a solution to the problem: Denoify.
Node to Deno: Denoify
With Denoify, developers can modify their node modules to create code that is compatible with Node and Deno. Based on an npm module that must be written in TypeScript, Denoify makes all the necessary adjustments to the code. Of course, this does not simply create a separate version of the module; a cross-runtime variant is created that covers both platforms. However, this only works if npm is the starting point. Denoify is itself a node module and can therefore not be executed in Deno. However, this shouldn’t be a major disadvantage, after all, it is the large node module ecosystem that many developers would like for Deno as well.
In the Deno Package Registry there are already some modules that have been processed with Denoify. These include, for example, Nano JSX and Yolk , but also GraphQL Helix . GraphQL itself has also been supported in Denoify since v0.6; with the previous release 0.5 some breaking changes were made to the tool. Denoify is still young, the tool is still in active development, even if it can already be used in practice. The project is available on GitHub ; in addition to the current status, the to-do list provides information about what is still in the planning stage. In addition to Denoify itself, the Denoify_ci that automates some work steps via GitHub Actions.
Deno or Node?
Deno is becoming more and more important as an alternative to Node.js. The new Developer Magazine also deals with the question of how Deno can be used in projects that should be supplemented with other tools. Denoify is now adding another dimension to the question of the right runtime: The question of whether the ecosystem around Deno already supports the desired modules could therefore be less important in the future.