Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

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

56 changes: 3 additions & 53 deletions crates/next-core/src/app_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use anyhow::{Context, Result, bail};
use bincode::{Decode, Encode};
use indexmap::map::{Entry, OccupiedEntry};
use rustc_hash::FxHashMap;
use serde::{Deserialize, Serialize};
use tracing::Instrument;
use turbo_rcstr::{RcStr, rcstr};
use turbo_tasks::{
Expand Down Expand Up @@ -38,31 +37,18 @@ fn normalize_underscore(string: &str) -> String {
#[turbo_tasks::value]
#[derive(Default, Debug, Clone)]
pub struct AppDirModules {
#[serde(skip_serializing_if = "Option::is_none")]
pub page: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub layout: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub error: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub global_error: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub global_not_found: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub loading: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub template: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub forbidden: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub unauthorized: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub not_found: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub default: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Option::is_none")]
pub route: Option<FileSystemPath>,
#[serde(skip_serializing_if = "Metadata::is_empty", default)]
pub metadata: Metadata,
}

Expand All @@ -87,9 +73,7 @@ impl AppDirModules {
}

/// A single metadata file plus an optional "alt" text file.
#[derive(
Clone, Debug, Serialize, Deserialize, PartialEq, Eq, TraceRawVcs, NonLocalValue, Encode, Decode,
)]
#[derive(Clone, Debug, PartialEq, Eq, TraceRawVcs, NonLocalValue, Encode, Decode)]
pub enum MetadataWithAltItem {
Static {
path: FileSystemPath,
Expand All @@ -102,18 +86,7 @@ pub enum MetadataWithAltItem {

/// A single metadata file.
#[derive(
Clone,
Debug,
Hash,
Serialize,
Deserialize,
PartialEq,
Eq,
TaskInput,
TraceRawVcs,
NonLocalValue,
Encode,
Decode,
Clone, Debug, Hash, PartialEq, Eq, TaskInput, TraceRawVcs, NonLocalValue, Encode, Decode,
)]
pub enum MetadataItem {
Static { path: FileSystemPath },
Expand Down Expand Up @@ -159,29 +132,12 @@ impl From<MetadataWithAltItem> for MetadataItem {
}

/// Metadata file that can be placed in any segment of the app directory.
#[derive(
Default,
Clone,
Debug,
Serialize,
Deserialize,
PartialEq,
Eq,
TraceRawVcs,
NonLocalValue,
Encode,
Decode,
)]
#[derive(Default, Clone, Debug, PartialEq, Eq, TraceRawVcs, NonLocalValue, Encode, Decode)]
pub struct Metadata {
#[serde(skip_serializing_if = "Vec::is_empty", default)]
pub icon: Vec<MetadataWithAltItem>,
#[serde(skip_serializing_if = "Vec::is_empty", default)]
pub apple: Vec<MetadataWithAltItem>,
#[serde(skip_serializing_if = "Vec::is_empty", default)]
pub twitter: Vec<MetadataWithAltItem>,
#[serde(skip_serializing_if = "Vec::is_empty", default)]
pub open_graph: Vec<MetadataWithAltItem>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sitemap: Option<MetadataItem>,
// The page indicates where the metadata is defined and captured.
// The steps for capturing metadata (get_directory_tree) and constructing
Expand All @@ -190,7 +146,6 @@ pub struct Metadata {
// the actual path incorrectly with fillMetadataSegment.
//
// This is only being used for the static metadata files.
#[serde(skip_serializing_if = "Option::is_none")]
pub base_page: Option<AppPage>,
}

Expand All @@ -216,11 +171,8 @@ impl Metadata {
#[turbo_tasks::value]
#[derive(Default, Clone, Debug)]
pub struct GlobalMetadata {
#[serde(skip_serializing_if = "Option::is_none")]
pub favicon: Option<MetadataItem>,
#[serde(skip_serializing_if = "Option::is_none")]
pub robots: Option<MetadataItem>,
#[serde(skip_serializing_if = "Option::is_none")]
pub manifest: Option<MetadataItem>,
}

Expand Down Expand Up @@ -534,8 +486,6 @@ impl ValueDefault for FileSystemPathVec {
PartialEq,
Eq,
Hash,
Serialize,
Deserialize,
TraceRawVcs,
ValueDebugFormat,
Debug,
Expand Down
3 changes: 1 addition & 2 deletions crates/next-core/src/next_app/app_page_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ use turbopack_core::{
};
use turbopack_ecmascript::runtime_functions::{TURBOPACK_LOAD, TURBOPACK_REQUIRE};

use super::app_entry::AppEntry;
use crate::{
app_page_loader_tree::{AppPageLoaderTreeModule, GLOBAL_ERROR},
app_structure::AppPageLoaderTree,
next_app::{AppPage, AppPath},
next_app::{AppPage, AppPath, app_entry::AppEntry},
next_config::NextConfig,
next_edge::entry::wrap_edge_entry,
next_server_component::NextServerComponentTransition,
Expand Down
60 changes: 7 additions & 53 deletions crates/next-core/src/next_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
}

#[turbo_tasks::value(eq = "manual")]
#[derive(Clone, Debug, Default, PartialEq)]
#[derive(Clone, Debug, Default, PartialEq, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct NextConfig {
// IMPORTANT: all fields should be private and access should be wrapped within a turbo-tasks
Expand Down Expand Up @@ -515,7 +515,7 @@

#[turbo_tasks::value(eq = "manual")]
#[derive(Clone, Debug, Default, PartialEq)]
#[serde(rename_all = "camelCase")]

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope

Check failure on line 518 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope
pub struct Rewrites {
pub before_files: Vec<Rewrite>,
pub after_files: Vec<Rewrite>,
Expand Down Expand Up @@ -543,20 +543,20 @@

#[turbo_tasks::value(eq = "manual", operation)]
#[derive(Clone, Debug, PartialEq)]
#[serde(rename_all = "camelCase")]

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope

Check failure on line 546 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope
pub struct ImageConfig {
pub device_sizes: Vec<u16>,
pub image_sizes: Vec<u16>,
pub path: String,
pub loader: ImageLoader,
#[serde(deserialize_with = "empty_string_is_none")]

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope

Check failure on line 552 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope
pub loader_file: Option<String>,
pub domains: Vec<String>,
pub disable_static_images: bool,
#[serde(rename = "minimumCacheTTL")]

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope

Check failure on line 556 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope
pub minimum_cache_ttl: u64,
pub formats: Vec<ImageFormat>,
#[serde(rename = "dangerouslyAllowSVG")]

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope

Check failure on line 559 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope
pub dangerously_allow_svg: bool,
pub content_security_policy: String,
pub remote_patterns: Vec<RemotePattern>,
Expand Down Expand Up @@ -849,7 +849,7 @@

#[turbo_tasks::value(operation)]
#[derive(Copy, Clone, Debug)]
#[serde(rename_all = "camelCase")]

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope

Check failure on line 852 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope
pub enum ModuleIds {
Named,
Deterministic,
Expand All @@ -859,16 +859,7 @@
pub struct OptionModuleIds(pub Option<ModuleIds>);

#[derive(
Clone,
Debug,
PartialEq,
Serialize,
Deserialize,
TraceRawVcs,
NonLocalValue,
OperationValue,
Encode,
Decode,
Clone, Debug, PartialEq, Deserialize, TraceRawVcs, NonLocalValue, OperationValue, Encode, Decode,
)]
#[serde(untagged)]
pub enum MdxRsOptions {
Expand All @@ -878,7 +869,7 @@

#[turbo_tasks::value(shared, operation)]
#[derive(Clone, Debug, Default)]
#[serde(rename_all = "camelCase")]

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope

Check failure on line 872 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope
pub enum ReactCompilerCompilationMode {
#[default]
Infer,
Expand All @@ -888,7 +879,7 @@

#[turbo_tasks::value(shared, operation)]
#[derive(Clone, Debug, Default)]
#[serde(rename_all = "snake_case")]

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope

Check failure on line 882 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope
pub enum ReactCompilerPanicThreshold {
#[default]
None,
Expand All @@ -899,9 +890,9 @@
/// Subset of react compiler options
#[turbo_tasks::value(shared, operation)]
#[derive(Clone, Debug, Default)]
#[serde(rename_all = "camelCase")]

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope

Check failure on line 893 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope
pub struct ReactCompilerOptions {
#[serde(default)]

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

cannot find attribute `serde` in this scope

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / rust check / build

cannot find attribute `serde` in this scope

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native / build

cannot find attribute `serde` in this scope

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

cannot find attribute `serde` in this scope

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

cannot find attribute `serde` in this scope

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope

Check failure on line 895 in crates/next-core/src/next_config.rs

View workflow job for this annotation

GitHub Actions / build-native-windows / build

cannot find attribute `serde` in this scope
pub compilation_mode: ReactCompilerCompilationMode,
#[serde(default)]
pub panic_threshold: ReactCompilerPanicThreshold,
Expand Down Expand Up @@ -933,7 +924,6 @@
Debug,
Default,
PartialEq,
Serialize,
Deserialize,
TraceRawVcs,
ValueDebugFormat,
Expand Down Expand Up @@ -1275,16 +1265,7 @@
}

#[derive(
Clone,
Debug,
PartialEq,
Serialize,
Deserialize,
TraceRawVcs,
NonLocalValue,
OperationValue,
Encode,
Decode,
Clone, Debug, PartialEq, Deserialize, TraceRawVcs, NonLocalValue, OperationValue, Encode, Decode,
)]
#[serde(untagged)]
pub enum EmotionTransformOptionsOrBoolean {
Expand All @@ -1302,16 +1283,7 @@
}

#[derive(
Clone,
Debug,
PartialEq,
Serialize,
Deserialize,
TraceRawVcs,
NonLocalValue,
OperationValue,
Encode,
Decode,
Clone, Debug, PartialEq, Deserialize, TraceRawVcs, NonLocalValue, OperationValue, Encode, Decode,
)]
#[serde(untagged)]
pub enum StyledComponentsTransformOptionsOrBoolean {
Expand All @@ -1329,7 +1301,7 @@
}

#[turbo_tasks::value(eq = "manual")]
#[derive(Clone, Debug, PartialEq, Default, OperationValue)]
#[derive(Clone, Debug, PartialEq, Default, OperationValue, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CompilerConfig {
pub react_remove_properties: Option<ReactRemoveProperties>,
Expand All @@ -1340,16 +1312,7 @@
}

#[derive(
Clone,
Debug,
PartialEq,
Serialize,
Deserialize,
TraceRawVcs,
NonLocalValue,
OperationValue,
Encode,
Decode,
Clone, Debug, PartialEq, Deserialize, TraceRawVcs, NonLocalValue, OperationValue, Encode, Decode,
)]
#[serde(untagged, rename_all = "camelCase")]
pub enum ReactRemoveProperties {
Expand All @@ -1367,16 +1330,7 @@
}

