forked from cloudflare/workers-sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[C3] fix: use a valid compatibility date for worker templates
Previously, we changed wrangler.toml to use the current date for the compatibility_date setting in wrangler.toml when generating workers. But this is almost always going to be new recent and results in a warning. Now we look up the most recent compatibility date via npm on the workerd package and use that instead. Fixes cloudflare#2385
- Loading branch information
1 parent
23ed5f5
commit 789d085
Showing
11 changed files
with
159 additions
and
43 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,14 @@ | ||
--- | ||
"create-cloudflare": patch | ||
--- | ||
|
||
fix: use a valid compatibility date for worker templates | ||
|
||
Previously, we changed wrangler.toml to use the current date for the | ||
compatibility_date setting in wrangler.toml when generating workers. | ||
But this is almost always going to be too recent and results in a warning. | ||
|
||
Now we look up the most recent compatibility date via npm on the workerd | ||
package and use that instead. | ||
|
||
Fixes https://github.com/cloudflare/workers-sdk/issues/2385 |
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 |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
"weakset", | ||
"webassemblymemory", | ||
"websockets", | ||
"workerd", | ||
"xxhash" | ||
], | ||
"cSpell.ignoreWords": [ | ||
|
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
4 changes: 2 additions & 2 deletions
4
packages/create-cloudflare/templates/chatgptPlugin/ts/wrangler.toml
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
name = "cloudflare-workers-chatgpt-plugin-example" | ||
name = "<TBD>" | ||
main = "src/index.ts" | ||
compatibility_date = "2023-04-07" | ||
compatibility_date = "<TBD>" |
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