
1/7/2022 · Brendan Coll, Ivan Nikulin
What this post added
Miniflare 2.0 is released, offering a fully-local development and testing environment for Cloudflare Workers. Key improvements include a modular design with separate packages for components like KV and Durable Objects, reduced install size, and increased accuracy in replicating the Workers runtime. It introduces live-reload and first-class Jest integration for testing, with a custom test environment that provides access to Workers runtime APIs and isolated storage. The post details Miniflare's architecture, leveraging Node.js's `vm` module and `undici`, and provides examples of local development setup and Jest testing.