-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into shuding/next-208-implement-route-announcer…
…-for-app
- Loading branch information
Showing
13 changed files
with
190 additions
and
13 deletions.
There are no files selected for viewing
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
3 changes: 3 additions & 0 deletions
3
packages/next-swc/crates/core/tests/errors/server-actions/10/input.js
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,3 @@ | ||
'use sevrer' | ||
|
||
export async function foo () {} |
2 changes: 2 additions & 0 deletions
2
packages/next-swc/crates/core/tests/errors/server-actions/10/output.js
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,2 @@ | ||
'use sevrer'; | ||
export async function foo() {} |
6 changes: 6 additions & 0 deletions
6
packages/next-swc/crates/core/tests/errors/server-actions/10/output.stderr
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,6 @@ | ||
|
||
x Did you mean "use server"? "use sevrer" is not a supported directive name. | ||
,-[input.js:1:1] | ||
1 | 'use sevrer' | ||
: ^^^^^^^^^^^^ | ||
`---- |
5 changes: 5 additions & 0 deletions
5
packages/next-swc/crates/core/tests/errors/server-actions/11/input.js
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 @@ | ||
import 'react' | ||
|
||
('use sevrer') | ||
|
||
// ^Tools like Prettier sometimes do this. |
3 changes: 3 additions & 0 deletions
3
packages/next-swc/crates/core/tests/errors/server-actions/11/output.js
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,3 @@ | ||
import 'react'; | ||
'use sevrer' // ^Tools like Prettier sometimes do this. | ||
; |
7 changes: 7 additions & 0 deletions
7
packages/next-swc/crates/core/tests/errors/server-actions/11/output.stderr
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 @@ | ||
|
||
x The "use server" directive must be at the top of the file, and cannot be wrapped in parentheses. | ||
,-[input.js:2:1] | ||
2 | | ||
3 | ('use sevrer') | ||
: ^^^^^^^^^^^^^^ | ||
`---- |
9 changes: 9 additions & 0 deletions
9
packages/next-swc/crates/core/tests/errors/server-actions/8/input.js
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,9 @@ | ||
const foo = async () => { | ||
'use strict' | ||
'use server' | ||
} | ||
|
||
const bar = async () => { | ||
const x = 1 | ||
'use server' | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/next-swc/crates/core/tests/errors/server-actions/8/output.js
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,12 @@ | ||
/* __next_internal_action_entry_do_not_use__ $$ACTION_1 */ const foo = $$ACTION_0 = async ()=>$$ACTION_1($$ACTION_0.$$bound); | ||
$$ACTION_0.$$typeof = Symbol.for("react.server.reference"); | ||
$$ACTION_0.$$id = "188d5d945750dc32e2c842b93c75a65763d4a922"; | ||
$$ACTION_0.$$bound = []; | ||
export const $$ACTION_1 = async (closure)=>{ | ||
'use strict'; | ||
}; | ||
var $$ACTION_0; | ||
const bar = async ()=>{ | ||
const x = 1; | ||
'use server'; | ||
}; |
8 changes: 8 additions & 0 deletions
8
packages/next-swc/crates/core/tests/errors/server-actions/8/output.stderr
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,8 @@ | ||
|
||
x The "use server" directive must be at the top of the function body. | ||
,-[input.js:7:1] | ||
7 | const x = 1 | ||
8 | 'use server' | ||
: ^^^^^^^^^^^^ | ||
9 | } | ||
`---- |
3 changes: 3 additions & 0 deletions
3
packages/next-swc/crates/core/tests/errors/server-actions/9/input.js
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,3 @@ | ||
import 'my-module' | ||
|
||
'use server' |
2 changes: 2 additions & 0 deletions
2
packages/next-swc/crates/core/tests/errors/server-actions/9/output.js
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,2 @@ | ||
import 'my-module'; | ||
'use server'; |
7 changes: 7 additions & 0 deletions
7
packages/next-swc/crates/core/tests/errors/server-actions/9/output.stderr
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 @@ | ||
|
||
x The "use server" directive must be at the top of the file. | ||
,-[input.js:2:1] | ||
2 | | ||
3 | 'use server' | ||
: ^^^^^^^^^^^^ | ||
`---- |