Skip to content

Commit aa8770f

Browse files
committed
backport fixes from #8538
1 parent 3934aff commit aa8770f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

packages/miniflare/test/plugins/d1/index.with-wrangler-shim.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { setupTest } from "./test";
22
import type {
33
D1Database,
4+
D1DatabaseSession,
45
D1ExecResult,
56
D1PreparedStatement,
67
D1Result,
8+
D1SessionBookmark,
9+
D1SessionConstraint,
710
} from "@cloudflare/workers-types/experimental";
811
import type { Miniflare } from "miniflare";
912

@@ -42,6 +45,13 @@ export class TestD1Database implements D1Database {
4245
async exec(query: string): Promise<D1ExecResult> {
4346
return this[kSend]("/exec", query);
4447
}
48+
49+
withSession(
50+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
51+
constraintOrBookmark?: D1SessionBookmark | D1SessionConstraint
52+
): D1DatabaseSession {
53+
throw new Error("Method not implemented for D1 Wrangler shim.");
54+
}
4555
}
4656

4757
class TestD1PreparedStatement implements D1PreparedStatement {

packages/workflows-shared/src/binding.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ export class WorkflowBinding extends WorkerEntrypoint<Env> implements Workflow {
6565
status: handle.status.bind(handle),
6666
};
6767
}
68+
public async createBatch(
69+
_batch: WorkflowInstanceCreateOptions<unknown>[]
70+
): Promise<WorkflowInstance[]> {
71+
throw new Error("createBatch is not yet implemented in local development.");
72+
}
6873
}
6974

7075
export class WorkflowHandle extends RpcTarget implements WorkflowInstance {

0 commit comments

Comments
 (0)