Unverified Commit 9f930cef authored by Luke Sandberg's avatar Luke Sandberg Committed by GitHub

[lts-active] Revert "Optimize strict module factory chunks (#98421)" (#100866)

Reverts #98421 on `releases/lts/active`.

Fixes #100617

## Summary

#98421 moved `"use strict"` from each module factory into a shared
strict-mode wrapper around the chunk. This exposed an SWC minifier bug
(swc-project/swc#12580): the `if_return` pass could merge a function's
directive prologue into a sequence expression, so the function silently
lost strict mode in production builds.

On canary, this is fixed by bumping to SWC v82.2.0 (#100508). LTS is
still on `swc_core` 79, and getting that fix here would mean also
backporting the v81 (#99720) and v82 (#100270) bumps. So instead, this
reverts the optimization on LTS only. Each factory gets its own `"use
strict"` again, which is the format LTS used before #98421. Canary
doesn't need the revert.

Conflicts with #98953 (Remove TraceRawVcs) were resolved by dropping the
`TraceRawVcs` import. Turbopack snapshot outputs were regenerated with
`UPDATE=1`.

## Verification

- `cargo nextest r -p turbopack-tests --test snapshot` (132 passed,
after `UPDATE=1`)
- `cargo nextest r -p turbopack-ecmascript -p turbopack-browser -p
turbopack-nodejs` (592 passed)
- `cargo check -p turbopack-ecmascript -p turbopack-browser -p
turbopack-nodejs -p next-api` with `-Dwarnings`
- `pnpm check` in `turbopack/crates/turbopack-ecmascript-runtime/js`

<!-- NEXT_JS_LLM -->
parent d2313e4c
......@@ -716,10 +716,10 @@ async fn module_hash(
} else {
None
};
let factory = chunk_item.code(async_info).await?;
let code = chunk_item.code(async_info);
RcStr::from(deterministic_hash(
"",
(ident_str, factory.code.to_code().source_code_hash().await?),
(ident_str, code.source_code_hash().await?),
HashAlgorithm::Xxh3Hash128Hex,
))
} else {
......
......@@ -14,10 +14,7 @@ use turbopack_core::{
version::{MergeableVersionedContent, Version, VersionedContent, VersionedContentMerger},
};
use turbopack_ecmascript::{
chunk::{
EcmascriptChunkContent, EcmascriptChunkContentEntries, strict_chunk_wrapper,
strict_factory_mode, write_module_factories,
},
chunk::{EcmascriptChunkContent, EcmascriptChunkContentEntries},
hmr::{
EcmascriptHmrChunkContent, merger::EcmascriptChunkContentMerger,
version::EcmascriptChunkVersion,
......@@ -88,22 +85,6 @@ impl EcmascriptBrowserChunkContent {
*this.chunking_context.debug_ids_enabled().await?,
);
let supports_arrow_functions = *this
.chunking_context
.environment()
.runtime_versions()
.supports_arrow_functions()
.await?;
let content = this.content.await?;
let chunk_items = content.chunk_item_code_module_ids_and_paths().await?;
let strict_factory_mode = strict_factory_mode(&chunk_items, supports_arrow_functions);
let strict_chunk_wrapper =
strict_chunk_wrapper(strict_factory_mode, supports_arrow_functions);
if let Some((prefix, _)) = strict_chunk_wrapper {
code += prefix;
}
// When a chunk is executed, it will either register itself with the current
// instance of the runtime, or it will push itself onto the list of pending
// chunks (using the configured chunk loading global variable).
......@@ -119,18 +100,17 @@ impl EcmascriptBrowserChunkContent {
r#"(globalThis[{chunk_loading_global}] || (globalThis[{chunk_loading_global}] = [])).push([{script_or_path},"#,
chunk_loading_global = StringifyJs(&chunk_loading_global),
)?;
write_module_factories(
&mut code,
&chunk_items,
strict_factory_mode,
supports_arrow_functions,
)?;
write!(code, "\n]);")?;
if let Some((_, suffix)) = strict_chunk_wrapper {
code += suffix;
let content = this.content.await?;
let chunk_items = content.chunk_item_code_module_ids_and_paths().await?;
for (id, item_code, _) in &chunk_items {
write!(code, "\n{}, ", StringifyJs(id))?;
code.push_code(item_code);
write!(code, ",")?;
}
write!(code, "\n]);")?;
let mut code = code.build();
if let MinifyType::Minify { mangle } = *this.chunking_context.minify_type().await? {
......
......@@ -99,15 +99,11 @@ type ModuleCache<M> = Map<ModuleId, M>
// TODO properly type values here
type ModuleFactories = Map<ModuleId, Function>
/**
* This is an alternating, non-empty array of module factory functions and module ids
* This is an alternating, non-empty arrow of module factory functions and module ids
* `[id1, id2..., factory1, id3, factory2, id4, id5, factory3]`
* There can be multiple ids to support scope hoisted merged modules.
* The strict mode module factories of a chunk can be prepended as a nested array,
* which the chunk creates inside a `"use strict"` IIFE.
* There can be multiple ids to support scope hoisted merged modules
*/
type CompressedModuleFactories = Array<
ModuleId | Function | Array<ModuleId | Function>
>
type CompressedModuleFactories = Array<ModuleId | Function>
type RelativeURL = (inputUrl: string) => void
type ResolvePathFromModule = (moduleId: string) => string
......
......@@ -716,9 +716,12 @@ function getChunkPath(chunkData: ChunkData): ChunkPath {
return typeof chunkData === 'string' ? chunkData : chunkData.path
}
// Load the CompressedModuleFactories of a chunk into the `moduleFactories` Map.
// The flat format alternates one or more module IDs with their factory function.
// Strict factories can be prepended as a nested array.
// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
// The CompressedModuleFactories format is
// - 1 or more module ids
// - a module factory function
// So walking this is a little complex but the flat structure is also fast to
// traverse, we can use `typeof` operators to distinguish the two cases.
function installCompressedModuleFactories(
chunkModules: CompressedModuleFactories,
offset: number,
......@@ -726,16 +729,6 @@ function installCompressedModuleFactories(
newModuleId?: (id: ModuleId) => void
) {
let i = offset
const strictFactories = chunkModules[i]
if (Array.isArray(strictFactories)) {
installCompressedModuleFactories(
strictFactories,
0,
moduleFactories,
newModuleId
)
i++
}
while (i < chunkModules.length) {
let end = i + 1
// Find our factory function
......@@ -779,7 +772,7 @@ function installCompressedModuleFactories(
newModuleId?.(id)
}
}
i = end + 1
i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.
}
}
......
......@@ -2,9 +2,7 @@ use anyhow::Result;
use rustc_hash::FxHashMap;
use smallvec::{SmallVec, smallvec};
use turbo_rcstr::RcStr;
use turbo_tasks::{
NonLocalValue, ReadRef, TryJoinIterExt, ValueToString, Vc, debug::ValueDebugFormat,
};
use turbo_tasks::{ReadRef, TryJoinIterExt, ValueToString, Vc};
use turbopack_core::{
chunk::{ChunkItem, ChunkItemExt, ModuleId},
code_builder::Code,
......@@ -15,31 +13,8 @@ use crate::chunk::{
EcmascriptChunkItemWithAsyncInfo,
};
async fn code_module_id_and_path(
item: &EcmascriptChunkItemWithAsyncInfo,
) -> Result<CodeModuleIdAndPath> {
let factory = item
.chunk_item
.code(item.async_info.map(|info| *info))
.await?;
Ok(CodeModuleIdAndPath {
id: item.chunk_item.id().await?,
code: factory.code.to_code().await?,
path: item.chunk_item.asset_ident().to_string().owned().await?,
strict: factory.strict,
})
}
#[derive(Clone, PartialEq, Eq, ValueDebugFormat, NonLocalValue)]
pub struct CodeModuleIdAndPath {
pub id: ModuleId,
pub code: ReadRef<Code>,
pub path: RcStr,
pub strict: bool,
}
#[turbo_tasks::value(transparent, serialization = "skip")]
pub struct CodeModuleIdsAndPaths(SmallVec<[CodeModuleIdAndPath; 1]>);
pub struct CodeModuleIdsAndPaths(SmallVec<[(ModuleId, ReadRef<Code>, RcStr); 1]>);
#[turbo_tasks::value(transparent, serialization = "skip")]
pub struct BatchGroupCodeModuleIdsAndPaths(
......@@ -73,14 +48,29 @@ pub async fn item_code_module_ids_and_paths(
item: EcmascriptChunkItemOrBatchWithAsyncInfo,
) -> Result<Vc<CodeModuleIdsAndPaths>> {
Ok(Vc::cell(match item {
EcmascriptChunkItemOrBatchWithAsyncInfo::ChunkItem(item) => {
smallvec![code_module_id_and_path(&item).await?]
EcmascriptChunkItemOrBatchWithAsyncInfo::ChunkItem(EcmascriptChunkItemWithAsyncInfo {
chunk_item,
async_info,
..
}) => {
let id = chunk_item.id().await?;
let code = chunk_item.code(async_info.map(|info| *info));
let path = chunk_item.asset_ident().to_string().owned().await?;
smallvec![(id, code.await?, path)]
}
EcmascriptChunkItemOrBatchWithAsyncInfo::Batch(batch) => batch
.await?
.chunk_items
.iter()
.map(code_module_id_and_path)
.map(async |item| {
Ok((
item.chunk_item.id().await?,
item.chunk_item
.code(item.async_info.map(|info| *info))
.await?,
item.chunk_item.asset_ident().to_string().owned().await?,
))
})
.try_join()
.await?
.into(),
......
......@@ -2,11 +2,14 @@ use std::future::IntoFuture;
use anyhow::Result;
use either::Either;
use turbo_tasks::{ResolvedVc, TryJoinIterExt, Vc};
use turbopack_core::chunk::{ChunkItem, ChunkItems, batch_info};
use turbo_rcstr::RcStr;
use turbo_tasks::{ReadRef, ResolvedVc, TryJoinIterExt, Vc};
use turbopack_core::{
chunk::{ChunkItem, ChunkItems, ModuleId, batch_info},
code_builder::Code,
};
use crate::chunk::{
CodeModuleIdAndPath,
batch::{EcmascriptChunkItemBatchGroup, EcmascriptChunkItemOrBatchWithAsyncInfo},
batch_group_code_module_ids_and_paths, item_code_module_ids_and_paths,
};
......@@ -49,7 +52,9 @@ impl EcmascriptChunkContent {
}
impl EcmascriptChunkContent {
pub async fn chunk_item_code_module_ids_and_paths(&self) -> Result<Vec<CodeModuleIdAndPath>> {
pub async fn chunk_item_code_module_ids_and_paths(
&self,
) -> Result<Vec<(ModuleId, ReadRef<Code>, RcStr)>> {
let chunk_item_groups = batch_info(
&self.batch_groups,
&self.chunk_items,
......@@ -63,7 +68,8 @@ impl EcmascriptChunkContent {
.collect::<Vec<_>>();
// Sort all items by their module path so that similar modules stay
// together and the chunks gzip better.
chunk_items.sort_by(|a, b| (&a.path, &a.id).cmp(&(&b.path, &b.id)));
chunk_items
.sort_by(|(a_id, _, a_path), (b_id, _, b_path)| (a_path, a_id).cmp(&(b_path, b_id)));
Ok(chunk_items)
}
}
......@@ -29,8 +29,7 @@ impl EcmascriptChunkContentEntry {
chunk_item: ResolvedVc<Box<dyn EcmascriptChunkItem>>,
async_module_info: Option<Vc<AsyncModuleInfo>>,
) -> Result<Self> {
let factory = chunk_item.code(async_module_info).await?;
let code = factory.code.to_code().to_resolved().await?;
let code = chunk_item.code(async_module_info).to_resolved().await?;
Ok(EcmascriptChunkContentEntry {
code,
hash: code.source_code_hash().to_resolved().await?,
......
use std::io::Write;
use anyhow::Result;
use turbopack_core::code_builder::CodeBuilder;
use crate::{chunk::CodeModuleIdAndPath, utils::StringifyJs};
const MIXED_ARROW_PREFIX: &str = "\n(()=>{\"use strict\";return[";
const MIXED_FUNCTION_PREFIX: &str = "\n(function(){\"use strict\";return[";
const MIXED_SUFFIX: &str = "\n]})(),";
const ALL_STRICT_ARROW_PREFIX: &str = "(()=>{\"use strict\";";
const ALL_STRICT_FUNCTION_PREFIX: &str = "(function(){\"use strict\";";
const ALL_STRICT_SUFFIX: &str = "})()";
/// Minimum number of strict factories that makes hoisting the directive worth its wrapper.
/// Derived from the minified wrapper sizes and pinned by `strict_thresholds_match_wrapper_sizes`.
/// The mixed wrappers differ in length but land on the same minimum; the all-strict ones do not,
/// which is why arrow support still selects between two constants here.
const MIXED_STRICT_THRESHOLD: usize = 3;
const ALL_STRICT_ARROW_THRESHOLD: usize = 2;
const ALL_STRICT_FUNCTION_THRESHOLD: usize = 3;
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum StrictFactoryMode {
Flat,
Mixed,
AllStrict,
}
/// Selects the smallest expected minified representation for this chunk's mix of module factories.
pub fn strict_factory_mode(
chunk_items: &[CodeModuleIdAndPath],
supports_arrow_functions: bool,
) -> StrictFactoryMode {
let mut strict = 0;
let mut non_strict = 0;
for item in chunk_items {
if item.strict {
strict += 1;
} else {
non_strict += 1;
}
}
if strict == 0 {
return StrictFactoryMode::Flat;
}
let mode = if non_strict == 0 {
StrictFactoryMode::AllStrict
} else {
StrictFactoryMode::Mixed
};
let threshold = match (mode, supports_arrow_functions) {
(StrictFactoryMode::Mixed, _) => MIXED_STRICT_THRESHOLD,
(StrictFactoryMode::AllStrict, true) => ALL_STRICT_ARROW_THRESHOLD,
(StrictFactoryMode::AllStrict, false) => ALL_STRICT_FUNCTION_THRESHOLD,
(StrictFactoryMode::Flat, _) => unreachable!(),
};
if strict >= threshold {
mode
} else {
StrictFactoryMode::Flat
}
}
/// Code written around the whole chunk in the all-strict case.
pub fn strict_chunk_wrapper(
mode: StrictFactoryMode,
supports_arrow_functions: bool,
) -> Option<(&'static str, &'static str)> {
(mode == StrictFactoryMode::AllStrict).then(|| {
(
all_strict_prefix(supports_arrow_functions),
ALL_STRICT_SUFFIX,
)
})
}
const fn mixed_prefix(supports_arrow_functions: bool) -> &'static str {
if supports_arrow_functions {
MIXED_ARROW_PREFIX
} else {
MIXED_FUNCTION_PREFIX
}
}
const fn all_strict_prefix(supports_arrow_functions: bool) -> &'static str {
if supports_arrow_functions {
ALL_STRICT_ARROW_PREFIX
} else {
ALL_STRICT_FUNCTION_PREFIX
}
}
/// Writes flat factories, with a strict IIFE prepended to the non-strict factories in mixed chunks.
pub fn write_module_factories(
code: &mut CodeBuilder,
chunk_items: &[CodeModuleIdAndPath],
mode: StrictFactoryMode,
supports_arrow_functions: bool,
) -> Result<()> {
if mode == StrictFactoryMode::Mixed {
*code += mixed_prefix(supports_arrow_functions);
write_factories(code, chunk_items, |strict| strict)?;
*code += MIXED_SUFFIX;
write_factories(code, chunk_items, |strict| !strict)?;
} else {
write_factories(code, chunk_items, |_| true)?;
}
Ok(())
}
fn write_factories(
code: &mut CodeBuilder,
chunk_items: &[CodeModuleIdAndPath],
include: impl Fn(bool) -> bool,
) -> Result<()> {
for item in chunk_items {
if include(item.strict) {
write!(code, "\n{}, ", StringifyJs(&item.id))?;
code.push_code(&item.code);
write!(code, ",")?;
}
}
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;
/// Minified length of the `"use strict";` directive that
/// `EcmascriptChunkItemContent::module_factory` writes into every strict factory, and that
/// the minimizer removes again inside a strict wrapper. The trailing newlines the factory
/// writes do not survive minification, so they are not counted. Kept here because only these
/// assertions need it.
const STRICT_MODE_DIRECTIVE_LEN: usize = "\"use strict\";".len();
fn minified_len(wrapper: &str) -> usize {
// Formatting whitespace is only added at line boundaries. Trim each line rather than all
// whitespace so the space inside the `"use strict"` string literal is preserved.
wrapper.lines().map(str::trim).map(str::len).sum()
}
/// `threshold` must be the smallest factory count worth grouping: one below it the directives
/// do not outweigh the wrapper, at the threshold they do.
fn assert_threshold(threshold: usize, wrapper: &str) {
let wrapper_len = minified_len(wrapper);
assert!((threshold - 1) * STRICT_MODE_DIRECTIVE_LEN <= wrapper_len);
assert!(threshold * STRICT_MODE_DIRECTIVE_LEN > wrapper_len);
}
#[test]
fn strict_thresholds_match_wrapper_sizes() {
assert_threshold(
MIXED_STRICT_THRESHOLD,
&format!("{MIXED_ARROW_PREFIX}{MIXED_SUFFIX}"),
);
assert_threshold(
MIXED_STRICT_THRESHOLD,
&format!("{MIXED_FUNCTION_PREFIX}{MIXED_SUFFIX}"),
);
assert_threshold(
ALL_STRICT_ARROW_THRESHOLD,
&format!("{ALL_STRICT_ARROW_PREFIX}{ALL_STRICT_SUFFIX}"),
);
assert_threshold(
ALL_STRICT_FUNCTION_THRESHOLD,
&format!("{ALL_STRICT_FUNCTION_PREFIX}{ALL_STRICT_SUFFIX}"),
);
}
}
......@@ -5,16 +5,14 @@ use async_trait::async_trait;
use bincode::{Decode, Encode};
use smallvec::SmallVec;
use turbo_rcstr::{RcStr, rcstr};
use turbo_tasks::{
NonLocalValue, PrettyPrintError, ReadRef, ResolvedVc, Upcast, ValueToString, Vc,
};
use turbo_tasks::{NonLocalValue, PrettyPrintError, ResolvedVc, Upcast, ValueToString, Vc};
use turbo_tasks_fs::{FileSystemPath, rope::Rope};
use turbopack_core::{
chunk::{
AsyncModuleInfo, ChunkItem, ChunkItemWithAsyncModuleInfo, ChunkType, ChunkingContext,
ChunkingContextExt, ModuleId, SourceMapSourceType,
},
code_builder::{CodeBuilder, PersistedCode},
code_builder::{Code, CodeBuilder, PersistedCode},
ident::AssetIdent,
issue::{IssueExt, IssueSeverity, StyledString, code_gen::CodeGenerationIssue},
module::Module,
......@@ -256,18 +254,9 @@ pub trait EcmascriptChunkItem: ChunkItem + OutputAssetsReference {
) -> Result<Vc<EcmascriptChunkItemContent>>;
}
#[turbo_tasks::value]
pub struct EcmascriptChunkItemCode {
pub code: ResolvedVc<PersistedCode>,
pub strict: bool,
}
pub trait EcmascriptChunkItemExt {
/// Generates the module factory and returns whether it must run in strict mode.
fn code(
self: Vc<Self>,
async_module_info: Option<Vc<AsyncModuleInfo>>,
) -> Vc<EcmascriptChunkItemCode>;
/// Generates the module factory for this chunk item.
fn code(self: Vc<Self>, async_module_info: Option<Vc<AsyncModuleInfo>>) -> Vc<Code>;
}
impl<T> EcmascriptChunkItemExt for T
......@@ -275,11 +264,9 @@ where
T: Upcast<Box<dyn EcmascriptChunkItem>>,
{
/// Generates the module factory for this chunk item.
fn code(
self: Vc<Self>,
async_module_info: Option<Vc<AsyncModuleInfo>>,
) -> Vc<EcmascriptChunkItemCode> {
fn code(self: Vc<Self>, async_module_info: Option<Vc<AsyncModuleInfo>>) -> Vc<Code> {
module_factory_with_code_generation_issue(Vc::upcast_non_strict(self), async_module_info)
.to_code()
}
}
......@@ -287,25 +274,21 @@ where
async fn module_factory_with_code_generation_issue(
chunk_item: Vc<Box<dyn EcmascriptChunkItem>>,
async_module_info: Option<Vc<AsyncModuleInfo>>,
) -> Result<Vc<EcmascriptChunkItemCode>> {
) -> Result<Vc<PersistedCode>> {
async fn get_content(
chunk_item: Vc<Box<dyn EcmascriptChunkItem>>,
async_module_info: Option<Vc<AsyncModuleInfo>>,
) -> Result<ReadRef<EcmascriptChunkItemContent>> {
chunk_item
.into_trait_ref()
.await?
) -> Result<ResolvedVc<PersistedCode>> {
let chunk_item_ref = chunk_item.into_trait_ref().await?;
let content = chunk_item_ref
.content_with_async_module_info(async_module_info, false)
.await?
.await
.await?;
content.module_factory().await
}
let (code, strict) = match get_content(chunk_item, async_module_info).await {
Ok(content) => (content.module_factory().await, content.options.strict),
Err(error) => (Err(error), false),
};
let code = match code {
Ok(factory) => factory,
let content = get_content(chunk_item, async_module_info).await;
Ok(match content {
Ok(factory) => *factory,
Err(error) => {
let id = chunk_item.asset_ident().to_string().await;
let id = id.as_ref().map_or_else(|_| "unknown", |id| &**id);
......@@ -330,10 +313,9 @@ async fn module_factory_with_code_generation_issue(
code += "(() => {{\n\n";
writeln!(code, "throw new Error({error});", error = js_error_message)?;
code += "\n}})";
code.build().cell_persisted()
*code.build().cell_persisted()
}
};
Ok(EcmascriptChunkItemCode { code, strict }.cell())
})
}
/// Generic chunk item that wraps any EcmascriptChunkPlaceable module.
......
......@@ -4,7 +4,6 @@ pub(crate) mod code_module_ids_and_paths;
pub(crate) mod content;
pub(crate) mod content_entry;
pub(crate) mod data;
pub(crate) mod factory_group;
pub(crate) mod item;
pub(crate) mod placeable;
......@@ -32,19 +31,15 @@ pub use self::{
},
chunk_type::EcmascriptChunkType,
code_module_ids_and_paths::{
BatchGroupCodeModuleIdsAndPaths, CodeModuleIdAndPath, CodeModuleIdsAndPaths,
BatchGroupCodeModuleIdsAndPaths, CodeModuleIdsAndPaths,
batch_group_code_module_ids_and_paths, item_code_module_ids_and_paths,
},
content::EcmascriptChunkContent,
content_entry::{EcmascriptChunkContentEntries, EcmascriptChunkContentEntry},
data::EcmascriptChunkData,
factory_group::{
StrictFactoryMode, strict_chunk_wrapper, strict_factory_mode, write_module_factories,
},
item::{
EcmascriptChunkItem, EcmascriptChunkItemCode, EcmascriptChunkItemContent,
EcmascriptChunkItemExt, EcmascriptChunkItemOptions, EcmascriptChunkItemWithAsyncInfo,
ecmascript_chunk_item,
EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkItemExt,
EcmascriptChunkItemOptions, EcmascriptChunkItemWithAsyncInfo, ecmascript_chunk_item,
},
placeable::{CjsStaticExports, EcmascriptChunkPlaceable, EcmascriptExports},
};
......
......@@ -10,15 +10,13 @@ use turbopack_core::{
version::{MergeableVersionedContent, Version, VersionedContent, VersionedContentMerger},
};
use turbopack_ecmascript::{
chunk::{
EcmascriptChunkContent, EcmascriptChunkContentEntries, strict_chunk_wrapper,
strict_factory_mode, write_module_factories,
},
chunk::{EcmascriptChunkContent, EcmascriptChunkContentEntries},
hmr::{
EcmascriptHmrChunkContent, merger::EcmascriptChunkContentMerger,
version::EcmascriptChunkVersion,
},
minify::minify,
utils::StringifyJs,
};
use super::chunk::EcmascriptBuildNodeChunk;
......@@ -62,32 +60,18 @@ impl EcmascriptNodeChunkContent {
.await?;
let mut code = CodeBuilder::new(true, *self.chunking_context.debug_ids_enabled().await?);
let supports_arrow_functions = *self
.chunking_context
.environment()
.runtime_versions()
.supports_arrow_functions()
.await?;
write!(code, "module.exports = [")?;
let content = self.content.await?;
let chunk_items = content.chunk_item_code_module_ids_and_paths().await?;
let strict_factory_mode = strict_factory_mode(&chunk_items, supports_arrow_functions);
let strict_chunk_wrapper =
strict_chunk_wrapper(strict_factory_mode, supports_arrow_functions);
if let Some((prefix, _)) = strict_chunk_wrapper {
code += prefix;
for (id, item_code, _) in &chunk_items {
write!(code, "\n{}, ", StringifyJs(id))?;
code.push_code(item_code);
write!(code, ",")?;
}
write!(code, "module.exports = [")?;
write_module_factories(
&mut code,
&chunk_items,
strict_factory_mode,
supports_arrow_functions,
)?;
write!(code, "\n];")?;
if let Some((_, suffix)) = strict_chunk_wrapper {
code += suffix;
}
let mut code = code.build();
......
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_dynamic-import_input_lib_1b34ju5a6z6v3.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_dynamic-import_input_lib_1b34ju5a6z6v3.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/lib.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -180,6 +180,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_dynamic-import_input_lib_1b34ju5a6z6v3.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_export-named_input_0xj7cshvyczs_._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_export-named_input_0xj7cshvyczs_._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -92,6 +92,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_export-named_input_0xj7cshvyczs_._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_export-namespace_input_1mqgz2-3_b4v8._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_export-namespace_input_1mqgz2-3_b4v8._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-namespace/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -187,6 +187,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_export-namespace_input_1mqgz2-3_b4v8._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_import-named-all_input_1orhvu2sihqe-._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_import-named-all_input_1orhvu2sihqe-._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -75,6 +75,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_import-named-all_input_1orhvu2sihqe-._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_import-named_input_1j9uhcyhqdoze._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_import-named_input_1j9uhcyhqdoze._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -75,6 +75,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_import-named_input_1j9uhcyhqdoze._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_import-namespace_input_1ippwh3yc_l3v._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_import-namespace_input_1ippwh3yc_l3v._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -171,6 +171,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_import-namespace_input_1ippwh3yc_l3v._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_import-side-effect_input_1_hdh9its1vdz._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_import-side-effect_input_1_hdh9its1vdz._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -51,6 +51,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$import$2d$side$2d$effect$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__["a"] += '!';
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_import-side-effect_input_1_hdh9its1vdz._.js.map
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_require-side-effect_input_0fs4qhn32cnvu._.js",
(()=>{"use strict";return[
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
const { cat } = __turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript)");
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -181,11 +184,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
;
}),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
const { cat } = __turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript)");
}),
]);
//# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_require-side-effect_input_0fs4qhn32cnvu._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_tree-shake-test-1_input_index_07jttq51-r0-b.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_tree-shake-test-1_input_index_07jttq51-r0-b.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/tree-shake-test-1/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -180,6 +180,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_tree-shake-test-1_input_index_07jttq51-r0-b.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_1lkohl-aes1w9._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_1lkohl-aes1w9._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/import.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -23,6 +23,6 @@ function foo(value) {
console.assert(value);
}
}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_1lkohl-aes1w9._.js.map
\ No newline at end of file
(()=>{"use strict";module.exports = [
module.exports = [
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build/input/import.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -23,6 +23,6 @@ function foo(value) {
console.assert(value);
}
}),
];})()
];
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_basic_async_chunk_build_input_0aldykipaj64f._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_chunked_input_1_yzgm1kllkx5._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_chunked_input_1_yzgm1kllkx5._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/chunked/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -18,6 +18,6 @@ function foo(value) {
console.assert(value);
}
}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_basic_chunked_input_1_yzgm1kllkx5._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_export-default_input_1k9-ja77l7ynd._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_export-default_input_1k9-ja77l7ynd._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/export-default/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -19,6 +19,6 @@ __turbopack_context__.s([
__TURBOPACK__default__export__
]);
}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_basic_export-default_input_1k9-ja77l7ynd._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_shebang_input_02e38zhtmusm6._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_shebang_input_02e38zhtmusm6._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/shebang/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -18,6 +18,6 @@ function foo(value) {
console.assert(value);
}
}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_basic_shebang_input_02e38zhtmusm6._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_0zs_dr_r82cwm._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_0zs_dr_r82cwm._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/UserAPI.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -49,6 +49,6 @@ const close = ()=>{
};
__turbopack_async_result__();
} catch(e) { __turbopack_async_result__(e); } }, true);}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_0zs_dr_r82cwm._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_1ih204k-kik67._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_1ih204k-kik67._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/Actions.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -34,6 +34,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
console.log('created user John');
})();
}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_1ih204k-kik67._.js.map
\ No newline at end of file
import { a } from './all-strict-a'
import { b } from './all-strict-b'
export const value = a + b
'use strict'
const strictA = require('./strict-a')
const strictB = require('./strict-b').default
const sloppy = require('./non-strict')
import('./below-threshold').then(({ value }) => {
console.log('below threshold', value)
})
import('./all-strict').then(({ value }) => {
console.log('all strict', value)
})
console.log('this is CJS', strictA, strictB, sloppy)
module.exports = strictA + strictB + sloppy
console.log('this is CJS')
module.exports = 1234
module.exports = (function () {
return this === globalThis ? 34 : 0
})()
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic_use-strict_input_below-threshold_1my1mnvsmmqb0.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/below-threshold.js [test] (ecmascript)", ((__turbopack_context__) => {
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_basic_use-strict_input_index_0nlvx9556vyf1.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict";
__turbopack_context__.s([
"value",
()=>value
]);
const value = 2;
console.log('this is CJS');
module.exports = 1234;
}),
]);
//# sourceMappingURL=1jsg_tests_snapshot_basic_use-strict_input_below-threshold_1my1mnvsmmqb0.js.map
\ No newline at end of file
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_basic_use-strict_input_index_0nlvx9556vyf1.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/below-threshold.js"],"sourcesContent":["export const value = 2\n"],"names":["value"],"mappings":";;;;AAAO,MAAMA,QAAQ"}}]
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js"],"sourcesContent":["'use strict'\n\nconsole.log('this is CJS')\nmodule.exports = 1234\n"],"names":["console","log","module","exports"],"mappings":"AAEAA,QAAQC,GAAG,CAAC;AACZC,OAAOC,OAAO,GAAG"}}]
}
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([
"output/0rv8_turbopack-tests_tests_snapshot_basic_use-strict_input_index_06b3uhycu7sip.js",
{"otherChunks":["output/0_9x_turbopack-tests_tests_snapshot_basic_use-strict_input_index_0nlvx9556vyf1.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js [test] (ecmascript)"]}
]);
// Dummy runtime
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([
"output/0rv8_turbopack-tests_tests_snapshot_basic_use-strict_input_index_0r4xda1wnxaqk.js",
{"otherChunks":["output/1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_0czj5szeqd2rf._.js","output/1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_1wmp5yoyw-hht._.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js [test] (ecmascript)"]}
]);
// Dummy runtime
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_0czj5szeqd2rf._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict.js [test] (ecmascript, async loader)", ((__turbopack_context__) => {
__turbopack_context__.v((parentImport) => {
return Promise.all([
"output/1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_1fuq2pc5luz9r._.js"
].map((chunk) => __turbopack_context__.l(chunk))).then(() => {
return parentImport("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict.js [test] (ecmascript)");
});
});
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/below-threshold.js [test] (ecmascript, async loader)", ((__turbopack_context__) => {
__turbopack_context__.v((parentImport) => {
return Promise.all([
"output/1jsg_tests_snapshot_basic_use-strict_input_below-threshold_1my1mnvsmmqb0.js"
].map((chunk) => __turbopack_context__.l(chunk))).then(() => {
return parentImport("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/below-threshold.js [test] (ecmascript)");
});
});
}),
]);
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_1fuq2pc5luz9r._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict-a.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"a",
()=>a
]);
const a = 1;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict-b.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"b",
()=>b
]);
const b = 2;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"value",
()=>value
]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$use$2d$strict$2f$input$2f$all$2d$strict$2d$a$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict-a.js [test] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$use$2d$strict$2f$input$2f$all$2d$strict$2d$b$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict-b.js [test] (ecmascript)");
;
;
const value = __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$use$2d$strict$2f$input$2f$all$2d$strict$2d$a$2e$js__$5b$test$5d$__$28$ecmascript$29$__["a"] + __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$use$2d$strict$2f$input$2f$all$2d$strict$2d$b$2e$js__$5b$test$5d$__$28$ecmascript$29$__["b"];
}),
]);})()
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_1fuq2pc5luz9r._.js.map
\ No newline at end of file
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict-a.js"],"sourcesContent":["export const a = 1\n"],"names":["a"],"mappings":";;;;AAAO,MAAMA,IAAI"}},
{"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict-b.js"],"sourcesContent":["export const b = 2\n"],"names":["b"],"mappings":";;;;AAAO,MAAMA,IAAI"}},
{"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict.js"],"sourcesContent":["import { a } from './all-strict-a'\nimport { b } from './all-strict-b'\n\nexport const value = a + b\n"],"names":["value"],"mappings":";;;;AAAA;AACA;;;AAEO,MAAMA,QAAQ,sNAAC,GAAG,sNAAC"}}]
}
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_1wmp5yoyw-hht._.js",
(()=>{"use strict";return[
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict";
const strictA = __turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-a.js [test] (ecmascript)");
const strictB = __turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-b.js [test] (ecmascript)").default;
const sloppy = __turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/non-strict.js [test] (ecmascript)");
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/below-threshold.js [test] (ecmascript, async loader)").then(({ value })=>{
console.log('below threshold', value);
});
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/all-strict.js [test] (ecmascript, async loader)").then(({ value })=>{
console.log('all strict', value);
});
console.log('this is CJS', strictA, strictB, sloppy);
module.exports = strictA + strictB + sloppy;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-a.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict";
module.exports = 1000;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-b.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"default",
()=>__TURBOPACK__default__export__
]);
const __TURBOPACK__default__export__ = 200;
}),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/non-strict.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
module.exports = function() {
return this === globalThis ? 34 : 0;
}();
}),
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_1wmp5yoyw-hht._.js.map
\ No newline at end of file
{
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js"],"sourcesContent":["'use strict'\n\nconst strictA = require('./strict-a')\nconst strictB = require('./strict-b').default\nconst sloppy = require('./non-strict')\n\nimport('./below-threshold').then(({ value }) => {\n console.log('below threshold', value)\n})\nimport('./all-strict').then(({ value }) => {\n console.log('all strict', value)\n})\n\nconsole.log('this is CJS', strictA, strictB, sloppy)\nmodule.exports = strictA + strictB + sloppy\n"],"names":["strictA","strictB","default","sloppy","then","value","console","log","module","exports"],"mappings":"AAEA,MAAMA;AACN,MAAMC,UAAU,4IAAsBC,OAAO;AAC7C,MAAMC;AAEN,iKAA4BC,IAAI,CAAC,CAAC,EAAEC,KAAK,EAAE;IACzCC,QAAQC,GAAG,CAAC,mBAAmBF;AACjC;AACA,4JAAuBD,IAAI,CAAC,CAAC,EAAEC,KAAK,EAAE;IACpCC,QAAQC,GAAG,CAAC,cAAcF;AAC5B;AAEAC,QAAQC,GAAG,CAAC,eAAeP,SAASC,SAASE;AAC7CK,OAAOC,OAAO,GAAGT,UAAUC,UAAUE"}},
{"offset": {"line": 20, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-a.js"],"sourcesContent":["'use strict'\n\nmodule.exports = 1000\n"],"names":["module","exports"],"mappings":"AAEAA,OAAOC,OAAO,GAAG"}},
{"offset": {"line": 25, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-b.js"],"sourcesContent":["export default 200\n"],"names":[],"mappings":";;;;uCAAe"}},
{"offset": {"line": 34, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/non-strict.js"],"sourcesContent":["module.exports = (function () {\n return this === globalThis ? 34 : 0\n})()\n"],"names":["module","exports","globalThis"],"mappings":"AAAAA,OAAOC,OAAO,GAAG,AAAC;IAChB,OAAO,IAAI,KAAKC,aAAa,KAAK;AACpC"}}]
}
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_comptime_cross-module-attribute_input_0scutbfo13k0p._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_comptime_cross-module-attribute_input_0scutbfo13k0p._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/cross-module-attribute/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -57,6 +57,6 @@ __turbopack_context__.s([
const lower = 'lowercase';
const UPPER = 'UPPER';
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_comptime_cross-module-attribute_input_0scutbfo13k0p._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_comptime_cross-module-barrel_input_0pg1--73_0gbu._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_comptime_cross-module-barrel_input_0pg1--73_0gbu._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/cross-module-barrel/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -28,6 +28,6 @@ function foo() {
return 123;
}
}),
]);})()
]);
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_comptime_cross-module-barrel_input_0pg1--73_0gbu._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_comptime_cross-module-cycle-constant_input_13shj11lx78r9._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_comptime_cross-module-cycle-constant_input_13shj11lx78r9._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/cross-module-cycle-constant/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -29,6 +29,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
const TWO = '2' + __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$comptime$2f$cross$2d$module$2d$cycle$2d$constant$2f$input$2f$multiple$2d$1$2e$js__$5b$test$5d$__$28$ecmascript$29$__["ONE"];
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_comptime_cross-module-cycle-constant_input_13shj11lx78r9._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_comptime_cross-module-cycle-dynamic_input_0y6rllfq_jecq._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_comptime_cross-module-cycle-dynamic_input_0y6rllfq_jecq._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/cross-module-cycle-dynamic/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -54,6 +54,6 @@ function foo1(left, right) {
}
;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_comptime_cross-module-cycle-dynamic_input_0y6rllfq_jecq._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_comptime_cross-module-imported_input_1h-za4-_ttkv-._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_comptime_cross-module-imported_input_1h-za4-_ttkv-._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/cross-module-imported/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -45,6 +45,6 @@ __turbopack_context__.s([
const REEXPORTED = 'reexported';
const IMPORTED_EXPORTED = 'imported exported';
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_comptime_cross-module-imported_input_1h-za4-_ttkv-._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_comptime_cross-module-long-literals_input_1dlt5gz60hx2n._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_comptime_cross-module-long-literals_input_1dlt5gz60hx2n._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/cross-module-long-literals/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -52,6 +52,6 @@ const REGEX = /ab/i;
const NAN = NaN;
const INFINITY = Infinity;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_comptime_cross-module-long-literals_input_1dlt5gz60hx2n._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_comptime_cross-module-strict_input_0lz7wh6sby-77._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_comptime_cross-module-strict_input_0lz7wh6sby-77._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/cross-module-strict/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -51,6 +51,6 @@ const LONG_NUMBER = 21345672345678345678901234567890;
const LONG_BIG_NUMBER = 21345672345678345678901234567890n;
const LONG_REGEX = /abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789/i;
}),
]);})()
]);
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_comptime_cross-module-strict_input_0lz7wh6sby-77._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_comptime_early-return_input_00p0fdz0d5nhi._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_comptime_early-return_input_00p0fdz0d5nhi._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/early-return/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -226,6 +226,6 @@ z1();
return;
z2();
}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_comptime_early-return_input_00p0fdz0d5nhi._.js.map
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_comptime_typeof_input_1y4b353ijz1yk._.js",
(()=>{"use strict";return[
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var __TURBOPACK__import$2e$meta__ = {
get url () {
return __turbopack_context__.F("turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js");
},
env: {
DEV: true,
PROD: false,
MODE: "development",
BASE_URL: "/",
SSR: false
}
};
console.log('typeof require', ("TURBOPACK compile-time value", "function"));
console.log('typeof import.meta', ("TURBOPACK compile-time value", "object"));
// CJS, should be `object`
console.log('typeof module', ("TURBOPACK compile-time value", "object"));
console.log('typeof exports', ("TURBOPACK compile-time value", "object"));
// CJS, should be real require
console.log(/*TURBOPACK member replacement*/ __turbopack_context__.t);
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/dep.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-automatic.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -60,32 +84,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
;
;
}),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var __TURBOPACK__import$2e$meta__ = {
get url () {
return __turbopack_context__.F("turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js");
},
env: {
DEV: true,
PROD: false,
MODE: "development",
BASE_URL: "/",
SSR: false
}
};
console.log('typeof require', ("TURBOPACK compile-time value", "function"));
console.log('typeof import.meta', ("TURBOPACK compile-time value", "object"));
// CJS, should be `object`
console.log('typeof module', ("TURBOPACK compile-time value", "object"));
console.log('typeof exports', ("TURBOPACK compile-time value", "object"));
// CJS, should be real require
console.log(/*TURBOPACK member replacement*/ __turbopack_context__.t);
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/dep.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
}),
]);
......
......@@ -2,9 +2,9 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-automatic.js"],"sourcesContent":["import './dep.js'\n\nconsole.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// ESM, should be `undefined`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// ESM, should be require stub\nconsole.log(require)\n"],"names":["console","log"],"mappings":";AAAA;;;;;;;;;;;;;;AAEAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,6BAA6B;AAC7BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}},
{"offset": {"line": 31, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-specified.mjs"],"sourcesContent":["console.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// ESM, should be `undefined`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// ESM, should be require stub\nconsole.log(require)\n"],"names":["console","log"],"mappings":";;;;;;;;;;;;;AAAAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,6BAA6B;AAC7BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}},
{"offset": {"line": 55, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/index.js"],"sourcesContent":["import './cjs.js'\nimport './esm-automatic.js'\nimport './esm-specified.mjs'\n"],"names":[],"mappings":";AAAA;AACA;AACA"}},
{"offset": {"line": 66, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js"],"sourcesContent":["console.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// CJS, should be `object`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// CJS, should be real require\nconsole.log(require)\n"],"names":["console","log"],"mappings":";;;;;;;;;;;;AAAAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,0BAA0B;AAC1BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}},
{"offset": {"line": 88, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js"],"sourcesContent":["console.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// CJS, should be `object`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// CJS, should be real require\nconsole.log(require)\n"],"names":["console","log"],"mappings":";;;;;;;;;;;;AAAAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,0BAA0B;AAC1BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}},
{"offset": {"line": 25, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 29, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-automatic.js"],"sourcesContent":["import './dep.js'\n\nconsole.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// ESM, should be `undefined`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// ESM, should be require stub\nconsole.log(require)\n"],"names":["console","log"],"mappings":";AAAA;;;;;;;;;;;;;;AAEAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,6BAA6B;AAC7BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}},
{"offset": {"line": 55, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-specified.mjs"],"sourcesContent":["console.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// ESM, should be `undefined`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// ESM, should be require stub\nconsole.log(require)\n"],"names":["console","log"],"mappings":";;;;;;;;;;;;;AAAAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,6BAA6B;AAC7BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}},
{"offset": {"line": 79, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/index.js"],"sourcesContent":["import './cjs.js'\nimport './esm-automatic.js'\nimport './esm-specified.mjs'\n"],"names":[],"mappings":";AAAA;AACA;AACA"}}]
}
\ No newline at end of file
;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="c43766b6-b61f-49ce-2bc6-d270f17e82af")}catch(e){}}();
;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="27e79154-4c35-f7a9-c994-62f22c7bd695")}catch(e){}}();
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([
"output/0rv8_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0bjegbrfzt05o.js",
{"otherChunks":["output/0_9x_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_03ibyvsq4xsbk.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/input/index.js [test] (ecmascript)"]}
......@@ -550,16 +550,14 @@ contextPrototype.f = moduleContext;
*/ function getChunkPath(chunkData) {
return typeof chunkData === 'string' ? chunkData : chunkData.path;
}
// Load the CompressedModuleFactories of a chunk into the `moduleFactories` Map.
// The flat format alternates one or more module IDs with their factory function.
// Strict factories can be prepended as a nested array.
// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
// The CompressedModuleFactories format is
// - 1 or more module ids
// - a module factory function
// So walking this is a little complex but the flat structure is also fast to
// traverse, we can use `typeof` operators to distinguish the two cases.
function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
let i = offset;
const strictFactories = chunkModules[i];
if (Array.isArray(strictFactories)) {
installCompressedModuleFactories(strictFactories, 0, moduleFactories, newModuleId);
i++;
}
while(i < chunkModules.length){
let end = i + 1;
// Find our factory function
......@@ -598,7 +596,7 @@ function installCompressedModuleFactories(chunkModules, offset, moduleFactories,
newModuleId?.(id);
}
}
i = end + 1;
i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array.
}
}
/**
......@@ -2614,5 +2612,5 @@ chunkListsToRegister.forEach(registerChunkList);
})();
//# debugId=c43766b6-b61f-49ce-2bc6-d270f17e82af
//# debugId=27e79154-4c35-f7a9-c994-62f22c7bd695
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0bjegbrfzt05o.js.map
\ No newline at end of file
......@@ -527,16 +527,14 @@ contextPrototype.f = moduleContext;
*/ function getChunkPath(chunkData) {
return typeof chunkData === 'string' ? chunkData : chunkData.path;
}
// Load the CompressedModuleFactories of a chunk into the `moduleFactories` Map.
// The flat format alternates one or more module IDs with their factory function.
// Strict factories can be prepended as a nested array.
// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
// The CompressedModuleFactories format is
// - 1 or more module ids
// - a module factory function
// So walking this is a little complex but the flat structure is also fast to
// traverse, we can use `typeof` operators to distinguish the two cases.
function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
let i = offset;
const strictFactories = chunkModules[i];
if (Array.isArray(strictFactories)) {
installCompressedModuleFactories(strictFactories, 0, moduleFactories, newModuleId);
i++;
}
while(i < chunkModules.length){
let end = i + 1;
// Find our factory function
......@@ -575,7 +573,7 @@ function installCompressedModuleFactories(chunkModules, offset, moduleFactories,
newModuleId?.(id);
}
}
i = end + 1;
i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array.
}
}
/**
......
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_1xzb8pohmqk06._.js",
(()=>{"use strict";return[
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/emotion/emotion/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -49,7 +48,6 @@ function jsxDEV() {
return 'purposefully empty stub for @emotion/react/jsx-dev-runtime.js';
}
}),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
"purposefully empty stub";
......
......@@ -2,8 +2,8 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/emotion/emotion/input/index.js"],"sourcesContent":["/** @jsxImportSource @emotion/react */\n\nimport { jsx } from '@emotion/react'\nimport styled from '@emotion/styled'\n\nconst StyledButton = styled.button`\n background: blue;\n`\n\nfunction ClassNameButton({ children }) {\n return (\n <button\n className={css`\n background: blue;\n `}\n >\n {children}\n </button>\n )\n}\n\nconsole.log(StyledButton, ClassNameButton)\n"],"names":["StyledButton","ClassNameButton","children","className","css","console","log"],"mappings":";;AAAA,oCAAoC,GAEpC;AACA;;;;AAEA,MAAMA,iCAAe,mNAAM;;;AAI3B,SAASC,gBAAgB,EAAEC,QAAQ,EAAE;IACnC,qBACE,uOAAC;QACCC,WAAWC,GAAG,CAAC;;MAEf,CAAC;kBAEAF;;;;;;AAGP;AAEAG,QAAQC,GAAG,CAACN,cAAcC"}},
{"offset": {"line": 32, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/index.js"],"sourcesContent":["export function jsx() {\n return 'purposefully empty stub for @emotion/react/index.js'\n}\n"],"names":["jsx"],"mappings":";;;;AAAO,SAASA;IACd,OAAO;AACT","ignoreList":[0]}},
{"offset": {"line": 43, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/jsx-dev-runtime.js"],"sourcesContent":["export function jsxDEV() {\n return 'purposefully empty stub for @emotion/react/jsx-dev-runtime.js'\n}\n"],"names":["jsxDEV"],"mappings":";;;;AAAO,SAASA;IACd,OAAO;AACT","ignoreList":[0]}},
{"offset": {"line": 54, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js"],"sourcesContent":["\"purposefully empty stub\";\n\"@emtion/styled/index.js\";\n"],"names":[],"mappings":"AAAA;AACA","ignoreList":[0]}}]
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/emotion/emotion/input/index.js"],"sourcesContent":["/** @jsxImportSource @emotion/react */\n\nimport { jsx } from '@emotion/react'\nimport styled from '@emotion/styled'\n\nconst StyledButton = styled.button`\n background: blue;\n`\n\nfunction ClassNameButton({ children }) {\n return (\n <button\n className={css`\n background: blue;\n `}\n >\n {children}\n </button>\n )\n}\n\nconsole.log(StyledButton, ClassNameButton)\n"],"names":["StyledButton","ClassNameButton","children","className","css","console","log"],"mappings":";;AAAA,oCAAoC,GAEpC;AACA;;;;AAEA,MAAMA,iCAAe,mNAAM;;;AAI3B,SAASC,gBAAgB,EAAEC,QAAQ,EAAE;IACnC,qBACE,uOAAC;QACCC,WAAWC,GAAG,CAAC;;MAEf,CAAC;kBAEAF;;;;;;AAGP;AAEAG,QAAQC,GAAG,CAACN,cAAcC"}},
{"offset": {"line": 31, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/index.js"],"sourcesContent":["export function jsx() {\n return 'purposefully empty stub for @emotion/react/index.js'\n}\n"],"names":["jsx"],"mappings":";;;;AAAO,SAASA;IACd,OAAO;AACT","ignoreList":[0]}},
{"offset": {"line": 42, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/jsx-dev-runtime.js"],"sourcesContent":["export function jsxDEV() {\n return 'purposefully empty stub for @emotion/react/jsx-dev-runtime.js'\n}\n"],"names":["jsxDEV"],"mappings":";;;;AAAO,SAASA;IACd,OAAO;AACT","ignoreList":[0]}},
{"offset": {"line": 52, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js"],"sourcesContent":["\"purposefully empty stub\";\n\"@emtion/styled/index.js\";\n"],"names":[],"mappings":"AAAA;AACA","ignoreList":[0]}}]
}
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_212xd9jyjh6hy._.js",
(()=>{"use strict";return[
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -19,6 +18,11 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
__turbopack_context__.j(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$export$2d$alls$2f$cjs$2d$2$2f$input$2f$commonjs$2e$js__$5b$test$5d$__$28$ecmascript$29$__);
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
// commonjs.js
exports.hello = 'World';
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -28,12 +32,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
console.log(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$export$2d$alls$2f$cjs$2d$2$2f$input$2f$b$2e$js__$5b$test$5d$__$28$ecmascript$29$__);
}),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
// commonjs.js
exports.hello = 'World';
}),
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_212xd9jyjh6hy._.js.map
\ No newline at end of file
......@@ -2,8 +2,8 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js"],"sourcesContent":["// b.js\nexport * from './c'\n// This would not be handled, but still need __turbopack__cjs__\n// as there are properties dynamically added by __turbopack__cjs__ in c.js\n"],"names":[],"mappings":";AAAA,OAAO;AACP,kVACA,+DAA+D;CAC/D,0EAA0E"}},
{"offset": {"line": 15, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/c.js"],"sourcesContent":["// c.js\nexport * from './commonjs.js'\n// This would be handled by existing logic\n"],"names":[],"mappings":";AAAA,OAAO;AACP,gWACA,0CAA0C"}},
{"offset": {"line": 24, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/index.js"],"sourcesContent":["// a.js\nimport * as B from './b'\nconsole.log(B)\n"],"names":["console","log","imported module [project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js [test] (ecmascript)"],"mappings":";AAAA,OAAO;AACP;;AACAA,QAAQC,GAAG,CAACC"}},
{"offset": {"line": 33, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js"],"sourcesContent":["// commonjs.js\nexports.hello = 'World'\n"],"names":["exports","hello"],"mappings":"AAAA,cAAc;AACdA,QAAQC,KAAK,GAAG"}}]
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js"],"sourcesContent":["// b.js\nexport * from './c'\n// This would not be handled, but still need __turbopack__cjs__\n// as there are properties dynamically added by __turbopack__cjs__ in c.js\n"],"names":[],"mappings":";AAAA,OAAO;AACP,kVACA,+DAA+D;CAC/D,0EAA0E"}},
{"offset": {"line": 14, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/c.js"],"sourcesContent":["// c.js\nexport * from './commonjs.js'\n// This would be handled by existing logic\n"],"names":[],"mappings":";AAAA,OAAO;AACP,gWACA,0CAA0C"}},
{"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js"],"sourcesContent":["// commonjs.js\nexports.hello = 'World'\n"],"names":["exports","hello"],"mappings":"AAAA,cAAc;AACdA,QAAQC,KAAK,GAAG"}},
{"offset": {"line": 28, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/index.js"],"sourcesContent":["// a.js\nimport * as B from './b'\nconsole.log(B)\n"],"names":["console","log","imported module [project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js [test] (ecmascript)"],"mappings":";AAAA,OAAO;AACP;;AACAA,QAAQC,GAAG,CAACC"}}]
}
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_import-meta_esm-multiple_input_0__oir9q6_sm5._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_import-meta_esm-multiple_input_0__oir9q6_sm5._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -31,6 +31,6 @@ function bar() {
foo();
bar();
}),
]);})()
]);
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_import-meta_esm-multiple_input_0__oir9q6_sm5._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_import-meta_esm-mutable_input_20u-wgbvzfds9._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_import-meta_esm-mutable_input_20u-wgbvzfds9._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -24,6 +24,6 @@ var __TURBOPACK__import$2e$meta__ = {
};
__TURBOPACK__import$2e$meta__.foo = 1;
}),
]);})()
]);
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_import-meta_esm-mutable_input_20u-wgbvzfds9._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_import-meta_esm-object_input_0akuaiya2a112._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_import-meta_esm-object_input_0akuaiya2a112._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -24,6 +24,6 @@ var __TURBOPACK__import$2e$meta__ = {
};
console.log(__TURBOPACK__import$2e$meta__);
}),
]);})()
]);
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_import-meta_esm-object_input_0akuaiya2a112._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_import-meta_esm_input_0m4yc4rpllbvz._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_import-meta_esm_input_0m4yc4rpllbvz._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -24,6 +24,6 @@ var __TURBOPACK__import$2e$meta__ = {
};
console.log(__TURBOPACK__import$2e$meta__.url);
}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_import-meta_esm_input_0m4yc4rpllbvz._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_imports_duplicate-binding_input_05k3-r-zlo2y8._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_imports_duplicate-binding_input_05k3-r-zlo2y8._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -23,6 +23,6 @@ const Table = ()=>{
return 'table';
};
}),
]);})()
]);
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_imports_duplicate-binding_input_05k3-r-zlo2y8._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_imports_order_input_1wfk3l4bfp2ys._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_imports_order_input_1wfk3l4bfp2ys._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/order/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -21,6 +21,6 @@ const __TURBOPACK__default__export__ = {
js: true
};
}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_imports_order_input_1wfk3l4bfp2ys._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_imports_static-and-dynamic_input_0dm2mkcc8iok2._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_imports_static-and-dynamic_input_0dm2mkcc8iok2._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -17,6 +17,6 @@ __turbopack_context__.s([
]);
const __TURBOPACK__default__export__ = 'turbopack';
}),
]);})()
]);
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_imports_static-and-dynamic_input_0dm2mkcc8iok2._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_intermediate-tree-shake_reexport-with-locals_input_0fa40prz2spda._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_intermediate-tree-shake_reexport-with-locals_input_0fa40prz2spda._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/reexport-with-locals/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -49,6 +49,6 @@ __turbopack_context__.s([]);
function unusedStar() {}
__turbopack_context__.s([]);
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_intermediate-tree-shake_reexport-with-locals_input_0fa40prz2spda._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/154e_intermediate-tree-shake_rename-side-effect-free-facade_input_1nl1qrj_-qqwu._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/154e_intermediate-tree-shake_rename-side-effect-free-facade_input_1nl1qrj_-qqwu._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/rename-side-effect-free-facade/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -27,6 +27,6 @@ __turbopack_context__.s([
()=>__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$intermediate$2d$tree$2d$shake$2f$rename$2d$side$2d$effect$2d$free$2d$facade$2f$input$2f$node_modules$2f$lib$2f$a$2e$js__$5b$test$5d$__$28$ecmascript$29$__["a"]
]);
}),
]);})()
]);
//# sourceMappingURL=154e_intermediate-tree-shake_rename-side-effect-free-facade_input_1nl1qrj_-qqwu._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_intermediate-tree-shake_tree-shake-test-1_input_1mlxku40v_-py._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_intermediate-tree-shake_tree-shake-test-1_input_1mlxku40v_-py._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/tree-shake-test-1/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -27,6 +27,6 @@ __turbopack_context__.s([
getCat
]);
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_intermediate-tree-shake_tree-shake-test-1_input_1mlxku40v_-py._.js.map
\ No newline at end of file
(()=>{"use strict";module.exports=["[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/escaping.js [test] (ecmascript)",t=>{t.s(["anotherLongExportName",0,"long-2","someLongExportName",0,"long-1"])},"[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/index.js [test] (ecmascript)",t=>{var s=t.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/escaping.js [test] (ecmascript)"),e=t.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/mangled.js [test] (ecmascript)");console.log(s,e.z,e.T),t.s([])},"[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/mangled.js [test] (ecmascript)",t=>{t.s(["T",0,"mangled-2","z",0,"mangled-1"])}]})();
module.exports=["[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/escaping.js [test] (ecmascript)",t=>{"use strict";t.s(["anotherLongExportName",0,"long-2","someLongExportName",0,"long-1"])},"[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/index.js [test] (ecmascript)",t=>{"use strict";var s=t.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/escaping.js [test] (ecmascript)"),e=t.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/mangled.js [test] (ecmascript)");console.log(s,e.z,e.T),t.s([])},"[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/mangled.js [test] (ecmascript)",t=>{"use strict";t.s(["T",0,"mangled-2","z",0,"mangled-1"])}];
//# sourceMappingURL=1jsg_tests_snapshot_mangle-exports_escaping-namespace_input_1ysta134r3dyz._.js.map
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/escaping.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/index.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/mangled.js"],"sourcesContent":["// A namespace object of this module escapes, so it keeps its original export names.\nexport const someLongExportName = 'long-1'\nexport const anotherLongExportName = 'long-2'\n","import * as escaping from './escaping.js'\nimport { someLongExportName, anotherLongExportName } from './mangled.js'\n\nconst leak = () => escaping\n\nconsole.log(leak(), someLongExportName, anotherLongExportName)\n","// Nothing escapes here, so this module in the same graph is still mangled.\nexport const someLongExportName = 'mangled-1'\nexport const anotherLongExportName = 'mangled-2'\n"],"names":["someLongExportName","anotherLongExportName","leak","imported module [project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/escaping.js [test] (ecmascript)","console","log"],"mappings":"0MAEqC,gCADH,iJCDlC,IAAA,EAAA,EAAA,CAAA,CAAA,qIACA,EAAA,EAAA,CAAA,CAAA,oIAIAI,QAAQC,GAAG,CAFQF,AAEPD,EAAQ,EAAA,CAAkB,CAAE,EAAA,CAAqB,6JCHxB,kBADH"}
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/escaping.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/index.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/mangled.js"],"sourcesContent":["// A namespace object of this module escapes, so it keeps its original export names.\nexport const someLongExportName = 'long-1'\nexport const anotherLongExportName = 'long-2'\n","import * as escaping from './escaping.js'\nimport { someLongExportName, anotherLongExportName } from './mangled.js'\n\nconst leak = () => escaping\n\nconsole.log(leak(), someLongExportName, anotherLongExportName)\n","// Nothing escapes here, so this module in the same graph is still mangled.\nexport const someLongExportName = 'mangled-1'\nexport const anotherLongExportName = 'mangled-2'\n"],"names":["someLongExportName","anotherLongExportName","leak","imported module [project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/escaping-namespace/input/escaping.js [test] (ecmascript)","console","log"],"mappings":"oMAEqC,gCADH,8JCDlC,IAAA,EAAA,EAAA,CAAA,CAAA,qIACA,EAAA,EAAA,CAAA,CAAA,oIAIAI,QAAQC,GAAG,CAFQF,AAEPD,EAAQ,EAAA,CAAkB,CAAE,EAAA,CAAqB,0KCHxB,kBADH"}
\ No newline at end of file
(()=>{"use strict";module.exports=["[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/named-and-preserved/input/index.js [test] (ecmascript)",t=>{var e=t.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/named-and-preserved/input/lib.js [test] (ecmascript)");console.log(e.a,e.$,e.z,e.T,(0,e.X)()),t.s([])},"[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/named-and-preserved/input/lib.js [test] (ecmascript)",t=>{t.s(["a",0,"a","X",0,function(){return"fn"},"T",0,"long-2","$",0,"bb","z",0,"long-1"])}]})();
module.exports=["[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/named-and-preserved/input/index.js [test] (ecmascript)",t=>{"use strict";var s=t.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/named-and-preserved/input/lib.js [test] (ecmascript)");console.log(s.a,s.$,s.z,s.T,(0,s.X)()),t.s([])},"[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/named-and-preserved/input/lib.js [test] (ecmascript)",t=>{"use strict";t.s(["a",0,"a","X",0,function(){return"fn"},"T",0,"long-2","$",0,"bb","z",0,"long-1"])}];
//# sourceMappingURL=1jsg_tests_snapshot_mangle-exports_named-and-preserved_input_0pbreftkp_5pc._.js.map
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/named-and-preserved/input/index.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/named-and-preserved/input/lib.js"],"sourcesContent":["import {\n a,\n bb,\n someLongExportName,\n anotherLongExportName,\n aLongFunctionName,\n} from './lib.js'\n\nconsole.log(\n a,\n bb,\n someLongExportName,\n anotherLongExportName,\n aLongFunctionName()\n)\n","export const a = 'a'\nexport const bb = 'bb'\nexport const someLongExportName = 'long-1'\nexport const anotherLongExportName = 'long-2'\nexport const unusedLongExportName = 'unused'\n\nexport function aLongFunctionName() {\n return 'fn'\n}\n"],"names":["console","log","a","bb","someLongExportName","anotherLongExportName","unusedLongExportName","aLongFunctionName"],"mappings":"yKAAA,IAAA,EAAA,EAAA,CAAA,CAAA,iIAQAA,QAAQC,GAAG,CACT,EAAA,CAAC,CACD,EAAA,CAAE,CACF,EAAA,CAAkB,CAClB,EAAA,CAAqB,CACrB,CAAA,EAAA,EAAA,CAAA,AAAiB,6JCbF,UAMV,SAASM,EACd,MAAO,IACT,QALqC,eAFnB,WACgB"}
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/named-and-preserved/input/index.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/named-and-preserved/input/lib.js"],"sourcesContent":["import {\n a,\n bb,\n someLongExportName,\n anotherLongExportName,\n aLongFunctionName,\n} from './lib.js'\n\nconsole.log(\n a,\n bb,\n someLongExportName,\n anotherLongExportName,\n aLongFunctionName()\n)\n","export const a = 'a'\nexport const bb = 'bb'\nexport const someLongExportName = 'long-1'\nexport const anotherLongExportName = 'long-2'\nexport const unusedLongExportName = 'unused'\n\nexport function aLongFunctionName() {\n return 'fn'\n}\n"],"names":["console","log","a","bb","someLongExportName","anotherLongExportName","unusedLongExportName","aLongFunctionName"],"mappings":"mKAAA,IAAA,EAAA,EAAA,CAAA,CAAA,iIAQAA,QAAQC,GAAG,CACT,EAAA,CAAC,CACD,EAAA,CAAE,CACF,EAAA,CAAkB,CAClB,EAAA,CAAqB,CACrB,CAAA,EAAA,EAAA,CAAA,AAAiB,0KCbF,UAMV,SAASM,EACd,MAAO,IACT,QALqC,eAFnB,WACgB"}
\ No newline at end of file
(()=>{"use strict";module.exports=["[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/single-export/input/index.js [test] (ecmascript)",t=>{console.log((0,t.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/single-export/input/lone.js [test] (ecmascript)").f)()),t.s([])},"[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/single-export/input/lone.js [test] (ecmascript)",t=>{t.s(["f",0,function(){return"lone"}])}]})();
module.exports=["[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/single-export/input/index.js [test] (ecmascript)",t=>{"use strict";console.log((0,t.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/single-export/input/lone.js [test] (ecmascript)").f)()),t.s([])},"[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/single-export/input/lone.js [test] (ecmascript)",t=>{"use strict";t.s(["f",0,function(){return"lone"}])}];
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_mangle-exports_single-export_input_1mf78g4ogdhgv._.js.map
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/single-export/input/index.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/single-export/input/lone.js"],"sourcesContent":["import { aLongFunctionNameNobodyWantsInTheBundle } from './lone'\n\nconsole.log(aLongFunctionNameNobodyWantsInTheBundle())\n","// The only export of this module. It is emitted under the fixed single-export key rather than a\n// hashed one, so that every single-export module in the graph produces the same `.f` byte sequence\n// and gzip can share it. Visible in the committed output below.\nexport function aLongFunctionNameNobodyWantsInTheBundle() {\n return 'lone'\n}\n"],"names":["console","log","aLongFunctionNameNobodyWantsInTheBundle"],"mappings":"mKAEAA,QAAQC,GAAG,CAAC,CAAA,EAFZ,AAEY,EAFZ,CAAA,CAAA,4HAEY,CAAA,AAAuC,wJCC5C,SAASC,EACd,MAAO,MACT"}
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/single-export/input/index.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/mangle-exports/single-export/input/lone.js"],"sourcesContent":["import { aLongFunctionNameNobodyWantsInTheBundle } from './lone'\n\nconsole.log(aLongFunctionNameNobodyWantsInTheBundle())\n","// The only export of this module. It is emitted under the fixed single-export key rather than a\n// hashed one, so that every single-export module in the graph produces the same `.f` byte sequence\n// and gzip can share it. Visible in the committed output below.\nexport function aLongFunctionNameNobodyWantsInTheBundle() {\n return 'lone'\n}\n"],"names":["console","log","aLongFunctionNameNobodyWantsInTheBundle"],"mappings":"6JAEAA,QAAQC,GAAG,CAAC,CAAA,EAFZ,AAEY,EAFZ,CAAA,CAAA,4HAEY,CAAA,AAAuC,qKCC5C,SAASC,EACd,MAAO,MACT"}
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_node_spawn_dynamic_input_0ow1swaxdiv8b._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_node_spawn_dynamic_input_0ow1swaxdiv8b._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -23,6 +23,6 @@ function spawn(cmd, args) {
//
}
}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_node_spawn_dynamic_input_0ow1swaxdiv8b._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_node_spawn_node_eval_input_2055vpqzks2dy._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_node_spawn_node_eval_input_2055vpqzks2dy._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -21,6 +21,6 @@ function spawn(cmd, args) {
//
}
}),
]);})()
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_node_spawn_node_eval_input_2055vpqzks2dy._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_reexport-registration_comma-name_input_0ccl38l1mvgtd._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_reexport-registration_comma-name_input_0ccl38l1mvgtd._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/reexport-registration/comma-name/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -24,6 +24,6 @@ const value = 'comma-value';
const plain = 'plain-value';
;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_reexport-registration_comma-name_input_0ccl38l1mvgtd._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_reexport-registration_facade-all-reexports_input_1oc31h4h4q924._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_reexport-registration_facade-all-reexports_input_1oc31h4h4q924._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/reexport-registration/facade-all-reexports/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -66,6 +66,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$reexport$2d$registration$2f$facade$2d$all$2d$reexports$2f$input$2f$order$2e$js__$5b$test$5d$__$28$ecmascript$29$__["order"].push('y');
const y = 'y';
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_reexport-registration_facade-all-reexports_input_1oc31h4h4q924._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0p5q_snapshot_reexport-registration_facade-scope-hoisted-shared_input_1eumi0vat9fx1._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0p5q_snapshot_reexport-registration_facade-scope-hoisted-shared_input_1eumi0vat9fx1._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/reexport-registration/facade-scope-hoisted-shared/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -31,7 +31,7 @@ __turbopack_context__.s([
]);
const x = 'x';
}),
]);})()(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([
]);(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([
"output/17f0_snapshot_reexport-registration_facade-scope-hoisted-shared_input_1uvpd4s77o2u3._.js",
{"otherChunks":[],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/reexport-registration/facade-scope-hoisted-shared/input/index.js [test] (ecmascript)"]}
]);
......
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_reexport-registration_mixed-encoding_input_1rptxwi6ak5m1._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_reexport-registration_mixed-encoding_input_1rptxwi6ak5m1._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/reexport-registration/mixed-encoding/input/first.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -39,6 +39,6 @@ __turbopack_context__.s([
]);
const c = 'c-value';
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_reexport-registration_mixed-encoding_input_1rptxwi6ak5m1._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_reexport-registration_plain-reexports_input_01u9pft4u-jgg._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_reexport-registration_plain-reexports_input_01u9pft4u-jgg._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/reexport-registration/plain-reexports/input/a.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -24,6 +24,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
;
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_reexport-registration_plain-reexports_input_01u9pft4u-jgg._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_reexport-registration_two-sources_input_0yi379fq8b8cq._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_reexport-registration_two-sources_input_0yi379fq8b8cq._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/reexport-registration/two-sources/input/first.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -39,6 +39,6 @@ __turbopack_context__.s([
]);
const c = 'c-value';
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_reexport-registration_two-sources_input_0yi379fq8b8cq._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_remove-unused-imports_exports_input_07rt4kfe5xt7p._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_remove-unused-imports_exports_input_07rt4kfe5xt7p._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/exports/input/a.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -72,6 +72,6 @@ __turbopack_context__.s([
y
]);
}),
]);})()
]);
//# sourceMappingURL=1jsg_tests_snapshot_remove-unused-imports_exports_input_07rt4kfe5xt7p._.js.map
\ No newline at end of file
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["output/1jsg_tests_snapshot_remove-unused-imports_star-import-string-key_input_03-1fx5_29uet._.js","[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/star-import-string-key/input/index.js [test] (ecmascript)",t=>{console.log(t.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/star-import-string-key/input/lit.js [test] (ecmascript)").foo),t.s([])},"[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/star-import-string-key/input/lit.js [test] (ecmascript)",t=>{t.s(["foo",0,function(){}])}])})();
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["output/1jsg_tests_snapshot_remove-unused-imports_star-import-string-key_input_03-1fx5_29uet._.js","[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/star-import-string-key/input/index.js [test] (ecmascript)",t=>{"use strict";console.log(t.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/star-import-string-key/input/lit.js [test] (ecmascript)").foo),t.s([])},"[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/star-import-string-key/input/lit.js [test] (ecmascript)",t=>{"use strict";t.s(["foo",0,function(){}])}]);
//# sourceMappingURL=1jsg_tests_snapshot_remove-unused-imports_star-import-string-key_input_03-1fx5_29uet._.js.map
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/star-import-string-key/input/index.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/star-import-string-key/input/lit.js"],"sourcesContent":["import * as lit from './lit.js'\n\n// A string-literal key narrows to `foo`, so `unused` leaves the bundle.\nconsole.log(lit['foo'])\n","export function foo() {}\nexport function unused() {}\n"],"names":["console","log","foo","unused"],"mappings":"8TAGAA,QAAQC,GAAG,CAHX,AAGY,EAHZ,CAAA,CAAA,2IAGY,GAAU,sKCHf,SAASC,EAAO"}
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/star-import-string-key/input/index.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/star-import-string-key/input/lit.js"],"sourcesContent":["import * as lit from './lit.js'\n\n// A string-literal key narrows to `foo`, so `unused` leaves the bundle.\nconsole.log(lit['foo'])\n","export function foo() {}\nexport function unused() {}\n"],"names":["console","log","foo","unused"],"mappings":"wTAGAA,QAAQC,GAAG,CAHX,AAGY,EAHZ,CAAA,CAAA,2IAGY,GAAU,mLCHf,SAASC,EAAO"}
\ No newline at end of file
......@@ -527,16 +527,14 @@ contextPrototype.f = moduleContext;
*/ function getChunkPath(chunkData) {
return typeof chunkData === 'string' ? chunkData : chunkData.path;
}
// Load the CompressedModuleFactories of a chunk into the `moduleFactories` Map.
// The flat format alternates one or more module IDs with their factory function.
// Strict factories can be prepended as a nested array.
// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
// The CompressedModuleFactories format is
// - 1 or more module ids
// - a module factory function
// So walking this is a little complex but the flat structure is also fast to
// traverse, we can use `typeof` operators to distinguish the two cases.
function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
let i = offset;
const strictFactories = chunkModules[i];
if (Array.isArray(strictFactories)) {
installCompressedModuleFactories(strictFactories, 0, moduleFactories, newModuleId);
i++;
}
while(i < chunkModules.length){
let end = i + 1;
// Find our factory function
......@@ -575,7 +573,7 @@ function installCompressedModuleFactories(chunkModules, offset, moduleFactories,
newModuleId?.(id);
}
}
i = end + 1;
i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array.
}
}
/**
......
......@@ -549,16 +549,14 @@ contextPrototype.f = moduleContext;
*/ function getChunkPath(chunkData) {
return typeof chunkData === 'string' ? chunkData : chunkData.path;
}
// Load the CompressedModuleFactories of a chunk into the `moduleFactories` Map.
// The flat format alternates one or more module IDs with their factory function.
// Strict factories can be prepended as a nested array.
// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
// The CompressedModuleFactories format is
// - 1 or more module ids
// - a module factory function
// So walking this is a little complex but the flat structure is also fast to
// traverse, we can use `typeof` operators to distinguish the two cases.
function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
let i = offset;
const strictFactories = chunkModules[i];
if (Array.isArray(strictFactories)) {
installCompressedModuleFactories(strictFactories, 0, moduleFactories, newModuleId);
i++;
}
while(i < chunkModules.length){
let end = i + 1;
// Find our factory function
......@@ -597,7 +595,7 @@ function installCompressedModuleFactories(chunkModules, offset, moduleFactories,
newModuleId?.(id);
}
}
i = end + 1;
i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array.
}
}
/**
......
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_source_maps_input-source-map_input_0n-g1xc4-d7nb._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_source_maps_input-source-map_input_0n-g1xc4-d7nb._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/input-source-map/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -18,6 +18,6 @@ function runExternalSourceMapped(fn) {
return fn();
}
}),
]);})()
]);
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_source_maps_input-source-map_input_0n-g1xc4-d7nb._.js.map
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_source_maps_merged-unicode_input_1tq4mpj1076n4._.js",
(()=>{"use strict";return[
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -22,21 +21,6 @@ const waitAtLeastOneReactRenderTask = 1; //import { waitAtLeastOneReactRenderTas
;
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index1.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$source_maps$2f$merged$2d$unicode$2f$input$2f$entry$2d$base$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)");
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$source_maps$2f$merged$2d$unicode$2f$input$2f$entry$2d$base$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)");
;
}),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
// "entry-base.js [app-rsc] (ecmascript) <module evaluation>" with
......@@ -58,6 +42,20 @@ if (Date.now() > 0) {
__turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js [test] (ecmascript)");
}
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index1.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$source_maps$2f$merged$2d$unicode$2f$input$2f$entry$2d$base$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)");
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$source_maps$2f$merged$2d$unicode$2f$input$2f$entry$2d$base$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)");
;
}),
]);
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_source_maps_merged-unicode_input_1tq4mpj1076n4._.js.map
\ No newline at end of file
......@@ -2,8 +2,8 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/collect-segment-data.js"],"sourcesContent":["import { jsx as _jsx } from \"./jsx-runtime\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst createFromReadableStream = 123; //import { createFromReadableStream } from 'react-server-dom-webpack/client.edge';\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst prerender = 123; // import { prerender } from 'react-server-dom-webpack/static.edge';\nconst streamFromBuffer=1,streamToBuffer=1; // import { streamFromBuffer, streamToBuffer } from '../stream-utils/node-web-streams-helper';\nconst waitAtLeastOneReactRenderTask=1; //import { waitAtLeastOneReactRenderTask } from '../../lib/scheduler';\n// import './segment-value-encoding';\n"],"names":[],"mappings":";;;;;;;;;AACA,6DAA6D;AAC7D,MAAM,2BAA2B,KAAK,kFAAkF;AACxH,6DAA6D;AAC7D,MAAM,YAAY,KAAK,oEAAoE;AAC3F,MAAM,mBAAiB,GAAE,iBAAe,GAAG,8FAA8F;AACzI,MAAM,gCAA8B,GAAG,sEAAsE;CAC7G,sCAAsC"}},
{"offset": {"line": 27, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index1.js"],"sourcesContent":["import \"./entry-base.js\";\n"],"names":[],"mappings":";AAAA"}},
{"offset": {"line": 34, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js"],"sourcesContent":["import \"./entry-base.js\";\n"],"names":[],"mappings":";AAAA"}},
{"offset": {"line": 41, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index.js"],"sourcesContent":["// \"entry-base.js [app-rsc] (ecmascript) <module evaluation>\" with\n// [\"reflect-utils.js [app-rsc] (ecmascript)\",\n// \"params.js [app-rsc] (ecmascript)\",\n// \"segment-value-encoding.js [app-rsc] (ecmascript)\",\n// \"collect-segment-data.js [app-rsc] (ecmascript)\",\n// \"entry-base.js [app-rsc] (ecmascript) <locals>\"]\n\n// \"entry-base.js [test] (ecmascript) <module evaluation>\" with\n// [\"reflect-utils.js [test] (ecmascript)\",\n// \"params.js [test] (ecmascript)\",\n// \"segment-value-encoding.js [test] (ecmascript)\",\n// \"collect-segment-data.js [test] (ecmascript)\",\n// \"entry-base.js [test] (ecmascript) <locals>\"]\n\nif (Date.now() > 0) {\n require('./index1.js')\n}\nif (Date.now() > 0) {\n require('./index2.js')\n}\n\n"],"names":["Date","now"],"mappings":"AAAA,kEAAkE;AAClE,8CAA8C;AAC9C,sCAAsC;AACtC,sDAAsD;AACtD,oDAAoD;AACpD,mDAAmD;AAEnD,+DAA+D;AAC/D,2CAA2C;AAC3C,mCAAmC;AACnC,mDAAmD;AACnD,kDAAkD;AAClD,iDAAiD;AAEjD,IAAIA,KAAKC,GAAG,KAAK,GAAG;;AAEpB;AACA,IAAID,KAAKC,GAAG,KAAK,GAAG;;AAEpB"}}]
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/collect-segment-data.js"],"sourcesContent":["import { jsx as _jsx } from \"./jsx-runtime\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst createFromReadableStream = 123; //import { createFromReadableStream } from 'react-server-dom-webpack/client.edge';\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst prerender = 123; // import { prerender } from 'react-server-dom-webpack/static.edge';\nconst streamFromBuffer=1,streamToBuffer=1; // import { streamFromBuffer, streamToBuffer } from '../stream-utils/node-web-streams-helper';\nconst waitAtLeastOneReactRenderTask=1; //import { waitAtLeastOneReactRenderTask } from '../../lib/scheduler';\n// import './segment-value-encoding';\n"],"names":[],"mappings":";;;;;;;;;AACA,6DAA6D;AAC7D,MAAM,2BAA2B,KAAK,kFAAkF;AACxH,6DAA6D;AAC7D,MAAM,YAAY,KAAK,oEAAoE;AAC3F,MAAM,mBAAiB,GAAE,iBAAe,GAAG,8FAA8F;AACzI,MAAM,gCAA8B,GAAG,sEAAsE;CAC7G,sCAAsC"}},
{"offset": {"line": 25, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index.js"],"sourcesContent":["// \"entry-base.js [app-rsc] (ecmascript) <module evaluation>\" with\n// [\"reflect-utils.js [app-rsc] (ecmascript)\",\n// \"params.js [app-rsc] (ecmascript)\",\n// \"segment-value-encoding.js [app-rsc] (ecmascript)\",\n// \"collect-segment-data.js [app-rsc] (ecmascript)\",\n// \"entry-base.js [app-rsc] (ecmascript) <locals>\"]\n\n// \"entry-base.js [test] (ecmascript) <module evaluation>\" with\n// [\"reflect-utils.js [test] (ecmascript)\",\n// \"params.js [test] (ecmascript)\",\n// \"segment-value-encoding.js [test] (ecmascript)\",\n// \"collect-segment-data.js [test] (ecmascript)\",\n// \"entry-base.js [test] (ecmascript) <locals>\"]\n\nif (Date.now() > 0) {\n require('./index1.js')\n}\nif (Date.now() > 0) {\n require('./index2.js')\n}\n\n"],"names":["Date","now"],"mappings":"AAAA,kEAAkE;AAClE,8CAA8C;AAC9C,sCAAsC;AACtC,sDAAsD;AACtD,oDAAoD;AACpD,mDAAmD;AAEnD,+DAA+D;AAC/D,2CAA2C;AAC3C,mCAAmC;AACnC,mDAAmD;AACnD,kDAAkD;AAClD,iDAAiD;AAEjD,IAAIA,KAAKC,GAAG,KAAK,GAAG;;AAEpB;AACA,IAAID,KAAKC,GAAG,KAAK,GAAG;;AAEpB"}},
{"offset": {"line": 47, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index1.js"],"sourcesContent":["import \"./entry-base.js\";\n"],"names":[],"mappings":";AAAA"}},
{"offset": {"line": 54, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js"],"sourcesContent":["import \"./entry-base.js\";\n"],"names":[],"mappings":";AAAA"}}]
}
\ No newline at end of file
(()=>{"use strict";(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_16i0hbsemtixh._.js",
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_16i0hbsemtixh._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/react/compiler-runtime.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -113,6 +113,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
console.log(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$source_maps$2f$react$2d$compiler$2f$input$2f$Component$2e$jsx__$5b$test$5d$__$28$ecmascript$29$__["Counter"]);
}),
]);})()
]);
//# sourceMappingURL=turbopack_crates_turbopack-tests_tests_snapshot_16i0hbsemtixh._.js.map
\ No newline at end of file
......@@ -770,16 +770,14 @@ contextPrototype.f = moduleContext;
*/ function getChunkPath(chunkData) {
return typeof chunkData === 'string' ? chunkData : chunkData.path;
}
// Load the CompressedModuleFactories of a chunk into the `moduleFactories` Map.
// The flat format alternates one or more module IDs with their factory function.
// Strict factories can be prepended as a nested array.
// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
// The CompressedModuleFactories format is
// - 1 or more module ids
// - a module factory function
// So walking this is a little complex but the flat structure is also fast to
// traverse, we can use `typeof` operators to distinguish the two cases.
function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
var i = offset;
var strictFactories = chunkModules[i];
if (Array.isArray(strictFactories)) {
installCompressedModuleFactories(strictFactories, 0, moduleFactories, newModuleId);
i++;
}
while(i < chunkModules.length){
var end = i + 1;
// Find our factory function
......@@ -818,7 +816,7 @@ function installCompressedModuleFactories(chunkModules, offset, moduleFactories,
newModuleId === null || newModuleId === void 0 ? void 0 : newModuleId(id1);
}
}
i = end + 1;
i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array.
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment