Fix Cloudflare Worker type drift before workers-types v5 removes dated entrypoints
Cloudflare released @cloudflare/workers-types v5 with only latest and experimental runtime type entrypoints, making wrangler-generated types the safer path for Workers pinned to compatibility dates.
Cloudflare has released @cloudflare/workers-types v5, and the confidence level is confirmed by Cloudflare's changelog. The practical change is narrow but important: the package now exposes only the latest stable runtime types and an experimental entrypoint, while dated entrypoints such as @cloudflare/workers-types/2022-11-30 are removed. Projects that need types locked to a Worker compatibility date should generate them with wrangler types instead of relying on package entrypoints.

What changed
Cloudflare's July 3, 2026 changelog says @cloudflare/workers-types v5 simplifies the package to expose the latest runtime types. The two entrypoints are now @cloudflare/workers-types for the latest compatibility date with stable flags and @cloudflare/workers-types/experimental for APIs behind experimental compatibility flags.
The dated entrypoints are gone in v5. Cloudflare points Worker authors back to Wrangler v4 for compatibility-date-aware type generation, because wrangler types creates a type file that matches the project's Worker configuration.
| Surface | Best fit | Access | Caveat |
|---|---|---|---|
@cloudflare/workers-types v5 | Libraries or shared packages that need current Worker runtime types | npm package | Tracks latest stable runtime, not a pinned compatibility date |
@cloudflare/workers-types/experimental | Testing APIs behind experimental compatibility flags | npm package | Experimental APIs can change |
wrangler types | Worker apps pinned to compatibility dates and flags | Wrangler v4 workflow | Regenerate after config changes |
| Older dated package imports | Legacy projects | Removed in v5 | Replace before CI upgrades the package |
Why this is early
This is early because the changelog landed on July 3, 2026, and many Workers projects update type packages through routine dependency automation. A lockfile can hide the issue until Renovate, Dependabot, or a manual upgrade pulls the v5 package into CI.
The primary source is Cloudflare's own changelog. The supporting Cloudflare TypeScript docs explain why generated types are the recommended path for Worker apps: they can reflect the compatibility date, compatibility flags, and bindings in the Worker configuration. The GitHub repository adds context that older repository-based type maintenance moved to generated types from workerd.
Key takeaways
@cloudflare/workers-typesv5 no longer carries dated runtime type entrypoints.- Worker apps that care about exact runtime compatibility should run
wrangler types. - Shared packages can still use
@cloudflare/workers-typeswhen they only need current Worker runtime types. - CI failures may appear as TypeScript import errors, missing runtime APIs, or mismatched bindings after dependency updates.
- Treat this as a migration check before broad automated upgrades.
Availability and access
Cloudflare says v5 is available through normal package-manager installs such as npm, yarn, pnpm, and bun. The safer app-level route is not a different package; it is adding wrangler types to the project workflow and pointing tsconfig.json at the generated declaration file.
For teams with multiple Workers, the access question is operational. Identify which repositories import dated @cloudflare/workers-types/* paths, which generate types already, and which libraries depend on generic Worker types. Those three groups should not be upgraded the same way.
Practical LinkLoot angle
This is a small dependency change with a real maintenance edge. If a Worker app is pinned to a compatibility date, latest runtime types can make TypeScript accept APIs that the deployed Worker does not actually have, or complain about APIs that are valid for that project's configuration.
Use the release as a cleanup trigger. Search for dated imports, add a generate-types script, commit the generated type file if that fits your CI model, and make dependency bots run type checks before merging. For broader automation patterns, pair this with LinkLoot's AI workflow automation guide: /guides/ai-workflow-automation.
What to verify before you act
- Search for imports such as
@cloudflare/workers-types/2023-03-01or older dated entrypoints. - Confirm whether each Worker project has a
compatibility_dateand compatibility flags in its Wrangler config. - Run
wrangler typeslocally and in CI before upgrading the package. - Check
tsconfig.jsonso TypeScript reads the generated declaration file. - Review libraries separately from Worker apps; shared packages may still prefer the package entrypoint.
Source check
Confirmed by Cloudflare: @cloudflare/workers-types v5 exposes latest stable and experimental entrypoints, and dated entrypoints are removed.
Implementation context: Cloudflare's TypeScript docs recommend wrangler types for generating runtime types that match a Worker's configuration. The cloudflare/workers-types repository explains that newer package generations moved away from the old repository maintenance path.
Independent distribution note: package registries and mirrors can lag or render inconsistently, so LinkLoot is treating Cloudflare's changelog and docs as the authority for the v5 migration behavior.
Cloudflare says v5 keeps latest stable and experimental runtime type entrypoints and removes dated entrypoints.
