惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
月光博客
月光博客
宝玉的分享
宝玉的分享
Recent Announcements
Recent Announcements
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
Vercel News
Vercel News
量子位
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
腾讯CDC
有赞技术团队
有赞技术团队

Deno

Deno 2.8 | Deno Claw Patrol: an open-source security firewall for agents | Deno Fresh 2.3: Zero JS by default, View Transitions, and Temporal support | Deno Deno 2.7: Temporal API, Windows ARM, and npm overrides | Deno Build a dinosaur runner game with Deno, pt. 6 | Deno Build a dinosaur runner game with Deno, pt. 5 | Deno Deno Deploy is Generally Available | Deno Introducing Deno Sandbox | Deno Build a dinosaur runner game with Deno, pt. 4 | Deno Build a dinosaur runner game with Deno, pt. 3 | Deno Build a dinosaur runner game with Deno, pt. 2 | Deno React / Next.js Denial-of-Service Vulnerability: Deno Deploy users protected | Deno Deno 2.6: dx is the new npx | Deno Build a dinosaur runner game with Deno, pt. 1 | Deno React Server Functions / Next.js Vulnerability: Deno Deploy users protected | Deno My highlights from the new Deno Deploy | Deno Deno's Other Open Source Projects | Deno How Deno protects against npm exploits | Deno Help Us Raise $200k to Free JavaScript from Oracle | Deno Deno 2.5: Permissions in the config file | Deno Fresh 2.0 Graduates to Beta, Adds Vite Support | Deno Deno 2.4: deno bundle is back | Deno JavaScript™ Trademark Update | Deno What's coming to JavaScript | Deno A brief history of JavaScript | Deno Reports of Deno's Demise Have Been Greatly Exaggerated | Deno An Update on Fresh | Deno How Plaid migrated 100 services to a new database platform 5x faster with Deno | Deno Deno 2.3: Improved deno compile, local npm packages, and more | Deno Add JSR packages with pnpm and Yarn | Deno
Deno 1.41: smaller deno compile binaries | Deno
2024-02-23 · via Deno

Deno’s goal is to simplify programming in as many environments as possible. In this 1.41 release, we’re excited to announce improvements that broaden how and where Deno can be used: we’ve roughly halved the size of deno compile binaries, as well as added an official Linux ARM 64 build. Additionally, we’ve continued to improve Node.js compatibility, the LSP to include better auto-completion, and Deno APIs.

If you already have Deno installed, upgrade to version 1.41 in your terminal with:

If you don’t yet have Deno installed, you can install it with one of the following commands, or many other ways.

MacOS / Linux Install

curl -fsSL https://deno.land/install.sh | sh

Windows Install

irm https://deno.land/install.ps1 | iex

Here’s an overview of what’s new in Deno 1.41:

  • Smaller deno compile binaries
  • Official Linux ARM64 builds
  • ARM64 canary builds
  • Updates to Node.js compatibility
  • Changes to Deno APIs
  • Language server improvements

Smaller deno compile binaries

Since v1.6, deno compile has allowed you to compile your project into a single binary executable, which is useful for:

  • distributing and executing binaries on all major platforms without needing to install Deno or dependencies
  • packaging assets inside executable for more portability
  • simplifying deployment
  • achieving a faster startup time

Since then, we’ve continued to improve deno compile, by adding support for web workers and dynamic imports, as well as npm packages.

We’re happy to announce that this release brings a more lightweight build for deno compile binaries, making produced binaries up to 50% smaller!

In v1.40 a “Hello world” program compiled to a 116Mb binary on Mac ARM:

$ echo "console.log('Hello world');" > hello_world.ts

$ deno compile hello_world.ts
Check file:///Users/ib/dev/deno/hello_world.ts
Compile file:///Users/ib/dev/deno/hello_world.ts to hello_world

$ ls -lah hello_world
116M Feb 22 15:59 hello_world

In v1.41 the size of the same program is reduced to 58Mb:

$ deno upgrade
Looking up latest version
Found latest version 1.41.0

$ deno compile hello_world.ts
Check file:///Users/ib/dev/deno/hello_world.ts
Compile file:///Users/ib/dev/deno/hello_world.ts to hello_world

$ ls -lah hello_world
58M Feb 22 16:02 hello_world

We have futher plans to make the produced binaries even smaller in the future, as well as allowing you to compile a custom build of Deno with only the features you need.

Linux ARM64 support

Official Linux ARM64 builds were one of the most requested features by the Deno community. We are happy to announce that they are now available in Deno 1.41.

The official ARM64 binaries can be found in the Deno releases. Note that this update means our official Deno Docker image now also supports ARM64.

We’d like to thank Luke Channings who provided the community Linux ARM64 builds for the past 3 years.

ARM64 canary builds

In addition to stable Deno versions, you can also install a “canary” build, which is useful for testing the latest features and bug fixes, with:

Our canaries are released multiple times daily for each commit on main.

Starting from Deno 1.41, canary builds are available for Linux and Mac ARM64.

Updates to Node.js compatibility

We fixed serveral issues with Node.js compatibility in Deno 1.41. Here are some of the highlights:

Changes to Deno APIs

This release brings a few changes to the Deno APIs:

  • Deno.ConnectTlsOptions now supports cert and key properties to better align it with other “connect” APIs in Deno; that makes certChain and privateKey properties deprecated.

  • Deno.FsFile.isTerminal() and Deno.FsFile.setRaw() are now available to better support terminal I/O. Note that these methods only have effect if the opened is a TTY.

  • Deno.FsFile.lock() and Deno.FsFile.unlock() are now available to better support file locking. Synchronous counterparts are also available as Deno.FsFile.lockSync() and Deno.FsFile.unlockSync().

Language server improvements

This release brings better auto-completion triggers and more reliable version suggestions for npm: specifiers.

Additionally, a memory leak in the LSP was identified and fixed. The memory was leaked during linting and was proportional to the number of files and their size.

Thanks to Ian Bull for thorough profiling and investigation of the LSP internals that helped pinpoint the issue.

Thank you to our contributors!

We couldn’t build Deno without the help of our community! Whether by answering questions in our community Discord server or reporting bugs, we are incredibly grateful for your support. In particular, we’d like to thank the following people for their contributions to Deno 1.41: Alessandro Cosentino, Dan Rose, Florian Schwalm, Jason Ford, Javier Hernández, John Spurlock, Lino Le Van, restlessronin, zhanghengxin, 林炳权.

Would you like to join the ranks of Deno contributors? Check out our contribution docs here, and we’ll see you on the list next time.

Believe it or not, the changes listed above still don’t tell you everything that got better in 1.41. You can view the full list of pull requests merged in Deno 1.41 on GitHub here.

Thank you for catching up with our 1.41 release, and we hope you love building with Deno!

Want to try a modern package registry for JavaScript and TypeScript?

We’re looking for feedback. Join the waitlist.