Skip to content

Make all properties in previews optional#13468

Merged
jamesopstad merged 3 commits intomainfrom
james/previews-types
Apr 14, 2026
Merged

Make all properties in previews optional#13468
jamesopstad merged 3 commits intomainfrom
james/previews-types

Conversation

@jamesopstad
Copy link
Copy Markdown
Contributor

@jamesopstad jamesopstad commented Apr 14, 2026

Make all properties in previews optional

All properties in previews were previously incorrectly typed as required.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: types change
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: types fix

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


Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 14, 2026

🦋 Changeset detected

Latest commit: 40ec892

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

@jamesopstad jamesopstad requested a review from 1000hz April 14, 2026 11:10
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Apr 14, 2026
@workers-devprod workers-devprod requested review from a team and dario-piotrowicz and removed request for a team April 14, 2026 11:11
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Apr 14, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

✅ All changesets look good

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 14, 2026

The analysis is thorough and clear. All property accesses on PreviewsConfig already use optional chaining or nullish coalescing, the runtime validation already treats all properties as optional, and the previous type was inaccurate. The Partial<> change makes the TypeScript type match actual runtime behavior.

LGTM

github run

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 14, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 40ec892

Copy link
Copy Markdown
Contributor

@1000hz 1000hz left a comment

Choose a reason for hiding this comment

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

thanks, @jamesopstad!

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
@jamesopstad jamesopstad merged commit 051db1f into main Apr 14, 2026
55 checks passed
@jamesopstad jamesopstad deleted the james/previews-types branch April 14, 2026 12:13
@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.

4 participants