-
Notifications
You must be signed in to change notification settings - Fork 26k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
96 changed files
with
567 additions
and
516 deletions.
There are no files selected for viewing
10 changes: 5 additions & 5 deletions
10
packages/next-swc/crates/core/tests/errors/next-dynamic/no-arguments/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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
error: next/dynamic requires at least one argument | ||
--> input.js:3:26 | ||
| | ||
3 | const DynamicComponent = dynamic() | ||
| ^^^^^^^ | ||
|
||
x next/dynamic requires at least one argument | ||
,-[input.js:4:1] | ||
4 | const DynamicComponent = dynamic() | ||
: ^^^^^^^ | ||
`---- |
12 changes: 6 additions & 6 deletions
12
packages/next-swc/crates/core/tests/errors/next-dynamic/options-as-variable/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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
error: next/dynamic options must be an object literal. | ||
Read more: https://nextjs.org/docs/messages/invalid-dynamic-options-type | ||
--> input.js:4:43 | ||
| | ||
4 | const DynamicComponentWithCustomLoading = dynamic( | ||
| ^^^^^^^ | ||
|
||
x next/dynamic options must be an object literal. | ||
| Read more: https://nextjs.org/docs/messages/invalid-dynamic-options-type | ||
,-[input.js:5:1] | ||
5 | const DynamicComponentWithCustomLoading = dynamic( | ||
: ^^^^^^^ | ||
`---- |
10 changes: 5 additions & 5 deletions
10
packages/next-swc/crates/core/tests/errors/next-dynamic/too-many-arguments/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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
error: next/dynamic only accepts 2 arguments | ||
--> input.js:3:43 | ||
| | ||
3 | const DynamicComponentWithCustomLoading = dynamic( | ||
| ^^^^^^^ | ||
|
||
x next/dynamic only accepts 2 arguments | ||
,-[input.js:4:1] | ||
4 | const DynamicComponentWithCustomLoading = dynamic( | ||
: ^^^^^^^ | ||
`---- |
10 changes: 5 additions & 5 deletions
10
...s/next-swc/crates/core/tests/errors/next-ssg/server-side-after-static-paths/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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
--> input.js:2:14 | ||
| | ||
2 | export const getServerSideProps = function getServerSideProps() {} | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
,-[input.js:3:1] | ||
3 | export const getServerSideProps = function getServerSideProps() {} | ||
: ^^^^^^^^^^^^^^^^^^ | ||
`---- |
10 changes: 5 additions & 5 deletions
10
...s/next-swc/crates/core/tests/errors/next-ssg/server-side-after-static-props/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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
--> input.js:2:15 | ||
| | ||
2 | export { a as getServerSideProps } | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
,-[input.js:3:1] | ||
3 | export { a as getServerSideProps } | ||
: ^^^^^^^^^^^^^^^^^^ | ||
`---- |
10 changes: 5 additions & 5 deletions
10
...s/next-swc/crates/core/tests/errors/next-ssg/static-paths-after-server-side/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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
--> input.js:2:10 | ||
| | ||
2 | export { getStaticPaths } from 'a' | ||
| ^^^^^^^^^^^^^^ | ||
|
||
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
,-[input.js:3:1] | ||
3 | export { getStaticPaths } from 'a' | ||
: ^^^^^^^^^^^^^^ | ||
`---- |
10 changes: 5 additions & 5 deletions
10
...s/next-swc/crates/core/tests/errors/next-ssg/static-props-after-server-side/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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
--> input.js:1:26 | ||
| | ||
1 | export { getStaticProps, getServerSideProps } | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
,-[input.js:2:1] | ||
2 | export { getStaticProps, getServerSideProps } | ||
: ^^^^^^^^^^^^^^^^^^ | ||
`---- |
12 changes: 6 additions & 6 deletions
12
packages/next-swc/crates/core/tests/errors/re-export-all-in-page/re-export-all/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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
error: Using `export * from '...'` in a page is disallowed. Please use `export { default } from '...'` instead. | ||
Read more: https://nextjs.org/docs/messages/export-all-in-page | ||
--> input.js:1:1 | ||
| | ||
1 | export * from './other-page' | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
x Using `export * from '...'` in a page is disallowed. Please use `export { default } from '...'` instead. | ||
| Read more: https://nextjs.org/docs/messages/export-all-in-page | ||
,-[input.js:2:1] | ||
2 | export * from './other-page' | ||
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
`---- |
2 changes: 1 addition & 1 deletion
2
packages/next-swc/crates/core/tests/errors/re-export-all-in-page/re-export-default/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 |
---|---|---|
@@ -1 +1 @@ | ||
export { default, getStaticProps, getStaticPaths } from "./other-page"; | ||
export { default, getStaticProps, getStaticPaths } from './other-page'; |
13 changes: 6 additions & 7 deletions
13
packages/next-swc/crates/core/tests/errors/styled-jsx/no-child/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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
error: Expected one child under JSX style tag, but got 0. | ||
Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children | ||
--> input.js:3:5 | ||
| | ||
3 | / <style jsx> | ||
4 | | </style> | ||
| |____________^ | ||
|
||
x Expected one child under JSX style tag, but got 0. | ||
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children | ||
,-[input.js:4:5] | ||
4 | ,-> <style jsx> | ||
5 | `-> </style> | ||
`---- |
2 changes: 1 addition & 1 deletion
2
packages/next-swc/crates/core/tests/errors/styled-jsx/ts-with-css-resolve/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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
error: /some-project/src/some-file.ts uses `css.resolve`, but ends with `.ts`. The file extension needs to be `.tsx` so that the jsx injected by `css.resolve` will be transformed. | ||
|
||
x /some-project/src/some-file.ts uses `css.resolve`, but ends with `.ts`. The file extension needs to be `.tsx` so that the jsx injected by `css.resolve` will be transformed. |
17 changes: 8 additions & 9 deletions
17
packages/next-swc/crates/core/tests/errors/styled-jsx/two-children/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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
error: Expected one child under JSX style tag, but got 2. | ||
Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children | ||
--> input.js:3:5 | ||
| | ||
3 | / <style jsx> | ||
4 | | {`.p {}`} | ||
5 | | {`.p {}`} | ||
6 | | </style> | ||
| |____________^ | ||
|
||
x Expected one child under JSX style tag, but got 2. | ||
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children | ||
,-[input.js:4:5] | ||
4 | ,-> <style jsx> | ||
5 | | {`.p {}`} | ||
6 | | {`.p {}`} | ||
7 | `-> </style> | ||
`---- |
15 changes: 7 additions & 8 deletions
15
packages/next-swc/crates/core/tests/errors/styled-jsx/wrong-child-type/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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
error: Expected a single child of type JSXExpressionContainer under JSX Style tag. | ||
Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children | ||
--> input.js:3:5 | ||
| | ||
3 | / <style jsx> | ||
4 | | 10 | ||
5 | | </style> | ||
| |____________^ | ||
|
||
x Expected a single child of type JSXExpressionContainer under JSX Style tag. | ||
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children | ||
,-[input.js:4:5] | ||
4 | ,-> <style jsx> | ||
5 | | 10 | ||
6 | `-> </style> | ||
`---- |
15 changes: 7 additions & 8 deletions
15
...ages/next-swc/crates/core/tests/errors/styled-jsx/wrong-jsx-expression-type/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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
error: Expected a template literal, string or identifier inside the JSXExpressionContainer. | ||
Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children | ||
--> input.js:3:5 | ||
| | ||
3 | / <style jsx> | ||
4 | | {[]} | ||
5 | | </style> | ||
| |____________^ | ||
|
||
x Expected a template literal, string or identifier inside the JSXExpressionContainer. | ||
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children | ||
,-[input.js:4:5] | ||
4 | ,-> <style jsx> | ||
5 | | {[]} | ||
6 | `-> </style> | ||
`---- |
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
Oops, something went wrong.