Skip to content

Generate types during dev and build and output to .cloudflare/types - #15778

Merged
jamesopstad merged 1 commit into
mainfrom
james/new-config-types-output
Sep 22, 2026
Merged

jamesopstad merged 1 commit into
mainfrom
james/new-config-types-output

Conversation

@jamesopstad

Copy link
Copy Markdown
Contributor

Generate types during development and builds with the experimental configuration

Vite and Wrangler now keep the inferred configuration and runtime declarations in .cloudflare/types/index.d.ts and refresh them during both development and production builds. In the experimental wrangler.config.ts format, the types option is now top-level because it applies to both commands.


  • 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: experimental feature

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

@changeset-bot

changeset-bot Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8e1365a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@cloudflare/vite-plugin Minor
wrangler Minor
@cloudflare/vitest-plugin Patch

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

pkg-pr-new Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@15778

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@15778

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@15778

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@15778

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@15778

create-cloudflare

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

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@15778

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@15778

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@15778

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@15778

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@15778

wrangler

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

commit: 8e1365a

@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@jamesopstad
jamesopstad force-pushed the james/new-config-types-output branch 2 times, most recently from a29094f to 597d81e Compare September 22, 2026 15:52
@jamesopstad
jamesopstad marked this pull request as ready for review September 22, 2026 15:59
@workers-devprod
workers-devprod requested review from a team and dario-piotrowicz and removed request for a team September 22, 2026 16:00
@workers-devprod

workers-devprod commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

@jamesopstad
jamesopstad marked this pull request as draft September 22, 2026 16:05
@jamesopstad
jamesopstad force-pushed the james/new-config-types-output branch 2 times, most recently from 013b6e4 to bcb9045 Compare September 22, 2026 16:36
@jamesopstad
jamesopstad marked this pull request as ready for review September 22, 2026 16:36
@jamesopstad
jamesopstad marked this pull request as draft September 22, 2026 16:43
@jamesopstad
jamesopstad force-pushed the james/new-config-types-output branch from bcb9045 to 8e1365a Compare September 22, 2026 16:46
@jamesopstad
jamesopstad marked this pull request as ready for review September 22, 2026 16:55

@dario-piotrowicz dario-piotrowicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 🙂

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

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 Sep 22, 2026
@jamesopstad
jamesopstad merged commit cd7508c into main Sep 22, 2026
71 of 72 checks passed
@jamesopstad
jamesopstad deleted the james/new-config-types-output branch September 22, 2026 19:54
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Sep 22, 2026
brandhaug added a commit to brandhaug/b2b-saas-starter that referenced this pull request Sep 27, 2026
## pnpm-workspace.yaml (default)

## Dependency Updates

| Package | From | To | Type |
| --- | --- | --- | --- |
| `wrangler` | 4.136.2 | 4.138.0 | minor |

## Release Notes

<details>
<summary><b>wrangler</b> (4.136.2 → 4.138.0) — 3 releases</summary>

<details>
<summary><b>4.138.0</b></summary>

### Minor Changes

- [#15776](cloudflare/workers-sdk#15776)
[`b03f960`](cloudflare/workers-sdk@b03f960)
Thanks [@<!---->edevil](https://github.com/edevil)! - Add event-code
support to temporary Worker deployments

Use `wrangler deploy --temporary --event-code <code>` to provision an
account for an event. Wrangler requires explicit server acknowledgement
before caching the account and keeps the event code out of its cache and
telemetry.

- [#15817](cloudflare/workers-sdk#15817)
[`6e77c53`](cloudflare/workers-sdk@6e77c53)
Thanks [@<!---->jamesopstad](https://github.com/jamesopstad)! - Allow
framework commands to produce Preview Build Output with the experimental
config

When `cf previews deploy` invokes a framework build command, Preview
intent is now preserved. Function-based `cloudflare.config.ts` files
receive `isPreview: true`, and generated Build Output is marked as a
Preview build.

### Patch Changes

- [#15806](cloudflare/workers-sdk#15806)
[`8fade73`](cloudflare/workers-sdk@8fade73)
Thanks [@<!---->NuroDev](https://github.com/NuroDev)! - Standardize Zod
validation error output

Format validation errors with Zod's built-in `prettifyError()` helper so
Miniflare, Wrangler, the Vite plugin, and the Vitest plugin show
consistent messages and property paths.

- Updated dependencies
[[`a71237a`](cloudflare/workers-sdk@a71237a),
[`8fade73`](cloudflare/workers-sdk@8fade73)]:
  - [email protected]

</details>

<details>
<summary><b>4.137.0</b></summary>

### Minor Changes

- [#15778](cloudflare/workers-sdk#15778)
[`cd7508c`](cloudflare/workers-sdk@cd7508c)
Thanks [@<!---->jamesopstad](https://github.com/jamesopstad)! - Generate
types during development and supported builds with Vite's
`experimental.newConfig` option or Wrangler's
`--experimental-new-config` flag (and `--experimental-cf-build-output`
for builds)

When Wrangler's `--experimental-new-config` flag or Vite's
`experimental.newConfig` option is enabled, inferred configuration and
runtime declarations are now kept in `.cloudflare/types/index.d.ts`.
Vite refreshes them during development and production builds. Wrangler
refreshes them during development and when building with both
`--experimental-new-config` and `--experimental-cf-build-output`. In the
experimental `wrangler.config.ts` format, the `types` option is now
top-level because it applies to both commands.

### Patch Changes

- [#15765](cloudflare/workers-sdk#15765)
[`1bdb96d`](cloudflare/workers-sdk@1bdb96d)
Thanks [@<!---->th0m](https://github.com/th0m)! - Prepare the required
egress sidecar for local Containers without configured images

Wrangler dev and Vite dev/preview now pull the required sidecar for
Durable Object-managed Containers that select their application image at
start time. Previously, these Containers failed to start unless the
sidecar image was already cached in Docker.

- [#15712](cloudflare/workers-sdk#15712)
[`f5605f5`](cloudflare/workers-sdk@f5605f5)
Thanks [@<!---->alsuren](https://github.com/alsuren)! - Match D1 SQL
statement splitting to the local SQLite runtime

Wrangler now uses SQLite's statement-completion state machine when
splitting D1 SQL files. This keeps trigger, quoted identifier, comment,
and keyword handling consistent with local exe

…[full
notes](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.137.0)

</details>

<p><i>…and 1 more release(s) not shown</i></p>

</details>

---
*This PR was auto-generated by
[catalog-update-action](https://github.com/brandhaug/catalog-update-action).*

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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