github cloudflare/workers-sdk wrangler@0.0.8

latest releases: wrangler@3.63.1, @cloudflare/vitest-pool-workers@0.4.9, wrangler@3.63.0...
2 years ago

Patch Changes

  • #231 18f8f65 Thanks @threepointone! - refactor: proxy/preview server

    This PR refactors how we setup the proxy server between the developer and the edge preview service during wrangler dev. Of note, we start the server immediately. We also buffer requests/streams and hold on to them, when starting/refreshing the token. This means a developer should never see ERR_CONNECTION_REFUSED error page, or have an older worker respond after making a change to the code. And when the token does get refreshed, we flush said streams/requests with the newer values, making the iteration process a lot smoother and predictable.

  • #239 0431093 Thanks @Warfields! - Added prompt for users to select an account.

  • #225 b901bf7 Thanks @GregBrimble! - Fix the --watch command for wrangler pages functions build.

  • #208 fe4b099 Thanks @petebacondarwin! - Remove explicit any types from the codebase

    This change removes all use of any from the code and updates the no-explicit-any eslint rule to be an error.

  • #223 a979d55 Thanks @GregBrimble! - Add ability to compile a directory other than functions for wrangler pages functions build.

  • #216 e1c615f Thanks @GregBrimble! - Ignore non-JS files when compiling Pages Functions

  • #217 777f4d5 Thanks @GregBrimble! - Reverse execution order of Pages Functions middlewares

  • #221 8ff5537 Thanks @mrbbot! - Upgrade miniflare to 2.0.0

  • #196 fc112d7 Thanks @jgentes! - allow specifying only "index" without extension or nothing at all for "wrangler dev" and "wrangler publish"

  • #211 3bbfd4f Thanks @GregBrimble! - Silently fail to auto-open the browser in wrangler pages dev command when that errors out.

  • #189 2f7e1b2 Thanks @petebacondarwin! - Refactor raw value extraction from Cloudflare APIs

    Most API responses are JSON of the form:

    { result, success, errors, messages, result_info }
    

    where the result contains the actual response value.

    But some API responses only contain the result value.

    This change refactors the client-side fetch API to allow callers to specify what kind of response they expect.

  • #202 e26781f Thanks @threepointone! - Disable @typescript-lint/no-explicit-any eslint rule in pages code

  • #214 79d0f2d Thanks @threepointone! - rename --public as --experimental-public

  • #215 41d4c3e Thanks @threepointone! - Add --compatibility-date, --compatibility-flags, --latest cli arguments to dev and publish.

    • A cli arg for adding a compatibility data, e.g --compatibility_date 2022-01-05
    • A shorthand --latest that sets compatibility_date to today's date. Usage of this flag logs a warning.
    • latest is NOT a config field in wrangler.toml.
    • In dev, when a compatibility date is not available in either wrangler.toml or as a cli arg, then we default to --latest.
    • In publish we error if a compatibility date is not available in either wrangler.toml or as a cli arg. Usage of --latest logs a warning.
    • We also accept compatibility flags via the cli, e.g: --compatibility-flags formdata_parser_supports_files
  • #210 d381fed Thanks @GregBrimble! - Expose wrangler pages functions build command, which takes the functions folder and compiles it into a single Worker.

    This was already done in wrangler pages dev, so this change just exposes this build command for use in our build image, or for people who want to do it themselves.

  • #213 5e1222a Thanks @GregBrimble! - Adds support for building a Worker from a folder of functions which isn't tied to the Pages platform.

    This lets developers use the same file-based routing system an simplified syntax when developing their own Workers!

  • #199 d9ecb70 Thanks @threepointone! - Refactor inspection/debugging code -

    • I've installed devtools-protocol, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase.
    • We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages.
    • Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected.
    • We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change)
  • #189 2f7e1b2 Thanks @petebacondarwin! - Fix pagination handling of list requests to the Cloudflare API

    When doing a list request to the API, the server may respond with only a single page of results.
    In this case, it will also provide a cursor value in the result_info part of the response, which can be used to request the next page.
    This change implements this on the client-side so that we get all the results by requesting further pages when there is a cursor.

  • #220 6fc2276 Thanks @GregBrimble! - Add --live-reload option to wrangler pages dev which automatically reloads HTML pages when a change is detected

  • #223 a979d55 Thanks @GregBrimble! - Add --output-config-path option to wrangler pages functions build which writes a config file describing the functions folder.

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.