From 4f89b57f98a32040b45649aa56059eb9304e0ad1 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Thu, 25 Sep 2025 15:48:18 +0100 Subject: [PATCH 1/3] switch zone route warning to an info message --- .changeset/puny-coins-dream.md | 5 +++++ packages/wrangler/src/__tests__/deploy.test.ts | 10 +--------- packages/wrangler/src/deploy/deploy.ts | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) create mode 100644 .changeset/puny-coins-dream.md diff --git a/.changeset/puny-coins-dream.md b/.changeset/puny-coins-dream.md new file mode 100644 index 00000000000..40fdd839ce3 --- /dev/null +++ b/.changeset/puny-coins-dream.md @@ -0,0 +1,5 @@ +--- +"wrangler": patch +--- + +switch zone route warning to an info message diff --git a/packages/wrangler/src/__tests__/deploy.test.ts b/packages/wrangler/src/__tests__/deploy.test.ts index a09a541f0ad..a59d64abf0b 100644 --- a/packages/wrangler/src/__tests__/deploy.test.ts +++ b/packages/wrangler/src/__tests__/deploy.test.ts @@ -1421,15 +1421,7 @@ describe("deploy", () => { expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` - "▲ [WARNING] The current authentication token does not have 'All Zones' permissions. - - Falling back to using the zone-based API endpoint to update each route individually. - Note that there is no access to routes associated with zones that the API token does not have - permission for. - Existing routes for this Worker in such zones will not be deleted. - - - ▲ [WARNING] Previously deployed routes: + "▲ [WARNING] Previously deployed routes: The following routes were already associated with this worker, and have not been deleted: - \\"foo.example.com/other-route\\" diff --git a/packages/wrangler/src/deploy/deploy.ts b/packages/wrangler/src/deploy/deploy.ts index e3e13666c6a..9d44d291573 100644 --- a/packages/wrangler/src/deploy/deploy.ts +++ b/packages/wrangler/src/deploy/deploy.ts @@ -1068,7 +1068,7 @@ async function publishRoutesFallback( { telemetryMessage: true } ); } - logger.warn( + logger.info( "The current authentication token does not have 'All Zones' permissions.\n" + "Falling back to using the zone-based API endpoint to update each route individually.\n" + "Note that there is no access to routes associated with zones that the API token does not have permission for.\n" + From 9178ddc6681d8afa425070be798df75a134f7b40 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Thu, 2 Oct 2025 11:55:19 +0100 Subject: [PATCH 2/3] relax request content type check --- packages/wrangler/src/__tests__/deploy.test.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/wrangler/src/__tests__/deploy.test.ts b/packages/wrangler/src/__tests__/deploy.test.ts index a59d64abf0b..805064b50e4 100644 --- a/packages/wrangler/src/__tests__/deploy.test.ts +++ b/packages/wrangler/src/__tests__/deploy.test.ts @@ -1423,12 +1423,12 @@ describe("deploy", () => { expect(std.warn).toMatchInlineSnapshot(` "▲ [WARNING] Previously deployed routes: - The following routes were already associated with this worker, and have not been deleted: - - \\"foo.example.com/other-route\\" - If these routes are not wanted then you can remove them in the dashboard. + The following routes were already associated with this worker, and have not been deleted: + - \\"foo.example.com/other-route\\" + If these routes are not wanted then you can remove them in the dashboard. - " - `); + " + `); expect(std.out).toMatchInlineSnapshot(` "Total Upload: xx KiB / gzip: xx KiB Worker Startup Time: 100 ms @@ -5242,7 +5242,6 @@ addEventListener('fetch', event => {});` ["Q29udGVudCBvZiBmaWxlLTM="], "ff5016e92f039aa743a4ff7abb3180fa", { - // TODO: this should be "text/plain; charset=utf-8", but msw? is stripping the charset part type: "text/plain", } ) @@ -14029,7 +14028,7 @@ expect.extend({ }; } - if (!equals(received.type, expected.type)) { + if (!equals(received.type, expect.stringMatching(expected.type))) { return { pass: false, message: () => From 4fe82e51e6eff64e24162f666beba25a60a7ae40 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Thu, 2 Oct 2025 13:57:20 +0100 Subject: [PATCH 3/3] fixup! switch zone route warning to an info message --- packages/wrangler/src/__tests__/deploy.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/wrangler/src/__tests__/deploy.test.ts b/packages/wrangler/src/__tests__/deploy.test.ts index 805064b50e4..ae9beed092f 100644 --- a/packages/wrangler/src/__tests__/deploy.test.ts +++ b/packages/wrangler/src/__tests__/deploy.test.ts @@ -1419,6 +1419,12 @@ describe("deploy", () => { }); await runWrangler("deploy ./index"); + expect(std.info).toMatchInlineSnapshot(` + "The current authentication token does not have 'All Zones' permissions. + Falling back to using the zone-based API endpoint to update each route individually. + Note that there is no access to routes associated with zones that the API token does not have permission for. + Existing routes for this Worker in such zones will not be deleted." + `); expect(std.err).toMatchInlineSnapshot(`""`); expect(std.warn).toMatchInlineSnapshot(` "▲ [WARNING] Previously deployed routes: