github cloudflare/workers-sdk wrangler@3.4.0

Minor Changes

  • #3649 e2234bbc Thanks @JacobMGEvans! - Feature: 'stdin' support for 'secret:bulk'
    Added functionality that allows for files and strings to be piped in, or other means of standard input. This will allow for a broader variety of use cases and improved DX.
    This implementation is also fully backward compatible with the previous input method of file path to JSON.

    # Example of piping in a file
    > cat ./my-file.json | wrangler secret:bulk
    
    # Example of piping in a string
    > echo '{"key":"value"}' | wrangler secret:bulk
    
    # Example of redirecting input from a file
    > wrangler secret:bulk < ./my-file.json
  • #3675 f753f3af Thanks @1000hz! - chore: upgrade miniflare to 3.20230724.0

Patch Changes

  • #3610 bfbe49d0 Thanks @Skye-31! - Wrangler Capnp Compilation

    This PR replaces logfwdr's schema property with a new unsafe.capnp object. This object accepts either a compiled_schema property, or a base_path and array of source_schemas to get Wrangler to compile the capnp schema for you.

  • #3579 d4450b0a Thanks @rozenmd! - fix: remove --experimental-backend from wrangler d1 migrations apply

    This PR removes the need to pass a --experimental-backend flag when running migrations against an experimental D1 db.

    Closes #3596

  • #3623 99baf58b Thanks @RamIdeas! - when running wrangler init -y ..., the -y flag is now passed to npx when delegating to C3

  • #3668 99032c1e Thanks @rozenmd! - chore: make D1's experimental backend the default

    This PR makes D1's experimental backend turned on by default.

  • #3579 d4450b0a Thanks @rozenmd! - feat: implement time travel for experimental d1 dbs

    This PR adds two commands under wrangler d1 time-travel:

    Use Time Travel to restore, fork or copy a database at a specific point-in-time.
    
    Commands:
    
    wrangler d1 time-travel info <database>     Retrieve information about a database at a specific point-in-time using Time Travel.
    Options:
          --timestamp  accepts a Unix (seconds from epoch) or RFC3339 timestamp (e.g. 2023-07-13T08:46:42.228Z) to retrieve a bookmark for  [string]
          --json       return output as clean JSON  [boolean] [default: false]
    
    wrangler d1 time-travel restore <database>  Restore a database back to a specific point-in-time.
    Options:
          --bookmark   Bookmark to use for time travel  [string]
          --timestamp  accepts a Unix (seconds from epoch) or RFC3339 timestamp (e.g. 2023-07-13T08:46:42.228Z) to retrieve a bookmark for  [string]
          --json       return output as clean JSON  [boolean] [default: false]
    

    Closes #3577

  • #3592 89cd086b Thanks @penalosa! - fix: Only log dev registry connection errors once

  • #3384 ccc19d57 Thanks @Peter-Sparksuite! - feature: add wrangler deploy option: --old-asset-ttl [seconds]

    wrangler deploy immediately deletes assets that are no longer current, which has a side-effect for existing progressive web app users of seeing 404 errors as the app tries to access assets that no longer exist.

    This new feature:

    • does not change the default behavior of immediately deleting no-longer needed assets.
    • allows users to opt-in to expiring newly obsoleted assets after the provided number of seconds hence, so that current users will have a time buffer before seeing 404 errors.
    • is similar in concept to what was introduced in Wrangler 1.x with cloudflare/wrangler-legacy#2221.
    • is careful to avoid extension of existing expiration targets on already expiring old assets, which may have contributed to unexpectedly large KV storage accumulations (perhaps why, in Wrangler 1.x, the reversion cloudflare/wrangler-legacy#2228 happened).
    • no breaking changes for users relying on the default behavior, but some output changes exist when the new option is used, to indicate the change in behavior.
  • #3678 17780b27 Thanks @1000hz! - Refined the type of CfVars from Record<string, unknown> to Record<string, string | Json>

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.