Fix serialization of functions from import_js_module#6632
Conversation
This change was originally part of #6173 but it got reverted. This caused cloudflare/workers-sdk#12961
|
UnknownError: ProviderInitError |
|
@hoodmane Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
|
The change is a one-line fix. The old code at line 70 was: if (!mod || typeof mod !== 'object') {The new code is: if (!mod || !['object', 'function'].includes(typeof mod)) {This allows The logic is correct: The fix is minimal, targeted, and consistent with the existing pattern on line 96. No backward compatibility concerns since this only affects the LGTM |
Merging this PR will improve performance by 38.42%
Performance Changes
Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6632 +/- ##
==========================================
- Coverage 70.68% 66.56% -4.12%
==========================================
Files 420 405 -15
Lines 113010 117533 +4523
Branches 18531 19382 +851
==========================================
- Hits 79881 78240 -1641
- Misses 22086 27721 +5635
- Partials 11043 11572 +529 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Ahh, thanks. This was part of my reverted PR (#6173), but I forgot to reland before changing workers-py... Thakns a lot |
This change was originally part of #6173 but it got reverted. This caused cloudflare/workers-sdk#12961