Skip to content

Releases: cloudflare/workers-sdk

[email protected]

16 Jan 18:54
9b519cc
Compare
Choose a tag to compare

Patch Changes

[email protected]

16 Jan 10:06
cc4af98
Compare
Choose a tag to compare

Minor Changes

  • #5086 8faf2c0 Thanks @dario-piotrowicz! - add --strict-vars option to wrangler types

    add a new --strict-vars option to wrangler types that developers can (by setting the
    flag to false) use to disable the default strict/literal types generation for their variables

    opting out of strict variables can be useful when developers change often their vars values,
    even more so when multiple environments are involved

    Example

    With a toml containing:

    [vars]
    MY_VARIABLE = "production_value"
    MY_NUMBERS = [1, 2, 3]
    
    [env.staging.vars]
    MY_VARIABLE = "staging_value"
    MY_NUMBERS = [7, 8, 9]

    the wrangler types command would generate the following interface:

    interface Env {
            MY_VARIABLE: "production_value" | "staging_value";
            MY_NUMBERS: [1,2,3] | [7,8,9];
    }
    

    while wrangler types --strict-vars=false would instead generate:

    interface Env {
            MY_VARIABLE: string;
            MY_NUMBERS: number[];
    }
    

    (allowing the developer to easily change their toml variables without the
    risk of breaking typescript types)

Patch Changes

  • #7720 902e3af Thanks @vicb! - chore(wrangler): use the unenv preset from @cloudflare/unenv-preset

  • #7760 19228e5 Thanks @vicb! - chore: update unenv dependency version

  • #7735 e8aaa39 Thanks @penalosa! - Unwrap the error cause when available to send to Sentry

  • #5086 8faf2c0 Thanks @dario-piotrowicz! - fix: widen multi-env vars types in wrangler types

    Currently, the type generated for vars is a string literal consisting of the value of the variable in the top level environment. If multiple environments
    are specified this wrongly restricts the type, since the variable could contain any of the values from each of the environments.

    For example, given a wrangler.toml containing the following:

    [vars]
    MY_VAR = "dev value"
    
    [env.production.vars]
    MY_VAR = "prod value"
    

    running wrangler types would generate:

    interface Env {
      MY_VAR: "dev value";
    }

    making typescript incorrectly assume that MY_VAR is always going to be "dev value"

    after these changes, the generated interface would instead be:

    interface Env {
      MY_VAR: "dev value" | "prod value";
    }
  • #7733 dceb196 Thanks @emily-shen! - feat: pull resource names for provisioning from config if provided

    Uses database_name and bucket_name for provisioning if specified. For R2, this only happens if there is not a bucket with that name already. Also respects R2 jurisdiction if provided.

  • Updated dependencies []:

[email protected]

16 Jan 18:54
9b519cc
Compare
Choose a tag to compare

Patch Changes

  • #7791 f8c11d7 Thanks @CarmenPopoviciu! - Reverts #7639

    Seems like our prev release of the workers-playground broke things. We are seeing a spike of related errors. We are therefore reverting the changes

[email protected]

16 Jan 10:06
cc4af98
Compare
Choose a tag to compare

Patch Changes

[email protected]

16 Jan 10:06
cc4af98
Compare
Choose a tag to compare

Patch Changes

  • #7774 f9344a0 Thanks @CarmenPopoviciu! - Fix regression in C3's next template

    #7676 switched C3 templates to default to wrangler.json instead of wrangler.toml. Unfortunately, this unintendedly broke the next template, which was still attempting to read wrangler.toml specifically. This commit fixes the regression.

    Fixes #7770

@cloudflare/[email protected]

16 Jan 20:27
fe1e344
Compare
Choose a tag to compare

Patch Changes

  • #7790 c588c8a Thanks @WalshyDev! - fix: remove --experimental-versions flag from the Asset/Router Workers deploy scripts, now that Wrangler has removed the flag.

@cloudflare/[email protected]

16 Jan 10:06
cc4af98
Compare
Choose a tag to compare

Minor Changes

Patch Changes

  • #7768 97603f0 Thanks @WalshyDev! - fix: on a 404 from KV, we do not want the asset to stay in cache for the normal 1 year TTL. Instead we want to re-insert with a 60s TTL to revalidate and prevent a bad 404 from persisting.

@cloudflare/[email protected]

16 Jan 18:54
9b519cc
Compare
Choose a tag to compare

Patch Changes

@cloudflare/[email protected]

16 Jan 10:06
cc4af98
Compare
Choose a tag to compare

[email protected]

14 Jan 19:11
dc2ab35
Compare
Choose a tag to compare

Minor Changes

Patch Changes

  • #7750 df0e5be Thanks @andyjessop! - bug: Removes the (local) tag on Vectorize bindings in the console output of wrangler dev, and adds-in the same tag for Durable Objects (which are emulated locally in wrangler dev).

  • #7732 d102b60 Thanks @Ankcorn! - fix pages secret bulk copy

  • #7706 c63f1b0 Thanks @penalosa! - Remove the server-based dev registry in favour of the more stable file-based dev registry. There should be no user-facing impact.

  • Updated dependencies [8e9aa40]: