Cloudflare重写了Workers运行时workerd中的模块注册表,以提升Node.js兼容性。新实现将模块说明符视为URL,支持import.meta.url、import.meta.resolve()、正确的导入属性验证、Node.js风格的require(esm)规则、一致的错误处理、惰性编译及WebAssembly源阶段导入。用户可通过启用new_module_registry兼容标志来使用这些改进。
Cloudflare与Workers Vitest集成,允许开发人员为Cloudflare Workers编写单元和集成测试。集成包括快照、模拟、定时器和间谍等功能,以及热模块重载和每个测试独立存储等开发者体验改进。文章提供了使用Vitest测试Workers的入门指南。
Cloudflare发布了Wrangler v3,其中包括使用Miniflare v3进行本地开发的功能,这是一个完全本地的Workers模拟器。与远程模式相比,新的本地优先实现将启动时间缩短了10倍,脚本重新加载时间缩短了60倍,提高了开发人员的速度。
Today, we’re taking local development to the next level by releasing Miniflare 3, powered by the open-source workerd runtime, along with support for migrating existing dashboard projects and using...
workerd is the JavaScript/Wasm runtime code that powers Cloudflare Workers, now open source under the Apache 2.0 license
完成下面两步后,将自动完成登录并继续当前操作。