Repository navigation
@cloudflare/codemods@0.8.0
Minor Changes
-
#16246
349fc4eThanks @leostera! - Start local Workflows from Artifacts eventsDeclare Artifacts events on
exports.workflow({ name, events })incloudflare.config.tsto start the owning Workflow locally incf, Vite, and Workers Vitest. Wrangler configurations continue to usetriggers.events. Native config conversion derives those targets from the Workflow export, andcf migrateattaches existing event subscriptions to their matching Workflow exports.Local Artifacts namespaces publish the documented
cf.artifacts.*messages for repository create, import, fork, and delete operations and token creation and revocation. Successful create, import, and fork operations also publish the initial token-created event. Delivery follows the committed mutation, is unordered, and does not fail the repository operation if a destination rejects it. Push, clone, and fetch events are not yet published locally. This feature does not provide local Artifacts-to-queue subscriptions.
Patch Changes
-
#16907
0bf81acThanks @jamesopstad! - Generate the release candidate@cloudflare/configfield names inwrangler-to-cfThe codemod now writes:
first_party_workerasexperimental.firstPartyWorker- Pipelines bindings as
bindings.pipeline({ streamId }) - K2 bindings as
bindings.k2({ id }) - the Analytics SQL binding as
bindings.analyticsSql()
A Pipelines binding that uses the deprecated
pipelinefield gets aSTREAM_IDplaceholder and a follow-up asking for the stream ID, because that field names a legacy pipeline, which@cloudflare/configdoesn't support. -
#16921
6785363Thanks @jamesopstad! - Install the Vite plugin release candidate inwrangler-to-cfThe Wrangler-to-cf migration now installs
@cloudflare/vite-plugin@^2.0.0-rc.0instead of thebetadist tag, which no longer receives new releases. It upgrades projects whose plugin is declared as a dist tag or resolves to a version older than the release candidate, since earlier betas don't support the generated configuration. The range also covers the stable v2 releases, so the migration no longer rewritespackage.jsonto a dist tag after installing. -
#16946
e97c9f8Thanks @dependabot! - UpdateDEFAULT_COMPAT_DATEto 2026-11-16Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured.