@cloudflare/vitest-plugin@1.9.02026-11-20
这版最实在的变化:Vitest 插件不再依赖 wrangler。读取 Wrangler 配置、生成 Miniflare 选项、加载本地变量、提供 Pages 的 ASSETS 绑定,都改用内置的 workers-sdk 共享包。安装插件也就不会再连带装上 wrangler;若项目仍要用 wrangler types 之类的命令,请自行加进 devDependencies。
其他几处修补:默认兼容日期 DEFAULTCOMPATDATE 更新为 2026-11-19,新建项目或未配置时跟随内置 workerd;Undici 升到 7.30.2,带入缓存、重定向与子资源完整性校验方向的六项上游安全修复;修复了用「仅限单个 Worker」的 API 令牌访问远程绑定的认证问题——预览会话改走 Worker 级端点,可用时直接采用返回的交换地址主机名,不再要求账号级子域权限,getPlatformProxy 以及 Wrangler、Cloudflare Vite 插件、Vitest 集成中的远程绑定均受益。miniflare 同步升至 5.20261119.0-beta。
@cloudflare/autoconfig@0.13.32026-11-20
两处调整:一是默认兼容日期 DEFAULTCOMPATDATE 更新为 2026-11-19,新建项目或未显式配置兼容日期时,直接采用内置 workerd 版本对应的日期;二是生成的 cloudflare.config.ts 改为类型导入(type-only import),不再依赖运行时安装 cf,这样没有 package.json 或本地未装 cf 的静态站点目录也能正常加载配置。相关依赖同步升级至 @cloudflare/workers-utils@0.56.0、@cloudflare/cli-shared-helpers@0.3.12 与 @cloudflare/config@1.0.0-rc.3。
@cloudflare/dev-helpers@0.0.12026-11-20
本次为依赖同步更新版本,无新增功能或修复:内部依赖包已统一升级至 miniflare@5.20261119.0-beta、@cloudflare/workers-utils@0.56.0、@cloudflare/config@1.0.0-rc.3 与 @cloudflare/containers-shared@0.27.1,对外行为没有变化,升级后功能与此前保持一致。
@cloudflare/containers-shared@0.27.12026-11-20
本次更新有三处实用改动。其一,DEFAULTCOMPATDATE 更新为 2026-11-19,新建项目或未显式配置兼容性日期时,将默认采用随包发布的 workerd 版本日期。其二,修复部署期间的版本可见性竞态:刚上传的 Worker 版本在最初几秒内可能被 API 时而返回、时而报「未找到」,此前 wrangler versions deploy 会直接失败,而 wrangler deploy 遇到 Durable Object 托管的容器时约 2 秒就放弃并提示容器设置未完全生效;现在两者都会在约 12 秒内持续重试并输出等待日志,同时对服务器错误、限流、超时、网络错误等瞬时故障也按 API 要求重试,其他错误依旧立即失败。其三,不使用 Containers 的项目构建时不再调用 docker image ls 查找历史镜像标签,每次构建可省下约四分之一秒,也不再受 Docker CLI 响应速度拖累;配置了 Containers 的项目以及删除容器后的首次构建仍照常清理标签。
@cloudflare/vite-plugin@2.0.0-rc.3预发布2026-11-20
本次更新包含一项实验性开关与五项修复。
实验性支持让 Local Explorer 信任 Vite 的 allowedHosts:设置 XLOCALEXPLORERUSEVITEALLOWEDHOSTS=true 后,Local Explorer 及 /cdn-cgi/ 端点会采信 server.allowedHosts 与 preview.allowedHosts,支持精确主机名、.example.com 这类后缀及隧道主机名;默认仍为 false,Vite 与 Miniflare 的白名单各自独立,即使开启该选项,allowedHosts: true 下 Miniflare 的默认防护依旧生效。
修复与优化方面:默认兼容日期更新为 2026-11-19,新脚手架及未配置时直接沿用内置 workerd 的日期;纯打包构建不再加载 Miniflare,省去无谓开销;延迟加载的模块在发起请求结束后不再被释放,避免后续请求卡在缓存导入上;无 Containers 的项目构建时不再调用 docker image ls,每次构建约省 0.25 秒;远程绑定改用 Worker 级端点创建预览会话,修复了仅限单个 Worker 的 API Token 鉴权失败问题,涉及 getPlatformProxy、Wrangler、Cloudflare Vite 插件与 Vitest 集成。
@cloudflare/codemods@0.9.02026-11-20
这版有两处值得一提的更新。@cloudflare/codemods/wrangler-to-cf 新增导出 convertWranglerConfig,已解析好 Wrangler 配置的工具可以直接在内存里转成 cf 配置,不必先落盘再跑 migrateWranglerToCf;该入口只加载转换器,不带 codemod 运行器。Wrangler 配置的 images 块新增 urltransformations,用于控制 Worker 请求的 /cdn-cgi/image/ 变换,enabled 必填,allowedorigins 可列出图片来源(["*"] 表示不限),binding 改为可选。cloudflare.config.ts 对应为 Worker 顶层的 images 字段,cf migrate 会一并迁移。注意该配置不被具名环境继承,且 previews 暂不支持。另外默认兼容日期更新为 2026-11-19,脚手架新项目或未配置时采用捆绑 workerd 的日期。
wrangler@4.166.02026-11-20
Minor Changes
- #16961 bf7568a Thanks @dario-piotrowicz! - Show configured trigger targets during experimental wrangler triggers deploy --dry-run
Dry runs now print a "Would deploy" summary of routes, custom domains, cron schedules, Queue producers and consumers, Workflows, event triggers, and Email Routing addresses instead of exiting without a summary. Explicitly empty cron schedules and Email Routing addresses are shown as removals. The preview makes no API requests or authentication checks; when workers.dev is enabled, it reports that setting without looking up the account's subdomain.
- #16679 be6aa81 Thanks @mglewis! - Add images.url_transformations to the Wrangler configuration
The images block now accepts a urltransformations object for controlling /cdn-cgi/image/ transformations on requests served by a Worker. enabled is required, and allowedorigins optionally lists the origins images may be fetched from (use [""] to allow any origin). binding is now optional, so urltransformations can be configured without an Images binding:
``jsonc
{
"images": {
"url_transformations": {
"enabled": true,
"allowed_origins": ["images.example.com"]
}
}
}
`
Like the rest of the images block, url_transformations is not inherited by named environments, and must be specified in each environment that needs it.
cloudflare.config.ts gains the equivalent setting as a top-level images field on the Worker, with the Images binding remaining in env:
`ts
export default defineConfig({
worker: {
name: "my-worker",
compatibilityDate: "2026-11-01",
images: {
urlTransformations: {
enabled: true,
allowedOrigins: ["images.example.com"],
},
},
},
});
`
cf migrate carries images.url_transformations over to this field.
This change adds configuration and validation only. url_transformations is not supported in previews.
- #14114 dce615c Thanks @dario-piotrowicz! - Add --show-diff flag to wrangler triggers deploy
When --show-diff is passed, the command fetches the currently deployed trigger configuration from the remote worker and displays a colored diff against the local configuration before deploying. This covers routes, custom domains, cron schedules, and the workersdev/previewurls subdomain settings. Route and custom-domain lists are fetched only when that category has local entries to deploy, avoiding unnecessary permission requirements. Queue consumers and event triggers are not compared.
The flag also works with --dry-run to preview these changes without actually deploying. Displaying a diff requires authentication, including during a dry run.
Patch Changes
- #17031 95fd4c2 Thanks @dependabot! - Update DEFAULTCOMPATDATE to 2026-11-19
Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured.
- #17031 95fd4c2 Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"
The following dependency versions have been updated:
| Dependency | From | To |
| ------------------------- | ------------- | ------------- |
| @cloudflare/workers-types | ^5.20261118.1 | ^5.20261119.1 |
| workerd | 1.20261118.1 | 1.20261119.1 |
- #16961 bf7568a Thanks @dario-piotrowicz! - Validate external Workflow settings before updating Worker triggers
Reject limits, concurrency, schedules, default_retention, and jurisdiction configured on external Workflows before making trigger API calls. This prevents failed deployments from partially updating workers.dev or routes; dry runs reject the same invalid configurations.
- #17044 56974d4 Thanks @petebacondarwin! - Warn when invocation logs are enabled while logs are disabled
Configuration validation now warns when observability.logs.invocation_logs is true and observability.logs.enabled is false. Invocation logging remains disabled until observability.logs.enabled is set to true.
- #17072 3c91a13 Thanks @mykcs! - Recover when concurrent wrangler preview builds try to create the same Preview name.
If another build creates a Preview after the initial lookup, Wrangler now reads the existing Preview and applies the requested Preview settings instead of failing with Cloudflare API error 100338. Other creation errors still fail, and existing Previews are never deleted.
- #17081 08eeaf4 Thanks @Naapperas! - Wait for a just-uploaded Worker version to become readable during deploys
For a few seconds after a version is uploaded, the Workers API can alternate between returning it and reporting it as not found. wrangler versions deploy failed on the first not-found read, and wrangler deploy for Durable Object-managed containers gave up after about 2 seconds and reported that the container settings were not fully applied.
Both now keep retrying a not-found version for up to about 12 seconds and log a message while they wait. These reads also retry transient API failures, such as server errors, rate limiting, timeouts and network errors, which can wait longer when the API asks for it. Other errors still fail immediately.
- #17030 f3f7bbc Thanks @cpojer! - Stop running Docker at the end of builds for projects with no Containers
Builds that write the Build Output Specification ran docker image ls on every build to find image tags left by a previous build, even when the project configured no Containers. On a machine with Docker installed this added about a quarter of a second to each build, and the build waited on the Docker CLI for as long as it took to respond. The lookup is now skipped when the project has no Containers and the build output being replaced had none either. Projects that configure Containers, and the first build after the last Container is removed, still remove previous tags as before.
- #17043 [4f5b118`](https://github.com/cloudflare/workers-sdk/comm
@cloudflare/cli-shared-helpers@0.3.122026-11-20
默认兼容性日期 DEFAULTCOMPATDATE 更新至 2026-11-19。新建项目脚手架或未显式配置兼容日期时,将直接采用内置 workerd 版本对应的日期,避免新项目与运行时行为不一致。同时同步更新了 @cloudflare/workers-utils 至 0.56.0。
@cloudflare/pages-functions@0.1.132026-11-20
新增 Worker 项目脚手架或未显式配置兼容日期时,默认 DEFAULTCOMPATDATE 已更新为 2026-11-19,与当前捆绑的 workerd 版本保持一致。对已有项目无影响,只有在未指定兼容日期、依赖默认值的情况下,新生成的代码才会按这一日期运行,从而直接获得新版运行时的行为与修复。
@cloudflare/build-output-utils@1.0.0-rc.3预发布2026-11-20
这次补丁把默认兼容日期 DEFAULTCOMPATDATE 更新到 2026-11-19,与随包附带的 workerd 版本保持一致。此前脚手架创建新项目或配置中未填写兼容日期时,可能落到较旧的默认值;现在会直接采用内置 workerd 的兼容日期,避免因日期过旧触发不必要的兼容层行为。升级后新建项目无需手动配置即可对齐当前运行时,已有项目若显式写死了兼容日期则不受影响。同时更新了 @cloudflare/config@1.0.0-rc.3 依赖。