Use a fixed default compatibility date derived from the pinned workerd - #15185
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 6567b08 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
workers-devprod
requested review from
a team and
NuroDev
and removed request for
a team
August 14, 2026 11:12
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
Contributor
|
✅ All changesets look good |
Contributor
|
All consistent. I've completed a thorough review of the changes across all 45 files. The PR:
The logic is sound, backward compatibility is preserved ( LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
jamesopstad
marked this pull request as draft
August 14, 2026 11:26
jamesopstad
force-pushed
the
james/default-compat-date
branch
2 times, most recently
from
August 14, 2026 12:37
df6ab5a to
d35dec1
Compare
jamesopstad
marked this pull request as ready for review
August 14, 2026 13:06
dario-piotrowicz
approved these changes
Aug 14, 2026
workers-devprod
approved these changes
Aug 14, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
jamesopstad
force-pushed
the
james/default-compat-date
branch
from
August 15, 2026 18:48
d35dec1 to
6567b08
Compare
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When no compatibility date is set, Wrangler, C3 and the Vitest pool all defaulted to the current date. workerd only accepts a compatibility date up to 7 days beyond its own release, so the default could get ahead of the runtime that had been installed and local development would fail to start.
This adds a single
DEFAULT_COMPAT_DATEconstant to@cloudflare/workers-utils, committed to the repo and derived from theworkerdversion pinned in the pnpm catalog. That leaves a week of headroom and can never exceed what the shipped runtime supports.Keeping it current is automated.
pnpm check:compat-date, which runs as part ofpnpm check, fails if the constant and the pin drift apart. Dependabot'sworkerdbump PRs refresh the constant in the same commit.--latestis affected too.wrangler deploy --latest,wrangler versions upload --latestandwrangler pages download config(for projects set to always use the latest compatibility date) all wrote the current date into a config file for later commands to use, which could leave a project unable to runwrangler dev. These now resolve to the same fixed default, and the flag's help text and warning have been reworded to match.getTodaysCompatDate()is deliberately retained for validation inpackages/miniflare/src/plugins/core/index.ts, which must keep comparing against the real current date.A picture of a cute animal (not mandatory, but encouraged)