Skip to content

Commit

Permalink
Update Turbopack to turbopack-230321.1 (#47342)
Browse files Browse the repository at this point in the history
Updates Turbopack to latest nightly and fix build errors.

# New features

* vercel/turborepo#4198

# Bug Fixes

* vercel/turborepo#4241

# Misc.

* vercel/turborepo#4249

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
alexkirsz and kodiakhq[bot] authored Mar 21, 2023
1 parent 509ed00 commit ed539c5
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 75 deletions.
55 changes: 28 additions & 27 deletions packages/next-swc/Cargo.lock

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

60 changes: 30 additions & 30 deletions packages/next-swc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,36 @@ swc_emotion = { version = "0.29.10" }
testing = { version = "0.31.31" }

# Turbo crates
auto-hash-map = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
node-file-trace = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
swc-ast-explorer = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbo-malloc = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2", default-features = false }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbo-tasks-build = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbo-tasks-env = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbo-tasks-fetch = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2", default-features = false }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbo-tasks-hash = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbo-tasks-macros = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbo-tasks-macros-shared = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbo-tasks-memory = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbo-tasks-testing = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbo-updater = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-cli-utils = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-core = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-create-test-app = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-css = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-dev-server = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-ecmascript = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-env = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-json = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-mdx = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-node = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-static = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-swc-utils = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-test-utils = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
turbopack-tests = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230317.2" }
auto-hash-map = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
node-file-trace = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
swc-ast-explorer = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbo-malloc = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1", default-features = false }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbo-tasks-build = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbo-tasks-env = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbo-tasks-fetch = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1", default-features = false }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbo-tasks-hash = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbo-tasks-macros = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbo-tasks-macros-shared = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbo-tasks-memory = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbo-tasks-testing = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbo-updater = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-cli-utils = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-core = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-create-test-app = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-css = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-dev-server = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-ecmascript = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-env = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-json = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-mdx = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-node = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-static = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-swc-utils = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-test-utils = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }
turbopack-tests = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230321.1" }

# General Deps

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use indexmap::indexmap;
use turbo_tasks::Value;
use turbo_tasks::{primitives::OptionStringVc, Value};
use turbo_tasks_fs::FileSystemPathVc;
use turbopack::{
self,
Expand Down Expand Up @@ -69,7 +69,11 @@ impl Transition for NextLayoutEntryTransition {
EcmascriptInputTransform::TypeScript {
use_define_for_class_fields: false,
},
EcmascriptInputTransform::React { refresh: false },
EcmascriptInputTransform::React {
refresh: false,
import_source: OptionStringVc::cell(None),
runtime: OptionStringVc::cell(None),
},
]),
context.compile_time_info(),
InnerAssetsVc::cell(indexmap! {
Expand Down
8 changes: 6 additions & 2 deletions packages/next-swc/crates/next-core/src/app_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{

use anyhow::{anyhow, Result};
use indexmap::indexmap;
use turbo_tasks::{TryJoinIterExt, Value, ValueToString};
use turbo_tasks::{primitives::OptionStringVc, TryJoinIterExt, Value, ValueToString};
use turbo_tasks_env::{CustomProcessEnvVc, EnvMapVc, ProcessEnvVc};
use turbo_tasks_fs::{rope::RopeBuilder, File, FileContent, FileSystemPathVc};
use turbopack::{
Expand Down Expand Up @@ -658,7 +658,11 @@ import BOOTSTRAP from {};
context,
Value::new(EcmascriptModuleAssetType::Typescript),
EcmascriptInputTransformsVc::cell(vec![
EcmascriptInputTransform::React { refresh: false },
EcmascriptInputTransform::React {
refresh: false,
import_source: OptionStringVc::cell(None),
runtime: OptionStringVc::cell(None),
},
EcmascriptInputTransform::TypeScript {
use_define_for_class_fields: false,
},
Expand Down
10 changes: 8 additions & 2 deletions packages/next-swc/crates/next-core/src/next_client/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use turbo_tasks_fs::{FileSystem, FileSystemPathVc};
use turbopack::{
module_options::{
module_options_context::{ModuleOptionsContext, ModuleOptionsContextVc},
PostCssTransformOptions, WebpackLoadersOptions,
JsxTransformOptions, PostCssTransformOptions, WebpackLoadersOptions,
},
resolve_options_context::{ResolveOptionsContext, ResolveOptionsContextVc},
transition::TransitionsByNameVc,
Expand Down Expand Up @@ -156,7 +156,13 @@ pub async fn get_client_module_options_context(
// We don't need to resolve React Refresh for each module. Instead,
// we try resolve it once at the root and pass down a context to all
// the modules.
enable_jsx: true,
enable_jsx: Some(
JsxTransformOptions {
import_source: None,
runtime: None,
}
.cell(),
),
enable_emotion: true,
enable_react_refresh,
enable_styled_components: true,
Expand Down
Loading

0 comments on commit ed539c5

Please sign in to comment.