github cloudflare/workers-sdk wrangler@2.0.12

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

Patch Changes

  • #1229 e273e09 Thanks @timabb031! - fix: parsing of node inspector url

    This fixes the parsing of the url returned by Node Inspector via stderr which could be received partially in multiple chunks or in a single chunk.

    Closes #1226

  • #1255 2d806dc Thanks @f5io! - fix: kv:key put binary file upload

    As raised in #1254, it was discovered that binary uploads were being mangled by wrangler 2, whereas they worked in wrangler 1. This is because they were read into a string by providing an explicit encoding of utf-8. This fix reads provided files into a node Buffer that is then passed directly to the request.

  • #1248 db8a0bb Thanks @threepointone! - fix: instruct api to exclude script content on worker upload

    When we upload a script bundle, we get the actual content of the script back in the response. Sometimes that script can be large (depending on whether the upload was large), and currently it may even be a badly escaped string. We can pass a queryparam excludeScript that, as it implies, exclude the script content in the response. This fix does that.

    Fixes #1222

  • #1250 e3278fa Thanks @rozenmd! - fix: pass localProtocol to miniflare for https server

    Closes #1247

  • #1253 eee5c78 Thanks @threepointone! - fix: resolve asset handler for --experimental-path

    In #1241, we removed the vendored version of @cloudflare/kv-asset-handler, as well as the build configuration that would point to the vendored version when compiling a worker using --experimental-public. However, wrangler can be used where it's not installed in the package.json for the worker, or even when there's no package.json at all (like when wrangler is installed globally, or used with npx). In this situation, if the user doesn't have @cloudflare/kv-asset-handler installed, then building the worker will fail. We don't want to make the user install this themselves, so instead we point to a barrel import for the library in the facade for the worker.

  • #1234 3e94bc6 Thanks @threepointone! - feat: support --experimental-public in local mode

    --experimental-public is an abstraction over Workers Sites, and we can leverage miniflare's inbuilt support for Sites to serve assets in local mode.

  • #1236 891d128 Thanks @threepointone! - fix: generate site assets manifest relative to site.bucket

    We had a bug where we were generating asset manifest keys incorrectly if we ran wrangler from a different path to wrangler.toml. This fixes the generation of said keys, and adds a test for it.

    Fixes #1235

  • #1216 4eb70f9 Thanks @JacobMGEvans! - feat: reload server on configuration changes, the values passed into the server during restart will be bindings

    resolves #439

  • #1231 5206c24 Thanks @threepointone! - feat: build.watch_dir can be an array of paths

    In projects where:

    • all the source code isn't in one folder (like a monorepo, or even where the worker has non-standard imports across folders),
    • we use a custom build, so it's hard to statically determine folders to watch for changes

    ...we'd like to be able to specify multiple paths for custom builds, (the config build.watch_dir config). This patch enables such behaviour. It now accepts a single path as before, or optionally an array of strings/paths.

    Fixes #1095

  • #1241 471cfef Thanks @threepointone! - use @cloudflare/kv-asset-handler for --experimental-public

    We'd previously vendored in @cloudflare/kv-asset-handler and mime for --experimental-public. We've since updated @cloudflare/kv-asset-handler to support module workers correctly, and don't need the vendored versions anymore. This patch uses the lib as a dependency, and deletes the vendor folder.

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.