https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • k

    kian

    03/06/2023, 2:06 PM
  • k

    kian

    03/06/2023, 2:06 PM
  • k

    kian

    03/06/2023, 2:06 PM
    Lovely
  • c

    Crazy Rabbit

    03/06/2023, 2:10 PM
    This is kinda cool, so if you keep old compatibility date then new updates technically can't break your worker.
  • p

    Plotzes

    03/06/2023, 2:12 PM
    yeah, that's why they exist!
  • p

    Plotzes

    03/06/2023, 2:13 PM
    it's such a simple yet elegant solution
  • p

    Plotzes

    03/06/2023, 2:13 PM
    you're basically just saying: "it worked during this date"
  • e

    Erisa | Support Engineer

    03/06/2023, 2:13 PM
    Yeah thats what theyre for very awesome feature
  • c

    Crazy Rabbit

    03/06/2023, 2:24 PM
    But can performance also improve if you use the newer compatibility date?
  • s

    Skye

    03/06/2023, 2:32 PM
    Compatibility dates are only for breaking changes
  • s

    Skye

    03/06/2023, 2:32 PM
    All other changes are applied regardless of your compat date
  • c

    Crazy Rabbit

    03/06/2023, 2:33 PM
    Thanks
  • a

    Advany

    03/06/2023, 3:13 PM
    If I call a other worker from the middleware of pages using service bindings, thats counted as two worker invocations right (when using bundled mode)?
  • k

    kian

    03/06/2023, 3:14 PM
    Yep
  • a

    Advany

    03/06/2023, 3:15 PM
    ok thanks! Ill then just directly go to the worker 🙂
  • k

    kian

    03/06/2023, 3:18 PM
    It’d be two invocations either way if you mean that you’ll just use normal fetch
  • l

    lattenb

    03/06/2023, 4:17 PM
    hey all - trying to integrate a node/wasm package but getting "Dynamic require of ... is not supported"
  • l

    lattenb

    03/06/2023, 4:17 PM
    any idea how to work around?
  • k

    kian

    03/06/2023, 4:21 PM
    Sounds like /
  • a

    Advany

    03/06/2023, 5:14 PM
    @kian I meant that I could also call the worker directly from the page instead of going thru the middleware. Would same me a request that way 🙂
  • l

    lattenb

    03/06/2023, 7:12 PM
    @kian appreciate the pointer - CJS plugin converted problem from require to top-level await ?
  • l

    lattenb

    03/06/2023, 7:28 PM
    (am already using ESM as an output format)
  • b

    BUTTΞRKΞKS1000

    03/06/2023, 7:51 PM
    Im not sure if i should use custom domains or routes what if i want my worker to return something to this url: api.mydomain.xyz/uptime
  • c

    Chaika

    03/06/2023, 7:52 PM
    Custom Domains are recommended if the worker will be the only thing on that subdomain, i.e api.mydomain.xyz is just to the worker. If you have an existing origin on api.mydomain.xyz, you have to use routes, and you could create a route just for that path to that worker.
  • c

    Chaika

    03/06/2023, 7:57 PM
    * It's slightly more complex then that, you could use a route to cover everything on a hostname and then manually create a dns record for it (using 100:: for originless setups), but Custom Domains make it easier and take care of the DNS side for you, and provision you an adv. cert (which you can delete if you want)
  • c

    captain

    03/06/2023, 8:00 PM
    i am using the cloudflare stripe library
  • c

    captain

    03/06/2023, 8:03 PM
    and today i am noticing something scary, trying to list out the payment methods but getting the following error: stripe.setMaxNetworkRetries is not a function
    Copy code
    const stripe = Stripe(env.live_stripeKey, { 
                httpClient: Stripe.createFetchHttpClient()
     });
     stripe.setMaxNetworkRetries(2);
    Maybe I had not been paying attention, but is that a new issue?
  • k

    kian

    03/06/2023, 8:06 PM
    Random guess, not looked at the library - shouldn’t it be Stripe with a capital S?
  • c

    captain

    03/06/2023, 8:07 PM
    i'm setting the const to lowercase stripe
  • c

    captain

    03/06/2023, 8:07 PM
    it used to work
1...232323242325...2509Latest