Skip to content

Use dynamic date for nodejs_compat compatibility_date examples#27887

Closed
MattieTK wants to merge 2 commits intoproductionfrom
docs/nodejs-compat-dynamic-date
Closed

Use dynamic date for nodejs_compat compatibility_date examples#27887
MattieTK wants to merge 2 commits intoproductionfrom
docs/nodejs-compat-dynamic-date

Conversation

@MattieTK
Copy link
Member

Summary

  • Updates compatibility_date examples to use $today instead of hardcoded dates
  • Adds comments clarifying the minimum required date (2024-09-23) for Node.js compatibility
  • Changes apply to the Node.js compatibility docs and reusable partials for Workers and Hyperdrive

The WranglerConfig component automatically replaces $today with the current date at build time, ensuring readers always see the latest recommended date.

Context

We have noticed users creating projects with outdated compatibility dates, which we suspect is due to AI tools reading and reproducing the hardcoded dates from our documentation. Using dynamic dates should help ensure AI-assisted code generation uses current dates.

@github-actions
Copy link
Contributor

This PR requires additional review attention because it affects the following areas:

Partials

This PR updates partial files, which are pieces of content used across multiple files in our Render component.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 26, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/hyperdrive/ @elithrar, @thomasgauvin, @sejoker, @oxyjun, @cloudflare/pcx-technical-writing
/src/content/docs/pages/ @cloudflare/workers-docs, @GregBrimble, @WalshyDev, @aninibread, @irvinebroque, @cloudflare/pcx-technical-writing
/src/content/docs/workers-ai/ @rita3ko, @craigsdennis, @mchenco, @cloudflare/pcx-technical-writing
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/pcx-technical-writing, @cloudflare/wrangler, @mattietk
/src/content/partials/hyperdrive/ @elithrar, @thomasgauvin, @sejoker, @oxyjun, @cloudflare/pcx-technical-writing
/src/content/partials/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @WalshyDev, @cloudflare/deploy-config, @cloudflare/pcx-technical-writing, @cloudflare/wrangler, @mattietk

@MattieTK MattieTK requested a review from aninibread as a code owner January 26, 2026 19:47
Copy link
Contributor

@irvinebroque irvinebroque left a comment

Choose a reason for hiding this comment

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

nice one!!

@irvinebroque irvinebroque enabled auto-merge (squash) January 26, 2026 19:52
@irvinebroque
Copy link
Contributor

👏

@MattieTK
Copy link
Member Author

I've got a bunch more matches to go over here so feel free to merge this but this PR will either increase in size or have followups

@MattieTK MattieTK closed this Jan 30, 2026
auto-merge was automatically disabled January 30, 2026 13:40

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants