github cloudflare/workers-sdk wrangler@2.0.7

latest releases: create-cloudflare@2.32.1, wrangler@3.86.1, @cloudflare/vitest-pool-workers@0.5.27...
2 years ago

Patch Changes

  • #1110 515a52f Thanks @rozenmd! - fix: print instructions even if installPackages fails to fetch npm packages

  • #1051 7e2e97b Thanks @rozenmd! - feat: add support for using wrangler behind a proxy

    Configures the undici library (the library wrangler uses for fetch) to send all requests via a proxy selected from the first non-empty environment variable from "https_proxy", "HTTPS_PROXY", "http_proxy" and "HTTP_PROXY".

  • #1089 de59ee7 Thanks @rozenmd! - fix: batch package manager installs so folks only have to wait once

    When running wrangler init, we install packages as folks confirm their options.
    This disrupts the "flow", particularly on slower internet connections.

    To avoid this disruption, we now only install packages once we're done asking questions.

    Closes #1036

  • #1073 6bb2564 Thanks @caass! - Add a better message when a user doesn't have a Chromium-based browser.

    Certain functionality we use in wrangler depends on a Chromium-based browser. Previously, we would throw a somewhat arcane error that was hard (or impossible) to understand without knowing what we needed. While ideally all of our functionality would work across all major browsers, as a stopgap measure we can at least inform the user what the actual issue is.

    Additionally, add support for Brave as a Chromium-based browser.

  • #1079 fb0dec4 Thanks @caass! - Print the bindings a worker has access to during dev and publish

    It can be helpful for a user to know exactly what resources a worker will have access to and where they can access them, so we now log the bindings available to a worker during wrangler dev and wrangler publish.

  • #1097 c73a3c4 Thanks @petebacondarwin! - fix: ensure all line endings are normalized before parsing as TOML

    Only the last line-ending was being normalized not all of them.

    Fixes #1094

  • #1111 1eaefeb Thanks @JacobMGEvans! - Git default main branch

    polish: Default branch when choosing to initialize a git repository will now be main.
    This is inline with current common industry ethical practices.
    See:

  • #1058 1a59efe Thanks @threepointone! - refactor: detect missing [migrations] during config validation

    This does a small refactor -

    • During publish, we were checking whether [migrations] were defined in the presence of [durable_objects], and warning if not. This moves it into the config validation step, which means it'll check for all commands (but notably dev)
    • It moves the code to determine current migration tag/migrations to upload into a helper. We'll be reusing this soon when we upload migrations to dev.
  • #1090 85fbfe8 Thanks @petebacondarwin! - refactor: remove use of any

    This "quick-win" refactors some of the code to avoid the use of any where possible.
    Using any can cause type-checking to be disabled across the code in unexpectedly wide-impact ways.

    There is one other use of any not touched here because it is fixed by #1088 separately.

  • #1088 d63d790 Thanks @petebacondarwin! - fix: ensure that the proxy server shuts down to prevent wrangler dev from hanging

    When running wrangler dev we create a proxy to the actual remote Worker.
    After creating a connection to this proxy by a browser request the proxy did not shutdown.
    Now we use a HttpTerminator helper library to force the proxy to close open connections and shutdown correctly.

    Fixes #958

  • #1099 175737f Thanks @petebacondarwin! - fix: delegate wrangler build to wrangler publish

    Since wrangler publish --dry-run --outdir=dist is basically the same result
    as what Wrangler 1 did with wrangler build let's run that for the user if
    they try to run wrangler build.

  • #1081 8070763 Thanks @rozenmd! - fix: friendlier error for when a subdomain hasn't been configured in dev mode

  • #1123 15e5c12 Thanks @timabb031! - chore: updated new worker ts template with env/ctx parameters and added Env interface

  • #1080 4a09c1b Thanks @caass! - Improve messaging when bulk deleting or uploading KV Pairs

    Closes #555

  • #1000 5a8e8d5 Thanks @JacobMGEvans! - pages dev <dir> & wrangler pages functions build will have a --node-compat flag powered by @esbuild-plugins/node-globals-polyfill (which in itself is powered by rollup-plugin-node-polyfills). The only difference in pages will be it does not check the wrangler.toml so the node_compat = truewill not enable it for wrangler pages functionality.

    resolves #890

  • #1028 b7a9ce6 Thanks @GregBrimble! - feat: Use new bulk upload API for 'wrangler pages publish'

    This raises the file limit back up to 20k for a deployment.

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.