Skip to content

configure C3 experimental projects to use @cloudflare/autoconfig directly - #14904

Open
dario-piotrowicz wants to merge 1 commit into
mainfrom
dario/c3-autoconfig-directly
Open

configure C3 experimental projects to use @cloudflare/autoconfig directly#14904
dario-piotrowicz wants to merge 1 commit into
mainfrom
dario/c3-autoconfig-directly

Conversation

@dario-piotrowicz

@dario-piotrowicz dario-piotrowicz commented Jul 29, 2026

Copy link
Copy Markdown
Member

C3 for frameworks in experimental mode right now spawns a wrangler setup process. This is not super efficient and it also ties C3 to Wrangler which is not ideal (given cf and all).

So in this PR I am updating C3 to use the autoconfig package directly instead.


  • 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: changing an internal implementation details

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

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cd34d92

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

This PR includes changesets to release 1 package
Name Type
create-cloudflare 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

@github-actions

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@ask-bonk

ask-bonk Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

I've completed my analysis. The change is well-structured. The main behavioral observations:

  1. Wrangler not installed when project already configured: The old code always ran installWrangler() for the experimental path. The new code only installs Wrangler (via autoconfig) when !details.configured. For fresh C3 scaffolds this is essentially always non-configured, so this is unlikely to matter in practice — but it's a real behavioral difference worth noting.

  2. The stringifyLogArgs, dialog mappings, and metrics wiring are all correct. All deps are declared.

These are minor/low-severity observations, not concrete bugs with a clear fix that I should provide as a suggestion. The Wrangler-install-on-configured difference is a design judgement (a fresh scaffold is never pre-configured), and I shouldn't post a speculative suggestion that changes behavior without certainty. Nothing else rises to actionable severity per the guidelines (no logic bugs, security issues, backward-compat violations, or incorrect API behavior in the actual usage path).

LGTM

github run

@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/autoconfig@14904

@cloudflare/config

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/config@14904

create-cloudflare

npm i https://pkg.pr.new/cloudflare/workers-sdk/create-cloudflare@14904

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/deploy-helpers@14904

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/kv-asset-handler@14904

miniflare

npm i https://pkg.pr.new/cloudflare/workers-sdk/miniflare@14904

@cloudflare/pages-functions

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/pages-functions@14904

@cloudflare/pages-shared

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/pages-shared@14904

@cloudflare/unenv-preset

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/unenv-preset@14904

@cloudflare/vite-plugin

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/vite-plugin@14904

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-auth

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

npm i https://pkg.pr.new/cloudflare/workers-sdk/wrangler@14904

commit: cd34d92

@dario-piotrowicz
dario-piotrowicz force-pushed the dario/c3-autoconfig-directly branch from 3509514 to 6b79d96 Compare July 29, 2026 17:04
@dario-piotrowicz
dario-piotrowicz force-pushed the dario/c3-autoconfig-directly branch from 6b79d96 to cd34d92 Compare July 29, 2026 22:05
@dario-piotrowicz
dario-piotrowicz marked this pull request as ready for review July 30, 2026 13:09
@workers-devprod
workers-devprod requested review from a team and emily-shen and removed request for a team July 30, 2026 13:10
@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/c3-autoconfig-direct.md: [@cloudflare/wrangler]
  • packages/create-cloudflare/package.json: [@cloudflare/wrangler]
  • packages/create-cloudflare/src/tests/autoconfig-context.test.ts: [@cloudflare/wrangler]
  • packages/create-cloudflare/src/autoconfig-context.ts: [@cloudflare/wrangler]
  • packages/create-cloudflare/src/cli.ts: [@cloudflare/wrangler]
  • packages/create-cloudflare/src/event.ts: [@cloudflare/wrangler]
  • packages/create-cloudflare/src/wrangler/tests/load-config.test.ts: [@cloudflare/wrangler]
  • packages/create-cloudflare/src/wrangler/config.ts: [@cloudflare/wrangler]
  • pnpm-lock.yaml: [@cloudflare/wrangler]

@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: No Issues Found

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

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants