From 988900c933fd76c638f53f7c53b40f615ceca79d Mon Sep 17 00:00:00 2001 From: Will Binns-Smith Date: Tue, 14 May 2024 17:08:29 -0700 Subject: [PATCH] Turbopack: `EcmascriptChunkItemContent`: add react refresh parameter based on module (#8133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rather than reading it from the chunking context, which applies to all modules for a given chunking target, read it from the `EcmascriptOptions` for the module. This ensures that we only make react refresh values available to user code transformed with it. This also: - Removes `EcmascriptChunkingContext`, as it’s no longer necessary - Makes `EcmascriptOptions` a Vc in many more cases Test Plan: Integration tests --- .../turbopack-browser/src/chunking_context.rs | 10 +--- .../src/ecmascript/runtime.rs | 6 +- crates/turbopack-css/src/module_asset.rs | 12 +--- .../src/async_chunk/chunk_item.rs | 6 +- .../src/async_chunk/module.rs | 14 ++--- .../src/chunk/chunk_type.rs | 7 +-- .../turbopack-ecmascript/src/chunk/context.rs | 13 ----- crates/turbopack-ecmascript/src/chunk/item.rs | 10 ++-- crates/turbopack-ecmascript/src/chunk/mod.rs | 6 +- .../src/chunk_group_files_asset.rs | 15 ++--- crates/turbopack-ecmascript/src/code_gen.rs | 8 +-- crates/turbopack-ecmascript/src/lib.rs | 57 ++++++++++--------- .../src/manifest/chunk_asset.rs | 15 ++--- .../src/manifest/chunk_item.rs | 6 +- .../src/manifest/loader_item.rs | 4 +- .../src/references/amd.rs | 5 +- .../src/references/async_module.rs | 12 ++-- .../src/references/cjs.rs | 9 ++- .../src/references/constant_condition.rs | 4 +- .../src/references/constant_value.rs | 5 +- .../src/references/dynamic_expression.rs | 4 +- .../src/references/esm/base.rs | 4 +- .../src/references/esm/binding.rs | 4 +- .../src/references/esm/dynamic.rs | 3 +- .../src/references/esm/export.rs | 5 +- .../src/references/esm/meta.rs | 6 +- .../src/references/esm/module_id.rs | 6 +- .../src/references/esm/module_item.rs | 4 +- .../src/references/esm/url.rs | 6 +- .../src/references/mod.rs | 1 + .../src/references/require_context.rs | 18 ++---- .../src/references/unreachable.rs | 4 +- .../facade/chunk_item.rs | 7 +-- .../side_effect_optimization/facade/module.rs | 11 +--- .../locals/chunk_item.rs | 7 ++- .../side_effect_optimization/locals/module.rs | 11 +--- .../src/side_effect_optimization/reference.rs | 8 +-- .../src/tree_shake/asset.rs | 9 +-- .../src/tree_shake/chunk_item.rs | 10 ++-- crates/turbopack-json/src/lib.rs | 14 ++--- crates/turbopack-mdx/src/lib.rs | 16 ++---- .../turbopack-nodejs/src/chunking_context.rs | 5 +- crates/turbopack-static/src/lib.rs | 14 ++--- ...apshot_basic_async_chunk_input_4437c1._.js | 6 +- ...apshot_basic_async_chunk_input_aea885._.js | 4 +- ...s_snapshot_basic_chunked_input_09b9a1._.js | 4 +- ...s_snapshot_basic_shebang_input_a87633._.js | 4 +- ...ot_basic_top-level-await_input_3adb52._.js | 4 +- ...ot_basic_top-level-await_input_e71653._.js | 4 +- ...shot_comptime_define_input_index_49857f.js | 2 +- ..._absolute-uri-import_input_index_0e8055.js | 2 +- ...s_chained-attributes_input_index_356166.js | 2 +- ...s_css-legacy-nesting_input_index_8e60f2.js | 2 +- ...snapshot_css_css-modules_input_8abc52._.js | 2 +- ...s_tests_snapshot_css_css_input_34944c._.js | 2 +- ..._relative-uri-import_input_index_c2ad30.js | 2 +- ...rl-in-supports-query_input_index_c70a2c.js | 2 +- ...shot_cssmodules_composes_input_2ba052._.js | 2 +- ...ules_relative-uri-import_input_f065a6._.js | 2 +- ...request_very-dynamic_input_index_0d92c3.js | 2 +- ...turbopack-tests_tests_snapshot_b36339._.js | 8 +-- ...s_tests_snapshot_env_env_input_673035._.js | 4 +- ...entrry_runtime_entry_input_index_97d560.js | 2 +- ...shot_example_example_input_index_838420.js | 2 +- ...apshot_export-alls_cjs-2_input_2c57a6._.js | 8 +-- ...t_export-alls_cjs-script_input_ffd38d._.js | 6 +- ...snapshot_import-meta_cjs_input_44576c._.js | 4 +- ...import-meta_esm-multiple_input_b94ed5._.js | 4 +- ..._import-meta_esm-mutable_input_f730df._.js | 4 +- ...t_import-meta_esm-object_input_51cbdd._.js | 4 +- ...snapshot_import-meta_esm_input_5f2592._.js | 4 +- ...snapshot_import-meta_url_input_9b6f5c._.js | 4 +- ...mports_duplicate-binding_input_9ca1ac._.js | 4 +- ...shot_imports_dynamic_input_index_5ee1a4.js | 2 +- ...ports_dynamic_input_vercel_mjs_18521c._.js | 2 +- ...ts_snapshot_imports_json_input_22bb62._.js | 2 +- ...s_snapshot_imports_order_input_c5b1db._.js | 4 +- ...ts_resolve_error_cjs_input_index_86e786.js | 2 +- ...ts_resolve_error_esm_input_index_c7ccd7.js | 2 +- ...ports_static-and-dynamic_input_cbb273._.js | 4 +- ..._snapshot_imports_static_input_4175d9._.js | 2 +- ...s_subpath-imports-nested_input_83c7e7._.js | 6 +- ..._imports_subpath-imports_input_f5873d._.js | 12 ++-- ...de_protocol_external_input_index_8770aa.js | 2 +- ...pshot_node_spawn_dynamic_input_e65664._.js | 4 +- ...hot_node_spawn_node_eval_input_d0030e._.js | 4 +- ..._default_dev_runtime_input_index_7e4b32.js | 2 +- ...turbopack-tests_tests_snapshot_ededc0._.js | 4 +- ...turbopack-tests_tests_snapshot_9cde7b._.js | 8 +-- ...turbopack-tests_tests_snapshot_f8ff4e._.js | 4 +- ...escript_jsconfig-baseurl_input_f8c7e6._.js | 4 +- ...escript_tsconfig-baseurl_input_7bf5e3._.js | 4 +- ...turbopack-tests_tests_snapshot_4a4ab7._.js | 4 +- ...turbopack-tests_tests_snapshot_5fc419._.js | 4 +- ...fig-extends-relative-dir_input_d34519._.js | 4 +- ...nfig-extends-without-ext_input_69f4f4._.js | 4 +- ...escript_tsconfig-extends_input_72bd49._.js | 4 +- crates/turbopack-wasm/src/module_asset.rs | 14 +---- crates/turbopack-wasm/src/raw.rs | 15 ++--- crates/turbopack/src/lib.rs | 10 ++-- crates/turbopack/src/module_options/mod.rs | 34 +++++++---- .../src/module_options/module_rule.rs | 6 +- 102 files changed, 285 insertions(+), 395 deletions(-) delete mode 100644 crates/turbopack-ecmascript/src/chunk/context.rs diff --git a/crates/turbopack-browser/src/chunking_context.rs b/crates/turbopack-browser/src/chunking_context.rs index 5142652706443a..1827006f21e456 100644 --- a/crates/turbopack-browser/src/chunking_context.rs +++ b/crates/turbopack-browser/src/chunking_context.rs @@ -16,7 +16,7 @@ use turbopack_core::{ }; use turbopack_ecmascript::{ async_chunk::module::AsyncLoaderModule, - chunk::{EcmascriptChunk, EcmascriptChunkingContext}, + chunk::EcmascriptChunk, manifest::{chunk_asset::ManifestAsyncModule, loader_item::ManifestLoaderChunkItem}, }; use turbopack_ecmascript_runtime::RuntimeType; @@ -493,11 +493,3 @@ impl ChunkingContext for BrowserChunkingContext { }) } } - -#[turbo_tasks::value_impl] -impl EcmascriptChunkingContext for BrowserChunkingContext { - #[turbo_tasks::function] - fn has_react_refresh(&self) -> Vc { - Vc::cell(true) - } -} diff --git a/crates/turbopack-browser/src/ecmascript/runtime.rs b/crates/turbopack-browser/src/ecmascript/runtime.rs index 3f0265fc0d02f3..c306b2cc043a7b 100644 --- a/crates/turbopack-browser/src/ecmascript/runtime.rs +++ b/crates/turbopack-browser/src/ecmascript/runtime.rs @@ -7,7 +7,7 @@ use turbopack_core::{ }; use turbopack_ecmascript::chunk::{ EcmascriptChunk, EcmascriptChunkPlaceables, EcmascriptChunkRuntime, - EcmascriptChunkRuntimeContent, EcmascriptChunkingContext, + EcmascriptChunkRuntimeContent, ChunkingContext, }; use crate::ecmascript::content::EcmascriptDevChunkContent; @@ -16,7 +16,7 @@ use crate::ecmascript::content::EcmascriptDevChunkContent; #[turbo_tasks::value(shared)] pub(crate) struct EcmascriptDevChunkRuntime { /// The chunking context that created this runtime. - chunking_context: Vc>, + chunking_context: Vc>, /// All chunks of this chunk group need to be ready for execution to start. /// When None, it will use a chunk group created from the current chunk. chunk_group: Option>, @@ -31,7 +31,7 @@ impl EcmascriptDevChunkRuntime { /// Creates a new [`Vc`]. #[turbo_tasks::function] pub fn new( - chunking_context: Vc>, + chunking_context: Vc>, evaluated_entries: Option>, ) -> Vc { EcmascriptDevChunkRuntime { diff --git a/crates/turbopack-css/src/module_asset.rs b/crates/turbopack-css/src/module_asset.rs index c622b18c1bd3bc..6905f14ceb1999 100644 --- a/crates/turbopack-css/src/module_asset.rs +++ b/crates/turbopack-css/src/module_asset.rs @@ -23,7 +23,7 @@ use turbopack_core::{ use turbopack_ecmascript::{ chunk::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkPlaceable, - EcmascriptChunkType, EcmascriptChunkingContext, EcmascriptExports, + EcmascriptChunkType, EcmascriptExports, }, utils::StringifyJs, ParseResultSourceMap, @@ -237,12 +237,6 @@ impl ChunkableModule for ModuleCssAsset { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use ModuleCssAsset", - )?; Ok(Vc::upcast( ModuleChunkItem { chunking_context, @@ -277,7 +271,7 @@ impl ResolveOrigin for ModuleCssAsset { #[turbo_tasks::value] struct ModuleChunkItem { module: Vc, - chunking_context: Vc>, + chunking_context: Vc>, } #[turbo_tasks::value_impl] @@ -313,7 +307,7 @@ impl ChunkItem for ModuleChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for ModuleChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } diff --git a/crates/turbopack-ecmascript/src/async_chunk/chunk_item.rs b/crates/turbopack-ecmascript/src/async_chunk/chunk_item.rs index ac882009bcbe35..71d0a4f6993618 100644 --- a/crates/turbopack-ecmascript/src/async_chunk/chunk_item.rs +++ b/crates/turbopack-ecmascript/src/async_chunk/chunk_item.rs @@ -16,7 +16,7 @@ use crate::{ async_chunk::module::AsyncLoaderModule, chunk::{ data::EcmascriptChunkData, EcmascriptChunkItem, EcmascriptChunkItemContent, - EcmascriptChunkPlaceable, EcmascriptChunkType, EcmascriptChunkingContext, + EcmascriptChunkPlaceable, EcmascriptChunkType, }, utils::StringifyJs, }; @@ -24,7 +24,7 @@ use crate::{ #[turbo_tasks::value(shared)] pub struct AsyncLoaderChunkItem { pub module: Vc, - pub chunking_context: Vc>, + pub chunking_context: Vc>, } #[turbo_tasks::value_impl] @@ -67,7 +67,7 @@ impl AsyncLoaderChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for AsyncLoaderChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } diff --git a/crates/turbopack-ecmascript/src/async_chunk/module.rs b/crates/turbopack-ecmascript/src/async_chunk/module.rs index 83b9ab81963933..5f2e9977a07611 100644 --- a/crates/turbopack-ecmascript/src/async_chunk/module.rs +++ b/crates/turbopack-ecmascript/src/async_chunk/module.rs @@ -1,4 +1,4 @@ -use anyhow::{Context, Result}; +use anyhow::Result; use turbo_tasks::{Value, Vc}; use turbopack_core::{ asset::{Asset, AssetContent}, @@ -8,7 +8,7 @@ use turbopack_core::{ reference::{ModuleReferences, SingleModuleReference}, }; -use crate::{async_chunk::chunk_item::AsyncLoaderChunkItem, EcmascriptChunkingContext}; +use crate::async_chunk::chunk_item::AsyncLoaderChunkItem; #[turbo_tasks::function] fn modifier() -> Vc { @@ -20,7 +20,7 @@ fn modifier() -> Vc { #[turbo_tasks::value] pub struct AsyncLoaderModule { pub inner: Vc>, - pub chunking_context: Vc>, + pub chunking_context: Vc>, pub availability_info: AvailabilityInfo, } @@ -29,7 +29,7 @@ impl AsyncLoaderModule { #[turbo_tasks::function] pub fn new( module: Vc>, - chunking_context: Vc>, + chunking_context: Vc>, availability_info: Value, ) -> Vc { Self::cell(AsyncLoaderModule { @@ -81,12 +81,6 @@ impl ChunkableModule for AsyncLoaderModule { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use AsyncLoaderModule", - )?; Ok(Vc::upcast( AsyncLoaderChunkItem { chunking_context, diff --git a/crates/turbopack-ecmascript/src/chunk/chunk_type.rs b/crates/turbopack-ecmascript/src/chunk/chunk_type.rs index cdebbb66ebe0d1..5c5f0e40563707 100644 --- a/crates/turbopack-ecmascript/src/chunk/chunk_type.rs +++ b/crates/turbopack-ecmascript/src/chunk/chunk_type.rs @@ -7,9 +7,7 @@ use turbopack_core::{ output::OutputAssets, }; -use super::{ - EcmascriptChunk, EcmascriptChunkContent, EcmascriptChunkItem, EcmascriptChunkingContext, -}; +use super::{EcmascriptChunk, EcmascriptChunkContent, EcmascriptChunkItem}; #[derive(Default)] #[turbo_tasks::value] @@ -33,8 +31,7 @@ impl ChunkType for EcmascriptChunkType { referenced_output_assets: Vc, ) -> Result>> { let Some(chunking_context) = - Vc::try_resolve_downcast::>(chunking_context) - .await? + Vc::try_resolve_downcast::>(chunking_context).await? else { bail!("Ecmascript chunking context not found"); }; diff --git a/crates/turbopack-ecmascript/src/chunk/context.rs b/crates/turbopack-ecmascript/src/chunk/context.rs deleted file mode 100644 index d558e1d701ce23..00000000000000 --- a/crates/turbopack-ecmascript/src/chunk/context.rs +++ /dev/null @@ -1,13 +0,0 @@ -use turbo_tasks::Vc; -use turbopack_core::chunk::ChunkingContext; - -/// [`EcmascriptChunkingContext`] must be implemented by [`ChunkingContext`] -/// implementors that want to operate on [`EcmascriptChunk`]s. -#[turbo_tasks::value_trait] -pub trait EcmascriptChunkingContext: ChunkingContext { - /// Whether chunk items generated by this chunking context should include - /// the `__turbopack_refresh__` argument. - fn has_react_refresh(self: Vc) -> Vc { - Vc::cell(false) - } -} diff --git a/crates/turbopack-ecmascript/src/chunk/item.rs b/crates/turbopack-ecmascript/src/chunk/item.rs index 0ff76d099be0af..672d164fd76393 100644 --- a/crates/turbopack-ecmascript/src/chunk/item.rs +++ b/crates/turbopack-ecmascript/src/chunk/item.rs @@ -12,11 +12,10 @@ use turbopack_core::{ source_map::GenerateSourceMap, }; -use super::EcmascriptChunkingContext; use crate::{ references::async_module::{AsyncModuleOptions, OptionAsyncModuleOptions}, utils::FormatIter, - EcmascriptModuleContent, + EcmascriptModuleContent, EcmascriptOptions, }; #[turbo_tasks::value(shared)] @@ -33,10 +32,11 @@ impl EcmascriptChunkItemContent { #[turbo_tasks::function] pub async fn new( content: Vc, - chunking_context: Vc>, + chunking_context: Vc>, + options: Vc, async_module_options: Vc, ) -> Result> { - let refresh = *chunking_context.has_react_refresh().await?; + let refresh = options.await?.refresh; let externals = *chunking_context .environment() .supports_commonjs_externals() @@ -197,7 +197,7 @@ pub trait EcmascriptChunkItem: ChunkItem { ) -> Vc { self.content() } - fn chunking_context(self: Vc) -> Vc>; + fn chunking_context(self: Vc) -> Vc>; /// Specifies which availablility information the chunk item needs for code /// generation diff --git a/crates/turbopack-ecmascript/src/chunk/mod.rs b/crates/turbopack-ecmascript/src/chunk/mod.rs index f85cf92b2de5d6..ca5be5b1fda280 100644 --- a/crates/turbopack-ecmascript/src/chunk/mod.rs +++ b/crates/turbopack-ecmascript/src/chunk/mod.rs @@ -1,6 +1,5 @@ pub(crate) mod chunk_type; pub(crate) mod content; -pub(crate) mod context; pub(crate) mod data; pub(crate) mod item; pub(crate) mod placeable; @@ -26,7 +25,6 @@ use turbopack_core::{ pub use self::{ chunk_type::EcmascriptChunkType, content::EcmascriptChunkContent, - context::EcmascriptChunkingContext, data::EcmascriptChunkData, item::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkItemExt, @@ -37,7 +35,7 @@ pub use self::{ #[turbo_tasks::value] pub struct EcmascriptChunk { - pub chunking_context: Vc>, + pub chunking_context: Vc>, pub content: Vc, } @@ -48,7 +46,7 @@ pub struct EcmascriptChunks(Vec>); impl EcmascriptChunk { #[turbo_tasks::function] pub async fn new( - chunking_context: Vc>, + chunking_context: Vc>, content: Vc, ) -> Result> { Ok(EcmascriptChunk { diff --git a/crates/turbopack-ecmascript/src/chunk_group_files_asset.rs b/crates/turbopack-ecmascript/src/chunk_group_files_asset.rs index c49e3318955e06..bc0904272529f0 100644 --- a/crates/turbopack-ecmascript/src/chunk_group_files_asset.rs +++ b/crates/turbopack-ecmascript/src/chunk_group_files_asset.rs @@ -1,4 +1,4 @@ -use anyhow::{Context, Result}; +use anyhow::Result; use indexmap::IndexSet; use turbo_tasks::{TryJoinIterExt, Value, ValueToString, Vc}; use turbo_tasks_fs::{File, FileSystemPath}; @@ -23,7 +23,7 @@ use turbopack_core::{ use crate::{ chunk::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkPlaceable, - EcmascriptChunkType, EcmascriptChunkingContext, EcmascriptExports, + EcmascriptChunkType, EcmascriptExports, }, utils::StringifyJs, EcmascriptModuleAsset, @@ -96,13 +96,6 @@ impl ChunkableModule for ChunkGroupFilesAsset { chunking_context: Vc>, ) -> Result>> { let this = self.await?; - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use \ - ChunkGroupFilesAsset", - )?; Ok(Vc::upcast( ChunkGroupFilesChunkItem { chunking_context, @@ -124,7 +117,7 @@ impl EcmascriptChunkPlaceable for ChunkGroupFilesAsset { #[turbo_tasks::value] struct ChunkGroupFilesChunkItem { - chunking_context: Vc>, + chunking_context: Vc>, client_root: Vc, inner: Vc, } @@ -158,7 +151,7 @@ impl ChunkGroupFilesChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for ChunkGroupFilesChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } diff --git a/crates/turbopack-ecmascript/src/code_gen.rs b/crates/turbopack-ecmascript/src/code_gen.rs index b5140ce16ed0ad..f6fbac3fd42b3b 100644 --- a/crates/turbopack-ecmascript/src/code_gen.rs +++ b/crates/turbopack-ecmascript/src/code_gen.rs @@ -1,9 +1,7 @@ use serde::{Deserialize, Serialize}; use swc_core::ecma::visit::{AstParentKind, VisitMut}; use turbo_tasks::{debug::ValueDebugFormat, trace::TraceRawVcs, Vc}; -use turbopack_core::chunk::AsyncModuleInfo; - -use crate::chunk::EcmascriptChunkingContext; +use turbopack_core::chunk::{AsyncModuleInfo, ChunkingContext}; /// impl of code generation inferred from a ModuleReference. /// This is rust only and can't be implemented by non-rust plugins. @@ -28,7 +26,7 @@ pub trait VisitorFactory: Send + Sync { pub trait CodeGenerateable { fn code_generation( self: Vc, - chunking_context: Vc>, + chunking_context: Vc>, ) -> Vc; } @@ -36,7 +34,7 @@ pub trait CodeGenerateable { pub trait CodeGenerateableWithAsyncModuleInfo { fn code_generation( self: Vc, - chunking_context: Vc>, + chunking_context: Vc>, async_module_info: Option>, ) -> Vc; } diff --git a/crates/turbopack-ecmascript/src/lib.rs b/crates/turbopack-ecmascript/src/lib.rs index 23dc8fa0fcac51..089f02cdb49f8b 100644 --- a/crates/turbopack-ecmascript/src/lib.rs +++ b/crates/turbopack-ecmascript/src/lib.rs @@ -32,8 +32,8 @@ pub mod webpack; use std::fmt::{Display, Formatter}; -use anyhow::{Context, Result}; -use chunk::{EcmascriptChunkItem, EcmascriptChunkingContext}; +use anyhow::Result; +use chunk::EcmascriptChunkItem; use code_gen::CodeGenerateable; pub use parse::ParseResultSourceMap; use parse::{parse, ParseResult}; @@ -119,9 +119,10 @@ pub enum TreeShakingMode { ReexportsOnly, } -#[turbo_tasks::value(serialization = "auto_for_input")] +#[turbo_tasks::value(shared, serialization = "auto_for_input")] #[derive(PartialOrd, Ord, Hash, Debug, Default, Copy, Clone)] pub struct EcmascriptOptions { + pub refresh: bool, /// variant of tree shaking to use pub tree_shaking_mode: Option, /// module is forced to a specific type (happens e. g. for .cjs and .mjs) @@ -196,7 +197,7 @@ pub struct EcmascriptModuleAssetBuilder { asset_context: Vc>, ty: EcmascriptModuleAssetType, transforms: Vc, - options: EcmascriptOptions, + options: Vc, compile_time_info: Vc, inner_assets: Option>, } @@ -219,7 +220,7 @@ impl EcmascriptModuleAssetBuilder { self.asset_context, Value::new(self.ty), self.transforms, - Value::new(self.options), + self.options, self.compile_time_info, inner_assets, ) @@ -229,16 +230,16 @@ impl EcmascriptModuleAssetBuilder { self.asset_context, Value::new(self.ty), self.transforms, - Value::new(self.options), + self.options, self.compile_time_info, ) } } - pub fn build_part(self, part: Vc) -> Vc { - let import_externals = self.options.import_externals; + pub async fn build_part(self, part: Vc) -> Result> { + let import_externals = self.options.await?.import_externals; let base = self.build(); - EcmascriptModulePartAsset::new(base, part, import_externals) + Ok(EcmascriptModulePartAsset::new(base, part, import_externals)) } } @@ -248,7 +249,7 @@ pub struct EcmascriptModuleAsset { pub asset_context: Vc>, pub ty: EcmascriptModuleAssetType, pub transforms: Vc, - pub options: EcmascriptOptions, + pub options: Vc, pub compile_time_info: Vc, pub inner_assets: Option>, #[turbo_tasks(debug_ignore)] @@ -269,7 +270,7 @@ impl EcmascriptModuleAsset { source: Vc>, asset_context: Vc>, transforms: Vc, - options: EcmascriptOptions, + options: Vc, compile_time_info: Vc, ) -> EcmascriptModuleAssetBuilder { EcmascriptModuleAssetBuilder { @@ -321,7 +322,7 @@ impl EcmascriptModuleAsset { asset_context: Vc>, ty: Value, transforms: Vc, - options: Value, + options: Vc, compile_time_info: Vc, ) -> Vc { Self::cell(EcmascriptModuleAsset { @@ -329,7 +330,7 @@ impl EcmascriptModuleAsset { asset_context, ty: ty.into_value(), transforms, - options: options.into_value(), + options, compile_time_info, inner_assets: None, last_successful_analysis: Default::default(), @@ -342,7 +343,7 @@ impl EcmascriptModuleAsset { asset_context: Vc>, ty: Value, transforms: Vc, - options: Value, + options: Vc, compile_time_info: Vc, inner_assets: Vc, ) -> Vc { @@ -351,7 +352,7 @@ impl EcmascriptModuleAsset { asset_context, ty: ty.into_value(), transforms, - options: options.into_value(), + options, compile_time_info, inner_assets: Some(inner_assets), last_successful_analysis: Default::default(), @@ -368,6 +369,11 @@ impl EcmascriptModuleAsset { analyse_ecmascript_module(self, None) } + #[turbo_tasks::function] + pub async fn options(self: Vc) -> Result> { + Ok(self.await?.options) + } + #[turbo_tasks::function] pub async fn failsafe_analyze(self: Vc) -> Result> { let this = self.await?; @@ -432,7 +438,7 @@ impl EcmascriptModuleAsset { pub(crate) async fn determine_module_type(self: Vc) -> Result> { let this = self.await?; - match this.options.specified_module_type { + match this.options.await?.specified_module_type { SpecifiedModuleType::EcmaScript => { return Ok(ModuleTypeResult::new(SpecifiedModuleType::EcmaScript)) } @@ -489,14 +495,14 @@ impl EcmascriptModuleAsset { Ok(EcmascriptModuleContent::new_without_analysis( parsed, self.ident(), - this.options.specified_module_type, + this.options.await?.specified_module_type, )) } #[turbo_tasks::function] pub async fn module_content( self: Vc, - chunking_context: Vc>, + chunking_context: Vc>, async_module_info: Option>, ) -> Result> { let this = self.await?; @@ -568,13 +574,6 @@ impl ChunkableModule for EcmascriptModuleAsset { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use \ - EcmascriptModuleAsset", - )?; Ok(Vc::upcast(ModuleChunkItem::cell(ModuleChunkItem { module: self, chunking_context, @@ -627,7 +626,7 @@ impl ResolveOrigin for EcmascriptModuleAsset { #[turbo_tasks::value] struct ModuleChunkItem { module: Vc, - chunking_context: Vc>, + chunking_context: Vc>, } #[turbo_tasks::value_impl] @@ -672,7 +671,7 @@ impl ChunkItem for ModuleChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for ModuleChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } @@ -705,6 +704,7 @@ impl EcmascriptChunkItem for ModuleChunkItem { Ok(EcmascriptChunkItemContent::new( content, this.chunking_context, + this.module.options(), async_module_options, )) } @@ -716,6 +716,7 @@ pub struct EcmascriptModuleContent { pub inner_code: Rope, pub source_map: Option>>, pub is_esm: bool, + // pub refresh: bool, } #[turbo_tasks::value_impl] @@ -726,7 +727,7 @@ impl EcmascriptModuleContent { parsed: Vc, ident: Vc, specified_module_type: SpecifiedModuleType, - chunking_context: Vc>, + chunking_context: Vc>, references: Vc, code_generation: Vc, async_module: Vc, diff --git a/crates/turbopack-ecmascript/src/manifest/chunk_asset.rs b/crates/turbopack-ecmascript/src/manifest/chunk_asset.rs index 14190a2eed435c..14138f4fae58b0 100644 --- a/crates/turbopack-ecmascript/src/manifest/chunk_asset.rs +++ b/crates/turbopack-ecmascript/src/manifest/chunk_asset.rs @@ -1,4 +1,4 @@ -use anyhow::{Context, Result}; +use anyhow::Result; use turbo_tasks::{Value, Vc}; use turbopack_core::{ asset::{Asset, AssetContent}, @@ -12,7 +12,7 @@ use turbopack_core::{ }; use super::chunk_item::ManifestChunkItem; -use crate::chunk::{EcmascriptChunkPlaceable, EcmascriptChunkingContext, EcmascriptExports}; +use crate::chunk::{EcmascriptChunkPlaceable, EcmascriptExports}; #[turbo_tasks::function] fn modifier() -> Vc { @@ -32,7 +32,7 @@ fn modifier() -> Vc { #[turbo_tasks::value(shared)] pub struct ManifestAsyncModule { pub inner: Vc>, - pub chunking_context: Vc>, + pub chunking_context: Vc>, pub availability_info: AvailabilityInfo, } @@ -41,7 +41,7 @@ impl ManifestAsyncModule { #[turbo_tasks::function] pub fn new( module: Vc>, - chunking_context: Vc>, + chunking_context: Vc>, availability_info: Value, ) -> Vc { Self::cell(ManifestAsyncModule { @@ -143,13 +143,6 @@ impl ChunkableModule for ManifestAsyncModule { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use \ - ManifestChunkAsset", - )?; Ok(Vc::upcast( ManifestChunkItem { chunking_context, diff --git a/crates/turbopack-ecmascript/src/manifest/chunk_item.rs b/crates/turbopack-ecmascript/src/manifest/chunk_item.rs index add3d264466880..f636df1fe729a3 100644 --- a/crates/turbopack-ecmascript/src/manifest/chunk_item.rs +++ b/crates/turbopack-ecmascript/src/manifest/chunk_item.rs @@ -12,7 +12,7 @@ use super::chunk_asset::ManifestAsyncModule; use crate::{ chunk::{ data::EcmascriptChunkData, EcmascriptChunkItem, EcmascriptChunkItemContent, - EcmascriptChunkType, EcmascriptChunkingContext, + EcmascriptChunkType, }, utils::StringifyJs, }; @@ -22,7 +22,7 @@ use crate::{ /// __turbopack_import__ the actual module that was dynamically imported. #[turbo_tasks::value(shared)] pub(super) struct ManifestChunkItem { - pub chunking_context: Vc>, + pub chunking_context: Vc>, pub manifest: Vc, } @@ -41,7 +41,7 @@ impl ManifestChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for ManifestChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } diff --git a/crates/turbopack-ecmascript/src/manifest/loader_item.rs b/crates/turbopack-ecmascript/src/manifest/loader_item.rs index 42604673c236da..4044f64485b59a 100644 --- a/crates/turbopack-ecmascript/src/manifest/loader_item.rs +++ b/crates/turbopack-ecmascript/src/manifest/loader_item.rs @@ -16,7 +16,7 @@ use super::chunk_asset::ManifestAsyncModule; use crate::{ chunk::{ data::EcmascriptChunkData, EcmascriptChunkItem, EcmascriptChunkItemContent, - EcmascriptChunkPlaceable, EcmascriptChunkType, EcmascriptChunkingContext, + EcmascriptChunkPlaceable, EcmascriptChunkType, }, utils::StringifyJs, }; @@ -145,7 +145,7 @@ impl ChunkItem for ManifestLoaderChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for ManifestLoaderChunkItem { #[turbo_tasks::function] - async fn chunking_context(&self) -> Result>> { + async fn chunking_context(&self) -> Result>> { Ok(self.manifest.await?.chunking_context) } diff --git a/crates/turbopack-ecmascript/src/references/amd.rs b/crates/turbopack-ecmascript/src/references/amd.rs index 1a804c905aeedb..255f60c7ae1ebc 100644 --- a/crates/turbopack-ecmascript/src/references/amd.rs +++ b/crates/turbopack-ecmascript/src/references/amd.rs @@ -14,7 +14,7 @@ use turbo_tasks::{ debug::ValueDebugFormat, trace::TraceRawVcs, ReadRef, TryJoinIterExt, Value, ValueToString, Vc, }; use turbopack_core::{ - chunk::ChunkableModuleReference, + chunk::{ChunkableModuleReference, ChunkingContext}, issue::IssueSource, reference::ModuleReference, resolve::{origin::ResolveOrigin, parse::Request, ModuleResolveResult}, @@ -23,7 +23,6 @@ use turbopack_resolve::ecmascript::{cjs_resolve, try_to_severity}; use super::pattern_mapping::{PatternMapping, ResolveType::ChunkItem}; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, references::AstPath, @@ -139,7 +138,7 @@ impl CodeGenerateable for AmdDefineWithDependenciesCodeGen { #[turbo_tasks::function] async fn code_generation( &self, - chunking_context: Vc>, + chunking_context: Vc>, ) -> Result> { let mut visitors = Vec::new(); diff --git a/crates/turbopack-ecmascript/src/references/async_module.rs b/crates/turbopack-ecmascript/src/references/async_module.rs index d25bb19854f839..2946d3b2032366 100644 --- a/crates/turbopack-ecmascript/src/references/async_module.rs +++ b/crates/turbopack-ecmascript/src/references/async_module.rs @@ -8,16 +8,16 @@ use swc_core::{ }; use turbo_tasks::{trace::TraceRawVcs, ReadRef, TryFlatJoinIterExt, TryJoinIterExt, Vc}; use turbopack_core::{ - chunk::{AsyncModuleInfo, ChunkableModule, ChunkableModuleReference, ChunkingType}, + chunk::{ + AsyncModuleInfo, ChunkableModule, ChunkableModuleReference, ChunkingContext, ChunkingType, + }, reference::{ModuleReference, ModuleReferences}, resolve::ExternalType, }; use super::esm::base::ReferencedAsset; use crate::{ - chunk::{EcmascriptChunkPlaceable, EcmascriptChunkingContext}, - code_gen::CodeGeneration, - create_visitor, + chunk::EcmascriptChunkPlaceable, code_gen::CodeGeneration, create_visitor, references::esm::base::insert_hoisted_stmt, }; @@ -102,7 +102,7 @@ impl AsyncModule { #[turbo_tasks::function] async fn get_async_idents( &self, - chunking_context: Vc>, + chunking_context: Vc>, async_module_info: Vc, references: Vc, ) -> Result> { @@ -199,7 +199,7 @@ impl AsyncModule { #[turbo_tasks::function] pub async fn code_generation( self: Vc, - chunking_context: Vc>, + chunking_context: Vc>, async_module_info: Option>, references: Vc, ) -> Result> { diff --git a/crates/turbopack-ecmascript/src/references/cjs.rs b/crates/turbopack-ecmascript/src/references/cjs.rs index e35df7c4f0452d..3517016954d68e 100644 --- a/crates/turbopack-ecmascript/src/references/cjs.rs +++ b/crates/turbopack-ecmascript/src/references/cjs.rs @@ -6,7 +6,7 @@ use swc_core::{ }; use turbo_tasks::{Value, ValueToString, Vc}; use turbopack_core::{ - chunk::ChunkableModuleReference, + chunk::{ChunkableModuleReference, ChunkingContext}, issue::IssueSource, reference::ModuleReference, resolve::{origin::ResolveOrigin, parse::Request, ModuleResolveResult}, @@ -15,7 +15,6 @@ use turbopack_resolve::ecmascript::{cjs_resolve, try_to_severity}; use super::pattern_mapping::{PatternMapping, ResolveType::ChunkItem}; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, references::AstPath, @@ -137,7 +136,7 @@ impl CodeGenerateable for CjsRequireAssetReference { #[turbo_tasks::function] async fn code_generation( &self, - chunking_context: Vc>, + chunking_context: Vc>, ) -> Result> { let pm = PatternMapping::resolve_request( self.request, @@ -245,7 +244,7 @@ impl CodeGenerateable for CjsRequireResolveAssetReference { #[turbo_tasks::function] async fn code_generation( &self, - chunking_context: Vc>, + chunking_context: Vc>, ) -> Result> { let pm = PatternMapping::resolve_request( self.request, @@ -306,7 +305,7 @@ impl CodeGenerateable for CjsRequireCacheAccess { #[turbo_tasks::function] async fn code_generation( &self, - _context: Vc>, + _context: Vc>, ) -> Result> { let mut visitors = Vec::new(); diff --git a/crates/turbopack-ecmascript/src/references/constant_condition.rs b/crates/turbopack-ecmascript/src/references/constant_condition.rs index b91b88d0a5a4be..17e51238d5494c 100644 --- a/crates/turbopack-ecmascript/src/references/constant_condition.rs +++ b/crates/turbopack-ecmascript/src/references/constant_condition.rs @@ -1,10 +1,10 @@ use anyhow::Result; use swc_core::quote; use turbo_tasks::{Value, Vc}; +use turbopack_core::chunk::ChunkingContext; use super::AstPath; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, }; @@ -39,7 +39,7 @@ impl CodeGenerateable for ConstantCondition { #[turbo_tasks::function] async fn code_generation( &self, - _context: Vc>, + _context: Vc>, ) -> Result> { let value = self.value; let visitors = [ diff --git a/crates/turbopack-ecmascript/src/references/constant_value.rs b/crates/turbopack-ecmascript/src/references/constant_value.rs index dc93b573b3a4e0..c2f94aeed1b621 100644 --- a/crates/turbopack-ecmascript/src/references/constant_value.rs +++ b/crates/turbopack-ecmascript/src/references/constant_value.rs @@ -1,11 +1,10 @@ use anyhow::Result; use swc_core::quote; use turbo_tasks::{Value, Vc}; -use turbopack_core::compile_time_info::CompileTimeDefineValue; +use turbopack_core::{chunk::ChunkingContext, compile_time_info::CompileTimeDefineValue}; use super::AstPath; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, }; @@ -32,7 +31,7 @@ impl CodeGenerateable for ConstantValue { #[turbo_tasks::function] async fn code_generation( &self, - _context: Vc>, + _context: Vc>, ) -> Result> { let value = self.value.clone(); let path = &self.path.await?; diff --git a/crates/turbopack-ecmascript/src/references/dynamic_expression.rs b/crates/turbopack-ecmascript/src/references/dynamic_expression.rs index 8f5e06e4840c80..6aee2d0e6e387c 100644 --- a/crates/turbopack-ecmascript/src/references/dynamic_expression.rs +++ b/crates/turbopack-ecmascript/src/references/dynamic_expression.rs @@ -2,10 +2,10 @@ use anyhow::Result; use serde::{Deserialize, Serialize}; use swc_core::quote; use turbo_tasks::{debug::ValueDebugFormat, trace::TraceRawVcs, Vc}; +use turbopack_core::chunk::ChunkingContext; use super::AstPath; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, }; @@ -46,7 +46,7 @@ impl CodeGenerateable for DynamicExpression { #[turbo_tasks::function] async fn code_generation( &self, - _context: Vc>, + _context: Vc>, ) -> Result> { let path = &self.path.await?; diff --git a/crates/turbopack-ecmascript/src/references/esm/base.rs b/crates/turbopack-ecmascript/src/references/esm/base.rs index 7c56d73cbf6655..e829ca7154f9a1 100644 --- a/crates/turbopack-ecmascript/src/references/esm/base.rs +++ b/crates/turbopack-ecmascript/src/references/esm/base.rs @@ -25,7 +25,7 @@ use turbopack_resolve::ecmascript::esm_resolve; use crate::{ analyzer::imports::ImportAnnotations, - chunk::{EcmascriptChunkPlaceable, EcmascriptChunkingContext}, + chunk::EcmascriptChunkPlaceable, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, magic_identifier, references::util::{request_to_string, throw_module_not_found_expr}, @@ -192,7 +192,7 @@ impl CodeGenerateable for EsmAssetReference { #[turbo_tasks::function] async fn code_generation( self: Vc, - chunking_context: Vc>, + chunking_context: Vc>, ) -> Result> { let mut visitors = Vec::new(); diff --git a/crates/turbopack-ecmascript/src/references/esm/binding.rs b/crates/turbopack-ecmascript/src/references/esm/binding.rs index 44d198edc8b355..3942774ae76d41 100644 --- a/crates/turbopack-ecmascript/src/references/esm/binding.rs +++ b/crates/turbopack-ecmascript/src/references/esm/binding.rs @@ -10,10 +10,10 @@ use swc_core::{ }, }; use turbo_tasks::Vc; +use turbopack_core::chunk::ChunkingContext; use super::EsmAssetReference; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, references::AstPath, @@ -49,7 +49,7 @@ impl CodeGenerateable for EsmBinding { #[turbo_tasks::function] async fn code_generation( self: Vc, - _context: Vc>, + _context: Vc>, ) -> Result> { let this = self.await?; let mut visitors = Vec::new(); diff --git a/crates/turbopack-ecmascript/src/references/esm/dynamic.rs b/crates/turbopack-ecmascript/src/references/esm/dynamic.rs index cb8f05a564b71d..2695d974d93c4a 100644 --- a/crates/turbopack-ecmascript/src/references/esm/dynamic.rs +++ b/crates/turbopack-ecmascript/src/references/esm/dynamic.rs @@ -17,7 +17,6 @@ use turbopack_resolve::ecmascript::{esm_resolve, try_to_severity}; use super::super::pattern_mapping::{PatternMapping, ResolveType}; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, references::AstPath, @@ -94,7 +93,7 @@ impl CodeGenerateable for EsmAsyncAssetReference { #[turbo_tasks::function] async fn code_generation( &self, - chunking_context: Vc>, + chunking_context: Vc>, ) -> Result> { let pm = PatternMapping::resolve_request( self.request, diff --git a/crates/turbopack-ecmascript/src/references/esm/export.rs b/crates/turbopack-ecmascript/src/references/esm/export.rs index facabf294fcba2..41807de8d19ed4 100644 --- a/crates/turbopack-ecmascript/src/references/esm/export.rs +++ b/crates/turbopack-ecmascript/src/references/esm/export.rs @@ -17,6 +17,7 @@ use swc_core::{ use turbo_tasks::{trace::TraceRawVcs, TryFlatJoinIterExt, ValueToString, Vc}; use turbo_tasks_fs::glob::Glob; use turbopack_core::{ + chunk::ChunkingContext, ident::AssetIdent, issue::{analyze::AnalyzeIssue, IssueExt, IssueSeverity, StyledString}, module::Module, @@ -25,7 +26,7 @@ use turbopack_core::{ use super::base::ReferencedAsset; use crate::{ - chunk::{EcmascriptChunkPlaceable, EcmascriptChunkingContext, EcmascriptExports}, + chunk::{EcmascriptChunkPlaceable, EcmascriptExports}, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, references::esm::base::insert_hoisted_stmt, @@ -409,7 +410,7 @@ impl CodeGenerateable for EsmExports { #[turbo_tasks::function] async fn code_generation( self: Vc, - _context: Vc>, + _context: Vc>, ) -> Result> { let mut visitors = Vec::new(); diff --git a/crates/turbopack-ecmascript/src/references/esm/meta.rs b/crates/turbopack-ecmascript/src/references/esm/meta.rs index 7a8790f21186ff..3ec0e1728d484f 100644 --- a/crates/turbopack-ecmascript/src/references/esm/meta.rs +++ b/crates/turbopack-ecmascript/src/references/esm/meta.rs @@ -8,9 +8,9 @@ use swc_core::{ }; use turbo_tasks::Vc; use turbo_tasks_fs::FileSystemPath; +use turbopack_core::chunk::ChunkingContext; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, magic_identifier, references::{as_abs_path, esm::base::insert_hoisted_stmt, AstPath}, @@ -40,7 +40,7 @@ impl CodeGenerateable for ImportMetaBinding { #[turbo_tasks::function] async fn code_generation( &self, - _context: Vc>, + _context: Vc>, ) -> Result> { let path = as_abs_path(self.path).await?.as_str().map_or_else( || { @@ -100,7 +100,7 @@ impl CodeGenerateable for ImportMetaRef { #[turbo_tasks::function] async fn code_generation( &self, - _context: Vc>, + _context: Vc>, ) -> Result> { let ast_path = &self.ast_path.await?; let visitor = create_visitor!(ast_path, visit_mut_expr(expr: &mut Expr) { diff --git a/crates/turbopack-ecmascript/src/references/esm/module_id.rs b/crates/turbopack-ecmascript/src/references/esm/module_id.rs index ab74a9ba90cc97..835a009212bcff 100644 --- a/crates/turbopack-ecmascript/src/references/esm/module_id.rs +++ b/crates/turbopack-ecmascript/src/references/esm/module_id.rs @@ -3,7 +3,8 @@ use swc_core::{ecma::ast::Expr, quote}; use turbo_tasks::{ValueToString, Vc}; use turbopack_core::{ chunk::{ - ChunkItemExt, ChunkableModule, ChunkableModuleReference, ChunkingTypeOption, ModuleId, + ChunkItemExt, ChunkableModule, ChunkableModuleReference, ChunkingContext, + ChunkingTypeOption, ModuleId, }, reference::ModuleReference, resolve::ModuleResolveResult, @@ -11,7 +12,6 @@ use turbopack_core::{ use super::{base::ReferencedAsset, EsmAssetReference}; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, references::AstPath, @@ -64,7 +64,7 @@ impl CodeGenerateable for EsmModuleIdAssetReference { #[turbo_tasks::function] async fn code_generation( &self, - chunking_context: Vc>, + chunking_context: Vc>, ) -> Result> { let mut visitors = Vec::new(); diff --git a/crates/turbopack-ecmascript/src/references/esm/module_item.rs b/crates/turbopack-ecmascript/src/references/esm/module_item.rs index 269910a7b015cc..a41ba2b5d6b2a8 100644 --- a/crates/turbopack-ecmascript/src/references/esm/module_item.rs +++ b/crates/turbopack-ecmascript/src/references/esm/module_item.rs @@ -10,9 +10,9 @@ use swc_core::{ quote, }; use turbo_tasks::Vc; +use turbopack_core::chunk::ChunkingContext; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, magic_identifier, references::AstPath, @@ -40,7 +40,7 @@ impl CodeGenerateable for EsmModuleItem { #[turbo_tasks::function] async fn code_generation( &self, - _context: Vc>, + _context: Vc>, ) -> Result> { let mut visitors = Vec::new(); diff --git a/crates/turbopack-ecmascript/src/references/esm/url.rs b/crates/turbopack-ecmascript/src/references/esm/url.rs index 97a640e982a9ca..5716fe5ec04c2b 100644 --- a/crates/turbopack-ecmascript/src/references/esm/url.rs +++ b/crates/turbopack-ecmascript/src/references/esm/url.rs @@ -6,7 +6,8 @@ use swc_core::{ use turbo_tasks::{Value, ValueToString, Vc}; use turbopack_core::{ chunk::{ - ChunkItemExt, ChunkableModule, ChunkableModuleReference, ChunkingType, ChunkingTypeOption, + ChunkItemExt, ChunkableModule, ChunkableModuleReference, ChunkingContext, ChunkingType, + ChunkingTypeOption, }, environment::Rendering, issue::IssueSource, @@ -20,7 +21,6 @@ use turbopack_resolve::ecmascript::try_to_severity; use super::base::ReferencedAsset; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, references::AstPath, @@ -142,7 +142,7 @@ impl CodeGenerateable for UrlAssetReference { #[turbo_tasks::function] async fn code_generation( self: Vc, - chunking_context: Vc>, + chunking_context: Vc>, ) -> Result> { let this = self.await?; let mut visitors = vec![]; diff --git a/crates/turbopack-ecmascript/src/references/mod.rs b/crates/turbopack-ecmascript/src/references/mod.rs index 37ec2c7953cb72..9d392edce85022 100644 --- a/crates/turbopack-ecmascript/src/references/mod.rs +++ b/crates/turbopack-ecmascript/src/references/mod.rs @@ -388,6 +388,7 @@ pub(crate) async fn analyse_ecmascript_module_internal( let transforms = raw_module.transforms; let options = raw_module.options; let compile_time_info = raw_module.compile_time_info; + let options = options.await?; let import_externals = options.import_externals; let origin = Vc::upcast::>(module); diff --git a/crates/turbopack-ecmascript/src/references/require_context.rs b/crates/turbopack-ecmascript/src/references/require_context.rs index df465c763af000..1ae94b46a65b6e 100644 --- a/crates/turbopack-ecmascript/src/references/require_context.rs +++ b/crates/turbopack-ecmascript/src/references/require_context.rs @@ -1,6 +1,6 @@ use std::{borrow::Cow, collections::VecDeque, sync::Arc}; -use anyhow::{bail, Context, Result}; +use anyhow::{bail, Result}; use indexmap::IndexMap; use swc_core::{ common::DUMMY_SP, @@ -32,8 +32,7 @@ use turbopack_resolve::ecmascript::{cjs_resolve, try_to_severity}; use crate::{ chunk::{ - EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkType, - EcmascriptChunkingContext, EcmascriptExports, + EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkType, EcmascriptExports, }, code_gen::CodeGeneration, create_visitor, @@ -280,7 +279,7 @@ impl CodeGenerateable for RequireContextAssetReference { #[turbo_tasks::function] async fn code_generation( &self, - chunking_context: Vc>, + chunking_context: Vc>, ) -> Result> { let chunk_item = self.inner.as_chunk_item(Vc::upcast(chunking_context)); let module_id = chunk_item.id().await?.clone_value(); @@ -379,13 +378,6 @@ impl ChunkableModule for RequireContextAsset { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use \ - RequireContextAsset", - )?; let this = self.await?; Ok(Vc::upcast( RequireContextChunkItem { @@ -410,7 +402,7 @@ impl EcmascriptChunkPlaceable for RequireContextAsset { #[turbo_tasks::value] pub struct RequireContextChunkItem { - chunking_context: Vc>, + chunking_context: Vc>, inner: Vc, origin: Vc>, @@ -420,7 +412,7 @@ pub struct RequireContextChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for RequireContextChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } diff --git a/crates/turbopack-ecmascript/src/references/unreachable.rs b/crates/turbopack-ecmascript/src/references/unreachable.rs index e7db8159f1ad4f..77365b0a3c527e 100644 --- a/crates/turbopack-ecmascript/src/references/unreachable.rs +++ b/crates/turbopack-ecmascript/src/references/unreachable.rs @@ -1,10 +1,10 @@ use anyhow::Result; use swc_core::quote; use turbo_tasks::Vc; +use turbopack_core::chunk::ChunkingContext; use super::AstPath; use crate::{ - chunk::EcmascriptChunkingContext, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, }; @@ -27,7 +27,7 @@ impl CodeGenerateable for Unreachable { #[turbo_tasks::function] async fn code_generation( &self, - _context: Vc>, + _context: Vc>, ) -> Result> { let path = self.path.await?; let visitors = [ diff --git a/crates/turbopack-ecmascript/src/side_effect_optimization/facade/chunk_item.rs b/crates/turbopack-ecmascript/src/side_effect_optimization/facade/chunk_item.rs index 0af193e7faec30..b6360a1b6b7808 100644 --- a/crates/turbopack-ecmascript/src/side_effect_optimization/facade/chunk_item.rs +++ b/crates/turbopack-ecmascript/src/side_effect_optimization/facade/chunk_item.rs @@ -22,8 +22,7 @@ use super::module::EcmascriptModuleFacadeModule; use crate::{ chunk::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkItemOptions, - EcmascriptChunkPlaceable, EcmascriptChunkType, EcmascriptChunkingContext, - EcmascriptExports, + EcmascriptChunkPlaceable, EcmascriptChunkType, EcmascriptExports, }, code_gen::{CodeGenerateable, CodeGenerateableWithAsyncModuleInfo}, path_visitor::ApplyVisitors, @@ -33,7 +32,7 @@ use crate::{ #[turbo_tasks::value(shared)] pub struct EcmascriptModuleFacadeChunkItem { pub(crate) module: Vc, - pub(crate) chunking_context: Vc>, + pub(crate) chunking_context: Vc>, } #[turbo_tasks::value_impl] @@ -150,7 +149,7 @@ impl EcmascriptChunkItem for EcmascriptModuleFacadeChunkItem { } #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } } diff --git a/crates/turbopack-ecmascript/src/side_effect_optimization/facade/module.rs b/crates/turbopack-ecmascript/src/side_effect_optimization/facade/module.rs index 511e9bf211cbd6..517f3093a00862 100644 --- a/crates/turbopack-ecmascript/src/side_effect_optimization/facade/module.rs +++ b/crates/turbopack-ecmascript/src/side_effect_optimization/facade/module.rs @@ -1,6 +1,6 @@ use std::collections::BTreeMap; -use anyhow::{bail, Context, Result}; +use anyhow::{bail, Result}; use turbo_tasks::Vc; use turbo_tasks_fs::{glob::Glob, File, FileContent}; use turbopack_core::{ @@ -14,7 +14,7 @@ use turbopack_core::{ use super::chunk_item::EcmascriptModuleFacadeChunkItem; use crate::{ - chunk::{EcmascriptChunkPlaceable, EcmascriptChunkingContext, EcmascriptExports}, + chunk::{EcmascriptChunkPlaceable, EcmascriptExports}, references::{ async_module::{AsyncModule, OptionAsyncModule}, esm::{EsmExport, EsmExports}, @@ -278,13 +278,6 @@ impl ChunkableModule for EcmascriptModuleFacadeModule { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use \ - EcmascriptModuleFacadeModule", - )?; Ok(Vc::upcast( EcmascriptModuleFacadeChunkItem { module: self, diff --git a/crates/turbopack-ecmascript/src/side_effect_optimization/locals/chunk_item.rs b/crates/turbopack-ecmascript/src/side_effect_optimization/locals/chunk_item.rs index eff4af09a5dc1f..84199f6c806ec2 100644 --- a/crates/turbopack-ecmascript/src/side_effect_optimization/locals/chunk_item.rs +++ b/crates/turbopack-ecmascript/src/side_effect_optimization/locals/chunk_item.rs @@ -11,7 +11,7 @@ use super::module::EcmascriptModuleLocalsModule; use crate::{ chunk::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkPlaceable, - EcmascriptChunkType, EcmascriptChunkingContext, + EcmascriptChunkType, }, EcmascriptModuleContent, }; @@ -20,7 +20,7 @@ use crate::{ #[turbo_tasks::value(shared)] pub struct EcmascriptModuleLocalsChunkItem { pub(super) module: Vc, - pub(super) chunking_context: Vc>, + pub(super) chunking_context: Vc>, } #[turbo_tasks::value_impl] @@ -63,12 +63,13 @@ impl EcmascriptChunkItem for EcmascriptModuleLocalsChunkItem { Ok(EcmascriptChunkItemContent::new( content, self.chunking_context, + original_module.await?.options, async_module_options, )) } #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } } diff --git a/crates/turbopack-ecmascript/src/side_effect_optimization/locals/module.rs b/crates/turbopack-ecmascript/src/side_effect_optimization/locals/module.rs index 98b4ff8760aa61..a733b44cb1a7e1 100644 --- a/crates/turbopack-ecmascript/src/side_effect_optimization/locals/module.rs +++ b/crates/turbopack-ecmascript/src/side_effect_optimization/locals/module.rs @@ -1,6 +1,6 @@ use std::collections::BTreeMap; -use anyhow::{bail, Context, Result}; +use anyhow::{bail, Result}; use turbo_tasks::Vc; use turbo_tasks_fs::glob::Glob; use turbopack_core::{ @@ -14,7 +14,7 @@ use turbopack_core::{ use super::chunk_item::EcmascriptModuleLocalsChunkItem; use crate::{ - chunk::{EcmascriptChunkPlaceable, EcmascriptChunkingContext, EcmascriptExports}, + chunk::{EcmascriptChunkPlaceable, EcmascriptExports}, references::{ async_module::OptionAsyncModule, esm::{EsmExport, EsmExports}, @@ -113,13 +113,6 @@ impl ChunkableModule for EcmascriptModuleLocalsModule { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use \ - EcmascriptModuleLocalsModule", - )?; Ok(Vc::upcast( EcmascriptModuleLocalsChunkItem { module: self, diff --git a/crates/turbopack-ecmascript/src/side_effect_optimization/reference.rs b/crates/turbopack-ecmascript/src/side_effect_optimization/reference.rs index 833d033876435f..8eba01e9fcc434 100644 --- a/crates/turbopack-ecmascript/src/side_effect_optimization/reference.rs +++ b/crates/turbopack-ecmascript/src/side_effect_optimization/reference.rs @@ -7,8 +7,8 @@ use swc_core::{ use turbo_tasks::{ValueToString, Vc}; use turbopack_core::{ chunk::{ - ChunkItemExt, ChunkableModule, ChunkableModuleReference, ChunkingType, ChunkingTypeOption, - ModuleId, + ChunkItemExt, ChunkableModule, ChunkableModuleReference, ChunkingContext, ChunkingType, + ChunkingTypeOption, ModuleId, }, reference::ModuleReference, resolve::{ModulePart, ModuleResolveResult}, @@ -18,7 +18,7 @@ use super::{ facade::module::EcmascriptModuleFacadeModule, locals::module::EcmascriptModuleLocalsModule, }; use crate::{ - chunk::{EcmascriptChunkPlaceable, EcmascriptChunkingContext}, + chunk::EcmascriptChunkPlaceable, code_gen::{CodeGenerateable, CodeGeneration}, create_visitor, references::esm::base::{insert_hoisted_stmt, ReferencedAsset}, @@ -110,7 +110,7 @@ impl CodeGenerateable for EcmascriptModulePartReference { #[turbo_tasks::function] async fn code_generation( self: Vc, - chunking_context: Vc>, + chunking_context: Vc>, ) -> Result> { let mut visitors = Vec::new(); diff --git a/crates/turbopack-ecmascript/src/tree_shake/asset.rs b/crates/turbopack-ecmascript/src/tree_shake/asset.rs index 294e416a6dccfd..2ee105a67be7e1 100644 --- a/crates/turbopack-ecmascript/src/tree_shake/asset.rs +++ b/crates/turbopack-ecmascript/src/tree_shake/asset.rs @@ -11,7 +11,7 @@ use turbopack_core::{ use super::{chunk_item::EcmascriptModulePartChunkItem, get_part_id, split_module, SplitResult}; use crate::{ - chunk::{EcmascriptChunkPlaceable, EcmascriptChunkingContext, EcmascriptExports}, + chunk::{EcmascriptChunkPlaceable, EcmascriptExports}, references::analyse_ecmascript_module, AnalyzeEcmascriptModuleResult, EcmascriptModuleAsset, }; @@ -122,13 +122,6 @@ impl ChunkableModule for EcmascriptModulePartAsset { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use \ - EcmascriptModulePartAsset", - )?; Ok(Vc::upcast( EcmascriptModulePartChunkItem { module: self, diff --git a/crates/turbopack-ecmascript/src/tree_shake/chunk_item.rs b/crates/turbopack-ecmascript/src/tree_shake/chunk_item.rs index a9d3d69e1cb2d3..9bd514b1d2f1f8 100644 --- a/crates/turbopack-ecmascript/src/tree_shake/chunk_item.rs +++ b/crates/turbopack-ecmascript/src/tree_shake/chunk_item.rs @@ -9,10 +9,7 @@ use turbopack_core::{ use super::{asset::EcmascriptModulePartAsset, part_of_module, split_module}; use crate::{ - chunk::{ - EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkType, - EcmascriptChunkingContext, - }, + chunk::{EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkType}, EcmascriptModuleContent, }; @@ -23,7 +20,7 @@ use crate::{ #[turbo_tasks::value(shared)] pub struct EcmascriptModulePartChunkItem { pub(super) module: Vc, - pub(super) chunking_context: Vc>, + pub(super) chunking_context: Vc>, } #[turbo_tasks::value_impl] @@ -65,12 +62,13 @@ impl EcmascriptChunkItem for EcmascriptModulePartChunkItem { Ok(EcmascriptChunkItemContent::new( content, this.chunking_context, + module.full_module.await?.options, async_module_options, )) } #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } } diff --git a/crates/turbopack-json/src/lib.rs b/crates/turbopack-json/src/lib.rs index 1a5d6885c9ba0c..244f2a2f915299 100644 --- a/crates/turbopack-json/src/lib.rs +++ b/crates/turbopack-json/src/lib.rs @@ -10,7 +10,7 @@ use std::fmt::Write; -use anyhow::{bail, Context, Error, Result}; +use anyhow::{bail, Error, Result}; use turbo_tasks::{ValueToString, Vc}; use turbo_tasks_fs::{FileContent, FileJsonContent}; use turbopack_core::{ @@ -23,7 +23,7 @@ use turbopack_core::{ }; use turbopack_ecmascript::chunk::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkPlaceable, EcmascriptChunkType, - EcmascriptChunkingContext, EcmascriptExports, + EcmascriptExports, }; #[turbo_tasks::function] @@ -67,12 +67,6 @@ impl ChunkableModule for JsonModuleAsset { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use JsonModuleAsset", - )?; Ok(Vc::upcast(JsonChunkItem::cell(JsonChunkItem { module: self, chunking_context, @@ -91,7 +85,7 @@ impl EcmascriptChunkPlaceable for JsonModuleAsset { #[turbo_tasks::value] struct JsonChunkItem { module: Vc, - chunking_context: Vc>, + chunking_context: Vc>, } #[turbo_tasks::value_impl] @@ -127,7 +121,7 @@ impl ChunkItem for JsonChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for JsonChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } diff --git a/crates/turbopack-mdx/src/lib.rs b/crates/turbopack-mdx/src/lib.rs index ad3f0447aef088..bb6163e67fd5b3 100644 --- a/crates/turbopack-mdx/src/lib.rs +++ b/crates/turbopack-mdx/src/lib.rs @@ -19,11 +19,11 @@ use turbopack_core::{ use turbopack_ecmascript::{ chunk::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkPlaceable, - EcmascriptChunkType, EcmascriptChunkingContext, EcmascriptExports, + EcmascriptChunkType, EcmascriptExports, }, references::AnalyzeEcmascriptModuleResultBuilder, AnalyzeEcmascriptModuleResult, EcmascriptInputTransforms, EcmascriptModuleAsset, - EcmascriptModuleAssetType, + EcmascriptModuleAssetType, EcmascriptOptions, }; #[turbo_tasks::function] @@ -162,7 +162,7 @@ async fn into_ecmascript_module_asset( analyze_types: false, }), this.transforms, - Value::new(Default::default()), + EcmascriptOptions::default().cell(), this.asset_context.compile_time_info(), )) } @@ -230,12 +230,6 @@ impl ChunkableModule for MdxModuleAsset { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use MdxModuleAsset", - )?; Ok(Vc::upcast(MdxChunkItem::cell(MdxChunkItem { module: self, chunking_context, @@ -267,7 +261,7 @@ impl ResolveOrigin for MdxModuleAsset { #[turbo_tasks::value] struct MdxChunkItem { module: Vc, - chunking_context: Vc>, + chunking_context: Vc>, } #[turbo_tasks::value_impl] @@ -303,7 +297,7 @@ impl ChunkItem for MdxChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for MdxChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } diff --git a/crates/turbopack-nodejs/src/chunking_context.rs b/crates/turbopack-nodejs/src/chunking_context.rs index 5cef2a88ee02f5..438c8dc7eb6245 100644 --- a/crates/turbopack-nodejs/src/chunking_context.rs +++ b/crates/turbopack-nodejs/src/chunking_context.rs @@ -18,7 +18,7 @@ use turbopack_core::{ }; use turbopack_ecmascript::{ async_chunk::module::AsyncLoaderModule, - chunk::{EcmascriptChunk, EcmascriptChunkPlaceable, EcmascriptChunkingContext}, + chunk::{EcmascriptChunk, EcmascriptChunkPlaceable}, manifest::{chunk_asset::ManifestAsyncModule, loader_item::ManifestLoaderChunkItem}, }; use turbopack_ecmascript_runtime::RuntimeType; @@ -377,6 +377,3 @@ impl ChunkingContext for NodeJsChunkingContext { }) } } - -#[turbo_tasks::value_impl] -impl EcmascriptChunkingContext for NodeJsChunkingContext {} diff --git a/crates/turbopack-static/src/lib.rs b/crates/turbopack-static/src/lib.rs index 6f2a917628e5fb..b135d951f7a06d 100644 --- a/crates/turbopack-static/src/lib.rs +++ b/crates/turbopack-static/src/lib.rs @@ -14,7 +14,7 @@ pub mod fixed; pub mod output_asset; -use anyhow::{Context, Result}; +use anyhow::Result; use turbo_tasks::{ValueToString, Vc}; use turbopack_core::{ asset::{Asset, AssetContent}, @@ -30,7 +30,7 @@ use turbopack_css::embed::CssEmbed; use turbopack_ecmascript::{ chunk::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkPlaceable, - EcmascriptChunkType, EcmascriptChunkingContext, EcmascriptExports, + EcmascriptChunkType, EcmascriptExports, }, utils::StringifyJs, }; @@ -94,12 +94,6 @@ impl ChunkableModule for StaticModuleAsset { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use StaticModuleAsset", - )?; Ok(Vc::upcast(ModuleChunkItem::cell(ModuleChunkItem { module: self, chunking_context, @@ -119,7 +113,7 @@ impl EcmascriptChunkPlaceable for StaticModuleAsset { #[turbo_tasks::value] struct ModuleChunkItem { module: Vc, - chunking_context: Vc>, + chunking_context: Vc>, static_asset: Vc, } @@ -162,7 +156,7 @@ impl ChunkItem for ModuleChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for ModuleChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } diff --git a/crates/turbopack-tests/tests/snapshot/basic/async_chunk/output/crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_4437c1._.js b/crates/turbopack-tests/tests/snapshot/basic/async_chunk/output/crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_4437c1._.js index ea12418a687d64..6c83a63ecb9063 100644 --- a/crates/turbopack-tests/tests/snapshot/basic/async_chunk/output/crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_4437c1._.js +++ b/crates/turbopack-tests/tests/snapshot/basic/async_chunk/output/crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_4437c1._.js @@ -1,11 +1,11 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_4437c1._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/shared.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/shared.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { // shared package }.call(this) }), -"[project]/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -20,7 +20,7 @@ __turbopack_require__("[project]/crates/turbopack-tests/tests/snapshot/basic/asy }); })()), -"[project]/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/node_modules/bar/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/node_modules/bar/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/basic/async_chunk/output/crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_aea885._.js b/crates/turbopack-tests/tests/snapshot/basic/async_chunk/output/crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_aea885._.js index a47747b6e742e6..fbd4b11f870cc5 100644 --- a/crates/turbopack-tests/tests/snapshot/basic/async_chunk/output/crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_aea885._.js +++ b/crates/turbopack-tests/tests/snapshot/basic/async_chunk/output/crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_aea885._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_aea885._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/import.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/import.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -15,7 +15,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests (0, __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$async_chunk$2f$input$2f$node_modules$2f$bar$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__["bar"])(true); })()), -"[project]/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/node_modules/foo/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/node_modules/foo/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/basic/chunked/output/crates_turbopack-tests_tests_snapshot_basic_chunked_input_09b9a1._.js b/crates/turbopack-tests/tests/snapshot/basic/chunked/output/crates_turbopack-tests_tests_snapshot_basic_chunked_input_09b9a1._.js index 65c014415ac64c..589b94493d7a12 100644 --- a/crates/turbopack-tests/tests/snapshot/basic/chunked/output/crates_turbopack-tests_tests_snapshot_basic_chunked_input_09b9a1._.js +++ b/crates/turbopack-tests/tests/snapshot/basic/chunked/output/crates_turbopack-tests_tests_snapshot_basic_chunked_input_09b9a1._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_basic_chunked_input_09b9a1._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/basic/chunked/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/chunked/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -10,7 +10,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests (0, __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$chunked$2f$input$2f$node_modules$2f$foo$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__["foo"])(true); })()), -"[project]/crates/turbopack-tests/tests/snapshot/basic/chunked/input/node_modules/foo/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/chunked/input/node_modules/foo/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/basic/shebang/output/crates_turbopack-tests_tests_snapshot_basic_shebang_input_a87633._.js b/crates/turbopack-tests/tests/snapshot/basic/shebang/output/crates_turbopack-tests_tests_snapshot_basic_shebang_input_a87633._.js index 4299ade38bc8d4..09a17c27ac064b 100644 --- a/crates/turbopack-tests/tests/snapshot/basic/shebang/output/crates_turbopack-tests_tests_snapshot_basic_shebang_input_a87633._.js +++ b/crates/turbopack-tests/tests/snapshot/basic/shebang/output/crates_turbopack-tests_tests_snapshot_basic_shebang_input_a87633._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_basic_shebang_input_a87633._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/basic/shebang/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/shebang/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -10,7 +10,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests (0, __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$shebang$2f$input$2f$node_modules$2f$foo$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__["foo"])(true); })()), -"[project]/crates/turbopack-tests/tests/snapshot/basic/shebang/input/node_modules/foo/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/shebang/input/node_modules/foo/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/basic/top-level-await/output/crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_3adb52._.js b/crates/turbopack-tests/tests/snapshot/basic/top-level-await/output/crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_3adb52._.js index 8203bd4f61d2cf..48d673772bf3b1 100644 --- a/crates/turbopack-tests/tests/snapshot/basic/top-level-await/output/crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_3adb52._.js +++ b/crates/turbopack-tests/tests/snapshot/basic/top-level-await/output/crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_3adb52._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_3adb52._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/Actions.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/Actions.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; // import() doesn't care about whether a module is an async module or not @@ -22,7 +22,7 @@ const AlternativeCreateUserAction = async (name)=>{ // except in rare cases. It will import modules sequentially. })()), -"[project]/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/basic/top-level-await/output/crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_e71653._.js b/crates/turbopack-tests/tests/snapshot/basic/top-level-await/output/crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_e71653._.js index 535f8981ea638e..70d45d918335d9 100644 --- a/crates/turbopack-tests/tests/snapshot/basic/top-level-await/output/crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_e71653._.js +++ b/crates/turbopack-tests/tests/snapshot/basic/top-level-await/output/crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_e71653._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_e71653._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/db-connection.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, a: __turbopack_async_module__, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/db-connection.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, a: __turbopack_async_module__ }) => (() => { "use strict"; __turbopack_async_module__(async (__turbopack_handle_async_dependencies__, __turbopack_async_result__) => { try { @@ -26,7 +26,7 @@ const close = ()=>{ __turbopack_async_result__(); } catch(e) { __turbopack_async_result__(e); } }, true); })()), -"[project]/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/UserAPI.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, a: __turbopack_async_module__, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/UserAPI.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, a: __turbopack_async_module__ }) => (() => { "use strict"; __turbopack_async_module__(async (__turbopack_handle_async_dependencies__, __turbopack_async_result__) => { try { diff --git a/crates/turbopack-tests/tests/snapshot/comptime/define/output/crates_turbopack-tests_tests_snapshot_comptime_define_input_index_49857f.js b/crates/turbopack-tests/tests/snapshot/comptime/define/output/crates_turbopack-tests_tests_snapshot_comptime_define_input_index_49857f.js index 105c42521900f6..5ba3ec6877d0ce 100644 --- a/crates/turbopack-tests/tests/snapshot/comptime/define/output/crates_turbopack-tests_tests_snapshot_comptime_define_input_index_49857f.js +++ b/crates/turbopack-tests/tests/snapshot/comptime/define/output/crates_turbopack-tests_tests_snapshot_comptime_define_input_index_49857f.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_comptime_define_input_index_49857f.js", { -"[project]/crates/turbopack-tests/tests/snapshot/comptime/define/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/comptime/define/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { if ("TURBOPACK compile-time truthy", 1) { console.log('DEFINED_VALUE'); diff --git a/crates/turbopack-tests/tests/snapshot/css/absolute-uri-import/output/crates_turbopack-tests_tests_snapshot_css_absolute-uri-import_input_index_0e8055.js b/crates/turbopack-tests/tests/snapshot/css/absolute-uri-import/output/crates_turbopack-tests_tests_snapshot_css_absolute-uri-import_input_index_0e8055.js index b126bb6432a7fb..ba94954aa8b20b 100644 --- a/crates/turbopack-tests/tests/snapshot/css/absolute-uri-import/output/crates_turbopack-tests_tests_snapshot_css_absolute-uri-import_input_index_0e8055.js +++ b/crates/turbopack-tests/tests/snapshot/css/absolute-uri-import/output/crates_turbopack-tests_tests_snapshot_css_absolute-uri-import_input_index_0e8055.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_css_absolute-uri-import_input_index_0e8055.js", { -"[project]/crates/turbopack-tests/tests/snapshot/css/absolute-uri-import/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/css/absolute-uri-import/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); ; diff --git a/crates/turbopack-tests/tests/snapshot/css/chained-attributes/output/crates_turbopack-tests_tests_snapshot_css_chained-attributes_input_index_356166.js b/crates/turbopack-tests/tests/snapshot/css/chained-attributes/output/crates_turbopack-tests_tests_snapshot_css_chained-attributes_input_index_356166.js index 0d512981faad87..663718f36b3f5c 100644 --- a/crates/turbopack-tests/tests/snapshot/css/chained-attributes/output/crates_turbopack-tests_tests_snapshot_css_chained-attributes_input_index_356166.js +++ b/crates/turbopack-tests/tests/snapshot/css/chained-attributes/output/crates_turbopack-tests_tests_snapshot_css_chained-attributes_input_index_356166.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_css_chained-attributes_input_index_356166.js", { -"[project]/crates/turbopack-tests/tests/snapshot/css/chained-attributes/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/css/chained-attributes/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); ; diff --git a/crates/turbopack-tests/tests/snapshot/css/css-legacy-nesting/output/crates_turbopack-tests_tests_snapshot_css_css-legacy-nesting_input_index_8e60f2.js b/crates/turbopack-tests/tests/snapshot/css/css-legacy-nesting/output/crates_turbopack-tests_tests_snapshot_css_css-legacy-nesting_input_index_8e60f2.js index bb05fbb795fea5..b93bcd884ca826 100644 --- a/crates/turbopack-tests/tests/snapshot/css/css-legacy-nesting/output/crates_turbopack-tests_tests_snapshot_css_css-legacy-nesting_input_index_8e60f2.js +++ b/crates/turbopack-tests/tests/snapshot/css/css-legacy-nesting/output/crates_turbopack-tests_tests_snapshot_css_css-legacy-nesting_input_index_8e60f2.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_css_css-legacy-nesting_input_index_8e60f2.js", { -"[project]/crates/turbopack-tests/tests/snapshot/css/css-legacy-nesting/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/css/css-legacy-nesting/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); ; diff --git a/crates/turbopack-tests/tests/snapshot/css/css-modules/output/crates_turbopack-tests_tests_snapshot_css_css-modules_input_8abc52._.js b/crates/turbopack-tests/tests/snapshot/css/css-modules/output/crates_turbopack-tests_tests_snapshot_css_css-modules_input_8abc52._.js index d19cb4e50c55f9..f35bc3201e0e79 100644 --- a/crates/turbopack-tests/tests/snapshot/css/css-modules/output/crates_turbopack-tests_tests_snapshot_css_css-modules_input_8abc52._.js +++ b/crates/turbopack-tests/tests/snapshot/css/css-modules/output/crates_turbopack-tests_tests_snapshot_css_css-modules_input_8abc52._.js @@ -12,7 +12,7 @@ __turbopack_export_value__({ }); })()), -"[project]/crates/turbopack-tests/tests/snapshot/css/css-modules/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/css/css-modules/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/css/css/output/crates_turbopack-tests_tests_snapshot_css_css_input_34944c._.js b/crates/turbopack-tests/tests/snapshot/css/css/output/crates_turbopack-tests_tests_snapshot_css_css_input_34944c._.js index 544235438cd0bc..f5c0737341f90a 100644 --- a/crates/turbopack-tests/tests/snapshot/css/css/output/crates_turbopack-tests_tests_snapshot_css_css_input_34944c._.js +++ b/crates/turbopack-tests/tests/snapshot/css/css/output/crates_turbopack-tests_tests_snapshot_css_css_input_34944c._.js @@ -10,7 +10,7 @@ __turbopack_export_value__({ }); })()), -"[project]/crates/turbopack-tests/tests/snapshot/css/css/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/css/css/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/css/relative-uri-import/output/crates_turbopack-tests_tests_snapshot_css_relative-uri-import_input_index_c2ad30.js b/crates/turbopack-tests/tests/snapshot/css/relative-uri-import/output/crates_turbopack-tests_tests_snapshot_css_relative-uri-import_input_index_c2ad30.js index e18d3fa0e0479b..8157d0dabdba15 100644 --- a/crates/turbopack-tests/tests/snapshot/css/relative-uri-import/output/crates_turbopack-tests_tests_snapshot_css_relative-uri-import_input_index_c2ad30.js +++ b/crates/turbopack-tests/tests/snapshot/css/relative-uri-import/output/crates_turbopack-tests_tests_snapshot_css_relative-uri-import_input_index_c2ad30.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_css_relative-uri-import_input_index_c2ad30.js", { -"[project]/crates/turbopack-tests/tests/snapshot/css/relative-uri-import/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/css/relative-uri-import/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); ; diff --git a/crates/turbopack-tests/tests/snapshot/css/url-in-supports-query/output/79fb1_turbopack-tests_tests_snapshot_css_url-in-supports-query_input_index_c70a2c.js b/crates/turbopack-tests/tests/snapshot/css/url-in-supports-query/output/79fb1_turbopack-tests_tests_snapshot_css_url-in-supports-query_input_index_c70a2c.js index f653cff03513a4..b5829da128ecc5 100644 --- a/crates/turbopack-tests/tests/snapshot/css/url-in-supports-query/output/79fb1_turbopack-tests_tests_snapshot_css_url-in-supports-query_input_index_c70a2c.js +++ b/crates/turbopack-tests/tests/snapshot/css/url-in-supports-query/output/79fb1_turbopack-tests_tests_snapshot_css_url-in-supports-query_input_index_c70a2c.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/79fb1_turbopack-tests_tests_snapshot_css_url-in-supports-query_input_index_c70a2c.js", { -"[project]/crates/turbopack-tests/tests/snapshot/css/url-in-supports-query/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/css/url-in-supports-query/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); ; diff --git a/crates/turbopack-tests/tests/snapshot/cssmodules/composes/output/crates_turbopack-tests_tests_snapshot_cssmodules_composes_input_2ba052._.js b/crates/turbopack-tests/tests/snapshot/cssmodules/composes/output/crates_turbopack-tests_tests_snapshot_cssmodules_composes_input_2ba052._.js index ee24592b320a09..b6bf94049acaaf 100644 --- a/crates/turbopack-tests/tests/snapshot/cssmodules/composes/output/crates_turbopack-tests_tests_snapshot_cssmodules_composes_input_2ba052._.js +++ b/crates/turbopack-tests/tests/snapshot/cssmodules/composes/output/crates_turbopack-tests_tests_snapshot_cssmodules_composes_input_2ba052._.js @@ -8,7 +8,7 @@ __turbopack_export_value__({ }); })()), -"[project]/crates/turbopack-tests/tests/snapshot/cssmodules/composes/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/cssmodules/composes/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/cssmodules/relative-uri-import/output/79fb1_turbopack-tests_tests_snapshot_cssmodules_relative-uri-import_input_f065a6._.js b/crates/turbopack-tests/tests/snapshot/cssmodules/relative-uri-import/output/79fb1_turbopack-tests_tests_snapshot_cssmodules_relative-uri-import_input_f065a6._.js index f8bb19202920df..c111dc96f6d1a2 100644 --- a/crates/turbopack-tests/tests/snapshot/cssmodules/relative-uri-import/output/79fb1_turbopack-tests_tests_snapshot_cssmodules_relative-uri-import_input_f065a6._.js +++ b/crates/turbopack-tests/tests/snapshot/cssmodules/relative-uri-import/output/79fb1_turbopack-tests_tests_snapshot_cssmodules_relative-uri-import_input_f065a6._.js @@ -14,7 +14,7 @@ __turbopack_export_value__({ }); })()), -"[project]/crates/turbopack-tests/tests/snapshot/cssmodules/relative-uri-import/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/cssmodules/relative-uri-import/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/dynamic-request/very-dynamic/output/79fb1_turbopack-tests_tests_snapshot_dynamic-request_very-dynamic_input_index_0d92c3.js b/crates/turbopack-tests/tests/snapshot/dynamic-request/very-dynamic/output/79fb1_turbopack-tests_tests_snapshot_dynamic-request_very-dynamic_input_index_0d92c3.js index 0d76aca2628b29..fd67efa012ecdb 100644 --- a/crates/turbopack-tests/tests/snapshot/dynamic-request/very-dynamic/output/79fb1_turbopack-tests_tests_snapshot_dynamic-request_very-dynamic_input_index_0d92c3.js +++ b/crates/turbopack-tests/tests/snapshot/dynamic-request/very-dynamic/output/79fb1_turbopack-tests_tests_snapshot_dynamic-request_very-dynamic_input_index_0d92c3.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/79fb1_turbopack-tests_tests_snapshot_dynamic-request_very-dynamic_input_index_0d92c3.js", { -"[project]/crates/turbopack-tests/tests/snapshot/dynamic-request/very-dynamic/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/dynamic-request/very-dynamic/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__ }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/emotion/emotion/output/crates_turbopack-tests_tests_snapshot_b36339._.js b/crates/turbopack-tests/tests/snapshot/emotion/emotion/output/crates_turbopack-tests_tests_snapshot_b36339._.js index 1bb656791d4e7e..7e35bb31cc053f 100644 --- a/crates/turbopack-tests/tests/snapshot/emotion/emotion/output/crates_turbopack-tests_tests_snapshot_b36339._.js +++ b/crates/turbopack-tests/tests/snapshot/emotion/emotion/output/crates_turbopack-tests_tests_snapshot_b36339._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_b36339._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/emotion/emotion/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/emotion/emotion/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; /** @jsxImportSource @emotion/react */ __turbopack_esm__({}); @@ -29,19 +29,19 @@ function ClassNameButton({ children }) { console.log(StyledButton, ClassNameButton); })()), -"[project]/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/jsx-dev-runtime.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/jsx-dev-runtime.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { "purposefully empty stub"; "@emtion/react/jsx-dev-runtime.js"; }.call(this) }), -"[project]/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { "purposefully empty stub"; "@emtion/react/index.js"; }.call(this) }), -"[project]/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { "purposefully empty stub"; "@emtion/styled/index.js"; diff --git a/crates/turbopack-tests/tests/snapshot/env/env/output/crates_turbopack-tests_tests_snapshot_env_env_input_673035._.js b/crates/turbopack-tests/tests/snapshot/env/env/output/crates_turbopack-tests_tests_snapshot_env_env_input_673035._.js index 0ed19d47a87879..cc481128b117c8 100644 --- a/crates/turbopack-tests/tests/snapshot/env/env/output/crates_turbopack-tests_tests_snapshot_env_env_input_673035._.js +++ b/crates/turbopack-tests/tests/snapshot/env/env/output/crates_turbopack-tests_tests_snapshot_env_env_input_673035._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_env_env_input_673035._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/env/env/input/.env/.env.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/env/env/input/.env/.env.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { const env = process.env = { ...process.env @@ -11,7 +11,7 @@ env["FOO"] = foo; env["FOOBAR"] = foobar; }.call(this) }), -"[project]/crates/turbopack-tests/tests/snapshot/env/env/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/env/env/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { console.log(process.env.FOOBAR); console.log(process.env.BARFOO); diff --git a/crates/turbopack-tests/tests/snapshot/evaluated_entrry/runtime_entry/output/a587c_tests_snapshot_evaluated_entrry_runtime_entry_input_index_97d560.js b/crates/turbopack-tests/tests/snapshot/evaluated_entrry/runtime_entry/output/a587c_tests_snapshot_evaluated_entrry_runtime_entry_input_index_97d560.js index d1eecd8422d710..3ee4945ac8c12c 100644 --- a/crates/turbopack-tests/tests/snapshot/evaluated_entrry/runtime_entry/output/a587c_tests_snapshot_evaluated_entrry_runtime_entry_input_index_97d560.js +++ b/crates/turbopack-tests/tests/snapshot/evaluated_entrry/runtime_entry/output/a587c_tests_snapshot_evaluated_entrry_runtime_entry_input_index_97d560.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/a587c_tests_snapshot_evaluated_entrry_runtime_entry_input_index_97d560.js", { -"[project]/crates/turbopack-tests/tests/snapshot/evaluated_entrry/runtime_entry/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/evaluated_entrry/runtime_entry/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { console.log("hello world"); diff --git a/crates/turbopack-tests/tests/snapshot/example/example/output/crates_turbopack-tests_tests_snapshot_example_example_input_index_838420.js b/crates/turbopack-tests/tests/snapshot/example/example/output/crates_turbopack-tests_tests_snapshot_example_example_input_index_838420.js index 51fb1cc30cf164..cd3d30bb2a80d0 100644 --- a/crates/turbopack-tests/tests/snapshot/example/example/output/crates_turbopack-tests_tests_snapshot_example_example_input_index_838420.js +++ b/crates/turbopack-tests/tests/snapshot/example/example/output/crates_turbopack-tests_tests_snapshot_example_example_input_index_838420.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_example_example_input_index_838420.js", { -"[project]/crates/turbopack-tests/tests/snapshot/example/example/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/example/example/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { console.log("hello world"); diff --git a/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/output/crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_2c57a6._.js b/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/output/crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_2c57a6._.js index 1399972b89ac3c..f41bd8ed975280 100644 --- a/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/output/crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_2c57a6._.js +++ b/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/output/crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_2c57a6._.js @@ -1,12 +1,12 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_2c57a6._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { // commonjs.js exports.hello = "World"; }.call(this) }), -"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/c.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/c.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; // c.js @@ -18,7 +18,7 @@ __turbopack_dynamic__(__TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$ // This would be handled by existing logic })()), -"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; // b.js @@ -31,7 +31,7 @@ __turbopack_dynamic__(__TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$ // as there are properties dynamically added by __turbopack__cjs__ in c.js })()), -"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; // a.js diff --git a/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/output/crates_turbopack-tests_tests_snapshot_export-alls_cjs-script_input_ffd38d._.js b/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/output/crates_turbopack-tests_tests_snapshot_export-alls_cjs-script_input_ffd38d._.js index f95a3659043199..5d84368b21c58a 100644 --- a/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/output/crates_turbopack-tests_tests_snapshot_export-alls_cjs-script_input_ffd38d._.js +++ b/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/output/crates_turbopack-tests_tests_snapshot_export-alls_cjs-script_input_ffd38d._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_export-alls_cjs-script_input_ffd38d._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/exported.cjs [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/exported.cjs [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { module.exports = { foo: 1, @@ -8,7 +8,7 @@ module.exports = { }; }.call(this) }), -"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/mod.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/mod.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -19,7 +19,7 @@ __turbopack_dynamic__(__TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$ console.log('Hoist test'); })()), -"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/import-meta/cjs/output/crates_turbopack-tests_tests_snapshot_import-meta_cjs_input_44576c._.js b/crates/turbopack-tests/tests/snapshot/import-meta/cjs/output/crates_turbopack-tests_tests_snapshot_import-meta_cjs_input_44576c._.js index 7642a839afe740..518bc5119cadd0 100644 --- a/crates/turbopack-tests/tests/snapshot/import-meta/cjs/output/crates_turbopack-tests_tests_snapshot_import-meta_cjs_input_44576c._.js +++ b/crates/turbopack-tests/tests/snapshot/import-meta/cjs/output/crates_turbopack-tests_tests_snapshot_import-meta_cjs_input_44576c._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_import-meta_cjs_input_44576c._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/mod.cjs [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/mod.cjs [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { const __TURBOPACK__import$2e$meta__ = { get url () { @@ -11,7 +11,7 @@ const __TURBOPACK__import$2e$meta__ = { console.log(__TURBOPACK__import$2e$meta__.url); }.call(this) }), -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$cjs$2f$input$2f$mod$2e$cjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/mod.cjs [test] (ecmascript)"); diff --git a/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-multiple_input_b94ed5._.js b/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-multiple_input_b94ed5._.js index 4c1ce06715b79d..ff8af0da07be5c 100644 --- a/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-multiple_input_b94ed5._.js +++ b/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-multiple_input_b94ed5._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_import-meta_esm-multiple_input_b94ed5._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/input/mod.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/input/mod.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -20,7 +20,7 @@ foo(); bar(); })()), -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$esm$2d$multiple$2f$input$2f$mod$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/input/mod.mjs [test] (ecmascript)"); diff --git a/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-mutable_input_f730df._.js b/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-mutable_input_f730df._.js index 7e8d56666e3f2f..0d1bccb16cd072 100644 --- a/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-mutable_input_f730df._.js +++ b/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-mutable_input_f730df._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_import-meta_esm-mutable_input_f730df._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/input/mod.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/input/mod.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -13,7 +13,7 @@ const __TURBOPACK__import$2e$meta__ = { __TURBOPACK__import$2e$meta__.foo = 1; })()), -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$esm$2d$mutable$2f$input$2f$mod$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/input/mod.mjs [test] (ecmascript)"); diff --git a/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-object_input_51cbdd._.js b/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-object_input_51cbdd._.js index 3b1aaf498d36ff..f88f6b8b174a90 100644 --- a/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-object_input_51cbdd._.js +++ b/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/output/crates_turbopack-tests_tests_snapshot_import-meta_esm-object_input_51cbdd._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_import-meta_esm-object_input_51cbdd._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/input/mod.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/input/mod.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -13,7 +13,7 @@ const __TURBOPACK__import$2e$meta__ = { console.log(__TURBOPACK__import$2e$meta__); })()), -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$esm$2d$object$2f$input$2f$mod$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/input/mod.mjs [test] (ecmascript)"); diff --git a/crates/turbopack-tests/tests/snapshot/import-meta/esm/output/crates_turbopack-tests_tests_snapshot_import-meta_esm_input_5f2592._.js b/crates/turbopack-tests/tests/snapshot/import-meta/esm/output/crates_turbopack-tests_tests_snapshot_import-meta_esm_input_5f2592._.js index f03dd4778579b9..4efa689fcd239f 100644 --- a/crates/turbopack-tests/tests/snapshot/import-meta/esm/output/crates_turbopack-tests_tests_snapshot_import-meta_esm_input_5f2592._.js +++ b/crates/turbopack-tests/tests/snapshot/import-meta/esm/output/crates_turbopack-tests_tests_snapshot_import-meta_esm_input_5f2592._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_import-meta_esm_input_5f2592._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm/input/mod.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm/input/mod.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -13,7 +13,7 @@ const __TURBOPACK__import$2e$meta__ = { console.log(__TURBOPACK__import$2e$meta__.url); })()), -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$esm$2f$input$2f$mod$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/crates/turbopack-tests/tests/snapshot/import-meta/esm/input/mod.mjs [test] (ecmascript)"); diff --git a/crates/turbopack-tests/tests/snapshot/import-meta/url/output/crates_turbopack-tests_tests_snapshot_import-meta_url_input_9b6f5c._.js b/crates/turbopack-tests/tests/snapshot/import-meta/url/output/crates_turbopack-tests_tests_snapshot_import-meta_url_input_9b6f5c._.js index 68ab1cc9d1d6b6..ba6d48e54ae3a5 100644 --- a/crates/turbopack-tests/tests/snapshot/import-meta/url/output/crates_turbopack-tests_tests_snapshot_import-meta_url_input_9b6f5c._.js +++ b/crates/turbopack-tests/tests/snapshot/import-meta/url/output/crates_turbopack-tests_tests_snapshot_import-meta_url_input_9b6f5c._.js @@ -4,7 +4,7 @@ __turbopack_export_value__("/static/asset.05254cf2.txt"); })()), -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/url/input/mod.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/url/input/mod.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -19,7 +19,7 @@ console.log(assetUrl); fetch(assetUrl).then((res)=>res.text()).then(console.log); })()), -"[project]/crates/turbopack-tests/tests/snapshot/import-meta/url/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/import-meta/url/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_esm__({}); var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$url$2f$input$2f$mod$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/crates/turbopack-tests/tests/snapshot/import-meta/url/input/mod.mjs [test] (ecmascript)"); diff --git a/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/output/crates_turbopack-tests_tests_snapshot_imports_duplicate-binding_input_9ca1ac._.js b/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/output/crates_turbopack-tests_tests_snapshot_imports_duplicate-binding_input_9ca1ac._.js index d28ac303209f46..efa5e92b6d8371 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/output/crates_turbopack-tests_tests_snapshot_imports_duplicate-binding_input_9ca1ac._.js +++ b/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/output/crates_turbopack-tests_tests_snapshot_imports_duplicate-binding_input_9ca1ac._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_imports_duplicate-binding_input_9ca1ac._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/input/table.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/input/table.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -11,7 +11,7 @@ const Table = ()=>{ }; })()), -"[project]/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/imports/dynamic/output/crates_turbopack-tests_tests_snapshot_imports_dynamic_input_index_5ee1a4.js b/crates/turbopack-tests/tests/snapshot/imports/dynamic/output/crates_turbopack-tests_tests_snapshot_imports_dynamic_input_index_5ee1a4.js index ae0c33805279da..38f0c13f2007bf 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/dynamic/output/crates_turbopack-tests_tests_snapshot_imports_dynamic_input_index_5ee1a4.js +++ b/crates/turbopack-tests/tests/snapshot/imports/dynamic/output/crates_turbopack-tests_tests_snapshot_imports_dynamic_input_index_5ee1a4.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_imports_dynamic_input_index_5ee1a4.js", { -"[project]/crates/turbopack-tests/tests/snapshot/imports/dynamic/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/imports/dynamic/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { __turbopack_require__("[project]/crates/turbopack-tests/tests/snapshot/imports/dynamic/input/vercel.mjs [test] (ecmascript, async loader)")(__turbopack_import__).then(console.log); diff --git a/crates/turbopack-tests/tests/snapshot/imports/dynamic/output/crates_turbopack-tests_tests_snapshot_imports_dynamic_input_vercel_mjs_18521c._.js b/crates/turbopack-tests/tests/snapshot/imports/dynamic/output/crates_turbopack-tests_tests_snapshot_imports_dynamic_input_vercel_mjs_18521c._.js index dcf9a5cec3e3fb..3dc2389de4d87b 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/dynamic/output/crates_turbopack-tests_tests_snapshot_imports_dynamic_input_vercel_mjs_18521c._.js +++ b/crates/turbopack-tests/tests/snapshot/imports/dynamic/output/crates_turbopack-tests_tests_snapshot_imports_dynamic_input_vercel_mjs_18521c._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_imports_dynamic_input_vercel_mjs_18521c._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/imports/dynamic/input/vercel.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/dynamic/input/vercel.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/imports/json/output/crates_turbopack-tests_tests_snapshot_imports_json_input_22bb62._.js b/crates/turbopack-tests/tests/snapshot/imports/json/output/crates_turbopack-tests_tests_snapshot_imports_json_input_22bb62._.js index c79559cf59e96a..81aaeb6bb53caf 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/json/output/crates_turbopack-tests_tests_snapshot_imports_json_input_22bb62._.js +++ b/crates/turbopack-tests/tests/snapshot/imports/json/output/crates_turbopack-tests_tests_snapshot_imports_json_input_22bb62._.js @@ -9,7 +9,7 @@ __turbopack_export_value__(JSON.parse("{\"name\":\"json-snapshot\"}")); throw new Error("An error occurred while generating the chunk item [project]/crates/turbopack-tests/tests/snapshot/imports/json/input/invalid.json (json)\n\nCaused by:\n- Unable to make a module from invalid JSON: expected `,` or `}` at line 3 column 26\n\nDebug info:\n- An error occurred while generating the chunk item [project]/crates/turbopack-tests/tests/snapshot/imports/json/input/invalid.json (json)\n- Execution of EcmascriptChunkItemContent::module_factory failed\n- Execution of ::content failed\n- Unable to make a module from invalid JSON: expected `,` or `}` at line 3 column 26\n at nested.?\n 1 | {\n 2 | \"nested\": {\n | v\n 3 + \"this-is\": \"invalid\" // lint-staged will remove trailing commas, so here's a comment\n | ^\n 4 | }\n 5 | }"); }}), -"[project]/crates/turbopack-tests/tests/snapshot/imports/json/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/json/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/imports/order/output/crates_turbopack-tests_tests_snapshot_imports_order_input_c5b1db._.js b/crates/turbopack-tests/tests/snapshot/imports/order/output/crates_turbopack-tests_tests_snapshot_imports_order_input_c5b1db._.js index 1f8e67609797a1..e615a1e30e2059 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/order/output/crates_turbopack-tests_tests_snapshot_imports_order_input_c5b1db._.js +++ b/crates/turbopack-tests/tests/snapshot/imports/order/output/crates_turbopack-tests_tests_snapshot_imports_order_input_c5b1db._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_imports_order_input_c5b1db._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/imports/order/input/posts.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/order/input/posts.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -11,7 +11,7 @@ const __TURBOPACK__default__export__ = { }; })()), -"[project]/crates/turbopack-tests/tests/snapshot/imports/order/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/order/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/imports/resolve_error_cjs/output/79fb1_turbopack-tests_tests_snapshot_imports_resolve_error_cjs_input_index_86e786.js b/crates/turbopack-tests/tests/snapshot/imports/resolve_error_cjs/output/79fb1_turbopack-tests_tests_snapshot_imports_resolve_error_cjs_input_index_86e786.js index 12c008756f772f..c69036142b68fd 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/resolve_error_cjs/output/79fb1_turbopack-tests_tests_snapshot_imports_resolve_error_cjs_input_index_86e786.js +++ b/crates/turbopack-tests/tests/snapshot/imports/resolve_error_cjs/output/79fb1_turbopack-tests_tests_snapshot_imports_resolve_error_cjs_input_index_86e786.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/79fb1_turbopack-tests_tests_snapshot_imports_resolve_error_cjs_input_index_86e786.js", { -"[project]/crates/turbopack-tests/tests/snapshot/imports/resolve_error_cjs/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/imports/resolve_error_cjs/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { const dne = (()=>{ const e = new Error("Cannot find module 'does-not-exist/path'"); diff --git a/crates/turbopack-tests/tests/snapshot/imports/resolve_error_esm/output/79fb1_turbopack-tests_tests_snapshot_imports_resolve_error_esm_input_index_c7ccd7.js b/crates/turbopack-tests/tests/snapshot/imports/resolve_error_esm/output/79fb1_turbopack-tests_tests_snapshot_imports_resolve_error_esm_input_index_c7ccd7.js index fb2c83382c824f..2004a41c600915 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/resolve_error_esm/output/79fb1_turbopack-tests_tests_snapshot_imports_resolve_error_esm_input_index_c7ccd7.js +++ b/crates/turbopack-tests/tests/snapshot/imports/resolve_error_esm/output/79fb1_turbopack-tests_tests_snapshot_imports_resolve_error_esm_input_index_c7ccd7.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/79fb1_turbopack-tests_tests_snapshot_imports_resolve_error_esm_input_index_c7ccd7.js", { -"[project]/crates/turbopack-tests/tests/snapshot/imports/resolve_error_esm/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/resolve_error_esm/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/output/crates_turbopack-tests_tests_snapshot_imports_static-and-dynamic_input_cbb273._.js b/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/output/crates_turbopack-tests_tests_snapshot_imports_static-and-dynamic_input_cbb273._.js index b1299401a5191e..dbb3bbfd770fc3 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/output/crates_turbopack-tests_tests_snapshot_imports_static-and-dynamic_input_cbb273._.js +++ b/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/output/crates_turbopack-tests_tests_snapshot_imports_static-and-dynamic_input_cbb273._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_imports_static-and-dynamic_input_cbb273._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/input/vercel.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/input/vercel.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -9,7 +9,7 @@ __turbopack_esm__({ const __TURBOPACK__default__export__ = "turbopack"; })()), -"[project]/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/imports/static/output/crates_turbopack-tests_tests_snapshot_imports_static_input_4175d9._.js b/crates/turbopack-tests/tests/snapshot/imports/static/output/crates_turbopack-tests_tests_snapshot_imports_static_input_4175d9._.js index c543a906795290..59fba5f79929e2 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/static/output/crates_turbopack-tests_tests_snapshot_imports_static_input_4175d9._.js +++ b/crates/turbopack-tests/tests/snapshot/imports/static/output/crates_turbopack-tests_tests_snapshot_imports_static_input_4175d9._.js @@ -4,7 +4,7 @@ __turbopack_export_value__("/static/vercel.957b9b16.svg"); })()), -"[project]/crates/turbopack-tests/tests/snapshot/imports/static/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/static/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/imports/subpath-imports-nested/output/79fb1_turbopack-tests_tests_snapshot_imports_subpath-imports-nested_input_83c7e7._.js b/crates/turbopack-tests/tests/snapshot/imports/subpath-imports-nested/output/79fb1_turbopack-tests_tests_snapshot_imports_subpath-imports-nested_input_83c7e7._.js index a0ed6f986d8966..b3249debfc235b 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/subpath-imports-nested/output/79fb1_turbopack-tests_tests_snapshot_imports_subpath-imports-nested_input_83c7e7._.js +++ b/crates/turbopack-tests/tests/snapshot/imports/subpath-imports-nested/output/79fb1_turbopack-tests_tests_snapshot_imports_subpath-imports-nested_input_83c7e7._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/79fb1_turbopack-tests_tests_snapshot_imports_subpath-imports-nested_input_83c7e7._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports-nested/input/foo.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports-nested/input/foo.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -9,7 +9,7 @@ __turbopack_esm__({ const __TURBOPACK__default__export__ = "foo"; })()), -"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports-nested/input/nested/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports-nested/input/nested/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -21,7 +21,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests const __TURBOPACK__default__export__ = __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$imports$2f$subpath$2d$imports$2d$nested$2f$input$2f$foo$2e$js__$5b$test$5d$__$28$ecmascript$29$__["default"]; })()), -"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports-nested/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports-nested/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/output/crates_turbopack-tests_tests_snapshot_imports_subpath-imports_input_f5873d._.js b/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/output/crates_turbopack-tests_tests_snapshot_imports_subpath-imports_input_f5873d._.js index 5543307a82be63..288e8056b1cfa7 100644 --- a/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/output/crates_turbopack-tests_tests_snapshot_imports_subpath-imports_input_f5873d._.js +++ b/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/output/crates_turbopack-tests_tests_snapshot_imports_subpath-imports_input_f5873d._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_imports_subpath-imports_input_f5873d._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/foo.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/foo.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -9,7 +9,7 @@ __turbopack_esm__({ const __TURBOPACK__default__export__ = "foo"; })()), -"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/dep/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/dep/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -18,7 +18,7 @@ __turbopack_esm__({ const __TURBOPACK__default__export__ = "dep"; })()), -"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/pat.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/pat.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -27,7 +27,7 @@ __turbopack_esm__({ const __TURBOPACK__default__export__ = "pat"; })()), -"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/import.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/import.mjs [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -36,12 +36,12 @@ __turbopack_esm__({ const __TURBOPACK__default__export__ = "import"; })()), -"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/require.cjs [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/require.cjs [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { module.exports = "require"; }.call(this) }), -"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/node/node_protocol_external/output/79fb1_turbopack-tests_tests_snapshot_node_node_protocol_external_input_index_8770aa.js b/crates/turbopack-tests/tests/snapshot/node/node_protocol_external/output/79fb1_turbopack-tests_tests_snapshot_node_node_protocol_external_input_index_8770aa.js index 57c6296d673385..bbae53d76a1f20 100644 --- a/crates/turbopack-tests/tests/snapshot/node/node_protocol_external/output/79fb1_turbopack-tests_tests_snapshot_node_node_protocol_external_input_index_8770aa.js +++ b/crates/turbopack-tests/tests/snapshot/node/node_protocol_external/output/79fb1_turbopack-tests_tests_snapshot_node_node_protocol_external_input_index_8770aa.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/79fb1_turbopack-tests_tests_snapshot_node_node_protocol_external_input_index_8770aa.js", { -"[project]/crates/turbopack-tests/tests/snapshot/node/node_protocol_external/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/node/node_protocol_external/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__ }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/output/crates_turbopack-tests_tests_snapshot_node_spawn_dynamic_input_e65664._.js b/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/output/crates_turbopack-tests_tests_snapshot_node_spawn_dynamic_input_e65664._.js index ecbe252ddbecd9..1e8e4876499016 100644 --- a/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/output/crates_turbopack-tests_tests_snapshot_node_spawn_dynamic_input_e65664._.js +++ b/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/output/crates_turbopack-tests_tests_snapshot_node_spawn_dynamic_input_e65664._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_node_spawn_dynamic_input_e65664._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__ }) => (() => { "use strict"; __turbopack_esm__({}); @@ -15,7 +15,7 @@ const proc = (0, __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbo ]); })()), -"[project]/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/input/node_modules/child_process/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/input/node_modules/child_process/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__ }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/output/crates_turbopack-tests_tests_snapshot_node_spawn_node_eval_input_d0030e._.js b/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/output/crates_turbopack-tests_tests_snapshot_node_spawn_node_eval_input_d0030e._.js index be35fd31015e24..b7908aae107518 100644 --- a/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/output/crates_turbopack-tests_tests_snapshot_node_spawn_node_eval_input_d0030e._.js +++ b/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/output/crates_turbopack-tests_tests_snapshot_node_spawn_node_eval_input_d0030e._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_node_spawn_node_eval_input_d0030e._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__ }) => (() => { "use strict"; __turbopack_esm__({}); @@ -13,7 +13,7 @@ let x = (0, __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$ ]); })()), -"[project]/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/input/node_modules/child_process/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/input/node_modules/child_process/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, x: __turbopack_external_require__, y: __turbopack_external_import__ }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/79fb1_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_7e4b32.js b/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/79fb1_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_7e4b32.js index 85cedf5e14c55d..75c546e9ee565b 100644 --- a/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/79fb1_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_7e4b32.js +++ b/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/79fb1_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_7e4b32.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/79fb1_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_7e4b32.js", { -"[project]/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { console.log("Hello, world!"); diff --git a/crates/turbopack-tests/tests/snapshot/styled_components/styled_components/output/crates_turbopack-tests_tests_snapshot_ededc0._.js b/crates/turbopack-tests/tests/snapshot/styled_components/styled_components/output/crates_turbopack-tests_tests_snapshot_ededc0._.js index ccc8bca6963434..bcc3d05e8620b1 100644 --- a/crates/turbopack-tests/tests/snapshot/styled_components/styled_components/output/crates_turbopack-tests_tests_snapshot_ededc0._.js +++ b/crates/turbopack-tests/tests/snapshot/styled_components/styled_components/output/crates_turbopack-tests_tests_snapshot_ededc0._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_ededc0._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/styled_components/styled_components/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/styled_components/styled_components/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -16,7 +16,7 @@ const MyButton = __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbo console.log(MyButton); })()), -"[project]/crates/turbopack-tests/tests/snapshot/node_modules/styled-components/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/node_modules/styled-components/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { "purposefully empty stub"; "styled-components/index.js"; diff --git a/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/output/crates_turbopack-tests_tests_snapshot_9cde7b._.js b/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/output/crates_turbopack-tests_tests_snapshot_9cde7b._.js index c981b0a22e4f3c..43cd9371a063ca 100644 --- a/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/output/crates_turbopack-tests_tests_snapshot_9cde7b._.js +++ b/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/output/crates_turbopack-tests_tests_snapshot_9cde7b._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_9cde7b._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/input/packages/component/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/input/packages/component/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -20,7 +20,7 @@ function MyApp() { } })()), -"[project]/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/input/packages/app/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/input/packages/app/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -32,13 +32,13 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests console.log(__TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$swc_transforms$2f$mono_transforms$2f$input$2f$packages$2f$component$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__["default"], __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$swc_transforms$2f$mono_transforms$2f$input$2f$node_modules$2f$third_party_component$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__["default"]); })()), -"[project]/crates/turbopack-tests/tests/snapshot/node_modules/react/jsx-dev-runtime.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/node_modules/react/jsx-dev-runtime.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { "purposefully empty stub"; "react/jsx-dev-runtime.js"; }.call(this) }), -"[project]/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/input/node_modules/third_party_component/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/swc_transforms/mono_transforms/input/node_modules/third_party_component/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/crates_turbopack-tests_tests_snapshot_f8ff4e._.js b/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/crates_turbopack-tests_tests_snapshot_f8ff4e._.js index 0df0c47175da43..4a5a32df086c96 100644 --- a/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/crates_turbopack-tests_tests_snapshot_f8ff4e._.js +++ b/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/crates_turbopack-tests_tests_snapshot_f8ff4e._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_f8ff4e._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -15,7 +15,7 @@ var Foo = function Foo() { console.log(Foo, [].includes("foo")); })()), -"[project]/crates/turbopack-tests/tests/snapshot/node_modules/@swc/helpers/_/_class_call_check.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__, m: module, e: exports, t: require }) { !function() { +"[project]/crates/turbopack-tests/tests/snapshot/node_modules/@swc/helpers/_/_class_call_check.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() { "purposefully empty stub"; "@swc/helpers/_/_class_call_check.js"; diff --git a/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/output/crates_turbopack-tests_tests_snapshot_typescript_jsconfig-baseurl_input_f8c7e6._.js b/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/output/crates_turbopack-tests_tests_snapshot_typescript_jsconfig-baseurl_input_f8c7e6._.js index 9e76622ecf170e..f9bba6e9110570 100644 --- a/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/output/crates_turbopack-tests_tests_snapshot_typescript_jsconfig-baseurl_input_f8c7e6._.js +++ b/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/output/crates_turbopack-tests_tests_snapshot_typescript_jsconfig-baseurl_input_f8c7e6._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_typescript_jsconfig-baseurl_input_f8c7e6._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/input/prop.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/input/prop.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -9,7 +9,7 @@ __turbopack_esm__({ const prop = 1; })()), -"[project]/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/output/crates_turbopack-tests_tests_snapshot_typescript_tsconfig-baseurl_input_7bf5e3._.js b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/output/crates_turbopack-tests_tests_snapshot_typescript_tsconfig-baseurl_input_7bf5e3._.js index b749f9c1844094..fc86bf93f1ccd9 100644 --- a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/output/crates_turbopack-tests_tests_snapshot_typescript_tsconfig-baseurl_input_7bf5e3._.js +++ b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/output/crates_turbopack-tests_tests_snapshot_typescript_tsconfig-baseurl_input_7bf5e3._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_typescript_tsconfig-baseurl_input_7bf5e3._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/input/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/input/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -9,7 +9,7 @@ __turbopack_esm__({ const prop = 1; })()), -"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module-full-path/output/crates_turbopack-tests_tests_snapshot_4a4ab7._.js b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module-full-path/output/crates_turbopack-tests_tests_snapshot_4a4ab7._.js index ee34adee6bbbfe..c8382f5f9afede 100644 --- a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module-full-path/output/crates_turbopack-tests_tests_snapshot_4a4ab7._.js +++ b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module-full-path/output/crates_turbopack-tests_tests_snapshot_4a4ab7._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_4a4ab7._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module-full-path/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module-full-path/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -12,7 +12,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests console.log(__TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_modules$2f$tsconfig$2d$mod$2f$prop$2e$ts__$5b$test$5d$__$28$ecmascript$29$__["prop"], __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_modules$2f$tsconfig$2d$mod$2f$prop$2e$ts__$5b$test$5d$__$28$ecmascript$29$__["prop"], __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_modules$2f$tsconfig$2d$mod$2f$prop$2e$ts__$5b$test$5d$__$28$ecmascript$29$__["prop"]); })()), -"[project]/crates/turbopack-tests/tests/snapshot/node_modules/tsconfig-mod/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/node_modules/tsconfig-mod/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module/output/crates_turbopack-tests_tests_snapshot_5fc419._.js b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module/output/crates_turbopack-tests_tests_snapshot_5fc419._.js index 51327e9d888cc8..fa425a6bff8ce1 100644 --- a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module/output/crates_turbopack-tests_tests_snapshot_5fc419._.js +++ b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module/output/crates_turbopack-tests_tests_snapshot_5fc419._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_5fc419._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); @@ -12,7 +12,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests console.log(__TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_modules$2f$tsconfig$2d$mod$2f$prop$2e$ts__$5b$test$5d$__$28$ecmascript$29$__["prop"], __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_modules$2f$tsconfig$2d$mod$2f$prop$2e$ts__$5b$test$5d$__$28$ecmascript$29$__["prop"], __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_modules$2f$tsconfig$2d$mod$2f$prop$2e$ts__$5b$test$5d$__$28$ecmascript$29$__["prop"]); })()), -"[project]/crates/turbopack-tests/tests/snapshot/node_modules/tsconfig-mod/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/node_modules/tsconfig-mod/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ diff --git a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/output/a587c_tests_snapshot_typescript_tsconfig-extends-relative-dir_input_d34519._.js b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/output/a587c_tests_snapshot_typescript_tsconfig-extends-relative-dir_input_d34519._.js index bd76fc4c48b4b0..f37f52cc5b0b33 100644 --- a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/output/a587c_tests_snapshot_typescript_tsconfig-extends-relative-dir_input_d34519._.js +++ b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/output/a587c_tests_snapshot_typescript_tsconfig-extends-relative-dir_input_d34519._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/a587c_tests_snapshot_typescript_tsconfig-extends-relative-dir_input_d34519._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/input/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/input/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -9,7 +9,7 @@ __turbopack_esm__({ const prop = 1; })()), -"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/output/a587c_tests_snapshot_typescript_tsconfig-extends-without-ext_input_69f4f4._.js b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/output/a587c_tests_snapshot_typescript_tsconfig-extends-without-ext_input_69f4f4._.js index 13c5eaf44a2377..1928fdb5dab07a 100644 --- a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/output/a587c_tests_snapshot_typescript_tsconfig-extends-without-ext_input_69f4f4._.js +++ b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/output/a587c_tests_snapshot_typescript_tsconfig-extends-without-ext_input_69f4f4._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/a587c_tests_snapshot_typescript_tsconfig-extends-without-ext_input_69f4f4._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/input/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/input/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -9,7 +9,7 @@ __turbopack_esm__({ const prop = 1; })()), -"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/output/crates_turbopack-tests_tests_snapshot_typescript_tsconfig-extends_input_72bd49._.js b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/output/crates_turbopack-tests_tests_snapshot_typescript_tsconfig-extends_input_72bd49._.js index b4d21cab421679..78d4ea7f67c22a 100644 --- a/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/output/crates_turbopack-tests_tests_snapshot_typescript_tsconfig-extends_input_72bd49._.js +++ b/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/output/crates_turbopack-tests_tests_snapshot_typescript_tsconfig-extends_input_72bd49._.js @@ -1,6 +1,6 @@ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/crates_turbopack-tests_tests_snapshot_typescript_tsconfig-extends_input_72bd49._.js", { -"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/input/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/input/prop.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({ @@ -9,7 +9,7 @@ __turbopack_esm__({ const prop = 1; })()), -"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, k: __turbopack_refresh__ }) => (() => { +"[project]/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/input/index.ts [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => { "use strict"; __turbopack_esm__({}); diff --git a/crates/turbopack-wasm/src/module_asset.rs b/crates/turbopack-wasm/src/module_asset.rs index 220df74530ca5f..059bbb9ca76925 100644 --- a/crates/turbopack-wasm/src/module_asset.rs +++ b/crates/turbopack-wasm/src/module_asset.rs @@ -16,8 +16,7 @@ use turbopack_core::{ use turbopack_ecmascript::{ chunk::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkItemOptions, - EcmascriptChunkPlaceable, EcmascriptChunkType, EcmascriptChunkingContext, - EcmascriptExports, + EcmascriptChunkPlaceable, EcmascriptChunkType, EcmascriptExports, }, references::async_module::OptionAsyncModule, EcmascriptModuleAsset, @@ -120,13 +119,6 @@ impl ChunkableModule for WebAssemblyModuleAsset { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use \ - WebAssemblyModuleAsset", - )?; Ok(Vc::upcast( ModuleChunkItem { module: self, @@ -171,7 +163,7 @@ impl ResolveOrigin for WebAssemblyModuleAsset { #[turbo_tasks::value] struct ModuleChunkItem { module: Vc, - chunking_context: Vc>, + chunking_context: Vc>, } #[turbo_tasks::value_impl] @@ -217,7 +209,7 @@ impl ChunkItem for ModuleChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for ModuleChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } diff --git a/crates/turbopack-wasm/src/raw.rs b/crates/turbopack-wasm/src/raw.rs index 8b72a7823c4a3a..80013afc1dc5a3 100644 --- a/crates/turbopack-wasm/src/raw.rs +++ b/crates/turbopack-wasm/src/raw.rs @@ -1,4 +1,4 @@ -use anyhow::{bail, Context, Result}; +use anyhow::{bail, Result}; use turbo_tasks::{ValueToString, Vc}; use turbopack_core::{ asset::{Asset, AssetContent}, @@ -13,7 +13,7 @@ use turbopack_core::{ use turbopack_ecmascript::{ chunk::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkPlaceable, - EcmascriptChunkType, EcmascriptChunkingContext, EcmascriptExports, + EcmascriptChunkType, EcmascriptExports, }, utils::StringifyJs, }; @@ -78,13 +78,6 @@ impl ChunkableModule for RawWebAssemblyModuleAsset { self: Vc, chunking_context: Vc>, ) -> Result>> { - let chunking_context = - Vc::try_resolve_downcast::>(chunking_context) - .await? - .context( - "chunking context must impl EcmascriptChunkingContext to use \ - RawWebAssemblyModuleAsset", - )?; Ok(Vc::upcast( RawModuleChunkItem { module: self, @@ -107,7 +100,7 @@ impl EcmascriptChunkPlaceable for RawWebAssemblyModuleAsset { #[turbo_tasks::value] struct RawModuleChunkItem { module: Vc, - chunking_context: Vc>, + chunking_context: Vc>, wasm_asset: Vc, } @@ -150,7 +143,7 @@ impl ChunkItem for RawModuleChunkItem { #[turbo_tasks::value_impl] impl EcmascriptChunkItem for RawModuleChunkItem { #[turbo_tasks::function] - fn chunking_context(&self) -> Vc> { + fn chunking_context(&self) -> Vc> { self.chunking_context } diff --git a/crates/turbopack/src/lib.rs b/crates/turbopack/src/lib.rs index ced532954e71ed..628389197b6de0 100644 --- a/crates/turbopack/src/lib.rs +++ b/crates/turbopack/src/lib.rs @@ -162,14 +162,16 @@ async fn apply_module_type( if runtime_code { Vc::upcast(builder.build()) } else { + let options = options.await?; match options.tree_shaking_mode { - Some(TreeShakingMode::ModuleFragments) => { + Some(TreeShakingMode::ModuleFragments) => Vc::upcast( if let Some(part) = part { - Vc::upcast(builder.build_part(part)) + builder.build_part(part) } else { - Vc::upcast(builder.build_part(ModulePart::exports())) + builder.build_part(ModulePart::exports()) } - } + .await?, + ), Some(TreeShakingMode::ReexportsOnly) => { let side_effect_free_packages = module_asset_context.side_effect_free_packages(); diff --git a/crates/turbopack/src/module_options/mod.rs b/crates/turbopack/src/module_options/mod.rs index b49484bda57b37..fb01248ae7a2a8 100644 --- a/crates/turbopack/src/module_options/mod.rs +++ b/crates/turbopack/src/module_options/mod.rs @@ -97,6 +97,7 @@ impl ModuleOptions { } } + let mut refresh = false; let mut transforms = vec![]; // Order of transforms is important. e.g. if the React transform occurs before @@ -105,6 +106,7 @@ impl ModuleOptions { // should use `before_transform_plugins`. if let Some(enable_jsx) = enable_jsx { let jsx = enable_jsx.await?; + refresh = jsx.react_refresh; transforms.push(EcmascriptInputTransform::React { development: jsx.development, @@ -119,8 +121,10 @@ impl ModuleOptions { url_rewrite_behavior: esm_url_rewrite_behavior, import_externals, ignore_dynamic_requests, + refresh, ..Default::default() }; + let ecmascript_options_vc = ecmascript_options.cell(); if let Some(env) = preset_env_versions { transforms.push(EcmascriptInputTransform::PresetEnv(env)); @@ -216,7 +220,7 @@ impl ModuleOptions { ]), vec![ModuleRuleEffect::ModuleType(ModuleType::Ecmascript { transforms: app_transforms, - options: ecmascript_options, + options: ecmascript_options_vc, })], ), ModuleRule::new_all( @@ -226,7 +230,8 @@ impl ModuleOptions { options: EcmascriptOptions { specified_module_type: SpecifiedModuleType::EcmaScript, ..ecmascript_options - }, + } + .into(), })], ), ModuleRule::new_all( @@ -236,7 +241,8 @@ impl ModuleOptions { options: EcmascriptOptions { specified_module_type: SpecifiedModuleType::CommonJs, ..ecmascript_options - }, + } + .into(), })], ), ModuleRule::new_all( @@ -245,7 +251,7 @@ impl ModuleOptions { transforms: ts_app_transforms, tsx: false, analyze_types: enable_types, - options: ecmascript_options, + options: ecmascript_options_vc, })], ), ModuleRule::new_all( @@ -254,7 +260,7 @@ impl ModuleOptions { transforms: ts_app_transforms, tsx: true, analyze_types: enable_types, - options: ecmascript_options, + options: ecmascript_options_vc, })], ), ModuleRule::new_all( @@ -266,7 +272,8 @@ impl ModuleOptions { options: EcmascriptOptions { specified_module_type: SpecifiedModuleType::EcmaScript, ..ecmascript_options - }, + } + .into(), })], ), ModuleRule::new_all( @@ -278,7 +285,8 @@ impl ModuleOptions { options: EcmascriptOptions { specified_module_type: SpecifiedModuleType::EcmaScript, ..ecmascript_options - }, + } + .into(), })], ), ModuleRule::new_all( @@ -290,7 +298,8 @@ impl ModuleOptions { options: EcmascriptOptions { specified_module_type: SpecifiedModuleType::CommonJs, ..ecmascript_options - }, + } + .into(), })], ), ModuleRule::new_all( @@ -302,7 +311,8 @@ impl ModuleOptions { options: EcmascriptOptions { specified_module_type: SpecifiedModuleType::CommonJs, ..ecmascript_options - }, + } + .into(), })], ), ModuleRule::new( @@ -310,7 +320,7 @@ impl ModuleOptions { vec![ModuleRuleEffect::ModuleType( ModuleType::TypescriptDeclaration { transforms: vendor_transforms, - options: ecmascript_options, + options: ecmascript_options_vc, }, )], ), @@ -355,7 +365,7 @@ impl ModuleOptions { ModuleRuleCondition::ResourcePathHasNoExtension, vec![ModuleRuleEffect::ModuleType(ModuleType::Ecmascript { transforms: vendor_transforms, - options: ecmascript_options, + options: ecmascript_options_vc, })], ), ModuleRule::new( @@ -547,7 +557,7 @@ impl ModuleOptions { // This can be overriden by specifying e. g. `as: "*.css"` in the rule. ModuleRuleEffect::ModuleType(ModuleType::Ecmascript { transforms: app_transforms, - options: ecmascript_options, + options: ecmascript_options_vc, }), ModuleRuleEffect::SourceTransforms(Vc::cell(vec![Vc::upcast( WebpackLoaders::new( diff --git a/crates/turbopack/src/module_options/module_rule.rs b/crates/turbopack/src/module_options/module_rule.rs index f1a4dab495af72..99b1431093a6ab 100644 --- a/crates/turbopack/src/module_options/module_rule.rs +++ b/crates/turbopack/src/module_options/module_rule.rs @@ -101,7 +101,7 @@ pub enum ModuleType { Ecmascript { transforms: Vc, #[turbo_tasks(trace_ignore)] - options: EcmascriptOptions, + options: Vc, }, Typescript { transforms: Vc, @@ -110,12 +110,12 @@ pub enum ModuleType { // follow references to imported types. analyze_types: bool, #[turbo_tasks(trace_ignore)] - options: EcmascriptOptions, + options: Vc, }, TypescriptDeclaration { transforms: Vc, #[turbo_tasks(trace_ignore)] - options: EcmascriptOptions, + options: Vc, }, Json, Raw,