Deno stabilizes NPM compatibility | InfoWorld
NPM compatibility in the Deno JavaScript/TypeScript runtime has achieved the stable phase, meaning builders leveraging Deno now can import more than 1.3 million NPM modules.
NPM compatibility is highlighted in Deno 1.28, unveiled November 14. NPM guidance would make it less complicated to construct applications, the Deno builders claimed, due to the fact developers now can use persistent information modules this sort of as MySQL, Mongoose, and Prisma, and entrance close frameworks these types of as Respond and Vue. The undertaking has posted guidelines for having started off with Prisma, Mongoose, and Apollo.
Deno’s builders reported utilizing NPM is safer with Deno, because of to Deno’s secure-by-default, choose-in permissions design. Importing NPM modules is accomplished via URLs in a normal-compliant vogue. Developers can use NPM offers by importing an npm:
specifier.
Deno’s builders intend to make as several NPM modules appropriate with Deno as doable. Some modules could not yet be suitable because of edge instances, submit-put in scripts, or assumptions some offers make about executing a folder with a standard Node.js setup. Strategies get in touch with for addressing these challenges in coming months.
Also with Deno 1.28, the lock file will be automatically discovered and made use of if a configuration file ( deno.json(c)
) is found. In this situation, a lock file will be routinely produced if one particular does not nonetheless exist, upcoming to the configuration file, with the deno.lock
name. The lock file will be updated if new dependencies turn into component of the module graph.
Deno 1.28 also upgrades to the V8 10.9 JavaScript/WebAssembly motor. Deno 1.28 follows predecessor Deno 1.27, which was produced final month.
Copyright © 2022 IDG Communications, Inc.