Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow referencing empty-object exports as entrypoints. #1963

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

kentonv
Copy link
Member

@kentonv kentonv commented Apr 4, 2024

This fixes a regression in miniflare around named entrypoints: If a script had a top-level export that was an object with no instance properties, miniflare would treat it as a named entrypoint (configuring a socket for it), but workerd would consider this config invalid because the export didn't appear to actually be able to handle events.

It would be hard to make miniflare be able to detect the types of exports, so instead we make workerd more lenient.

This fixes a regression in miniflare around named entrypoints: If a script had a top-level export that was an object with no instance properties, miniflare would treat it as a named entrypoint (configuring a socket for it), but workerd would consider this config invalid because the export didn't appear to actually be able to handle events.

It would be hard to make miniflare be able to detect the types of exports, so instead we make workerd more lenient.
@kentonv kentonv requested review from a team as code owners April 4, 2024 17:09
@kentonv kentonv requested review from mikea and Warfields April 4, 2024 17:09
@kentonv kentonv merged commit 4037068 into main Apr 4, 2024
10 checks passed
@kentonv kentonv deleted the kenton/empty-handlers branch April 4, 2024 18:11
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.

None yet

2 participants