Skip to content

Commit cd1183b

Browse files
authored
Merge pull request #8 from netlify/next-upgrade
chore: upgrade Next.js and Netlify runtime dependencies
2 parents ee8c2ca + e2ed79c commit cd1183b

File tree

9 files changed

+2445
-1007
lines changed

9 files changed

+2445
-1007
lines changed

netlify/edge-functions/get-geo.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export default async (request: Request, context: Context) => {
2020
// }
2121
// }
2222

23-
// @ts-expect-error use `Response.json()` to set content-type as application/json
2423
return Response.json({
2524
geo: context.geo,
2625
});

netlify/functions/blob.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export default async (req: Request) => {
55

66
if (req.method === "GET") {
77
const todos = await store.get("todos", { type: "json" });
8-
// @ts-expect-error `new` operator not needed for Response.json()
98
return Response.json(todos || [], { status: 200 });
109
}
1110

netlify/functions/dad-joke.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default async function joke() {
1414
}
1515
const json = await response.json();
1616
console.log(json);
17-
// @ts-expect-error this syntax is allowed
1817
return Response.json(json);
1918
} catch (error) {
2019
console.error("Failed to fetch a dad joke:", error);

netlify/functions/platform-specific.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@ export default async (req: Request, context: Context) => {
2828
const allProducts = nintendo.products.concat(sony.products);
2929

3030
if (!platform) {
31-
// @ts-expect-error Response.json() does not require `new` operator
3231
return Response.json(allProducts);
3332
}
3433

3534
// ... and/or filter as needed
3635
const filteredProducts = allProducts.filter(
3736
(product) => product.promo === platform,
3837
);
39-
// @ts-expect-error Response.json() does not require `new` operator
4038
return Response.json(filteredProducts);
4139
};
4240

netlify/functions/stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { stream } from "@netlify/functions";
22

3-
// @ts-expect-error async streams are allowed
3+
// @ts-expect-error Type mismatch between Web Streams API and Node.js streams
44
export const handler = stream(async () => {
55
const encoder = new TextEncoder();
66
const formatter = new Intl.DateTimeFormat("en", { timeStyle: "medium" });

0 commit comments

Comments
 (0)