github cloudflare/workers-sdk wrangler@2.1.14

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

Patch Changes

  • #2074 b08ab1e5 Thanks @JacobMGEvans! - The type command aggregates bindings and custom module rules from config, then generates a DTS file for both service workers' declare global { ... } or module workers' interface Env { ... }

    Custom module rules generate declare modules based on the module type (Text, Data or CompiledWasm).
    Module Example Outputs:

    CompiledWasm

    declare module "**/*.wasm" {
    	const value: WebAssembly.Module;
    	export default value;
    }

    Data

    declare module "**/*.webp" {
    	const value: ArrayBuffer;
    	export default value;
    }

    Text

    declare module "**/*.text" {
    	const value: string;
    	export default value;
    }

    resolves #2034
    resolves #2033

  • #2065 14c44588 Thanks @CarmenPopoviciu! - fix(pages): wrangler pages dev matches routing rules in _routes.json too loosely

    Currently, the logic by which we transform routing rules in _routes.json to
    regular expressions, so we can perform pathname matching & routing when we
    run wrangler pages dev, is too permissive, and leads to serving incorrect
    assets for certain url paths.

    For example, a routing rule such as /foo will incorrectly match pathname
    /bar/foo. Similarly, pathname /foo will be incorrectly matched by the
    / routing rule.
    This commit fixes our routing rule to pathname matching logic and brings
    wrangler pages dev on par with routing in deployed Pages projects.

  • #2098 2a81caee Thanks @threepointone! - feat: delete site/assets namespace when a worker is deleted

    This patch deletes any site/asset kv namespaces associated with a worker when wrangler delete is used. It finds the namespace associated with a worker by using the names it would have otherwise used, and deletes it. It also does the same for the preview namespace that's used with wrangler dev.

  • #2091 9491d86f Thanks @JacobMGEvans! - Wrangler deployments command
    Added support for the deployments command, which allows you to list the last ten deployments for a given script.

    The information will include:

    • Version ID
    • Version number
    • Author email
    • Latest deploy
    • Created on

    resolves #2089

  • #2068 2c1fd9d2 Thanks @mrbbot! - Fixed issue where information and warning messages from Miniflare were being
    discarded when using wrangler dev --local. Logs from Miniflare will now be
    coloured too, if the terminal supports this.

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.