Skip to content

Commit 8f4927f

Browse files
authored
Merge f455cef into 13d8851
2 parents 13d8851 + f455cef commit 8f4927f

File tree

9 files changed

+49
-8
lines changed

9 files changed

+49
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ default-members = [
4848
"crates/next-binding",
4949
"crates/next-core",
5050
"crates/next-dev",
51+
"crates/next-dev-tests",
5152
"crates/next-transform-dynamic",
5253
"crates/next-transform-strip-page-exports",
5354
"crates/node-file-trace",

crates/next-core/js/src/entry/app-renderer.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ async function runOperation(renderData: RenderData) {
238238
body = result.toUnchunkedString();
239239
}
240240
return {
241-
headers: [["Content-Type", result.contentType() ?? MIME_TEXT_HTML_UTF8]],
241+
headers: [
242+
["Content-Type", result.contentType() ?? MIME_TEXT_HTML_UTF8],
243+
] as [string, string][],
242244
body,
243245
};
244246
}

crates/next-core/js/src/entry/app/layout-entry.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ export { default as AppRouter } from "next/dist/client/components/app-router.js"
22
export { default as LayoutRouter } from "next/dist/client/components/layout-router.js";
33
export { default as RenderFromTemplateContext } from "next/dist/client/components/render-from-template-context.js";
44
export { default as GlobalError } from "next/dist/client/components/error-boundary.js";
5-
export { staticGenerationAsyncStorage } from "next/dist/esm/client/components/static-generation-async-storage.js";
6-
export { requestAsyncStorage } from "next/dist/esm/client/components/request-async-storage.js";
7-
import * as serverHooks from "next/dist/esm/client/components/hooks-server-context.js";
5+
export { staticGenerationAsyncStorage } from "next/dist/client/components/static-generation-async-storage.js";
6+
export { requestAsyncStorage } from "next/dist/client/components/request-async-storage.js";
7+
import * as serverHooks from "next/dist/client/components/hooks-server-context.js";
88
export { serverHooks };
99
export { renderToReadableStream } from "next/dist/compiled/react-server-dom-webpack/server.browser";
1010

crates/next-core/js/src/entry/edge-bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
declare const PAGE: string;
22

3-
import { adapter, enhanceGlobals } from "next/dist/esm/server/web/adapter";
3+
import { adapter, enhanceGlobals } from "next/dist/server/web/adapter";
44

55
enhanceGlobals();
66

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
declare module "next/dist/esm/client/components/static-generation-async-storage.js";
2-
declare module "next/dist/esm/client/components/request-async-storage.js";
3-
declare module "next/dist/esm/client/components/hooks-server-context.js";
1+
declare module "next/dist/client/components/static-generation-async-storage.js";
2+
declare module "next/dist/client/components/request-async-storage.js";
3+
declare module "next/dist/client/components/hooks-server-context.js";
44
declare module "next/dist/compiled/react-server-dom-webpack/server.browser";
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { cookies } from "next/headers";
2+
3+
export default function RootLayout({ children }: { children: any }) {
4+
return (
5+
<html>
6+
<body>
7+
{JSON.stringify(cookies(), null, 2)}
8+
{children}
9+
</body>
10+
</html>
11+
);
12+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Test from "./test";
2+
3+
export default function Page() {
4+
return (
5+
<div>
6+
<Test />
7+
</div>
8+
);
9+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"use client";
2+
3+
import { useEffect } from "react";
4+
5+
export default function Test() {
6+
useEffect(() => {
7+
import("@turbo/pack-test-harness").then(() => {
8+
it("should run", () => {});
9+
});
10+
return () => {};
11+
}, []);
12+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
experimental: {
3+
appDir: true,
4+
},
5+
};

0 commit comments

Comments
 (0)