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

    Skye

    02/28/2023, 8:06 PM
    I don't believe there's anyone who's received it yet
  • w

    Walshy | Pages

    02/28/2023, 8:08 PM
    Propagation delay is now gone, new Worker updates will be live almost instantly again
  • d

    dave

    02/28/2023, 8:15 PM
    yay! Nice job 🙂
  • d

    dave

    02/28/2023, 8:16 PM
    oooo it looks like I got Hono + zod + zod-to-openapi working
  • a

    Advany

    02/28/2023, 8:16 PM
    Is there a way to get access to the cloudflare rendering api (puppeteer). I would like to switch away from browserless to cloudflare... anyone know how to get access? Already signed up for the waitinglist...
  • d

    dave

    02/28/2023, 8:16 PM
    surprised I haven't seen someone else make an example
  • h

    HardAtWork

    02/28/2023, 8:18 PM
    Just got to wait. AFAIK, it isn't even in private beta yet, so it might be a little while before it happens.
  • a

    Advany

    02/28/2023, 8:19 PM
    Got it! Will use browserless in the mean time in my workers
  • s

    Skye

    02/28/2023, 8:22 PM
    make one!
  • d

    dave

    02/28/2023, 8:25 PM
    what's the feature list supposed to be? I have something similar to this on my TODO list I think
  • h

    HardAtWork

    02/28/2023, 8:26 PM
    https://blog.cloudflare.com/introducing-workers-browser-rendering-api/
  • m

    m0c

    02/28/2023, 9:31 PM
    what is the currently recommended approach for testing? I see 2 different approaches and I am getting confused with multiple ways to simulate environments. I see miniflare with e.g. the
    vitest-miniflare-environment
    as well as the
    unstable_dev
    from wrangler? When should I use which approach? (I am trying to write an e2e test, that kinda touches DOs and D1)
  • m

    m0c

    02/28/2023, 9:31 PM
    And bonus points if I can mock outgoing http requests
  • h

    HardAtWork

    02/28/2023, 9:52 PM
    Vitest would probably be best, as it supports hooking into the Vitest family of testing utilities, while
    unstable_dev
    just allows you to run
    wrangler dev
    without the CLI.
  • s

    Skye

    02/28/2023, 10:04 PM
    There are reasonable examples of using unstable_dev within wrangler's own tests - you can do a lot with just something like
    msw
    on npm
  • m

    m0c

    02/28/2023, 10:40 PM
    would both approaches work with D1? I think I played around with the vitest environment, and it complained about D1. Are both approaches under the hood using miniflare and the differences should not be that big, or are they generally different under the hood?
  • s

    Skye

    02/28/2023, 10:48 PM
    unstable dev does support d1, yes
  • s

    Skye

    02/28/2023, 10:48 PM
    and if you specify
    local: true
    in it's options, it will use miniflare
  • s

    Skye

    02/28/2023, 10:49 PM
    (though miniflare's test mocking stuff doesn't work with it yet)
  • m

    m0c

    02/28/2023, 10:53 PM
    so only
    unstable_dev
    in not local mode will properly support d1 at the moment?
  • m

    m0c

    02/28/2023, 10:54 PM
    is the d1 state in that scenario persisted through multiple sessions? or is it "clean" everytime I start it up again?
  • j

    johtso

    02/28/2023, 11:16 PM
    do static "bucket" assets count towards the worker size limits?
  • j

    johtso

    02/28/2023, 11:20 PM
    I'm guessing not..
  • s

    Skye

    02/28/2023, 11:30 PM
    No? D1 will work fine in either
  • s

    Skye

    02/28/2023, 11:31 PM
    For remote mode, it'll persist. For local mode, it'll persist if you tell it to
  • s

    Skye

    02/28/2023, 11:31 PM
    Are you referring to workers sites?
  • j

    johtso

    02/28/2023, 11:32 PM
    yep
  • s

    Skye

    02/28/2023, 11:33 PM
    That stores the assets in KV, so it won't impact the size of your worker beyond the small amount of code to actually provide the interface for interacting with your namespace
  • d

    dave

    02/28/2023, 11:51 PM
    How do I avoid this issue?
    Copy code
    [NPXI] @miniflare/tre not available locally. Attempting to use npx to install temporarily.
    [NPXI] Installing... (npx --prefer-offline -y -p @miniflare/tre@3.0.0-next.12)
  • s

    Skye

    02/28/2023, 11:52 PM
    If you install it, it won't have to dynamically load it
1...231223132314...2509Latest