Skip to content

Commit

Permalink
build(cargo): update turbopack
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell committed Feb 28, 2023
1 parent 4b705a5 commit 2fd1ac1
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 42 deletions.
72 changes: 42 additions & 30 deletions packages/next-swc/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/next-swc/crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde = "1"
serde_json = "1"
tracing = { version = "0.1.37", features = ["release_max_level_info"] }

next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230223.3", features = [
next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1", features = [
"__swc_core",
"__swc_core_next_core",
"__swc_transform_styled_jsx",
Expand All @@ -29,7 +29,7 @@ next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-2
] }

[dev-dependencies]
next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230223.3", features = [
next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1", features = [
"__swc_core_testing_transform",
"__swc_testing",
] }
Expand Down
8 changes: 4 additions & 4 deletions packages/next-swc/crates/napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ tracing = { version = "0.1.37", features = ["release_max_level_info"] }
tracing-futures = "0.2.5"
tracing-subscriber = "0.3.9"
tracing-chrome = "0.5.0"
turbo-malloc = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230223.3" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230223.3" }
turbo-tasks-memory = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230223.3" }
next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230223.3", features = [
turbo-malloc = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1" }
turbo-tasks-memory = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1" }
next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1", features = [
"__swc_core_binding_napi",
"__turbo_next_dev_server",
"__turbo_node_file_trace",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/crates/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ wasm-bindgen-futures = "0.4.8"
getrandom = { version = "0.2.5", optional = true, default-features = false }
js-sys = "0.3.59"
serde-wasm-bindgen = "0.4.3"
next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230223.3", features = [
next-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230228.1", features = [
"__swc_core_binding_wasm",
"__feature_mdx_rs",
] }
Expand Down
15 changes: 10 additions & 5 deletions packages/next/src/cli/next-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ const nextDev: CliCommand = async (argv) => {
'reactStrictMode',
'swcMinify',
'transpilePackages',
'i18n',
]

// check for babelrc, swc plugins
Expand Down Expand Up @@ -270,7 +271,7 @@ const nextDev: CliCommand = async (argv) => {
let babelrc = await getBabelConfigFile(dir)
if (babelrc) babelrc = path.basename(babelrc)

let hasNonDefaultConfig
let nonSupportedConfig: string[] = []
let rawNextConfig: NextConfig = {}

try {
Expand Down Expand Up @@ -317,14 +318,14 @@ const nextDev: CliCommand = async (argv) => {
}
}

hasNonDefaultConfig = Object.keys(rawNextConfig).some((key) =>
nonSupportedConfig = Object.keys(rawNextConfig).filter((key) =>
checkUnsupportedCustomConfig(key, rawNextConfig, defaultConfig)
)
} catch (e) {
console.error('Unexpected error occurred while checking config', e)
}

const hasWarningOrError = babelrc || hasNonDefaultConfig
const hasWarningOrError = babelrc || nonSupportedConfig.length
if (!hasWarningOrError) {
thankYouMsg = chalk.dim(thankYouMsg)
}
Expand All @@ -349,13 +350,17 @@ const nextDev: CliCommand = async (argv) => {
`Babel is not yet supported. To use Turbopack at the moment,\n you'll need to remove your usage of Babel.`
)}`
}
if (hasNonDefaultConfig) {
if (nonSupportedConfig.length) {
unsupportedParts += `\n\n- Unsupported Next.js configuration option(s) (${chalk.cyan(
'next.config.js'
)})\n ${chalk.dim(
`The only configurations options supported are:\n${supportedTurbopackNextConfigOptions
.map((name) => ` - ${chalk.cyan(name)}\n`)
.join('')} To use Turbopack, remove other configuration options.`
.join(
''
)} To use Turbopack, remove the following configuration options:\n${nonSupportedConfig.map(
(name) => ` - ${chalk.red(name)}\n`
)}`
)} `
}

Expand Down

0 comments on commit 2fd1ac1

Please sign in to comment.