github cloudflare/workers-sdk wrangler@3.0.0

Major Changes

  • #3197 3b3fadfa Thanks @mrbbot! - feature: rename wrangler publish to wrangler deploy

    This ensures consistency with other messaging, documentation and our dashboard,
    which all refer to deployments. This also avoids confusion with the similar but
    very different npm publish command. wrangler publish will remain a
    deprecated alias for now, but will be removed in the next major version of Wrangler.

  • #3197 bac9b5de Thanks @mrbbot! - feature: enable local development with Miniflare 3 and workerd by default

    wrangler dev now runs fully-locally by default, using the open-source Cloudflare Workers runtime workerd.
    To restore the previous behaviour of running on a remote machine with access to production data, use the new --remote flag.
    The --local and --experimental-local flags have been deprecated, as this behaviour is now the default, and will be removed in the next major version.

  • #3197 02a672ed Thanks @mrbbot! - feature: enable persistent storage in local mode by default

    Wrangler will now persist local KV, R2, D1, Cache and Durable Object data
    in the .wrangler folder, by default, between reloads. This persistence
    directory can be customised with the --persist-to flag. The --persist flag
    has been removed, as this is now the default behaviour.

  • #3197 dc755fdc Thanks @mrbbot! - feature: remove delegation to locally installed versions

    Previously, if Wrangler was installed globally and locally within a project,
    running the global Wrangler would instead invoke the local version.
    This behaviour was contrary to most other JavaScript CLI tools and has now been
    removed. We recommend you use npx wrangler instead, which will invoke the
    local version if installed, or install globally if not.

  • #3197 24e1607a Thanks @mrbbot! - chore: remove unused files from published package

    Specifically, the src and miniflare-config-stubs directories have been removed.

Minor Changes

  • #3200 f1b8a1cc Thanks @matthewdavidrodgers! - Support outbounds for dispatch_namespace bindings

  • #3197 b7c590b5 Thanks @mrbbot! - feature: warn when a new major version is available

  • #3197 e1e5d782 Thanks @mrbbot! - feature: add warning when trying to use wrangler dev inside a WebContainer

  • #3230 41fc45c2 Thanks @matthewdavidrodgers! - Support tail_consumers in script upload

  • #3157 4d7781f7 Thanks @edevil! - [wrangler] feat: Support for Constellation bindings

    Added support for a new type of safe bindings called "Constellation"
    that allows interacting with uploaded models in the context of these
    projects.

    [[constellation]]
    binding = 'AI'
    project_id = '9d478427-dea6-4988-9b16-f6f8888d974c'
  • #3135 cc2adc2e Thanks @edevil! - [wrangler] feat: Support for Browser Workers

    These bindings allow one to use puppeteer to control a browser
    in a worker script.

  • #3150 7512d4cc Thanks @mrbbot! - chore: upgrade miniflare to 2.14.0

Patch Changes

  • #3175 561b962f Thanks @GregBrimble! - fix: _worker.js/ directory support for dynamically imported chunks in wrangler pages dev

  • #3186 3050ce7f Thanks @petebacondarwin! - fix: ensure pages _routes.json emulation in dev command handles .s and *s

    Fixes #3184

  • #3048 6ccc4fa6 Thanks @oustn! - Fix: fix local registry server closed

    Closes #1920. Sometimes start the local dev server will kill
    the devRegistry server so that the devRegistry server can't be used. We can listen the devRegistry server close event
    and reset server to null. When registerWorker is called, we can check if the server is null and start a new server.

  • #3001 f9722873 Thanks @rozenmd! - fix: make it possible to create a D1 database backed by the experimental backend, and make d1 execute's batch size configurable

    With this PR, users will be able to run wrangler d1 create <NAME> --experimental-backend to create new D1 dbs that use an experimental backend. You can also run wrangler d1 migrations apply <NAME> experimental-backend to run migrations against an experimental database.

    On top of that, both wrangler d1 migrations apply <NAME> and wrangler d1 execute <NAME> now have a configurable batch-size flag, as the experimental backend can handle more than 10000 statements at a time.

  • #3153 1b67a405 Thanks @edevil! - [wrangler] fix: constellation command help

    Changed name to projectName in some Constellation commands that interacted with projects. Also added the possibility to specify a model description when uploading it.

  • #3214 ce04aac0 Thanks @jspspike! - Add message for when wrangler tail exits sampling mode

  • #3168 88ff9d7d Thanks @rozenmd! - feat: (alpha) - make it possible to give D1 a hint on where it should create the database

  • #3175 561b962f Thanks @GregBrimble! - fix: _worker.js/ directory support for D1 bindings

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.