Skip to content

build(deps-dev): bump jest-environment-miniflare from 2.7.1 to 2.10.0#206

Closed
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/jest-environment-miniflare-2.10.0
Closed

build(deps-dev): bump jest-environment-miniflare from 2.7.1 to 2.10.0#206
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/jest-environment-miniflare-2.10.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Oct 11, 2022

Bumps jest-environment-miniflare from 2.7.1 to 2.10.0.

Release notes

Sourced from jest-environment-miniflare's releases.

v2.10.0

Features

Fixes

v2.9.0

Features

  • 💾 Add support for D1. Closes [issue #277](cloudflare/miniflare#277), thanks @​geelen for the PR. Docs coming soon™... 👀

  • 🚪 Add getMiniflareDurableObjectState() and runWithMiniflareDurableObjectGates() functions to the Jest/Vitest environments. This allows you to construct and call instance methods of Durable Objects directly, without having to fetch through a stub. Closes [issue #157](cloudflare/miniflare#157), thanks @​jorroll.

    // Durable Object class, would probably come from an import
    class Counter {
      constructor(state) {
        this.storage = state.storage;
      }
      async fetch() {
        const count = ((await this.storage.get("count")) ?? 0) + 1;
        void this.storage.put("count", count);
        return new Response(String(count));
      }
    }
    const env = getMiniflareBindings();
    // Use standard Durable Object bindings to generate IDs
    const id = env.COUNTER.newUniqueId();
    // Get DurableObjectState, and seed data
    const state = await getMiniflareDurableObjectState(id);
    await state.storage.put("count", 3);
    // Construct object directly
    const object = new Counter(state, env);
    // Call instance method directly, closing input gate,
    // and waiting for output gate to open
    const res = await runWithMiniflareDurableObjectGates(state, () =>
    object.fetch(new Request("http://localhost/"))
    );
    expect(await res.text()).toBe("4");

  • 🥷 Don't construct corresponding Durable Object instance when calling Miniflare#getDurableObjectStorage(). This allows you to seed data before your Durable Object's constructor is invoked. Closes [issue #300](cloudflare/miniflare#300), thanks @​spigaz.

  • ☑️ Add support for WebSocket#readyState and WebSocket.READY_STATE_{CONNECTING,OPEN,CLOSING,CLOSED} constants. Note these constant names intentionally deviate from the spec to match the Workers runtime.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [jest-environment-miniflare](https://github.com/cloudflare/miniflare/tree/HEAD/packages/jest) from 2.7.1 to 2.10.0.
- [Release notes](https://github.com/cloudflare/miniflare/releases)
- [Commits](https://github.com/cloudflare/miniflare/commits/v2.10.0/packages/jest)

---
updated-dependencies:
- dependency-name: jest-environment-miniflare
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Oct 11, 2022
@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot bot commented on behalf of github Oct 27, 2022

Superseded by #213.

@dependabot dependabot bot closed this Oct 27, 2022
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/jest-environment-miniflare-2.10.0 branch October 27, 2022 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants