Skip to content

Wrangler: add Pages detection to autoconfig flows#12382

Merged
dario-piotrowicz merged 7 commits intomainfrom
dario/DEVX-2439/autoconfig-pages-detection
Feb 10, 2026
Merged

Wrangler: add Pages detection to autoconfig flows#12382
dario-piotrowicz merged 7 commits intomainfrom
dario/DEVX-2439/autoconfig-pages-detection

Conversation

@dario-piotrowicz
Copy link
Member

@dario-piotrowicz dario-piotrowicz commented Feb 3, 2026

Fixes https://jira.cfdata.org/browse/DEVX-2439

When running the autoconfig logic (via wrangler setup, wrangler deploy --x-autoconfig, or the programmatic autoconfig API), Wrangler now detects when a project appears to be a Pages project and handles it appropriately:

  • For wrangler deploy, it warns the user but still allows them to proceed
  • For wrangler setup and the programmatic autoconfig API, it throws a fatal error

  • 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: tracked elsewhere

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


Open with Devin

@dario-piotrowicz dario-piotrowicz requested a review from a team as a code owner February 3, 2026 10:48
@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: 1e12592

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

@claude
Copy link
Contributor

claude bot commented Feb 3, 2026

Claude finished @dario-piotrowicz's task —— View job


Changeset Review

  • Read changeset guidelines
  • Review changeset file
  • Check for cute animals
  • Provide feedback

All changesets look good

The changeset in .changeset/smart-adults-run.md is well-formatted and appropriate:

  • Version Type: minor is correct - this adds new detection functionality to autoconfig
  • Changelog Quality: Clear description with specific details about the different behaviors for different commands
  • Markdown Headers: No problematic headers used
  • Format: Follows the title + body format with good explanation

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 4 additional flags.

Open in Devin Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 3, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: 1e12592

@dario-piotrowicz dario-piotrowicz force-pushed the dario/DEVX-2439/autoconfig-pages-detection branch from 837b93d to 9afe921 Compare February 3, 2026 22:12
if (existsSync(functionsPath)) {
const functionsStat = statSync(functionsPath);
if (functionsStat.isDirectory()) {
const pagesConfirmed = await confirm(
Copy link
Contributor

Choose a reason for hiding this comment

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

just to double check, will this auto-accept in CI?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes it will... confirming that the project is a Pages one and then erroring...

I guess we should auto-deny instead... in that case CI would proceed (even though that might also be incorrect)...? 🤔

what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh sorry i got confused 😅

i think the behaviour in CI needs to proceed with a folder called functions to avoid breaking anyone. sorry i know its a bit of an edgecase!

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 5 additional findings.

Open in Devin Review

@github-project-automation github-project-automation bot moved this from Untriaged to In Review in workers-sdk Feb 6, 2026
@dario-piotrowicz dario-piotrowicz force-pushed the dario/DEVX-2439/autoconfig-pages-detection branch from 47e64aa to 7b951c2 Compare February 6, 2026 16:13
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 2 new potential issues.

View 6 additional findings in Devin Review.

Open in Devin Review

@dario-piotrowicz dario-piotrowicz force-pushed the dario/DEVX-2439/autoconfig-pages-detection branch from 7b951c2 to 6fc4329 Compare February 6, 2026 16:17
@dario-piotrowicz dario-piotrowicz force-pushed the dario/DEVX-2439/autoconfig-pages-detection branch from f316834 to 7f905bf Compare February 9, 2026 09:24
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 11 additional findings in Devin Review.

Open in Devin Review

@dario-piotrowicz dario-piotrowicz force-pushed the dario/DEVX-2439/autoconfig-pages-detection branch from bdc09c3 to 008187d Compare February 10, 2026 11:59
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 17 additional findings in Devin Review.

Open in Devin Review

@github-project-automation github-project-automation bot moved this from In Review to Approved in workers-sdk Feb 10, 2026
@dario-piotrowicz dario-piotrowicz merged commit d7b492c into main Feb 10, 2026
41 of 42 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/DEVX-2439/autoconfig-pages-detection branch February 10, 2026 15:09
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Feb 10, 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