Skip to content

Improve the autoconfig frameworks detection logic#13113

Merged
dario-piotrowicz merged 2 commits intomainfrom
dario/better-autoconfig-frameworks-detection
Mar 30, 2026
Merged

Improve the autoconfig frameworks detection logic#13113
dario-piotrowicz merged 2 commits intomainfrom
dario/better-autoconfig-frameworks-detection

Conversation

@dario-piotrowicz
Copy link
Copy Markdown
Member

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

This PR does two things (as you can see from its 2 commits):

Extracts autoconfig details framework-detection logic in its own file and adds comprehensive unit tests for it

Simply splits code in autoconfig/details.ts to index.ts and framework-detection.ts:
Screenshot of new files structure

This adds a clear separation between different autoconfig detection logic units and also has the effect of making the framework-detection code easily unit-testable. As part of this change then comprehensive unit tests for the latter have been added:
Screenshot of new unit test files

Skip lock file warning for static projects during autoconfig

Currently if users run autoconfig on a fully static project that does not a package manager, they get the following warning:

No lock file has been detected in the current working directory. This might indicate that the project is part of a workspace. Auto-configuration of projects inside workspaces is limited.

See:
Screenshot of example run

The warning is valid for non-static projects, however for static projects it might be unnecessary/unhelpful/confusing, so in order to avoid potential user confusion this PR updates autoconfig not to show this warning for static projects.


  • 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: self-documenting improvement

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 March 29, 2026 15:52
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 29, 2026

🦋 Changeset detected

Latest commit: 47c716a

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

@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 29, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 29, 2026

✅ All changesets look good

@ask-bonk

This comment was marked as outdated.

@dario-piotrowicz dario-piotrowicz changed the base branch from main to dario/autoconfig-waku-hono March 29, 2026 15:55
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 29, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 47c716a

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

Open in Devin Review

@dario-piotrowicz dario-piotrowicz force-pushed the dario/better-autoconfig-frameworks-detection branch from 47dd651 to fd63c89 Compare March 29, 2026 15:59
Base automatically changed from dario/autoconfig-waku-hono to main March 29, 2026 20:53
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 30, 2026
@petebacondarwin
Copy link
Copy Markdown
Contributor

Ugh. This needs a rebase. But I have approved as it stands.

@dario-piotrowicz
Copy link
Copy Markdown
Member Author

Ugh. This needs a rebase. But I have approved as it stands.

oof... sorry I didn't notice! 😓

I'm on it! thanks for the approval! 🫶

@dario-piotrowicz dario-piotrowicz force-pushed the dario/better-autoconfig-frameworks-detection branch from fd63c89 to 47c716a Compare March 30, 2026 08:59
@dario-piotrowicz dario-piotrowicz merged commit 1fc5518 into main Mar 30, 2026
48 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/better-autoconfig-frameworks-detection branch March 30, 2026 09:35
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 30, 2026
This was referenced Mar 30, 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