Newest Deno launch helps NPM packages

0
11


Deno 1.34, the most recent launch of the JavaScript and TypeScript runtime positioned as an alternative choice to Node.js, improves compatibility with NPM and Node.js and enhances the developer expertise, in keeping with proponents.

With Deno 1.34, unveiled on Could 25, deno compile helps NPM packages. Since Deno 1.6, launched in December 2020, deno compile has allowed the compilation of tasks right into a single binary executable, which lets builders distribute and execute binaries on all main platforms with out putting in Deno dependencies. This characteristic—which simplifies deployment and hastens startup time—has now been prolonged to NPM.

Previous to the Deno 1.34 launch, deno compile additionally added help for internet employees and dynamic imports. Extra work is on the horizon for this characteristic, together with minimizing whole binary measurement.

Like final month’s Deno 1.33 launch, Deno 1.34 is a precursor to a deliberate Deno 2 launch. Different new capabilities embody:

  • Globs, that are patterns specifying units of filenames with wildcard characters, are supported within the configuration file deno.json, deno.activity, and CLI arguments for specifying information. The glob syntax is cross-platform, so it may be used on Home windows, MacOS, or Linux.
  • TLS (transport layer safety) certificates containing IP addresses are supported. That is helpful for functions resembling Kubernetes pods, which frequently use IP addresses as a substitute of domains, and for DNS over HTTP/TLS, which wants an IP deal with for the server to keep away from round dependency on title decision.
  • For NPM and Node.js compatibility, deno vendor handles NPM specifiers and can now not elevate an error when encountering them. Additionally, deno activity runs pre and submit scripts if current when executing a script from a bundle.json file just like NPM.
  • It is attainable to specify a nodeModulesDir property within the deno.json file for explicitly enabling or disabling Deno’s use of the node_modules listing.
  • Deno 1.34 ships with the Google V8 11.5 JavaScript and TypeScript engine and TypeScript 5.04.

Copyright © 2023 IDG Communications, Inc.



Supply hyperlink