prefix stringlengths 512 512 | suffix stringlengths 256 256 | middle stringlengths 14 229 | meta dict |
|---|---|---|---|
Callbacks = [];
function getSocketProtocol(assetPrefix) {
let protocol = location.protocol;
try {
protocol = new URL(assetPrefix).protocol;
} catch (_) {}
return protocol === "http:" ? "ws" : "wss";
}
export function addMessageListener(cb) {
messageCallbacks.push(cb);
}
export function sendM... | messageCallbacks.forEach((cb)=>{
cb(connected);
});
if (options.log) console.log("[HMR] connected");
}
function handleMessage(event) {
const message = {
type: "tur | function init() {
if (source) source.close();
console.log("[HMR] connecting...");
function handleOnline() {
const connected = {
type: "turbopack-connected"
};
| {
"filepath": "turbopack/crates/turbopack-ecmascript/tests/tree-shaker/analyzer/failed-1/input.js",
"language": "javascript",
"file_size": 1922,
"cut_index": 537,
"middle_length": 229
} |
] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_1lkohl-._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/import.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__impo... | 2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$async_chunk$2f$input$2f$node_modules$2f$bar$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async | pt$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/node_modules/foo/index.js [test] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/output/turbopack_crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_1lkohl-._.js",
"language": "javascript",
"file_size": 2334,
"cut_index": 563,
"middle_length": 229
} |
] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_1tjv7of._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/shared.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
// shared package
}),
"[project]/turbopack/crat... | /turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/input/node_modules/bar/index.js [test] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$async_c | dule__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$async_chunk$2f$input$2f$node_modules$2f$bar$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project] | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic/async_chunk/output/turbopack_crates_turbopack-tests_tests_snapshot_basic_async_chunk_input_1tjv7of._.js",
"language": "javascript",
"file_size": 2089,
"cut_index": 563,
"middle_length": 229
} |
*/ './missing.mjs').then(
(m) => console.log(m),
(e) => console.log('missing.mjs not found')
)
// require with turbopackOptional should also work
try {
const missing = require(/* turbopackOptional: true */ './missing.cjs')
console.log(missing)
} catch (e) {
console.log('missing.cjs not found')
}
// webpack... | ng-should-error-optional-false.mjs'
)
// Default behavior without any optional comment should produce errors
import('./missing-should-error-default.mjs')
// Test with existing module - should work normally
import('./existing.mjs').then((m) => console.log | rs
import(
/* turbopackOptional: false */ './missi | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/imports/optional-comments/input/index.js",
"language": "javascript",
"file_size": 945,
"cut_index": 606,
"middle_length": 52
} |
|| (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_imports_order_input_1wfk3l4._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/order/input/posts.ts [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"de... | $2f$order$2f$input$2f$posts$2e$ts__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/order/input/posts.ts [test] (ecmascript)");
;
console.log(__TURBOPACK__imported__module__$5b$ | ndex.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$imports | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/imports/order/output/turbopack_crates_turbopack-tests_tests_snapshot_imports_order_input_1wfk3l4._.js",
"language": "javascript",
"file_size": 1544,
"cut_index": 537,
"middle_length": 229
} |
"TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_imports_duplicate-binding_input_05k3-r-._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/input/table.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
_... | 2f$tests$2f$snapshot$2f$imports$2f$duplicate$2d$binding$2f$input$2f$table$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/input/table.js [test] (ecmasc | t/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"Table",
()=>Table
]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/output/1do3_crates_turbopack-tests_tests_snapshot_imports_duplicate-binding_input_05k3-r-._.js",
"language": "javascript",
"file_size": 1395,
"cut_index": 524,
"middle_length": 229
} |
/turbopack-tests/tests/snapshot/imports/json/input/huge.json.[json].cjs [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
module.exports = JSON.parse("[\"foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofo... | oofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofo | ofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo\",\"foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoof | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/imports/json/output/turbopack_crates_turbopack-tests_tests_snapshot_imports_json_input_1ytd18m._.js",
"language": "javascript",
"file_size": 13806,
"cut_index": 921,
"middle_length": 229
} |
{
function abort(message) {
console.error(message);
throw new Error(message);
}
if (
typeof self["WorkerGlobalScope"] === "undefined" ||
!(self instanceof self["WorkerGlobalScope"])
) {
abort("Worker entrypoint must be loaded in a worker context");
}
// Try querystring first (SharedWorker), then ha... | Array.isArray(params[0]) ? params[0] : [];
Object.assign(self, {
TURBOPACK_NEXT_CHUNK_URLS: chunkUrls,
TURBOPACK_ASSET_SUFFIX: param(1)
});
if (chunkUrls.length > 0) {
var scriptsToLoad = [];
for (var i = 0; i < chunkUrls.length; i++) {
| ponent(url.hash.slice("#params=".length));
}
if (!paramsString) abort("Missing worker bootstrap config");
var params = JSON.parse(paramsString);
var param = (n) => typeof params[n] === 'string' ? params[n] : '';
var chunkUrls = | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/0uxq_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_0uy0mni._.js",
"language": "javascript",
"file_size": 1489,
"cut_index": 524,
"middle_length": 229
} |
tests_snapshot_imports_ignore-comments_input_09jmqs-._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
module.exports = 'turbopack';
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapsh... | output/0uxq_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_0uy0mni._.js", ["output/0_9x_turbopack-tests_tests_snapshot_imports_ignore-comments_input_vercel_cjs_0j-fab5._.js","output/0rv8_turbopack-tests_tests_snapshot_imports_ignore-c | turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs [test] (ecmascript, worker loader)", ((__turbopack_context__) => {
__turbopack_context__.v(function(Ctor, opts) {
return __turbopack_context__.b(Ctor, " | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/1do3_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_input_09jmqs-._.js",
"language": "javascript",
"file_size": 3423,
"cut_index": 614,
"middle_length": 229
} |
./vercel.mjs').then(console.log)
import(/* webpackIgnore: false */ './vercel.mjs').then(console.log)
console.log(require('./vercel.cjs'))
new Worker(
/* turbopackIgnore: false */ new URL('./vercel.cjs', import.meta.url)
)
// turbopack shouldn't attempt to bundle these, and they should be preserved in the output
impo... | Worker(
/* turbopackIgnore: true */ new URL('./ignore-worker.cjs', import.meta.url)
)
new Worker(
/* webpackIgnore: true */ new URL('./ignore-worker.cjs', import.meta.url)
)
export function foo(plugin) {
return require(/* turbopackIgnore: true */ p | ire(/* turbopackIgnore: true */ './ignore.cjs')
new | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/index.js",
"language": "javascript",
"file_size": 837,
"cut_index": 520,
"middle_length": 52
} |
lThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_imports_static_input_1-vrw_t._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/static/input/vercel.svg (static in ecmascript)", ((__turbopack_context__) => {
__turbopack_context__... | __ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/static/input/vercel.svg (static in ecmascript)");
;
console.log(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tes | ict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$imports$2f$static$2f$input$2f$vercel$2e$svg__$28$static__in__ecmascript$29$ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/imports/static/output/turbopack_crates_turbopack-tests_tests_snapshot_imports_static_input_1-vrw_t._.js",
"language": "javascript",
"file_size": 1227,
"cut_index": 518,
"middle_length": 229
} |
"TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_node_spawn_dynamic_input_0ow1swa._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopac... | ;
const program = [
'ls'
];
const proc = (0, __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node$2f$spawn_dynamic$2f$input$2f$node_modules$2f$child_process$2f$index$2e$js__$5b$test$5d$_ | _process$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/input/node_modules/child_process/index.js [test] (ecmascript)");
| {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/node/spawn_dynamic/output/turbopack_crates_turbopack-tests_tests_snapshot_node_spawn_dynamic_input_0ow1swa._.js",
"language": "javascript",
"file_size": 1469,
"cut_index": 524,
"middle_length": 229
} |
"TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_node_spawn_node_eval_input_2055vpq._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack... | );
;
let x = (0, __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node$2f$spawn_node_eval$2f$input$2f$node_modules$2f$child_process$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__["spawn"] | d_process$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/input/node_modules/child_process/index.js [test] (ecmascript)" | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/node/spawn_node_eval/output/1do3_crates_turbopack-tests_tests_snapshot_node_spawn_node_eval_input_2055vpq._.js",
"language": "javascript",
"file_size": 1469,
"cut_index": 524,
"middle_length": 229
} |
2._.js",
"[externals]/bun:ffi [external] (bun:ffi, cjs)", ((__turbopack_context__, module, exports) => {
var mod = __turbopack_context__.x("bun:ffi", () => require("bun:ffi"));
module.exports = mod;
}),
"[externals]/bun:jsc [external] (bun:jsc, cjs)", ((__turbopack_context__, module, exports) => {
var mod = __turbop... | ("bun:test", () => require("bun:test"));
module.exports = mod;
}),
"[externals]/bun:wrap [external] (bun:wrap, cjs)", ((__turbopack_context__, module, exports) => {
var mod = __turbopack_context__.x("bun:wrap", () => require("bun:wrap"));
module.exports | = __turbopack_context__.x("bun:sqlite", () => require("bun:sqlite"));
module.exports = mod;
}),
"[externals]/bun:test [external] (bun:test, cjs)", ((__turbopack_context__, module, exports) => {
var mod = __turbopack_context__.x | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/node/bun_protocol_external/output/[root-of-the-server]__0vvunn2._.js",
"language": "javascript",
"file_size": 3639,
"cut_index": 614,
"middle_length": 229
} |
|| (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_css_embed-url_input_12dqxgx._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/embed-url/input/style.module.css [test] (css module)", ((__turbopack_context__) => {
__turbopack_context__.v({
"module-sty... | __$28$css__module$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/embed-url/input/style.module.css [test] (css module)");
;
;
console.log(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$ | use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$css$2f$embed$2d$url$2f$input$2f$style$2e$module$2e$css__$5b$test$5d$ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/css/embed-url/output/turbopack_crates_turbopack-tests_tests_snapshot_css_embed-url_input_12dqxgx._.js",
"language": "javascript",
"file_size": 1584,
"cut_index": 537,
"middle_length": 229
} |
alThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_css_embed-url_input_1ww-zwk._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/embed-url/input/style.module.css [test] (css module, async loader)", ((__turbopack_context__) => {
__tur... | test] (css module)");
});
});
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/embed-url/input/style.css [test] (css, async loader)", ((__turbopack_context__) => {
__turbopack_context__.v((parentImport) => {
return Promise.resolv | e.module.css [ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/css/embed-url/output/turbopack_crates_turbopack-tests_tests_snapshot_css_embed-url_input_1ww-zwk._.js",
"language": "javascript",
"file_size": 803,
"cut_index": 517,
"middle_length": 14
} |
"TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_css_css-modules_input_0ppd-98._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/css-modules/input/style.module.css [test] (css module)", ((__turbopack_context__) => {
__turbopack_context__.... | $2e$css__$5b$test$5d$__$28$css__module$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/css-modules/input/style.module.css [test] (css module)");
;
console.log(__TURBOPACK__imported__module__$5b$project$5d2f$tu | k_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$css$2f$css$2d$modules$2f$input$2f$style$2e$module | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/css/css-modules/output/turbopack_crates_turbopack-tests_tests_snapshot_css_css-modules_input_0ppd-98._.js",
"language": "javascript",
"file_size": 1455,
"cut_index": 524,
"middle_length": 229
} |
ACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_css_split-shared_input_index_1liedlh.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
__turbopack_context__.A("[project]/turbopack/cr... | turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/input/entry2.css [test] (css, async loader)");
}),
]);
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_css_split-shared_input_index_1liedlh.j | shared/input/b1.css [test] (css, async loader)");
__ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/output/1do3_crates_turbopack-tests_tests_snapshot_css_split-shared_input_index_1liedlh.js",
"language": "javascript",
"file_size": 872,
"cut_index": 559,
"middle_length": 52
} |
"TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_css_split-shared_input_1oq4ajl._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/input/entry.css [test] (css, async loader)", ((__turbopack_context__) => {
__turbopack_context_... | n Promise.all([
"output/turbopack_crates_turbopack-tests_tests_snapshot_css_split-shared_input_0t1sbap._.css"
].map((chunk) => __turbopack_context__.l(chunk))).then(() => {});
});
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/split-s | )).then(() => {});
});
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/input/b1.css [test] (css, async loader)", ((__turbopack_context__) => {
__turbopack_context__.v((parentImport) => {
retur | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/css/split-shared/output/turbopack_crates_turbopack-tests_tests_snapshot_css_split-shared_input_1oq4ajl._.js",
"language": "javascript",
"file_size": 1334,
"cut_index": 524,
"middle_length": 229
} |
] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_css_css_input_1f3bnvi._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/css/input/style.module.css [test] (css module)", ((__turbopack_context__) => {
__turbopack_context__.v({
"another-composed-module-style": "style-module__I... | module.css [test] (css module)")["foo-module-style"],
"inner": "style-module__Iu_hLa__inner",
"module-style": "style-module__Iu_hLa__module-style",
});
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/css/input/index.js [test] (ecmasc | ule)")["foo-module-style"],
"composed-module-style": "style-module__Iu_hLa__composed-module-style" + " " + __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/css/input/node_modules/foo/style. | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/css/css/output/turbopack_crates_turbopack-tests_tests_snapshot_css_css_input_1f3bnvi._.js",
"language": "javascript",
"file_size": 2834,
"cut_index": 563,
"middle_length": 229
} |
] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_css_cycle_input_1idxyqw._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/input/1.css [test] (css, async loader)", ((__turbopack_context__) => {
__turbopack_context__.v((parentImport) => {
return Promise.all([
"outpu... | t_css_cycle_input_12589gj._.css"
].map((chunk) => __turbopack_context__.l(chunk))).then(() => {});
});
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/input/x.css [test] (css, async loader)", ((__turbopack_context__) => {
__turbop | -tests/tests/snapshot/css/cycle/input/2.css [test] (css, async loader)", ((__turbopack_context__) => {
__turbopack_context__.v((parentImport) => {
return Promise.all([
"output/turbopack_crates_turbopack-tests_tests_snapsho | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/output/turbopack_crates_turbopack-tests_tests_snapshot_css_cycle_input_1idxyqw._.js",
"language": "javascript",
"file_size": 2021,
"cut_index": 563,
"middle_length": 229
} |
obalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_css_cycle_input_index_0h88o8a.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
__turbopack_... | oject]/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)");
}),
]);
//# s | ests/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("[pr | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/css/cycle/output/turbopack_crates_turbopack-tests_tests_snapshot_css_cycle_input_index_0h88o8a.js",
"language": "javascript",
"file_size": 1100,
"cut_index": 515,
"middle_length": 229
} |
This["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_css_cycle2_input_08nj7rl._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/css/cycle2/input/1.css [test] (css, async loader)", ((__turbopack_context__) => {
__turbopack_context__.v((parentImport) => {
return Prom... | input/2.css [test] (css, async loader)", ((__turbopack_context__) => {
__turbopack_context__.v((parentImport) => {
return Promise.all([
"output/turbopack_crates_turbopack-tests_tests_snapshot_css_cycle2_input_1pm9un5._.css"
].map((chunk) => __turbop | ck/crates/turbopack-tests/tests/snapshot/css/cycle2/ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/css/cycle2/output/turbopack_crates_turbopack-tests_tests_snapshot_css_cycle2_input_08nj7rl._.js",
"language": "javascript",
"file_size": 907,
"cut_index": 547,
"middle_length": 52
} |
] = [])).push(["output/0p5q_snapshot_intermediate-tree-shake_rename-side-effect-free-facade_input_1nl1qrj._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/rename-side-effect-free-facade/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
var __TURBO... | -facade/input/node_modules/lib/a.js [test] (ecmascript) <export a as a0>");
;
console.log(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$intermediate$2d$tree$2d$shake$2f$rename$2d$side$2d$e | 2f$node_modules$2f$lib$2f$a$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$export__a__as__a0$3e$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/rename-side-effect-free | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/rename-side-effect-free-facade/output/0p5q_snapshot_intermediate-tree-shake_rename-side-effect-free-facade_input_1nl1qrj._.js",
"language": "javascript",
"file_size": 2661,
"cut_index": 563,
"middle_length": 229
} |
iate-tree-shake_reexport-with-locals_input_0fa40pr._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/reexport-with-locals/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$t... | d__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$intermediate$2d$tree$2d$shake$2f$reexport$2d$with$2d$locals$2f$input$2f$node_modules$2f$lib$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$locals$3e$__["lo | ls$3e$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/reexport-with-locals/input/node_modules/lib/index.js [test] (ecmascript) <locals>");
;
(0, __TURBOPACK__importe | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/reexport-with-locals/output/1jsg_tests_snapshot_intermediate-tree-shake_reexport-with-locals_input_0fa40pr._.js",
"language": "javascript",
"file_size": 3854,
"cut_index": 614,
"middle_length": 229
} |
|| (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_intermediate-tree-shake_tree-shake-test-1_input_1mlxku4._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/tree-shake-test-1/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
var _... | (ecmascript)");
;
console.log(`I like ${(0, __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$intermediate$2d$tree$2d$shake$2f$tree$2d$shake$2d$test$2d$1$2f$input$2f$node_modules$2f$lib$2f$in | dules$2f$lib$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/tree-shake-test-1/input/node_modules/lib/index.js [test] | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/intermediate-tree-shake/tree-shake-test-1/output/1jsg_tests_snapshot_intermediate-tree-shake_tree-shake-test-1_input_1mlxku4._.js",
"language": "javascript",
"file_size": 1652,
"cut_index": 537,
"middle_length": 229
} |
|| (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_dynamic-request_very-dynamic_input_index_045hiyc.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/dynamic-request/very-dynamic/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack... | ynamic-request/very-dynamic/input/index.js");
}
};
;
;
const unknown = Math.random();
__TURBOPACK__url__external__node$3a$child_process__["default"].spawnSync(unknown);
__TURBOPACK__url__external__node$3a$child_process__["default"].spawnSync('node', un | al__node$3a$fs__ = __turbopack_context__.x("node:fs", ()=>require("node:fs"), true);
var __TURBOPACK__import$2e$meta__ = {
get url () {
return __turbopack_context__.F("turbopack/crates/turbopack-tests/tests/snapshot/d | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/dynamic-request/very-dynamic/output/0_9x_turbopack-tests_tests_snapshot_dynamic-request_very-dynamic_input_index_045hiyc.js",
"language": "javascript",
"file_size": 1753,
"cut_index": 537,
"middle_length": 229
} |
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_env_env_input_13-d6v3._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/env/env/input/.env/.env.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var env = pro... | __turbopack_context__, module, exports) => {
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_13-d6v3._.js.map | shot/env/env/input/index.js [test] (ecmascript)", (( | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/env/env/output/turbopack_crates_turbopack-tests_tests_snapshot_env_env_input_13-d6v3._.js",
"language": "javascript",
"file_size": 820,
"cut_index": 512,
"middle_length": 52
} |
napshot_remove-unused-imports_exports_input_07rt4kf._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/exports/input/library/leaf.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
function leafX() {}
function leafY() {}
__turbopack_context__.s([
"leafY",
... | $29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/exports/input/library/leaf.js [test] (ecmascript)");
;
function sharedX() {
leafX();
}
function sharedY() {
(0, __TURBOPACK__imported_ | trict";
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$remove$2d$unused$2d$imports$2f$exports$2f$input$2f$library$2f$leaf$2e$js__$5b$test$5d$__$28$ecmascript | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/remove-unused-imports/exports/output/0_9x_turbopack-tests_tests_snapshot_remove-unused-imports_exports_input_07rt4kf._.js",
"language": "javascript",
"file_size": 4178,
"cut_index": 614,
"middle_length": 229
} |
set in development modes for hmr support
module = createModuleWithDirection(id);
} else {
module = createModuleObject(id);
}
moduleCache[id] = module;
}
return module;
}
/**
* Creates the module object. Only done here to ensure all module objects have the same sh... | orts object.
*/ function esm(exports, bindings) {
defineProp(exports, '__esModule', {
value: true
});
if (toStringTag) defineProp(exports, toStringTag, {
value: 'Module'
});
let i = 0;
while(i < bindings.length){
| n(id) {
return {
exports: {},
error: undefined,
id,
namespaceObject: undefined,
parents: [],
children: []
};
}
const BindingTag_Value = 0;
/**
* Adds the getters to the exp | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/0rv8_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_17smy-b.js",
"language": "javascript",
"file_size": 93167,
"cut_index": 3790,
"middle_length": 229
} |
__turbopack_context__` object for a module.
*/ function Context(module, exports) {
this.m = module;
// 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.
... | typeof Symbol !== 'undefined' && Symbol.toStringTag;
function defineProp(obj, name, options) {
if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options);
}
function getOverwrittenModule(moduleCache, id) {
let module = moduleCac | ly 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;
const toStringTag = | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js",
"language": "javascript",
"file_size": 34089,
"cut_index": 2151,
"middle_length": 229
} |
error: undefined,
id,
namespaceObject: undefined,
parents: [],
children: []
};
}
const BindingTag_Value = 0;
/**
* Adds the getters to the exports object.
*/ function esm(exports, bindings) {
defineProp(exports, '__esModule', {
value: true
});
if (toStrin... | merable: true,
writable: false
});
} else {
throw new Error(`unexpected tag: ${tagOrFunction}`);
}
} else {
const getterFn = tagOrFunction;
if (type | ndings[i++];
if (typeof tagOrFunction === 'number') {
if (tagOrFunction === BindingTag_Value) {
defineProp(exports, propName, {
value: bindings[i++],
enu | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/node/output/[turbopack]_runtime.js",
"language": "javascript",
"file_size": 69428,
"cut_index": 3790,
"middle_length": 229
} |
ction(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="b11874ff-2739-d8fc-12c4-16e204dc1199")}catch(e){}}();
(globalThis["TURBOPACK"] || (globalThis[... | ex.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
console.log('Hello World');
}),
]);
//# debugId=b11874ff-2739-d8fc-12c4-16e204dc1199
//# sourceMappingURL=1do3_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_ | wser/input/ind | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/output/1do3_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_03ibyvs.js",
"language": "javascript",
"file_size": 801,
"cut_index": 517,
"middle_length": 14
} |
bj, name, options) {
if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options);
}
function getOverwrittenModule(moduleCache, id) {
let module = moduleCache[id];
if (!module) {
if (createModuleWithDirectionFlag) {
// set in development modes for hmr support
... | };
}
function createModuleWithDirection(id) {
return {
exports: {},
error: undefined,
id,
namespaceObject: undefined,
parents: [],
children: []
};
}
const BindingTag_Value = 0;
/**
* Adds the gette | e module object. Only done here to ensure all module objects have the same shape.
*/ function createModuleObject(id) {
return {
exports: {},
error: undefined,
id,
namespaceObject: undefined
| {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/output/1i9t_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_19boa0e.js",
"language": "javascript",
"file_size": 93482,
"cut_index": 3790,
"middle_length": 229
} |
] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_export-alls_cjs-script_input_1iakubv._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/exported.cjs [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
module.exports = {
foo: 1,
bar:... | rbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/input/exported.cjs [test] (ecmascript)");
__turbopack_context__.j(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$test | _.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$export$2d$alls$2f$cjs$2d$script$2f$input$2f$exported$2e$cjs__$5b$test$5d$__$28$ecmascript$29$__ = __tu | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/export-alls/cjs-script/output/1do3_crates_turbopack-tests_tests_snapshot_export-alls_cjs-script_input_1iakubv._.js",
"language": "javascript",
"file_size": 2088,
"cut_index": 563,
"middle_length": 229
} |
tests_snapshot_basic_top-level-await_input_0zs_dr_._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/db-connection.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
return __turbopack_context__.a(async (__turbopack_handle_async_dependencies__, __turbopack_... | s in an async function
await new Promise((r)=>setTimeout(r, 100));
return 'fake data';
};
const close = ()=>{
console.log('closes the DB connection');
};
__turbopack_async_result__();
} catch(e) { __turbopack_async_result__(e); } }, true);}),
" | await new Promise((r)=>setTimeout(r, 1000));
};
// This is a top-level-await
await connectToDB('my-sql://example.com');
const dbCall = async (data)=>{
console.log('dbCall', data);
// This is a normal await, because it' | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic/top-level-await/output/1do3_crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_0zs_dr_._.js",
"language": "javascript",
"file_size": 3083,
"cut_index": 614,
"middle_length": 229
} |
ests_tests_snapshot_comptime_typeof_input_1y4b353._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/cjs.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
var __TURBOPACK__import$2e$meta__ = {
get url () {
return __turbopack_context__.F("turbopack/... | ould be real require
console.log(/*TURBOPACK member replacement*/ __turbopack_context__.t);
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/input/dep.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
}) | TURBOPACK compile-time value", "object"));
// CJS, should be `object`
console.log('typeof module', ("TURBOPACK compile-time value", "object"));
console.log('typeof exports', ("TURBOPACK compile-time value", "object"));
// CJS, sh | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/comptime/typeof/output/turbopack_crates_turbopack-tests_tests_snapshot_comptime_typeof_input_1y4b353._.js",
"language": "javascript",
"file_size": 4459,
"cut_index": 614,
"middle_length": 229
} |
turn
}
a2()
var a3 = 3
function a4() {
var a5
}
;(function a6() {
var a7
})
const a8 = () => {
var a9
}
class a10 {}
let a11 = 11
let {
a12 = 12,
a14: {
a15,
a16: [a17, ...a18],
},
...a19
} = {}
function a20() {
return
a21()
}
;({
get a... | } else {
return
}
e2()
}
export function f() {
if (false) {
} else {
return
}
f1()
}
export function g() {
if (false) {
g1()
} else {
g2()
return
}
g3()
}
export function h() {
if (false) {
} else {
h1() | return
} else {
b2()
}
b3()
}
export function c() {
if (true) {
return
}
c1()
}
export function d() {
if (true) {
return
} else {
d1()
}
d2()
}
export function e() {
if (false) {
e1()
| {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/comptime/early-return/input/module.js",
"language": "javascript",
"file_size": 2205,
"cut_index": 563,
"middle_length": 229
} |
VALUE) {
console.log('DEFINED_VALUE')
}
if (DEFINED_TRUE) {
console.log('DEFINED_VALUE')
}
if (!DEFINED_NULL) {
console.log('DEFINED_NULL', DEFINED_NULL)
}
if (DEFINED_INT) {
console.log('DEFINED_INT', DEFINED_INT)
}
if (DEFINED_FLOAT) {
console.log('DEFINED_FLOAT', DEFINED_FLOAT)
}
if (DEFINED_ARRAY) {
... | og('production')
}
var p = process
console.log(A.VERY.LONG.DEFINED.VALUE)
console.log(DEFINED_VALUE)
console.log(p.env.NODE_ENV)
if (p.env.NODE_ENV === 'production') {
console.log('production')
}
p.env.NODE_ENV == 'production'
? console.log('produc | ESTED', DEFINED_EVALUATE_NESTED)
}
if (A.VERY.LONG.DEFINED.VALUE) {
console.log('A.VERY.LONG.DEFINED.VALUE')
}
if (process.env.NODE_ENV) {
console.log('something')
}
if (process.env.NODE_ENV === 'production') {
console.l | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/comptime/define/input/index.js",
"language": "javascript",
"file_size": 1417,
"cut_index": 524,
"middle_length": 229
} |
(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/1jsg_tests_snapshot_source_maps_input-source-map-merged_input_index_13tze6n.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/input-source-map-merged/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"us... | e-map-merged/input/sourcemapped.js [test] (ecmascript)
;
function runExternalSourceMapped(fn) {
return fn();
}
;
runExternalSourceMapped();
}),
]);
//# sourceMappingURL=1jsg_tests_snapshot_source_maps_input-source-map-merged_input_index_13tze6n.js.map | roject]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/input-source-map-merged/input/index.js [test] (ecmascript)");
// MERGED MODULE: [project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/input-sourc | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/source_maps/input-source-map-merged/output/1jsg_tests_snapshot_source_maps_input-source-map-merged_input_index_13tze6n.js",
"language": "javascript",
"file_size": 997,
"cut_index": 512,
"middle_length": 229
} |
"TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/0_9x_turbopack-tests_tests_snapshot_source_maps_input-source-map_input_0n-g1xc._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/input-source-map/input/sourcemapped.js [test] (ecmascript)", ((__turbopack_context__) => {
"use stric... | 2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$source_maps$2f$input$2d$source$2d$map$2f$input$2f$sourcemapped$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_map | opack-tests/tests/snapshot/source_maps/input-source-map/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/source_maps/input-source-map/output/0_9x_turbopack-tests_tests_snapshot_source_maps_input-source-map_input_0n-g1xc._.js",
"language": "javascript",
"file_size": 1446,
"cut_index": 524,
"middle_length": 229
} |
quire$2d$side$2d$effect$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript) <internal part 0>");
;
__TURBOPACK__imported__module__$5... | 5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__["a"] += '!';
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/input/lib.js [test] (ecmascript) <internal part 4>", ((__turbopack_context__) => { | c$internal__part__0$3e$__["a"] += '!';
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$require$2d$side$2d$effect$2f$input$2f$lib$2e$js__$ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/require-side-effect/output/1jsg_tests_snapshot_basic-tree-shake_require-side-effect_input_0fs4qhn._.js",
"language": "javascript",
"file_size": 17783,
"cut_index": 1331,
"middle_length": 229
} |
/tests/snapshot/basic-tree-shake/import-named/input/lib.js [test] (ecmascript) <internal part 0>", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"a",
()=>dog,
(new_dog)=>dog = new_dog
]);
let dog = 'dog';
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-sh... | ect]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/input/lib.js [test] (ecmascript) <internal part 0>");
;
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$bas | d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$import$2d$named$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__ = __turbopack_context__.i("[proj | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named/output/0_9x_turbopack-tests_tests_snapshot_basic-tree-shake_import-named_input_1j9uhcy._.js",
"language": "javascript",
"file_size": 7757,
"cut_index": 716,
"middle_length": 229
} |
ests/tests/snapshot/basic-tree-shake/import-named-all/input/lib.js [test] (ecmascript) <internal part 0>", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"a",
()=>dog,
(new_dog)=>dog = new_dog
]);
let dog = 'dog';
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic... | _context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/input/lib.js [test] (ecmascript) <internal part 0>");
;
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$t | 5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$import$2d$named$2d$all$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__ = __turbopack | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-named-all/output/0_9x_turbopack-tests_tests_snapshot_basic-tree-shake_import-named-all_input_1orhvu2._.js",
"language": "javascript",
"file_size": 7967,
"cut_index": 716,
"middle_length": 229
} |
=>dog = new_dog
]);
let dog = 'dog';
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/input/lib.js [test] (ecmascript) <internal part 1>", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack... | s$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$export$2d$named$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__["a"] += '!';
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$ | opack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/input/lib.js [test] (ecmascript) <internal part 0>");
;
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crate | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/output/0_9x_turbopack-tests_tests_snapshot_basic-tree-shake_export-named_input_0xj7csh._.js",
"language": "javascript",
"file_size": 9229,
"cut_index": 921,
"middle_length": 229
} |
w_dog
]);
let dog = 'dog';
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/lib.js [test] (ecmascript) <internal part 1>", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crat... | $turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$dynamic$2d$import$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__["a"] += '!';
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f | context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/lib.js [test] (ecmascript) <internal part 0>");
;
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/output/1jsg_tests_snapshot_basic-tree-shake_dynamic-import_input_lib_1b34ju5.js",
"language": "javascript",
"file_size": 16950,
"cut_index": 921,
"middle_length": 229
} |
(globalThis.TURBOPACK = [])).push(["output/bf321_tests_snapshot_typescript_tsconfig-extends-without-ext_input_7f582aad._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/input/prop.ts [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_co... | s$2d$without$2d$ext$2f$input$2f$prop$2e$ts__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/input/prop.ts [test] (ecmascript)");
;
;
;
console.l | t)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$typescript$2f$tsconfig$2d$extend | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-without-ext/output/bf321_tests_snapshot_typescript_tsconfig-extends-without-ext_input_7f582aad._.js",
"language": "javascript",
"file_size": 1842,
"cut_index": 537,
"middle_length": 229
} |
)).push(["output/780ce_turbopack-tests_tests_snapshot_typescript_tsconfig-baseurl_input_afea253f._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/input/prop.ts [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"prop",
()=>pr... | mascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/input/prop.ts [test] (ecmascript)");
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tes | ";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$typescript$2f$tsconfig$2d$baseurl$2f$input$2f$prop$2e$ts__$5b$test$5d$__$28$ec | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-baseurl/output/780ce_turbopack-tests_tests_snapshot_typescript_tsconfig-baseurl_input_afea253f._.js",
"language": "javascript",
"file_size": 2641,
"cut_index": 563,
"middle_length": 229
} |
(globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_422551e0._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module/input/index.ts [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TU... | f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_modules$2f$tsconfig$2d$mod$2f$prop$2e$ts__$5b$test$5d$__$28$ecmascript$29$__["prop"], __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_m | = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/tsconfig-mod/prop.ts [test] (ecmascript)");
;
;
;
console.log(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2 | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module/output/turbopack_crates_turbopack-tests_tests_snapshot_422551e0._.js",
"language": "javascript",
"file_size": 1643,
"cut_index": 537,
"middle_length": 229
} |
] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_imports_optional-comments_input_1djzxjx._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/optional-comments/input/existing.cjs [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
module.exports = 'existing module... | le.log('missing.mjs not found'));
// require with turbopackOptional should also work
try {
const missing = (()=>{
const e = new Error("Cannot find module './missing.cjs'");
e.code = 'MODULE_NOT_FOUND';
throw e;
})();
con | ackOptional should suppress resolve errors silently
Promise.resolve().then(()=>{
const e = new Error("Cannot find module './missing.mjs'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}).then((m)=>console.log(m), (e)=>conso | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/imports/optional-comments/output/1do3_crates_turbopack-tests_tests_snapshot_imports_optional-comments_input_1djzxjx._.js",
"language": "javascript",
"file_size": 2338,
"cut_index": 563,
"middle_length": 229
} |
] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_1ih204k._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/Actions.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"AlternativeCrea... | user', name);
// These are normal awaits, because they are in an async function
const { createUser } = await UserApi;
await createUser(name);
};
const AlternativeCreateUserAction = async (name)=>{
const { createUser } = await __turbopack_co | = __turbopack_context__.A("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/UserAPI.js [test] (ecmascript, async loader)");
const CreateUserAction = async (name)=>{
console.log('Creating | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic/top-level-await/output/1do3_crates_turbopack-tests_tests_snapshot_basic_top-level-await_input_1ih204k._.js",
"language": "javascript",
"file_size": 2342,
"cut_index": 563,
"middle_length": 229
} |
ort() doesn't care about whether a module is an async module or not
const UserApi = import('./UserAPI.js')
export const CreateUserAction = async (name) => {
console.log('Creating user', name)
// These are normal awaits, because they are in an async function
const { createUser } = await UserApi
await createUser... | lternativeCreateUserAction below
// Here: Connecting to the DB starts when AlternativeCreateUserAction
// is called
export const AlternativeCreateUserAction = async (name) => {
const { createUser } = await import('./UserAPI.js')
await createU | to the DB starts when the application starts
// Placing it inside of an (async) function will start loading
// and evaluating when the function is called for the first time
// which basically makes it lazy-loaded.
// see A | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic/top-level-await/input/Actions.js",
"language": "javascript",
"file_size": 1151,
"cut_index": 518,
"middle_length": 229
} |
tests_snapshot_source_maps_merged-unicode_input_0b1pxfd._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/jsx-runtime.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
module.exports = {};
}),
"[project]/turbopack/crates/turbopack-tests/tests/snaps... | / MERGED MODULE: [project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/params.js [test] (ecmascript)
;
;
// MERGED MODULE: [project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/colle | t/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)
;
__turbopack_context__.s([], "[project]/turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/input/entry-base.js [test] (ecmascript)");
/ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/source_maps/merged-unicode/output/1do3_crates_turbopack-tests_tests_snapshot_source_maps_merged-unicode_input_0b1pxfd._.js",
"language": "javascript",
"file_size": 4571,
"cut_index": 614,
"middle_length": 229
} |
"TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_basic_chunked_input_1_yzgm1._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/chunked/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context_... | $project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2f$chunked$2f$input$2f$node_modules$2f$foo$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__["foo"])(true);
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapsho | $5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic/chunked/input/node_modules/foo/index.js [test] (ecmascript)");
;
(0, __TURBOPACK__imported__module__$5b | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic/chunked/output/turbopack_crates_turbopack-tests_tests_snapshot_basic_chunked_input_1_yzgm1._.js",
"language": "javascript",
"file_size": 1342,
"cut_index": 524,
"middle_length": 229
} |
e$2f$export$2d$namespace$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-namespace/input/lib.js [test] (ecmascript) <internal part 0>");
;
__TURBOPACK__imported__module__$5b$... | 28$ecmascript$29$__$3c$internal__part__0$3e$__["a"] += '!';
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-namespace/input/lib.js [test] (ecmascript) <internal part 4>", ((__turbopack_context__) => {
"use strict";
_ | al__part__0$3e$__["a"] += '!';
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$export$2d$namespace$2f$input$2f$lib$2e$js__$5b$test$5d$__$ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-namespace/output/0_9x_turbopack-tests_tests_snapshot_basic-tree-shake_export-namespace_input_1mqgz2-._.js",
"language": "javascript",
"file_size": 17486,
"cut_index": 1331,
"middle_length": 229
} |
(globalThis.TURBOPACK = [])).push(["output/bf321_tests_snapshot_typescript_tsconfig-extends-relative-dir_input_486c3931._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/input/prop.ts [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_... | ends$2d$relative$2d$dir$2f$input$2f$prop$2e$ts__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/input/prop.ts [test] (ecmascript)");
;
;
;
cons | ript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$typescript$2f$tsconfig$2d$ext | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-relative-dir/output/bf321_tests_snapshot_typescript_tsconfig-extends-relative-dir_input_486c3931._.js",
"language": "javascript",
"file_size": 1851,
"cut_index": 537,
"middle_length": 229
} |
(globalThis.TURBOPACK = [])).push(["output/780ce_turbopack-tests_tests_snapshot_typescript_tsconfig-extends_input_5427479f._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/input/prop.ts [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.... | e$ts__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/input/prop.ts [test] (ecmascript)");
;
;
;
console.log(__TURBOPACK__imported__module__$5b$project$5d2f | ontext__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$typescript$2f$tsconfig$2d$extends$2f$input$2f$prop$2 | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends/output/780ce_turbopack-tests_tests_snapshot_typescript_tsconfig-extends_input_5427479f._.js",
"language": "javascript",
"file_size": 1742,
"cut_index": 537,
"middle_length": 229
} |
(globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_f5996dbc._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module-full-path/input/index.ts [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([])... | f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_modules$2f$tsconfig$2d$mod$2f$prop$2e$ts__$5b$test$5d$__$28$ecmascript$29$__["prop"], __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot | ipt$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/node_modules/tsconfig-mod/prop.ts [test] (ecmascript)");
;
;
;
console.log(__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2 | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/typescript/tsconfig-extends-module-full-path/output/turbopack_crates_turbopack-tests_tests_snapshot_f5996dbc._.js",
"language": "javascript",
"file_size": 1653,
"cut_index": 537,
"middle_length": 229
} |
tests_snapshot_comptime_early-return_input_00p0fdz._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/early-return/input/module.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"a",
()=>a,
"b",
()=>b,
"c",
()=>c,
"d",
... |
return;
//TURBOPACK unreachable
;
}
var a28;
}
function b() {
if ("TURBOPACK compile-time truthy", 1) {
b1();
return;
} else //TURBOPACK unreachable
;
//TURBOPACK unreachable
;
}
function | a1();
return;
}
//TURBOPACK unreachable
;
var a3;
function a4() {
var a5;
}
const a8 = undefined;
let a10;
let a11;
let a12, a15, a17, a18, a19;
function a20() { | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/comptime/early-return/output/1do3_crates_turbopack-tests_tests_snapshot_comptime_early-return_input_00p0fdz._.js",
"language": "javascript",
"file_size": 4943,
"cut_index": 614,
"middle_length": 229
} |
] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_comptime_define_input_index_1etshin.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/comptime/define/input/index.js [test] (ecmascript)", ((__turbopack_context__, module, exports) => {
if ("TURBOPACK compile-time truthy", 1) {
console... | ompile-time value", 0.01));
}
if ("TURBOPACK compile-time truthy", 1) {
console.log('DEFINED_ARRAY', ("TURBOPACK compile-time value", [
("TURBOPACK compile-time value", false),
("TURBOPACK compile-time value", 0),
("TURBOPACK co | pile-time value", null));
}
if ("TURBOPACK compile-time truthy", 1) {
console.log('DEFINED_INT', ("TURBOPACK compile-time value", 1));
}
if ("TURBOPACK compile-time truthy", 1) {
console.log('DEFINED_FLOAT', ("TURBOPACK c | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/comptime/define/output/1do3_crates_turbopack-tests_tests_snapshot_comptime_define_input_index_1etshin.js",
"language": "javascript",
"file_size": 2991,
"cut_index": 563,
"middle_length": 229
} |
pshot/basic-tree-shake/import-side-effect/input/lib.js [test] (ecmascript) <internal part 0>", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([
"a",
()=>dog,
(new_dog)=>dog = new_dog
]);
let dog = 'dog';
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/... | __.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/input/lib.js [test] (ecmascript) <internal part 0>");
;
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2 | $5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$import$2d$side$2d$effect$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__ = __turbopack_context | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-side-effect/output/1jsg_tests_snapshot_basic-tree-shake_import-side-effect_input_1_hdh9i._.js",
"language": "javascript",
"file_size": 6055,
"cut_index": 716,
"middle_length": 229
} |
tree$2d$shake$2d$test$2d$1$2f$input$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/tree-shake-test-1/input/index.js [test] (ecmascript) <internal part 0>");
;
__TURBOPACK__imported__modul... | ex$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__["a"] += '!';
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/tree-shake-test-1/input/index.js [test] (ecmascript) <internal part 4>", ((__turbopack_cont | $29$__$3c$internal__part__0$3e$__["a"] += '!';
__TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$tree$2d$shake$2d$test$2d$1$2f$input$2f$ind | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/tree-shake-test-1/output/1jsg_tests_snapshot_basic-tree-shake_tree-shake-test-1_input_index_07jttq5.js",
"language": "javascript",
"file_size": 17550,
"cut_index": 1331,
"middle_length": 229
} |
|| (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_imports_static-and-dynamic_input_0dm2mkc._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/input/vercel.mjs [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopac... | 2f$tests$2f$snapshot$2f$imports$2f$static$2d$and$2d$dynamic$2f$input$2f$vercel$2e$mjs__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/input/vercel.mjs [test | orts/static-and-dynamic/input/index.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$ | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/imports/static-and-dynamic/output/1do3_crates_turbopack-tests_tests_snapshot_imports_static-and-dynamic_input_0dm2mkc._.js",
"language": "javascript",
"file_size": 1583,
"cut_index": 537,
"middle_length": 229
} |
new_dog)=>dog = new_dog
]);
let dog = 'dog';
;
}),
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/lib.js [test] (ecmascript) <internal part 1>", ((__turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d... | f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$basic$2d$tree$2d$shake$2f$import$2d$namespace$2f$input$2f$lib$2e$js__$5b$test$5d$__$28$ecmascript$29$__$3c$internal__part__0$3e$__["a"] += '!';
__TURBOPACK__imported__module__$5b$project$5 | 0$3e$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/input/lib.js [test] (ecmascript) <internal part 0>");
;
__TURBOPACK__imported__module__$5b$project$5d2 | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/import-namespace/output/0_9x_turbopack-tests_tests_snapshot_basic-tree-shake_import-namespace_input_1ippwh3._.js",
"language": "javascript",
"file_size": 16296,
"cut_index": 921,
"middle_length": 229
} |
|| (globalThis["TURBOPACK"] = [])).push(["output/1do3_crates_turbopack-tests_tests_snapshot_typescript_jsconfig-baseurl_input_0qbibqf._.js",
"[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/input/prop.js [test] (ecmascript)", ((__turbopack_context__) => {
"use strict";
__turbopack... | t$2f$prop$2e$js__$5b$test$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/turbopack/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/input/prop.js [test] (ecmascript)");
;
;
;
console.log(__TURBOPACK__imported__module__$5b$p | turbopack_context__) => {
"use strict";
__turbopack_context__.s([]);
var __TURBOPACK__imported__module__$5b$project$5d2f$turbopack$2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$typescript$2f$jsconfig$2d$baseurl$2f$inpu | {
"filepath": "turbopack/crates/turbopack-tests/tests/snapshot/typescript/jsconfig-baseurl/output/1do3_crates_turbopack-tests_tests_snapshot_typescript_jsconfig-baseurl_input_0qbibqf._.js",
"language": "javascript",
"file_size": 1758,
"cut_index": 537,
"middle_length": 229
} |
aaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | aaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaa | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/chunking/shared-chunks/input/b.js",
"language": "javascript",
"file_size": 5000,
"cut_index": 614,
"middle_length": 229
} |
{ named } from './module.js'
import {
nested,
nested2,
nested_with_identity,
nested_with_identity2,
double_nested,
double_nested2,
double_nested_with_identity,
double_nested_with_identity2,
} from './reexport.js'
it('support imports in shorthand properties', () => {
expect(def).toBe('default')
expe... | t',
named: 'named',
})
expect(double_nested).toStrictEqual({
nested: {
def: 'default',
named: 'named',
},
})
expect(double_nested2).toStrictEqual({
nested: {
def: 'default',
named: 'named',
},
})
expe | ' })
expect(nested2).toStrictEqual({ def: 'default', named: 'named' })
expect(nested_with_identity).toStrictEqual({
def: 'default',
named: 'named',
})
expect(nested_with_identity2).toStrictEqual({
def: 'defaul | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/basic/shorthand-props/input/index.js",
"language": "javascript",
"file_size": 1255,
"cut_index": 524,
"middle_length": 229
} |
om 'data:text/javascript,export var bar = 1234;'
import data from 'data:application/json,{ "foo": 1234 }'
import dataURLEncoded from 'data:application/json,%7B%20%22foo%22%3A%201234%20%7D'
import dataBase64Encoded from 'data:application/json;base64,eyAiZm9vIjogMTIzNCB9'
import 'data:text/css,body { color: red }'
import... | H0='
it('support data URL imports', () => {
expect(bar).toEqual(1234)
expect(data).toEqual({ foo: 1234 })
expect(dataURLEncoded).toEqual({ foo: 1234 })
expect(dataBase64Encoded).toEqual({ foo: 1234 })
expect(style.bar).toMatch(/bar/)
expect(st | 64,LmJhciB7IGJhY2tncm91bmQ6IHVybCgnLi9kYXJrLnN2ZycpI | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/data-url/basic/input/index.js",
"language": "javascript",
"file_size": 866,
"cut_index": 529,
"middle_length": 52
} |
ire(`./dir/${key}`)
const requireAdd = (key) => require('./dir/' + key)
const requireConcat = (key) => require('./dir/'.concat(key))
const importTemplate = (key) => import(`./dir/${key}`)
const importTemplateSuffix = (key) => import(`./dir/${key}.js`)
const importAdd = (key) => import('./dir/' + key)
const importAddSuf... | reTemplate('c.module.css')).toHaveProperty('class')
expect(requireTemplate('d.js')).toBe('d')
})
it('should support dynamic requests in require with addition', () => {
expect(requireAdd('a.js')).toBe(a)
expect(requireAdd('b.ts')).toBe(b)
expect(re | ingleSuffix = (key) => require(`./dir/${key}.ts`)
it('should support dynamic requests in require with template literals', () => {
expect(requireTemplate('a.js')).toBe(a)
expect(requireTemplate('b.ts')).toBe(b)
expect(requi | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/dynamic-requests/basic/input/index.js",
"language": "javascript",
"file_size": 4960,
"cut_index": 614,
"middle_length": 229
} |
=== 'function' && define.amd) {
// Should not be used, unresolvable
define(['./something-invalid'], factory)
} else if (typeof exports === 'object') {
// Should not be used
exports['my-lib'] = factory(require('./something-invalid'))
} else {
// Should not be used
root['my-lib'] = factory(roo... | ***/ return installedModules[moduleId].exports
/******/
}
/******/ // Create a new module (and put it into the cache)
/******/ var module = (installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
| {}
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if (installedModules[moduleId]) {
/*** | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/code-gen/typeof-exports-module/input/module-universal.js",
"language": "javascript",
"file_size": 5346,
"cut_index": 716,
"middle_length": 229
} |
rt { file1, file2, file3, file4, file5 } from 'package/dir'
it('should follow the alias field for a resolved file', () => {
expect(file1).toBe('file1')
})
it('should follow the alias field for a raw request', () => {
expect(file2).toBe('file2')
})
it('should follow the alias field for a resolved file without ./ ... | toBe('file5')
})
import { otherPackage, otherPackageSubPath } from 'package/dir'
it('should not cycle when following the alias field', () => {
expect(otherPackage).toBe('other-package/index')
expect(otherPackageSubPath).toBe('other-package/sub-path')
| dule request with subpath', () => {
expect(file5). | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/resolving/alias-field/input/index.js",
"language": "javascript",
"file_size": 827,
"cut_index": 516,
"middle_length": 52
} |
/dir/*.js')
it('should return a thunk for each matched file in lazy mode', async () => {
const keys = Object.keys(lazyModules).sort()
expect(keys).toEqual(['./dir/bar.js', './dir/foo.js'])
const foo = await lazyModules['./dir/foo.js']()
expect(foo.default).toBe('foo')
const bar = await lazyModules['./dir/b... | './dir/bar.js'].default).toBe('bar')
})
// Named import: each thunk resolves to a single named export
const namedModules = import.meta.glob('./dir/*.js', { import: 'default' })
it('should resolve to the named export when import option is set', async () = | e objects directly in eager mode', () => {
const keys = Object.keys(eagerModules).sort()
expect(keys).toEqual(['./dir/bar.js', './dir/foo.js'])
expect(eagerModules['./dir/foo.js'].default).toBe('foo')
expect(eagerModules[ | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/resolving/import-meta-glob/input/index.js",
"language": "javascript",
"file_size": 4325,
"cut_index": 614,
"middle_length": 229
} |
t client from './client#component'
import nofrag from './nofrag#frag'
import client2 from './client#component.js'
import nofrag2 from './nofrag.js#frag'
it('should resolve to a file with a fragment', () => {
expect(client).toBe('client#component')
})
it('should resolve to a file without a fragment', () => {
expec... | ).toBe('nofrag')
})
it('dynamic with fragments', async () => {
const helper = async (p) => {
return (await import('./' + p + '#frag')).default
}
expect(await helper('nofrag.js')).toBe('nofrag')
expect(await helper('nofrag')).toBe('nofrag')
})
| ent but with an extension', () => {
expect(nofrag2 | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/resolving/fragment/input/index.js",
"language": "javascript",
"file_size": 825,
"cut_index": 517,
"middle_length": 52
} |
equire(`pkg-${s}`)
}
function requireOrgPkg(s) {
return require(`@org/pkg-${s}`)
}
function requireExportsField(s) {
return require(`exports-${s}/foo`)
}
it('should correctly handle dynamic parts in regular package name', () => {
expect(requirePkg('a').default).toBe('pkg-a')
expect(requirePkg('b').default).toB... | kg-b')
expect(requireOrgPkg('c').default).toBe('org/pkg-c')
})
it('should correctly handle dynamic parts in regular package name with exports field', () => {
expect(requireExportsField('a').default).toBe('exports-a')
expect(requireExportsField('b').d | a')
expect(requireOrgPkg('b').default).toBe('org/p | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/resolving/dynamic-module/input/index.js",
"language": "javascript",
"file_size": 884,
"cut_index": 547,
"middle_length": 52
} |
}`)
}
function requireExact(s) {
return require(`pkg/exact-${s}`)
}
function requireWildcardSuffix(s) {
return require(`pkg/wildcard-suffix-${s}`)
}
function requireWildcard(s) {
return require(`pkg/wildcard-${s}`)
}
function requireExactAConstantSuffix(s) {
return require(`pkg/${s}exact-a`)
}
it('should corre... | pect(requireWildcardSuffix('b').default).toBe('b')
expect(requireWildcardSuffix('c').default).toBe('c')
})
it('should correctly handle dynamic requests into exports field (wildcard)', () => {
expect(requireWildcard('a').default).toBe('a')
expect(req | b').default).toBe('b')
expect(requireExact('c').default).toBe('c')
})
it('should correctly handle dynamic requests into exports field (wildcard with suffix)', () => {
expect(requireWildcardSuffix('a').default).toBe('a')
ex | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/resolving/exports-field-pattern/input/index.js",
"language": "javascript",
"file_size": 2138,
"cut_index": 563,
"middle_length": 229
} |
it('should not bundle the root level package', () => {
const modules = Array.from(__turbopack_modules__.keys())
expect(modules).toContainEqual(
expect.stringMatching(/input\/dir\/node_modules\/the-package\/index/)
)
expect(modules).not.toContainEqual(
expect.stringMatching(/input\/node_modules\/the-pa... | ect(modules).not.toContainEqual(
expect.stringMatching(/input\/node_modules\/package-with-exports\/b/)
)
expect(modules).not.toContainEqual(
expect.stringMatching(/input\/node_modules\/package-with-exports\/c/)
)
expect(modules).not.toConta | (modules).toContainEqual(
expect.stringMatching(/input\/node_modules\/package-with-exports\/a/)
)
expect(modules).not.toContainEqual(
expect.stringMatching(/input\/node_modules\/package-with-exports\/index/)
)
exp | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/resolving/no-same-key-alternatives/input/index.js",
"language": "javascript",
"file_size": 2497,
"cut_index": 563,
"middle_length": 229
} |
, () => {
expect(require.resolve('./resolved.js')).toBe(
'[project]/turbopack/crates/turbopack-tests/tests/execution/turbopack/resolving/require-resolve/input/resolved.js [test] (ecmascript)'
)
})
it('should support require.resolve with extensions', () => {
expect(require.resolve('./resolved')).toBe(
'[p... | )).toBe(
'[project]/turbopack/crates/turbopack-tests/tests/execution/turbopack/resolving/require-resolve/input/index.js [test] (ecmascript)'
)
// Check if static evaluation is not hanging
if (require.resolve('./index.js') == '') {
throw new E | dule', () => {
expect(require.resolve('./index.js' | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/resolving/require-resolve/input/index.js",
"language": "javascript",
"file_size": 887,
"cut_index": 547,
"middle_length": 52
} |
'as' option is not supported — should still produce a glob with defaults
const withAs = import.meta.glob('./dir/*.js', { as: 'raw' })
// Warning: non-constant eager — should default to lazy (eager: false)
const nonConstEager = import.meta.glob('./dir2/*.js', {
eager: Math.random() > -1,
})
// Warning: unknown optio... | default to lazy mode when eager is non-constant', () => {
const keys = Object.keys(nonConstEager).sort()
expect(keys).toEqual(['./dir2/qux.js'])
// Should be lazy (thunks), since non-constant eager defaults to false
expect(typeof nonConstEager['./ | ) => {
const keys = Object.keys(withAs).sort()
expect(keys).toEqual(['./dir/bar.js', './dir/foo.js'])
// Should be lazy (thunks), since `as` is ignored
expect(typeof withAs['./dir/foo.js']).toBe('function')
})
it('should | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/resolving/import-meta-glob-warnings/input/index.js",
"language": "javascript",
"file_size": 1304,
"cut_index": 524,
"middle_length": 229
} |
lass.js'
import * as liveExports from './live_exports.js'
import * as constDefaultExportFunction from './const_default_export_function.js'
it('hoisted declarations are live', () => {
expect(liveExports.bar()).toBe('bar')
liveExports.setBar(() => 'patched')
expect(liveExports.bar()).toBe('patched')
})
it('defaul... | ts.setDefaultFunction(() => 'patched')
expect(liveExports.default()).toBe('patched')
})
it('exported lets are live', () => {
expect(liveExports.foo).toBe('foo')
liveExports.setFoo('new')
expect(liveExports.foo).toBe('new')
})
it('exported binding | return 'patched'
}
}
)
expect(liveDefaultClass.default.default()).toBe('patched')
})
it('default function export declarations are live', () => {
expect(liveExports.default()).toBe('defaultFunction')
liveExpor | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/exports/live/input/index.js",
"language": "javascript",
"file_size": 2081,
"cut_index": 563,
"middle_length": 229
} |
a, foo, bar, fooViaSelf, barViaSelf, nestedSelfFoo } from './data'
import * as DataNs from './data'
import {
Data as ChainedData,
foo as chainedFoo,
bar as chainedBar,
} from './reexport'
it('should re-export own namespace correctly', () => {
expect(Data.foo()).toBe('foo')
expect(Data.bar()).toBe('bar')
})
... | ('foo')
expect(Data.Data.Data.bar()).toBe('bar')
})
it('should expose the same self-namespace via a star-namespace import', () => {
expect(DataNs.Data).toBe(Data)
expect(DataNs.Data.foo).toBe(foo)
})
it('should re-export the self-namespace through | ule', () => {
expect(fooViaSelf()).toBe('foo')
expect(barViaSelf()).toBe('bar')
expect(nestedSelfFoo()).toBe('foo')
})
it('should let the self-namespace reference itself recursively', () => {
expect(Data.Data.foo()).toBe | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/exports/self-reexport-star/input/index.js",
"language": "javascript",
"file_size": 1416,
"cut_index": 524,
"middle_length": 229
} |
const os = require('os')
const path = require('path')
function writeChunk(filePath, chunkModules) {
fs.writeFileSync(filePath, `module.exports = ${chunkModules};\n`)
}
it('reuses the existing group factory for missing IDs', () => {
const repoRoot = path.resolve(process.cwd(), '../../../../../../../..')
const ru... | actory-group-'))
try {
const firstChunk = path.join(tempDir, 'first.js')
const mixedChunk = path.join(tempDir, 'mixed.js')
writeChunk(
firstChunk,
`[
${JSON.stringify(moduleA)},
function (__turbopack_context__, mo | ')(runtimePath)
const suffix = `${Date.now()}-${Math.random().toString(16).slice(2)}`
const moduleA = `module-a-${suffix}`
const moduleB = `module-b-${suffix}`
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'tp-f | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/runtime/factory-group-existing-factory/input/index.js",
"language": "javascript",
"file_size": 1637,
"cut_index": 537,
"middle_length": 229
} |
'package/dep2.js'
import { something3 } from 'package-directive/dep.js'
it('should not include a module that is side effect free and exports are not used due to static analysis', () => {
const modules = Array.from(__turbopack_modules__.keys())
expect(modules).toContainEqual(
expect.stringMatching(/input\/node_... | is side effect free via directive and exports are not used due to static analysis', () => {
const modules = Array.from(__turbopack_modules__.keys())
expect(modules).not.toContainEqual(
expect.stringMatching(/input\/node_modules\/package-directive\/ | omething()
})
it('should not include a module that | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/side-effects-optimization/comptime/input/index.js",
"language": "javascript",
"file_size": 954,
"cut_index": 582,
"middle_length": 52
} |
rect facade from async modules', async () => {
expect(await import('tla/local')).toEqual(
expect.objectContaining({
tla: 'tla',
reexported: 'reexported',
reexported2: 'reexported',
})
)
expect(await import('tla/reexport')).toEqual(
expect.objectContaining({
local: 'local',
... | amespace object from async modules', async () => {
expect(tlaLocal).toEqual(
expect.objectContaining({
tla: 'tla',
reexported: 'reexported',
reexported2: 'reexported',
})
)
expect(tlaReexport).toEqual(
expect.objectConta | orted: 'tla-reexported',
tlaReexported2: 'tla-reexported',
})
)
})
import * as tlaLocal from 'tla/local'
import * as tlaReexport from 'tla/reexport'
import * as tlaBoth from 'tla/both'
it('should generate a correct n | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/side-effects-optimization/tla/input/index.js",
"language": "javascript",
"file_size": 1618,
"cut_index": 537,
"middle_length": 229
} |
nst bool = true
if (bool) {
count++
} else {
throw Error('this branch is not taken')
}
})
it('handles static expression', () => {
let bool = false
bool = true
if (bool) {
count++
} else {
throw Error('this branch is not taken')
}
})
it('handles dynamic d... | }
})
})
describe('Object Patterns', () => {
it('handles static declaration', () => {
const { bool } = {
bool: true,
}
if (bool) {
count++
} else {
throw Error('this branch is not taken')
}
})
it('handles | })
it('handles dynamic expression', () => {
function dynamic() {
return true
}
let bool = false
bool = dynamic()
if (bool) {
count++
} else {
throw Error('this branch is not taken')
| {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/side-effects-optimization/assignment/input/index.js",
"language": "javascript",
"file_size": 3797,
"cut_index": 614,
"middle_length": 229
} |
package-reexport-side-effect'
import { effects as effects6 } from 'package-reexport-side-effect/check-side-effect'
it('should run side effects of a reexporting module with side effects', () => {
expect(a6).toBe('a')
expect(effects6).toEqual(['side-effect.js', 'side-effect2.js', 'index.js'])
})
import { a as a7 } f... | ld run side effects of a reexporting module with side effects (async modules)', () => {
expect(effects8).toEqual([])
require('package-require-side-effect')
expect(effects8).toEqual(['side-effect.js', 'side-effect2.js', 'index.js'])
})
import { a as | fects (async modules)', () => {
expect(a7).toBe('a')
expect(effects7).toEqual(['side-effect.js', 'side-effect2.js', 'index.js'])
})
import { effects as effects8 } from 'package-require-side-effect/check-side-effect'
it('shou | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/side-effects-optimization/reexport-side-effects/input/index.js",
"language": "javascript",
"file_size": 1838,
"cut_index": 537,
"middle_length": 229
} |
, c as c1 } from './side-effects/reexport-internal.js'
const cases = {
'async module with side effects via dynamic import': () =>
import('./side-effects/reexport-internal.js'),
'async module with side effects via esm import': async () =>
(await import('./side-effects/reexport-internal-test.js')).default,
... | quire': () =>
require('./side-effect-free/reexport-internal.js'),
'module with externals with side effects via dynamic import': () =>
import('./side-effects/reexport-external.js'),
'module with externals with side effects via esm import': async | effect-free/reexport-internal.js'),
'async module flagged side-effect-free via esm import': async () =>
(await import('./side-effect-free/reexport-internal-test.js')).default,
'async module flagged side-effect-free via re | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/async-modules/async-reexport-side-effects-split/input/index.js",
"language": "javascript",
"file_size": 1875,
"cut_index": 537,
"middle_length": 229
} |
ort() doesn't care about whether a module is an async module or not
const UserApi = import('./UserAPI.js')
export const CreateUserAction = async (name) => {
console.log('Creating user', name)
// These are normal awaits, because they are in an async function
const { createUser } = await UserApi
return await cre... | see AlternativeCreateUserAction below
// Here: Connecting to the DB starts when AlternativeCreateUserAction
// is called
export const AlternativeCreateUserAction = async (name) => {
const { createUser } = await import('./UserAPI.js')
return | necting to the DB starts when the application starts
// Placing it inside of an (async) function will start loading
// and evaluating when the function is called for the first time
// which basically makes it lazy-loaded.
// | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/async-modules/top-level-await/input/Actions.js",
"language": "javascript",
"file_size": 1165,
"cut_index": 518,
"middle_length": 229
} |
ould handle bound function expressions', function (done) {
require.ensure(
[],
function (require) {
expect(this).toEqual({ test: true })
require('./empty?test')
expect(process.nextTick).toBeTypeOf('function') // check if injection still works
require.ensure(
[],
functio... | on () {
expect(require('./empty?require.ensure:test')).toEqual({})
return function f() {
done()
}
})()
)
})
it('should accept an already included module', function (done) {
if (Math.random() < 0) require('./require.includ | expression', function (done) {
function f() {
done()
}
require.ensure([], f)
})
it("should parse expression in require.ensure, which isn't a function expression", function (done) {
require.ensure(
[],
(functi | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/chunks/__skipped__/parsing/input/index.js",
"language": "javascript",
"file_size": 1246,
"cut_index": 518,
"middle_length": 229
} |
sync = true
load('one', 1, function () {
expect(sync).toBe(false)
load('three', 3, function () {
var sync = true
load('two', 2, function () {
expect(sync).toBe(true)
done()
})
Promise.resolve()
.then(function () {})
.then(function ... | load(name, expected, callback) {
import('./dir/' + name)
.then(function (result) {
expect(result).toEqual(
nsObj({
default: expected,
})
)
callback()
})
.catch(function (err) {
| expressions in import', function (done) {
function | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/chunks/__skipped__/import-context/input/index.js",
"language": "javascript",
"file_size": 947,
"cut_index": 582,
"middle_length": 52
} |
nction (require) {
require('./empty?a')
require('./empty?b')
testLoad()
sync = true
process.nextTick(function () {
sync = false
})
},
'named-chunk'
)
function testLoad() {
require.ensure(
[],
function (require) {
require('./empty?c')
... | y-named-chunk'
)
sync = true
setImmediate(function () {
sync = false
})
})
it('should handle named chunks when there is an error callback', function (done) {
var sync = false
require.ensure(
[],
function (require) {
require(' | require.ensure(
[],
function (require) {
expect(sync).toBeTruthy()
},
'empty-named-chunk'
)
require.ensure(
[],
function (require) {
expect(sync).toBeTruthy()
done()
},
'empt | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/chunks/__skipped__/named-chunks/input/index.js",
"language": "javascript",
"file_size": 3948,
"cut_index": 614,
"middle_length": 229
} |
t */
it('should handle duplicate chunks', function (done) {
var firstOne = false,
secondOne = false
require.ensure([], function (require) {
require('./acircular')
require('./duplicate')
require('./duplicate2')
firstOne = true
if (secondOne) done()
})
require.ensure([], function (require)... | done(e)
}
})
Promise.resolve()
.then(function () {})
.then(function () {})
.then(function () {
asyncFlag = true
})
function loadChunk() {
var sync = true
require.ensure(['./empty?x', './empty?y'], function (require) | already loaded one', function (done) {
var asyncFlag = false
require.ensure(['./empty?x', './empty?y', './empty?z'], function (require) {
try {
expect(asyncFlag).toBe(true)
loadChunk()
} catch (e) {
| {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/chunks/__skipped__/runtime/input/index.js",
"language": "javascript",
"file_size": 1262,
"cut_index": 524,
"middle_length": 229
} |
ould not bundle context requires with asyncMode === 'weak'", function () {
var contextRequire = require.context('.', false, /two/, 'weak')
expect(function () {
contextRequire('./two')
}).toThrowError(/not available/)
})
it("should not bundle context requires with asyncMode === 'weak' using import.meta.webpac... | ree')).toBe(3)
require('./three') // in a real app would be served as a separate chunk
})
it("should find module with asyncMode === 'weak' when required elsewhere (recursive)", function () {
var contextRequire = require.context('.', true, /.+/, 'weak' | /two')
}).toThrowError(/not available/)
})
it("should find module with asyncMode === 'weak' when required elsewhere", function () {
var contextRequire = require.context('.', false, /.+/, 'weak')
expect(contextRequire('./th | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/chunks/__skipped__/context-weak/input/index.js",
"language": "javascript",
"file_size": 1132,
"cut_index": 518,
"middle_length": 229
} |
e able to use lazy-once mode', function () {
function load(name) {
return import(/* webpackMode: "lazy-once" */ './dir2/' + name)
}
return testChunkLoading(load, false, true)
})
it('should be able to use lazy-once mode with name', function () {
function load(name) {
return import(
/* webpackMode:... | urn import(
/* webpackMode: "lazy", webpackChunkName: "name-lazy" */ './dir5/' + name
)
}
return testChunkLoading(load, false, false)
})
it('should be able to use lazy mode with name and placeholder', function () {
function load(name) {
| nction load(name) {
return import(/* webpackMode: "lazy" */ './dir4/' + name)
}
return testChunkLoading(load, false, false)
})
it('should be able to use lazy mode with name', function () {
function load(name) {
ret | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/chunks/__skipped__/inline-options/input/index.js",
"language": "javascript",
"file_size": 6370,
"cut_index": 716,
"middle_length": 229
} |
ORT, EXPORT2, EXPORT3, EXPORT4, EXPORT5, EXPORT6 } from './inner'
export function f1() {
// no using EXPORT
}
export function f2() {
return EXPORT
}
function f3() {
return EXPORT
}
const f4 = function () {
return EXPORT
}
const f5 = () => {
return EXPORT
}
let f6 = () => {
return EXPORT
}
const f7 = ... | ()
const pure3 = /*#__PURE__*/ g5()
const pure4 = /*#__PURE__*/ f7(f8())
const pure5 =
('fefef', 1123, /*#__PURE__*/ f2('fwefe'), /*#__PURE__*/ f2('efwefa'))
const pure6 = /*#__PURE__*/ f2(/*#__PURE__*/ f2(), /*#__PURE__*/ f2())
const pure7 = /*#__PURE__ | = () => {
return f5()
}
function ga6() {
return f6() || gb6()
}
function gb6() {
return ga6()
}
export class g7 {
static f() {
return EXPORT
}
}
export const pure1 = EXPORT
export const pure2 = /*#__PURE__*/ f6 | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/inner-graph/__skipped__/simple/input/module.js",
"language": "javascript",
"file_size": 1386,
"cut_index": 524,
"middle_length": 229
} |
sion,
LogicalExpression,
} from './dep2?decl'
import {
A3,
B3,
C3,
D3,
E3,
F3,
Pure3,
ConditionalExpression3,
LogicalExpression3,
} from './dep3?decl'
export class A1 extends A {
render() {
return new A2()
}
}
export class B1 extends B {
render() {
return new B2()
}
}
// prettier-... | tic prop = 42
static a = foo(this).prop
static b = foo(Bar).prop
static c = foo(super.Bar).prop
static inStatic1
static inStatic2
static inStatic3
static {
this.inStatic1 = new Bar().prop
this.inStatic2 = new super.Bar().prop
this |
export class E1 extends getE() {
render() {
return new E2()
}
}
export class F1 extends getF() {
render() {
return new F2()
}
}
function foo(instance) {
return new instance()
}
class Bar extends Foo {
sta | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/inner-graph/__skipped__/extend-class2/input/dep-decl.js",
"language": "javascript",
"file_size": 3216,
"cut_index": 614,
"middle_length": 229
} |
,
B,
DateFormatter,
getC,
getD,
getE,
getF,
Pure,
ConditionalExpression,
LogicalExpression,
} from './dep2?expr'
import { A3, B3, C3, D3, E3, F3, Pure3 } from './dep3?expr'
export const A1 = class extends A {
render() {
return new A2()
}
}
export const B1 = class extends B {
render() {
... | ExtendsPure = class extends Pure {
render() {
return new Pure3()
}
}
export class DateBar extends DateFormatter {
constructor() {
super()
}
render() {}
}
export class ConditionalExpression1 extends ConditionalExpression {
render() {
| URE__*/ getD() {
render() {
return new D2();
}
}
export const E1 = class extends getE() {
render() {
return new E2()
}
}
export const F1 = class extends getF() {
render() {
return new F2()
}
}
export const | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/inner-graph/__skipped__/extend-class2/input/dep-expr.js",
"language": "javascript",
"file_size": 1399,
"cut_index": 524,
"middle_length": 229
} |
A {}
export class B {}
export const getC = () => class C {}
export const getD = () => class D {}
export const getE = () => class E {}
export const getF = () => class F {}
export class Foo {
static Bar = Foo
}
export class Pure {}
export class DateFormatter extends Date {
constructor() {
super()
this.date =... | = __webpack_exports_info__.getE.used
export const exportsInfoForF = __webpack_exports_info__.getF.used
export const exportsInfoForFoo = __webpack_exports_info__.Foo.used
export const exportsInfoForPure = __webpack_exports_info__.Pure.used
export const exp | .used
export const exportsInfoForB = __webpack_exports_info__.B.used
export const exportsInfoForC = __webpack_exports_info__.getC.used
export const exportsInfoForD = __webpack_exports_info__.getD.used
export const exportsInfoForE | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/inner-graph/__skipped__/extend-class2/input/dep2.js",
"language": "javascript",
"file_size": 1284,
"cut_index": 524,
"middle_length": 229
} |
orB as declB,
exportsInfoForC as declC,
exportsInfoForD as declD,
exportsInfoForE as declE,
exportsInfoForF as declF,
exportsInfoForFoo as declFoo,
exportsInfoForPure as declPure,
exportsInfoForDateFormatter as declDateFormatter,
exportsInfoForConditionalExpression as declConditionalExpression,
export... | ogicalExpression as exprLogicalExpression,
} from './dep2?expr'
it('should load module correctly', () => {
require('./module-decl')
require('./module-expr')
})
it('A should be used', () => {
expect(declA).toBe(true)
expect(exprA).toBe(true)
})
i | ,
exportsInfoForE as exprE,
exportsInfoForF as exprF,
exportsInfoForPure as exprPure,
exportsInfoForDateFormatter as exprDateFormatter,
exportsInfoForConditionalExpression as exprConditionalExpression,
exportsInfoForL | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/webpack/inner-graph/__skipped__/extend-class2/input/index.js",
"language": "javascript",
"file_size": 2103,
"cut_index": 563,
"middle_length": 229
} |
aaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | aaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaa | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/chunking/shared-chunks/input/d.js",
"language": "javascript",
"file_size": 5000,
"cut_index": 614,
"middle_length": 229
} |
aaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | aaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'aaaaaaaaa | {
"filepath": "turbopack/crates/turbopack-tests/tests/execution/turbopack/chunking/shared-chunks/input/f.js",
"language": "javascript",
"file_size": 5000,
"cut_index": 614,
"middle_length": 229
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.