Skip to content

Commit a874299

Browse files
committed
Upgrade @conform/zod to 0.9.2
1 parent 9aa42d5 commit a874299

File tree

11 files changed

+32
-32
lines changed

11 files changed

+32
-32
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new/route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
186186
const project = await findProjectBySlug(organizationSlug, projectParam, userId);
187187

188188
if (!project) {
189-
submission.error.key = "Project not found";
189+
submission.error.key = ["Project not found"];
190190
return json(submission);
191191
}
192192

@@ -198,7 +198,7 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
198198
);
199199

200200
if (!alertChannel) {
201-
submission.error.key = "Failed to create alert channel";
201+
submission.error.key = ["Failed to create alert channel"];
202202
return json(submission);
203203
}
204204

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
122122
const project = await findProjectBySlug(organizationSlug, projectParam, userId);
123123

124124
if (!project) {
125-
submission.error.key = "Project not found";
125+
submission.error.key = ["Project not found"];
126126
return json(submission);
127127
}
128128

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables.new/route.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
145145
},
146146
});
147147
if (!project) {
148-
submission.error.key = "Project not found";
148+
submission.error.key = ["Project not found"];
149149
return json(submission);
150150
}
151151

@@ -158,11 +158,11 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
158158
const index = submission.value.variables.findIndex((v) => v.key === key);
159159

160160
if (index !== -1) {
161-
submission.error[`variables[${index}].key`] = error;
161+
submission.error[`variables[${index}].key`] = [error];
162162
}
163163
}
164164
} else {
165-
submission.error.variables = result.error;
165+
submission.error.variables = [result.error];
166166
}
167167

168168
return json(submission);

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables/route.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
142142
},
143143
});
144144
if (!project) {
145-
submission.error.key = "Project not found";
145+
submission.error.key = ["Project not found"];
146146
return json(submission);
147147
}
148148

@@ -152,7 +152,7 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
152152
const result = await repository.editValue(project.id, submission.value);
153153

154154
if (!result.success) {
155-
submission.error.key = result.error;
155+
submission.error.key = [result.error];
156156
return json(submission);
157157
}
158158

@@ -175,7 +175,7 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
175175
const result = await repository.deleteValue(project.id, submission.value);
176176

177177
if (!result.success) {
178-
submission.error.key = result.error;
178+
submission.error.key = [result.error];
179179
return json(submission);
180180
}
181181

apps/webapp/app/routes/resources.$projectId.deployments.$deploymentShortCode.promote.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ export const action: ActionFunction = async ({ request, params }) => {
7979
stack: error.stack,
8080
},
8181
});
82-
submission.error = { runParam: error.message };
82+
submission.error = { runParam: [error.message] };
8383
return json(submission);
8484
} else {
8585
logger.error("Failed to promote deployment", { error });
86-
submission.error = { runParam: JSON.stringify(error) };
86+
submission.error = { runParam: [JSON.stringify(error)] };
8787
return json(submission);
8888
}
8989
}

apps/webapp/app/routes/resources.$projectId.deployments.$deploymentShortCode.retry-indexing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ export const action: ActionFunction = async ({ request, params }) => {
9393
projectId,
9494
deploymentShortCode,
9595
});
96-
submission.error = { runParam: error.message };
96+
submission.error = { runParam: [error.message] };
9797
return json(submission);
9898
} else {
9999
logger.error("Failed to retry deployment indexing", {
100100
error,
101101
projectId,
102102
deploymentShortCode,
103103
});
104-
submission.error = { runParam: JSON.stringify(error) };
104+
submission.error = { runParam: [JSON.stringify(error)] };
105105
return json(submission);
106106
}
107107
}

apps/webapp/app/routes/resources.$projectId.deployments.$deploymentShortCode.rollback.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ export const action: ActionFunction = async ({ request, params }) => {
8282
stack: error.stack,
8383
},
8484
});
85-
submission.error = { runParam: error.message };
85+
submission.error = { runParam: [error.message] };
8686
return json(submission);
8787
} else {
8888
logger.error("Failed to roll back deployment", { error });
89-
submission.error = { runParam: JSON.stringify(error) };
89+
submission.error = { runParam: [JSON.stringify(error)] };
9090
return json(submission);
9191
}
9292
}

apps/webapp/app/routes/resources.feedback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export async function action({ request }: ActionFunctionArgs) {
8383
"Thanks for your feedback! We'll get back to you soon."
8484
);
8585
} catch (e) {
86-
submission.error.message = e instanceof Error ? e.message : "Unknown error";
86+
submission.error.message = [e instanceof Error ? e.message : "Unknown error"];
8787
return json(submission);
8888
}
8989
}

apps/webapp/app/routes/resources.taskruns.$runParam.cancel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const action: ActionFunction = async ({ request, params }) => {
3232
});
3333

3434
if (!taskRun) {
35-
submission.error = { runParam: "Run not found" };
35+
submission.error = { runParam: ["Run not found"] };
3636
return json(submission);
3737
}
3838

apps/webapp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
"@codemirror/search": "^6.2.3",
4444
"@codemirror/state": "^6.1.3",
4545
"@codemirror/view": "^6.5.0",
46-
"@conform-to/react": "^0.6.1",
47-
"@conform-to/zod": "^0.6.1",
46+
"@conform-to/react": "0.9.2",
47+
"@conform-to/zod": "0.9.2",
4848
"@depot/sdk-node": "^1.0.0",
4949
"@depot/cli": "0.0.1-cli.2.80.0",
5050
"@electric-sql/react": "^0.3.5",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)