Paul Krill
Editor at Large

Deno stabilizes NPM compatibility

news
Nov 16, 20222 mins

With Deno 1.28, developers now can import more than 1.3 million NPM modules, as well as run NPM scripts and CLIs and execute NPM packages with subcommands.

command line
Credit: Thinkstock

NPM compatibility in the Deno JavaScript/TypeScript runtime has reached the stable stage, meaning developers leveraging Deno now can import more than 1.3 million NPM modules.

NPM compatibility is featured in Deno 1.28, unveiled November 14. NPM support makes it easier to build apps, the Deno developers said, because developers now can use persistent data modules such as MySQL, Mongoose, and Prisma, and front end frameworks such as React and Vue. The project has posted instructions for getting started with Prisma, Mongoose, and Apollo.

Deno’s builders said using NPM is safer with Deno, due to Deno’s secure-by-default, opt-in permissions model. Importing NPM modules is done through URLs in a standard-compliant fashion. Developers can use NPM packages by importing an npm: specifier.

Deno’s developers intend to make as many NPM modules compatible with Deno as possible. Some modules may not yet be compatible because of edge cases, post-install scripts, or assumptions some packages make about executing a folder with a typical Node.js setup. Plans call for addressing these issues in coming months.

Also with Deno 1.28, the lock file will be automatically discovered and used if a configuration file ( deno.json(c) ) is discovered. In this case, a lock file will be automatically created if one does not yet exist, next to the configuration file, with the deno.lock name. The lock file will be updated if new dependencies become part of the module graph.

Deno 1.28 also upgrades to the V8 10.9 JavaScript/WebAssembly engine. Deno 1.28 follows predecessor Deno 1.27, which was released last month.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author