Deno JavaScript platform provides compatibility with NPM modules

presented release deno 1.28 , platforms for separate execution of applications in JavaScript and Typescript languages, which can be used to create handlers working on the server. Ryan Dal is developing the platform ( ryan dahl ), the creator of node.js. As in Node.js, Deno uses a JavaScript engine v8 , which is also used in Chromium browsers. At the same time, Deno is not a branch from Node.js, but is a new project created from scratch. The project code is distributed under the MIT license. Assemblies prepared for linux, windows and macos.

Deno project was created to provide users more Protected environment and elimination of conceptual errors, admitted in the architecture of node.js. To increase safety, the strapping around the V8 engine is written in the RUST language, which allows you to avoid many vulnerabilities that arise due to low-level memory. To process requests in non-closing mode, the platform tokio , also written in the language Rust. Tokio allows you to create high-performance applications based on event-oriented architecture (Event-Drive), which maintain multi-traffic and processing network requests in asynchronous mode.

The key change in the new issue is stabilization of compatibility with packages located in the NPM repository, which allows you to use more than 1.3 million modules created for the Node.js. For example, in Deno applications, you can now use such modules to organize constant access to data as Prisma, Mongoose and MySQL, as well as frameworks to ensure the work of frontands, such as React and Vue. Some NPM modules still remain incompatible with Deno, for example, due to bindings to the environment specific for node.js, such as the Package.json file. It is also impossible to use the Deno Compile command with NPM modules. In future issues, it is planned to eliminate such incompatibility and restrictions.

Support of the ECMASCIPT and Web API modules previously used in Deno -based models is saved at the same level and the NPM modules are used for the Deno URL -based download circuit. For contacting the NPM modules, a special URL-paramilitary “NPM:” is provided, which can be used by analogy with conventional Deno modules. For example, for the import of NPM module, you can specify ‘Import {Chalk} from “NPM: Chalk@5”;’, and to launch a command line NPM script-“Deno Run –allow-env –allow-band NPM: Create-Vite-Extra “.

/Media reports.