github cloudflare/workers-sdk miniflare@3.20240129.1

latest releases: @cloudflare/quick-edit@0.2.3, @cloudflare/vitest-pool-workers@0.5.12, wrangler@3.78.12...
7 months ago

Minor Changes

  • #4905 148feff6 Thanks @dario-piotrowicz! - feature: add a getCf method to Miniflare instances

    add a new getCf method attached to instances of Miniflare, this getCf returns
    the cf object that the Miniflare instance provides to the actual workers and it
    depends of the core option of the same name

    Example:

    import { Miniflare } from "miniflare";
    
    const mf = new Miniflare({ ... });
    
    const cf = await mf.getCf();
    
    console.log(`country = ${cf.country} ; colo = ${cf.colo}`); // logs 'country = GB ; colo = LHR'

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.