Unverified Commit f144c39c authored by OJ Kwon's avatar OJ Kwon Committed by GitHub

build(cargo): bump up swc_core, turbopack (#43652)

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

Fixes WEB-166.

This supersedes https://github.com/vercel/next.js/pull/43449, updating
swc_core and turbopack both with its transitive dependencies. Version
bump includes one important build side issues to having circular
dependencies.
parent aa4b4bf8
This diff is collapsed.
...@@ -19,10 +19,10 @@ pathdiff = "0.2.0" ...@@ -19,10 +19,10 @@ pathdiff = "0.2.0"
regex = "1.5" regex = "1.5"
serde = "1" serde = "1"
serde_json = "1" serde_json = "1"
swc_emotion = "0.28.2" swc_emotion = "0.28.4"
styled_components = "0.52.5" styled_components = "0.52.8"
styled_jsx = "0.29.5" styled_jsx = "0.29.8"
modularize_imports = "0.25.5" modularize_imports = "0.25.8"
tracing = { version = "0.1.37", features = ["release_max_level_info"] } tracing = { version = "0.1.37", features = ["release_max_level_info"] }
swc_core = { features = [ swc_core = { features = [
...@@ -42,9 +42,9 @@ swc_core = { features = [ ...@@ -42,9 +42,9 @@ swc_core = { features = [
"ecma_parser_typescript", "ecma_parser_typescript",
"cached", "cached",
"base" "base"
], version = "0.43.23" } ], version = "0.45.4" }
[dev-dependencies] [dev-dependencies]
swc_core = { features = ["testing_transform"], version = "0.43.23" } swc_core = { features = ["testing_transform"], version = "0.45.4" }
testing = "0.31.14" testing = "0.31.14"
walkdir = "2.3.2" walkdir = "2.3.2"
x next/dynamic requires at least one argument x next/dynamic requires at least one argument
,-[input.js:3:1] ,-[input.js:2:1]
2 |
3 | const DynamicComponent = dynamic() 3 | const DynamicComponent = dynamic()
: ^^^^^^^ : ^^^^^^^
`---- `----
x next/dynamic options must be an object literal. x next/dynamic options must be an object literal.
| Read more: https://nextjs.org/docs/messages/invalid-dynamic-options-type | Read more: https://nextjs.org/docs/messages/invalid-dynamic-options-type
,-[input.js:4:1] ,-[input.js:3:1]
3 | const options = { loading: () => <p>...</p>, ssr: false }
4 | const DynamicComponentWithCustomLoading = dynamic( 4 | const DynamicComponentWithCustomLoading = dynamic(
: ^^^^^^^ : ^^^^^^^
5 | () => import('../components/hello'),
`---- `----
x next/dynamic only accepts 2 arguments x next/dynamic only accepts 2 arguments
,-[input.js:3:1] ,-[input.js:2:1]
2 |
3 | const DynamicComponentWithCustomLoading = dynamic( 3 | const DynamicComponentWithCustomLoading = dynamic(
: ^^^^^^^ : ^^^^^^^
4 | () => import('../components/hello'),
`---- `----
x Font loader calls must be assigned to a const x Font loader calls must be assigned to a const
,-[input.js:4:1] ,-[input.js:3:1]
3 |
4 | export let firaCode = Abel() 4 | export let firaCode = Abel()
: ^^^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^^^
5 | export var inter = Inter()
`---- `----
x Font loader calls must be assigned to a const x Font loader calls must be assigned to a const
,-[input.js:5:1] ,-[input.js:4:1]
4 | export let firaCode = Abel()
5 | export var inter = Inter() 5 | export var inter = Inter()
: ^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^
`---- `----
x Font loader calls must be assigned to a const x Font loader calls must be assigned to a const
,-[input.js:4:1] ,-[input.js:3:1]
3 | var i = 10
4 | ,-> var inter1 = Inter({ 4 | ,-> var inter1 = Inter({
5 | | variant: '400', 5 | | variant: '400',
6 | `-> }) 6 | `-> })
`---- `----
x Font loader calls must be assigned to a const x Font loader calls must be assigned to a const
,-[input.js:9:1] ,-[input.js:8:1]
8 | var i2 = 20
9 | ,-> let inter2 = Inter({ 9 | ,-> let inter2 = Inter({
10 | | variant: '400', 10 | | variant: '400',
11 | `-> }) 11 | `-> })
......
x Font loader calls must be assigned to an identifier x Font loader calls must be assigned to an identifier
,-[input.js:3:1] ,-[input.js:2:1]
2 |
3 | const { a } = Inter({ 3 | const { a } = Inter({
: ^^^^^ : ^^^^^
4 | variant: '400',
`---- `----
x Font loader calls must be assigned to an identifier x Font loader calls must be assigned to an identifier
,-[input.js:7:1] ,-[input.js:6:1]
6 |
7 | const [b] = Inter({ 7 | const [b] = Inter({
: ^^^ : ^^^
8 | variant: '400',
`---- `----
x Unexpected object key type x Unexpected object key type
,-[input.js:4:1] ,-[input.js:3:1]
3 | const a = fn({ 10: 'hello' })
4 | const a = ABeeZee({ 10: 'hello' }) 4 | const a = ABeeZee({ 10: 'hello' })
: ^^ : ^^
`---- `----
x Font loader values must be explicitly written literals. x Font loader values must be explicitly written literals.
,-[input.js:7:1] ,-[input.js:6:1]
6 | const a = fn({ variant: [i1] })
7 | const a = ABeeZee({ variant: [i1] }) 7 | const a = ABeeZee({ variant: [i1] })
: ^^ : ^^
`---- `----
x Font loader values must be explicitly written literals. x Font loader values must be explicitly written literals.
,-[input.js:10:1] ,-[input.js:9:1]
9 | const a = fn({ variant: () => {} })
10 | const a = ABeeZee({ variant: () => {} }) 10 | const a = ABeeZee({ variant: () => {} })
: ^^^^^^^^ : ^^^^^^^^
`---- `----
x Unexpected spread x Unexpected spread
,-[input.js:13:1] ,-[input.js:12:1]
12 | const a = fn({ ...{} })
13 | const a = ABeeZee({ ...{} }) 13 | const a = ABeeZee({ ...{} })
: ^^^ : ^^^
`---- `----
x Font loaders don't accept spreads x Font loaders don't accept spreads
,-[input.js:4:1] ,-[input.js:3:1]
3 | const a = fn(...{}, ...[])
4 | const inter = Inter(...{}, ...[]) 4 | const inter = Inter(...{}, ...[])
: ^^^ : ^^^
`---- `----
x Font loaders don't accept spreads x Font loaders don't accept spreads
,-[input.js:4:1] ,-[input.js:3:1]
3 | const a = fn(...{}, ...[])
4 | const inter = Inter(...{}, ...[]) 4 | const inter = Inter(...{}, ...[])
: ^^^ : ^^^
`---- `----
x Font loaders must be called and assigned to a const in the module scope x Font loaders must be called and assigned to a const in the module scope
,-[input.js:3:1] ,-[input.js:2:1]
2 |
3 | Aladin({}) 3 | Aladin({})
: ^^^^^^ : ^^^^^^
`---- `----
x Font loaders must be called and assigned to a const in the module scope x Font loaders must be called and assigned to a const in the module scope
,-[input.js:6:1] ,-[input.js:5:1]
5 | let b
6 | const a = (b = Aladin({ variant: '400' })) 6 | const a = (b = Aladin({ variant: '400' }))
: ^^^^^^ : ^^^^^^
`---- `----
x Font loaders must be called and assigned to a const in the module scope x Font loaders must be called and assigned to a const in the module scope
,-[input.js:9:3] ,-[input.js:8:1]
8 | function Hello() {
9 | const a = Aladin({ 9 | const a = Aladin({
: ^^^^^^ : ^^^^^^
10 | variant: '400',
`---- `----
x Font loaders must be called and assigned to a const in the module scope x Font loaders must be called and assigned to a const in the module scope
,-[input.js:16:5] ,-[input.js:15:1]
15 | constructor() {
16 | Aladin({ 16 | Aladin({
: ^^^^^^ : ^^^^^^
17 | variant: '400',
`---- `----
x Font loaders must be called and assigned to a const in the module scope x Font loaders must be called and assigned to a const in the module scope
,-[input.js:23:3] ,-[input.js:22:1]
22 | {
23 | Aladin({}) 23 | Aladin({})
: ^^^^^^ : ^^^^^^
24 | }
`---- `----
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
,-[input.js:2:1] ,-[input.js:1:1]
1 | export async function getStaticPaths() {}
2 | export const getServerSideProps = function getServerSideProps() {} 2 | export const getServerSideProps = function getServerSideProps() {}
: ^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^
`---- `----
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
,-[input.js:2:1] ,-[input.js:1:1]
1 | const getStaticProps = async () => {}
2 | export { a as getServerSideProps } 2 | export { a as getServerSideProps }
: ^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^
`---- `----
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
,-[input.js:2:1] ,-[input.js:1:1]
1 | export { a as getServerSideProps } from './input'
2 | export { getStaticPaths } from 'a' 2 | export { getStaticPaths } from 'a'
: ^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^
`---- `----
...@@ -3,4 +3,5 @@ ...@@ -3,4 +3,5 @@
,-[input.js:1:1] ,-[input.js:1:1]
1 | export function getServerSideProps (){ 1 | export function getServerSideProps (){
: ^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^
2 | }
`---- `----
...@@ -3,4 +3,5 @@ ...@@ -3,4 +3,5 @@
,-[input.js:1:1] ,-[input.js:1:1]
1 | export function getStaticProps (){ 1 | export function getStaticProps (){
: ^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^
2 | }
`---- `----
x NEXT_RSC_ERR_CLIENT_IMPORT: server-only x NEXT_RSC_ERR_CLIENT_IMPORT: server-only
,-[input.js:9:1] ,-[input.js:8:1]
8 |
9 | import "server-only" 9 | import "server-only"
: ^^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^^
`---- `----
x NEXT_RSC_ERR_CLIENT_DIRECTIVE x NEXT_RSC_ERR_CLIENT_DIRECTIVE
,-[input.js:3:1] ,-[input.js:2:1]
2 |
3 | "use client" 3 | "use client"
: ^^^^^^^^^^^^ : ^^^^^^^^^^^^
`---- `----
x NEXT_RSC_ERR_SERVER_IMPORT: client-only x NEXT_RSC_ERR_SERVER_IMPORT: client-only
,-[input.js:9:1] ,-[input.js:8:1]
8 |
9 | import "client-only" 9 | import "client-only"
: ^^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^^
`---- `----
...@@ -3,4 +3,5 @@ ...@@ -3,4 +3,5 @@
,-[input.js:1:1] ,-[input.js:1:1]
1 | export function getServerSideProps (){ 1 | export function getServerSideProps (){
: ^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^
2 | }
`---- `----
...@@ -3,4 +3,5 @@ ...@@ -3,4 +3,5 @@
,-[input.js:1:1] ,-[input.js:1:1]
1 | export function getStaticProps (){ 1 | export function getStaticProps (){
: ^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^
2 | }
`---- `----
...@@ -6,73 +6,94 @@ ...@@ -6,73 +6,94 @@
`---- `----
x NEXT_RSC_ERR_REACT_API: createContext x NEXT_RSC_ERR_REACT_API: createContext
,-[input.js:3:1] ,-[input.js:2:1]
2 |
3 | import { createContext } from 'react' 3 | import { createContext } from 'react'
: ^^^^^^^^^^^^^ : ^^^^^^^^^^^^^
`---- `----
x NEXT_RSC_ERR_REACT_API: useEffect x NEXT_RSC_ERR_REACT_API: useEffect
,-[input.js:5:1] ,-[input.js:4:1]
4 |
5 | import { useEffect, useImperativeHandle } from 'react' 5 | import { useEffect, useImperativeHandle } from 'react'
: ^^^^^^^^^ : ^^^^^^^^^
`---- `----
x NEXT_RSC_ERR_REACT_API: useImperativeHandle x NEXT_RSC_ERR_REACT_API: useImperativeHandle
,-[input.js:5:1] ,-[input.js:4:1]
4 |
5 | import { useEffect, useImperativeHandle } from 'react' 5 | import { useEffect, useImperativeHandle } from 'react'
: ^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^
`---- `----
x NEXT_RSC_ERR_REACT_API: Component x NEXT_RSC_ERR_REACT_API: Component
,-[input.js:8:5] ,-[input.js:7:1]
7 | import {
8 | Component, 8 | Component,
: ^^^^^^^^^ : ^^^^^^^^^
9 | createFactory,
`---- `----
x NEXT_RSC_ERR_REACT_API: createFactory x NEXT_RSC_ERR_REACT_API: createFactory
,-[input.js:9:5] ,-[input.js:8:1]
8 | Component,
9 | createFactory, 9 | createFactory,
: ^^^^^^^^^^^^^ : ^^^^^^^^^^^^^
10 | PureComponent,
`---- `----
x NEXT_RSC_ERR_REACT_API: PureComponent x NEXT_RSC_ERR_REACT_API: PureComponent
,-[input.js:10:5] ,-[input.js:9:1]
9 | createFactory,
10 | PureComponent, 10 | PureComponent,
: ^^^^^^^^^^^^^ : ^^^^^^^^^^^^^
11 | useDeferredValue,
`---- `----
x NEXT_RSC_ERR_REACT_API: useDeferredValue x NEXT_RSC_ERR_REACT_API: useDeferredValue
,-[input.js:11:3] ,-[input.js:10:1]
10 | PureComponent,
11 | useDeferredValue, 11 | useDeferredValue,
: ^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^
12 | useInsertionEffect,
`---- `----
x NEXT_RSC_ERR_REACT_API: useInsertionEffect x NEXT_RSC_ERR_REACT_API: useInsertionEffect
,-[input.js:12:5] ,-[input.js:11:1]
11 | useDeferredValue,
12 | useInsertionEffect, 12 | useInsertionEffect,
: ^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^
13 | useLayoutEffect,
`---- `----
x NEXT_RSC_ERR_REACT_API: useLayoutEffect x NEXT_RSC_ERR_REACT_API: useLayoutEffect
,-[input.js:13:5] ,-[input.js:12:1]
12 | useInsertionEffect,
13 | useLayoutEffect, 13 | useLayoutEffect,
: ^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^
14 | useReducer,
`---- `----
x NEXT_RSC_ERR_REACT_API: useReducer x NEXT_RSC_ERR_REACT_API: useReducer
,-[input.js:14:5] ,-[input.js:13:1]
13 | useLayoutEffect,
14 | useReducer, 14 | useReducer,
: ^^^^^^^^^^ : ^^^^^^^^^^
15 | useRef,
`---- `----
x NEXT_RSC_ERR_REACT_API: useRef x NEXT_RSC_ERR_REACT_API: useRef
,-[input.js:15:5] ,-[input.js:14:1]
14 | useReducer,
15 | useRef, 15 | useRef,
: ^^^^^^ : ^^^^^^
16 | useSyncExternalStore
`---- `----
x NEXT_RSC_ERR_REACT_API: useSyncExternalStore x NEXT_RSC_ERR_REACT_API: useSyncExternalStore
,-[input.js:16:5] ,-[input.js:15:1]
15 | useRef,
16 | useSyncExternalStore 16 | useSyncExternalStore
: ^^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^^
17 | } from "react"
`---- `----
x NEXT_RSC_ERR_REACT_API: findDOMNode x NEXT_RSC_ERR_REACT_API: findDOMNode
,-[input.js:2:5] ,-[input.js:1:1]
1 | import {
2 | findDOMNode, 2 | findDOMNode,
: ^^^^^^^^^^^ : ^^^^^^^^^^^
3 | flushSync,
`---- `----
x NEXT_RSC_ERR_REACT_API: flushSync x NEXT_RSC_ERR_REACT_API: flushSync
,-[input.js:3:3] ,-[input.js:2:1]
2 | findDOMNode,
3 | flushSync, 3 | flushSync,
: ^^^^^^^^^ : ^^^^^^^^^
4 | unstable_batchedUpdates,
`---- `----
x NEXT_RSC_ERR_REACT_API: unstable_batchedUpdates x NEXT_RSC_ERR_REACT_API: unstable_batchedUpdates
,-[input.js:4:3] ,-[input.js:3:1]
3 | flushSync,
4 | unstable_batchedUpdates, 4 | unstable_batchedUpdates,
: ^^^^^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^^^^^
5 | } from "react-dom"
`---- `----
x NEXT_RSC_ERR_SERVER_IMPORT: react-dom/server x NEXT_RSC_ERR_SERVER_IMPORT: react-dom/server
,-[input.js:9:1] ,-[input.js:8:1]
8 |
9 | import "react-dom/server" 9 | import "react-dom/server"
: ^^^^^^^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^^^^^^^
`---- `----
x NEXT_RSC_ERR_SERVER_IMPORT: react-dom/client x NEXT_RSC_ERR_SERVER_IMPORT: react-dom/client
,-[input.js:11:1] ,-[input.js:10:1]
10 |
11 | import "react-dom/client" 11 | import "react-dom/client"
: ^^^^^^^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^^^^^^^
`---- `----
...@@ -50,14 +50,14 @@ swc_core = { features = [ ...@@ -50,14 +50,14 @@ swc_core = { features = [
"ecma_transforms_typescript", "ecma_transforms_typescript",
"ecma_utils", "ecma_utils",
"ecma_visit", "ecma_visit",
], version = "0.43.23" } ], version = "0.45.4" }
tracing = { version = "0.1.37", features = ["release_max_level_info"] } tracing = { version = "0.1.37", features = ["release_max_level_info"] }
tracing-futures = "0.2.5" tracing-futures = "0.2.5"
tracing-subscriber = "0.3.9" tracing-subscriber = "0.3.9"
tracing-chrome = "0.5.0" tracing-chrome = "0.5.0"
next-dev = { git = "https://github.com/vercel/turbo.git", rev = "5c2b933ce142d70e9774e933e805734f2c09248c", features = ["serializable"] } next-dev = { git = "https://github.com/vercel/turbo.git", rev = "cc024fa59f1c3ad253e74eefe86e0386455455d1", features = ["serializable"] }
node-file-trace = { git = "https://github.com/vercel/turbo.git", rev = "5c2b933ce142d70e9774e933e805734f2c09248c", default-features = false, features = ["node-api"] } node-file-trace = { git = "https://github.com/vercel/turbo.git", rev = "cc024fa59f1c3ad253e74eefe86e0386455455d1", default-features = false, features = ["node-api"] }
mdxjs = { version = "0.1.1", features = ["serializable"] } mdxjs = { version = "0.1.3", features = ["serializable"] }
# There are few build targets we can't use native-tls which default features rely on, # There are few build targets we can't use native-tls which default features rely on,
# allow to specify alternative (rustls) instead via features. # allow to specify alternative (rustls) instead via features.
# Note to opt in rustls default-features should be disabled # Note to opt in rustls default-features should be disabled
...@@ -70,7 +70,6 @@ _sentry_rustls = { package = "sentry", version = "0.27.0", default-features = fa ...@@ -70,7 +70,6 @@ _sentry_rustls = { package = "sentry", version = "0.27.0", default-features = fa
"rustls", "rustls",
"reqwest" "reqwest"
], optional = true } ], optional = true }
indexmap = "=1.6.2"
[build-dependencies] [build-dependencies]
napi-build = "2" napi-build = "2"
......
...@@ -31,7 +31,7 @@ wasm-bindgen-futures = "0.4.8" ...@@ -31,7 +31,7 @@ wasm-bindgen-futures = "0.4.8"
getrandom = { version = "0.2.5", optional = true, default-features = false } getrandom = { version = "0.2.5", optional = true, default-features = false }
js-sys = "0.3.59" js-sys = "0.3.59"
serde-wasm-bindgen = "0.4.3" serde-wasm-bindgen = "0.4.3"
mdxjs = { version = "0.1.1", features = ["serializable"] } mdxjs = { version = "0.1.3", features = ["serializable"] }
swc_core = { features = [ swc_core = { features = [
"common_concurrent", "common_concurrent",
...@@ -46,7 +46,7 @@ swc_core = { features = [ ...@@ -46,7 +46,7 @@ swc_core = { features = [
"ecma_parser_typescript", "ecma_parser_typescript",
"ecma_utils", "ecma_utils",
"ecma_visit" "ecma_visit"
], version = "0.43.23" } ], version = "0.45.4" }
# Workaround a bug # Workaround a bug
......
...@@ -142,7 +142,10 @@ exports[`ReactRefreshLogBox app syntax > runtime error 2`] = ` ...@@ -142,7 +142,10 @@ exports[`ReactRefreshLogBox app syntax > runtime error 2`] = `
"./index.js "./index.js
Error: Error:
x Expected '}', got '<eof>' x Expected '}', got '<eof>'
,---- ,-[5:1]
5 | i++
6 | throw Error('no ' + i)
7 | }, 1000)
8 | export default function FunctionNamed() { 8 | export default function FunctionNamed() {
: ^ : ^
\`---- \`----
...@@ -157,7 +160,10 @@ exports[`ReactRefreshLogBox app syntax > runtime error 3`] = ` ...@@ -157,7 +160,10 @@ exports[`ReactRefreshLogBox app syntax > runtime error 3`] = `
"./index.js "./index.js
Error: Error:
x Expected '}', got '<eof>' x Expected '}', got '<eof>'
,---- ,-[5:1]
5 | i++
6 | throw Error('no ' + i)
7 | }, 1000)
8 | export default function FunctionNamed() { 8 | export default function FunctionNamed() {
: ^ : ^
\`---- \`----
...@@ -172,15 +178,21 @@ exports[`ReactRefreshLogBox app unterminated JSX 1`] = ` ...@@ -172,15 +178,21 @@ exports[`ReactRefreshLogBox app unterminated JSX 1`] = `
"./index.js "./index.js
Error: Error:
x Unexpected token. Did you mean \`{'}'}\` or \`&rbrace;\`? x Unexpected token. Did you mean \`{'}'}\` or \`&rbrace;\`?
,---- ,-[5:1]
5 | <p>lol</p>
6 | div
7 | )
8 | } 8 | }
: ^ : ^
9 |
\`---- \`----
x Unexpected eof x Unexpected eof
,---- ,-[6:1]
6 | div
7 | )
8 | }
9 | 9 |
: ^
\`---- \`----
Caused by: Caused by:
......
...@@ -4,16 +4,25 @@ exports[`ReactRefreshLogBox _app syntax error shows logbox 1`] = ` ...@@ -4,16 +4,25 @@ exports[`ReactRefreshLogBox _app syntax error shows logbox 1`] = `
"./pages/_app.js "./pages/_app.js
Error: Error:
x Expression expected x Expression expected
,---- ,-[1:1]
1 |
2 | function MyApp({ Component, pageProps }) {
3 | return <<Component {...pageProps} />; 3 | return <<Component {...pageProps} />;
: ^ : ^
4 | }
5 | export default MyApp
6 |
\`---- \`----
x Unexpected token \`jsx name (Component)\`. Expected this, import, async, function, [ for array literal, { for object literal, @ for decorator, function, class, null, true, false, number, bigint, x Expression expected
| string, regexp, \` for template literal, (, or an identifier ,-[1:1]
,---- 1 |
2 | function MyApp({ Component, pageProps }) {
3 | return <<Component {...pageProps} />; 3 | return <<Component {...pageProps} />;
: ^^^^^^^^^ : ^^^^^^^^^
4 | }
5 | export default MyApp
6 |
\`---- \`----
Caused by: Caused by:
...@@ -25,9 +34,15 @@ exports[`ReactRefreshLogBox _document syntax error shows logbox 1`] = ` ...@@ -25,9 +34,15 @@ exports[`ReactRefreshLogBox _document syntax error shows logbox 1`] = `
"./pages/_document.js "./pages/_document.js
Error: Error:
x Unexpected token \`{\`. Expected identifier, string literal, numeric literal or [ for the computed key x Unexpected token \`{\`. Expected identifier, string literal, numeric literal or [ for the computed key
,---- ,-[1:1]
1 |
2 | import Document, { Html, Head, Main, NextScript } from 'next/document'
3 |
4 | class MyDocument extends Document {{ 4 | class MyDocument extends Document {{
: ^ : ^
5 | static async getInitialProps(ctx) {
6 | const initialProps = await Document.getInitialProps(ctx)
7 | return { ...initialProps }
\`---- \`----
Caused by: Caused by:
......
...@@ -142,7 +142,10 @@ exports[`ReactRefreshLogBox syntax > runtime error 2`] = ` ...@@ -142,7 +142,10 @@ exports[`ReactRefreshLogBox syntax > runtime error 2`] = `
"./index.js "./index.js
Error: Error:
x Expected '}', got '<eof>' x Expected '}', got '<eof>'
,---- ,-[5:1]
5 | i++
6 | throw Error('no ' + i)
7 | }, 1000)
8 | export default function FunctionNamed() { 8 | export default function FunctionNamed() {
: ^ : ^
\`---- \`----
...@@ -157,7 +160,10 @@ exports[`ReactRefreshLogBox syntax > runtime error 3`] = ` ...@@ -157,7 +160,10 @@ exports[`ReactRefreshLogBox syntax > runtime error 3`] = `
"./index.js "./index.js
Error: Error:
x Expected '}', got '<eof>' x Expected '}', got '<eof>'
,---- ,-[5:1]
5 | i++
6 | throw Error('no ' + i)
7 | }, 1000)
8 | export default function FunctionNamed() { 8 | export default function FunctionNamed() {
: ^ : ^
\`---- \`----
...@@ -172,15 +178,21 @@ exports[`ReactRefreshLogBox unterminated JSX 1`] = ` ...@@ -172,15 +178,21 @@ exports[`ReactRefreshLogBox unterminated JSX 1`] = `
"./index.js "./index.js
Error: Error:
x Unexpected token. Did you mean \`{'}'}\` or \`&rbrace;\`? x Unexpected token. Did you mean \`{'}'}\` or \`&rbrace;\`?
,---- ,-[5:1]
5 | <p>lol</p>
6 | div
7 | )
8 | } 8 | }
: ^ : ^
9 |
\`---- \`----
x Unexpected eof x Unexpected eof
,---- ,-[6:1]
6 | div
7 | )
8 | }
9 | 9 |
: ^
\`---- \`----
Caused by: Caused by:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment