github cloudflare/workers-sdk wrangler@0.0.28

Patch Changes

  • #843 da12cc5 Thanks @threepointone! - fix: site.entry-point is no longer a hard deprecation

    To make migration of v1 projects easier, Sites projects should still work, including the entry-point field (which currently errors out). This enables site.entry-point as a valid entry point, with a deprecation warning.

  • #848 0a79d75 Thanks @petebacondarwin! - polish: improve consistency of warnings and errors

    Related to #377

  • #877 97f945f Thanks @caass! - Treat the "name" parameter in wrangler init as a path.

    This means that running wrangler init . will create a worker in the current directory,
    and the worker's name will be the name of the current directory.

    You can also run wrangler init path/to/my-worker and a worker will be created at
    [CWD]/path/to/my-worker with the name my-worker,

  • #851 277b254 Thanks @threepointone! - polish: do not log the error object when refreshing a token fails

    We handle the error anyway (by doing a fresh login) which has its own logging and messaging. In the future we should add a DEBUG mode that logs all requests/errors/warnings, but that's for later.

  • #869 f1423bf Thanks @threepointone! - feat: experimental --node-compat / config.node_compat

    This adds an experimental node.js compatibility mode. It can be enabled by adding node_compat = true in wrangler.toml, or by passing --node-compat as a command line arg for dev/publish commands. This is currently powered by @esbuild-plugins/node-globals-polyfill (which in itself is powered by rollup-plugin-node-polyfills).

    We'd previously added this, and then removed it because the quality of the polyfills isn't great. We're reintroducing it regardless so we can start getting feedback on its usage, and it sets up a foundation for replacing it with our own, hopefully better maintained polyfills.

    Of particular note, this means that what we promised in https://blog.cloudflare.com/announcing-stripe-support-in-workers/ now actually works.

    This patch also addresses some dependency issues, specifically leftover entries in package-lock.json.

  • #790 331c659 Thanks @sidharthachatterjee! - feature: Adds 'wrangler pages publish' (alias 'wrangler pages deployment create') command.

  • #866 8b227fc Thanks @caass! - Add a runtime check for wrangler dev local mode to avoid erroring in environments with no AsyncLocalStorage class

    Certain runtime APIs are only available to workers during the "request context",
    which is any code that returns after receiving a request and before returning
    a response.

    Miniflare emulates this behavior by using an AsyncLocalStorage and
    checking at runtime
    to see if you're using those APIs during the request context.

    In certain environments AsyncLocalStorage is unavailable, such as in a
    webcontainer.
    This function figures out if we're able to run those "request context" checks
    and returns a set of options
    that indicate to miniflare whether to run the checks or not.

  • #829 f08aac5 Thanks @JacobMGEvans! - feat: Add validation to the name field in configuration.
    The validation will warn users that the field can only be "type string,
    alphanumeric, underscores, and lowercase with dashes only" using the same RegEx as the backend

    resolves #795 #775

  • #868 6ecb1c1 Thanks @threepointone! - feat: implement service environments + durable objects

    Now that the APIs for getting migrations tags of services works as expected, this lands support for publishing durable objects to service environments, including migrations. It also removes the error we used to throw when attempting to use service envs + durable objects.

    Fixes #739

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.