Skip to content

Commit bd36d16

Browse files
committed
Release 1.21.0
d42661f7910e12ae0c8b82b88df2c5765fb2bad8
1 parent 1dbe274 commit bd36d16

File tree

57 files changed

+317
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+317
-233
lines changed

args-validation/convex/messages.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export const send = mutation({
1313
},
1414
});
1515

16-
export const list = query(async (ctx) => {
17-
return await ctx.db.query("messages").collect();
16+
export const list = query({
17+
handler: async (ctx) => {
18+
return await ctx.db.query("messages").collect();
19+
},
1820
});

args-validation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "convex dev --until-success"
1010
},
1111
"dependencies": {
12-
"convex": "1.19.5",
12+
"convex": "1.21.0",
1313
"react": "^18.0.0",
1414
"react-dom": "^18.0.0",
1515
"prettier": "3.4.2"

clerk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "convex dev --until-success"
1010
},
1111
"dependencies": {
12-
"convex": "1.19.5",
12+
"convex": "1.21.0",
1313
"react": "^18.0.0",
1414
"react-dom": "^18.0.0",
1515
"@clerk/clerk-react": "^5.20.0",

cron-jobs/convex/messages.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
import { internalMutation, mutation, query } from "./_generated/server";
22

3-
export const list = query(async (ctx) => {
4-
return await ctx.db.query("messages").collect();
3+
export const list = query({
4+
handler: async (ctx) => {
5+
return await ctx.db.query("messages").collect();
6+
},
57
});
68

7-
export const send = mutation(async (ctx, { body, author }) => {
8-
const message = { body, author };
9-
await ctx.db.insert("messages", message);
9+
export const send = mutation({
10+
handler: async (ctx, { body, author }) => {
11+
const message = { body, author };
12+
await ctx.db.insert("messages", message);
13+
},
1014
});
1115

12-
export const clearAll = internalMutation(async (ctx) => {
13-
for (const message of await ctx.db.query("messages").collect()) {
14-
await ctx.db.delete(message._id);
15-
}
16+
export const clearAll = internalMutation({
17+
handler: async (ctx) => {
18+
for (const message of await ctx.db.query("messages").collect()) {
19+
await ctx.db.delete(message._id);
20+
}
21+
},
1622
});

cron-jobs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "convex dev --until-success"
1010
},
1111
"dependencies": {
12-
"convex": "1.19.5",
12+
"convex": "1.21.0",
1313
"react": "^18.0.0",
1414
"react-dom": "^18.0.0",
1515
"prettier": "3.4.2"

custom-errors/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "convex dev --until-success"
1010
},
1111
"dependencies": {
12-
"convex": "1.19.5",
12+
"convex": "1.21.0",
1313
"react": "^18.0.0",
1414
"react-dom": "^18.0.0",
1515
"prettier": "3.4.2"
Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
import { query, internalMutation, mutation } from "./_generated/server";
22

3-
export const list = query(async (ctx) => {
4-
const messages = await ctx.db.query("messages").collect();
5-
for (const message of messages) {
6-
if (message.format === "dall-e") {
7-
message.body = await ctx.storage.getUrl(message.body);
3+
export const list = query({
4+
handler: async (ctx) => {
5+
const messages = await ctx.db.query("messages").collect();
6+
for (const message of messages) {
7+
if (message.format === "dall-e") {
8+
message.body = await ctx.storage.getUrl(message.body);
9+
}
810
}
9-
}
10-
return messages;
11+
return messages;
12+
},
1113
});
1214

13-
export const sendDallEMessage = internalMutation(
14-
async (ctx, { body, author, prompt }) => {
15+
export const sendDallEMessage = internalMutation({
16+
handler: async (ctx, { body, author, prompt }) => {
1517
const message = { body, author, format: "dall-e", prompt };
1618
await ctx.db.insert("messages", message);
1719
},
18-
);
20+
});
1921

20-
export const send = mutation(async (ctx, { body, author }) => {
21-
const message = { body, author, format: "text" };
22-
await ctx.db.insert("messages", message);
22+
export const send = mutation({
23+
handler: async (ctx, { body, author }) => {
24+
const message = { body, author, format: "text" };
25+
await ctx.db.insert("messages", message);
26+
},
2327
});

dall-e-storage-action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "convex dev --until-success"
1010
},
1111
"dependencies": {
12-
"convex": "1.19.5",
12+
"convex": "1.21.0",
1313
"openai": "^4.6.0",
1414
"react": "^18.0.0",
1515
"react-dom": "^18.0.0",
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
import { query, mutation } from "./_generated/server";
22

3-
export const list = query(async (ctx) => {
4-
return await ctx.db.query("messages").collect();
3+
export const list = query({
4+
handler: async (ctx) => {
5+
return await ctx.db.query("messages").collect();
6+
},
57
});
68

7-
export const send = mutation(async (ctx, { body, author }) => {
8-
const message = { body, author };
9-
await ctx.db.insert("messages", message);
9+
export const send = mutation({
10+
handler: async (ctx, { body, author }) => {
11+
const message = { body, author };
12+
await ctx.db.insert("messages", message);
13+
},
1014
});
1115

12-
export const sendImage = mutation(async (ctx, { storageId, author }) => {
13-
const message = { body: storageId, author, format: "image" };
14-
await ctx.db.insert("messages", message);
16+
export const sendImage = mutation({
17+
handler: async (ctx, { storageId, author }) => {
18+
const message = { body: storageId, author, format: "image" };
19+
await ctx.db.insert("messages", message);
20+
},
1521
});

file-storage-with-http/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "convex dev --until-success"
1010
},
1111
"dependencies": {
12-
"convex": "1.19.5",
12+
"convex": "1.21.0",
1313
"react": "^18.0.0",
1414
"react-dom": "^18.0.0",
1515
"prettier": "3.4.2"

file-storage/convex/messages.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ export const list = query({
1919

2020
import { mutation } from "./_generated/server";
2121

22-
export const generateUploadUrl = mutation(async (ctx) => {
23-
return await ctx.storage.generateUploadUrl();
22+
export const generateUploadUrl = mutation({
23+
handler: async (ctx) => {
24+
return await ctx.storage.generateUploadUrl();
25+
},
2426
});
2527

2628
export const sendImage = mutation({

file-storage/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "convex dev --until-success"
1010
},
1111
"dependencies": {
12-
"convex": "1.19.5",
12+
"convex": "1.21.0",
1313
"react": "^18.0.0",
1414
"react-dom": "^18.0.0",
1515
"prettier": "3.4.2"

giphy-action/convex/messages.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ import { query, mutation, action, internalMutation } from "./_generated/server";
22
import { internal } from "./_generated/api";
33
import { v } from "convex/values";
44

5-
export const list = query(async (ctx) => {
6-
return await ctx.db.query("messages").collect();
5+
export const list = query({
6+
handler: async (ctx) => {
7+
return await ctx.db.query("messages").collect();
8+
},
79
});
810

9-
export const send = mutation(async (ctx, { body, author }) => {
10-
const message = { body, author, format: "text" };
11-
await ctx.db.insert("messages", message);
11+
export const send = mutation({
12+
handler: async (ctx, { body, author }) => {
13+
const message = { body, author, format: "text" };
14+
await ctx.db.insert("messages", message);
15+
},
1216
});
1317

1418
function giphyUrl(queryString: string) {
@@ -40,9 +44,9 @@ export const sendGif = action({
4044
},
4145
});
4246

43-
export const sendGifMessage = internalMutation(
44-
async (ctx, { body, author }) => {
47+
export const sendGifMessage = internalMutation({
48+
handler: async (ctx, { body, author }) => {
4549
const message = { body, author, format: "giphy" };
4650
await ctx.db.insert("messages", message);
4751
},
48-
);
52+
});

giphy-action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "convex dev --until-success"
1010
},
1111
"dependencies": {
12-
"convex": "1.19.5",
12+
"convex": "1.21.0",
1313
"react": "^18.0.0",
1414
"react-dom": "^18.0.0",
1515
"prettier": "3.4.2"

html/convex/messages.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { v } from "convex/values";
22
import { query, mutation } from "./_generated/server";
33

4-
export const list = query(async (ctx) => {
5-
return await ctx.db.query("messages").collect();
4+
export const list = query({
5+
handler: async (ctx) => {
6+
return await ctx.db.query("messages").collect();
7+
},
68
});
79

810
export const send = mutation({

html/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"build": "echo build steps are for squares"
77
},
88
"devDependencies": {
9-
"convex": "1.19.5",
9+
"convex": "1.21.0",
1010
"typescript": "~5.0.3"
1111
},
1212
"dependencies": {

http/convex/messages.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ export const postMessage = httpAction(async (ctx, request) => {
1414
});
1515
});
1616

17-
export const list = query(async (ctx) => {
18-
return await ctx.db.query("messages").collect();
17+
export const list = query({
18+
handler: async (ctx) => {
19+
return await ctx.db.query("messages").collect();
20+
},
1921
});
2022

21-
export const send = mutation(async (ctx, { body, author }) => {
22-
const message = { body, author };
23-
await ctx.db.insert("messages", message);
23+
export const send = mutation({
24+
handler: async (ctx, { body, author }) => {
25+
const message = { body, author };
26+
await ctx.db.insert("messages", message);
27+
},
2428
});
2529

2630
const queryByAuthor = async (ctx: ActionCtx, authorNumber: string) => {

http/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "convex dev --until-success"
1010
},
1111
"dependencies": {
12-
"convex": "1.19.5",
12+
"convex": "1.21.0",
1313
"react": "^18.0.0",
1414
"react-dom": "^18.0.0",
1515
"prettier": "3.4.2"

nextjs-app-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"react": "^18.0.0",
1616
"react-dom": "^18.0.0",
1717
"next": "14.2.21",
18-
"convex": "1.19.5",
18+
"convex": "1.21.0",
1919
"prettier": "3.4.2"
2020
},
2121
"devDependencies": {

nextjs-pages-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"next": "14.2.21",
1616
"react": "^18.0.0",
1717
"react-dom": "^18.0.0",
18-
"convex": "1.19.5",
18+
"convex": "1.21.0",
1919
"@auth0/auth0-react": "2.2.4",
2020
"prettier": "3.4.2"
2121
},

node/convex/messages.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import { mutation } from "./_generated/server";
22
import { query } from "./_generated/server";
33
import { Doc } from "./_generated/dataModel";
44

5-
export const list = query(async (ctx): Promise<Doc<"messages">[]> => {
6-
return await ctx.db.query("messages").collect();
5+
export const list = query({
6+
handler: async (ctx): Promise<Doc<"messages">[]> => {
7+
return await ctx.db.query("messages").collect();
8+
},
79
});
810

911
export const send = mutation(

node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build": "tsc"
88
},
99
"dependencies": {
10-
"convex": "1.19.5",
10+
"convex": "1.21.0",
1111
"dotenv": "^16.4.7",
1212
"ws": "8.18.0",
1313
"tsx": "~4.19.2"

pagination/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"predev": "convex dev --until-success"
1010
},
1111
"dependencies": {
12-
"convex": "1.19.5",
12+
"convex": "1.21.0",
1313
"react": "^18.0.0",
1414
"react-dom": "^18.0.0",
1515
"prettier": "3.4.2"
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { query } from "./_generated/server";
22

3-
export default query(async (ctx) => {
4-
return await ctx.db.query("messages").collect();
3+
export default query({
4+
handler: async (ctx) => {
5+
return await ctx.db.query("messages").collect();
6+
},
57
});

0 commit comments

Comments
 (0)