From 9f5904388852d9484e7b42b7b8398341badaaf97 Mon Sep 17 00:00:00 2001 From: Edmund Hung Date: Tue, 20 Jan 2026 16:13:49 +0000 Subject: [PATCH 1/3] fix(vitest-pool-workers): suppress deprecation warnings in test subprocesses (#12005) --- packages/vitest-pool-workers/test/helpers.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/vitest-pool-workers/test/helpers.ts b/packages/vitest-pool-workers/test/helpers.ts index 9c30a9ee8dbb..e1919b778893 100644 --- a/packages/vitest-pool-workers/test/helpers.ts +++ b/packages/vitest-pool-workers/test/helpers.ts @@ -156,5 +156,10 @@ function getNoCIEnv(): typeof process.env { const env = { ...process.env }; env.CI = undefined; env.GITHUB_ACTIONS = undefined; + // Suppress Node.js deprecation warnings in spawned processes to prevent + // them from appearing in stderr (which breaks tests that assert stderr is empty) + env.NODE_OPTIONS = [env.NODE_OPTIONS, "--no-deprecation"] + .filter(Boolean) + .join(" "); return env; } From 75386b1f14d7d0606bece547399e33a9f5bbadb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gordan=20Neki=C4=87?= <48327736+gnekich@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:19:23 +0100 Subject: [PATCH 2/3] Always pass a valid `redirect_uri` callback parameter (`localhost:8976`) to Cloudflare OAuth API, even when the `--callback-host` and `--callback-port` params would not be accepted (#9396) * Always pass a valid `redirect_uri` callback parameter (`localhost:8976`) to Cloudflare OAuth API, even when the `--callback-host` and `--callback-port` params would not be accepted. The OAuth provider only accepts `localhost:8976` as the host and port in the `redirect_uri` parameter of the login request. One can configure the Wrangler's OAuth callback server to listen on custom host, via `--callback-host` (e.g. 0.0.0.0 or 127.0.0.1), and port, via `--callback-port`. This is useful when running Wrangler inside a Docker container (or equivalent) where it is not possible to listen on `localhost`. In this case, you can configure Wrangler to listen on a different host and/or port but then it is up to you to configure your container to map `localhost:8976` to the host and port on which Wrangler is listening. **Example:** Running the callback server on `127.0.0.1:8989`: ``` wrangler login --calback-host=127.0.0.1 --callback-port=8989 ``` results in Wrangler listening on 127.0.0.1:8989 and a login URL that looks like: ``` https://dash.cloudflare.com/oauth2/auth?...&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&... ``` Note that the `redirect_uri` is always `localhost:8976` whatever the callback host and port are. * Update .changeset/curly-peas-hunt.md Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com> --------- Co-authored-by: Edmund Hung Co-authored-by: emily-shen <69125074+emily-shen@users.noreply.github.com> --- .changeset/curly-peas-hunt.md | 18 +++++++ packages/wrangler/src/__tests__/user.test.ts | 54 +++++++++++++++++-- .../wrangler/src/__tests__/vitest.setup.ts | 10 ++-- .../wrangler/src/user/generate-auth-url.ts | 6 +-- packages/wrangler/src/user/user.ts | 27 +++------- 5 files changed, 87 insertions(+), 28 deletions(-) create mode 100644 .changeset/curly-peas-hunt.md diff --git a/.changeset/curly-peas-hunt.md b/.changeset/curly-peas-hunt.md new file mode 100644 index 000000000000..9b8b844d91fa --- /dev/null +++ b/.changeset/curly-peas-hunt.md @@ -0,0 +1,18 @@ +--- +"wrangler": patch +--- + +Fix `wrangler login` with custom `callback-host`/`callback-port` + +The Cloudflare OAuth API always requires the `redirect_uri` to be `localhost:8976`. However, sometimes the Wrangler OAuth server needed to listen on a different host/port, for example when running from inside a container. We were previously incorrectly setting the `redirect_uri` to the configured callback host/port, but it needs to be up to the user to map `localhost:8976` to the Wrangler OAuth server in the container. + +**Example:** + +You might run Wrangler inside a docker container like this: `docker run -p 8989:8976 `, which forwards port 8976 on your host to 8989 inside the container. + +Then inside the container, run `wrangler login --callback-host=0.0.0.0 --callback-port=8989` + +The OAuth link still has a `redirect_uri` set to`localhost:8976`. For example `https://dash.cloudflare.com/oauth2/auth?...&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&...` + +However the redirect to` localhost:8976` is then forwarded to the Wrangler OAuth server inside your container, allowing the login to complete. + diff --git a/packages/wrangler/src/__tests__/user.test.ts b/packages/wrangler/src/__tests__/user.test.ts index fbb668f970cf..e955976cc020 100644 --- a/packages/wrangler/src/__tests__/user.test.ts +++ b/packages/wrangler/src/__tests__/user.test.ts @@ -93,7 +93,7 @@ describe("User", () => { }); }); - it("should login a user when `wrangler login` is run with custom callbackHost param", async () => { + it("should login a user when `wrangler login` is run with an ip address for custom callback-host", async () => { mockOAuthServerCallback("success"); let counter = 0; @@ -123,7 +123,53 @@ describe("User", () => { ────────────────── Attempting to login via OAuth... Temporary login server listening on 0.0.0.0:8976 - Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2F0.0.0.0%3A8976%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20pipelines%3Awrite%20secrets_store%3Awrite%20containers%3Awrite%20cloudchamber%3Awrite%20connectivity%3Aadmin%20offline_access&state=MOCK_STATE_PARAM&code_challenge=MOCK_CODE_CHALLENGE&code_challenge_method=S256 + Note that the OAuth login page will always redirect to \`localhost:8976\`. + If you have changed the callback host or port because you are running in a container, then ensure that you have port forwarding set up correctly. + Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20pipelines%3Awrite%20secrets_store%3Awrite%20containers%3Awrite%20cloudchamber%3Awrite%20connectivity%3Aadmin%20offline_access&state=MOCK_STATE_PARAM&code_challenge=MOCK_CODE_CHALLENGE&code_challenge_method=S256 + Successfully logged in." + `); + expect(readAuthConfigFile()).toEqual({ + api_token: undefined, + oauth_token: "test-access-token", + refresh_token: "test-refresh-token", + expiration_time: expect.any(String), + scopes: ["account:read"], + }); + }); + + it("should login a user when `wrangler login` is run with a domain name for custom callback-host", async () => { + mockOAuthServerCallback("success"); + + let counter = 0; + msw.use( + http.post( + "*/oauth2/token", + async () => { + counter += 1; + + return HttpResponse.json({ + access_token: "test-access-token", + expires_in: 100000, + refresh_token: "test-refresh-token", + scope: "account:read", + }); + }, + { once: true } + ) + ); + + await runWrangler("login --callback-host='mylocalhost.local'"); + + expect(counter).toBe(1); + expect(std.out).toMatchInlineSnapshot(` + " + ⛅️ wrangler x.x.x + ────────────────── + Attempting to login via OAuth... + Temporary login server listening on mylocalhost.local:8976 + Note that the OAuth login page will always redirect to \`localhost:8976\`. + If you have changed the callback host or port because you are running in a container, then ensure that you have port forwarding set up correctly. + Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20pipelines%3Awrite%20secrets_store%3Awrite%20containers%3Awrite%20cloudchamber%3Awrite%20connectivity%3Aadmin%20offline_access&state=MOCK_STATE_PARAM&code_challenge=MOCK_CODE_CHALLENGE&code_challenge_method=S256 Successfully logged in." `); expect(readAuthConfigFile()).toEqual({ @@ -165,7 +211,9 @@ describe("User", () => { ────────────────── Attempting to login via OAuth... Temporary login server listening on localhost:8787 - Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2Flocalhost%3A8787%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20pipelines%3Awrite%20secrets_store%3Awrite%20containers%3Awrite%20cloudchamber%3Awrite%20connectivity%3Aadmin%20offline_access&state=MOCK_STATE_PARAM&code_challenge=MOCK_CODE_CHALLENGE&code_challenge_method=S256 + Note that the OAuth login page will always redirect to \`localhost:8976\`. + If you have changed the callback host or port because you are running in a container, then ensure that you have port forwarding set up correctly. + Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20pipelines%3Awrite%20secrets_store%3Awrite%20containers%3Awrite%20cloudchamber%3Awrite%20connectivity%3Aadmin%20offline_access&state=MOCK_STATE_PARAM&code_challenge=MOCK_CODE_CHALLENGE&code_challenge_method=S256 Successfully logged in." `); expect(readAuthConfigFile()).toEqual({ diff --git a/packages/wrangler/src/__tests__/vitest.setup.ts b/packages/wrangler/src/__tests__/vitest.setup.ts index 6d2d7b1fb713..a77b54ba3599 100644 --- a/packages/wrangler/src/__tests__/vitest.setup.ts +++ b/packages/wrangler/src/__tests__/vitest.setup.ts @@ -139,17 +139,21 @@ afterAll(() => msw.close()); vi.mock("../open-in-browser"); // Mock the functions involved in getAuthURL so we don't take snapshots of the constantly changing URL. -vi.mock("../user/generate-auth-url", () => { +vi.mock("../user/generate-auth-url", async (importOriginal) => { + const OAUTH_CALLBACK_URL = ( + await importOriginal() + ).OAUTH_CALLBACK_URL; return { generateRandomState: vi.fn().mockImplementation(() => "MOCK_STATE_PARAM"), + OAUTH_CALLBACK_URL, generateAuthUrl: vi .fn() - .mockImplementation(({ authUrl, clientId, callbackUrl, scopes }) => { + .mockImplementation(({ authUrl, clientId, scopes }) => { return ( authUrl + `?response_type=code&` + `client_id=${encodeURIComponent(clientId)}&` + - `redirect_uri=${encodeURIComponent(callbackUrl)}&` + + `redirect_uri=${encodeURIComponent(OAUTH_CALLBACK_URL)}&` + // we add offline_access manually for every request `scope=${encodeURIComponent( [...scopes, "offline_access"].join(" ") diff --git a/packages/wrangler/src/user/generate-auth-url.ts b/packages/wrangler/src/user/generate-auth-url.ts index 4bbad855835f..0f485a880c1d 100644 --- a/packages/wrangler/src/user/generate-auth-url.ts +++ b/packages/wrangler/src/user/generate-auth-url.ts @@ -1,12 +1,13 @@ interface GenerateAuthUrlProps { authUrl: string; clientId: string; - callbackUrl: string; scopes: string[]; stateQueryParam: string; codeChallenge: string; } +export const OAUTH_CALLBACK_URL = "http://localhost:8976/oauth/callback"; + /** * generateAuthUrl was extracted from getAuthURL in user.tsx * to make it possible to mock the generated URL @@ -14,7 +15,6 @@ interface GenerateAuthUrlProps { export const generateAuthUrl = ({ authUrl, clientId, - callbackUrl, scopes, stateQueryParam, codeChallenge, @@ -23,7 +23,7 @@ export const generateAuthUrl = ({ authUrl + `?response_type=code&` + `client_id=${encodeURIComponent(clientId)}&` + - `redirect_uri=${encodeURIComponent(callbackUrl)}&` + + `redirect_uri=${encodeURIComponent(OAUTH_CALLBACK_URL)}&` + // we add offline_access manually for every request `scope=${encodeURIComponent([...scopes, "offline_access"].join(" "))}&` + `state=${stateQueryParam}&` + diff --git a/packages/wrangler/src/user/user.ts b/packages/wrangler/src/user/user.ts index 70f788c89668..e7fb53e9025c 100644 --- a/packages/wrangler/src/user/user.ts +++ b/packages/wrangler/src/user/user.ts @@ -247,7 +247,7 @@ import { getTokenUrlFromEnv, } from "./auth-variables"; import { getAccountChoices } from "./choose-account"; -import { generateAuthUrl } from "./generate-auth-url"; +import { generateAuthUrl, OAUTH_CALLBACK_URL } from "./generate-auth-url"; import { generateRandomState } from "./generate-random-state"; import type { Account } from "./shared"; import type { ComplianceConfig } from "@cloudflare/workers-utils"; @@ -396,10 +396,6 @@ export function validateScopeKeys( return scopes.every((scope) => scope in DefaultScopes); } -function getCallbackUrl(host = "localhost", port = 8976) { - return `http://${host}:${port}/oauth/callback`; -} - let localState: State = { ...getAuthTokens(), }; @@ -688,12 +684,7 @@ function isReturningFromAuthServer(query: ParsedUrlQuery): boolean { return true; } -async function getAuthURL( - scopes: string[], - clientId: string, - callbackHost: string, - callbackPort: number -): Promise { +async function getAuthURL(scopes: string[], clientId: string): Promise { const { codeChallenge, codeVerifier } = await generatePKCECodes(); const stateQueryParam = generateRandomState(RECOMMENDED_STATE_LENGTH); @@ -706,7 +697,6 @@ async function getAuthURL( return generateAuthUrl({ authUrl: getAuthUrlFromEnv(), clientId, - callbackUrl: getCallbackUrl(callbackHost, callbackPort), scopes, stateQueryParam, codeChallenge, @@ -820,7 +810,7 @@ async function exchangeAuthCodeForAccessToken(): Promise { const params = new URLSearchParams({ grant_type: `authorization_code`, code: authorizationCode ?? "", - redirect_uri: getCallbackUrl(), + redirect_uri: OAUTH_CALLBACK_URL, client_id: getClientIdFromEnv(), code_verifier: codeVerifier, }); @@ -1013,12 +1003,7 @@ export async function getOauthToken(options: { callbackHost: string; callbackPort: number; }): Promise { - const urlToOpen = await getAuthURL( - options.scopes, - options.clientId, - options.callbackHost, - options.callbackPort - ); + const urlToOpen = await getAuthURL(options.scopes, options.clientId); let server: http.Server; let loginTimeoutHandle: ReturnType; const timerPromise = new Promise((_, reject) => { @@ -1097,6 +1082,10 @@ export async function getOauthToken(options: { logger.log( `Temporary login server listening on ${options.callbackHost}:${options.callbackPort}` ); + logger.log( + "Note that the OAuth login page will always redirect to `localhost:8976`.\n" + + "If you have changed the callback host or port because you are running in a container, then ensure that you have port forwarding set up correctly." + ); } server.listen(options.callbackPort, options.callbackHost); }); From 0c7e1f4bd43d2c8214880febe818cfb06affb159 Mon Sep 17 00:00:00 2001 From: ANT Bot <116369605+workers-devprod@users.noreply.github.com> Date: Tue, 20 Jan 2026 11:39:09 -0600 Subject: [PATCH 3/3] Version Packages (#11937) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/c3-frameworks-update-11861.md | 11 --- .changeset/c3-frameworks-update-11862.md | 11 --- .changeset/c3-frameworks-update-11864.md | 11 --- .changeset/c3-frameworks-update-11865.md | 11 --- .changeset/c3-frameworks-update-11915.md | 11 --- .changeset/c3-frameworks-update-11961.md | 11 --- .changeset/cli-macos-user-error.md | 7 -- .changeset/curly-peas-hunt.md | 18 ---- .changeset/cyan-clowns-film.md | 5 -- .changeset/dark-ads-appear.md | 5 -- .changeset/dependabot-update-11925.md | 12 --- .changeset/dependabot-update-11949.md | 12 --- .changeset/fair-tools-happen.md | 5 -- .changeset/file-not-found-errors.md | 7 -- .changeset/fix-infinite-loop-detection.md | 11 --- .changeset/fix-jsonc-config-filename.md | 10 --- .../fix-version-tracking-command-events.md | 7 -- .changeset/friendly-kv-namespace-error.md | 7 -- .changeset/gold-forks-build.md | 7 -- .changeset/green-bears-wave.md | 7 -- .changeset/happy-clubs-kiss.md | 7 -- .changeset/large-cooks-cough.md | 15 ---- .changeset/miniflare-email-messagebuilder.md | 29 ------- .changeset/purple-lemons-sip.md | 6 -- .changeset/vite-config-error-handling.md | 7 -- packages/cli/CHANGELOG.md | 16 ++++ packages/cli/package.json | 2 +- packages/create-cloudflare/CHANGELOG.md | 64 ++++++++++++++ packages/create-cloudflare/package.json | 2 +- packages/devprod-status-bot/CHANGELOG.md | 6 ++ packages/devprod-status-bot/package.json | 2 +- packages/miniflare/CHANGELOG.md | 58 +++++++++++++ packages/miniflare/package.json | 2 +- packages/pages-shared/CHANGELOG.md | 7 ++ packages/pages-shared/package.json | 2 +- packages/vite-plugin-cloudflare/CHANGELOG.md | 10 +++ packages/vite-plugin-cloudflare/package.json | 2 +- packages/vitest-pool-workers/CHANGELOG.md | 18 ++++ packages/vitest-pool-workers/package.json | 2 +- packages/workers-utils/CHANGELOG.md | 10 +++ packages/workers-utils/package.json | 2 +- packages/wrangler/CHANGELOG.md | 85 +++++++++++++++++++ packages/wrangler/package.json | 2 +- 43 files changed, 283 insertions(+), 259 deletions(-) delete mode 100644 .changeset/c3-frameworks-update-11861.md delete mode 100644 .changeset/c3-frameworks-update-11862.md delete mode 100644 .changeset/c3-frameworks-update-11864.md delete mode 100644 .changeset/c3-frameworks-update-11865.md delete mode 100644 .changeset/c3-frameworks-update-11915.md delete mode 100644 .changeset/c3-frameworks-update-11961.md delete mode 100644 .changeset/cli-macos-user-error.md delete mode 100644 .changeset/curly-peas-hunt.md delete mode 100644 .changeset/cyan-clowns-film.md delete mode 100644 .changeset/dark-ads-appear.md delete mode 100644 .changeset/dependabot-update-11925.md delete mode 100644 .changeset/dependabot-update-11949.md delete mode 100644 .changeset/fair-tools-happen.md delete mode 100644 .changeset/file-not-found-errors.md delete mode 100644 .changeset/fix-infinite-loop-detection.md delete mode 100644 .changeset/fix-jsonc-config-filename.md delete mode 100644 .changeset/fix-version-tracking-command-events.md delete mode 100644 .changeset/friendly-kv-namespace-error.md delete mode 100644 .changeset/gold-forks-build.md delete mode 100644 .changeset/green-bears-wave.md delete mode 100644 .changeset/happy-clubs-kiss.md delete mode 100644 .changeset/large-cooks-cough.md delete mode 100644 .changeset/miniflare-email-messagebuilder.md delete mode 100644 .changeset/purple-lemons-sip.md delete mode 100644 .changeset/vite-config-error-handling.md diff --git a/.changeset/c3-frameworks-update-11861.md b/.changeset/c3-frameworks-update-11861.md deleted file mode 100644 index 8ce32bed9a3b..000000000000 --- a/.changeset/c3-frameworks-update-11861.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -chore: update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ----------- | ------- | ------- | -| create-vike | 0.0.558 | 0.0.564 | diff --git a/.changeset/c3-frameworks-update-11862.md b/.changeset/c3-frameworks-update-11862.md deleted file mode 100644 index 241b1fd0cb13..000000000000 --- a/.changeset/c3-frameworks-update-11862.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -chore: update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ------------- | ----- | ----- | -| create-analog | 2.1.3 | 2.2.1 | diff --git a/.changeset/c3-frameworks-update-11864.md b/.changeset/c3-frameworks-update-11864.md deleted file mode 100644 index 90425bf767bd..000000000000 --- a/.changeset/c3-frameworks-update-11864.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -chore: update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ------------ | ----- | ----- | -| create-rwsdk | 3.1.2 | 3.1.3 | diff --git a/.changeset/c3-frameworks-update-11865.md b/.changeset/c3-frameworks-update-11865.md deleted file mode 100644 index 145badcabf94..000000000000 --- a/.changeset/c3-frameworks-update-11865.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -chore: update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ------------------- | ------ | ------ | -| create-react-router | 7.11.0 | 7.12.0 | diff --git a/.changeset/c3-frameworks-update-11915.md b/.changeset/c3-frameworks-update-11915.md deleted file mode 100644 index d8b1626881e0..000000000000 --- a/.changeset/c3-frameworks-update-11915.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -chore: update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ----------- | ---------------------- | ---------------------- | -| create-waku | 0.12.5-1.0.0-alpha.1-0 | 0.12.5-1.0.0-alpha.2-0 | diff --git a/.changeset/c3-frameworks-update-11961.md b/.changeset/c3-frameworks-update-11961.md deleted file mode 100644 index d35f654c4936..000000000000 --- a/.changeset/c3-frameworks-update-11961.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -chore: update dependencies of "create-cloudflare" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ------------- | ----- | ----- | -| create-analog | 2.2.1 | 2.2.2 | diff --git a/.changeset/cli-macos-user-error.md b/.changeset/cli-macos-user-error.md deleted file mode 100644 index e712bf90edde..000000000000 --- a/.changeset/cli-macos-user-error.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cloudflare/cli": patch ---- - -Mark macOS version compatibility errors as user errors - -When checking macOS version compatibility, the CLI now throws `UserError` instead of generic `Error`. This ensures that version incompatibility issues are properly classified as user-facing errors that shouldn't be reported to Sentry. diff --git a/.changeset/curly-peas-hunt.md b/.changeset/curly-peas-hunt.md deleted file mode 100644 index 9b8b844d91fa..000000000000 --- a/.changeset/curly-peas-hunt.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -"wrangler": patch ---- - -Fix `wrangler login` with custom `callback-host`/`callback-port` - -The Cloudflare OAuth API always requires the `redirect_uri` to be `localhost:8976`. However, sometimes the Wrangler OAuth server needed to listen on a different host/port, for example when running from inside a container. We were previously incorrectly setting the `redirect_uri` to the configured callback host/port, but it needs to be up to the user to map `localhost:8976` to the Wrangler OAuth server in the container. - -**Example:** - -You might run Wrangler inside a docker container like this: `docker run -p 8989:8976 `, which forwards port 8976 on your host to 8989 inside the container. - -Then inside the container, run `wrangler login --callback-host=0.0.0.0 --callback-port=8989` - -The OAuth link still has a `redirect_uri` set to`localhost:8976`. For example `https://dash.cloudflare.com/oauth2/auth?...&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&...` - -However the redirect to` localhost:8976` is then forwarded to the Wrangler OAuth server inside your container, allowing the login to complete. - diff --git a/.changeset/cyan-clowns-film.md b/.changeset/cyan-clowns-film.md deleted file mode 100644 index 98ed06164148..000000000000 --- a/.changeset/cyan-clowns-film.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@cloudflare/vite-plugin": patch ---- - -Add validation for environment name collisions and improve error message for missing environments. diff --git a/.changeset/dark-ads-appear.md b/.changeset/dark-ads-appear.md deleted file mode 100644 index 572ab32ce053..000000000000 --- a/.changeset/dark-ads-appear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@cloudflare/devprod-status-bot": minor ---- - -Notify when security advisories are submitted to workers-sdk diff --git a/.changeset/dependabot-update-11925.md b/.changeset/dependabot-update-11925.md deleted file mode 100644 index 453892854493..000000000000 --- a/.changeset/dependabot-update-11925.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"miniflare": patch -"wrangler": patch ---- - -chore: update dependencies of "miniflare", "wrangler" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ---------- | ------------ | ------------ | -| workerd | 1.20260114.0 | 1.20260115.0 | diff --git a/.changeset/dependabot-update-11949.md b/.changeset/dependabot-update-11949.md deleted file mode 100644 index a37c0d8c7a36..000000000000 --- a/.changeset/dependabot-update-11949.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"miniflare": patch -"wrangler": patch ---- - -chore: update dependencies of "miniflare", "wrangler" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ---------- | ------------ | ------------ | -| workerd | 1.20260115.0 | 1.20260116.0 | diff --git a/.changeset/fair-tools-happen.md b/.changeset/fair-tools-happen.md deleted file mode 100644 index 27fab186b097..000000000000 --- a/.changeset/fair-tools-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Improve telemetry errors being sent to Sentry by `wrangler init` when it delegates to C3 by ensuring that they contain the output of the C3 execution. diff --git a/.changeset/file-not-found-errors.md b/.changeset/file-not-found-errors.md deleted file mode 100644 index 7f196893316b..000000000000 --- a/.changeset/file-not-found-errors.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Show helpful messages for file not found errors (`ENOENT`) - -When users encounter file not found errors, Wrangler now displays a helpful message with the missing file path and common causes, instead of reporting to Sentry. diff --git a/.changeset/fix-infinite-loop-detection.md b/.changeset/fix-infinite-loop-detection.md deleted file mode 100644 index d2eaa2980422..000000000000 --- a/.changeset/fix-infinite-loop-detection.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"wrangler": patch ---- - -Fix false positive infinite loop detection for exact path redirects - -Fixed an issue where the redirect validation incorrectly flagged exact path redirects like `/ /index.html 200` as infinite loops. This was particularly problematic when `html_handling` is set to "none", where such redirects are valid. - -The fix makes the validation more specific to only block wildcard patterns (like `/* /index.html`) that would actually cause infinite loops, while allowing exact path matches that are valid in certain configurations. - -Fixes: https://github.com/cloudflare/workers-sdk/issues/11824 diff --git a/.changeset/fix-jsonc-config-filename.md b/.changeset/fix-jsonc-config-filename.md deleted file mode 100644 index c63b397800f6..000000000000 --- a/.changeset/fix-jsonc-config-filename.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"wrangler": patch -"@cloudflare/workers-utils": patch ---- - -Fix `configFileName` returning wrong filename for `.jsonc` config files - -Previously, users with a `wrangler.jsonc` config file would see error messages and hints referring to `wrangler.json` instead of `wrangler.jsonc`. This was because the `configFormat` function collapsed both `.json` and `.jsonc` files into a single `"jsonc"` value, losing the distinction between them. - -Now `configFormat` returns `"json"` for `.json` files and `"jsonc"` for `.jsonc` files, allowing `configFileName` to return the correct filename for each format. diff --git a/.changeset/fix-version-tracking-command-events.md b/.changeset/fix-version-tracking-command-events.md deleted file mode 100644 index 3c0a1f7b55ca..000000000000 --- a/.changeset/fix-version-tracking-command-events.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -fix: include version components in command event metrics - -Adds `wranglerMajorVersion`, `wranglerMinorVersion`, and `wranglerPatchVersion` to command events (`wrangler command started`, `wrangler command completed`, `wrangler command errored`). These properties were previously only included in adhoc events. diff --git a/.changeset/friendly-kv-namespace-error.md b/.changeset/friendly-kv-namespace-error.md deleted file mode 100644 index 8cd3fbb89a15..000000000000 --- a/.changeset/friendly-kv-namespace-error.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Improve error message when creating duplicate KV namespace - -When attempting to create a KV namespace with a title that already exists, Wrangler now provides a clear, user-friendly error message instead of the generic API error. The new message explains that the namespace already exists and suggests running `wrangler kv namespace list` to see existing namespaces with their IDs, or choosing a different namespace name. diff --git a/.changeset/gold-forks-build.md b/.changeset/gold-forks-build.md deleted file mode 100644 index 8a705c278fb9..000000000000 --- a/.changeset/gold-forks-build.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Cache chosen account in memory to avoid repeated prompts - -When users have multiple accounts and no `node_modules` directory exists for file caching, Wrangler (run via `npx` and equivalent commands) would prompt for account selection multiple times during a single command. Now the selected account is also stored in process memory, preventing duplicate prompts and potential issues from inconsistent account choices. diff --git a/.changeset/green-bears-wave.md b/.changeset/green-bears-wave.md deleted file mode 100644 index a326246190c3..000000000000 --- a/.changeset/green-bears-wave.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Make `name` the positional argument for `wrangler delete` instead of `script` - -The `script` argument was meaningless for the delete command since it deletes by worker name, not by entry point path. The `name` argument is now accepted as a positional argument, allowing users to run `wrangler delete my-worker` instead of `wrangler delete --name my-worker`. The `script` argument is now hidden but still accepted for backwards compatibility. diff --git a/.changeset/happy-clubs-kiss.md b/.changeset/happy-clubs-kiss.md deleted file mode 100644 index 8aaaed9e2e35..000000000000 --- a/.changeset/happy-clubs-kiss.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"create-cloudflare": patch ---- - -Bump the version of `@cloudflare/vitest-pool-workers` in the hello-world templates from `^0.8.19` to `^0.12.4` - -The version of the `@cloudflare/vitest-pool-workers` in the hello-world templates is currently `^0.8.19`, since the package is pre v1, the Caret syntax only installs the latest `0.8.x` version of the package, which is a bit outdated. So the changes here manually keep the package more up to date. diff --git a/.changeset/large-cooks-cough.md b/.changeset/large-cooks-cough.md deleted file mode 100644 index c13d49451aa0..000000000000 --- a/.changeset/large-cooks-cough.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@cloudflare/cli": patch -"create-cloudflare": patch -"miniflare": patch -"@cloudflare/vitest-pool-workers": patch -"wrangler": patch ---- - -chore: update undici - -The following dependency versions have been updated: - -| Dependency | From | To | -| ---------- | ------ | ------ | -| undici | 7.14.0 | 7.18.2 | diff --git a/.changeset/miniflare-email-messagebuilder.md b/.changeset/miniflare-email-messagebuilder.md deleted file mode 100644 index b3e8650bf338..000000000000 --- a/.changeset/miniflare-email-messagebuilder.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -"miniflare": minor ---- - -Add support for Email Sending API's MessageBuilder interface in local mode - -Miniflare now supports the simplified MessageBuilder interface for sending emails, alongside the existing `EmailMessage` support. - -Example usage: - -```javascript -await env.EMAIL.send({ - from: { name: "Alice", email: "alice@example.com" }, - to: ["bob@example.com"], - subject: "Hello", - text: "Plain text version", - html: "

HTML version

", - attachments: [ - { - disposition: "attachment", - filename: "report.pdf", - type: "application/pdf", - content: pdfData, - }, - ], -}); -``` - -In local mode, email content (text, HTML, attachments) is stored to temporary files that you can open in your editor or browser for inspection. File paths are logged to the console when emails are sent. diff --git a/.changeset/purple-lemons-sip.md b/.changeset/purple-lemons-sip.md deleted file mode 100644 index 2d878f0dc227..000000000000 --- a/.changeset/purple-lemons-sip.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@cloudflare/vitest-pool-workers": patch -"miniflare": patch ---- - -Bump capnp-es to ^0.0.14 diff --git a/.changeset/vite-config-error-handling.md b/.changeset/vite-config-error-handling.md deleted file mode 100644 index 96c9355133c9..000000000000 --- a/.changeset/vite-config-error-handling.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Improve error handling for Vite config transformations - -Replace assertions with proper error handling when transforming Vite configs. When Wrangler encounters a Vite config that uses a function or lacks a plugins array, it now provides clear, actionable error messages instead of crashing with assertion failures. The check function gracefully skips incompatible configs with debug logging. diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 61a54a9f91cf..a889c8238c91 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,21 @@ # @cloudflare/cli +## 1.2.1 + +### Patch Changes + +- [#11940](https://github.com/cloudflare/workers-sdk/pull/11940) [`69ff962`](https://github.com/cloudflare/workers-sdk/commit/69ff9620487a6ae979f369eb1dbac887ce46e246) Thanks [@penalosa](https://github.com/penalosa)! - Mark macOS version compatibility errors as user errors + + When checking macOS version compatibility, the CLI now throws `UserError` instead of generic `Error`. This ensures that version incompatibility issues are properly classified as user-facing errors that shouldn't be reported to Sentry. + +- [#11967](https://github.com/cloudflare/workers-sdk/pull/11967) [`202c59e`](https://github.com/cloudflare/workers-sdk/commit/202c59e4f4f28419fb6ac0aa8c7dc3960a0c8d3e) Thanks [@emily-shen](https://github.com/emily-shen)! - chore: update undici + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------ | ------ | + | undici | 7.14.0 | 7.18.2 | + ## 1.2.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index e3a81b6a912e..634ce564af34 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/cli", - "version": "1.2.0", + "version": "1.2.1", "private": true, "description": "An SDK to build workers-sdk CLIs", "keywords": [ diff --git a/packages/create-cloudflare/CHANGELOG.md b/packages/create-cloudflare/CHANGELOG.md index ed7d80740876..931305a1c147 100644 --- a/packages/create-cloudflare/CHANGELOG.md +++ b/packages/create-cloudflare/CHANGELOG.md @@ -1,5 +1,69 @@ # create-cloudflare +## 2.62.3 + +### Patch Changes + +- [#11861](https://github.com/cloudflare/workers-sdk/pull/11861) [`27ea230`](https://github.com/cloudflare/workers-sdk/commit/27ea230b036e262c692c438405c477afb50e02a6) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ----------- | ------- | ------- | + | create-vike | 0.0.558 | 0.0.564 | + +- [#11862](https://github.com/cloudflare/workers-sdk/pull/11862) [`6bd2ab4`](https://github.com/cloudflare/workers-sdk/commit/6bd2ab491cda9e18c2315bbf0564658692ab36fe) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ------------- | ----- | ----- | + | create-analog | 2.1.3 | 2.2.1 | + +- [#11864](https://github.com/cloudflare/workers-sdk/pull/11864) [`283a9e4`](https://github.com/cloudflare/workers-sdk/commit/283a9e4671020ad5db3a943d943d576efdb87450) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ------------ | ----- | ----- | + | create-rwsdk | 3.1.2 | 3.1.3 | + +- [#11865](https://github.com/cloudflare/workers-sdk/pull/11865) [`8522a8b`](https://github.com/cloudflare/workers-sdk/commit/8522a8b48ccff3da14a42c3413b6adcdacca79dc) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ------------------- | ------ | ------ | + | create-react-router | 7.11.0 | 7.12.0 | + +- [#11915](https://github.com/cloudflare/workers-sdk/pull/11915) [`20467fd`](https://github.com/cloudflare/workers-sdk/commit/20467fda188c70237805b00dafcb5e2acc9dc259) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ----------- | ---------------------- | ---------------------- | + | create-waku | 0.12.5-1.0.0-alpha.1-0 | 0.12.5-1.0.0-alpha.2-0 | + +- [#11961](https://github.com/cloudflare/workers-sdk/pull/11961) [`844975f`](https://github.com/cloudflare/workers-sdk/commit/844975fac1d46fabd2573f209fbb029f21097b8f) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "create-cloudflare" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ------------- | ----- | ----- | + | create-analog | 2.2.1 | 2.2.2 | + +- [#11952](https://github.com/cloudflare/workers-sdk/pull/11952) [`c09dbd7`](https://github.com/cloudflare/workers-sdk/commit/c09dbd7e43d934c19a5daafa62936603f2e3bfec) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - Bump the version of `@cloudflare/vitest-pool-workers` in the hello-world templates from `^0.8.19` to `^0.12.4` + + The version of the `@cloudflare/vitest-pool-workers` in the hello-world templates is currently `^0.8.19`, since the package is pre v1, the Caret syntax only installs the latest `0.8.x` version of the package, which is a bit outdated. So the changes here manually keep the package more up to date. + +- [#11967](https://github.com/cloudflare/workers-sdk/pull/11967) [`202c59e`](https://github.com/cloudflare/workers-sdk/commit/202c59e4f4f28419fb6ac0aa8c7dc3960a0c8d3e) Thanks [@emily-shen](https://github.com/emily-shen)! - chore: update undici + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------ | ------ | + | undici | 7.14.0 | 7.18.2 | + ## 2.62.2 ### Patch Changes diff --git a/packages/create-cloudflare/package.json b/packages/create-cloudflare/package.json index 340343e2f2ba..ea911c17453f 100644 --- a/packages/create-cloudflare/package.json +++ b/packages/create-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "create-cloudflare", - "version": "2.62.2", + "version": "2.62.3", "description": "A CLI for creating and deploying new applications to Cloudflare.", "keywords": [ "cloudflare", diff --git a/packages/devprod-status-bot/CHANGELOG.md b/packages/devprod-status-bot/CHANGELOG.md index 1db0d05d590b..6dfdfd90500a 100644 --- a/packages/devprod-status-bot/CHANGELOG.md +++ b/packages/devprod-status-bot/CHANGELOG.md @@ -1,5 +1,11 @@ # devprod-status-bot +## 1.3.0 + +### Minor Changes + +- [#11916](https://github.com/cloudflare/workers-sdk/pull/11916) [`0b249a1`](https://github.com/cloudflare/workers-sdk/commit/0b249a103e981b6f3f92290dbb65448ecd65739a) Thanks [@emily-shen](https://github.com/emily-shen)! - Notify when security advisories are submitted to workers-sdk + ## 1.2.3 ### Patch Changes diff --git a/packages/devprod-status-bot/package.json b/packages/devprod-status-bot/package.json index 26ded84dcdb1..047dae529ee3 100644 --- a/packages/devprod-status-bot/package.json +++ b/packages/devprod-status-bot/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/devprod-status-bot", - "version": "1.2.3", + "version": "1.3.0", "private": true, "scripts": { "check:lint": "eslint . --max-warnings=0", diff --git a/packages/miniflare/CHANGELOG.md b/packages/miniflare/CHANGELOG.md index acfc84dd7c67..83690d02c1ee 100644 --- a/packages/miniflare/CHANGELOG.md +++ b/packages/miniflare/CHANGELOG.md @@ -1,5 +1,63 @@ # miniflare +## 4.20260116.0 + +### Minor Changes + +- [#11942](https://github.com/cloudflare/workers-sdk/pull/11942) [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4) Thanks [@penalosa](https://github.com/penalosa)! - Add support for Email Sending API's MessageBuilder interface in local mode + + Miniflare now supports the simplified MessageBuilder interface for sending emails, alongside the existing `EmailMessage` support. + + Example usage: + + ```javascript + await env.EMAIL.send({ + from: { name: "Alice", email: "alice@example.com" }, + to: ["bob@example.com"], + subject: "Hello", + text: "Plain text version", + html: "

HTML version

", + attachments: [ + { + disposition: "attachment", + filename: "report.pdf", + type: "application/pdf", + content: pdfData, + }, + ], + }); + ``` + + In local mode, email content (text, HTML, attachments) is stored to temporary files that you can open in your editor or browser for inspection. File paths are logged to the console when emails are sent. + +### Patch Changes + +- [#11925](https://github.com/cloudflare/workers-sdk/pull/11925) [`8e4a0e5`](https://github.com/cloudflare/workers-sdk/commit/8e4a0e5e8d1e0bf75b6f11000f89f7eabafa392a) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "miniflare", "wrangler" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------------ | ------------ | + | workerd | 1.20260114.0 | 1.20260115.0 | + +- [#11942](https://github.com/cloudflare/workers-sdk/pull/11942) [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4) Thanks [@penalosa](https://github.com/penalosa)! - chore: update dependencies of "miniflare", "wrangler" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------------ | ------------ | + | workerd | 1.20260115.0 | 1.20260116.0 | + +- [#11967](https://github.com/cloudflare/workers-sdk/pull/11967) [`202c59e`](https://github.com/cloudflare/workers-sdk/commit/202c59e4f4f28419fb6ac0aa8c7dc3960a0c8d3e) Thanks [@emily-shen](https://github.com/emily-shen)! - chore: update undici + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------ | ------ | + | undici | 7.14.0 | 7.18.2 | + +- [#11943](https://github.com/cloudflare/workers-sdk/pull/11943) [`25e2c60`](https://github.com/cloudflare/workers-sdk/commit/25e2c608d529664ede251abe45fdb13ea9e56a9d) Thanks [@vicb](https://github.com/vicb)! - Bump capnp-es to ^0.0.14 + ## 4.20260114.0 ### Minor Changes diff --git a/packages/miniflare/package.json b/packages/miniflare/package.json index ad8ce249d19d..08670814332d 100644 --- a/packages/miniflare/package.json +++ b/packages/miniflare/package.json @@ -1,6 +1,6 @@ { "name": "miniflare", - "version": "4.20260114.0", + "version": "4.20260116.0", "description": "Fun, full-featured, fully-local simulator for Cloudflare Workers", "keywords": [ "cloudflare", diff --git a/packages/pages-shared/CHANGELOG.md b/packages/pages-shared/CHANGELOG.md index 9e0f19331710..e4f2064306c1 100644 --- a/packages/pages-shared/CHANGELOG.md +++ b/packages/pages-shared/CHANGELOG.md @@ -1,5 +1,12 @@ # @cloudflare/pages-shared +## 0.13.100 + +### Patch Changes + +- Updated dependencies [[`8e4a0e5`](https://github.com/cloudflare/workers-sdk/commit/8e4a0e5e8d1e0bf75b6f11000f89f7eabafa392a), [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4), [`202c59e`](https://github.com/cloudflare/workers-sdk/commit/202c59e4f4f28419fb6ac0aa8c7dc3960a0c8d3e), [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4), [`25e2c60`](https://github.com/cloudflare/workers-sdk/commit/25e2c608d529664ede251abe45fdb13ea9e56a9d)]: + - miniflare@4.20260116.0 + ## 0.13.99 ### Patch Changes diff --git a/packages/pages-shared/package.json b/packages/pages-shared/package.json index 63b84512d353..ca31ce76eb5b 100644 --- a/packages/pages-shared/package.json +++ b/packages/pages-shared/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/pages-shared", - "version": "0.13.99", + "version": "0.13.100", "repository": { "type": "git", "url": "https://github.com/cloudflare/workers-sdk.git", diff --git a/packages/vite-plugin-cloudflare/CHANGELOG.md b/packages/vite-plugin-cloudflare/CHANGELOG.md index 4afc74dd9705..751614c24680 100644 --- a/packages/vite-plugin-cloudflare/CHANGELOG.md +++ b/packages/vite-plugin-cloudflare/CHANGELOG.md @@ -1,5 +1,15 @@ # @cloudflare/vite-plugin +## 1.21.1 + +### Patch Changes + +- [#11951](https://github.com/cloudflare/workers-sdk/pull/11951) [`77fdc18`](https://github.com/cloudflare/workers-sdk/commit/77fdc1846c6f5533bb718a143ca01f93f3f7eaac) Thanks [@jamesopstad](https://github.com/jamesopstad)! - Add validation for environment name collisions and improve error message for missing environments. + +- Updated dependencies [[`75386b1`](https://github.com/cloudflare/workers-sdk/commit/75386b1f14d7d0606bece547399e33a9f5bbadb8), [`8e4a0e5`](https://github.com/cloudflare/workers-sdk/commit/8e4a0e5e8d1e0bf75b6f11000f89f7eabafa392a), [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4), [`93d8d78`](https://github.com/cloudflare/workers-sdk/commit/93d8d78ce081f821671b2c4a1ffcd7df733a0866), [`69ff962`](https://github.com/cloudflare/workers-sdk/commit/69ff9620487a6ae979f369eb1dbac887ce46e246), [`22727c2`](https://github.com/cloudflare/workers-sdk/commit/22727c29ee244cddebf93d855e4e052973479ad3), [`fa39a73`](https://github.com/cloudflare/workers-sdk/commit/fa39a73040dd27d35d429deda34fdc8e15b15fbe), [`4ac7c82`](https://github.com/cloudflare/workers-sdk/commit/4ac7c82609354115d53cd17f4cf78eabf3d6c23a), [`69ff962`](https://github.com/cloudflare/workers-sdk/commit/69ff9620487a6ae979f369eb1dbac887ce46e246), [`029531a`](https://github.com/cloudflare/workers-sdk/commit/029531acd2e6fac10f21c7b0cecb6b4830f77d02), [`d58fbd1`](https://github.com/cloudflare/workers-sdk/commit/d58fbd1189ec7417d8f2930eac3e71f7680bd679), [`202c59e`](https://github.com/cloudflare/workers-sdk/commit/202c59e4f4f28419fb6ac0aa8c7dc3960a0c8d3e), [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4), [`25e2c60`](https://github.com/cloudflare/workers-sdk/commit/25e2c608d529664ede251abe45fdb13ea9e56a9d), [`69ff962`](https://github.com/cloudflare/workers-sdk/commit/69ff9620487a6ae979f369eb1dbac887ce46e246)]: + - wrangler@4.59.3 + - miniflare@4.20260116.0 + ## 1.21.0 ### Minor Changes diff --git a/packages/vite-plugin-cloudflare/package.json b/packages/vite-plugin-cloudflare/package.json index 3b9dd67de711..0239ee4d7445 100644 --- a/packages/vite-plugin-cloudflare/package.json +++ b/packages/vite-plugin-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/vite-plugin", - "version": "1.21.0", + "version": "1.21.1", "description": "Cloudflare plugin for Vite", "keywords": [ "cloudflare", diff --git a/packages/vitest-pool-workers/CHANGELOG.md b/packages/vitest-pool-workers/CHANGELOG.md index dc1850926118..f02155e3f324 100644 --- a/packages/vitest-pool-workers/CHANGELOG.md +++ b/packages/vitest-pool-workers/CHANGELOG.md @@ -1,5 +1,23 @@ # @cloudflare/vitest-pool-workers +## 0.12.5 + +### Patch Changes + +- [#11967](https://github.com/cloudflare/workers-sdk/pull/11967) [`202c59e`](https://github.com/cloudflare/workers-sdk/commit/202c59e4f4f28419fb6ac0aa8c7dc3960a0c8d3e) Thanks [@emily-shen](https://github.com/emily-shen)! - chore: update undici + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------ | ------ | + | undici | 7.14.0 | 7.18.2 | + +- [#11943](https://github.com/cloudflare/workers-sdk/pull/11943) [`25e2c60`](https://github.com/cloudflare/workers-sdk/commit/25e2c608d529664ede251abe45fdb13ea9e56a9d) Thanks [@vicb](https://github.com/vicb)! - Bump capnp-es to ^0.0.14 + +- Updated dependencies [[`75386b1`](https://github.com/cloudflare/workers-sdk/commit/75386b1f14d7d0606bece547399e33a9f5bbadb8), [`8e4a0e5`](https://github.com/cloudflare/workers-sdk/commit/8e4a0e5e8d1e0bf75b6f11000f89f7eabafa392a), [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4), [`93d8d78`](https://github.com/cloudflare/workers-sdk/commit/93d8d78ce081f821671b2c4a1ffcd7df733a0866), [`69ff962`](https://github.com/cloudflare/workers-sdk/commit/69ff9620487a6ae979f369eb1dbac887ce46e246), [`22727c2`](https://github.com/cloudflare/workers-sdk/commit/22727c29ee244cddebf93d855e4e052973479ad3), [`fa39a73`](https://github.com/cloudflare/workers-sdk/commit/fa39a73040dd27d35d429deda34fdc8e15b15fbe), [`4ac7c82`](https://github.com/cloudflare/workers-sdk/commit/4ac7c82609354115d53cd17f4cf78eabf3d6c23a), [`69ff962`](https://github.com/cloudflare/workers-sdk/commit/69ff9620487a6ae979f369eb1dbac887ce46e246), [`029531a`](https://github.com/cloudflare/workers-sdk/commit/029531acd2e6fac10f21c7b0cecb6b4830f77d02), [`d58fbd1`](https://github.com/cloudflare/workers-sdk/commit/d58fbd1189ec7417d8f2930eac3e71f7680bd679), [`202c59e`](https://github.com/cloudflare/workers-sdk/commit/202c59e4f4f28419fb6ac0aa8c7dc3960a0c8d3e), [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4), [`25e2c60`](https://github.com/cloudflare/workers-sdk/commit/25e2c608d529664ede251abe45fdb13ea9e56a9d), [`69ff962`](https://github.com/cloudflare/workers-sdk/commit/69ff9620487a6ae979f369eb1dbac887ce46e246)]: + - wrangler@4.59.3 + - miniflare@4.20260116.0 + ## 0.12.4 ### Patch Changes diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index 4a5990fd7fd3..1d8040de2794 100644 --- a/packages/vitest-pool-workers/package.json +++ b/packages/vitest-pool-workers/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/vitest-pool-workers", - "version": "0.12.4", + "version": "0.12.5", "description": "Workers Vitest integration for writing Vitest unit and integration tests that run inside the Workers runtime", "keywords": [ "cloudflare", diff --git a/packages/workers-utils/CHANGELOG.md b/packages/workers-utils/CHANGELOG.md index 87f9e124e1d3..1065298b386f 100644 --- a/packages/workers-utils/CHANGELOG.md +++ b/packages/workers-utils/CHANGELOG.md @@ -1,5 +1,15 @@ # @cloudflare/workers-utils +## 0.7.1 + +### Patch Changes + +- [#11946](https://github.com/cloudflare/workers-sdk/pull/11946) [`fa39a73`](https://github.com/cloudflare/workers-sdk/commit/fa39a73040dd27d35d429deda34fdc8e15b15fbe) Thanks [@MattieTK](https://github.com/MattieTK)! - Fix `configFileName` returning wrong filename for `.jsonc` config files + + Previously, users with a `wrangler.jsonc` config file would see error messages and hints referring to `wrangler.json` instead of `wrangler.jsonc`. This was because the `configFormat` function collapsed both `.json` and `.jsonc` files into a single `"jsonc"` value, losing the distinction between them. + + Now `configFormat` returns `"json"` for `.json` files and `"jsonc"` for `.jsonc` files, allowing `configFileName` to return the correct filename for each format. + ## 0.7.0 ### Minor Changes diff --git a/packages/workers-utils/package.json b/packages/workers-utils/package.json index 84045ebd8df7..dce2034e2247 100644 --- a/packages/workers-utils/package.json +++ b/packages/workers-utils/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/workers-utils", - "version": "0.7.0", + "version": "0.7.1", "description": "Utility package for common Worker operations", "homepage": "https://github.com/cloudflare/workers-sdk#readme", "bugs": { diff --git a/packages/wrangler/CHANGELOG.md b/packages/wrangler/CHANGELOG.md index 0147137fb9a3..3f153a92519b 100644 --- a/packages/wrangler/CHANGELOG.md +++ b/packages/wrangler/CHANGELOG.md @@ -1,5 +1,90 @@ # wrangler +## 4.59.3 + +### Patch Changes + +- [#9396](https://github.com/cloudflare/workers-sdk/pull/9396) [`75386b1`](https://github.com/cloudflare/workers-sdk/commit/75386b1f14d7d0606bece547399e33a9f5bbadb8) Thanks [@gnekich](https://github.com/gnekich)! - Fix `wrangler login` with custom `callback-host`/`callback-port` + + The Cloudflare OAuth API always requires the `redirect_uri` to be `localhost:8976`. However, sometimes the Wrangler OAuth server needed to listen on a different host/port, for example when running from inside a container. We were previously incorrectly setting the `redirect_uri` to the configured callback host/port, but it needs to be up to the user to map `localhost:8976` to the Wrangler OAuth server in the container. + + **Example:** + + You might run Wrangler inside a docker container like this: `docker run -p 8989:8976 `, which forwards port 8976 on your host to 8989 inside the container. + + Then inside the container, run `wrangler login --callback-host=0.0.0.0 --callback-port=8989` + + The OAuth link still has a `redirect_uri` set to`localhost:8976`. For example `https://dash.cloudflare.com/oauth2/auth?...&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&...` + + However the redirect to` localhost:8976` is then forwarded to the Wrangler OAuth server inside your container, allowing the login to complete. + +- [#11925](https://github.com/cloudflare/workers-sdk/pull/11925) [`8e4a0e5`](https://github.com/cloudflare/workers-sdk/commit/8e4a0e5e8d1e0bf75b6f11000f89f7eabafa392a) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "miniflare", "wrangler" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------------ | ------------ | + | workerd | 1.20260114.0 | 1.20260115.0 | + +- [#11942](https://github.com/cloudflare/workers-sdk/pull/11942) [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4) Thanks [@penalosa](https://github.com/penalosa)! - chore: update dependencies of "miniflare", "wrangler" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------------ | ------------ | + | workerd | 1.20260115.0 | 1.20260116.0 | + +- [#11922](https://github.com/cloudflare/workers-sdk/pull/11922) [`93d8d78`](https://github.com/cloudflare/workers-sdk/commit/93d8d78ce081f821671b2c4a1ffcd7df733a0866) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - Improve telemetry errors being sent to Sentry by `wrangler init` when it delegates to C3 by ensuring that they contain the output of the C3 execution. + +- [#11940](https://github.com/cloudflare/workers-sdk/pull/11940) [`69ff962`](https://github.com/cloudflare/workers-sdk/commit/69ff9620487a6ae979f369eb1dbac887ce46e246) Thanks [@penalosa](https://github.com/penalosa)! - Show helpful messages for file not found errors (`ENOENT`) + + When users encounter file not found errors, Wrangler now displays a helpful message with the missing file path and common causes, instead of reporting to Sentry. + +- [#11904](https://github.com/cloudflare/workers-sdk/pull/11904) [`22727c2`](https://github.com/cloudflare/workers-sdk/commit/22727c29ee244cddebf93d855e4e052973479ad3) Thanks [@danielrs](https://github.com/danielrs)! - Fix false positive infinite loop detection for exact path redirects + + Fixed an issue where the redirect validation incorrectly flagged exact path redirects like `/ /index.html 200` as infinite loops. This was particularly problematic when `html_handling` is set to "none", where such redirects are valid. + + The fix makes the validation more specific to only block wildcard patterns (like `/* /index.html`) that would actually cause infinite loops, while allowing exact path matches that are valid in certain configurations. + + Fixes: https://github.com/cloudflare/workers-sdk/issues/11824 + +- [#11946](https://github.com/cloudflare/workers-sdk/pull/11946) [`fa39a73`](https://github.com/cloudflare/workers-sdk/commit/fa39a73040dd27d35d429deda34fdc8e15b15fbe) Thanks [@MattieTK](https://github.com/MattieTK)! - Fix `configFileName` returning wrong filename for `.jsonc` config files + + Previously, users with a `wrangler.jsonc` config file would see error messages and hints referring to `wrangler.json` instead of `wrangler.jsonc`. This was because the `configFormat` function collapsed both `.json` and `.jsonc` files into a single `"jsonc"` value, losing the distinction between them. + + Now `configFormat` returns `"json"` for `.json` files and `"jsonc"` for `.jsonc` files, allowing `configFileName` to return the correct filename for each format. + +- [#11968](https://github.com/cloudflare/workers-sdk/pull/11968) [`4ac7c82`](https://github.com/cloudflare/workers-sdk/commit/4ac7c82609354115d53cd17f4cf78eabf3d6c23a) Thanks [@MattieTK](https://github.com/MattieTK)! - fix: include version components in command event metrics + + Adds `wranglerMajorVersion`, `wranglerMinorVersion`, and `wranglerPatchVersion` to command events (`wrangler command started`, `wrangler command completed`, `wrangler command errored`). These properties were previously only included in adhoc events. + +- [#11940](https://github.com/cloudflare/workers-sdk/pull/11940) [`69ff962`](https://github.com/cloudflare/workers-sdk/commit/69ff9620487a6ae979f369eb1dbac887ce46e246) Thanks [@penalosa](https://github.com/penalosa)! - Improve error message when creating duplicate KV namespace + + When attempting to create a KV namespace with a title that already exists, Wrangler now provides a clear, user-friendly error message instead of the generic API error. The new message explains that the namespace already exists and suggests running `wrangler kv namespace list` to see existing namespaces with their IDs, or choosing a different namespace name. + +- [#11962](https://github.com/cloudflare/workers-sdk/pull/11962) [`029531a`](https://github.com/cloudflare/workers-sdk/commit/029531acd2e6fac10f21c7b0cecb6b4830f77d02) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - Cache chosen account in memory to avoid repeated prompts + + When users have multiple accounts and no `node_modules` directory exists for file caching, Wrangler (run via `npx` and equivalent commands) would prompt for account selection multiple times during a single command. Now the selected account is also stored in process memory, preventing duplicate prompts and potential issues from inconsistent account choices. + +- [#11964](https://github.com/cloudflare/workers-sdk/pull/11964) [`d58fbd1`](https://github.com/cloudflare/workers-sdk/commit/d58fbd1189ec7417d8f2930eac3e71f7680bd679) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - Make `name` the positional argument for `wrangler delete` instead of `script` + + The `script` argument was meaningless for the delete command since it deletes by worker name, not by entry point path. The `name` argument is now accepted as a positional argument, allowing users to run `wrangler delete my-worker` instead of `wrangler delete --name my-worker`. The `script` argument is now hidden but still accepted for backwards compatibility. + +- [#11967](https://github.com/cloudflare/workers-sdk/pull/11967) [`202c59e`](https://github.com/cloudflare/workers-sdk/commit/202c59e4f4f28419fb6ac0aa8c7dc3960a0c8d3e) Thanks [@emily-shen](https://github.com/emily-shen)! - chore: update undici + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------ | ------ | + | undici | 7.14.0 | 7.18.2 | + +- [#11940](https://github.com/cloudflare/workers-sdk/pull/11940) [`69ff962`](https://github.com/cloudflare/workers-sdk/commit/69ff9620487a6ae979f369eb1dbac887ce46e246) Thanks [@penalosa](https://github.com/penalosa)! - Improve error handling for Vite config transformations + + Replace assertions with proper error handling when transforming Vite configs. When Wrangler encounters a Vite config that uses a function or lacks a plugins array, it now provides clear, actionable error messages instead of crashing with assertion failures. The check function gracefully skips incompatible configs with debug logging. + +- Updated dependencies [[`8e4a0e5`](https://github.com/cloudflare/workers-sdk/commit/8e4a0e5e8d1e0bf75b6f11000f89f7eabafa392a), [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4), [`202c59e`](https://github.com/cloudflare/workers-sdk/commit/202c59e4f4f28419fb6ac0aa8c7dc3960a0c8d3e), [`133bf95`](https://github.com/cloudflare/workers-sdk/commit/133bf95783c8b63ecc2b572a4400c7aa4bd4f8c4), [`25e2c60`](https://github.com/cloudflare/workers-sdk/commit/25e2c608d529664ede251abe45fdb13ea9e56a9d)]: + - miniflare@4.20260116.0 + ## 4.59.2 ### Patch Changes diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index ad42dd1de158..b5cc32b8fb49 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -1,6 +1,6 @@ { "name": "wrangler", - "version": "4.59.2", + "version": "4.59.3", "description": "Command-line interface for all things Cloudflare Workers", "keywords": [ "wrangler",