github cloudflare/workers-sdk wrangler@2.0.25

Patch Changes

  • #1615 9163da17 Thanks @huw! - fix: Resolve source maps correctly in local dev mode

    Resolves #1614

  • #1617 32c9a4ae Thanks @jahands! - fix: Ignore _routes.generated.json when uploading Pages assets

  • #1609 fa8cb73f Thanks @jahands! - patch: Consolidate redundant routes when generating _routes.generated.json

    Example: ["/foo/:name", "/foo/bar"] => ["/foo/*"]

  • #1595 d4fbd0be Thanks @caass! - Add support for Alarm Events in wrangler tail

    wrangler tail --format pretty now supports receiving events from Durable Object Alarms, and will display the time the alarm was triggered.

    Additionally, any future unknown events will simply print "Unknown Event" instead of crashing the wrangler process.

    Closes #1519

  • #1642 a3e654f8 Thanks @jrf0110! - feat: Add output-routes-path to functions build

    This controls the output path of the _routes.json file. Also moves _routes.json generation to tmp directory during functions build + publish

  • #1606 24327289 Thanks @Skye-31! - chore: make prettier also fix changesets, as it causes checks to fail if they're not formatted

  • #1611 3df0fe04 Thanks @GregBrimble! - feat: Durable Object multi-worker bindings in local dev.

    Building on the recent work for multi-worker Service bindings in local dev, this now adds support for direct Durable Object namespace bindings.

    A parent (calling) Worker will look for child Workers (where the Durable Object has been defined) by matching the script_name configuration option with the child's Service name. For example, if you have a Worker A which defines a Durable Object, MyDurableObject, and Worker B which references A's Durable Object:

    name = "A"
    
    [durable_objects]
    bindings = [
    	{ name = "MY_DO", class_name = "MyDurableObject" }
    ]
    name = "B"
    
    [durable_objects]
    bindings = [
    	{ name = "REFERENCED_DO", class_name = "MyDurableObject", script_name = "A" }
    ]

    MY_DO will work as normal in Worker A. REFERENCED_DO in Worker B will point at A's Durable Object.

    Note: this only works in local mode (wrangler dev --local) at present.

  • #1621 2aa3fe88 Thanks @Skye-31! - fix(#1487) [pages]: Command failed: git rev-parse --abrev-ref HEAD

  • #1631 f1c97c8b Thanks @Skye-31! - chore: add fixtures to prettier

  • #1602 ebd1d631 Thanks @huw! - fix: Pass usageModel to Miniflare in local dev

    This allows Miniflare to dynamically update the external subrequest limit for Unbound workers.

  • #1629 06915ff7 Thanks @Skye-31! - fix: disallow imports in _worker.js (#1214)

  • #1518 85ab8a93 Thanks @jahands! - feature: Reduce Pages Functions executions for Asset-only requests in _routes.json

    Manually create a _routes.json file in your build output directory to specify routes. This is a set of inclusion/exclusion rules to indicate when to run a Pages project's Functions. Note: This is an experemental feature and is subject to change.

  • #1634 f6ea7e7b Thanks @Skye-31! - feat: [pages] add loaders for .html & .txt

  • #1589 6aa96e49 Thanks @Skye-31! - fix routing for URI encoded static requests

  • #1643 4b04a377 Thanks @GregBrimble! - feat: Add --inspector-port argument to wrangler pages dev

  • #1641 5f5466ab Thanks @GregBrimble! - feat: Add support for using external Durable Objects from wrangler pages dev.

    An external Durable Object can be referenced using npx wrangler pages dev ./public --do MyDO=MyDurableObject@api where the Durable Object is made available on env.MyDO, and is described in a Workers service (name = "api") with the class name MyDurableObject.

    You must have the api Workers service running in as another wrangler dev process elsewhere already in order to reference that object.

  • #1605 9e632cdd Thanks @kimyvgy! - refactor: add --ip argument for wrangler pages dev & defaults IP to 0.0.0.0

    Add new argument --ip for the command wrangler pages dev, defaults to 0.0.0.0. The command wrangler dev is also defaulting to 0.0.0.0 instead of localhost.

  • #1604 9732fafa Thanks @WalshyDev! - Added R2 support for wrangler pages dev. You can add an R2 binding with --r2 <BINDING>.

  • #1608 9f02758f Thanks @jrf0110! - feat: Generate _routes.generated.json for Functions routing

    When using Pages Functions, a _routes.generated.json file is created to inform Pages how to route requests to a project's Functions Worker.

  • #1603 7ae059b3 Thanks @JacobMGEvans! - feat: R2 Object Deletequote
    Improving the R2 objects management, added the functionality to delete objects in a bucket.

    resolves #1584

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.