Releases: cloudflare/workers-sdk
Release list
wrangler@4.142.0
Minor Changes
-
#15856
4c2993bThanks @Naapperas! - Support Workflows declared inexportsonctx.exportsin local developmentA Workflow declared in a Worker's
exportsis now available onctx.exportsinwrangler dev, the Vite plugin and the Vitest plugin, with the same API as a Workflow binding:const instance = await ctx.exports.MyWorkflow.create({ params: { name: "World" }, });
ctx.exportsandworkflowsbindings with the same Workflownameshare their instances, including instances created before the Workflow was declared inexports. Two Workers can't export the same Workflow name, and a binding to an exported Workflow must refer to the Worker and class that export it.getPlatformProxy()ignores Workflows declared inexports, since it doesn't run the Worker's code.wrangler workflowscommands run with--localalso work with Workflows declared only inexports, without aworkflowsbinding.In the Vitest plugin,
introspectWorkflow()andintrospectWorkflowInstance()still need a Workflow binding, and now explain how to add one when passed a Workflow fromctx.exports. Instances created throughctx.exportsare introspected too. Aworkflowsbinding whosescript_nameis the Worker's own name now resolves to the Worker itself again.
Patch Changes
-
#15891
8dc53aeThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To @cloudflare/workers-types ^5.20260925.1 ^5.20260926.1 workerd 1.20260925.1 1.20260926.1
@cloudflare/vitest-plugin@1.3.0
Minor Changes
-
#15856
4c2993bThanks @Naapperas! - Support Workflows declared inexportsonctx.exportsin local developmentA Workflow declared in a Worker's
exportsis now available onctx.exportsinwrangler dev, the Vite plugin and the Vitest plugin, with the same API as a Workflow binding:const instance = await ctx.exports.MyWorkflow.create({ params: { name: "World" }, });
ctx.exportsandworkflowsbindings with the same Workflownameshare their instances, including instances created before the Workflow was declared inexports. Two Workers can't export the same Workflow name, and a binding to an exported Workflow must refer to the Worker and class that export it.getPlatformProxy()ignores Workflows declared inexports, since it doesn't run the Worker's code.wrangler workflowscommands run with--localalso work with Workflows declared only inexports, without aworkflowsbinding.In the Vitest plugin,
introspectWorkflow()andintrospectWorkflowInstance()still need a Workflow binding, and now explain how to add one when passed a Workflow fromctx.exports. Instances created throughctx.exportsare introspected too. Aworkflowsbinding whosescript_nameis the Worker's own name now resolves to the Worker itself again.
Patch Changes
- Updated dependencies [
8dc53ae,4c2993b]:- miniflare@5.20260926.0-alpha
- wrangler@4.142.0
@cloudflare/vite-plugin@1.61.0
Minor Changes
-
#15856
4c2993bThanks @Naapperas! - Support Workflows declared inexportsonctx.exportsin local developmentA Workflow declared in a Worker's
exportsis now available onctx.exportsinwrangler dev, the Vite plugin and the Vitest plugin, with the same API as a Workflow binding:const instance = await ctx.exports.MyWorkflow.create({ params: { name: "World" }, });
ctx.exportsandworkflowsbindings with the same Workflownameshare their instances, including instances created before the Workflow was declared inexports. Two Workers can't export the same Workflow name, and a binding to an exported Workflow must refer to the Worker and class that export it.getPlatformProxy()ignores Workflows declared inexports, since it doesn't run the Worker's code.wrangler workflowscommands run with--localalso work with Workflows declared only inexports, without aworkflowsbinding.In the Vitest plugin,
introspectWorkflow()andintrospectWorkflowInstance()still need a Workflow binding, and now explain how to add one when passed a Workflow fromctx.exports. Instances created throughctx.exportsare introspected too. Aworkflowsbinding whosescript_nameis the Worker's own name now resolves to the Worker itself again.
Patch Changes
- Updated dependencies [
8dc53ae,4c2993b]:- miniflare@5.20260926.0-alpha
- wrangler@4.142.0
@cloudflare/runtime-types@0.1.4
@cloudflare/remote-bindings@0.0.37
Patch Changes
- Updated dependencies [
8dc53ae,4c2993b]:- miniflare@5.20260926.0-alpha
- @cloudflare/deploy-helpers@0.18.1
- @cloudflare/workers-utils@0.44.0
@cloudflare/deploy-helpers@0.18.1
Patch Changes
- Updated dependencies [
cde5d99,8dc53ae,77e79b2,4c2993b]:- @cloudflare/config@0.20.0
- miniflare@5.20260926.0-alpha
- @cloudflare/containers-shared@0.20.3
- @cloudflare/workers-utils@0.44.0
@cloudflare/config@0.20.0
Minor Changes
-
#15877
cde5d99Thanks @jamesopstad! - Add cross-Worker Workflow bindings to the experimental configuration APIWorkflow bindings can now identify a Workflow by name and reference the Worker and exported
WorkflowEntrypointclass that define it.
Patch Changes
-
#15880
77e79b2Thanks @jamesopstad! - Restore configuration field documentation indefine*helpersVS Code now displays JSDoc for fields passed to
defineConfig,defineContainer, anddefineWorkerwhile retaining their exact inferred config types.