-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only show fetch warning if on old compatibility_date (#7038)
* fix: only show fetch warning if on old compatibility_date Now that we have the `allow_custom_ports` compatibility flag, we only need to show the fetch warnings when that flag is not enabled. Fixes cloudflare/workerd#2955 * fix: typo
- Loading branch information
1 parent
b4a0e74
commit e2e6912
Showing
11 changed files
with
117 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
fix: only show fetch warning if on old compatibility_date | ||
|
||
Now that we have the `allow_custom_ports` compatibility flag, we only need to show the fetch warnings when that flag is not enabled. | ||
|
||
Fixes https://github.com/cloudflare/workerd/issues/2955 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import "vitest"; | ||
import { shouldCheckFetch } from "../deployment-bundle/bundle"; | ||
|
||
describe("shouldCheckFetch()", () => { | ||
it("should be true for old compat date", () => { | ||
expect(shouldCheckFetch("2024-09-01")).toBe(true); | ||
}); | ||
|
||
it("should be false for new compat date", () => { | ||
expect(shouldCheckFetch("2024-09-02")).toBe(false); | ||
}); | ||
|
||
it("should be true for old compat date + old compat flag", () => { | ||
expect(shouldCheckFetch("2024-09-01", ["ignore_custom_ports"])).toBe(true); | ||
}); | ||
|
||
it("should be false for old compat date + new compat flag", () => { | ||
expect(shouldCheckFetch("2024-09-01", ["allow_custom_ports"])).toBe(false); | ||
}); | ||
|
||
it("should be true for new compat date + old compat flag", () => { | ||
expect(shouldCheckFetch("2024-09-02", ["ignore_custom_ports"])).toBe(true); | ||
}); | ||
|
||
it("should be false for new compat date + new compat flag", () => { | ||
expect(shouldCheckFetch("2024-09-02", ["allow_custom_ports"])).toBe(false); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.