跳到主内容
@wquguru
精选86Cloudflare Workers(Changelog)语言与库

Miniflare v5 破坏性变更:移除废弃 API、调整配置与持久化选项

Workers - Miniflare v5 prepares local development for the cf CLI

原文
发到 X
推荐理由

如果你直接依赖 Miniflare 进行本地开发,必须检查配置迁移和废弃 API 的使用情况,否则升级后将无法运行。

Miniflare v5 prepares Cloudflare local development tooling for the upcoming cf CLI.

Miniflare v5 为即将推出的 cf CLI 准备 Cloudflare 本地开发工具链。

Miniflare powers local Workers development behind wrangler dev, the Cloudflare Vite plugin, and @cloudflare/vitest-plugin. Most projects should use those tools instead of depending on Miniflare directly, and Miniflare v5 will not require any action.

Miniflare 是 wrangler dev、Cloudflare Vite 插件和 @cloudflare/vitest-plugin 背后驱动 Workers 本地开发的引擎。大多数项目应使用这些工具,而不是直接依赖 Miniflare,且 Miniflare v5 不需要任何操作。

The most significant change is a new configuration shape which aligns Miniflare with cloudflare.config.ts, the programmatic Cloudflare configuration format now available for testing.

最重大的变化是一个新的配置结构,使 Miniflare 与 cloudflare.config.ts(现已可用于测试的编程式 Cloudflare 配置格式)保持一致。

Other breaking changes include:

其他破坏性变更包括:

  • Removed deprecated APIs and options, such as legacy alpha D1 bindings.
  • Removed now-unused, internal APIs like wrappedBindings
  • Removed Miniflare's built-in module discovery; higher-level tools like Wrangler and the Vite plugin should be providing the module graph.
  • Moved local-only /cdn-cgi routes under /cdn-cgi/local.
  • Replaced per-resource persistence options with shared persistence root options.
  • 移除了已弃用的 API 和选项,例如旧的 alpha D1 bindings。
  • 移除了不再使用的内部 API,如 wrappedBindings。
  • 移除了 Miniflare 内置的模块发现功能;Wrangler 和 Vite 插件等更高级的工具应提供模块图。
  • 将仅本地使用的 /cdn-cgi 路由移至 /cdn-cgi/local 下。
  • 用共享持久化根目录选项替换了每个资源的持久化选项。

For a more comprehensive list, refer to Miniflare's changelog ↗

如需更全面的列表,请参阅 Miniflare 的更新日志 ↗

This work sets up a cleaner foundation for the next generation of local development tooling, including the new cf CLI.

这项工作为下一代本地开发工具链(包括新的 cf CLI)奠定了更清晰的基础。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件