Files
wehub-resource-sync 70bf21e064
Deploy (to testing) and Test Playground Preview Worker / Deploy Playground Preview Worker (testing) (push) Has been skipped
Deploy Workers Shared Staging / Deploy Workers Shared Staging (push) Failing after 0s
Prerelease / build (push) Has been skipped
Handle Changesets / Handle Changesets (push) Has been cancelled
Semgrep OSS scan / semgrep-oss (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:30:11 +08:00

45 KiB

@cloudflare/workers-utils

0.26.0

Minor Changes

  • #14591 0283a1f Thanks @dario-piotrowicz! - Export getInstalledPackageVersion, getPackagePath, and isPackageInstalled utilities

    Package resolution helpers that were previously internal to @cloudflare/autoconfig are now exported from @cloudflare/workers-utils so they can be shared across packages without pulling in the full autoconfig dependency.

    getPackagePath now also consistently returns a directory path. Previously the fallback resolution strategy could return a file path (the package entry point) instead of its containing directory.

0.25.1

Patch Changes

  • #14530 aad35b7 Thanks @Partha-Shankar! - Validate optional configuration fields for D1 database bindings

    Enforce type checks for the optional D1 database properties database_name, migrations_dir, migrations_table, and database_internal_env to ensure consistency with other binding types.

  • #14492 1ac96a1 Thanks @penalosa! - Replace the CommonJS xdg-app-paths dependency with a vendored pure-ESM implementation

    xdg-app-paths (and its xdg-portable/os-paths dependencies) are CommonJS only, which caused "Dynamic require of 'path' is not supported" errors when the surrounding code was bundled to ESM. The global config/cache directory resolution is now provided by a small, dependency-free pure-ESM module in @cloudflare/workers-utils that reproduces the previous path resolution exactly (verified against the real package in unit tests), so existing config and credential locations are unchanged. This also drops the transitive fsevents optional dependency that xdg-app-paths pulled in.

    Miniflare and create-cloudflare now consume the shared helpers from @cloudflare/workers-utils instead of maintaining their own copies, importing node-only leaf entry points (@cloudflare/workers-utils/fs-helpers, @cloudflare/workers-utils/global-wrangler-config-path) where ESM bundling is required.

  • #14570 1ca8d8f Thanks @penalosa! - Upgrade signal-exit from v3 to v4

    The bundled signal-exit dependency was CJS-only. Upgrading to v4 (which ships a dual ESM/CJS build) unblocks ESM output. Exit-cleanup behaviour is unchanged, though v4 no longer registers handlers for a few signals that are no longer supported by the OS (SIGUNUSED on Linux; SIGABRT/SIGALRM on Windows).

0.25.0

Minor Changes

  • #14474 aa5d580 Thanks @WillTaylorDev! - Add cache options for WorkerEntrypoint exports

    You can now set cache options on WorkerEntrypoint exports and configure cross-version cache behavior globally:

    // wrangler.json
    {
      "cache": { "enabled": true, "cross_version_cache": true },
      "exports": {
        "default": {
          "type": "worker",
          "cache": { "enabled": false }
        },
        "Admin": {
          "type": "worker",
          "cache": { "enabled": true }
        }
      }
    }
    

    Wrangler sends the exports config to the deploy and version upload APIs alongside the global cache.enabled and cache.cross_version_cache settings. The platform resolves those global settings plus cache overrides on exports and validates which entrypoint names are cacheable.

0.24.0

Minor Changes

  • #14295 cfd6205 Thanks @dario-piotrowicz! - Move unstable_getWorkerNameFromProject from wrangler to @cloudflare/workers-utils

    The unstable_getWorkerNameFromProject export has been removed from the wrangler package. This function is now available as getWorkerNameFromProject (without the unstable_ prefix) from @cloudflare/workers-utils. If you were importing this function from wrangler, update your import to use @cloudflare/workers-utils instead.

  • #14295 cfd6205 Thanks @dario-piotrowicz! - Add PackageManager type and constants

    Added the PackageManager interface and package manager constants (NpmPackageManager, PnpmPackageManager, YarnPackageManager, BunPackageManager).

0.23.2

Patch Changes

  • #14347 673b09e Thanks @jamesopstad! - Update undici from 7.24.8 to 7.28.0

  • #14269 5dfb788 Thanks @mattjohnsonpint! - Support dev.plugin on typed services bindings

    Wrangler only honored dev.plugin on unsafe.bindings entries, so users authoring a service binding via services[] could not wire it to a local Miniflare plugin during wrangler dev — they had to fall back to unsafe.bindings and accept a "directly supported by wrangler" warning. Typed services bindings now accept the same dev: { plugin, options? } shape, route the binding through Miniflare's external-plugin pathway in wrangler dev, and strip the field at deploy time. Validation rejects malformed dev shapes.

0.23.1

Patch Changes

  • #14282 ecfdd5a Thanks @edmundhung! - Fix wrangler dev asset fallback with custom routes

    wrangler dev now applies Workers Assets fallback behavior consistently when routes are configured, including SPA fallback and 404-page handling.

0.23.0

Minor Changes

  • #14089 c6c61b5 Thanks @alsuren! - Add migrations_pattern to D1 database bindings

    The D1 binding now accepts an optional migrations_pattern field, allowing you to point wrangler d1 migrations apply and wrangler d1 migrations list at migration files in nested layouts (e.g. ORM-generated folders like migrations/0000_init/migration.sql).

    migrations_pattern is a glob (relative to the wrangler config file) and defaults to ${migrations_dir}/*.sql, which preserves today's behaviour. Files that do not match the pattern are not executed.

    {
      "d1_databases": [
        {
          "binding": "DB",
          "database_name": "my-db",
          "database_id": "...",
          "migrations_dir": "migrations",
          "migrations_pattern": "migrations/*/migration.sql"
        }
      ]
    }
    

    When no migrations match the configured pattern but files matching the common migrations/*/migration.sql (drizzle-style) layout do exist, Wrangler logs a hint suggesting migrations_pattern as an opt-in.

    wrangler d1 migrations create now returns an actionable error if the generated migration filename would not match the configured pattern.

  • #14164 b502d54 Thanks @G4brym! - Rename the web_search binding kind to websearch

    Pre-launch rename of the public binding type from web_search to websearch so the on-the-wire shape matches the product name (Web Search). The wrangler config key, the binding-type string sent to the Cloudflare API, and the miniflare option key all move from web_search / webSearch to websearch.

    Update your wrangler config:

    - "web_search": { "binding": "WEBSEARCH" }
    + "websearch": { "binding": "WEBSEARCH" }
    

    The runtime WebSearch type exposed on env.WEBSEARCH is unchanged.

  • #14146 c4f45e8 Thanks @dario-piotrowicz! - Simplify constructWranglerConfig to accept a single worker instead of an array

    The constructWranglerConfig function now accepts a single APIWorkerConfig object instead of APIWorkerConfig | APIWorkerConfig[]. The multi-environment array support has been removed since the array use-case was removed and now the only call site already passes a single worker object. This is a breaking change to the function's public signature.

0.22.1

Patch Changes

  • #14084 e86489a Thanks @dario-piotrowicz! - Correctly map JSON bindings in mapWorkerMetadataBindings

    The json binding case used literal keys name and json instead of a computed property key [binding.name]: binding.json. This caused JSON bindings to always produce { name: "<binding_name>", json: <value> } instead of { <binding_name>: <value> }, clobbering any existing vars with those keys. This is now consistent with how plain_text bindings are mapped.

  • #14105 337e912 Thanks @dario-piotrowicz! - Remove trailing periods from URLs in terminal output

    URLs printed to the terminal with a sentence-ending period (e.g. https://example.com/path.) would include the period when clicked in some terminal emulators, causing 404 errors. This removes trailing periods from all URLs displayed in CLI output across wrangler, miniflare, vitest-pool-workers, and workers-utils.

  • #14063 65b5f9e Thanks @emily-shen! - Move fetch helpers into @cloudflare/workers-utils

    Shared Cloudflare API fetch helper types and plumbing now live in @cloudflare/workers-utils so Wrangler and other clients can use the same implementation.

0.22.0

Minor Changes

  • #14087 e3c862a Thanks @edmundhung! - Add support for the new web_search binding kind.

    Cloudflare Web Search is a managed, zero-setup web discovery primitive for agents and Workers. Declare the binding as a single object in wrangler.jsonc:

    {
      "web_search": { "binding": "WEBSEARCH" }
    }
    

    There is exactly one shared web corpus, so there is no namespace, instance, or other field to specify -- only the variable name. The binding exposes a single search() method that returns URLs and catalog metadata for a query. Web Search is discovery-only -- to read a result's content the caller invokes the global fetch() API against the result's url.

    The binding is always remote in local development: Miniflare proxies to the production Web Search service via the remote-bindings transport. Adds the websearch.run OAuth scope to wrangler login.

    Also adds a wrangler websearch search command for running ad-hoc queries from the CLI:

    npx wrangler websearch search "cloudflare workers"
    npx wrangler websearch search "cloudflare workers" --limit 5
    npx wrangler websearch search "cloudflare workers" --json
    

    --limit is optional (defaults to 10, capped at 20). --json prints the raw response; without it the results render as a pretty table.

  • #14087 e3c862a Thanks @edmundhung! - Rename pipeline field to stream in pipeline bindings configuration

    The pipeline field inside pipelines bindings has been renamed to stream to align with the updated API wire format. The old pipeline field is still accepted but deprecated and will emit a warning.

    Before:

    // wrangler.json
    {
      "pipelines": [
        {
          "binding": "MY_PIPELINE",
          "pipeline": "my-stream-name"
        }
      ]
    }
    

    After:

    // wrangler.json
    {
      "pipelines": [
        {
          "binding": "MY_PIPELINE",
          "stream": "my-stream-name"
        }
      ]
    }
    

Patch Changes

  • #14111 599b27a Thanks @nikitacano! - Fix cloudflared SHA256 checksum mismatch on macOS

    The update service (update.argotunnel.com) returns a checksum for the extracted binary, not the .tgz tarball. We were computing the SHA256 of the tarball itself, which always mismatched on macOS where cloudflared is distributed as a compressed archive.

    This aligns with cloudflared's own auto-updater (cmd/cloudflared/updater/workers_update.go), which decompresses the tarball first, then checksums the resulting binary. We now do the same: extract, then verify.

  • #14087 e3c862a Thanks @edmundhung! - Filter compatibility date fallback warning when no update is available

    The compatibility date warning from workerd (e.g., "The latest compatibility date supported by the installed Cloudflare Workers Runtime is...") is now only shown when a newer version of @cloudflare/vite-plugin is available. This matches the behavior in Wrangler and reduces noise when the user is already on the latest version.

    The update-check logic has been extracted to @cloudflare/workers-utils so it can be shared across packages.

0.21.1

Patch Changes

  • #13933 90092c0 Thanks @petebacondarwin! - Mark @cloudflare/workers-utils as side-effect-free and properly declare undici as a runtime dependency

    The package now declares "sideEffects": false in its package.json so that downstream bundlers can tree-shake unused exports. In particular, consumers that only use a subset of the package (for example, getTodaysCompatDate from the main entry) will no longer carry the cloudflared / tunnel exports — or their transitive dependencies — in their final bundle.

    undici has been moved from devDependencies to dependencies. Previously it was incorrectly listed as a devDependency while the bundler config marked it as external, leaving the published dist/index.mjs with an unresolved import { fetch } from "undici" for anyone installing the package directly. undici is deliberately kept external (rather than bundled) so that downstream consumers don't end up with two copies of undici in their bundle — which would break instanceof Request/Response/Headers checks across the boundary and prevent setGlobalDispatcher / proxy configuration from applying to the bundled copy.

    vitest has been added as an optional peerDependency because the ./test-helpers sub-export uses vitest's vi, beforeEach, and afterEach APIs at runtime; consumers that import from ./test-helpers must have vitest installed themselves.

0.21.0

Minor Changes

  • #12279 248bc08 Thanks @penalosa! - Add deprecation warning for delivery_delay in queue producer bindings

    The delivery_delay setting in [[queues.producers]] was silently having no effect since 2024. This change adds a deprecation warning when the setting is used, informing users that queue-level settings should be configured using wrangler queues update instead. The setting will be removed in a future version.

0.20.0

Minor Changes

  • #13055 f3fed88 Thanks @GregBrimble! - Introducing the cache configuration option for Workers.

    You can now set { cache: { enabled: true } } in your Wrangler configuration file to enable a HTTP cache in front of your Worker's fetch handler. This is also supported in [previews] configuration — previews.cache overrides the top-level cache setting for preview deployments, and falls back to the top-level value when absent. More information can be found in our documentation.

0.19.0

Minor Changes

  • #13810 2b8c0cc Thanks @jamesopstad! - Stabilize the secrets configuration property

    The secrets property in the Wrangler config file is no longer experimental and will no longer emit an experimental warning when used. Required secrets are validated during local development and deploy, and used as the source of truth for type generation.

    {
      "secrets": {
        "required": ["API_KEY", "DB_PASSWORD"]
      }
    }
    

0.18.0

Minor Changes

  • #13222 5680287 Thanks @maxwellpeterson! - Add enabled and previews_enabled support for custom domain routes

    Custom domain routes can now include optional enabled and previews_enabled boolean fields to control whether a custom domain serves production and/or preview traffic. When omitted, the API defaults apply (production enabled, previews disabled).

  • #13651 47ac63f Thanks @penalosa! - Publish @cloudflare/cli-shared-helpers and @cloudflare/workers-utils to npm

0.17.0

Minor Changes

  • #13326 4a9ba90 Thanks @mattzcarey! - Add Artifacts binding support to wrangler

    You can now configure Artifacts bindings in your wrangler configuration:

    // wrangler.jsonc
    {
      "artifacts": [{ "binding": "MY_ARTIFACTS", "namespace": "default" }]
    }
    

    Type generation produces the correct Artifacts type reference from the workerd type definitions:

    interface Env {
      MY_ARTIFACTS: Artifacts;
    }
    
  • #13571 7dc0433 Thanks @must108! - Add regional and jurisdictional placement constraints for Containers. Users can now set constraints.regions and constraints.jurisdiction in wrangler config to control where containers run.

Patch Changes

  • #13516 4eb1da9 Thanks @jonnyparris! - Rename "Browser Rendering" to "Browser Run" in all user-facing strings, error messages, and CLI output.

0.16.1

Patch Changes

  • #13468 051db1f Thanks @jamesopstad! - Make all properties in previews optional

    All properties in previews were previously incorrectly typed as required.

0.16.0

Minor Changes

  • #13139 79fd529 Thanks @roerohan! - feat: add Flagship feature flag binding support

    Adds end-to-end support for the Flagship feature flag binding, which allows Workers to evaluate feature flags from Cloudflare's Flagship service. Configure it in wrangler.json with a flagship array containing binding and app_id entries. In local dev, the binding returns default values for all flag evaluations; use "remote": true in the binding to evaluate flags against the live Flagship service.

0.15.0

Minor Changes

  • #13011 b9b7e9d Thanks @ruifigueira! - Add experimental headful browser rendering support for local development

    Experimental: This feature may be removed or changed without notice.

    When developing locally with the Browser Rendering API, you can enable headful (visible) mode via the X_BROWSER_HEADFUL environment variable to see the browser while debugging:

    X_BROWSER_HEADFUL=true wrangler dev
    X_BROWSER_HEADFUL=true vite dev
    

    Note: when using @cloudflare/playwright, two Chrome windows may appear — the initial blank page and the one created by browser.newPage(). This is expected behavior due to how Playwright handles browser contexts via CDP.

  • #13051 d5bffde Thanks @dario-piotrowicz! - Remove formatCompatibilityDate from the package's public exports

    This utility has been removed from the public API. Callers should use getTodaysCompatDate() from @cloudflare/workers-utils instead.

  • #13051 d5bffde Thanks @dario-piotrowicz! - Remove getLocalWorkerdCompatibilityDate from the package

    This utility has been removed because its implementation besides being unreliable is no longer needed. Callers should now use today's date as the compatibility date directly, e.g. via getTodaysCompatDate() from @cloudflare/workers-utils.

  • #12992 48d83ca Thanks @RiscadoA! - Add vpc_networks binding support for routing Worker traffic through a Cloudflare Tunnel or network.

    {
      "vpc_networks": [
        // Route through a specific Cloudflare Tunnel
        { "binding": "MY_FIRST_VPC", "tunnel_id": "<tunnel-id>" },
        // Route through the Cloudflare One mesh network
        { "binding": "MY_SECOND_VPC", "network_id": "cf1:network" }
      ]
    }
    
  • #13051 d5bffde Thanks @dario-piotrowicz! - Add getTodaysCompatDate() utility function

    Returns today's date as a YYYY-MM-DD string.

0.14.0

Minor Changes

  • #13027 9fcdfca Thanks @G4brym! - feat: Add ai_search_namespaces and ai_search binding types

    Two new binding types for AI Search:

    • ai_search_namespaces: Namespace binding — namespace is required and auto-provisioned at deploy time if it doesn't exist (like R2 buckets)
    • ai_search: Single instance binding bound directly to a pre-existing instance in the default namespace

    Both are remote-only in local dev.

Patch Changes

  • #13018 9c5ebf5 Thanks @tgarg-cf! - Validate that queue consumers in wrangler config only use the "worker" type

    Previously, non-worker consumer types (e.g. http_pull) could be specified in the queues.consumers config. Now, wrangler will error if a consumer type other than "worker" is specified in the config file.

    To configure non-worker consumer types, use the wrangler queues consumer CLI commands instead (e.g. wrangler queues consumer http-pull add).

0.13.0

Minor Changes

  • #12957 62545c9 Thanks @natewong1313! - Add Stream binding support to Wrangler and workers-utils

    Wrangler and workers-utils now recognize the stream binding in configuration, deployment metadata, and generated worker types. This enables projects to declare Stream bindings in wrangler.json and have the binding represented consistently across validation, metadata mapping, and type generation.

0.12.0

Minor Changes

  • #12677 eccd014 Thanks @jamesopstad! - Add experimental secrets property to config validation

  • #12625 c0e9e08 Thanks @WillTaylorDev! - Add cache configuration option for enabling worker cache (experimental)

    You can now enable cache before worker execution using the new cache configuration:

    {
      "cache": {
        "enabled": true
      }
    }
    

    This setting is environment-inheritable and opt-in. When enabled, cache behavior is applied before your worker runs.

    Note: This feature is experimental. The runtime API is not yet generally available.

0.11.2

Patch Changes

  • #12629 603fe18 Thanks @petebacondarwin! - Add removeDir and removeDirSync helpers with automatic retry logic for Windows EBUSY errors

    These new helpers wrap fs.rm/fs.rmSync with maxRetries: 5 and retryDelay: 100 to handle cases where file handles aren't immediately released (common on Windows with workerd). The async helper also has a fireAndForget option to silently swallow errors and not await removal.

    This improves reliability of cleanup operations across the codebase.

0.11.1

Patch Changes

  • #12601 ebdbe52 Thanks @43081j! - Switch to empathic for file-system upwards traversal to reduce dependency bloat.

  • #12602 58a4020 Thanks @anonrig! - Optimize filesystem operations by using Node.js's throwIfNoEntry: false option

    This reduces the number of system calls made when checking for file existence by avoiding the overhead of throwing and catching errors for missing paths. This is an internal performance optimization with no user-visible behavioral changes.

0.11.0

Minor Changes

  • #12466 caf9b11 Thanks @petebacondarwin! - Add WRANGLER_CACHE_DIR environment variable and smart cache directory detection

    Wrangler now intelligently detects where to store cache files:

    1. Use WRANGLER_CACHE_DIR env var if set
    2. Use existing cache directory if found (node_modules/.cache/wrangler or .wrangler/cache)
    3. Create cache in node_modules/.cache/wrangler if node_modules exists
    4. Otherwise use .wrangler/cache

    This improves compatibility with Yarn PnP, pnpm, and other package managers that don't use traditional node_modules directories, without requiring any configuration.

0.10.0

Minor Changes

  • #12461 8809411 Thanks @penalosa! - Support type: inherit bindings when using startWorker()

    This is an internal binding type that should not be used by external users of the API

0.9.1

Patch Changes

  • #12368 bd4bb98 Thanks @KianNH! - Preserve Containers configuration when using versions commands

    Previously, commands like wrangler versions upload would inadvertently disable Containers on associated Durable Object namespaces because the containers property was being omitted from the API request body.

0.9.0

Minor Changes

  • #11803 1bd1488 Thanks @dario-piotrowicz! - Add a new subrequests limit to the limits field of the Wrangler configuration file

    Before only the cpu_ms limit was supported in the limits field of the Wrangler configuration file, now a subrequests limit can be specified as well which enables the user to limit the number of fetch requests that a Worker's invocation can make.

    Example:

    {
      "$schema": "./node_modules/wrangler/config-schema.json",
      "limits": {
        "cpu_ms": 1000,
        "subrequests": 150 // newly added field
      }
    }
    

0.8.1

Patch Changes

  • #12156 abd2b71 Thanks @irvinebroque! - Fix compatibility date detection failing when creating new projects

    Previously, getLocalWorkerdCompatibilityDate() would fail to find the locally installed miniflare and workerd packages, causing npm create cloudflare@latest to fall back to a hardcoded date (2025-09-27) instead of using the current workerd compatibility date.

    The issue was that module.createRequire() was called with a directory path. Node.js treats this as a filename at that location and looks for node_modules in the parent directory rather than the intended directory. This is now fixed by appending package.json to the path, which ensures module resolution starts from the correct location.

    Fixes #12155

  • #11969 9acb24b Thanks @emily-shen! - Validate environments for unexpected fields in Wrangler config

    Previously, this check only applied to the top-level environment.

0.8.0

Minor Changes

  • #12008 e414f05 Thanks @penalosa! - Add support for customising the inspector IP address

    Adds a new --inspector-ip CLI flag and dev.inspector_ip configuration option to allow customising the IP address that the inspector server listens on. Previously, the inspector was hardcoded to listen only on 127.0.0.1.

    Example usage:

    # CLI flag
    wrangler dev --inspector-ip 0.0.0.0
    
    // wrangler.json
    {
      "dev": {
        "inspector_ip": "0.0.0.0"
      }
    }
    
  • #12034 05714f8 Thanks @emily-shen! - Add a no-op local explorer worker, which is gated by the experimental flag X_LOCAL_EXPLORER.

0.7.1

Patch Changes

  • #11946 fa39a73 Thanks @MattieTK! - Fix configFileName returning wrong filename for .jsonc config files

    Previously, users with a wrangler.jsonc config file would see error messages and hints referring to wrangler.json instead of wrangler.jsonc. This was because the configFormat function collapsed both .json and .jsonc files into a single "jsonc" value, losing the distinction between them.

    Now configFormat returns "json" for .json files and "jsonc" for .jsonc files, allowing configFileName to return the correct filename for each format.

0.7.0

Minor Changes

  • #11755 0f8d69d Thanks @nikitassharma! - Users can now specify constraints.tiers for their container applications. tier is deprecated in favor of tiers. If left unset, we will default to tiers: [1, 2]. Note that constraints is an experimental feature.

0.6.0

Minor Changes

  • #11702 f612b46 Thanks @gpanders! - Add support for trusted_user_ca_keys in Wrangler

    You can now configure SSH trusted user CA keys for containers. Add the following to your wrangler.toml:

    [[containers.trusted_user_ca_keys]]
    public_key = "ssh-ed25519 AAAAC3..."
    

    This allows you to specify CA public keys that can be used to verify SSH user certificates.

  • #11620 25f6672 Thanks @dario-piotrowicz! - Expose a new getLocalWorkerdCompatibilityDate utility that allows callers to get the compatibility date of the locally installed workerd package.

  • #11616 fc95831 Thanks @NuroDev! - Add type generation support to wrangler dev

    You can now have your worker configuration types be automatically generated when the local Wrangler development server starts.

    To use it you can either:

    1. Add the --types flag when running wrangler dev.
    2. Update your Wrangler configuration file to add the new dev.generate_types boolean property.
    {
      "$schema": "node_modules/wrangler/config-schema.json",
      "name": "example",
      "main": "src/index.ts",
      "compatibility_date": "2025-12-12",
      "dev": {
        "generate_types": true
      }
    }
    
  • #11620 25f6672 Thanks @dario-piotrowicz! - Expose new isCompatDate utility that discerns whether a string represents a compatibility date or not

Patch Changes

  • #11737 2cfea12 Thanks @NuroDev! - Fix the triggers JSON schema default value to use valid JSON ({"crons":[]}) instead of an invalid JavaScript literal, which was causing IDE auto-completion to insert a string rather than an object.

  • #11651 d123ad0 Thanks @dario-piotrowicz! - Surface error in diagnostics when TOML date/time values are used in vars

    TOML parses unquoted date/time values like DATE = 2024-01-01 as TOML Date, Date-Time, and Time values. The config validation now surfaces an error in the diagnostics result when this type of values are encountered, with a clear message telling you to quote the value as a string, e.g. DATE = "2024-01-01".

  • #11693 385ec7f Thanks @vicb! - Update the signature of ParseTOML to drop the Generics.

    Use an explicit cast where required.

0.5.0

Minor Changes

  • #11661 4b3fba2 Thanks @edmundhung! - Add getOpenNextDeployFromEnv() environment variable helper which will be used to signal the current process is being run by the open-next deploy command.

  • #11621 90c0676 Thanks @dario-piotrowicz! - Expose writeWranglerConfig, writeDeployRedirectConfig, writeRedirectedWranglerConfig and readWranglerConfig from /test-helpers

0.4.0

Minor Changes

  • #10937 9514c9a Thanks @ReppCodes! - Add support for "targeted" placement mode with region, host, and hostname fields

    This change adds a new mode to placement configuration. You can specify one of the following fields to target specific external resources for Worker placement:

    • region: Specify a region identifier (e.g., "aws:us-east-1") to target a region from another cloud service provider
    • host: Specify a host with (required) port (e.g., "example.com:8123") to target a TCP service
    • hostname: Specify a hostname (e.g., "example.com") to target an HTTP resource

    These fields are mutually exclusive - only one can be specified at a time.

    Example configuration:

    [placement]
    host = "example.com:8123"
    

0.3.0

Minor Changes

  • #11349 aa4a5f1 Thanks @petebacondarwin! - Adds a new test-helpers entry-point to the workers-utils package

  • #11228 43903a3 Thanks @petebacondarwin! - Support CLOUDFLARE_ENV environment variable for selecting the active environment

    This change enables users to select the environment for commands such as CLOUDFLARE_ENV=prod wrangler versions upload. The --env command line argument takes precedence.

    The CLOUDFLARE_ENV environment variable is mostly used with the @cloudflare/vite-plugin to select the environment for building the Worker to be deployed. This build also generates a "redirected deploy config" that is flattened to only contain the active environment. To avoid accidentally deploying a version that is built for one environment to a different environment, there is an additional check to ensure that if the user specifies an environment in Wrangler it matches the original selected environment from the build.

0.2.0

Minor Changes

  • #11233 c922a81 Thanks @emily-shen! - Add containers.unsafe to allow internal users to use additional container features

0.1.2

Patch Changes

  • #11339 dfba912 Thanks @dario-piotrowicz! - Fix mapWorkerMetadataBindings and constructWranglerConfig incorrectly throwing an error when encountering assets bindings

    Currently mapWorkerMetadataBindings and constructWranglerConfig when provided data containing an assets binding throw the following error:

     the error "`wrangler init --from-dash` is not yet supported for Workers with Assets"
    

    This is incorrect and wrangler init specific, the changes here make sure that such error is not thrown and that the assets binding is instead handled

0.1.1

Patch Changes

  • #11286 8e99766 Thanks @dario-piotrowicz! - fix: make sure that experimental_patchConfig doesn't throw if it encounters a null value

  • #11266 09cb720 Thanks @penalosa! - Use the smol-toml library for parsing TOML instead of @iarna/toml

  • #11269 03cbd48 Thanks @vicb! - export property validators

  • #11286 8e99766 Thanks @dario-piotrowicz! - fix: In constructWranglerConfig make sure that if the API value of tail_consumers is null that is converted to undefined (since null is not a valid tail_consumers config value)

0.1.0

Minor Changes

  • #11146 d7a2037 Thanks @penalosa! - Change the input types of constructWranglerConfig() to better match the API

0.0.2

Patch Changes

  • #11097 55657eb Thanks @penalosa! - First publish of a WIP experimental utils package.

  • #11118 d47f166 Thanks @zebp! - Fix validation of the persist field of observability logs and traces configuration