Pin the runtime compatibility date on deploy
deploy & domains
// what it does
Sets the Workers runtime behavior date for this deploy, overriding whatever is in config. The compat date freezes runtime semantics so a platform update can't silently change how your Worker behaves. You normally set it once in wrangler.jsonc; the flag is useful for trying a newer date or flag ad hoc.
// shell
$ wrangler deploy --compatibility-date 2025-01-01$ wrangler deploy --compatibility-flags nodejs_compat// gotcha
An absent or stale compatibility date can quietly shift behavior — which Node.js APIs or streams semantics apply, for instance. Bump it deliberately and test rather than leaving it years behind.