diff --git a/.changeset/ten-dancers-wonder.md b/.changeset/ten-dancers-wonder.md new file mode 100644 index 000000000000..b489b06e334a --- /dev/null +++ b/.changeset/ten-dancers-wonder.md @@ -0,0 +1,7 @@ +--- +"wrangler": patch +--- + +fix: remove confusing `--local` messaging from `wrangler pages dev` + +Running `wrangler pages dev` would previously log a warning saying `--local is no longer required` even though `--local` was never set. This change removes this warning. diff --git a/fixtures/pages-functions-app/tests/index.test.ts b/fixtures/pages-functions-app/tests/index.test.ts index 1092e56dab8e..111a5d077104 100644 --- a/fixtures/pages-functions-app/tests/index.test.ts +++ b/fixtures/pages-functions-app/tests/index.test.ts @@ -4,10 +4,13 @@ import { describe, it, beforeAll, afterAll } from "vitest"; import { runWranglerPagesDev } from "../../shared/src/run-wrangler-long-lived"; describe("Pages Functions", () => { - let ip: string, port: number, stop: (() => Promise) | undefined; + let ip: string, + port: number, + stop: (() => Promise) | undefined, + getOutput: () => string; beforeAll(async () => { - ({ ip, port, stop } = await runWranglerPagesDev( + ({ ip, port, stop, getOutput } = await runWranglerPagesDev( resolve(__dirname, ".."), "public", [ @@ -94,6 +97,13 @@ describe("Pages Functions", () => { expect(text).toContain("

An asset

"); }); + it("doesn't warn about local mode", async ({ expect }) => { + // Regression test for https://github.com/cloudflare/workers-sdk/issues/4210 + expect(getOutput()).not.toContain( + "--local is no longer required and will be removed in a future version" + ); + }); + describe("can mount a plugin", () => { it("should mount Middleware", async ({ expect }) => { const response = await fetch( diff --git a/packages/wrangler/src/api/dev.ts b/packages/wrangler/src/api/dev.ts index 16d4a0a35492..1ba254247aee 100644 --- a/packages/wrangler/src/api/dev.ts +++ b/packages/wrangler/src/api/dev.ts @@ -152,7 +152,7 @@ export async function unstable_dev( _: [], $0: "", remote: !local, - local, + local: undefined, experimentalLocal: undefined, d1Databases, disableDevRegistry,