#[derive(
Clone,
Debug,
PartialEq,
Serialize,
Deserialize,
TraceRawVcs,
NonLocalValue,
OperationValue,
Encode,
Decode,
Clone, Debug, PartialEq, Deserialize, TraceRawVcs, NonLocalValue, OperationValue, Encode, Decode,
)]
#[serde(untagged)]
pub enum RemoveConsoleConfig {
Expand Down
34 changes: 19 additions & 15 deletions crates/next-core/src/next_font/google/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,25 @@ use turbopack_node::{
execution_context::ExecutionContext,
};

use self::{
font_fallback::get_font_fallback,
options::{FontDataEntry, FontWeights, NextFontGoogleOptions, options_from_request},
stylesheet::build_stylesheet,
util::{get_font_axes, get_stylesheet_url},
};
use super::{
font_fallback::FontFallback,
util::{
FontCssProperties, FontFamilyType, can_use_next_font, get_request_hash, get_request_id,
get_scoped_font_family,
},
};
use crate::{
embed_js::next_js_file_path, mode::NextMode, next_app::metadata::split_extension,
next_font::issue::NextFontIssue, util::load_next_js_json_file,
embed_js::next_js_file_path,
mode::NextMode,
next_app::metadata::split_extension,
next_font::{
font_fallback::FontFallback,
google::{
font_fallback::get_font_fallback,
options::{FontDataEntry, FontWeights, NextFontGoogleOptions, options_from_request},
stylesheet::build_stylesheet,
util::{get_font_axes, get_stylesheet_url},
},
issue::NextFontIssue,
util::{
FontCssProperties, FontFamilyType, can_use_next_font, get_request_hash, get_request_id,
get_scoped_font_family,
},
},
util::load_next_js_json_file,
};

pub mod font_fallback;
Expand All @@ -74,6 +77,7 @@ pub const USER_AGENT_FOR_GOOGLE_FONTS: &str = "Mozilla/5.0 (Macintosh; Intel Mac
pub const GOOGLE_FONTS_INTERNAL_PREFIX: &str = "@vercel/turbopack-next/internal/font/google/font";

#[turbo_tasks::value(transparent)]
#[derive(Deserialize)]
struct FontData(#[bincode(with = "turbo_bincode::indexmap")] FxIndexMap<RcStr, FontDataEntry>);

#[turbo_tasks::value(shared)]
Expand Down
6 changes: 4 additions & 2 deletions crates/next-core/src/next_shared/transforms/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ use turbo_tasks_fs::FileSystemPath;
use turbopack::module_options::ModuleRule;
use turbopack_ecmascript_plugins::transform::relay::RelayTransformer;

use super::get_ecma_transform_rule;
use crate::{next_config::NextConfig, next_shared::transforms::EcmascriptTransformStage};
use crate::{
next_config::NextConfig,
next_shared::transforms::{EcmascriptTransformStage, get_ecma_transform_rule},
};

/// Returns a transform rule for the relay graphql transform.
pub async fn get_relay_transform_rule(
Expand Down
Loading
Loading