Skip to content

Commit

Permalink
update next.js to 13.1.7-canary.25 (#3895)
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra authored Feb 22, 2023
1 parent 8c993e5 commit 0241014
Show file tree
Hide file tree
Showing 10 changed files with 134 additions and 162 deletions.
2 changes: 1 addition & 1 deletion crates/next-core/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@vercel/turbopack-runtime": "latest",
"anser": "^2.1.1",
"css.escape": "^1.5.1",
"next": "13.1.7-canary.12",
"next": "13.1.7-canary.25",
"platform": "1.3.6",
"react-dom": "^18.2.0",
"react": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions crates/next-core/js/src/entry/server-edge-api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import { parse, ParsedUrlQuery } from "querystring";
import type { Params } from "next/dist/shared/lib/router/utils/route-matcher";
import { FetchEventResult } from "next/dist/server/web/types";
import { getClonableBody } from "next/dist/server/body-streams";
import { getCloneableBody } from "next/dist/server/body-streams";

startHandler(async ({ request, response, query, params, path }) => {
await runEdgeFunction({
Expand Down Expand Up @@ -97,7 +97,7 @@ async function runEdgeFunction({
name: path,
...(params && { params: params }),
},
body: getClonableBody(req.body),
body: getCloneableBody(req.body),
},
useCache: false,
onWarning,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type React from "react";
import Test from "../test";

export default function Page(): React.ReactElement {
return (
<div>
<Test />
</div>
);
}

export async function generateMetadata({ params }) {
return {
title: `Page(${params.slug})`,
openGraph: {
images: new URL("../triangle-black.png", import.meta.url).pathname,
},
};
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
import type React from "react";
import Test from "./test";
import { redirect } from "next/navigation";

export default function Page(): React.ReactElement {
return (
<div>
<Test />
</div>
);
}

export async function generateMetadata({ params }) {
return {
title: "Page",
openGraph: {
images: new URL("./triangle-black.png", import.meta.url).pathname,
},
};
export default function Page() {
redirect("/slug_name");
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function Test(): React.ReactElement | null {
useEffect(() => {
import("@turbo/pack-test-harness").then(() => {
it("should have the correct title set", () => {
expect(document.title).toBe("Page - RootLayout");
expect(document.title).toBe("Page(slug_name) - RootLayout");
let iconMeta = document.querySelector("link[rel=icon]");
expect(iconMeta).toHaveProperty("href");
expect(iconMeta.href).toMatch(/\/_next\/static\/assets/);
Expand Down

This file was deleted.

This file was deleted.

5 changes: 3 additions & 2 deletions crates/next-dev-tests/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "next-dev-tests",
"private": true,
"devDependencies": {
"@types/jest": "29.4.0",
"@turbo/pack-test-harness": "file:../test-harness",
"@types/jest": "29.4.0",
"@types/node": "^18.14.0",
"autoprefixer": "^10.4.13",
"loader-runner": "^4.3.0",
"next": "13.1.7-canary.12",
"next": "13.1.7-canary.25",
"postcss": "^8.4.20",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion crates/next-dev/benches/bundlers/turbopack/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Bundler for Turbopack {
npm::install(
install_dir,
&[
NpmPackage::new("next", "13.1.7-canary.12"),
NpmPackage::new("next", "13.1.7-canary.25"),
// Dependency on this is inserted by swc's preset_env
NpmPackage::new("@swc/helpers", "^0.4.11"),
],
Expand Down
Loading

1 comment on commit 0241014

@vercel
Copy link

@vercel vercel bot commented on 0241014 Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.