Skip to content

@cloudflare/codemods@0.9.0

Choose a tag to compare

@workers-devprod workers-devprod released this 20 Nov 18:22
· 1 commit to main since this release
Immutable release. Only release title and notes can be modified.
27b3f71

Minor Changes

  • #17068 aabe9f5 Thanks @cpojer! - Export the Wrangler config converter from @cloudflare/codemods/wrangler-to-cf

    Tools that already hold a parsed Wrangler configuration can now convert it to the cf configuration in memory with convertWranglerConfig, instead of writing a wrangler.json and running migrateWranglerToCf on it. The new entry point loads only the converter, not the codemod runner.

  • #16679 be6aa81 Thanks @mglewis! - Add images.url_transformations to the Wrangler configuration

    The images block now accepts a url_transformations object for controlling /cdn-cgi/image/ transformations on requests served by a Worker. enabled is required, and allowed_origins optionally lists the origins images may be fetched from (use ["*"] to allow any origin). binding is now optional, so url_transformations can be configured without an Images binding:

    {
      "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:

    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.

Patch Changes

  • #17031 95fd4c2 Thanks @dependabot! - Update DEFAULT_COMPAT_DATE 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.