@cloudflare/vitest-pool-workers 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/vitest-pool-workers",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Workers Vitest integration for writing Vitest unit and integration tests that run inside the Workers runtime",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -61,8 +61,8 @@
61
61
  "esbuild": "0.17.19",
62
62
  "semver": "^7.5.1",
63
63
  "zod": "^3.20.6",
64
- "miniflare": "3.20240605.0",
65
- "wrangler": "3.60.1"
64
+ "miniflare": "3.20240610.0",
65
+ "wrangler": "3.60.3"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "@vitest/runner": "1.3.x - 1.5.x",
@@ -44,7 +44,11 @@ declare module "cloudflare:test" {
44
44
  * persisted data. Note this can only be used with `stub`s pointing to Durable
45
45
  * Objects defined in the `main` worker.
46
46
  */
47
- export function runInDurableObject<O extends DurableObject, R>(
47
+ import type * as Rpc from "cloudflare:workers";
48
+ export function runInDurableObject<
49
+ O extends DurableObject | Rpc.DurableObject,
50
+ R,
51
+ >(
48
52
  stub: DurableObjectStub<O>,
49
53
  callback: (instance: O, state: DurableObjectState) => R | Promise<R>
50
54
  ): Promise<R>;