Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit cf080a8

Browse files
authored
Merge pull request #648 from cloudflare/jspspike/workerd-version
Bump versions to `3.20230807.0`
2 parents 4f7c955 + 5aad29b commit cf080a8

File tree

4 files changed

+68
-69
lines changed

4 files changed

+68
-69
lines changed

package-lock.json

Lines changed: 52 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@miniflare/root",
3-
"version": "3.20230801.1",
3+
"version": "3.20230807.0",
44
"private": true,
55
"description": "Fun, full-featured, fully-local simulator for Cloudflare Workers",
66
"keywords": [

packages/miniflare/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "miniflare",
3-
"version": "3.20230801.1",
3+
"version": "3.20230807.0",
44
"description": "Fun, full-featured, fully-local simulator for Cloudflare Workers",
55
"keywords": [
66
"cloudflare",
@@ -39,7 +39,7 @@
3939
"source-map-support": "0.5.21",
4040
"stoppable": "^1.1.0",
4141
"undici": "^5.13.0",
42-
"workerd": "1.20230801.0",
42+
"workerd": "1.20230807.0",
4343
"ws": "^8.11.0",
4444
"youch": "^3.2.2",
4545
"zod": "^3.20.6"

packages/miniflare/src/plugins/queues/gateway.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@ const DEFAULT_BATCH_TIMEOUT = 1; // second
1414
const DEFAULT_RETRIES = 2;
1515

1616
// https://github.com/cloudflare/workerd/blob/01b87642f4eac932aa9074d7e5eec4fd3c90968a/src/workerd/io/outcome.capnp
17-
const Outcome = {
18-
UNKNOWN: 0,
19-
OK: 1,
20-
EXCEPTION: 2,
21-
EXCEEDED_CPU: 3,
22-
KILL_SWITCH: 4,
23-
DAEMON_DOWN: 5,
24-
SCRIPT_NOT_FOUND: 6,
25-
CANCELED: 7,
26-
EXCEEDED_MEMORY: 8,
27-
} as const;
28-
const OutcomeSchema = z.nativeEnum(Outcome);
17+
const OutcomeSchema = z.enum([
18+
"unknown",
19+
"ok",
20+
"exception",
21+
"exceededCpu",
22+
"killSwitch",
23+
"daemonDown",
24+
"scriptNotFound",
25+
"cancelled",
26+
"exceededMemory",
27+
]);
2928

3029
const QueueResponseSchema = z.object({
3130
outcome: OutcomeSchema,
@@ -37,7 +36,7 @@ const QueueResponseSchema = z.object({
3736
});
3837
type QueueResponse = z.infer<typeof QueueResponseSchema>;
3938
const exceptionQueueResponse: QueueResponse = {
40-
outcome: Outcome.EXCEPTION,
39+
outcome: "exception",
4140
retryAll: false,
4241
ackAll: false,
4342
explicitRetries: [],
@@ -153,7 +152,7 @@ export class QueuesGateway {
153152

154153
// Get messages to retry. If dispatching the batch failed for any reason,
155154
// retry all messages.
156-
const retryAll = response.retryAll || response.outcome !== Outcome.OK;
155+
const retryAll = response.retryAll || response.outcome !== "ok";
157156
const explicitRetries = new Set(response.explicitRetries);
158157

159158
let failedMessages = 0;

0 commit comments

Comments
 (0)