Unverified Commit e9a5067e authored by Luke Sandberg's avatar Luke Sandberg Committed by GitHub

[turbopack] Promote `exports` and module to factory parameters for cjs (#82285)

## Optimze cjs codegen by promoting `module` and `exports` to factory parameters

*tl;dr; destructing is hard, lets go shopping!*

Currently we prefix factories for cjs modules with
`var {m:module, e:exports} = __turbopack_context__;`

This is problematic since swc is unable to eliminate these bindings when they are dead (too afraid of es5 getter properties and side effects 😭).  Furthermore we are playing a game of telephone with ourselves since our caller basically is doing

`factory({m:module, e: module.exports})` when they call us (this is skimming over a bunch of details, ofc).

Instead just pass them directly as function parameters.  One downside of this is that we still pass them to `esm` factories even though they are ignored (and simply not declared by the factories).  This is not too costly since the caller has trivial access already and browsers are pretty good at handling/ignoring extra parameters (see https://v8.dev/blog/adaptor-frame for the clever way v8 optimizes this).

### Alternatives

The main alternative considered was compile time replacing references to `module` and `exports` with `__turbopack_context__.(m|e)`. Unfortunately this breaks subtle edge cases of the cjs spec since it is allowed for users to rewrite `module` and `exports` with assignments  (e.g. `exports = 'bad idea'`).  This is generally a linter error but not unheard of and we cannot break it.

The other alternative considered was enhancing `swc` to inline and dead code eliminate destructuring patterns, but from playing with the playgound it looks like swc is pretty conservative about moving/inlining variables across side effectful statements, so we would still be paying the cost of the declaration in many cases.

## Turbopack Performance Comparison: Head vs Change

As expected this is a substantial improvement to commonjs evaluation. The ESM results are kind of confusing.  I generally expected 'neutral' since the cost of passing a dead parameters is so small in modern vms.

| Test Case | Metric | Head (ms) | Change (ms) | Speedup | Improvement |
|-----------|--------|-----------|-------------|---------|-------------|
| **Client CommonJS** | Load - Average | 31.61 | 24.38 | **1.30x** | **+29.6%** |
| | Load - Median | 32.05 | 24.30 | **1.32x** | **+31.9%** |
| | Load - P75 | 33.10 | 24.90 | **1.33x** | **+32.9%** |
| | Execute - Average | 25.96 | 19.80 | **1.31x** | **+31.1%** |
| | Execute - Median | 25.90 | 19.50 | **1.33x** | **+32.8%** |
| | Execute - P75 | 26.50 | 20.20 | **1.31x** | **+31.2%** |
| **Client ESM** | Load - Average | 22.28 | 21.94 | **1.02x** | **+1.6%** |
| | Load - Median | 21.80 | 21.60 | **1.01x** | **+0.9%** |
| | Load - P75 | 23.50 | 22.10 | **1.06x** | **+6.3%** |
| | Execute - Average | 50.77 | 48.12 | **1.06x** | **+5.5%** |
| | Execute - Median | 50.85 | 47.55 | **1.07x** | **+6.9%** |
| | Execute - P75 | 51.60 | 48.30 | **1.07x** | **+6.8%** |
| **Pages API CommonJS** | Load - Average | 24.18 | 23.33 | **1.04x** | **+3.7%** |
| | Load - Median | 23.27 | 23.57 | 0.99x | -1.3% |
| | Load - P75 | 25.29 | 23.96 | **1.06x** | **+5.5%** |
| | Execute - Average | 32.23 | 24.26 | **1.33x** | **+32.8%** |
| | Execute - Median | 31.16 | 24.34 | **1.28x** | **+28.0%** |
| | Execute - P75 | 33.42 | 24.52 | **1.36x** | **+36.3%** |
| **Pages API ESM** | Load - Average | 23.48 | 28.91 | 0.81x | -18.8% |
| | Load - Median | 23.13 | 28.91 | 0.80x | -20.0% |
| | Load - P75 | 25.55 | 29.57 | 0.86x | -13.6% |
| | Execute - Average | 63.01 | 55.94 | **1.13x** | **+12.6%** |
| | Execute - Median | 61.56 | 55.22 | **1.11x** | **+11.5%** |
| | Execute - P75 | 69.56 | 56.40 | **1.23x** | **+23.3%** |

**Legend:**
- **Bold values** indicate performance improvements (speedups)
- Regular values indicate performance regressions (slowdowns)
- Speedup = Head Time ÷ Change Time (>1.0 = faster, <1.0 = slower)
- P75 = 75th percentile
parent 74a0aa2f
......@@ -192,7 +192,6 @@ impl EcmascriptChunkItem for HmrEntryChunkItem {
inner_code: code.build(),
options: EcmascriptChunkItemOptions {
strict: true,
module: true,
..Default::default()
},
..Default::default()
......
......@@ -59,13 +59,17 @@ function instantiateModule(
}
const module: Module = createModuleObject(id)
const exports = module.exports
moduleCache[id] = module
// NOTE(alexkirsz) This can fail when the module encounters a runtime error.
const context = new (Context as any as ContextConstructor<Module>)(module)
const context = new (Context as any as ContextConstructor<Module>)(
module,
exports
)
try {
moduleFactory(context)
moduleFactory(context, module, exports)
} catch (error) {
module.error = error as any
throw error
......
......@@ -165,15 +165,20 @@ const getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<
function DevContext(
this: TurbopackDevContext,
module: HotModule,
exports: Exports,
refresh: RefreshContext
) {
Context.call(this, module)
Context.call(this, module, exports)
this.k = refresh
}
DevContext.prototype = Context.prototype
type DevContextConstructor = {
new (module: HotModule, refresh: RefreshContext): TurbopackDevContext
new (
module: HotModule,
exports: Exports,
refresh: RefreshContext
): TurbopackDevContext
}
function instantiateModule(
......@@ -217,6 +222,7 @@ function instantiateModule(
}
const module: HotModule = createModuleObject(id) as HotModule
const exports = module.exports
module.parents = parents
module.children = []
module.hot = hot
......@@ -229,9 +235,10 @@ function instantiateModule(
runModuleExecutionHooks(module, (refresh) => {
const context = new (DevContext as any as DevContextConstructor)(
module,
exports,
refresh
)
moduleFactory(context)
moduleFactory(context, module, exports)
})
} catch (error) {
module.error = error as any
......
......@@ -216,12 +216,16 @@ function instantiateModule(
}
const module: Module = createModuleObject(id)
const exports = module.exports
moduleCache[id] = module
const context = new (Context as any as ContextConstructor<Module>)(
module,
exports
)
// NOTE(alexkirsz) This can fail when the module encounters a runtime error.
try {
const context = new (Context as any as ContextConstructor<Module>)(module)
moduleFactory(context)
moduleFactory(context, module, exports)
} catch (error) {
module.error = error as any
throw error
......
......@@ -115,7 +115,7 @@ interface ModuleWithDirection extends Module {
interface TurbopackBaseContext<M> {
a: AsyncModule
e: Module['exports']
e: Exports
r: CommonJsRequire
t: RuntimeRequire
f: ModuleContextFactory
......
......@@ -22,9 +22,20 @@ const REEXPORTED_OBJECTS = Symbol('reexported objects')
/**
* Constructs the `__turbopack_context__` object for a module.
*/
function Context(this: TurbopackBaseContext<Module>, module: Module) {
function Context(
this: TurbopackBaseContext<Module>,
module: Module,
exports: Exports
) {
this.m = module
this.e = module.exports
// We need to store this here instead of accessing it from the module object to:
// 1. Make it available to factories directly, since we rewrite `this` to
// `__turbopack_context__.e` in CJS modules.
// 2. Support async modules which rewrite `module.exports` to a promise, so we
// can still access the original exports object from functions like
// `esmExport`
// Ideally we could find a new approach for async modules and drop this property altogether.
this.e = exports
}
const contextPrototype = Context.prototype as TurbopackBaseContext<Module>
......@@ -145,11 +156,16 @@ function esmExport(
}
contextPrototype.s = esmExport
function ensureDynamicExports(module: Module, exports: Exports) {
let reexportedObjects = module[REEXPORTED_OBJECTS]
type ReexportedObjects = Record<PropertyKey, unknown>[]
function ensureDynamicExports(
module: Module,
exports: Exports
): ReexportedObjects {
let reexportedObjects: ReexportedObjects | undefined =
module[REEXPORTED_OBJECTS]
if (!reexportedObjects) {
reexportedObjects = module[REEXPORTED_OBJECTS] = []
module[REEXPORTED_OBJECTS] = reexportedObjects = []
module.exports = module.namespaceObject = new Proxy(exports, {
get(target, prop) {
if (
......@@ -176,6 +192,7 @@ function ensureDynamicExports(module: Module, exports: Exports) {
},
})
}
return reexportedObjects
}
/**
......@@ -186,16 +203,19 @@ function dynamicExport(
object: Record<string, any>,
id: ModuleId | undefined
) {
let module = this.m
let exports = this.e
let module: Module
let exports: Module['exports']
if (id != null) {
module = getOverwrittenModule(this.c, id)
exports = module.exports
} else {
module = this.m
exports = this.e
}
ensureDynamicExports(module, exports)
const reexportedObjects = ensureDynamicExports(module, exports)
if (typeof object === 'object' && object !== null) {
module[REEXPORTED_OBJECTS]!.push(object)
reexportedObjects.push(object)
}
}
contextPrototype.j = dynamicExport
......@@ -205,9 +225,11 @@ function exportValue(
value: any,
id: ModuleId | undefined
) {
let module = this.m
let module: Module
if (id != null) {
module = getOverwrittenModule(this.c, id)
} else {
module = this.m
}
module.exports = value
}
......@@ -218,9 +240,11 @@ function exportNamespace(
namespace: any,
id: ModuleId | undefined
) {
let module = this.m
let module: Module
if (id != null) {
module = getOverwrittenModule(this.c, id)
} else {
module = this.m
}
module.exports = module.namespaceObject = namespace
}
......@@ -664,7 +688,7 @@ function requireStub(_moduleId: ModuleId): never {
contextPrototype.z = requireStub
type ContextConstructor<M> = {
new (module: Module): TurbopackBaseContext<M>
new (module: Module, exports: Exports): TurbopackBaseContext<M>
}
function applyModuleFactoryName(factory: Function) {
......
......@@ -21,7 +21,7 @@ use crate::{
EcmascriptModuleContent,
references::async_module::{AsyncModuleOptions, OptionAsyncModuleOptions},
runtime_functions::TURBOPACK_ASYNC_MODULE,
utils::{FormatIter, StringifyJs},
utils::StringifyJs,
};
#[turbo_tasks::value(shared)]
......@@ -66,7 +66,6 @@ impl EcmascriptChunkItemContent {
strict: true,
externals,
async_module,
stub_require: true,
..Default::default()
}
} else {
......@@ -78,8 +77,7 @@ impl EcmascriptChunkItemContent {
strict,
externals,
// These things are not available in ESM
module: true,
exports: true,
module_and_exports: true,
..Default::default()
}
},
......@@ -90,28 +88,20 @@ impl EcmascriptChunkItemContent {
#[turbo_tasks::function]
pub async fn module_factory(&self) -> Result<Vc<Code>> {
let mut args = Vec::new();
if self.options.module {
args.push("m: module");
}
if self.options.exports {
args.push("e: exports");
}
let mut code = CodeBuilder::default();
for additional_id in self.additional_ids.iter().try_join().await? {
writeln!(code, "{}, ", StringifyJs(&*additional_id))?;
}
code += "((__turbopack_context__) => {\n";
if self.options.module_and_exports {
code += "((__turbopack_context__, module, exports) => {\n";
} else {
code += "((__turbopack_context__) => {\n";
}
if self.options.strict {
code += "\"use strict\";\n\n";
} else {
code += "\n";
}
if !args.is_empty() {
let args = FormatIter(|| args.iter().copied().intersperse(", "));
writeln!(code, "var {{ {args} }} = __turbopack_context__;")?;
}
if self.options.async_module.is_some() {
writeln!(
......@@ -119,8 +109,6 @@ impl EcmascriptChunkItemContent {
"return {TURBOPACK_ASYNC_MODULE}(async (__turbopack_handle_async_dependencies__, \
__turbopack_async_result__) => {{ try {{\n"
)?;
} else if !args.is_empty() {
code += "{\n";
}
let source_map = if let Some(rewrite_source_path) = &self.rewrite_source_path {
......@@ -138,8 +126,6 @@ impl EcmascriptChunkItemContent {
}}, {});",
opts.has_top_level_await
)?;
} else if !args.is_empty() {
code += "}";
}
code += "})";
......@@ -154,15 +140,9 @@ impl EcmascriptChunkItemContent {
pub struct EcmascriptChunkItemOptions {
/// Whether this chunk item should be in "use strict" mode.
pub strict: bool,
/// Whether this chunk item's module factory should include a `module`
/// argument.
pub module: bool,
/// Whether this chunk item's module factory should include an `exports`
/// argument.
pub exports: bool,
/// Whether this chunk item's module factory should include an argument for a throwing require
/// stub (for ESM)
pub stub_require: bool,
/// Whether this chunk item's module factory should include a `module` and
/// `exports` argument.
pub module_and_exports: bool,
/// Whether this chunk item's module factory should include a
/// `__turbopack_external_require__` argument.
pub externals: bool,
......
......@@ -169,7 +169,6 @@ impl EcmascriptChunkItem for SideEffectsModuleChunkItem {
rewrite_source_path: None,
options: EcmascriptChunkItemOptions {
strict: true,
exports: true,
async_module: if has_top_level_await {
Some(AsyncModuleOptions {
has_top_level_await: true,
......
exports = () => 'hello'
if (typeof exports === 'object') throw 'oh no'
module.exports = 1234
import moduleUniversal from './module-universal.js'
import moduleReassign from './module-reassign.js'
import exportsReassign from './exports-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)
expect(exportsReassign).toBe(1234)
})
it('should not replace typeof module for non-free variables', () => {
expect(moduleReassign.foo).toBe(1234)
})
exports = () => 'hello'
if (typeof exports === 'object') throw 'oh no'
module.exports = 1234
module = () => 'hello'
if (typeof module === 'object') throw 'oh no'
exports.foo = 1234
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4c35f_tests_snapshot_basic-tree-shake_dynamic-import_input_index_92a5f455.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
async function main() {
const lib = await __turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/lib.js [test] (ecmascript, async loader)");
console.log(lib.cat);
}
main();
}}),
}),
]);
//# sourceMappingURL=4c35f_tests_snapshot_basic-tree-shake_dynamic-import_input_index_92a5f455.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/index.js"],"sourcesContent":["async function main() {\n const lib = await import('./lib')\n console.log(lib.cat)\n}\n\nmain()\n"],"names":[],"mappings":"AAAA,eAAe;IACb,MAAM,MAAM;IACZ,QAAQ,GAAG,CAAC,IAAI,GAAG;AACrB;AAEA"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/index.js"],"sourcesContent":["async function main() {\n const lib = await import('./lib')\n console.log(lib.cat)\n}\n\nmain()\n"],"names":[],"mappings":"AAAA,eAAe;IACb,MAAM,MAAM;IACZ,QAAQ,GAAG,CAAC,IAAI,GAAG;AACrB;AAEA"}}]
}
\ No newline at end of file
......@@ -180,12 +180,10 @@ 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__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const { cat } = __turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript)");
}}),
}),
]);
//# sourceMappingURL=4c35f_tests_snapshot_basic-tree-shake_require-side-effect_input_f83a22d6._.js.map
\ No newline at end of file
......@@ -13,5 +13,5 @@
{"offset": {"line": 134, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 145, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 167, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 186, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/index.js"],"sourcesContent":["const { cat } = require('./lib')\n"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG,EAAE"}}]
{"offset": {"line": 184, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/index.js"],"sourcesContent":["const { cat } = require('./lib')\n"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG,EAAE"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_46366300._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/shared.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/shared.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
// shared package
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -2,7 +2,7 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/shared.js"],"sourcesContent":["// shared package\n"],"names":[],"mappings":"AAAA,iBAAiB"}},
{"offset": {"line": 10, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/index.js"],"sourcesContent":["import { bar } from 'bar'\nimport './shared'\n\nbar(true)\n\nimport('./import').then(({ foo }) => {\n foo(true)\n})\n"],"names":[],"mappings":";AAAA;AACA;;;AAEA,IAAA,gOAAG,EAAC;AAEJ,yJAAmB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE;IAC9B,IAAI;AACN"}},
{"offset": {"line": 23, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/node_modules/bar/index.js"],"sourcesContent":["export function bar(value) {\n console.assert(value);\n}\n"],"names":[],"mappings":";;;;AAAO,SAAS,IAAI,KAAK;IACvB,QAAQ,MAAM,CAAC;AACjB","ignoreList":[0]}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/shared.js"],"sourcesContent":["// shared package\n"],"names":[],"mappings":"AAAA,iBAAiB"}},
{"offset": {"line": 8, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/index.js"],"sourcesContent":["import { bar } from 'bar'\nimport './shared'\n\nbar(true)\n\nimport('./import').then(({ foo }) => {\n foo(true)\n})\n"],"names":[],"mappings":";AAAA;AACA;;;AAEA,IAAA,gOAAG,EAAC;AAEJ,yJAAmB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE;IAC9B,IAAI;AACN"}},
{"offset": {"line": 21, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/node_modules/bar/index.js"],"sourcesContent":["export function bar(value) {\n console.assert(value);\n}\n"],"names":[],"mappings":";;;;AAAO,SAAS,IAAI,KAAK;IACvB,QAAQ,MAAM,CAAC;AACjB","ignoreList":[0]}}]
}
\ No newline at end of file
module.exports = [
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build/input/shared.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build/input/shared.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
// shared package
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -2,7 +2,7 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build/input/shared.js"],"sourcesContent":["// shared package\n"],"names":[],"mappings":"AAAA,iBAAiB"}},
{"offset": {"line": 10, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build/input/index.js"],"sourcesContent":["import { bar } from 'bar'\nimport './shared'\n\nbar(true)\n\nimport('./import').then(({ foo }) => {\n foo(true)\n})\n"],"names":[],"mappings":";AAAA;AACA;;;AAEA,IAAA,sOAAG,EAAC;AAEJ,+JAAmB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE;IAC9B,IAAI;AACN"}},
{"offset": {"line": 23, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build/input/node_modules/bar/index.js"],"sourcesContent":["export function bar(value) {\n console.assert(value);\n}\n"],"names":[],"mappings":";;;;AAAO,SAAS,IAAI,KAAK;IACvB,QAAQ,MAAM,CAAC;AACjB","ignoreList":[0]}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build/input/shared.js"],"sourcesContent":["// shared package\n"],"names":[],"mappings":"AAAA,iBAAiB"}},
{"offset": {"line": 8, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build/input/index.js"],"sourcesContent":["import { bar } from 'bar'\nimport './shared'\n\nbar(true)\n\nimport('./import').then(({ foo }) => {\n foo(true)\n})\n"],"names":[],"mappings":";AAAA;AACA;;;AAEA,IAAA,sOAAG,EAAC;AAEJ,+JAAmB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE;IAC9B,IAAI;AACN"}},
{"offset": {"line": 21, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build/input/node_modules/bar/index.js"],"sourcesContent":["export function bar(value) {\n console.assert(value);\n}\n"],"names":[],"mappings":";;;;AAAO,SAAS,IAAI,KAAK;IACvB,QAAQ,MAAM,CAAC;AACjB","ignoreList":[0]}}]
}
\ No newline at end of file
module.exports=["[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/ecmascript_minify/input/index.js [test] (ecmascript)",e=>{var{m:t,e:o}=e;{let e="Hello";console.log("Hello, world!",3,e),console.log(e)}}];
module.exports=["[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/ecmascript_minify/input/index.js [test] (ecmascript)",(t,e,o)=>{let s="Hello";console.log("Hello, world!",3,s),console.log(s)}];
//# sourceMappingURL=b1abf_turbopack-tests_tests_snapshot_basic_ecmascript_minify_input_index_6869f84f.js.map
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/ecmascript_minify/input/index.js"],"sourcesContent":["const inlined = 3\nconst message = getMessage()\n\nconsole.log('Hello,' + ' world!', inlined, message)\nconsole.log(message)\n\nfunction getMessage() {\n return 'Hello'\n}\n"],"names":[],"mappings":"2JACA,IAAM,EAMG,QANO,AAEhB,QAAQ,GAAG,CAAC,WAAW,KAHP,EAG2B,GAC3C,CADkC,OAC1B,GAAG,CAAC"}
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/ecmascript_minify/input/index.js"],"sourcesContent":["const inlined = 3\nconst message = getMessage()\n\nconsole.log('Hello,' + ' world!', inlined, message)\nconsole.log(message)\n\nfunction getMessage() {\n return 'Hello'\n}\n"],"names":[],"mappings":"iJACA,IAAM,EAMG,QANO,AAEhB,QAAQ,GAAG,CAAC,WAAW,KAHP,EAG2B,GAC3C,CADkC,OAC1B,GAAG,CAAC"}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4e721_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_index_c0953835.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
"use strict";
var { m: module, e: exports } = __turbopack_context__;
{
console.log('this is CJS');
module.exports = 1234;
}}),
}),
]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_basic_use-strict_input_index_c0953835.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 6, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js"],"sourcesContent":["'use strict'\n\nconsole.log('this is CJS')\nmodule.exports = 1234\n"],"names":[],"mappings":"AAEA,QAAQ,GAAG,CAAC;AACZ,OAAO,OAAO,GAAG"}}]
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/use-strict/input/index.js"],"sourcesContent":["'use strict'\n\nconsole.log('this is CJS')\nmodule.exports = 1234\n"],"names":[],"mappings":"AAEA,QAAQ,GAAG,CAAC;AACZ,OAAO,OAAO,GAAG"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4e721_crates_turbopack-tests_tests_snapshot_comptime_define_input_index_4d74c0a3.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/define/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/define/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
if ("TURBOPACK compile-time truthy", 1) {
console.log('DEFINED_VALUE');
}
......@@ -60,7 +58,7 @@ if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable
("TURBOPACK compile-time value", "development") != 'production' && console.log('development');
("TURBOPACK compile-time value", "development") == 'production' && console.log('production');
console.log(("TURBOPACK compile-time value", "/ROOT/turbopack/crates/turbopack-tests/tests/snapshot/comptime/define/input"));
}}),
}),
]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_comptime_define_input_index_4d74c0a3.js.map
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_comptime_define_input_index_4d74c0a3.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/define/input/index.js"],"sourcesContent":["if (DEFINED_VALUE) {\n console.log('DEFINED_VALUE')\n}\n\nif (DEFINED_TRUE) {\n console.log('DEFINED_VALUE')\n}\n\nif (!DEFINED_NULL) {\n console.log('DEFINED_NULL', DEFINED_NULL)\n}\n\nif (DEFINED_INT) {\n console.log('DEFINED_INT', DEFINED_INT)\n}\n\nif (DEFINED_FLOAT) {\n console.log('DEFINED_FLOAT', DEFINED_FLOAT)\n}\n\nif (DEFINED_ARRAY) {\n console.log('DEFINED_ARRAY', DEFINED_ARRAY)\n}\n\nif (DEFINED_EVALUATE) {\n console.log('DEFINED_EVALUATE', DEFINED_EVALUATE)\n}\n\nif (DEFINED_EVALUATE_NESTED) {\n console.log('DEFINED_EVALUATE_NESTED', DEFINED_EVALUATE_NESTED)\n}\n\nif (A.VERY.LONG.DEFINED.VALUE) {\n console.log('A.VERY.LONG.DEFINED.VALUE')\n}\n\nif (process.env.NODE_ENV) {\n console.log('something')\n}\n\nif (process.env.NODE_ENV === 'production') {\n console.log('production')\n}\n\nvar p = process\n\nconsole.log(A.VERY.LONG.DEFINED.VALUE)\nconsole.log(DEFINED_VALUE)\nconsole.log(p.env.NODE_ENV)\n\nif (p.env.NODE_ENV === 'production') {\n console.log('production')\n}\n\np.env.NODE_ENV == 'production'\n ? console.log('production')\n : console.log('development')\n\n// TODO short-circuit is not implemented yet\np.env.NODE_ENV != 'production' && console.log('development')\np.env.NODE_ENV == 'production' && console.log('production')\n\nconsole.log(__dirname)\n"],"names":[],"mappings":"AAAA,wCAAmB;IACjB,QAAQ,GAAG,CAAC;AACd;AAEA,wCAAkB;IAChB,QAAQ,GAAG,CAAC;AACd;AAEA,wCAAmB;IACjB,QAAQ,GAAG,CAAC;AACd;AAEA,wCAAiB;IACf,QAAQ,GAAG,CAAC;AACd;AAEA,wCAAmB;IACjB,QAAQ,GAAG,CAAC;AACd;AAEA,wCAAmB;IACjB,QAAQ,GAAG,CAAC;;;;;;;;;AACd;AAEA,wCAAsB;IACpB,QAAQ,GAAG,CAAC,qDAzBd,IAAI;AA0BJ;AAEA,wCAA6B;IAC3B,QAAQ,GAAG,CAAC;;;yCA7Bd,IAAM;;AA8BN;AAEA,wCAA+B;IAC7B,QAAQ,GAAG,CAAC;AACd;AAEA,wCAA0B;IACxB,QAAQ,GAAG,CAAC;AACd;AAEA;;AAIA,IAAI,IAAI;AAER,QAAQ,GAAG;;;AACX,QAAQ,GAAG;AACX,QAAQ,GAAG;AAEX;;AAIA,sCACI,0BACA,QAAQ,GAAG,CAAC;AAEhB,4CAA4C;AAC5C,mDAAkB,gBAAgB,QAAQ,GAAG,CAAC;AAC9C,mDAAkB,gBAAgB,QAAQ,GAAG,CAAC;AAE9C,QAAQ,GAAG"}}]
}
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/define/input/index.js"],"sourcesContent":["if (DEFINED_VALUE) {\n console.log('DEFINED_VALUE')\n}\n\nif (DEFINED_TRUE) {\n console.log('DEFINED_VALUE')\n}\n\nif (!DEFINED_NULL) {\n console.log('DEFINED_NULL', DEFINED_NULL)\n}\n\nif (DEFINED_INT) {\n console.log('DEFINED_INT', DEFINED_INT)\n}\n\nif (DEFINED_FLOAT) {\n console.log('DEFINED_FLOAT', DEFINED_FLOAT)\n}\n\nif (DEFINED_ARRAY) {\n console.log('DEFINED_ARRAY', DEFINED_ARRAY)\n}\n\nif (DEFINED_EVALUATE) {\n console.log('DEFINED_EVALUATE', DEFINED_EVALUATE)\n}\n\nif (DEFINED_EVALUATE_NESTED) {\n console.log('DEFINED_EVALUATE_NESTED', DEFINED_EVALUATE_NESTED)\n}\n\nif (A.VERY.LONG.DEFINED.VALUE) {\n console.log('A.VERY.LONG.DEFINED.VALUE')\n}\n\nif (process.env.NODE_ENV) {\n console.log('something')\n}\n\nif (process.env.NODE_ENV === 'production') {\n console.log('production')\n}\n\nvar p = process\n\nconsole.log(A.VERY.LONG.DEFINED.VALUE)\nconsole.log(DEFINED_VALUE)\nconsole.log(p.env.NODE_ENV)\n\nif (p.env.NODE_ENV === 'production') {\n console.log('production')\n}\n\np.env.NODE_ENV == 'production'\n ? console.log('production')\n : console.log('development')\n\n// TODO short-circuit is not implemented yet\np.env.NODE_ENV != 'production' && console.log('development')\np.env.NODE_ENV == 'production' && console.log('production')\n\nconsole.log(__dirname)\n"],"names":[],"mappings":"AAAA,wCAAmB;IACjB,QAAQ,GAAG,CAAC;AACd;AAEA,wCAAkB;IAChB,QAAQ,GAAG,CAAC;AACd;AAEA,wCAAmB;IACjB,QAAQ,GAAG,CAAC;AACd;AAEA,wCAAiB;IACf,QAAQ,GAAG,CAAC;AACd;AAEA,wCAAmB;IACjB,QAAQ,GAAG,CAAC;AACd;AAEA,wCAAmB;IACjB,QAAQ,GAAG,CAAC;;;;;;;;;AACd;AAEA,wCAAsB;IACpB,QAAQ,GAAG,CAAC,qDAzBd,IAAI;AA0BJ;AAEA,wCAA6B;IAC3B,QAAQ,GAAG,CAAC;;;yCA7Bd,IAAM;;AA8BN;AAEA,wCAA+B;IAC7B,QAAQ,GAAG,CAAC;AACd;AAEA,wCAA0B;IACxB,QAAQ,GAAG,CAAC;AACd;AAEA;;AAIA,IAAI,IAAI;AAER,QAAQ,GAAG;;;AACX,QAAQ,GAAG;AACX,QAAQ,GAAG;AAEX;;AAIA,sCACI,0BACA,QAAQ,GAAG,CAAC;AAEhB,4CAA4C;AAC5C,mDAAkB,gBAAgB,QAAQ,GAAG,CAAC;AAC9C,mDAAkB,gBAAgB,QAAQ,GAAG,CAAC;AAE9C,QAAQ,GAAG"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_comptime_typeof_input_80f5724c._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const __TURBOPACK__import$2e$meta__ = {
get url () {
return `file://${__turbopack_context__.P("turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js")}`;
......@@ -15,12 +13,10 @@ 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__) => {
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/dep.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/esm-automatic.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -2,9 +2,9 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/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":[],"mappings":";;;;;AAAA,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AACZ,0BAA0B;AAC1B,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AAEZ,8BAA8B;AAC9B,QAAQ,GAAG"}},
{"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 26, "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":[],"mappings":";AAAA;;;;;;;AAEA,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AACZ,6BAA6B;AAC7B,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AAEZ,8BAA8B;AAC9B,QAAQ,GAAG"}},
{"offset": {"line": 45, "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":[],"mappings":";;;;;;AAAA,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AACZ,6BAA6B;AAC7B,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AAEZ,8BAA8B;AAC9B,QAAQ,GAAG"}},
{"offset": {"line": 62, "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": 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":[],"mappings":";;;;;AAAA,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AACZ,0BAA0B;AAC1B,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AAEZ,8BAA8B;AAC9B,QAAQ,GAAG"}},
{"offset": {"line": 18, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}},
{"offset": {"line": 22, "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":[],"mappings":";AAAA;;;;;;;AAEA,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AACZ,6BAA6B;AAC7B,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AAEZ,8BAA8B;AAC9B,QAAQ,GAAG"}},
{"offset": {"line": 41, "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":[],"mappings":";;;;;;AAAA,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AACZ,6BAA6B;AAC7B,QAAQ,GAAG,CAAC;AACZ,QAAQ,GAAG,CAAC;AAEZ,8BAA8B;AAC9B,QAAQ,GAAG"}},
{"offset": {"line": 58, "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_css_cycle_input_index_2a740bfb.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/input/1.css [test] (css, async loader)");
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/input/2.css [test] (css, async loader)");
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/input/x.css [test] (css, async loader)");
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/input/y.css [test] (css, async loader)");
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/input/i.css [test] (css, async loader)");
}}),
}),
]);
//# sourceMappingURL=turbopack_crates_turbopack-tests_tests_snapshot_css_cycle_input_index_2a740bfb.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_css_cycle2_input_index_d9d7a2bc.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle2/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle2/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle2/input/1.css [test] (css, async loader)");
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle2/input/2.css [test] (css, async loader)");
}}),
}),
]);
//# sourceMappingURL=turbopack_crates_turbopack-tests_tests_snapshot_css_cycle2_input_index_d9d7a2bc.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4e721_crates_turbopack-tests_tests_snapshot_css_split-shared_input_index_fc583b08.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/input/entry.css [test] (css, async loader)");
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/input/b1.css [test] (css, async loader)");
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/input/entry2.css [test] (css, async loader)");
}}),
}),
]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_css_split-shared_input_index_fc583b08.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}]
}
\ No newline at end of file
......@@ -48,13 +48,11 @@ function jsx() {
return 'purposefully empty stub for @emotion/react/index.js';
}
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@emotion/styled/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
"purposefully empty stub";
"@emtion/styled/index.js";
}}),
}),
]);
//# sourceMappingURL=turbopack_crates_turbopack-tests_tests_snapshot_6fdc60d8._.js.map
\ No newline at end of file
......@@ -5,5 +5,5 @@
{"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":[],"mappings":"AAAA,oCAAoC;;AAEpC;AACA;;;;AAEA,MAAM,iCAAe,mNAAM;;;AAI3B,SAAS,gBAAgB,EAAE,QAAQ,EAAE;IACnC,qBACE,uOAAC;QACC,WAAW,GAAG,CAAC;;MAEf,CAAC;kBAEA;;;;;;AAGP;AAEA,QAAQ,GAAG,CAAC,cAAc"}},
{"offset": {"line": 31, "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":[],"mappings":";;;;AAAO,SAAS;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/index.js"],"sourcesContent":["export function jsx() {\n return 'purposefully empty stub for @emotion/react/index.js'\n}\n"],"names":[],"mappings":";;;;AAAO,SAAS;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/turbopack_crates_turbopack-tests_tests_snapshot_env_env_input_a18b44b7._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/env/env/input/.env/.env.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/env/env/input/.env/.env.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const env = process.env = {
...process.env
};
......@@ -10,15 +8,13 @@ env["ALLFOOBAR"] = foobarfoobar;
env["BARFOO"] = barfoo;
env["FOO"] = foo;
env["FOOBAR"] = foobar;
}}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/env/env/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/env/env/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
console.log(process.env.FOOBAR);
console.log(process.env.BARFOO);
console.log(process.env.ALLFOOBAR);
}}),
}),
]);
//# sourceMappingURL=turbopack_crates_turbopack-tests_tests_snapshot_env_env_input_a18b44b7._.js.map
\ No newline at end of file
......@@ -2,6 +2,6 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/env/env/input/.env/.env.js"],"sourcesContent":["const env = process.env = {...process.env};\n\nenv[\"ALLFOOBAR\"] = foobarfoobar;\nenv[\"BARFOO\"] = barfoo;\nenv[\"FOO\"] = foo;\nenv[\"FOOBAR\"] = foobar;\n"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,GAAG;IAAC,GAAG,QAAQ,GAAG;AAAA;AAEzC,GAAG,CAAC,YAAY,GAAG;AACnB,GAAG,CAAC,SAAS,GAAG;AAChB,GAAG,CAAC,MAAM,GAAG;AACb,GAAG,CAAC,SAAS,GAAG"}},
{"offset": {"line": 17, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/env/env/input/index.js"],"sourcesContent":["console.log(process.env.FOOBAR)\nconsole.log(process.env.BARFOO)\nconsole.log(process.env.ALLFOOBAR)\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC,QAAQ,GAAG,CAAC,MAAM;AAC9B,QAAQ,GAAG,CAAC,QAAQ,GAAG,CAAC,MAAM;AAC9B,QAAQ,GAAG,CAAC,QAAQ,GAAG,CAAC,SAAS"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/env/env/input/.env/.env.js"],"sourcesContent":["const env = process.env = {...process.env};\n\nenv[\"ALLFOOBAR\"] = foobarfoobar;\nenv[\"BARFOO\"] = barfoo;\nenv[\"FOO\"] = foo;\nenv[\"FOOBAR\"] = foobar;\n"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,GAAG;IAAC,GAAG,QAAQ,GAAG;AAAA;AAEzC,GAAG,CAAC,YAAY,GAAG;AACnB,GAAG,CAAC,SAAS,GAAG;AAChB,GAAG,CAAC,MAAM,GAAG;AACb,GAAG,CAAC,SAAS,GAAG"}},
{"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/env/env/input/index.js"],"sourcesContent":["console.log(process.env.FOOBAR)\nconsole.log(process.env.BARFOO)\nconsole.log(process.env.ALLFOOBAR)\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC,QAAQ,GAAG,CAAC,MAAM;AAC9B,QAAQ,GAAG,CAAC,QAAQ,GAAG,CAAC,MAAM;AAC9B,QAAQ,GAAG,CAAC,QAAQ,GAAG,CAAC,SAAS"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4c35f_tests_snapshot_evaluated_entrry_runtime_entry_input_index_23249686.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/evaluated_entrry/runtime_entry/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/evaluated_entrry/runtime_entry/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
console.log('hello world');
}}),
}),
]);
//# sourceMappingURL=4c35f_tests_snapshot_evaluated_entrry_runtime_entry_input_index_23249686.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/evaluated_entrry/runtime_entry/input/index.js"],"sourcesContent":["console.log('hello world')\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/evaluated_entrry/runtime_entry/input/index.js"],"sourcesContent":["console.log('hello world')\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4e721_crates_turbopack-tests_tests_snapshot_example_example_input_index_74ebec2a.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/example/example/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/example/example/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
console.log('hello world');
}}),
}),
]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_example_example_input_index_74ebec2a.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/example/example/input/index.js"],"sourcesContent":["console.log('hello world')\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/example/example/input/index.js"],"sourcesContent":["console.log('hello world')\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_export-alls_cjs-2_input_02fc4644._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
// commonjs.js
exports.hello = 'World';
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/c.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -2,8 +2,8 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-2/input/commonjs.js"],"sourcesContent":["// commonjs.js\nexports.hello = 'World'\n"],"names":[],"mappings":"AAAA,cAAc;AACd,QAAQ,KAAK,GAAG"}},
{"offset": {"line": 11, "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": 20, "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": 30, "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":[],"mappings":"AAAA,OAAO;;AACP;;AACA,QAAQ,GAAG,CAAC"}}]
{"offset": {"line": 3, "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":[],"mappings":"AAAA,cAAc;AACd,QAAQ,KAAK,GAAG"}},
{"offset": {"line": 9, "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": 18, "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": 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":[],"mappings":"AAAA,OAAO;;AACP;;AACA,QAAQ,GAAG,CAAC"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4e721_crates_turbopack-tests_tests_snapshot_export-alls_cjs-script_input_97f0a853._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/exported.cjs [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/exported.cjs [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
module.exports = {
foo: 1,
bar: 2
};
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/mod.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -2,7 +2,7 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/exported.cjs"],"sourcesContent":["module.exports = { foo: 1, bar: 2 }\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG;IAAE,KAAK;IAAG,KAAK;AAAE"}},
{"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/mod.js"],"sourcesContent":["export * from './exported.cjs'\n\nconsole.log('Hoist test')\n"],"names":[],"mappings":";AAAA;;;AAEA,QAAQ,GAAG,CAAC"}},
{"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/index.js"],"sourcesContent":["import * as foo from './mod.js'\n\nconsole.log(foo)\n"],"names":[],"mappings":";AAAA;;AAEA,QAAQ,GAAG,CAAC"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/exported.cjs"],"sourcesContent":["module.exports = { foo: 1, bar: 2 }\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG;IAAE,KAAK;IAAG,KAAK;AAAE"}},
{"offset": {"line": 11, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/mod.js"],"sourcesContent":["export * from './exported.cjs'\n\nconsole.log('Hoist test')\n"],"names":[],"mappings":";AAAA;;;AAEA,QAAQ,GAAG,CAAC"}},
{"offset": {"line": 20, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/index.js"],"sourcesContent":["import * as foo from './mod.js'\n\nconsole.log(foo)\n"],"names":[],"mappings":";AAAA;;AAEA,QAAQ,GAAG,CAAC"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_import-meta_cjs_input_8e1e0275._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/mod.cjs [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/mod.cjs [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const __TURBOPACK__import$2e$meta__ = {
get url () {
return `file://${__turbopack_context__.P("turbopack/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/mod.cjs")}`;
}
};
console.log(__TURBOPACK__import$2e$meta__.url);
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -2,6 +2,6 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "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": 15, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/index.js"],"sourcesContent":["import './mod.cjs'\n"],"names":[],"mappings":";AAAA"}}]
{"offset": {"line": 3, "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": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/cjs/input/index.js"],"sourcesContent":["import './mod.cjs'\n"],"names":[],"mappings":";AAAA"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4e721_crates_turbopack-tests_tests_snapshot_imports_dynamic_input_index_23ea6f5e.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/dynamic/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/dynamic/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/dynamic/input/vercel.mjs [test] (ecmascript, async loader)").then(console.log);
}}),
}),
]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_imports_dynamic_input_index_23ea6f5e.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/dynamic/input/index.js"],"sourcesContent":["import('./vercel.mjs').then(console.log)\n"],"names":[],"mappings":"AAAA,wJAAuB,IAAI,CAAC,QAAQ,GAAG"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/dynamic/input/index.js"],"sourcesContent":["import('./vercel.mjs').then(console.log)\n"],"names":[],"mappings":"AAAA,wJAAuB,IAAI,CAAC,QAAQ,GAAG"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4c35f_tests_snapshot_imports_ignore-comments_input_vercel_cjs_1ec8d7d5._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
module.exports = 'turbopack';
}}),
}),
]);
//# sourceMappingURL=4c35f_tests_snapshot_imports_ignore-comments_input_vercel_cjs_1ec8d7d5._.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs"],"sourcesContent":["module.exports = 'turbopack'\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs"],"sourcesContent":["module.exports = 'turbopack'\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4e721_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_input_7f940ff3._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
module.exports = 'turbopack';
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs (static in ecmascript)", ((__turbopack_context__) => {
__turbopack_context__.v("/static/vercel.30936e72.cjs");}),
......
......@@ -2,6 +2,6 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs"],"sourcesContent":["module.exports = 'turbopack'\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG"}},
{"offset": {"line": 23, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/index.js"],"sourcesContent":["import('./vercel.mjs').then(console.log)\nimport(/* webpackIgnore: false */ './vercel.mjs').then(console.log)\nconsole.log(require('./vercel.cjs'))\nnew Worker(\n /* turbopackIgnore: false */ new URL('./vercel.cjs', import.meta.url)\n)\n\n// turbopack shouldn't attempt to bundle these, and they should be preserved in the output\nimport(/* webpackIgnore: true */ './ignore.mjs')\nimport(/* turbopackIgnore: true */ './ignore.mjs')\n\n// this should work for cjs requires too\nrequire(/* webpackIgnore: true */ './ignore.cjs')\nrequire(/* turbopackIgnore: true */ './ignore.cjs')\n\nnew Worker(\n /* turbopackIgnore: true */ new URL('./ignore-worker.cjs', import.meta.url)\n)\nnew Worker(\n /* webpackIgnore: true */ new URL('./ignore-worker.cjs', import.meta.url)\n)\n\nexport function foo(plugin) {\n return require(/* turbopackIgnore: true */ plugin)\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA,gKAAuB,IAAI,CAAC,QAAQ,GAAG;AACvC,gKAAkD,IAAI,CAAC,QAAQ,GAAG;AAClE,QAAQ,GAAG;AACX,IAAI;AAIJ,0FAA0F;AAC1F,MAAM,CAAC,uBAAuB,GAAG;AACjC,MAAM,CAAC,yBAAyB,GAAG;AAEnC,wCAAwC;AACxC,QAAQ,uBAAuB,GAAG;AAClC,QAAQ,yBAAyB,GAAG;AAEpC,IAAI;AAGJ,IAAI;AAIG,SAAS,IAAI,MAAM;IACxB,OAAO,QAAQ,yBAAyB,GAAG;AAC7C"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs"],"sourcesContent":["module.exports = 'turbopack'\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG"}},
{"offset": {"line": 21, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/index.js"],"sourcesContent":["import('./vercel.mjs').then(console.log)\nimport(/* webpackIgnore: false */ './vercel.mjs').then(console.log)\nconsole.log(require('./vercel.cjs'))\nnew Worker(\n /* turbopackIgnore: false */ new URL('./vercel.cjs', import.meta.url)\n)\n\n// turbopack shouldn't attempt to bundle these, and they should be preserved in the output\nimport(/* webpackIgnore: true */ './ignore.mjs')\nimport(/* turbopackIgnore: true */ './ignore.mjs')\n\n// this should work for cjs requires too\nrequire(/* webpackIgnore: true */ './ignore.cjs')\nrequire(/* turbopackIgnore: true */ './ignore.cjs')\n\nnew Worker(\n /* turbopackIgnore: true */ new URL('./ignore-worker.cjs', import.meta.url)\n)\nnew Worker(\n /* webpackIgnore: true */ new URL('./ignore-worker.cjs', import.meta.url)\n)\n\nexport function foo(plugin) {\n return require(/* turbopackIgnore: true */ plugin)\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA,gKAAuB,IAAI,CAAC,QAAQ,GAAG;AACvC,gKAAkD,IAAI,CAAC,QAAQ,GAAG;AAClE,QAAQ,GAAG;AACX,IAAI;AAIJ,0FAA0F;AAC1F,MAAM,CAAC,uBAAuB,GAAG;AACjC,MAAM,CAAC,yBAAyB,GAAG;AAEnC,wCAAwC;AACxC,QAAQ,uBAAuB,GAAG;AAClC,QAAQ,yBAAyB,GAAG;AAEpC,IAAI;AAGJ,IAAI;AAIG,SAAS,IAAI,MAAM;IACxB,OAAO,QAAQ,yBAAyB,GAAG;AAC7C"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/b1abf_turbopack-tests_tests_snapshot_imports_resolve_error_cjs_input_index_bdab1dc6.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/resolve_error_cjs/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/resolve_error_cjs/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const dne = (()=>{
const e = new Error("Cannot find module 'does-not-exist/path'");
e.code = 'MODULE_NOT_FOUND';
throw e;
})();
console.log(dne);
}}),
}),
]);
//# sourceMappingURL=b1abf_turbopack-tests_tests_snapshot_imports_resolve_error_cjs_input_index_bdab1dc6.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/resolve_error_cjs/input/index.js"],"sourcesContent":["const dne = require('does-not-exist/path')\n\nconsole.log(dne)\n"],"names":[],"mappings":"AAAA,MAAM;;;;;AAEN,QAAQ,GAAG,CAAC"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/resolve_error_cjs/input/index.js"],"sourcesContent":["const dne = require('does-not-exist/path')\n\nconsole.log(dne)\n"],"names":[],"mappings":"AAAA,MAAM;;;;;AAEN,QAAQ,GAAG,CAAC"}}]
}
\ No newline at end of file
......@@ -35,12 +35,10 @@ __turbopack_context__.s([
]);
const __TURBOPACK__default__export__ = 'import';
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/require.cjs [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/require.cjs [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
module.exports = 'require';
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -6,6 +6,6 @@
{"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/dep/index.js"],"sourcesContent":["export default 'dep'\n"],"names":[],"mappings":";;;;uCAAe"}},
{"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/pat.js"],"sourcesContent":["export default 'pat'\n"],"names":[],"mappings":";;;;uCAAe"}},
{"offset": {"line": 31, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/import.mjs"],"sourcesContent":["export default 'import'\n"],"names":[],"mappings":";;;;uCAAe"}},
{"offset": {"line": 41, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/require.cjs"],"sourcesContent":["module.exports = 'require'\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG"}},
{"offset": {"line": 46, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/index.js"],"sourcesContent":["import foo from '#foo'\nimport dep from '#dep'\nimport pattern from '#pattern/pat.js'\nimport conditionalImport from '#conditional'\nconst conditionalRequire = require('#conditional')\n\nconsole.log(foo, dep, pattern, conditionalImport, conditionalRequire)\n"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;;;;;AACA,MAAM;AAEN,QAAQ,GAAG,CAAC,oNAAG,EAAE,6NAAG,EAAE,oNAAO,EAAE,wNAAiB,EAAE"}}]
{"offset": {"line": 39, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/require.cjs"],"sourcesContent":["module.exports = 'require'\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG"}},
{"offset": {"line": 44, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/subpath-imports/input/index.js"],"sourcesContent":["import foo from '#foo'\nimport dep from '#dep'\nimport pattern from '#pattern/pat.js'\nimport conditionalImport from '#conditional'\nconst conditionalRequire = require('#conditional')\n\nconsole.log(foo, dep, pattern, conditionalImport, conditionalRequire)\n"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;;;;;AACA,MAAM;AAEN,QAAQ,GAAG,CAAC,oNAAG,EAAE,6NAAG,EAAE,oNAAO,EAAE,wNAAiB,EAAE"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["output/b1abf_turbopack-tests_tests_snapshot_minification_paren-remover_input_index_032d7ee7.js","[project]/turbopack/crates/turbopack-tests/tests/snapshot/minification/paren-remover/input/index.js [test] (ecmascript)",t=>{var{m:e,e:a}=t;!function(t,e,a,s){var i,n,o,p,r="1.2345".split(".");o=Math.pow(10,i=2===r.length?Math.min(Math.max(r[1].length,1),2):1),p=(a("1.2345e+"+i)/o).toFixed(i),1>e-i&&(n=RegExp("\\.?0{1,"+(s-(e-i))+"}$"),p=p.replace(n,""))}(1.2345,2,Math.round,1)}]);
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["output/b1abf_turbopack-tests_tests_snapshot_minification_paren-remover_input_index_032d7ee7.js","[project]/turbopack/crates/turbopack-tests/tests/snapshot/minification/paren-remover/input/index.js [test] (ecmascript)",(t,e,a)=>{!function(t,e,a,s){var i,n,o,p,r="1.2345".split(".");o=Math.pow(10,i=2===r.length?Math.min(Math.max(r[1].length,1),2):1),p=(a("1.2345e+"+i)/o).toFixed(i),1>e-i&&(n=RegExp("\\.?0{1,"+(s-(e-i))+"}$"),p=p.replace(n,""))}(1.2345,2,Math.round,1)}]);
//# sourceMappingURL=b1abf_turbopack-tests_tests_snapshot_minification_paren-remover_input_index_032d7ee7.js.map
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/minification/paren-remover/input/index.js"],"sourcesContent":["function toFixed(value, maxDecimals, roundingFunction, optionals) {\n var splitValue = value.toString().split('.'),\n minDecimals = maxDecimals - (optionals || 0),\n optionalsRegExp,\n power,\n output\n var boundedPrecisions\n // var unused = 'xxxx';\n\n // Use the smallest precision value possible to avoid errors from floating point representation\n if (splitValue.length === 2) {\n boundedPrecisions = Math.min(\n Math.max(splitValue[1].length, minDecimals),\n maxDecimals\n )\n } else {\n boundedPrecisions = minDecimals\n }\n\n power = Math.pow(10, boundedPrecisions)\n\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value + 'e+' + boundedPrecisions) / power).toFixed(\n boundedPrecisions\n )\n\n if (optionals > maxDecimals - boundedPrecisions) {\n optionalsRegExp = new RegExp(\n '\\\\.?0{1,' + (optionals - (maxDecimals - boundedPrecisions)) + '}$'\n )\n output = output.replace(optionalsRegExp, '')\n }\n\n return output\n}\ntoFixed(1.2345, 2, Math.round, 1)\n"],"names":[],"mappings":"uSAAA,AAmCA,SAnCS,AAAQ,CAAK,CAAE,CAAW,CAAE,CAAgB,CAAE,CAAS,EAC9D,IAKI,EAHF,EACA,EACA,EAJE,EAAa,MAAM,GAAW,KAAH,AAAQ,CAAC,KAkBxC,CAjBE,CAiBM,KAAK,GAAG,CAAC,GARf,CAQmB,CATK,GAAG,CAAzB,EAAW,MAAM,CACC,KAAK,GAAG,CAC1B,KAAK,GAAG,CAAC,CAAU,CAAC,EAAE,CAAC,MAAM,EAAE,KAVnB,GAoBhB,EAAS,CAAC,EAAiB,CATvB,KAX0B,CAAC,CAoBI,GAAO,GAAqB,CAAA,CAAK,CAAE,GApB1B,CAAC,GAoBgC,CAC3E,KAGc,EAAc,IAC5B,EAAkB,AAAI,OACpB,MAF6C,MAE/B,CAAD,EAAc,EAAc,CAAA,CAAiB,CAAC,CAAI,GAArC,GAE5B,EAAS,EAAO,OAAO,CAAC,EAAiB,IAI7C,EACQ,OAAQ,EAAG,KAAK,KAAK,CAAE"}
\ No newline at end of file
{"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/minification/paren-remover/input/index.js"],"sourcesContent":["function toFixed(value, maxDecimals, roundingFunction, optionals) {\n var splitValue = value.toString().split('.'),\n minDecimals = maxDecimals - (optionals || 0),\n optionalsRegExp,\n power,\n output\n var boundedPrecisions\n // var unused = 'xxxx';\n\n // Use the smallest precision value possible to avoid errors from floating point representation\n if (splitValue.length === 2) {\n boundedPrecisions = Math.min(\n Math.max(splitValue[1].length, minDecimals),\n maxDecimals\n )\n } else {\n boundedPrecisions = minDecimals\n }\n\n power = Math.pow(10, boundedPrecisions)\n\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value + 'e+' + boundedPrecisions) / power).toFixed(\n boundedPrecisions\n )\n\n if (optionals > maxDecimals - boundedPrecisions) {\n optionalsRegExp = new RegExp(\n '\\\\.?0{1,' + (optionals - (maxDecimals - boundedPrecisions)) + '}$'\n )\n output = output.replace(optionalsRegExp, '')\n }\n\n return output\n}\ntoFixed(1.2345, 2, Math.round, 1)\n"],"names":[],"mappings":"8RAAA,AAmCA,SAnCS,AAAQ,CAAK,CAAE,CAAW,CAAE,CAAgB,CAAE,CAAS,EAC9D,IAKI,EAHF,EACA,EACA,EAJE,EAAa,MAAM,GAAW,KAAH,AAAQ,CAAC,KAkBxC,CAjBE,CAiBM,KAAK,GAAG,CAAC,GARf,CAQmB,CATK,GAAG,CAAzB,EAAW,MAAM,CACC,KAAK,GAAG,CAC1B,KAAK,GAAG,CAAC,CAAU,CAAC,EAAE,CAAC,MAAM,EAAE,KAVnB,GAoBhB,EAAS,CAAC,EAAiB,CATvB,KAX0B,CAAC,CAoBI,GAAO,GAAqB,CAAA,CAAK,CAAE,GApB1B,CAAC,GAoBgC,CAC3E,KAGc,EAAc,IAC5B,EAAkB,AAAI,OACpB,MAF6C,MAE/B,CAAD,EAAc,EAAc,CAAA,CAAiB,CAAC,CAAI,GAArC,GAE5B,EAAS,EAAO,OAAO,CAAC,EAAiB,IAI7C,EACQ,OAAQ,EAAG,KAAK,KAAK,CAAE"}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/[root-of-the-server]__e251cfe1._.js",
"[externals]/bun:ffi [external] (bun:ffi, cjs)", ((__turbopack_context__) => {
"[externals]/bun:ffi [external] (bun:ffi, cjs)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const mod = __turbopack_context__.x("bun:ffi", () => require("bun:ffi"));
module.exports = mod;
}}),
"[externals]/bun:jsc [external] (bun:jsc, cjs)", ((__turbopack_context__) => {
}),
"[externals]/bun:jsc [external] (bun:jsc, cjs)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const mod = __turbopack_context__.x("bun:jsc", () => require("bun:jsc"));
module.exports = mod;
}}),
"[externals]/bun:sqlite [external] (bun:sqlite, cjs)", ((__turbopack_context__) => {
}),
"[externals]/bun:sqlite [external] (bun:sqlite, cjs)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const mod = __turbopack_context__.x("bun:sqlite", () => require("bun:sqlite"));
module.exports = mod;
}}),
"[externals]/bun:test [external] (bun:test, cjs)", ((__turbopack_context__) => {
}),
"[externals]/bun:test [external] (bun:test, cjs)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const mod = __turbopack_context__.x("bun:test", () => require("bun:test"));
module.exports = mod;
}}),
"[externals]/bun:wrap [external] (bun:wrap, cjs)", ((__turbopack_context__) => {
}),
"[externals]/bun:wrap [external] (bun:wrap, cjs)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const mod = __turbopack_context__.x("bun:wrap", () => require("bun:wrap"));
module.exports = mod;
}}),
"[externals]/bun [external] (bun, cjs)", ((__turbopack_context__) => {
}),
"[externals]/bun [external] (bun, cjs)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
const mod = __turbopack_context__.x("bun", () => require("bun"));
module.exports = mod;
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node/bun_protocol_external/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 52, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node/bun_protocol_external/input/index.js"],"sourcesContent":["// Test that Bun builtins are treated as external\nimport bunFfi from 'bun:ffi'\nimport bunJsc from 'bun:jsc'\nimport bunSqlite from 'bun:sqlite'\nimport bunTest from 'bun:test'\nimport bunWrap from 'bun:wrap'\nimport bun from 'bun'\n\nconsole.log('bun:ffi:', bunFfi)\nconsole.log('bun:jsc:', bunJsc)\nconsole.log('bun:sqlite:', bunSqlite)\nconsole.log('bun:test:', bunTest)\nconsole.log('bun:wrap:', bunWrap)\nconsole.log('bun:', bun)\n"],"names":[],"mappings":"AAAA,iDAAiD;;AACjD;AACA;AACA;AACA;AACA;AACA;;;;;;;AAEA,QAAQ,GAAG,CAAC,YAAY,wHAAM;AAC9B,QAAQ,GAAG,CAAC,YAAY,wHAAM;AAC9B,QAAQ,GAAG,CAAC,eAAe,8HAAS;AACpC,QAAQ,GAAG,CAAC,aAAa,0HAAO;AAChC,QAAQ,GAAG,CAAC,aAAa,0HAAO;AAChC,QAAQ,GAAG,CAAC,QAAQ,0GAAG"}}]
{"offset": {"line": 40, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node/bun_protocol_external/input/index.js"],"sourcesContent":["// Test that Bun builtins are treated as external\nimport bunFfi from 'bun:ffi'\nimport bunJsc from 'bun:jsc'\nimport bunSqlite from 'bun:sqlite'\nimport bunTest from 'bun:test'\nimport bunWrap from 'bun:wrap'\nimport bun from 'bun'\n\nconsole.log('bun:ffi:', bunFfi)\nconsole.log('bun:jsc:', bunJsc)\nconsole.log('bun:sqlite:', bunSqlite)\nconsole.log('bun:test:', bunTest)\nconsole.log('bun:wrap:', bunWrap)\nconsole.log('bun:', bun)\n"],"names":[],"mappings":"AAAA,iDAAiD;;AACjD;AACA;AACA;AACA;AACA;AACA;;;;;;;AAEA,QAAQ,GAAG,CAAC,YAAY,wHAAM;AAC9B,QAAQ,GAAG,CAAC,YAAY,wHAAM;AAC9B,QAAQ,GAAG,CAAC,eAAe,8HAAS;AACpC,QAAQ,GAAG,CAAC,aAAa,0HAAO;AAChC,QAAQ,GAAG,CAAC,aAAa,0HAAO;AAChC,QAAQ,GAAG,CAAC,QAAQ,0GAAG"}}]
}
\ No newline at end of file
module.exports = [
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
console.log('Hello, world!');
}}),
}),
];
//# sourceMappingURL=4c35f_tests_snapshot_runtime_default_build_runtime_input_index_ba3c9491.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/input/index.js"],"sourcesContent":["console.log('Hello, world!')\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/input/index.js"],"sourcesContent":["console.log('Hello, world!')\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC"}}]
}
\ No newline at end of file
......@@ -10,9 +10,16 @@ const ASSET_PREFIX = "/";
const REEXPORTED_OBJECTS = Symbol('reexported objects');
/**
* Constructs the `__turbopack_context__` object for a module.
*/ function Context(module) {
*/ function Context(module, exports) {
this.m = module;
this.e = module.exports;
// We need to store this here instead of accessing it from the module object to:
// 1. Make it available to factories directly, since we rewrite `this` to
// `__turbopack_context__.e` in CJS modules.
// 2. Support async modules which rewrite `module.exports` to a promise, so we
// can still access the original exports object from functions like
// `esmExport`
// Ideally we could find a new approach for async modules and drop this property altogether.
this.e = exports;
}
const contextPrototype = Context.prototype;
const hasOwnProperty = Object.prototype.hasOwnProperty;
......@@ -90,7 +97,7 @@ contextPrototype.s = esmExport;
function ensureDynamicExports(module, exports) {
let reexportedObjects = module[REEXPORTED_OBJECTS];
if (!reexportedObjects) {
reexportedObjects = module[REEXPORTED_OBJECTS] = [];
module[REEXPORTED_OBJECTS] = reexportedObjects = [];
module.exports = module.namespaceObject = new Proxy(exports, {
get (target, prop) {
if (hasOwnProperty.call(target, prop) || prop === 'default' || prop === '__esModule') {
......@@ -113,34 +120,42 @@ function ensureDynamicExports(module, exports) {
}
});
}
return reexportedObjects;
}
/**
* Dynamically exports properties from an object
*/ function dynamicExport(object, id) {
let module = this.m;
let exports = this.e;
let module;
let exports;
if (id != null) {
module = getOverwrittenModule(this.c, id);
exports = module.exports;
} else {
module = this.m;
exports = this.e;
}
ensureDynamicExports(module, exports);
const reexportedObjects = ensureDynamicExports(module, exports);
if (typeof object === 'object' && object !== null) {
module[REEXPORTED_OBJECTS].push(object);
reexportedObjects.push(object);
}
}
contextPrototype.j = dynamicExport;
function exportValue(value, id) {
let module = this.m;
let module;
if (id != null) {
module = getOverwrittenModule(this.c, id);
} else {
module = this.m;
}
module.exports = value;
}
contextPrototype.v = exportValue;
function exportNamespace(namespace, id) {
let module = this.m;
let module;
if (id != null) {
module = getOverwrittenModule(this.c, id);
} else {
module = this.m;
}
module.exports = module.namespaceObject = namespace;
}
......@@ -678,11 +693,12 @@ function instantiateModule(id, sourceType, sourceData) {
throw new Error(`Module ${id} was instantiated ${instantiationReason}, but the module factory is not available.`);
}
const module1 = createModuleObject(id);
const exports = module1.exports;
moduleCache[id] = module1;
const context = new Context(module1, exports);
// NOTE(alexkirsz) This can fail when the module encounters a runtime error.
try {
const context = new Context(module1);
moduleFactory(context);
moduleFactory(context, module1, exports);
} catch (error) {
module1.error = error;
throw error;
......
......@@ -20,9 +20,16 @@ const RUNTIME_PUBLIC_PATH = "";
const REEXPORTED_OBJECTS = Symbol('reexported objects');
/**
* Constructs the `__turbopack_context__` object for a module.
*/ function Context(module) {
*/ function Context(module, exports) {
this.m = module;
this.e = module.exports;
// We need to store this here instead of accessing it from the module object to:
// 1. Make it available to factories directly, since we rewrite `this` to
// `__turbopack_context__.e` in CJS modules.
// 2. Support async modules which rewrite `module.exports` to a promise, so we
// can still access the original exports object from functions like
// `esmExport`
// Ideally we could find a new approach for async modules and drop this property altogether.
this.e = exports;
}
const contextPrototype = Context.prototype;
const hasOwnProperty = Object.prototype.hasOwnProperty;
......@@ -100,7 +107,7 @@ contextPrototype.s = esmExport;
function ensureDynamicExports(module, exports) {
let reexportedObjects = module[REEXPORTED_OBJECTS];
if (!reexportedObjects) {
reexportedObjects = module[REEXPORTED_OBJECTS] = [];
module[REEXPORTED_OBJECTS] = reexportedObjects = [];
module.exports = module.namespaceObject = new Proxy(exports, {
get (target, prop) {
if (hasOwnProperty.call(target, prop) || prop === 'default' || prop === '__esModule') {
......@@ -123,34 +130,42 @@ function ensureDynamicExports(module, exports) {
}
});
}
return reexportedObjects;
}
/**
* Dynamically exports properties from an object
*/ function dynamicExport(object, id) {
let module = this.m;
let exports = this.e;
let module;
let exports;
if (id != null) {
module = getOverwrittenModule(this.c, id);
exports = module.exports;
} else {
module = this.m;
exports = this.e;
}
ensureDynamicExports(module, exports);
const reexportedObjects = ensureDynamicExports(module, exports);
if (typeof object === 'object' && object !== null) {
module[REEXPORTED_OBJECTS].push(object);
reexportedObjects.push(object);
}
}
contextPrototype.j = dynamicExport;
function exportValue(value, id) {
let module = this.m;
let module;
if (id != null) {
module = getOverwrittenModule(this.c, id);
} else {
module = this.m;
}
module.exports = value;
}
contextPrototype.v = exportValue;
function exportNamespace(namespace, id) {
let module = this.m;
let module;
if (id != null) {
module = getOverwrittenModule(this.c, id);
} else {
module = this.m;
}
module.exports = module.namespaceObject = namespace;
}
......@@ -776,8 +791,8 @@ const getOrInstantiateModuleFromParent = (id, sourceModule)=>{
}
return instantiateModule(id, SourceType.Parent, sourceModule.id);
};
function DevContext(module, refresh) {
Context.call(this, module);
function DevContext(module, exports, refresh) {
Context.call(this, module, exports);
this.k = refresh;
}
DevContext.prototype = Context.prototype;
......@@ -813,6 +828,7 @@ function instantiateModule(moduleId, sourceType, sourceData) {
invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`);
}
const module = createModuleObject(id);
const exports = module.exports;
module.parents = parents;
module.children = [];
module.hot = hot;
......@@ -821,8 +837,8 @@ function instantiateModule(moduleId, sourceType, sourceData) {
// NOTE(alexkirsz) This can fail when the module encounters a runtime error.
try {
runModuleExecutionHooks(module, (refresh)=>{
const context = new DevContext(module, refresh);
moduleFactory(context);
const context = new DevContext(module, exports, refresh);
moduleFactory(context, module, exports);
});
} catch (error) {
module.error = error;
......
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/b1abf_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_9cac9e61.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
console.log('Hello, world!');
}}),
}),
]);
//# sourceMappingURL=b1abf_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_9cac9e61.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/input/index.js"],"sourcesContent":["console.log('Hello, world!')\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/input/index.js"],"sourcesContent":["console.log('Hello, world!')\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/b1abf_turbopack-tests_tests_snapshot_scope-hoisting_duplicate-imports_input_739fb2d3._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/shared.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/shared.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
module.exports = 'shared';
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -2,6 +2,6 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/shared.js"],"sourcesContent":["module.exports = 'shared'\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG"}},
{"offset": {"line": 10, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/a.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/b.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/c.js"],"sourcesContent":["import shared from './shared.js'\n\nconsole.log('a', shared)\n","import './a.js'\nimport shared from './shared.js'\n\nconsole.log('a', shared)\n","import './b.js'\nimport shared from './shared.js'\n\nconsole.log('c', shared)\n"],"names":[],"mappings":";;;;;;;;;AAAA;;AAEA,QAAQ,GAAG,CAAC,KAAK,mOAAM;;;;ACCvB,QAAQ,GAAG,CAAC,KAAK,oOAAM;;;;ACAvB,QAAQ,GAAG,CAAC,KAAK,oOAAM"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/shared.js"],"sourcesContent":["module.exports = 'shared'\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG"}},
{"offset": {"line": 8, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/a.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/b.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/duplicate-imports/input/c.js"],"sourcesContent":["import shared from './shared.js'\n\nconsole.log('a', shared)\n","import './a.js'\nimport shared from './shared.js'\n\nconsole.log('a', shared)\n","import './b.js'\nimport shared from './shared.js'\n\nconsole.log('c', shared)\n"],"names":[],"mappings":";;;;;;;;;AAAA;;AAEA,QAAQ,GAAG,CAAC,KAAK,mOAAM;;;;ACCvB,QAAQ,GAAG,CAAC,KAAK,oOAAM;;;;ACAvB,QAAQ,GAAG,CAAC,KAAK,oOAAM"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/b1abf_turbopack-tests_tests_snapshot_scope-hoisting_split-shared_input_d89f123b._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/x/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/x/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
setTimeout(()=>__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/x/inner.js [test] (ecmascript, async loader)"), 500);
}}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/y/index.js [test] (ecmascript)", ((__turbopack_context__) => {
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/y/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
setTimeout(()=>__turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/y/middle.js [test] (ecmascript, async loader)"), 1000);
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -2,7 +2,7 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/x/index.js"],"sourcesContent":["setTimeout(() => import('./inner'), 500)\n"],"names":[],"mappings":"AAAA,WAAW,yKAAyB"}},
{"offset": {"line": 11, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/y/index.js"],"sourcesContent":["setTimeout(() => import('./middle'), 1000)\n"],"names":[],"mappings":"AAAA,WAAW,0KAA0B"}},
{"offset": {"line": 16, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/index.js"],"sourcesContent":["import './x/index'\nimport './y/index'\n"],"names":[],"mappings":";AAAA;AACA"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/x/index.js"],"sourcesContent":["setTimeout(() => import('./inner'), 500)\n"],"names":[],"mappings":"AAAA,WAAW,yKAAyB"}},
{"offset": {"line": 7, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/y/index.js"],"sourcesContent":["setTimeout(() => import('./middle'), 1000)\n"],"names":[],"mappings":"AAAA,WAAW,0KAA0B"}},
{"offset": {"line": 12, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/scope-hoisting/split-shared/input/index.js"],"sourcesContent":["import './x/index'\nimport './y/index'\n"],"names":[],"mappings":";AAAA;AACA"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4e721_crates_turbopack-tests_tests_snapshot_source_maps_invalid_input_index_fc734e27.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/invalid/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/invalid/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
console.log('test'); //# sourceMappingURL=index.js.map
}}),
}),
]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_source_maps_invalid_input_index_fc734e27.js.map
\ No newline at end of file
......@@ -2,5 +2,5 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/invalid/input/index.js"],"sourcesContent":["console.log('test')\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC,SACZ,iCAAiC"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/invalid/input/index.js"],"sourcesContent":["console.log('test')\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":"AAAA,QAAQ,GAAG,CAAC,SACZ,iCAAiC"}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/4e721_crates_turbopack-tests_tests_snapshot_source_maps_merged-unicode_input_795dc95a._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/jsx-runtime.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/jsx-runtime.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
module.exports = {};
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......@@ -53,10 +51,8 @@ __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__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
// "entry-base.js [app-rsc] (ecmascript) <module evaluation>" with
// ["reflect-utils.js [app-rsc] (ecmascript)",
// "params.js [app-rsc] (ecmascript)",
......@@ -75,7 +71,7 @@ if (Date.now() > 0) {
if (Date.now() > 0) {
__turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/index2.js [test] (ecmascript)");
}
}}),
}),
]);
//# sourceMappingURL=4e721_crates_turbopack-tests_tests_snapshot_source_maps_merged-unicode_input_795dc95a._.js.map
\ No newline at end of file
......@@ -2,9 +2,9 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/jsx-runtime.js"],"sourcesContent":["module.exports = {};\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG,CAAC"}},
{"offset": {"line": 10, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/reflect-utils.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/collect-segment-data.js"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /s/;\nexport function describeStringPropertyAccess(target, prop) {}\nexport function describeHasCheckingStringProperty(target, prop) {}\nexport const wellKnownProperties = new Set([])\n","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 { unstable_prerender as 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":";;;;;;;AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAM,+BAA+B;AAC9B,SAAS,6BAA6B,MAAM,EAAE,IAAI,GAAG;AACrD,SAAS,kCAAkC,MAAM,EAAE,IAAI,GAAG;AAC1D,MAAM,sBAAsB,IAAI,IAAI,EAAE;;;;ACR7C;;AACA,6DAA6D;AAC7D,MAAM,2BAA2B,KAAK,kFAAkF;AACxH,6DAA6D;AAC7D,MAAM,YAAY,KAAK,0FAA0F;AACjH,MAAM,mBAAiB,GAAE,iBAAe,GAAG,8FAA8F;AACzI,MAAM,gCAA8B,GAAG,sEAAsE;CAC7G,sCAAsC"}},
{"offset": {"line": 44, "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": 51, "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": 59, "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":[],"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,IAAI,KAAK,GAAG,KAAK,GAAG;;AAEpB;AACA,IAAI,KAAK,GAAG,KAAK,GAAG;;AAEpB"}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/jsx-runtime.js"],"sourcesContent":["module.exports = {};\n"],"names":[],"mappings":"AAAA,OAAO,OAAO,GAAG,CAAC"}},
{"offset": {"line": 8, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/reflect-utils.js","turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/collect-segment-data.js"],"sourcesContent":["// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /s/;\nexport function describeStringPropertyAccess(target, prop) {}\nexport function describeHasCheckingStringProperty(target, prop) {}\nexport const wellKnownProperties = new Set([])\n","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 { unstable_prerender as 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":";;;;;;;AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,2DAA2D;AAC3D,MAAM,+BAA+B;AAC9B,SAAS,6BAA6B,MAAM,EAAE,IAAI,GAAG;AACrD,SAAS,kCAAkC,MAAM,EAAE,IAAI,GAAG;AAC1D,MAAM,sBAAsB,IAAI,IAAI,EAAE;;;;ACR7C;;AACA,6DAA6D;AAC7D,MAAM,2BAA2B,KAAK,kFAAkF;AACxH,6DAA6D;AAC7D,MAAM,YAAY,KAAK,0FAA0F;AACjH,MAAM,mBAAiB,GAAE,iBAAe,GAAG,8FAA8F;AACzI,MAAM,gCAA8B,GAAG,sEAAsE;CAC7G,sCAAsC"}},
{"offset": {"line": 42, "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": 49, "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": 55, "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":[],"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,IAAI,KAAK,GAAG,KAAK,GAAG;;AAEpB;AACA,IAAI,KAAK,GAAG,KAAK,GAAG;;AAEpB"}}]
}
\ No newline at end of file
......@@ -13,13 +13,11 @@ const MyButton = __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$cr
`;
console.log(MyButton);
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/styled-components/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/styled-components/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
"purposefully empty stub";
"styled-components/index.js";
}}),
}),
]);
//# sourceMappingURL=turbopack_crates_turbopack-tests_tests_snapshot_398e2526._.js.map
\ No newline at end of file
......@@ -3,5 +3,5 @@
"sources": [],
"sections": [
{"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/styled_components/styled_components/input/index.js"],"sourcesContent":["import styled from 'styled-components'\n\nconst MyButton = styled.button`\n background: blue;\n`\n\nconsole.log(MyButton)\n"],"names":[],"mappings":";AAAA;;AAEA,MAAM,WAAW,oNAAM,CAAC,MAAM;;;EAAA,CAAC;;AAE/B,CAAC;AAED,QAAQ,GAAG,CAAC"}},
{"offset": {"line": 19, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/styled-components/index.js"],"sourcesContent":["\"purposefully empty stub\";\n\"styled-components/index.js\"\n"],"names":[],"mappings":"AAAA;AACA","ignoreList":[0]}}]
{"offset": {"line": 17, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/styled-components/index.js"],"sourcesContent":["\"purposefully empty stub\";\n\"styled-components/index.js\"\n"],"names":[],"mappings":"AAAA;AACA","ignoreList":[0]}}]
}
\ No newline at end of file
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_bff03a32._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var { m: module, e: exports } = __turbopack_context__;
{
var _class_call_check = __turbopack_context__.r("[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@swc/helpers/_/_class_call_check.js [test] (ecmascript)");
var Foo = function Foo() {
"use strict";
_class_call_check._(this, Foo);
};
console.log(Foo, [].includes('foo'));
}}),
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@swc/helpers/_/_class_call_check.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
......
......@@ -2,6 +2,6 @@
"version": 3,
"sources": [],
"sections": [
{"offset": {"line": 5, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/input/index.js"],"sourcesContent":["class Foo {}\n\nconsole.log(Foo, [].includes('foo'))\n"],"names":[],"mappings":";AAAA,IAAA,AAAM,MAAN,SAAM;;8BAAA;;AAEN,QAAQ,GAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC"}},
{"offset": {"line": 15, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@swc/helpers/_/_class_call_check.js"],"sourcesContent":["export function _() {\n return 'purposefully empty stub for @swc/helpers/_/_class_call_check.js'\n}\n"],"names":[],"mappings":";;;;AAAO,SAAS;IACd,OAAO;AACT","ignoreList":[0]}}]
{"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/input/index.js"],"sourcesContent":["class Foo {}\n\nconsole.log(Foo, [].includes('foo'))\n"],"names":[],"mappings":";AAAA,IAAA,AAAM,MAAN,SAAM;;8BAAA;;AAEN,QAAQ,GAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC"}},
{"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/@swc/helpers/_/_class_call_check.js"],"sourcesContent":["export function _() {\n return 'purposefully empty stub for @swc/helpers/_/_class_call_check.js'\n}\n"],"names":[],"mappings":";;;;AAAO,SAAS;IACd,OAAO;AACT","ignoreList":[0]}}]
}
\ 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