Packages

wrangler

4.164.0 · 17 Nov 2026MIT OR Apache-2.049.3M / weekRepositoryHomepagenpmAtom feed

Your version

4.28.1

7 Aug 2025Where it was published

4.167.0 is the newest release of 4.x.

In short

6 fixed

Security

1 advisory affects 4.28.1; 4.59.1 fixes them

Release note

Patch Changes

  • Update maybeStartOrUpdateRemoteProxySession config argument (to allow callers to specify an environment)

    Before this change maybeStartOrUpdateRemoteProxySession could be called with either the path to a wrangler config file or the configuration of a worker. The former override however did not allow the caller to specify an environment, so the maybeStartOrUpdateRemoteProxySession API has been updated so that in the wrangler config case an object (with the path and a potential environment) needs to be passed instead.

    For example, before callers could invoke the function in the following way

    await maybeStartOrUpdateRemoteProxySession(configPath);

    note that there is no way to tell the function what environment to use when parsing the wrangle configuration.

    Now callers will instead call the function in the following way:

    await maybeStartOrUpdateRemoteProxySession({
        path: configPath,
        environment: targetEnvironment,
    });

    note that now a target environment can be specified.

  • Fix getPlatformProxy not taking into account the potentially specified environment for remote bindings

  • Fix startWorker not respecting auth options for remote bindings

    fix startWorker currently not taking into account the auth field
    that can be provided as part of the dev options when used in conjunction
    with remote bindings

    example:

    Given the following

    import { unstable_startWorker } from "wrangler";
    
    const worker = await unstable_startWorker({
        entrypoint: "./worker.js",
        bindings: {
            AI: {
                type: "ai",
                experimental_remote: true,
            },
        },
        dev: {
            experimentalRemoteBindings: true,
            auth: {
                accountId: "<ACCOUNT_ID>",
                apiToken: {
                    apiToken: "<API_TOKEN>",
                },
            },
        },
    });
    
    await worker.ready;

    wrangler will now use the provided <ACCOUNT_ID> and <API_TOKEN> to integrate with
    the remote AI binding instead of requiring the user to authenticate.

  • Strip ANSI escape codes from log files to improve readability and parsing

  • Validate container configuration against account limits in wrangler to give early feedback to the user

  • Fix incorrect TypeScript type for AI binding in the startWorker API

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.