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 initiatives right into a single binary executable, which lets builders distribute and execute binaries on all main platforms with out putting in Deno dependencies. This function—which simplifies deployment and accelerates startup time—has now been prolonged to NPM.
Previous to the Deno 1.34 launch,
deno compile additionally added assist for web workers and dynamic imports. Extra work is on the horizon for this function, together with minimizing complete 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.job, and CLI arguments for specifying information. The
globsyntax 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 comparable to Kubernetes pods, which regularly use IP addresses as a substitute of domains, and for DNS over HTTP/TLS, which wants an IP handle for the server to keep away from round dependency on title decision.
- For NPM and Node.js compatibility,
deno vendorhandles NPM specifiers and can not increase an error when encountering them. Additionally,
put upscripts if current when executing a script from a
package deal.jsonfile just like NPM.
- It is potential to specify a
nodeModulesDirproperty within the
deno.jsonfile for explicitly enabling or disabling Deno’s use of the