Unverified Commit b1e32c5d authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Turbopack: reapply `typeof module` replacement (#69158)

Reapply #68842 after it was reverted in
https://github.com/vercel/next.js/pull/69156

Now it should really only do it if it's really not an ESM module (= CJS)

The replacement now has the same condition as used when Turbopack
determines whether a given module should get access to `module`:


https://github.com/vercel/next.js/blob/161cd00c7bc91e9dc29842427af0cc6f810267bb/turbopack/crates/turbopack-ecmascript/src/chunk/item.rs#L51


https://github.com/vercel/next.js/blob/161cd00c7bc91e9dc29842427af0cc6f810267bb/turbopack/crates/turbopack-ecmascript/src/lib.rs#L880-L881
parent e1ad67d2
......@@ -16,8 +16,8 @@ use turbopack_browser::{react_refresh::assert_can_resolve_react_refresh, Browser
use turbopack_core::{
chunk::{module_id_strategies::ModuleIdStrategy, ChunkingContext},
compile_time_info::{
CompileTimeDefineValue, CompileTimeDefines, CompileTimeInfo, FreeVarReference,
FreeVarReferences,
CompileTimeDefineValue, CompileTimeDefines, CompileTimeInfo, DefineableNameSegment,
FreeVarReference, FreeVarReferences,
},
condition::ContextCondition,
environment::{BrowserEnvironment, Environment, ExecutionEnvironment},
......@@ -68,7 +68,11 @@ fn defines(define_env: &IndexMap<RcStr, RcStr>) -> CompileTimeDefines {
for (k, v) in define_env {
defines
.entry(k.split('.').map(|s| s.into()).collect::<Vec<RcStr>>())
.entry(
k.split('.')
.map(|s| DefineableNameSegment::Name(s.into()))
.collect::<Vec<_>>(),
)
.or_insert_with(|| {
let val = serde_json::from_str(v);
match val {
......
......@@ -8,8 +8,8 @@ use turbopack_browser::BrowserChunkingContext;
use turbopack_core::{
chunk::{module_id_strategies::ModuleIdStrategy, ChunkingContext},
compile_time_info::{
CompileTimeDefineValue, CompileTimeDefines, CompileTimeInfo, FreeVarReference,
FreeVarReferences,
CompileTimeDefineValue, CompileTimeDefines, CompileTimeInfo, DefineableNameSegment,
FreeVarReference, FreeVarReferences,
},
environment::{EdgeWorkerEnvironment, Environment, ExecutionEnvironment},
free_var_references,
......@@ -34,7 +34,11 @@ fn defines(define_env: &IndexMap<RcStr, RcStr>) -> CompileTimeDefines {
for (k, v) in define_env {
defines
.entry(k.split('.').map(|s| s.into()).collect::<Vec<RcStr>>())
.entry(
k.split('.')
.map(|s| DefineableNameSegment::Name(s.into()))
.collect::<Vec<_>>(),
)
.or_insert_with(|| {
let val = serde_json::from_str(v);
match val {
......
......@@ -16,7 +16,8 @@ use turbopack::{
use turbopack_core::{
chunk::module_id_strategies::ModuleIdStrategy,
compile_time_info::{
CompileTimeDefineValue, CompileTimeDefines, CompileTimeInfo, FreeVarReferences,
CompileTimeDefineValue, CompileTimeDefines, CompileTimeInfo, DefineableNameSegment,
FreeVarReferences,
},
condition::ContextCondition,
environment::{Environment, ExecutionEnvironment, NodeJsEnvironment, RuntimeVersions},
......@@ -317,7 +318,11 @@ fn defines(define_env: &IndexMap<RcStr, RcStr>) -> CompileTimeDefines {
for (k, v) in define_env {
defines
.entry(k.split('.').map(|s| s.into()).collect::<Vec<RcStr>>())
.entry(
k.split('.')
.map(|s| DefineableNameSegment::Name(s.into()))
.collect::<Vec<_>>(),
)
.or_insert_with(|| {
let val = serde_json::from_str(v);
match val {
......
......@@ -5,9 +5,40 @@ use turbo_tasks_fs::FileSystemPath;
use crate::environment::Environment;
#[macro_export]
macro_rules! definable_name_map_pattern_internal {
($name:ident) => {
[stringify!($name).into()]
};
($name:ident typeof) => {
[stringify!($name).into(), $crate::compile_time_info::DefineableNameSegment::TypeOf]
};
// Entry point for non-recursive calls
($name:ident . $($more:ident).+ typeof) => {
$crate::definable_name_map_pattern_internal!($($more).+ typeof, [stringify!($name).into()])
};
($name:ident . $($more:ident).+) => {
$crate::definable_name_map_pattern_internal!($($more).+, [stringify!($name).into()])
};
// Pop first ident and push to end of array: (id, ..., [...]) => (..., [..., id])
($name:ident, [$($array:expr),+]) => {
[$($array),+, stringify!($name).into()]
};
($name:ident . $($more:ident).+, [$($array:expr),+]) => {
$crate::definable_name_map_pattern_internal!($($more).+, [$($array),+, stringify!($name).into()])
};
($name:ident typeof, [$($array:expr),+]) => {
[$($array),+, stringify!($name).into(), $crate::compile_time_info::DefineableNameSegment::TypeOf]
};
($name:ident . $($more:ident).+ typeof, [$($array:expr),+]) => {
$crate::definable_name_map_pattern_internal!($($more).+ typeof, [$($array),+, stringify!($name).into()])
};
}
// TODO stringify split map collect could be optimized with a marco
#[macro_export]
macro_rules! definable_name_map_internal {
// Allow spreading a map: free_var_references!(..xy.into_iter(), FOO = "bar")
($map:ident, .. $value:expr) => {
for (key, value) in $value {
$map.insert(
......@@ -16,38 +47,33 @@ macro_rules! definable_name_map_internal {
);
}
};
($map:ident, $($name:ident).+ = $value:expr) => {
($map:ident, .. $value:expr, $($more:tt)+) => {
$crate::definable_name_map_internal!($map, .. $value);
$crate::definable_name_map_internal!($map, $($more)+);
};
// Base case: a single entry
($map:ident, typeof $($name:ident).+ = $value:expr $(,)?) => {
$map.insert(
$crate::definable_name_map_internal!($($name).+).into(),
$crate::definable_name_map_pattern_internal!($($name).+ typeof).into(),
$value.into()
);
};
($map:ident, $($name:ident).+ = $value:expr,) => {
($map:ident, $($name:ident).+ = $value:expr $(,)?) => {
$map.insert(
$crate::definable_name_map_internal!($($name).+).into(),
$crate::definable_name_map_pattern_internal!($($name).+).into(),
$value.into()
);
};
($map:ident, $($name:ident).+ = $value:expr, $($more:tt)+) => {
$crate::definable_name_map_internal!($map, $($name).+ = $value);
// Recursion: split off first entry
($map:ident, typeof $($name:ident).+ = $value:expr, $($more:tt)+) => {
$crate::definable_name_map_internal!($map, typeof $($name).+ = $value);
$crate::definable_name_map_internal!($map, $($more)+);
};
($map:ident, .. $value:expr, $($more:tt)+) => {
$crate::definable_name_map_internal!($map, .. $value);
($map:ident, $($name:ident).+ = $value:expr, $($more:tt)+) => {
$crate::definable_name_map_internal!($map, $($name).+ = $value);
$crate::definable_name_map_internal!($map, $($more)+);
};
($name:ident) => {
[stringify!($name).into()]
};
($name:ident . $($more:ident).+) => {
$crate::definable_name_map_internal!($($more).+, [stringify!($name).into()])
};
($name:ident, [$($array:expr),+]) => {
[$($array),+, stringify!($name).into()]
};
($name:ident . $($more:ident).+, [$($array:expr),+]) => {
$crate::definable_name_map_internal!($($more).+, [$($array),+, stringify!($name).into()])
};
}
#[macro_export]
......@@ -112,13 +138,38 @@ impl From<serde_json::Value> for CompileTimeDefineValue {
}
}
#[turbo_tasks::value(serialization = "auto_for_input")]
#[derive(Debug, Clone, Hash)]
pub enum DefineableNameSegment {
Name(RcStr),
TypeOf,
}
impl From<RcStr> for DefineableNameSegment {
fn from(value: RcStr) -> Self {
DefineableNameSegment::Name(value)
}
}
impl From<&str> for DefineableNameSegment {
fn from(value: &str) -> Self {
DefineableNameSegment::Name(value.into())
}
}
impl From<String> for DefineableNameSegment {
fn from(value: String) -> Self {
DefineableNameSegment::Name(value.into())
}
}
#[turbo_tasks::value(transparent)]
#[derive(Debug, Clone)]
pub struct CompileTimeDefines(pub IndexMap<Vec<RcStr>, CompileTimeDefineValue>);
pub struct CompileTimeDefines(pub IndexMap<Vec<DefineableNameSegment>, CompileTimeDefineValue>);
impl IntoIterator for CompileTimeDefines {
type Item = (Vec<RcStr>, CompileTimeDefineValue);
type IntoIter = indexmap::map::IntoIter<Vec<RcStr>, CompileTimeDefineValue>;
type Item = (Vec<DefineableNameSegment>, CompileTimeDefineValue);
type IntoIter = indexmap::map::IntoIter<Vec<DefineableNameSegment>, CompileTimeDefineValue>;
fn into_iter(self) -> Self::IntoIter {
self.0.into_iter()
......@@ -171,7 +222,7 @@ impl From<CompileTimeDefineValue> for FreeVarReference {
#[turbo_tasks::value(transparent)]
#[derive(Debug, Clone)]
pub struct FreeVarReferences(pub IndexMap<Vec<RcStr>, FreeVarReference>);
pub struct FreeVarReferences(pub IndexMap<Vec<DefineableNameSegment>, FreeVarReference>);
#[turbo_tasks::value_impl]
impl FreeVarReferences {
......@@ -248,3 +299,67 @@ impl CompileTimeInfoBuilder {
self.build().cell()
}
}
#[cfg(test)]
mod test {
use indexmap::IndexMap;
use crate::compile_time_info::{DefineableNameSegment, FreeVarReference, FreeVarReferences};
#[test]
fn macro_parser() {
assert_eq!(
free_var_references!(
FOO = "bar",
FOO = false,
Buffer = FreeVarReference::EcmaScriptModule {
request: "node:buffer".into(),
lookup_path: None,
export: Some("Buffer".into()),
},
),
FreeVarReferences(IndexMap::from_iter(vec![
(vec!["FOO".into()], FreeVarReference::Value("bar".into())),
(vec!["FOO".into()], FreeVarReference::Value(false.into())),
(
vec!["Buffer".into()],
FreeVarReference::EcmaScriptModule {
request: "node:buffer".into(),
lookup_path: None,
export: Some("Buffer".into()),
}
),
]))
);
}
#[test]
fn macro_parser_typeof() {
assert_eq!(
free_var_references!(
typeof x = "a",
typeof x.y = "b",
typeof x.y.z = "c"
),
FreeVarReferences(IndexMap::from_iter(vec![
(
vec!["x".into(), DefineableNameSegment::TypeOf],
FreeVarReference::Value("a".into())
),
(
vec!["x".into(), "y".into(), DefineableNameSegment::TypeOf],
FreeVarReference::Value("b".into())
),
(
vec![
"x".into(),
"y".into(),
"z".into(),
DefineableNameSegment::TypeOf
],
FreeVarReference::Value("c".into())
)
]))
);
}
}
......@@ -5,6 +5,7 @@ use std::{
};
use swc_core::{
atoms::Atom,
common::{pass::AstNodePath, Mark, Span, Spanned, SyntaxContext, GLOBALS},
ecma::{
ast::*,
......@@ -15,7 +16,10 @@ use swc_core::{
use turbo_tasks::{RcStr, Vc};
use turbopack_core::source::Source;
use super::{ConstantNumber, ConstantValue, ImportMap, JsValue, ObjectPart, WellKnownFunctionKind};
use super::{
is_unresolved_id, ConstantNumber, ConstantValue, ImportMap, JsValue, ObjectPart,
WellKnownFunctionKind,
};
use crate::{
analyzer::is_unresolved,
utils::{unparen, AstPathRange},
......@@ -172,6 +176,12 @@ pub enum Effect {
span: Span,
in_try: bool,
},
/// A typeof expression
TypeOf {
arg: JsValue,
ast_path: Vec<AstParentKind>,
span: Span,
},
// TODO ImportMeta should be replaced with Member
/// A reference to `import.meta`.
ImportMeta {
......@@ -223,6 +233,9 @@ impl Effect {
var.normalize();
}
Effect::ImportedBinding { .. } => {}
Effect::TypeOf { arg, .. } => {
arg.normalize();
}
Effect::ImportMeta { .. } => {}
Effect::Url { input, .. } => {
input.normalize();
......@@ -235,6 +248,8 @@ impl Effect {
#[derive(Debug)]
pub struct VarGraph {
pub values: HashMap<Id, JsValue>,
/// Map FreeVar names to their Id to facilitate lookups into [values]
pub free_var_ids: HashMap<Atom, Id>,
pub effects: Vec<Effect>,
}
......@@ -255,6 +270,7 @@ impl VarGraph {
pub fn create_graph(m: &Program, eval_context: &EvalContext) -> VarGraph {
let mut graph = VarGraph {
values: Default::default(),
free_var_ids: Default::default(),
effects: Default::default(),
};
......@@ -740,6 +756,10 @@ pub fn is_in_try(ast_path: &AstNodePath<AstParentNodeRef<'_>>) -> bool {
impl Analyzer<'_> {
fn add_value(&mut self, id: Id, value: JsValue) {
if is_unresolved_id(&id, self.eval_context.unresolved_mark) {
self.data.free_var_ids.insert(id.0.clone(), id.clone());
}
if let Some(prev) = self.data.values.get_mut(&id) {
prev.add_alt(value);
} else {
......@@ -1974,6 +1994,23 @@ impl VisitAstPath for Analyzer<'_> {
}
}
}
fn visit_unary_expr<'ast: 'r, 'r>(
&mut self,
n: &'ast UnaryExpr,
ast_path: &mut swc_core::ecma::visit::AstNodePath<'r>,
) {
if n.op == UnaryOp::TypeOf {
let arg_value = self.eval_context.eval(&n.arg);
self.add_effect(Effect::TypeOf {
arg: arg_value,
ast_path: as_parent_path(ast_path),
span: n.span(),
});
}
n.visit_children_with_ast_path(self, ast_path);
}
}
impl<'a> Analyzer<'a> {
......
......@@ -128,6 +128,9 @@ pub(crate) struct ImportMap {
/// Ordered list of imported symbols
references: IndexSet<ImportMapReference>,
/// True, when the module has imports
has_imports: bool,
/// True, when the module has exports
has_exports: bool,
......@@ -153,10 +156,7 @@ pub(crate) struct ImportMapReference {
impl ImportMap {
pub fn is_esm(&self) -> bool {
self.has_exports
|| self.has_top_level_await
|| !self.imports.is_empty()
|| !self.namespace_imports.is_empty()
self.has_exports || self.has_imports || self.has_top_level_await
}
pub fn get_import(&self, id: &Id) -> Option<JsValue> {
......@@ -254,6 +254,8 @@ fn to_word(name: &ModuleExportName) -> JsWord {
impl Visit for Analyzer<'_> {
fn visit_import_decl(&mut self, import: &ImportDecl) {
self.data.has_imports = true;
let annotations = ImportAnnotations::parse(import.with.as_deref());
let internal_symbol = parse_with(import.with.as_deref());
......
......@@ -12,6 +12,7 @@ use std::{
};
use anyhow::{bail, Context, Result};
use graph::VarGraph;
use indexmap::{IndexMap, IndexSet};
use num_bigint::BigInt;
use num_traits::identities::Zero;
......@@ -25,7 +26,9 @@ use swc_core::{
},
};
use turbo_tasks::{RcStr, Vc};
use turbopack_core::compile_time_info::CompileTimeDefineValue;
use turbopack_core::compile_time_info::{
CompileTimeDefineValue, DefineableNameSegment, FreeVarReference,
};
use url::Url;
use self::imports::ImportAnnotations;
......@@ -548,6 +551,20 @@ impl From<&CompileTimeDefineValue> for JsValue {
}
}
impl From<&FreeVarReference> for JsValue {
fn from(v: &FreeVarReference) -> Self {
match v {
FreeVarReference::Value(v) => v.into(),
FreeVarReference::EcmaScriptModule { .. } => {
JsValue::unknown_empty(false, "compile time injected free var module")
}
FreeVarReference::Error(_) => {
JsValue::unknown_empty(false, "compile time injected free var error")
}
}
}
}
impl Default for JsValue {
fn default() -> Self {
JsValue::unknown_empty(false, "")
......@@ -1768,13 +1785,14 @@ impl JsValue {
// Defineable name management
impl JsValue {
/// When the value has a user-defineable name, return the length of it (in
/// segments). Otherwise returns None.
/// - any free var has itself as user-defineable name.
/// - any member access adds the identifier as segement to the name of the object.
/// - some well-known objects/functions have a user-defineable names.
/// When the value has a user-defineable name, return the length of it (in segments). Otherwise
/// returns None.
/// - any free var has itself as user-defineable name: ["foo"]
/// - any member access adds the identifier as segment after the object: ["foo", "prop"]
/// - some well-known objects/functions have a user-defineable names: ["import"]
/// - member calls without arguments also have a user-defineable name which is the property with
/// `()` appended.
/// `()` appended: ["foo", "prop()"]
/// - typeof expressions add `typeof` after the argument's segments: ["foo", "typeof"]
pub fn get_defineable_name_len(&self) -> Option<usize> {
match self {
JsValue::FreeVar(_) => Some(1),
......@@ -1788,6 +1806,7 @@ impl JsValue {
{
Some(callee.get_defineable_name_len()? + 1)
}
JsValue::TypeOf(_, arg) => Some(arg.get_defineable_name_len()? + 1),
_ => None,
}
......@@ -1805,6 +1824,79 @@ impl JsValue {
index: 0,
}
}
/// Returns any matching defined replacement that matches this value.
///
/// Optionally when passed a VarGraph, verifies that the first segment was not reassigned.
///
/// Optionally also prefixes `self` with `prefix`, e.g. to be able to match `typeof foo` if
/// `self` is just `foo`.
pub fn match_free_var_reference<'a>(
&self,
var_graph: Option<&VarGraph>,
free_var_references: &'a IndexMap<Vec<DefineableNameSegment>, FreeVarReference>,
prefix_self: &Option<DefineableNameSegment>,
) -> Option<&'a FreeVarReference> {
if let Some(def_name_len) = self.get_defineable_name_len() {
for (name, value) in free_var_references.iter() {
if name.len() != def_name_len + (prefix_self.is_some() as usize) {
continue;
}
let mut name_rev_it = name.iter().map(Cow::Borrowed).rev();
if let Some(prefix_self) = prefix_self {
if name_rev_it.next().unwrap().as_ref() != prefix_self {
continue;
}
}
if name_rev_it.eq(self.iter_defineable_name_rev()) {
if let Some(var_graph) = var_graph {
if let DefineableNameSegment::Name(first_str) = name.first().unwrap() {
let first_str: &str = first_str;
if var_graph
.free_var_ids
.get(&first_str.into())
.map_or(false, |id| var_graph.values.contains_key(id))
{
// `typeof foo...` but `foo` was reassigned
return None;
}
}
}
return Some(value);
}
}
}
None
}
/// Returns any matching defined replacement that matches this value. Optionally also prefixes
/// `self` with `prefix`, e.g. to be able to match `typeof foo` if `self` is just `foo`.
pub fn match_define<'a>(
&self,
defines: &'a IndexMap<Vec<DefineableNameSegment>, CompileTimeDefineValue>,
) -> Option<&'a CompileTimeDefineValue> {
if let Some(def_name_len) = self.get_defineable_name_len() {
for (name, value) in defines.iter() {
if name.len() != def_name_len {
continue;
}
if name
.iter()
.map(Cow::Borrowed)
.rev()
.eq(self.iter_defineable_name_rev())
{
return Some(value);
}
}
}
None
}
}
pub struct DefineableNameIter<'a> {
......@@ -1813,11 +1905,11 @@ pub struct DefineableNameIter<'a> {
}
impl<'a> Iterator for DefineableNameIter<'a> {
type Item = Cow<'a, str>;
type Item = Cow<'a, DefineableNameSegment>;
fn next(&mut self) -> Option<Self::Item> {
let value = self.next.take()?;
Some(match value {
Some(Cow::Owned(match value {
JsValue::FreeVar(kind) => (&**kind).into(),
JsValue::Member(_, obj, prop) => {
self.next = Some(obj);
......@@ -1845,8 +1937,13 @@ impl<'a> Iterator for DefineableNameIter<'a> {
self.next = Some(callee);
format!("{}()", prop.as_str()?).into()
}
JsValue::TypeOf(_, arg) => {
self.next = Some(arg);
DefineableNameSegment::TypeOf
}
_ => return None,
})
}))
}
}
......@@ -3573,6 +3670,10 @@ fn is_unresolved(i: &Ident, unresolved_mark: Mark) -> bool {
i.ctxt.outer() == unresolved_mark
}
fn is_unresolved_id(i: &Id, unresolved_mark: Mark) -> bool {
i.1.outer() == unresolved_mark
}
#[doc(hidden)]
pub mod test_utils {
use anyhow::Result;
......@@ -3906,6 +4007,13 @@ mod tests {
Effect::FreeVar { var, .. } => {
resolved.push((format!("{parent} -> {i} free var"), var));
}
Effect::TypeOf { arg, .. } => {
let arg = resolve(&var_graph, arg).await;
resolved.push((
format!("{parent} -> {i} typeof"),
JsValue::type_of(Box::new(arg)),
));
}
Effect::MemberCall {
obj, prop, args, ..
} => {
......@@ -3923,7 +4031,10 @@ mod tests {
JsValue::unknown_empty(true, "unreachable"),
));
}
_ => {}
Effect::ImportMeta { .. } => {}
Effect::ImportedBinding { .. } => {}
Effect::Member { .. } => {}
Effect::Url { .. } => {}
}
let time = start.elapsed();
if time.as_millis() > 1 {
......
......@@ -55,7 +55,9 @@ use tracing::Instrument;
use turbo_tasks::{RcStr, TryJoinIterExt, Upcast, Value, ValueToString, Vc};
use turbo_tasks_fs::FileSystemPath;
use turbopack_core::{
compile_time_info::{CompileTimeInfo, FreeVarReference},
compile_time_info::{
CompileTimeInfo, DefineableNameSegment, FreeVarReference, FreeVarReferences,
},
error::PrettyPrintError,
issue::{analyze::AnalyzeIssue, IssueExt, IssueSeverity, IssueSource, StyledString},
module::Module,
......@@ -369,7 +371,15 @@ impl<'a> AnalysisState<'a> {
self.var_graph,
value,
&early_value_visitor,
&|value| value_visitor(self.origin, value, self.compile_time_info, in_try),
&|value| {
value_visitor(
self.origin,
value,
self.compile_time_info,
self.var_graph,
in_try,
)
},
fun_args_values,
)
.await
......@@ -415,7 +425,6 @@ pub(crate) async fn analyse_ecmascript_module_internal(
let ty = Value::new(raw_module.ty);
let transforms = raw_module.transforms;
let options = raw_module.options;
let compile_time_info = raw_module.compile_time_info;
let options = options.await?;
let import_externals = options.import_externals;
......@@ -473,6 +482,40 @@ pub(crate) async fn analyse_ecmascript_module_internal(
return analysis.build(false).await;
};
let compile_time_info = if (specified_type == SpecifiedModuleType::CommonJs)
|| (specified_type == SpecifiedModuleType::Automatic && !eval_context.is_esm())
{
let compile_time_info = raw_module.compile_time_info.await?;
let mut free_var_references = compile_time_info.free_var_references.await?.clone_value();
free_var_references
.entry(vec![
DefineableNameSegment::Name("exports".into()),
DefineableNameSegment::TypeOf,
])
.or_insert("object".into());
free_var_references
.entry(vec![
DefineableNameSegment::Name("module".into()),
DefineableNameSegment::TypeOf,
])
.or_insert("object".into());
free_var_references
.entry(vec![
DefineableNameSegment::Name("require".into()),
DefineableNameSegment::TypeOf,
])
.or_insert("function".into());
CompileTimeInfo {
environment: compile_time_info.environment,
defines: compile_time_info.defines,
free_var_references: FreeVarReferences(free_var_references).cell(),
}
.cell()
} else {
raw_module.compile_time_info
};
let mut import_references = Vec::new();
let pos = program.span().lo;
......@@ -1138,6 +1181,14 @@ pub(crate) async fn analyse_ecmascript_module_internal(
}
}
}
Effect::TypeOf {
arg,
ast_path,
span,
} => {
let arg = analysis_state.link_value(arg, false).await?;
handle_typeof(&ast_path, arg, span, &analysis_state, &mut analysis).await?;
}
Effect::ImportMeta {
ast_path,
span: _,
......@@ -1911,6 +1962,7 @@ async fn handle_member(
analysis: &mut AnalyzeEcmascriptModuleResultBuilder,
) -> Result<()> {
if let Some(prop) = prop.as_str() {
let prop = DefineableNameSegment::Name(prop.into());
if let Some(def_name_len) = obj.get_defineable_name_len() {
let compile_time_info = state.compile_time_info.await?;
let free_var_references = compile_time_info.free_var_references.await?;
......@@ -1918,8 +1970,8 @@ async fn handle_member(
if name.len() != def_name_len + 1 {
continue;
}
let mut it = name.iter().map(|v| Cow::Borrowed(&**v)).rev();
if it.next().unwrap() != Cow::Borrowed(prop) {
let mut it = name.iter().map(Cow::Borrowed).rev();
if it.next().unwrap().as_ref() != &prop {
continue;
}
if it.eq(obj.iter_defineable_name_rev())
......@@ -1947,6 +1999,24 @@ async fn handle_member(
Ok(())
}
async fn handle_typeof(
ast_path: &[AstParentKind],
arg: JsValue,
span: Span,
state: &AnalysisState<'_>,
analysis: &mut AnalyzeEcmascriptModuleResultBuilder,
) -> Result<()> {
if let Some(value) = arg.match_free_var_reference(
Some(state.var_graph),
&*state.compile_time_info.await?.free_var_references.await?,
&Some(DefineableNameSegment::TypeOf),
) {
handle_free_var_reference(ast_path, value, span, state, analysis).await?;
}
Ok(())
}
async fn handle_free_var(
ast_path: &[AstParentKind],
var: JsValue,
......@@ -1964,9 +2034,9 @@ async fn handle_free_var(
if var
.iter_defineable_name_rev()
.eq(name.iter().map(|v| Cow::Borrowed(&**v)).rev())
&& handle_free_var_reference(ast_path, value, span, state, analysis).await?
.eq(name.iter().map(Cow::Borrowed).rev())
{
handle_free_var_reference(ast_path, value, span, state, analysis).await?;
return Ok(());
}
}
......@@ -2259,9 +2329,11 @@ async fn value_visitor(
origin: Vc<Box<dyn ResolveOrigin>>,
v: JsValue,
compile_time_info: Vc<CompileTimeInfo>,
var_graph: &VarGraph,
in_try: bool,
) -> Result<(JsValue, bool)> {
let (mut v, modified) = value_visitor_inner(origin, v, compile_time_info, in_try).await?;
let (mut v, modified) =
value_visitor_inner(origin, v, compile_time_info, var_graph, in_try).await?;
v.normalize_shallow();
Ok((v, modified))
}
......@@ -2270,21 +2342,25 @@ async fn value_visitor_inner(
origin: Vc<Box<dyn ResolveOrigin>>,
v: JsValue,
compile_time_info: Vc<CompileTimeInfo>,
var_graph: &VarGraph,
in_try: bool,
) -> Result<(JsValue, bool)> {
if let Some(def_name_len) = v.get_defineable_name_len() {
// This check is just an optimization
if v.get_defineable_name_len().is_some() {
let compile_time_info = compile_time_info.await?;
let defines = compile_time_info.defines.await?;
for (name, value) in defines.iter() {
if name.len() != def_name_len {
continue;
}
if v.iter_defineable_name_rev()
.eq(name.iter().map(|v| Cow::Borrowed(&**v)).rev())
{
if let JsValue::TypeOf(..) = v {
if let Some(value) = v.match_free_var_reference(
Some(var_graph),
&*compile_time_info.free_var_references.await?,
&None,
) {
return Ok((value.into(), true));
}
}
if let Some(value) = v.match_define(&*compile_time_info.defines.await?) {
return Ok((value.into(), true));
}
}
let value = match v {
JsValue::Call(
......
[
TypeOf {
arg: FreeVar(
"EdgeRuntime",
),
ast_path: [
Program(
Module,
),
Module(
Body(
2,
),
),
ModuleItem(
Stmt,
),
Stmt(
Decl,
),
Decl(
Var,
),
VarDecl(
Decls(
0,
),
),
VarDeclarator(
Init,
),
Expr(
Cond,
),
CondExpr(
Test,
),
Expr(
Bin,
),
BinExpr(
Left,
),
Expr(
Unary,
),
],
span: 95..113,
},
FreeVar {
var: FreeVar(
"EdgeRuntime",
......
0 -> 1 free var = FreeVar(EdgeRuntime)
0 -> 1 typeof = typeof(???*0*)
- *0* FreeVar(EdgeRuntime)
⚠️ unknown global
⚠️ This value might have side effects
0 -> 2 free var = FreeVar(EdgeRuntime)
0 -> 2 conditional = (???*0* === "undefined")
0 -> 3 conditional = (???*0* === "undefined")
- *0* typeof(???*1*)
⚠️ nested operation
- *1* FreeVar(EdgeRuntime)
⚠️ unknown global
⚠️ This value might have side effects
2 -> 3 free var = FreeVar(require)
3 -> 4 free var = FreeVar(require)
2 -> 4 call = require*0*("ioredis")
3 -> 5 call = require*0*("ioredis")
- *0* require: The require method from CommonJS
[
TypeOf {
arg: FreeVar(
"x",
),
ast_path: [
Program(
Script,
),
Script(
Body(
0,
),
),
Stmt(
Expr,
),
ExprStmt(
Expr,
),
Expr(
Unary,
),
],
span: 1..9,
},
FreeVar {
var: FreeVar(
"x",
),
ast_path: [
Program(
Script,
),
Script(
Body(
0,
),
),
Stmt(
Expr,
),
ExprStmt(
Expr,
),
Expr(
Unary,
),
UnaryExpr(
Arg,
),
Expr(
Ident,
),
],
span: 8..9,
in_try: false,
},
]
0 -> 1 typeof = typeof(???*0*)
- *0* FreeVar(x)
⚠️ unknown global
⚠️ This value might have side effects
0 -> 2 free var = FreeVar(x)
import moduleUniversal from "./module-universal.js";
import moduleReassign from "./module-reassign.js"
it("should use the CommonJS variant of universal module definitions", () => {
expect(moduleUniversal()).toBe("other-dep 1234");
});
it("should not replace typeof exports for non-free variables", () => {
expect(moduleReassign).toBe(1234);
});
exports = () => 'hello'
if (typeof exports === 'object') throw 'oh no'
module.exports = 1234
(function webpackUniversalModuleDefinition(root, factory) {
if (typeof exports === "object" && typeof module === "object")
module.exports = factory(require("./other-dep"));
else if (typeof define === "function" && define.amd) {
// Should not be used, unresolvable
define(["./something-invalid"], factory);
} else if (typeof exports === "object") {
// Should not be used
exports["my-lib"] = factory(require("./something-invalid"));
} else {
// Should not be used
root["my-lib"] = factory(root["something-invalid"]);
}
})(
this,
function (otherDep) {
return /******/ (function (modules) {
// webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if (installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/
}
/******/ // Create a new module (and put it into the cache)
/******/ var module = (installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {},
/******/
});
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(
module.exports,
module,
module.exports,
__webpack_require__,
);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/
}
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function (exports, name, getter) {
/******/ if (!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
enumerable: true,
get: getter,
});
/******/
}
/******/
};
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function (exports) {
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, {
value: "Module",
});
/******/
}
/******/ Object.defineProperty(exports, "__esModule", { value: true });
/******/
};
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function (value, mode) {
/******/ if (mode & 1) value = __webpack_require__(value);
/******/ if (mode & 8) return value;
/******/ if (
mode & 4 &&
typeof value === "object" &&
value &&
value.__esModule
)
return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, "default", {
enumerable: true,
value: value,
});
/******/ if (mode & 2 && typeof value != "string")
for (var key in value)
__webpack_require__.d(
ns,
key,
function (key) {
return value[key];
}.bind(null, key),
);
/******/ return ns;
/******/
};
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function (module) {
/******/ var getter =
module && module.__esModule
? /******/ function getDefault() {
return module["default"];
}
: /******/ function getModuleExports() {
return module;
};
/******/ __webpack_require__.d(getter, "a", getter);
/******/ return getter;
/******/
};
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function (object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
};
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__((__webpack_require__.s = 0));
/******/
})(
/************************************************************************/
/******/ [
/* 4 */
/***/ function (module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(
__webpack_exports__,
"default",
function () {
return test;
},
);
function test() {
return `${otherDep} 1234`;
}
/***/
},
],
);
},
);
......@@ -95,7 +95,8 @@ 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$basic$2d$tree$2d$shake$2f$dynamic$2d$import$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__4$3e$__["dog"]);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/lib.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/lib.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$dynamic$2d$import$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__16$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/lib.js [test] (ecmascript) <internal part 16>");
......@@ -107,7 +108,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/lib.js [test] (ecmascript) <internal part 0>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
......
......@@ -16,28 +16,28 @@
{"offset": {"line": 78, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 83, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/input/lib.js"],"sourcesContent":["let dog = \"dog\";\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction getDog() {\n return dog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction setDog(newDog) {\n dog = newDog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nexport const dogRef = {\n initial: dog,\n get: getDog,\n set: setDog,\n};\n\nexport let cat = \"cat\";\n\nexport const initialCat = cat;\n\nexport function getChimera() {\n return cat + dog;\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAoBA,QAAQ,GAAG,CAAC,gPAAA,CAAA,MAAG"}},
{"offset": {"line": 95, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 99, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 108, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 112, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 116, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 120, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 125, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 129, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 133, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 138, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/input/lib.js"],"sourcesContent":["let dog = \"dog\";\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction getDog() {\n return dog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction setDog(newDog) {\n dog = newDog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nexport const dogRef = {\n initial: dog,\n get: getDog,\n set: setDog,\n};\n\nexport let cat = \"cat\";\n\nexport const initialCat = cat;\n\nexport function getChimera() {\n return cat + dog;\n}\n"],"names":[],"mappings":";;;;;;AA4BO,IAAI,MAAM"}},
{"offset": {"line": 146, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 151, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 159, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 164, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 175, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 180, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 188, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 193, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 204, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 209, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/input/index.js"],"sourcesContent":["import { fakeCat } from \"./module\";\n\n\nconsole.log(fakeCat)\n"],"names":[],"mappings":";;;;;;;AAGA,QAAQ,GAAG,CAAC,kPAAA,CAAA,UAAO"}},
{"offset": {"line": 217, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 221, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 228, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 233, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 238, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 100, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 109, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 114, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 118, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 123, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 128, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 133, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 137, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 142, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/input/lib.js"],"sourcesContent":["let dog = \"dog\";\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction getDog() {\n return dog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction setDog(newDog) {\n dog = newDog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nexport const dogRef = {\n initial: dog,\n get: getDog,\n set: setDog,\n};\n\nexport let cat = \"cat\";\n\nexport const initialCat = cat;\n\nexport function getChimera() {\n return cat + dog;\n}\n"],"names":[],"mappings":";;;;;;AA4BO,IAAI,MAAM"}},
{"offset": {"line": 150, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 155, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 163, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 168, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 179, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 184, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 192, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 197, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 208, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 213, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/input/index.js"],"sourcesContent":["import { fakeCat } from \"./module\";\n\n\nconsole.log(fakeCat)\n"],"names":[],"mappings":";;;;;;;AAGA,QAAQ,GAAG,CAAC,kPAAA,CAAA,UAAO"}},
{"offset": {"line": 221, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 226, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 233, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 238, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 243, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
......@@ -95,7 +95,8 @@ 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$basic$2d$tree$2d$shake$2f$import$2d$named$2d$all$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__4$3e$__["dog"]);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/lib.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/lib.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$named$2d$all$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__16$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/lib.js [test] (ecmascript) <internal part 16>");
......@@ -107,15 +108,16 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/index.js [test] (ecmascript) <internal part 0>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/index.js [test] (ecmascript) <internal part 0>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$named$2d$all$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$module__evaluation$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/lib.js [test] (ecmascript) <module evaluation>");
"__TURBOPACK__ecmascript__hoisting__location__";
;
}.call(this) }),
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/lib.js [test] (ecmascript) <internal part 0>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
......@@ -172,7 +174,8 @@ console.log(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$
;
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/index.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/index.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$named$2d$all$2f$input$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/index.js [test] (ecmascript) <internal part 0>");
......@@ -182,7 +185,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/index.js [test] (ecmascript) <facade>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
......
......@@ -16,20 +16,20 @@
{"offset": {"line": 78, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 83, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/lib.js"],"sourcesContent":["let dog = \"dog\";\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction getDog() {\n return dog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction setDog(newDog) {\n dog = newDog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nexport const dogRef = {\n initial: dog,\n get: getDog,\n set: setDog,\n};\n\nexport let cat = \"cat\";\n\nexport const initialCat = cat;\n\nexport function getChimera() {\n return cat + dog;\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAoBA,QAAQ,GAAG,CAAC,uPAAA,CAAA,MAAG"}},
{"offset": {"line": 95, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 99, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 108, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 112, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 116, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 121, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/lib.js"],"sourcesContent":["let dog = \"dog\";\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction getDog() {\n return dog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction setDog(newDog) {\n dog = newDog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nexport const dogRef = {\n initial: dog,\n get: getDog,\n set: setDog,\n};\n\nexport let cat = \"cat\";\n\nexport const initialCat = cat;\n\nexport function getChimera() {\n return cat + dog;\n}\n"],"names":[],"mappings":";;;;;;AA4BO,IAAI,MAAM"}},
{"offset": {"line": 129, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 134, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 142, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 147, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 158, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 163, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/index.js"],"sourcesContent":["import {cat as c,dogRef,initialCat,getChimera} from './lib'\n\nconsole.log(c)\n\n// TODO: Execution\n"],"names":[],"mappings":";;;;;;;AAEA,QAAQ,GAAG,CAAC,yPAAA,CAAA,IAAC,EAEb,kBAAkB"}},
{"offset": {"line": 172, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 176, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 183, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 188, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 193, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 100, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 109, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 114, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 118, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 123, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/lib.js"],"sourcesContent":["let dog = \"dog\";\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction getDog() {\n return dog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction setDog(newDog) {\n dog = newDog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nexport const dogRef = {\n initial: dog,\n get: getDog,\n set: setDog,\n};\n\nexport let cat = \"cat\";\n\nexport const initialCat = cat;\n\nexport function getChimera() {\n return cat + dog;\n}\n"],"names":[],"mappings":";;;;;;AA4BO,IAAI,MAAM"}},
{"offset": {"line": 131, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 136, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 144, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 149, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 160, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 165, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/index.js"],"sourcesContent":["import {cat as c,dogRef,initialCat,getChimera} from './lib'\n\nconsole.log(c)\n\n// TODO: Execution\n"],"names":[],"mappings":";;;;;;;AAEA,QAAQ,GAAG,CAAC,yPAAA,CAAA,IAAC,EAEb,kBAAkB"}},
{"offset": {"line": 174, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 179, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 186, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 191, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 196, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
......@@ -95,7 +95,8 @@ 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$basic$2d$tree$2d$shake$2f$import$2d$named$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__4$3e$__["dog"]);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/lib.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/lib.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$named$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__16$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/lib.js [test] (ecmascript) <internal part 16>");
......@@ -107,15 +108,16 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/index.js [test] (ecmascript) <internal part 0>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/index.js [test] (ecmascript) <internal part 0>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$named$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$module__evaluation$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/lib.js [test] (ecmascript) <module evaluation>");
"__TURBOPACK__ecmascript__hoisting__location__";
;
}.call(this) }),
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/lib.js [test] (ecmascript) <internal part 0>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
......@@ -171,7 +173,8 @@ 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$basic$2d$tree$2d$shake$2f$import$2d$named$2f$input$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__1$3e$__["c"]);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/index.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/index.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$named$2f$input$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/index.js [test] (ecmascript) <internal part 0>");
......@@ -181,7 +184,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/index.js [test] (ecmascript) <facade>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
......
......@@ -16,20 +16,20 @@
{"offset": {"line": 78, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 83, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/lib.js"],"sourcesContent":["let dog = \"dog\";\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction getDog() {\n return dog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction setDog(newDog) {\n dog = newDog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nexport const dogRef = {\n initial: dog,\n get: getDog,\n set: setDog,\n};\n\nexport let cat = \"cat\";\n\nexport const initialCat = cat;\n\nexport function getChimera() {\n return cat + dog;\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAoBA,QAAQ,GAAG,CAAC,gPAAA,CAAA,MAAG"}},
{"offset": {"line": 95, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 99, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 108, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 112, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 116, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 121, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/lib.js"],"sourcesContent":["let dog = \"dog\";\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction getDog() {\n return dog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction setDog(newDog) {\n dog = newDog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nexport const dogRef = {\n initial: dog,\n get: getDog,\n set: setDog,\n};\n\nexport let cat = \"cat\";\n\nexport const initialCat = cat;\n\nexport function getChimera() {\n return cat + dog;\n}\n"],"names":[],"mappings":";;;;;;AA4BO,IAAI,MAAM"}},
{"offset": {"line": 129, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 134, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 142, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 147, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 158, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 163, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/index.js"],"sourcesContent":["import {cat as c} from './lib'\n\nconsole.log(c)\n"],"names":[],"mappings":";;;;;;;AAEA,QAAQ,GAAG,CAAC,kPAAA,CAAA,IAAC"}},
{"offset": {"line": 171, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 175, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 182, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 187, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 192, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 100, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 109, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 114, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 118, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 123, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/lib.js"],"sourcesContent":["let dog = \"dog\";\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction getDog() {\n return dog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction setDog(newDog) {\n dog = newDog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nexport const dogRef = {\n initial: dog,\n get: getDog,\n set: setDog,\n};\n\nexport let cat = \"cat\";\n\nexport const initialCat = cat;\n\nexport function getChimera() {\n return cat + dog;\n}\n"],"names":[],"mappings":";;;;;;AA4BO,IAAI,MAAM"}},
{"offset": {"line": 131, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 136, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 144, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 149, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 160, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 165, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/index.js"],"sourcesContent":["import {cat as c} from './lib'\n\nconsole.log(c)\n"],"names":[],"mappings":";;;;;;;AAEA,QAAQ,GAAG,CAAC,kPAAA,CAAA,IAAC"}},
{"offset": {"line": 173, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 178, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 185, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 190, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 195, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
......@@ -95,7 +95,8 @@ 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$basic$2d$tree$2d$shake$2f$import$2d$namespace$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__4$3e$__["dog"]);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/lib.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/lib.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$namespace$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__16$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/lib.js [test] (ecmascript) <internal part 16>");
......@@ -107,15 +108,16 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/index.js [test] (ecmascript) <internal part 0>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/index.js [test] (ecmascript) <internal part 0>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$namespace$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$module__evaluation$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/lib.js [test] (ecmascript) <module evaluation>");
"__TURBOPACK__ecmascript__hoisting__location__";
;
}.call(this) }),
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/lib.js [test] (ecmascript) <internal part 0>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
......@@ -338,7 +340,8 @@ 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$basic$2d$tree$2d$shake$2f$import$2d$namespace$2f$input$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__1$3e$__["lib"].cat);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/index.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/index.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$namespace$2f$input$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/index.js [test] (ecmascript) <internal part 0>");
......@@ -348,7 +351,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/index.js [test] (ecmascript) <facade>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
......
......@@ -95,7 +95,8 @@ 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$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__4$3e$__["dog"]);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/lib.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/lib.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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__16$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/lib.js [test] (ecmascript) <internal part 16>");
......@@ -107,16 +108,18 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/index.js [test] (ecmascript) <internal part 0>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/index.js [test] (ecmascript) <internal part 0>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$module__evaluation$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/lib.js [test] (ecmascript) <module evaluation>");
"__TURBOPACK__ecmascript__hoisting__location__";
;
}.call(this) }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/index.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/index.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __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$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/index.js [test] (ecmascript) <internal part 0>");
......@@ -124,7 +127,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/index.js [test] (ecmascript) <facade>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
......
......@@ -16,12 +16,12 @@
{"offset": {"line": 78, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 83, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/lib.js"],"sourcesContent":["let dog = \"dog\";\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction getDog() {\n return dog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nfunction setDog(newDog) {\n dog = newDog;\n}\n\ndog += \"!\";\n\nconsole.log(dog);\n\nexport const dogRef = {\n initial: dog,\n get: getDog,\n set: setDog,\n};\n\nexport let cat = \"cat\";\n\nexport const initialCat = cat;\n\nexport function getChimera() {\n return cat + dog;\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAoBA,QAAQ,GAAG,CAAC,yPAAA,CAAA,MAAG"}},
{"offset": {"line": 95, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 99, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 108, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 112, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 116, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 120, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 125, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 130, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 135, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 100, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 109, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 114, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 118, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 123, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 128, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 133, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 138, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
......@@ -95,7 +95,8 @@ 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$basic$2d$tree$2d$shake$2f$require$2d$side$2d$effect$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__4$3e$__["dog"]);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$require$2d$side$2d$effect$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__16$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript) <internal part 16>");
......@@ -107,7 +108,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript) <internal part 0>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
......
......@@ -95,7 +95,8 @@ 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$basic$2d$tree$2d$shake$2f$tree$2d$shake$2d$test$2d$1$2f$input$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__4$3e$__["dog"]);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/tree-shake-test-1/input/index.js [test] (ecmascript) <module evaluation>": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/tree-shake-test-1/input/index.js [test] (ecmascript) <module evaluation>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$tree$2d$shake$2d$test$2d$1$2f$input$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__16$3e$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/tree-shake-test-1/input/index.js [test] (ecmascript) <internal part 16>");
......@@ -107,7 +108,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
;
"module evaluation";
}.call(this) }),
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/tree-shake-test-1/input/index.js [test] (ecmascript) <internal part 0>": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
......
(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/b1abf_turbopack-tests_tests_snapshot_css_absolute-uri-import_input_index_e42d0f.js", {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/absolute-uri-import/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/absolute-uri-import/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
;
}.call(this) }),
})()),
}]);
//# sourceMappingURL=b1abf_turbopack-tests_tests_snapshot_css_absolute-uri-import_input_index_e42d0f.js.map
\ No newline at end of file
......@@ -2,6 +2,6 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 6, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 7, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/4e721_crates_turbopack-tests_tests_snapshot_css_chained-attributes_input_index_0d5b04.js", {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/chained-attributes/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/chained-attributes/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
;
}.call(this) }),
})()),
}]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_css_chained-attributes_input_index_0d5b04.js.map
\ No newline at end of file
......@@ -2,6 +2,6 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 6, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 7, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/4e721_crates_turbopack-tests_tests_snapshot_css_css-legacy-nesting_input_index_49d4ed.js", {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/css-legacy-nesting/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/css-legacy-nesting/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
;
console.log('css-legacy-nesting');
}.call(this) }),
})()),
}]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_css_css-legacy-nesting_input_index_49d4ed.js.map
\ No newline at end of file
......@@ -2,6 +2,6 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/css-legacy-nesting/input/index.js"],"sourcesContent":["import \"./style.css\";\n\nconsole.log('css-legacy-nesting');\n"],"names":[],"mappings":";;AAEA,QAAQ,GAAG,CAAC"}},
{"offset": {"line": 7, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/css-legacy-nesting/input/index.js"],"sourcesContent":["import \"./style.css\";\n\nconsole.log('css-legacy-nesting');\n"],"names":[],"mappings":";;AAEA,QAAQ,GAAG,CAAC"}},
{"offset": {"line": 8, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/b1abf_turbopack-tests_tests_snapshot_css_relative-uri-import_input_index_8ff755.js", {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/relative-uri-import/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/relative-uri-import/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
;
}.call(this) }),
})()),
}]);
//# sourceMappingURL=b1abf_turbopack-tests_tests_snapshot_css_relative-uri-import_input_index_8ff755.js.map
\ No newline at end of file
......@@ -2,6 +2,6 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 6, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 7, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/b1abf_turbopack-tests_tests_snapshot_css_url-in-supports-query_input_index_160b9e.js", {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/url-in-supports-query/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/url-in-supports-query/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
;
}.call(this) }),
})()),
}]);
//# sourceMappingURL=b1abf_turbopack-tests_tests_snapshot_css_url-in-supports-query_input_index_160b9e.js.map
\ No newline at end of file
......@@ -2,6 +2,6 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 6, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 7, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
......@@ -11,14 +11,15 @@ const __TURBOPACK__import$2e$meta__ = {
console.log(__TURBOPACK__import$2e$meta__.url);
}.call(this) }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$cjs$2f$input$2f$mod$2e$cjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/mod.cjs [test] (ecmascript)");
"__TURBOPACK__ecmascript__hoisting__location__";
;
}.call(this) }),
})()),
}]);
//# sourceMappingURL=turbopack_crates_turbopack-tests_tests_snapshot_import-meta_cjs_input_8e1e02._.js.map
\ No newline at end of file
......@@ -4,6 +4,6 @@
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/mod.cjs"],"sourcesContent":["console.log(import.meta.url);\n"],"names":[],"mappings":";;;;;;AAAA,QAAQ,GAAG,CAAC,8BAAY,GAAG"}},
{"offset": {"line": 11, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 15, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 19, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 16, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 20, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
......@@ -20,14 +20,15 @@ foo();
bar();
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$esm$2d$multiple$2f$input$2f$mod$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/input/mod.mjs [test] (ecmascript)");
"__TURBOPACK__ecmascript__hoisting__location__";
;
}.call(this) }),
})()),
}]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_import-meta_esm-multiple_input_2057b4._.js.map
\ No newline at end of file
......@@ -4,6 +4,6 @@
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-multiple/input/mod.mjs"],"sourcesContent":["function foo() {\n console.log(import.meta.url);\n}\nfunction bar() {\n console.log(import.meta.url);\n}\n\nfoo();\nbar();\n"],"names":[],"mappings":";;;;;;;AAAA,SAAS;IACP,QAAQ,GAAG,CAAC,8BAAY,GAAG;AAC7B;AACA,SAAS;IACP,QAAQ,GAAG,CAAC,8BAAY,GAAG;AAC7B;AAEA;AACA"}},
{"offset": {"line": 20, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 24, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 28, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 25, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 29, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
......@@ -13,14 +13,15 @@ const __TURBOPACK__import$2e$meta__ = {
__TURBOPACK__import$2e$meta__.foo = 1;
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$esm$2d$mutable$2f$input$2f$mod$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/input/mod.mjs [test] (ecmascript)");
"__TURBOPACK__ecmascript__hoisting__location__";
;
}.call(this) }),
})()),
}]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_import-meta_esm-mutable_input_f8b72a._.js.map
\ No newline at end of file
......@@ -4,6 +4,6 @@
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-mutable/input/mod.mjs"],"sourcesContent":["import.meta.foo = 1;\n"],"names":[],"mappings":";;;;;;;AAAA,8BAAY,GAAG,GAAG"}},
{"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 17, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 21, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 18, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
......@@ -13,14 +13,15 @@ const __TURBOPACK__import$2e$meta__ = {
console.log(__TURBOPACK__import$2e$meta__);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$esm$2d$object$2f$input$2f$mod$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/input/mod.mjs [test] (ecmascript)");
"__TURBOPACK__ecmascript__hoisting__location__";
;
}.call(this) }),
})()),
}]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_import-meta_esm-object_input_4681c8._.js.map
\ No newline at end of file
......@@ -4,6 +4,6 @@
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm-object/input/mod.mjs"],"sourcesContent":["console.log(import.meta);\n"],"names":[],"mappings":";;;;;;;AAAA,QAAQ,GAAG"}},
{"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 17, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 21, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 18, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
......@@ -13,14 +13,15 @@ const __TURBOPACK__import$2e$meta__ = {
console.log(__TURBOPACK__import$2e$meta__.url);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$esm$2f$input$2f$mod$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm/input/mod.mjs [test] (ecmascript)");
"__TURBOPACK__ecmascript__hoisting__location__";
;
}.call(this) }),
})()),
}]);
//# sourceMappingURL=turbopack_crates_turbopack-tests_tests_snapshot_import-meta_esm_input_187fac._.js.map
\ No newline at end of file
......@@ -4,6 +4,6 @@
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/esm/input/mod.mjs"],"sourcesContent":["console.log(import.meta.url);\n"],"names":[],"mappings":";;;;;;;AAAA,QAAQ,GAAG,CAAC,8BAAY,GAAG"}},
{"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 17, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 21, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 18, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
......@@ -19,14 +19,15 @@ console.log(assetUrl);
fetch(assetUrl).then((res)=>res.text()).then(console.log);
})()),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/url/input/index.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/url/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$import$2d$meta$2f$url$2f$input$2f$mod$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/url/input/mod.mjs [test] (ecmascript)");
"__TURBOPACK__ecmascript__hoisting__location__";
;
}.call(this) }),
})()),
}]);
//# sourceMappingURL=turbopack_crates_turbopack-tests_tests_snapshot_import-meta_url_input_6c57ac._.js.map
\ No newline at end of file
......@@ -4,6 +4,6 @@
"sections": [
{"offset": {"line": 9, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/url/input/mod.mjs"],"sourcesContent":["const assetUrl = new URL('./asset.txt', import.meta.url);\n\nconsole.log(assetUrl);\nfetch(assetUrl)\n .then(res => res.text())\n .then(console.log);\n"],"names":[],"mappings":";;;;;;;AAAA,MAAM;AAEN,QAAQ,GAAG,CAAC;AACZ,MAAM,UACH,IAAI,CAAC,CAAA,MAAO,IAAI,IAAI,IACpB,IAAI,CAAC,QAAQ,GAAG"}},
{"offset": {"line": 19, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 23, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 27, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
{"offset": {"line": 24, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 28, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
import './other-dep.js'
// this cannot be an execution test, because `module` is always defined when running the test in Node.js
console.log(typeof module)
(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push(["output/4c35f_tests_snapshot_typeof-exports-esm_typeof-exports-esm_input_ccc25d._.js", {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/typeof-exports-esm/typeof-exports-esm/input/other-dep.js [test] (ecmascript)": (function({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname, m: module, e: exports, t: require }) { !function() {
console.log('other-dep');
}.call(this) }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/typeof-exports-esm/typeof-exports-esm/input/index.js [test] (ecmascript)": (({ r: __turbopack_require__, f: __turbopack_module_context__, i: __turbopack_import__, s: __turbopack_esm__, v: __turbopack_export_value__, n: __turbopack_export_namespace__, c: __turbopack_cache__, M: __turbopack_modules__, l: __turbopack_load__, j: __turbopack_dynamic__, P: __turbopack_resolve_absolute_path__, U: __turbopack_relative_url__, R: __turbopack_resolve_module_id_path__, g: global, __dirname }) => (() => {
"use strict";
__turbopack_esm__({});
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$typeof$2d$exports$2d$esm$2f$typeof$2d$exports$2d$esm$2f$input$2f$other$2d$dep$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_import__("[project]/turbopack/crates/turbopack-tests/tests/snapshot/typeof-exports-esm/typeof-exports-esm/input/other-dep.js [test] (ecmascript)");
"__TURBOPACK__ecmascript__hoisting__location__";
;
// this cannot be an execution test, because `module` is always defined when running the test in Node.js
console.log(typeof module);
})()),
}]);
//# sourceMappingURL=4c35f_tests_snapshot_typeof-exports-esm_typeof-exports-esm_input_ccc25d._.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/typeof-exports-esm/typeof-exports-esm/input/other-dep.js"],"sourcesContent":["console.log('other-dep')\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC"}},
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}},
{"offset": {"line": 10, "column": 0}, "map": {"version":3,"sources":["turbopack://[project]/turbopack/crates/turbopack-tests/tests/snapshot/typeof-exports-esm/typeof-exports-esm/input/index.js"],"sourcesContent":["import './other-dep.js'\n\n// this cannot be an execution test, because `module` is always defined when running the test in Node.js\nconsole.log(typeof module)\n"],"names":[],"mappings":";;;;AAEA,wGAAwG;AACxG,QAAQ,GAAG,CAAC,OAAO"}},
{"offset": {"line": 16, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":"A"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push([
"output/4c35f_tests_snapshot_typeof-exports-esm_typeof-exports-esm_input_index_eeae37.js",
{},
{"otherChunks":["output/4c35f_tests_snapshot_typeof-exports-esm_typeof-exports-esm_input_ccc25d._.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/typeof-exports-esm/typeof-exports-esm/input/index.js [test] (ecmascript)"]}
]);
// Dummy runtime
\ No newline at end of file
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