Skip to content

[create-cloudflare] Upgrade OpenAPI template to chanfana 3 and Zod v4#13454

Merged
emily-shen merged 1 commit intocloudflare:mainfrom
G4brym:upgrade-openapi-template-chanfana-3
Apr 14, 2026
Merged

[create-cloudflare] Upgrade OpenAPI template to chanfana 3 and Zod v4#13454
emily-shen merged 1 commit intocloudflare:mainfrom
G4brym:upgrade-openapi-template-chanfana-3

Conversation

@G4brym
Copy link
Copy Markdown
Member

@G4brym G4brym commented Apr 13, 2026

Upgrade the OpenAPI worker template from chanfana v2 (Zod v3) to chanfana v3.3 (Zod v4).

Changes:

  • Bump chanfana from ^2.6.3 to ^3.3.0 and zod from ^3.24.1 to ^4.0.0
  • Replace all removed chanfana parameter helpers (Str, Bool, Num, DateTime) with native Zod v4 equivalents (z.string(), z.boolean(), z.number(), z.iso.date())
  • Use chanfana's NotFoundException in taskFetch.ts instead of manual Response.json() for 404 responses
  • Fix due_date field to use z.iso.date() (matching the actual date-only example data) instead of DateTime() which mapped to datetime format

Migration reference: https://chanfana.pages.dev/migration-to-chanfana-3


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: This is a template-only change — template type-checks cleanly with the updated dependencies. No runtime tests exist for templates.
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: No user-facing doc changes needed; chanfana's own migration guide covers the API changes.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 13, 2026

🦋 Changeset detected

Latest commit: ef45eb7

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-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Apr 13, 2026
@G4brym G4brym force-pushed the upgrade-openapi-template-chanfana-3 branch from 43e7ba5 to e60f4f5 Compare April 13, 2026 14:23
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 13, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: ef45eb7

@G4brym G4brym force-pushed the upgrade-openapi-template-chanfana-3 branch from e60f4f5 to 10ff5be Compare April 13, 2026 15:20
@G4brym G4brym marked this pull request as ready for review April 13, 2026 15:20
@G4brym G4brym requested a review from workers-devprod as a code owner April 13, 2026 15:20
@G4brym
Copy link
Copy Markdown
Member Author

G4brym commented Apr 13, 2026

This solves #13441

@workers-devprod workers-devprod requested review from a team and dario-piotrowicz and removed request for a team April 13, 2026 15:20
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Apr 13, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

devin-ai-integration[bot]

This comment was marked as resolved.

@G4brym G4brym force-pushed the upgrade-openapi-template-chanfana-3 branch from 10ff5be to ef45eb7 Compare April 13, 2026 16:17
@edmundhung edmundhung removed the request for review from dario-piotrowicz April 14, 2026 14:14
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

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Apr 14, 2026
@emily-shen emily-shen merged commit bac2311 into cloudflare:main Apr 14, 2026
60 of 61 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Apr 14, 2026
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.

3 participants