Unverified Commit 02b6b979 authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

turbopack: don't wrap strict factories of mixed chunks in a strict IIFE

The minifier drops the "use strict" directive of a strict IIFE in expression
position and inlines it, so a mixed chunk with enough strict factories to
use the [(()=>{"use strict";return[...]})(), ...] layout ran those factories
in sloppy mode. Write mixed chunks flat, each strict factory keeping its own
directive. All-strict chunks keep their statement-level wrapper.
Co-authored-by: 's avatarLuke Sandberg <210140+lukesandberg@users.noreply.github.com>
parent 8b583887
...@@ -119,12 +119,7 @@ impl EcmascriptBrowserChunkContent { ...@@ -119,12 +119,7 @@ impl EcmascriptBrowserChunkContent {
r#"(globalThis[{chunk_loading_global}] || (globalThis[{chunk_loading_global}] = [])).push([{script_or_path},"#, r#"(globalThis[{chunk_loading_global}] || (globalThis[{chunk_loading_global}] = [])).push([{script_or_path},"#,
chunk_loading_global = StringifyJs(&chunk_loading_global), chunk_loading_global = StringifyJs(&chunk_loading_global),
)?; )?;
write_module_factories( write_module_factories(&mut code, &chunk_items)?;
&mut code,
&chunk_items,
strict_factory_mode,
supports_arrow_functions,
)?;
write!(code, "\n]);")?; write!(code, "\n]);")?;
if let Some((_, suffix)) = strict_chunk_wrapper { if let Some((_, suffix)) = strict_chunk_wrapper {
......
...@@ -5,59 +5,45 @@ use turbopack_core::code_builder::CodeBuilder; ...@@ -5,59 +5,45 @@ use turbopack_core::code_builder::CodeBuilder;
use crate::{chunk::CodeModuleIdAndPath, utils::StringifyJs}; use crate::{chunk::CodeModuleIdAndPath, utils::StringifyJs};
const MIXED_ARROW_PREFIX: &str = "\n(()=>{\"use strict\";return[";
const MIXED_FUNCTION_PREFIX: &str = "\n(function(){\"use strict\";return[";
const MIXED_SUFFIX: &str = "\n]})(),";
const ALL_STRICT_ARROW_PREFIX: &str = "(()=>{\"use strict\";"; const ALL_STRICT_ARROW_PREFIX: &str = "(()=>{\"use strict\";";
const ALL_STRICT_FUNCTION_PREFIX: &str = "(function(){\"use strict\";"; const ALL_STRICT_FUNCTION_PREFIX: &str = "(function(){\"use strict\";";
const ALL_STRICT_SUFFIX: &str = "})()"; const ALL_STRICT_SUFFIX: &str = "})()";
/// Minimum number of strict factories that makes hoisting the directive worth its wrapper. /// Minimum number of strict factories that makes hoisting the directive worth its wrapper.
/// Derived from the minified wrapper sizes and pinned by `strict_thresholds_match_wrapper_sizes`. /// Derived from the minified wrapper sizes and pinned by `strict_thresholds_match_wrapper_sizes`.
/// The mixed wrappers differ in length but land on the same minimum; the all-strict ones do not, /// The arrow and function wrappers land on different minimums, which is why arrow support selects
/// which is why arrow support still selects between two constants here. /// between two constants here.
const MIXED_STRICT_THRESHOLD: usize = 3;
const ALL_STRICT_ARROW_THRESHOLD: usize = 2; const ALL_STRICT_ARROW_THRESHOLD: usize = 2;
const ALL_STRICT_FUNCTION_THRESHOLD: usize = 3; const ALL_STRICT_FUNCTION_THRESHOLD: usize = 3;
#[derive(Clone, Copy, PartialEq, Eq)] #[derive(Clone, Copy, PartialEq, Eq)]
pub enum StrictFactoryMode { pub enum StrictFactoryMode {
/// Every factory is written as is, each strict one carrying its own `"use strict"` directive.
Flat, Flat,
Mixed, /// Every factory is strict, and the whole chunk is wrapped in a strict IIFE statement.
AllStrict, AllStrict,
} }
/// Selects the smallest expected minified representation for this chunk's mix of module factories. /// Selects the smallest expected minified representation for this chunk's mix of module factories.
///
/// Chunks that mix strict and non-strict factories are always written flat. Grouping the strict
/// factories into a strict IIFE *expression* (`[(()=>{"use strict";return[…]})(),…]`) is not safe:
/// the minifier drops the directive and inlines the IIFE, which leaves the strict factories in a
/// non-strict context.
pub fn strict_factory_mode( pub fn strict_factory_mode(
chunk_items: &[CodeModuleIdAndPath], chunk_items: &[CodeModuleIdAndPath],
supports_arrow_functions: bool, supports_arrow_functions: bool,
) -> StrictFactoryMode { ) -> StrictFactoryMode {
let mut strict = 0; if chunk_items.iter().any(|item| !item.strict) {
let mut non_strict = 0;
for item in chunk_items {
if item.strict {
strict += 1;
} else {
non_strict += 1;
}
}
if strict == 0 {
return StrictFactoryMode::Flat; return StrictFactoryMode::Flat;
} }
let threshold = if supports_arrow_functions {
let mode = if non_strict == 0 { ALL_STRICT_ARROW_THRESHOLD
StrictFactoryMode::AllStrict
} else { } else {
StrictFactoryMode::Mixed ALL_STRICT_FUNCTION_THRESHOLD
}; };
let threshold = match (mode, supports_arrow_functions) { if chunk_items.len() >= threshold {
(StrictFactoryMode::Mixed, _) => MIXED_STRICT_THRESHOLD, StrictFactoryMode::AllStrict
(StrictFactoryMode::AllStrict, true) => ALL_STRICT_ARROW_THRESHOLD,
(StrictFactoryMode::AllStrict, false) => ALL_STRICT_FUNCTION_THRESHOLD,
(StrictFactoryMode::Flat, _) => unreachable!(),
};
if strict >= threshold {
mode
} else { } else {
StrictFactoryMode::Flat StrictFactoryMode::Flat
} }
...@@ -76,14 +62,6 @@ pub fn strict_chunk_wrapper( ...@@ -76,14 +62,6 @@ pub fn strict_chunk_wrapper(
}) })
} }
const fn mixed_prefix(supports_arrow_functions: bool) -> &'static str {
if supports_arrow_functions {
MIXED_ARROW_PREFIX
} else {
MIXED_FUNCTION_PREFIX
}
}
const fn all_strict_prefix(supports_arrow_functions: bool) -> &'static str { const fn all_strict_prefix(supports_arrow_functions: bool) -> &'static str {
if supports_arrow_functions { if supports_arrow_functions {
ALL_STRICT_ARROW_PREFIX ALL_STRICT_ARROW_PREFIX
...@@ -92,35 +70,15 @@ const fn all_strict_prefix(supports_arrow_functions: bool) -> &'static str { ...@@ -92,35 +70,15 @@ const fn all_strict_prefix(supports_arrow_functions: bool) -> &'static str {
} }
} }
/// Writes flat factories, with a strict IIFE prepended to the non-strict factories in mixed chunks. /// Writes the module factories as `id, factory,` array elements, in order.
pub fn write_module_factories( pub fn write_module_factories(
code: &mut CodeBuilder, code: &mut CodeBuilder,
chunk_items: &[CodeModuleIdAndPath], chunk_items: &[CodeModuleIdAndPath],
mode: StrictFactoryMode,
supports_arrow_functions: bool,
) -> Result<()> {
if mode == StrictFactoryMode::Mixed {
*code += mixed_prefix(supports_arrow_functions);
write_factories(code, chunk_items, |strict| strict)?;
*code += MIXED_SUFFIX;
write_factories(code, chunk_items, |strict| !strict)?;
} else {
write_factories(code, chunk_items, |_| true)?;
}
Ok(())
}
fn write_factories(
code: &mut CodeBuilder,
chunk_items: &[CodeModuleIdAndPath],
include: impl Fn(bool) -> bool,
) -> Result<()> { ) -> Result<()> {
for item in chunk_items { for item in chunk_items {
if include(item.strict) { write!(code, "\n{}, ", StringifyJs(&item.id))?;
write!(code, "\n{}, ", StringifyJs(&item.id))?; code.push_code(&item.code);
code.push_code(&item.code); write!(code, ",")?;
write!(code, ",")?;
}
} }
Ok(()) Ok(())
} }
...@@ -152,14 +110,6 @@ mod tests { ...@@ -152,14 +110,6 @@ mod tests {
#[test] #[test]
fn strict_thresholds_match_wrapper_sizes() { fn strict_thresholds_match_wrapper_sizes() {
assert_threshold(
MIXED_STRICT_THRESHOLD,
&format!("{MIXED_ARROW_PREFIX}{MIXED_SUFFIX}"),
);
assert_threshold(
MIXED_STRICT_THRESHOLD,
&format!("{MIXED_FUNCTION_PREFIX}{MIXED_SUFFIX}"),
);
assert_threshold( assert_threshold(
ALL_STRICT_ARROW_THRESHOLD, ALL_STRICT_ARROW_THRESHOLD,
&format!("{ALL_STRICT_ARROW_PREFIX}{ALL_STRICT_SUFFIX}"), &format!("{ALL_STRICT_ARROW_PREFIX}{ALL_STRICT_SUFFIX}"),
......
...@@ -78,12 +78,7 @@ impl EcmascriptNodeChunkContent { ...@@ -78,12 +78,7 @@ impl EcmascriptNodeChunkContent {
code += prefix; code += prefix;
} }
write!(code, "module.exports = [")?; write!(code, "module.exports = [")?;
write_module_factories( write_module_factories(&mut code, &chunk_items)?;
&mut code,
&chunk_items,
strict_factory_mode,
supports_arrow_functions,
)?;
write!(code, "\n];")?; write!(code, "\n];")?;
if let Some((_, suffix)) = strict_chunk_wrapper { if let Some((_, suffix)) = strict_chunk_wrapper {
code += suffix; code += suffix;
......
import { strictA } from './strict-a.js'
import { strictB } from './strict-b.js'
import { strictC } from './strict-c.js'
import sloppy from './sloppy.js'
// A chunk that mixes strict (ESM) and sloppy (CommonJS) module factories must keep each factory's
// strictness through minification.
it('keeps strict factories strict in a minified mixed chunk', () => {
expect(strictA).toBe(undefined)
expect(strictB).toBe(undefined)
expect(strictC).toBe(undefined)
})
it('keeps sloppy factories sloppy in a minified mixed chunk', () => {
expect(sloppy).toBe(globalThis)
})
// A CommonJS module without a directive is sloppy, so `this` in a plain function call is the
// global object.
module.exports = (function () {
return this
})()
// An ES module is strict, so `this` in a plain function call is undefined.
export const strictA = (function () {
return this
})()
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_require-side-effect_input_0fs4qhn32cnvu._.js", (globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_basic-tree-shake_require-side-effect_input_0fs4qhn32cnvu._.js",
(()=>{"use strict";return[ "[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
const { cat } = __turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript)");
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript)", ((__turbopack_context__) => { "[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict"; "use strict";
...@@ -181,11 +184,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo ...@@ -181,11 +184,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
; ;
; ;
}), }),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
const { cat } = __turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript)");
}),
]); ]);
//# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_require-side-effect_input_0fs4qhn32cnvu._.js.map //# sourceMappingURL=1jsg_tests_snapshot_basic-tree-shake_require-side-effect_input_0fs4qhn32cnvu._.js.map
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_1wmp5yoyw-hht._.js", (globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_1wmp5yoyw-hht._.js",
(()=>{"use strict";return[
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => { "[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict"; "use strict";
...@@ -15,6 +14,12 @@ __turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapsh ...@@ -15,6 +14,12 @@ __turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapsh
console.log('this is CJS', strictA, strictB, sloppy); console.log('this is CJS', strictA, strictB, sloppy);
module.exports = strictA + strictB + sloppy; module.exports = strictA + strictB + sloppy;
}), }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/non-strict.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
module.exports = function() {
return this === globalThis ? 34 : 0;
}();
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-a.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => { "[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-a.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict"; "use strict";
...@@ -29,13 +34,6 @@ __turbopack_context__.s([ ...@@ -29,13 +34,6 @@ __turbopack_context__.s([
]); ]);
const __TURBOPACK__default__export__ = 200; const __TURBOPACK__default__export__ = 200;
}), }),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/non-strict.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
module.exports = function() {
return this === globalThis ? 34 : 0;
}();
}),
]); ]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_1wmp5yoyw-hht._.js.map //# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_1wmp5yoyw-hht._.js.map
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"version": 3, "version": 3,
"sources": [], "sources": [],
"sections": [ "sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js"],"sourcesContent":["'use strict'\n\nconst strictA = require('./strict-a')\nconst strictB = require('./strict-b').default\nconst sloppy = require('./non-strict')\n\nimport('./below-threshold').then(({ value }) => {\n console.log('below threshold', value)\n})\nimport('./all-strict').then(({ value }) => {\n console.log('all strict', value)\n})\n\nconsole.log('this is CJS', strictA, strictB, sloppy)\nmodule.exports = strictA + strictB + sloppy\n"],"names":["strictA","strictB","default","sloppy","then","value","console","log","module","exports"],"mappings":"AAEA,MAAMA;AACN,MAAMC,UAAU,4IAAsBC,OAAO;AAC7C,MAAMC;AAEN,iKAA4BC,IAAI,CAAC,CAAC,EAAEC,KAAK,EAAE;IACzCC,QAAQC,GAAG,CAAC,mBAAmBF;AACjC;AACA,4JAAuBD,IAAI,CAAC,CAAC,EAAEC,KAAK,EAAE;IACpCC,QAAQC,GAAG,CAAC,cAAcF;AAC5B;AAEAC,QAAQC,GAAG,CAAC,eAAeP,SAASC,SAASE;AAC7CK,OAAOC,OAAO,GAAGT,UAAUC,UAAUE"}}, {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js"],"sourcesContent":["'use strict'\n\nconst strictA = require('./strict-a')\nconst strictB = require('./strict-b').default\nconst sloppy = require('./non-strict')\n\nimport('./below-threshold').then(({ value }) => {\n console.log('below threshold', value)\n})\nimport('./all-strict').then(({ value }) => {\n console.log('all strict', value)\n})\n\nconsole.log('this is CJS', strictA, strictB, sloppy)\nmodule.exports = strictA + strictB + sloppy\n"],"names":["strictA","strictB","default","sloppy","then","value","console","log","module","exports"],"mappings":"AAEA,MAAMA;AACN,MAAMC,UAAU,4IAAsBC,OAAO;AAC7C,MAAMC;AAEN,iKAA4BC,IAAI,CAAC,CAAC,EAAEC,KAAK,EAAE;IACzCC,QAAQC,GAAG,CAAC,mBAAmBF;AACjC;AACA,4JAAuBD,IAAI,CAAC,CAAC,EAAEC,KAAK,EAAE;IACpCC,QAAQC,GAAG,CAAC,cAAcF;AAC5B;AAEAC,QAAQC,GAAG,CAAC,eAAeP,SAASC,SAASE;AAC7CK,OAAOC,OAAO,GAAGT,UAAUC,UAAUE"}},
{"offset": {"line": 20, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-a.js"],"sourcesContent":["'use strict'\n\nmodule.exports = 1000\n"],"names":["module","exports"],"mappings":"AAEAA,OAAOC,OAAO,GAAG"}}, {"offset": {"line": 18, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/non-strict.js"],"sourcesContent":["module.exports = (function () {\n return this === globalThis ? 34 : 0\n})()\n"],"names":["module","exports","globalThis"],"mappings":"AAAAA,OAAOC,OAAO,GAAG,AAAC;IAChB,OAAO,IAAI,KAAKC,aAAa,KAAK;AACpC"}},
{"offset": {"line": 25, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-b.js"],"sourcesContent":["export default 200\n"],"names":[],"mappings":";;;;uCAAe"}}, {"offset": {"line": 25, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-a.js"],"sourcesContent":["'use strict'\n\nmodule.exports = 1000\n"],"names":["module","exports"],"mappings":"AAEAA,OAAOC,OAAO,GAAG"}},
{"offset": {"line": 34, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/non-strict.js"],"sourcesContent":["module.exports = (function () {\n return this === globalThis ? 34 : 0\n})()\n"],"names":["module","exports","globalThis"],"mappings":"AAAAA,OAAOC,OAAO,GAAG,AAAC;IAChB,OAAO,IAAI,KAAKC,aAAa,KAAK;AACpC"}}] {"offset": {"line": 30, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/strict-b.js"],"sourcesContent":["export default 200\n"],"names":[],"mappings":";;;;uCAAe"}}]
} }
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_comptime_typeof_input_1y4b353ijz1yk._.js", (globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_comptime_typeof_input_1y4b353ijz1yk._.js",
(()=>{"use strict";return[ "[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var __TURBOPACK__import$2e$meta__ = {
get url () {
return __turbopack_context__.F("turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js");
},
env: {
DEV: true,
PROD: false,
MODE: "development",
BASE_URL: "/",
SSR: false
}
};
console.log('typeof require', ("TURBOPACK compile-time value", "function"));
console.log('typeof import.meta', ("TURBOPACK compile-time value", "object"));
// CJS, should be `object`
console.log('typeof module', ("TURBOPACK compile-time value", "object"));
console.log('typeof exports', ("TURBOPACK compile-time value", "object"));
// CJS, should be real require
console.log(/*TURBOPACK member replacement*/ __turbopack_context__.t);
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/dep.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-automatic.js [test] (ecmascript)", ((__turbopack_context__) => { "[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-automatic.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict"; "use strict";
...@@ -60,32 +84,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo ...@@ -60,32 +84,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
; ;
; ;
; ;
}),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var __TURBOPACK__import$2e$meta__ = {
get url () {
return __turbopack_context__.F("turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js");
},
env: {
DEV: true,
PROD: false,
MODE: "development",
BASE_URL: "/",
SSR: false
}
};
console.log('typeof require', ("TURBOPACK compile-time value", "function"));
console.log('typeof import.meta', ("TURBOPACK compile-time value", "object"));
// CJS, should be `object`
console.log('typeof module', ("TURBOPACK compile-time value", "object"));
console.log('typeof exports', ("TURBOPACK compile-time value", "object"));
// CJS, should be real require
console.log(/*TURBOPACK member replacement*/ __turbopack_context__.t);
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/dep.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
}), }),
]); ]);
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
"version": 3, "version": 3,
"sources": [], "sources": [],
"sections": [ "sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-automatic.js"],"sourcesContent":["import './dep.js'\n\nconsole.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// ESM, should be `undefined`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// ESM, should be require stub\nconsole.log(require)\n"],"names":["console","log"],"mappings":";AAAA;;;;;;;;;;;;;;AAEAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,6BAA6B;AAC7BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}}, {"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js"],"sourcesContent":["console.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// CJS, should be `object`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// CJS, should be real require\nconsole.log(require)\n"],"names":["console","log"],"mappings":";;;;;;;;;;;;AAAAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,0BAA0B;AAC1BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}},
{"offset": {"line": 31, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-specified.mjs"],"sourcesContent":["console.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// ESM, should be `undefined`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// ESM, should be require stub\nconsole.log(require)\n"],"names":["console","log"],"mappings":";;;;;;;;;;;;;AAAAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,6BAA6B;AAC7BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}}, {"offset": {"line": 25, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 55, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/index.js"],"sourcesContent":["import './cjs.js'\nimport './esm-automatic.js'\nimport './esm-specified.mjs'\n"],"names":[],"mappings":";AAAA;AACA;AACA"}}, {"offset": {"line": 29, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-automatic.js"],"sourcesContent":["import './dep.js'\n\nconsole.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// ESM, should be `undefined`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// ESM, should be require stub\nconsole.log(require)\n"],"names":["console","log"],"mappings":";AAAA;;;;;;;;;;;;;;AAEAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,6BAA6B;AAC7BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}},
{"offset": {"line": 66, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js"],"sourcesContent":["console.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// CJS, should be `object`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// CJS, should be real require\nconsole.log(require)\n"],"names":["console","log"],"mappings":";;;;;;;;;;;;AAAAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,0BAA0B;AAC1BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}}, {"offset": {"line": 55, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-specified.mjs"],"sourcesContent":["console.log('typeof require', typeof require)\nconsole.log('typeof import.meta', typeof import.meta)\n// ESM, should be `undefined`\nconsole.log('typeof module', typeof module)\nconsole.log('typeof exports', typeof exports)\n\n// ESM, should be require stub\nconsole.log(require)\n"],"names":["console","log"],"mappings":";;;;;;;;;;;;;AAAAA,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AACZ,6BAA6B;AAC7BD,QAAQC,GAAG,CAAC;AACZD,QAAQC,GAAG,CAAC;AAEZ,8BAA8B;AAC9BD,QAAQC,GAAG"}},
{"offset": {"line": 88, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}] {"offset": {"line": 79, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/index.js"],"sourcesContent":["import './cjs.js'\nimport './esm-automatic.js'\nimport './esm-specified.mjs'\n"],"names":[],"mappings":";AAAA;AACA;AACA"}}]
} }
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_1xzb8pohmqk06._.js", (globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_1xzb8pohmqk06._.js",
(()=>{"use strict";return[
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/emotion/emotion/input/index.js [test] (ecmascript)", ((__turbopack_context__) => { "[project]/turbopack/crates/turbopack-tests/tests/snapshot/emotion/emotion/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict"; "use strict";
...@@ -49,7 +48,6 @@ function jsxDEV() { ...@@ -49,7 +48,6 @@ function jsxDEV() {
return 'purposefully empty stub for @emotion/react/jsx-dev-runtime.js'; return 'purposefully empty stub for @emotion/react/jsx-dev-runtime.js';
} }
}), }),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => { "[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
"purposefully empty stub"; "purposefully empty stub";
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"version": 3, "version": 3,
"sources": [], "sources": [],
"sections": [ "sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/emotion/emotion/input/index.js"],"sourcesContent":["/** @jsxImportSource @emotion/react */\n\nimport { jsx } from '@emotion/react'\nimport styled from '@emotion/styled'\n\nconst StyledButton = styled.button`\n background: blue;\n`\n\nfunction ClassNameButton({ children }) {\n return (\n <button\n className={css`\n background: blue;\n `}\n >\n {children}\n </button>\n )\n}\n\nconsole.log(StyledButton, ClassNameButton)\n"],"names":["StyledButton","ClassNameButton","children","className","css","console","log"],"mappings":";;AAAA,oCAAoC,GAEpC;AACA;;;;AAEA,MAAMA,iCAAe,mNAAM;;;AAI3B,SAASC,gBAAgB,EAAEC,QAAQ,EAAE;IACnC,qBACE,uOAAC;QACCC,WAAWC,GAAG,CAAC;;MAEf,CAAC;kBAEAF;;;;;;AAGP;AAEAG,QAAQC,GAAG,CAACN,cAAcC"}}, {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/emotion/emotion/input/index.js"],"sourcesContent":["/** @jsxImportSource @emotion/react */\n\nimport { jsx } from '@emotion/react'\nimport styled from '@emotion/styled'\n\nconst StyledButton = styled.button`\n background: blue;\n`\n\nfunction ClassNameButton({ children }) {\n return (\n <button\n className={css`\n background: blue;\n `}\n >\n {children}\n </button>\n )\n}\n\nconsole.log(StyledButton, ClassNameButton)\n"],"names":["StyledButton","ClassNameButton","children","className","css","console","log"],"mappings":";;AAAA,oCAAoC,GAEpC;AACA;;;;AAEA,MAAMA,iCAAe,mNAAM;;;AAI3B,SAASC,gBAAgB,EAAEC,QAAQ,EAAE;IACnC,qBACE,uOAAC;QACCC,WAAWC,GAAG,CAAC;;MAEf,CAAC;kBAEAF;;;;;;AAGP;AAEAG,QAAQC,GAAG,CAACN,cAAcC"}},
{"offset": {"line": 32, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/index.js"],"sourcesContent":["export function jsx() {\n return 'purposefully empty stub for @emotion/react/index.js'\n}\n"],"names":["jsx"],"mappings":";;;;AAAO,SAASA;IACd,OAAO;AACT","ignoreList":[0]}}, {"offset": {"line": 31, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/index.js"],"sourcesContent":["export function jsx() {\n return 'purposefully empty stub for @emotion/react/index.js'\n}\n"],"names":["jsx"],"mappings":";;;;AAAO,SAASA;IACd,OAAO;AACT","ignoreList":[0]}},
{"offset": {"line": 43, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/jsx-dev-runtime.js"],"sourcesContent":["export function jsxDEV() {\n return 'purposefully empty stub for @emotion/react/jsx-dev-runtime.js'\n}\n"],"names":["jsxDEV"],"mappings":";;;;AAAO,SAASA;IACd,OAAO;AACT","ignoreList":[0]}}, {"offset": {"line": 42, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/react/jsx-dev-runtime.js"],"sourcesContent":["export function jsxDEV() {\n return 'purposefully empty stub for @emotion/react/jsx-dev-runtime.js'\n}\n"],"names":["jsxDEV"],"mappings":";;;;AAAO,SAASA;IACd,OAAO;AACT","ignoreList":[0]}},
{"offset": {"line": 54, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js"],"sourcesContent":["\"purposefully empty stub\";\n\"@emtion/styled/index.js\";\n"],"names":[],"mappings":"AAAA;AACA","ignoreList":[0]}}] {"offset": {"line": 52, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js"],"sourcesContent":["\"purposefully empty stub\";\n\"@emtion/styled/index.js\";\n"],"names":[],"mappings":"AAAA;AACA","ignoreList":[0]}}]
} }
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_212xd9jyjh6hy._.js", (globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_212xd9jyjh6hy._.js",
(()=>{"use strict";return[
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js [test] (ecmascript)", ((__turbopack_context__) => { "[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict"; "use strict";
...@@ -19,6 +18,11 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo ...@@ -19,6 +18,11 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
__turbopack_context__.j(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$export$2d$alls$2f$cjs$2d$2$2f$input$2f$commonjs$2e$js__$5b$test$5d$__$28$ecmascript$29$__); __turbopack_context__.j(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$export$2d$alls$2f$cjs$2d$2$2f$input$2f$commonjs$2e$js__$5b$test$5d$__$28$ecmascript$29$__);
; ;
}), }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
// commonjs.js
exports.hello = 'World';
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/index.js [test] (ecmascript)", ((__turbopack_context__) => { "[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict"; "use strict";
...@@ -28,12 +32,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo ...@@ -28,12 +32,6 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbo
; ;
console.log(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$export$2d$alls$2f$cjs$2d$2$2f$input$2f$b$2e$js__$5b$test$5d$__$28$ecmascript$29$__); console.log(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$export$2d$alls$2f$cjs$2d$2$2f$input$2f$b$2e$js__$5b$test$5d$__$28$ecmascript$29$__);
}), }),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
// commonjs.js
exports.hello = 'World';
}),
]); ]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_212xd9jyjh6hy._.js.map //# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_212xd9jyjh6hy._.js.map
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"version": 3, "version": 3,
"sources": [], "sources": [],
"sections": [ "sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js"],"sourcesContent":["// b.js\nexport * from './c'\n// This would not be handled, but still need __turbopack__cjs__\n// as there are properties dynamically added by __turbopack__cjs__ in c.js\n"],"names":[],"mappings":";AAAA,OAAO;AACP,kVACA,+DAA+D;CAC/D,0EAA0E"}}, {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js"],"sourcesContent":["// b.js\nexport * from './c'\n// This would not be handled, but still need __turbopack__cjs__\n// as there are properties dynamically added by __turbopack__cjs__ in c.js\n"],"names":[],"mappings":";AAAA,OAAO;AACP,kVACA,+DAA+D;CAC/D,0EAA0E"}},
{"offset": {"line": 15, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/c.js"],"sourcesContent":["// c.js\nexport * from './commonjs.js'\n// This would be handled by existing logic\n"],"names":[],"mappings":";AAAA,OAAO;AACP,gWACA,0CAA0C"}}, {"offset": {"line": 14, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/c.js"],"sourcesContent":["// c.js\nexport * from './commonjs.js'\n// This would be handled by existing logic\n"],"names":[],"mappings":";AAAA,OAAO;AACP,gWACA,0CAA0C"}},
{"offset": {"line": 24, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/index.js"],"sourcesContent":["// a.js\nimport * as B from './b'\nconsole.log(B)\n"],"names":["console","log","imported module [project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js [test] (ecmascript)"],"mappings":";AAAA,OAAO;AACP;;AACAA,QAAQC,GAAG,CAACC"}}, {"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js"],"sourcesContent":["// commonjs.js\nexports.hello = 'World'\n"],"names":["exports","hello"],"mappings":"AAAA,cAAc;AACdA,QAAQC,KAAK,GAAG"}},
{"offset": {"line": 33, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js"],"sourcesContent":["// commonjs.js\nexports.hello = 'World'\n"],"names":["exports","hello"],"mappings":"AAAA,cAAc;AACdA,QAAQC,KAAK,GAAG"}}] {"offset": {"line": 28, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/index.js"],"sourcesContent":["// a.js\nimport * as B from './b'\nconsole.log(B)\n"],"names":["console","log","imported module [project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/b.js [test] (ecmascript)"],"mappings":";AAAA,OAAO;AACP;;AACAA,QAAQC,GAAG,CAACC"}}]
} }
\ No newline at end of file
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_source_maps_merged-unicode_input_1tq4mpj1076n4._.js", (globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_source_maps_merged-unicode_input_1tq4mpj1076n4._.js",
(()=>{"use strict";return[
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)", ((__turbopack_context__) => { "[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict"; "use strict";
...@@ -22,21 +21,6 @@ const waitAtLeastOneReactRenderTask = 1; //import { waitAtLeastOneReactRenderTas ...@@ -22,21 +21,6 @@ const waitAtLeastOneReactRenderTask = 1; //import { waitAtLeastOneReactRenderTas
; ;
; ;
}), }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index1.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$source_maps$2f$merged$2d$unicode$2f$input$2f$entry$2d$base$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)");
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$source_maps$2f$merged$2d$unicode$2f$input$2f$entry$2d$base$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)");
;
}),
]})(),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => { "[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
// "entry-base.js [app-rsc] (ecmascript) <module evaluation>" with // "entry-base.js [app-rsc] (ecmascript) <module evaluation>" with
...@@ -58,6 +42,20 @@ if (Date.now() > 0) { ...@@ -58,6 +42,20 @@ if (Date.now() > 0) {
__turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js [test] (ecmascript)"); __turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js [test] (ecmascript)");
} }
}), }),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index1.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$source_maps$2f$merged$2d$unicode$2f$input$2f$entry$2d$base$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)");
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$source_maps$2f$merged$2d$unicode$2f$input$2f$entry$2d$base$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)");
;
}),
]); ]);
//# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_source_maps_merged-unicode_input_1tq4mpj1076n4._.js.map //# sourceMappingURL=0_9x_turbopack-tests_tests_snapshot_source_maps_merged-unicode_input_1tq4mpj1076n4._.js.map
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"version": 3, "version": 3,
"sources": [], "sources": [],
"sections": [ "sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/collect-segment-data.js"],"sourcesContent":["import { jsx as _jsx } from \"./jsx-runtime\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst createFromReadableStream = 123; //import { createFromReadableStream } from 'react-server-dom-webpack/client.edge';\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst prerender = 123; // import { prerender } from 'react-server-dom-webpack/static.edge';\nconst streamFromBuffer=1,streamToBuffer=1; // import { streamFromBuffer, streamToBuffer } from '../stream-utils/node-web-streams-helper';\nconst waitAtLeastOneReactRenderTask=1; //import { waitAtLeastOneReactRenderTask } from '../../lib/scheduler';\n// import './segment-value-encoding';\n"],"names":[],"mappings":";;;;;;;;;AACA,6DAA6D;AAC7D,MAAM,2BAA2B,KAAK,kFAAkF;AACxH,6DAA6D;AAC7D,MAAM,YAAY,KAAK,oEAAoE;AAC3F,MAAM,mBAAiB,GAAE,iBAAe,GAAG,8FAA8F;AACzI,MAAM,gCAA8B,GAAG,sEAAsE;CAC7G,sCAAsC"}}, {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/collect-segment-data.js"],"sourcesContent":["import { jsx as _jsx } from \"./jsx-runtime\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst createFromReadableStream = 123; //import { createFromReadableStream } from 'react-server-dom-webpack/client.edge';\n// eslint-disable-next-line import/no-extraneous-dependencies\nconst prerender = 123; // import { prerender } from 'react-server-dom-webpack/static.edge';\nconst streamFromBuffer=1,streamToBuffer=1; // import { streamFromBuffer, streamToBuffer } from '../stream-utils/node-web-streams-helper';\nconst waitAtLeastOneReactRenderTask=1; //import { waitAtLeastOneReactRenderTask } from '../../lib/scheduler';\n// import './segment-value-encoding';\n"],"names":[],"mappings":";;;;;;;;;AACA,6DAA6D;AAC7D,MAAM,2BAA2B,KAAK,kFAAkF;AACxH,6DAA6D;AAC7D,MAAM,YAAY,KAAK,oEAAoE;AAC3F,MAAM,mBAAiB,GAAE,iBAAe,GAAG,8FAA8F;AACzI,MAAM,gCAA8B,GAAG,sEAAsE;CAC7G,sCAAsC"}},
{"offset": {"line": 27, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index1.js"],"sourcesContent":["import \"./entry-base.js\";\n"],"names":[],"mappings":";AAAA"}}, {"offset": {"line": 25, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index.js"],"sourcesContent":["// \"entry-base.js [app-rsc] (ecmascript) <module evaluation>\" with\n// [\"reflect-utils.js [app-rsc] (ecmascript)\",\n// \"params.js [app-rsc] (ecmascript)\",\n// \"segment-value-encoding.js [app-rsc] (ecmascript)\",\n// \"collect-segment-data.js [app-rsc] (ecmascript)\",\n// \"entry-base.js [app-rsc] (ecmascript) <locals>\"]\n\n// \"entry-base.js [test] (ecmascript) <module evaluation>\" with\n// [\"reflect-utils.js [test] (ecmascript)\",\n// \"params.js [test] (ecmascript)\",\n// \"segment-value-encoding.js [test] (ecmascript)\",\n// \"collect-segment-data.js [test] (ecmascript)\",\n// \"entry-base.js [test] (ecmascript) <locals>\"]\n\nif (Date.now() > 0) {\n require('./index1.js')\n}\nif (Date.now() > 0) {\n require('./index2.js')\n}\n\n"],"names":["Date","now"],"mappings":"AAAA,kEAAkE;AAClE,8CAA8C;AAC9C,sCAAsC;AACtC,sDAAsD;AACtD,oDAAoD;AACpD,mDAAmD;AAEnD,+DAA+D;AAC/D,2CAA2C;AAC3C,mCAAmC;AACnC,mDAAmD;AACnD,kDAAkD;AAClD,iDAAiD;AAEjD,IAAIA,KAAKC,GAAG,KAAK,GAAG;;AAEpB;AACA,IAAID,KAAKC,GAAG,KAAK,GAAG;;AAEpB"}},
{"offset": {"line": 34, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js"],"sourcesContent":["import \"./entry-base.js\";\n"],"names":[],"mappings":";AAAA"}}, {"offset": {"line": 47, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index1.js"],"sourcesContent":["import \"./entry-base.js\";\n"],"names":[],"mappings":";AAAA"}},
{"offset": {"line": 41, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index.js"],"sourcesContent":["// \"entry-base.js [app-rsc] (ecmascript) <module evaluation>\" with\n// [\"reflect-utils.js [app-rsc] (ecmascript)\",\n// \"params.js [app-rsc] (ecmascript)\",\n// \"segment-value-encoding.js [app-rsc] (ecmascript)\",\n// \"collect-segment-data.js [app-rsc] (ecmascript)\",\n// \"entry-base.js [app-rsc] (ecmascript) <locals>\"]\n\n// \"entry-base.js [test] (ecmascript) <module evaluation>\" with\n// [\"reflect-utils.js [test] (ecmascript)\",\n// \"params.js [test] (ecmascript)\",\n// \"segment-value-encoding.js [test] (ecmascript)\",\n// \"collect-segment-data.js [test] (ecmascript)\",\n// \"entry-base.js [test] (ecmascript) <locals>\"]\n\nif (Date.now() > 0) {\n require('./index1.js')\n}\nif (Date.now() > 0) {\n require('./index2.js')\n}\n\n"],"names":["Date","now"],"mappings":"AAAA,kEAAkE;AAClE,8CAA8C;AAC9C,sCAAsC;AACtC,sDAAsD;AACtD,oDAAoD;AACpD,mDAAmD;AAEnD,+DAA+D;AAC/D,2CAA2C;AAC3C,mCAAmC;AACnC,mDAAmD;AACnD,kDAAkD;AAClD,iDAAiD;AAEjD,IAAIA,KAAKC,GAAG,KAAK,GAAG;;AAEpB;AACA,IAAID,KAAKC,GAAG,KAAK,GAAG;;AAEpB"}}] {"offset": {"line": 54, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js"],"sourcesContent":["import \"./entry-base.js\";\n"],"names":[],"mappings":";AAAA"}}]
} }
\ No newline at end of file
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