-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wrangler] Clean up compatibility fallback warnings #4209
Conversation
🦋 Changeset detectedLatest commit: 7c3e500 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6564553983/npm-package-wrangler-4209 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6564553983/npm-package-wrangler-4209 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6564553983/npm-package-wrangler-4209 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6564553983/npm-package-cloudflare-pages-shared-4209 Note that these links will no longer work once the GitHub Actions artifact expires.
| Please ensure constraints are pinned, and |
Codecov Report
@@ Coverage Diff @@
## main #4209 +/- ##
==========================================
- Coverage 75.37% 75.34% -0.04%
==========================================
Files 223 223
Lines 12217 12229 +12
Branches 3159 3161 +2
==========================================
+ Hits 9209 9214 +5
- Misses 3008 3015 +7
|
8154bf6
to
b07bd1d
Compare
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.
`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.
b07bd1d
to
7c3e500
Compare
Fixes cloudflare/miniflare#666 and #3784
What this PR solves / how to test:
Hey! 👋 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 updatedworkerd
, 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.wrangler dev
would previously use the current date as the default compatibility date if one wasn't set inwrangler.toml
. Whilst using the current date as the default would no longer log a warning with this change, if there was an update available it would. So this change also sets the default to theworkerd
version instead.To test this, create a new Wrangler project with today's compatibility date. Verify that you don't see any fallback warnings.
Associated docs issue(s)/PR(s):
N/A
Author has included the following, where applicable:
Reviewer is to perform the following, as applicable:
Note for PR author:
We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label
highlight pr review
so future reviewers can take inspiration and learn from it.