-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wrangler] Clean up compatibility fallback warnings (#4209)
* Only show compatibility date fallback warning if new version available When a compatibility date greater than the installed `workerd` version is selected, Miniflare logs a warning. The intention here is to warn users if they've set a compatibility date, but haven't updated `workerd`, so features they've requested won't be available. The problem is that this warning is only actionable if there's an update available. This change suppresses the warning if there's no new version available. * Use installed `workerd` version as default compat date instead of now `wrangler dev` would previously use the current date as the default compatibility date if one wasn't set in `wrangler.toml`. Before the previous commit, this would show a warning if it was greater than the installed `workerd` version. Whilst using the current date as the default would no longer log a warning with this change, if there was an update it would. This change sets the default to the `workerd` version instead.
- Loading branch information
Showing
5 changed files
with
58 additions
and
7 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,17 @@ | ||
--- | ||
"wrangler": minor | ||
--- | ||
|
||
fix: suppress compatibility date fallback warnings if no `wrangler` update is available | ||
|
||
If a compatibility date greater than the installed version of `workerd` was | ||
configured, a warning would be logged. This warning was only actionable if a new | ||
version of `wrangler` was available. The intent here was to warn if a user set | ||
a new compatibility date, but forgot to update `wrangler` meaning changes | ||
enabled by the new date wouldn't take effect. This change hides the warning if | ||
no update is available. | ||
|
||
It also changes the default compatibility date for `wrangler dev` sessions | ||
without a configured compatibility date to the installed version of `workerd`. | ||
This previously defaulted to the current date, which may have been unsupported | ||
by the installed runtime. |
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