-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
report error when using "use server" on module level (#47967)
### What? Add a error message when using "use server". * vercel/turborepo#4477 <!-- Tobias Koppers - add ServerDirective transform which reports unsupported --> ### Why? Turbopack doesn't support "use server" yet. ### Other turbopack updates * vercel/turborepo#4464 <!-- Justin Ridgewell - Better dotenv error messages --> * vercel/turborepo#4485 <!-- Justin Ridgewell - Add ServerAddr::hostname method -->
- Loading branch information
Showing
28 changed files
with
145 additions
and
37 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...sues/Implicit metadata from filesystem is currently not supported in Turbopack-e5ae22.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
PlainIssue { | ||
severity: Warning, | ||
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/implicit-metadata/input/app", | ||
category: "", | ||
title: "Implicit metadata from filesystem is currently not supported in Turbopack", | ||
description: "The following files were found in the app directory, but are not supported by Turbopack. They are ignored:\n\n- [project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/implicit-metadata/input/app/apple-icon.png\n- [project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/implicit-metadata/input/app/icon1234.png\n- [project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/implicit-metadata/input/app/icon234.png", | ||
detail: "", | ||
documentation_link: "", | ||
source: None, | ||
sub_issues: [], | ||
processing_path: Some( | ||
[ | ||
PlainIssueProcessingPathItem { | ||
context: Some( | ||
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/implicit-metadata/input/app", | ||
), | ||
description: "Next.js App Page Route /", | ||
}, | ||
], | ||
), | ||
} |
5 changes: 5 additions & 0 deletions
5
...next-swc/crates/next-dev-tests/tests/integration/next/app/use-server/input/app/action.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use server' | ||
|
||
export default async function Action() { | ||
return 42 | ||
} |
7 changes: 7 additions & 0 deletions
7
...next-swc/crates/next-dev-tests/tests/integration/next/app/use-server/input/app/layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function RootLayout({ children }: { children: any }) { | ||
return ( | ||
<html> | ||
<body>{children}</body> | ||
</html> | ||
); | ||
} |
15 changes: 15 additions & 0 deletions
15
...s/next-swc/crates/next-dev-tests/tests/integration/next/app/use-server/input/app/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Test from './test' | ||
|
||
export default async function Page() { | ||
let action | ||
try { | ||
await import('./action') | ||
} catch (e) { | ||
action = e.toString() | ||
} | ||
return ( | ||
<div> | ||
<Test action={action} /> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.