Skip to content

Commit

Permalink
Remove second wrangler banner from namespace rename (#5226)
Browse files Browse the repository at this point in the history
* Rename second wrangler banner from namespace rename

* Add changeset

* Undo formatting change

* update test

* update changeset

---------

Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
  • Loading branch information
DaniFoldi and petebacondarwin committed May 2, 2024
1 parent 007ba93 commit f63e7a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/young-chefs-change.md
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

fix: remove second Wrangler banner from `wrangler dispatch-namespace rename`
2 changes: 2 additions & 0 deletions packages/wrangler/src/__tests__/worker-namespace.test.ts
@@ -1,4 +1,5 @@
import { rest } from "msw";
import { printWranglerBanner } from "../update-check";
import { mockAccountId, mockApiToken } from "./helpers/mock-account-id";
import { mockConsoleMethods } from "./helpers/mock-console";
import {
Expand Down Expand Up @@ -335,6 +336,7 @@ describe("dispatch-namespace", () => {
expect(std.out).toMatchInlineSnapshot(
`"Renamed dispatch namespace \\"my-namespace\\" to \\"new-namespace\\""`
);
expect((printWranglerBanner as jest.Mock).mock.calls.length).toEqual(1);
});
});
});
2 changes: 0 additions & 2 deletions packages/wrangler/src/dispatch-namespace.ts
Expand Up @@ -89,8 +89,6 @@ async function renameWorkerNamespace(
oldName: string,
newName: string
) {
void printWranglerBanner();

await fetchResult(
`/accounts/${accountId}/workers/dispatch/namespaces/${oldName}`,
{
Expand Down

0 comments on commit f63e7a5

Please sign in to comment.