Skip to content

Use today as the compat date instead of relying on the actual workerd compat date#13051

Merged
dario-piotrowicz merged 8 commits intomainfrom
dario/no-today-as-compat-date
Apr 1, 2026
Merged

Use today as the compat date instead of relying on the actual workerd compat date#13051
dario-piotrowicz merged 8 commits intomainfrom
dario/no-today-as-compat-date

Conversation

@dario-piotrowicz
Copy link
Copy Markdown
Member

@dario-piotrowicz dario-piotrowicz commented Mar 25, 2026

Fixes https://jira.cfdata.org/browse/DEVX-2446

This PR simplifies the logic we've been using for determining the local compatibility date to use. From now on we simply use today as the compatibility date, this should always reliably work since now workerd supports dates up to 7 days in the future.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s): TODO
    • Documentation not necessary because: there are no user-facing changes that need documenting

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 25, 2026

🦋 Changeset detected

Latest commit: d3d3efd

The changes in this PR will be included in the next version bump.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 2026

⚠️ Issues found

.changeset/remove-getLocalWorkerdCompatibilityDate.md

Version type mismatch: This changeset uses minor for removing getLocalWorkerdCompatibilityDate from @cloudflare/workers-utils's public API, but removing a public export is a breaking change and should be major.

This is inconsistent with .changeset/remove-formatCompatibilityDate.md in the same PR, which correctly uses major for the analogous removal of formatCompatibilityDate from @cloudflare/workers-utils. Both changesets describe the same kind of change (removing a public export from the same package), so they should use the same version bump.


All other changesets look good:

  • deprecate-supportedCompatibilityDate.mdminor for deprecation is correct per guidelines.
  • remove-formatCompatibilityDate.mdmajor for removing a public export is correct.
  • use-today-date-for-compat.mdpatch for a reliability bug fix is appropriate.
  • vite-plugin-compat-date-today.mdminor for a behavior change + deprecation is appropriate.
  • workers-utils-get-todays-date.mdminor for a new exported utility function is correct.

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

This comment was marked as outdated.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 25, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13051

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13051

miniflare

npm i https://pkg.pr.new/miniflare@13051

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13051

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13051

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13051

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13051

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13051

wrangler

npm i https://pkg.pr.new/wrangler@13051

commit: d3d3efd

@dario-piotrowicz dario-piotrowicz force-pushed the dario/no-today-as-compat-date branch 4 times, most recently from b777740 to dac44eb Compare March 25, 2026 01:34
@dario-piotrowicz dario-piotrowicz force-pushed the dario/no-today-as-compat-date branch 2 times, most recently from c671d7e to 14305fe Compare March 30, 2026 21:53
@dario-piotrowicz dario-piotrowicz marked this pull request as ready for review March 30, 2026 22:00
@dario-piotrowicz dario-piotrowicz requested review from a team as code owners March 30, 2026 22:00
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 30, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

devin-ai-integration[bot]

This comment was marked as resolved.

@dario-piotrowicz dario-piotrowicz force-pushed the dario/no-today-as-compat-date branch 2 times, most recently from 49b266b to 680b091 Compare March 31, 2026 12:03
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits but LGTM

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 31, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@dario-piotrowicz dario-piotrowicz force-pushed the dario/no-today-as-compat-date branch from 07e103f to 8163340 Compare March 31, 2026 21:34
dario-piotrowicz and others added 2 commits April 1, 2026 20:22
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@petebacondarwin petebacondarwin force-pushed the dario/no-today-as-compat-date branch from 4fa9bf7 to d3d3efd Compare April 1, 2026 19:22
Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@dario-piotrowicz dario-piotrowicz merged commit d5bffde into main Apr 1, 2026
62 of 70 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/no-today-as-compat-date branch April 1, 2026 22:58
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Apr 1, 2026
NuroDev pushed a commit that referenced this pull request Apr 2, 2026
… compat date (#13051)

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
emily-shen pushed a commit that referenced this pull request Apr 8, 2026
… compat date (#13051)

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

wrangler should not implicitly change compat dates when workerd is outdated

3 participants