Skip to content

[wrangler] fix: resolve named service entrypoints for env-scoped workers#13313

Closed
swalker326 wants to merge 1 commit intocloudflare:mainfrom
swalker326:fix/wrangler-types-named-entrypoint-env-alias
Closed

[wrangler] fix: resolve named service entrypoints for env-scoped workers#13313
swalker326 wants to merge 1 commit intocloudflare:mainfrom
swalker326:fix/wrangler-types-named-entrypoint-env-alias

Conversation

@swalker326
Copy link
Copy Markdown

@swalker326 swalker326 commented Apr 6, 2026

This follows up the env-qualified secondary worker resolution fix from #13061 for the named services[].entrypoint case.

When wrangler types runs across multiple -c configs, a secondary worker can expose environment-specific names like secondary-worker-staging. Bindings targeting those env-qualified names were already resolvable for the default worker entrypoint, but named WorkerEntrypoint bindings could still fall back to an unresolved type comment instead of emitting Service<typeof import(...).SomeEntrypoint>.

This change registers each secondary worker's env-qualified name against that env's resolved Entry metadata, so named service entrypoints keep the correct source module and export information during type generation.


  • 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: this is a bug fix for generated typings with no public docs changes

39D7B59B-BFB0-4C29-BBF5-DBF24CC8472E_1_105_c


Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 6, 2026

🦋 Changeset detected

Latest commit: 8951cb8

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 workers-devprod requested review from a team and ascorbic and removed request for a team April 6, 2026 16:24
@workers-devprod
Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • packages/wrangler/src/tests/type-generation.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/type-generation/index.ts: [@cloudflare/wrangler]

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

Open in Devin Review

@swalker326
Copy link
Copy Markdown
Author

seems to have been fixed with v 4.80.0

@swalker326 swalker326 closed this Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants