Codex
Explore posts from serversSCSWC Community
•Created by Codex on 4/22/2025 in #questions
Use `swc_ecma_compat_es2017::async_to_generator` for conditional async transformations
Hey team, I've been working on a plugin that takes
async
functions and transforms them to generators for usage with mobx flows. I've gotten reasonably far but came across: https://docs.rs/swc_ecma_compat_es2017/latest/src/swc_ecma_compat_es2017/async_to_generator.rs.html#39-46
This transformation is exactly what i've been aiming for and would make for a far more robust solution, as what i've written so far handles the conditional cases as I expect.
The issue i'm running into is that I'd like to instantiate the AsyncToGenerator
visitor to visit_children_with
it when the conditions are met to perform this transformation, but async_to_generator
returns Pass
which does not satisfy VisitMut
Would it be reasonable to export a function that does work this way from swc_ecma_compat_es2017
? Or am I down the wrong path here?4 replies
CDCloudflare Developers
•Created by Codex on 6/20/2024 in #workers-help
K6 load testing and 429s
Hey team
Currently been working on load testing a simple worker (just a JS 10 liner kind of deal) we have (non-free/ent tier) and have found that when trying to perform load testing using K6 we begin to see a flood of 429's
I did find this post: https://community.cloudflare.com/t/can-requests-to-workers-get-rate-limited/435598/2
Which suggests i'm encountering
on paid it defends against a small amount of IPs sending too many requests
But I cannot seem to find a ways to configure either whitelisting the IP's i'm using or to temporarily disable this throttling feature.
Where can I find more information about this? Is there configuration I can see either on the worker level or in the portal around this?13 replies
SCSWC Community
•Created by Codex on 12/11/2023 in #questions
Folder import resulting in undefined
Having a tonne of trouble with trying to get swc working with jest as doing a folder import results in an empty object:
->
swcrc:
tsconfig:
What am I doing wrong 🤔
1 replies
SCSWC Community
•Created by Codex on 7/6/2023 in #questions
Transforming `import.meta` with jest and swc
I've spent a few hours trying to find how this is meant to work with jest and swc.
config:
Jest:
But no matter what I try, I still hit:
SyntaxError: Cannot use 'import.meta' outside a module
What am I doing wrong here?4 replies
SCSWC Community
•Created by Codex on 4/10/2023 in #questions
OOM with emotion plugin?
I was looking at adopting swc with the emotion plugin in one of our repositories when I hit this:
35 replies