Skip to content

fix(wrangler): Fix type generation inheritable bindings#12746

Merged
NuroDev merged 15 commits intomainfrom
workers-sdk-assets-type-generation
Mar 6, 2026
Merged

fix(wrangler): Fix type generation inheritable bindings#12746
NuroDev merged 15 commits intomainfrom
workers-sdk-assets-type-generation

Conversation

@NuroDev
Copy link
Member

@NuroDev NuroDev commented Mar 3, 2026

Fixes #12737.

Currently the type generation requires a binding to be defined at all levels (top-level and all named environments) in order for the generated binding type to be marked as required.

However, as pointed out in the linked issue, some bindings, namely the assets binding, are inheritable (Docs) and allow for you to define the binding once at the top-level and have it applied to all named environments. As such, the type generation to account for this.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: Bug fix for an existing feature.

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


Open with Devin

@NuroDev NuroDev self-assigned this Mar 3, 2026
@changeset-bot
Copy link

changeset-bot bot commented Mar 3, 2026

🦋 Changeset detected

Latest commit: 8774547

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 3, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 1a83959

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

✅ All changesets look good

@NuroDev NuroDev marked this pull request as ready for review March 4, 2026 11:05
@NuroDev NuroDev requested a review from a team as a code owner March 4, 2026 11:05
@workers-devprod
Copy link
Contributor

workers-devprod commented Mar 4, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

Copy link
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 3 additional findings.

Open in Devin Review

Copy link
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 found 1 new potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

@NuroDev NuroDev requested a review from jamesopstad March 6, 2026 13:01
Copy link
Contributor

@jamesopstad jamesopstad left a comment

Choose a reason for hiding this comment

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

Looks good!

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 6, 2026
@NuroDev NuroDev merged commit 211d75d into main Mar 6, 2026
35 checks passed
@NuroDev NuroDev deleted the workers-sdk-assets-type-generation branch March 6, 2026 19:10
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 6, 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.

wrangler types generates optional ASSETS binding when using inheritable static assets configuration

3 participants