From 447a3e7ce90b00601213c3e6cf2546a9b69690b1 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Thu, 19 Dec 2024 21:43:05 +0100 Subject: [PATCH] chore(rust snaps): change default name to src also make srcDir an empty string, it's unused this reflects actual use but changes all hashes, therefore putting in separate commit --- .../snapshots/qwik_core__test__example_1.snap | 86 ++-- .../snapshots/qwik_core__test__example_2.snap | 74 ++-- .../snapshots/qwik_core__test__example_3.snap | 58 +-- .../snapshots/qwik_core__test__example_4.snap | 58 +-- .../snapshots/qwik_core__test__example_5.snap | 78 ++-- .../snapshots/qwik_core__test__example_6.snap | 22 +- .../snapshots/qwik_core__test__example_7.snap | 94 ++--- .../snapshots/qwik_core__test__example_8.snap | 52 +-- .../snapshots/qwik_core__test__example_9.snap | 30 +- ...qwik_core__test__example_build_server.snap | 22 +- ...k_core__test__example_capture_imports.snap | 80 ++-- ...ore__test__example_capturing_fn_class.snap | 86 ++-- .../qwik_core__test__example_class_name.snap | 32 +- ...est__example_custom_inlined_functions.snap | 166 ++++---- .../qwik_core__test__example_dead_code.snap | 32 +- ...est__example_derived_signals_children.snap | 16 +- ...re__test__example_derived_signals_cmp.snap | 10 +- ...ple_derived_signals_complext_children.snap | 12 +- ...re__test__example_derived_signals_div.snap | 10 +- ...ple_derived_signals_multiple_children.snap | 10 +- .../qwik_core__test__example_dev_mode.snap | 86 ++-- ..._core__test__example_dev_mode_inlined.snap | 18 +- ...core__test__example_drop_side_effects.snap | 112 +++--- ...st__example_explicit_ext_no_transpile.snap | 80 ++-- ..._test__example_explicit_ext_transpile.snap | 92 ++--- ...qwik_core__test__example_export_issue.snap | 62 +-- ...e__test__example_functional_component.snap | 34 +- ..._test__example_functional_component_2.snap | 110 +++--- ...le_functional_component_capture_props.snap | 154 ++++---- ...core__test__example_getter_generation.snap | 54 +-- ...ore__test__example_immutable_analysis.snap | 186 ++++----- ...example_immutable_function_components.snap | 10 +- ..._core__test__example_import_assertion.snap | 22 +- ..._test__example_inlined_entry_strategy.snap | 12 +- .../qwik_core__test__example_input_bind.snap | 14 +- ...ore__test__example_invalid_references.snap | 86 ++-- ...__test__example_invalid_segment_expr1.snap | 94 ++--- .../qwik_core__test__example_issue_33443.snap | 14 +- .../qwik_core__test__example_issue_4438.snap | 10 +- .../qwik_core__test__example_jsx.snap | 50 +-- ...core__test__example_jsx_import_source.snap | 22 +- .../qwik_core__test__example_jsx_keyed.snap | 28 +- ...wik_core__test__example_jsx_listeners.snap | 372 +++++++++--------- ..._test__example_lightweight_functional.snap | 136 +++---- ...wik_core__test__example_manual_chunks.snap | 236 +++++------ ...mple_missing_custom_inlined_functions.snap | 8 +- ...wik_core__test__example_multi_capture.snap | 134 +++---- ..._core__test__example_mutable_children.snap | 78 ++-- ...wik_core__test__example_noop_dev_mode.snap | 46 +-- ...ore__test__example_of_synchronous_qrl.snap | 34 +- ...test__example_optimization_issue_3542.snap | 8 +- ...test__example_optimization_issue_3561.snap | 6 +- ...test__example_optimization_issue_3795.snap | 8 +- ...test__example_optimization_issue_4386.snap | 6 +- ...re__test__example_parsed_inlined_qrls.snap | 6 +- ...ore__test__example_preserve_filenames.snap | 10 +- ...__example_preserve_filenames_segments.snap | 78 ++-- .../qwik_core__test__example_prod_node.snap | 110 +++--- ...ore__test__example_props_optimization.snap | 22 +- ...wik_core__test__example_qwik_conflict.snap | 180 ++++----- ...__test__example_reg_ctx_name_segments.snap | 12 +- ...example_reg_ctx_name_segments_hoisted.snap | 16 +- ...example_reg_ctx_name_segments_inlined.snap | 10 +- ...k_core__test__example_renamed_exports.snap | 54 +-- .../qwik_core__test__example_server_auth.snap | 76 ++-- ...ik_core__test__example_skip_transform.snap | 6 +- .../qwik_core__test__example_spread_jsx.snap | 26 +- ...e__test__example_strip_exports_unused.snap | 22 +- ...ore__test__example_strip_exports_used.snap | 82 ++-- ...core__test__example_strip_server_code.snap | 222 +++++------ ...ore__test__example_transpile_jsx_only.snap | 78 ++-- ...core__test__example_transpile_ts_only.snap | 8 +- .../qwik_core__test__example_ts_enums.snap | 24 +- ...re__test__example_ts_enums_issue_1341.snap | 24 +- ...__test__example_ts_enums_no_transpile.snap | 22 +- ...core__test__example_use_client_effect.snap | 108 ++--- ..._core__test__example_use_optimization.snap | 6 +- ..._core__test__example_use_server_mount.snap | 236 +++++------ .../qwik_core__test__example_with_style.snap | 56 +-- ...qwik_core__test__example_with_tagname.snap | 56 +-- .../qwik_core__test__impure_template_fns.snap | 44 +-- .../snapshots/qwik_core__test__issue_150.snap | 108 ++--- .../snapshots/qwik_core__test__issue_476.snap | 4 +- .../qwik_core__test__issue_5008.snap | 54 +-- .../snapshots/qwik_core__test__issue_964.snap | 24 +- .../qwik_core__test__lib_mode_fn_signal.snap | 86 ++-- .../qwik_core__test__special_jsx.snap | 4 +- packages/qwik/src/optimizer/core/src/test.rs | 6 +- 88 files changed, 2665 insertions(+), 2665 deletions(-) diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_1.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_1.snap index a3b33627e15..ed1c3ad649f 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_1.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_1.snap @@ -19,55 +19,61 @@ const renderHeader = component($(() => { return render; })); -============================= test.tsx_renderHeader_zBbHWn4e8Cg.tsx (ENTRY POINT)== +============================= src/test.tsx_renderHeader_div_onClick_RmPxSgNTdBU.tsx (ENTRY POINT)== -import { qrl } from "@builder.io/qwik"; -export const renderHeader_zBbHWn4e8Cg = ()=>{ - return
import("./test.tsx_renderHeader_div_onClick_fV2uzAL99u4"), "renderHeader_div_onClick_fV2uzAL99u4")}/>; -}; +export const renderHeader_div_onClick_RmPxSgNTdBU = (ctx)=>console.log(ctx); export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";wCAG8B;IAC1B,QACK,IAAI;AAEb\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"oDAKwB,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "renderHeader_zBbHWn4e8Cg", + "origin": "src/test.tsx", + "name": "renderHeader_div_onClick_RmPxSgNTdBU", "entry": null, - "displayName": "test.tsx_renderHeader", - "hash": "zBbHWn4e8Cg", - "canonicalFilename": "test.tsx_renderHeader_zBbHWn4e8Cg", - "path": "", + "displayName": "test.tsx_renderHeader_div_onClick", + "hash": "RmPxSgNTdBU", + "canonicalFilename": "test.tsx_renderHeader_div_onClick_RmPxSgNTdBU", + "path": "src", "extension": "tsx", - "parent": null, + "parent": "renderHeader_eHcyUclS5KI", "ctxKind": "function", "ctxName": "$", "captures": false, "loc": [ - 92, - 175 + 137, + 162 ] } */ -============================= test.tsx_renderHeader_component_U6Kkv07sbpQ.tsx (ENTRY POINT)== +============================= src/test.tsx == + +import { qrl } from "@builder.io/qwik"; +import { component } from '@builder.io/qwik'; +export const renderHeader = /*#__PURE__*/ qrl(()=>import("./test.tsx_renderHeader_eHcyUclS5KI"), "renderHeader_eHcyUclS5KI"); +const renderHeader = component(/*#__PURE__*/ qrl(()=>import("./test.tsx_renderHeader_component_SM17Ed4qLDw"), "renderHeader_component_SM17Ed4qLDw")); + -export const renderHeader_component_U6Kkv07sbpQ = ()=>{ +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";AACA,SAAY,SAAS,QAAkB,mBAAmB;AAE1D,OAAO,MAAM,gHAIV;AACH,MAAM,eAAe\"}") +============================= src/test.tsx_renderHeader_component_SM17Ed4qLDw.tsx (ENTRY POINT)== + +export const renderHeader_component_SM17Ed4qLDw = ()=>{ console.log("mount"); return render; }; export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"kDAQiC;IAC/B,QAAQ,GAAG,CAAC;IACZ,OAAO;AACT\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"kDAQiC;IAC/B,QAAQ,GAAG,CAAC;IACZ,OAAO;AACT\"}") /* { - "origin": "test.tsx", - "name": "renderHeader_component_U6Kkv07sbpQ", + "origin": "src/test.tsx", + "name": "renderHeader_component_SM17Ed4qLDw", "entry": null, "displayName": "test.tsx_renderHeader_component", - "hash": "U6Kkv07sbpQ", - "canonicalFilename": "test.tsx_renderHeader_component_U6Kkv07sbpQ", - "path": "", + "hash": "SM17Ed4qLDw", + "canonicalFilename": "test.tsx_renderHeader_component_SM17Ed4qLDw", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -79,39 +85,33 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx == +============================= src/test.tsx_renderHeader_eHcyUclS5KI.tsx (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; -import { component } from '@builder.io/qwik'; -export const renderHeader = /*#__PURE__*/ qrl(()=>import("./test.tsx_renderHeader_zBbHWn4e8Cg"), "renderHeader_zBbHWn4e8Cg"); -const renderHeader = component(/*#__PURE__*/ qrl(()=>import("./test.tsx_renderHeader_component_U6Kkv07sbpQ"), "renderHeader_component_U6Kkv07sbpQ")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";AACA,SAAY,SAAS,QAAkB,mBAAmB;AAE1D,OAAO,MAAM,gHAIV;AACH,MAAM,eAAe\"}") -============================= test.tsx_renderHeader_div_onClick_fV2uzAL99u4.tsx (ENTRY POINT)== - -export const renderHeader_div_onClick_fV2uzAL99u4 = (ctx)=>console.log(ctx); +export const renderHeader_eHcyUclS5KI = ()=>{ + return
import("./test.tsx_renderHeader_div_onClick_RmPxSgNTdBU"), "renderHeader_div_onClick_RmPxSgNTdBU")}/>; +}; export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"oDAKwB,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";wCAG8B;IAC1B,QACK,IAAI;AAEb\"}") /* { - "origin": "test.tsx", - "name": "renderHeader_div_onClick_fV2uzAL99u4", + "origin": "src/test.tsx", + "name": "renderHeader_eHcyUclS5KI", "entry": null, - "displayName": "test.tsx_renderHeader_div_onClick", - "hash": "fV2uzAL99u4", - "canonicalFilename": "test.tsx_renderHeader_div_onClick_fV2uzAL99u4", - "path": "", + "displayName": "test.tsx_renderHeader", + "hash": "eHcyUclS5KI", + "canonicalFilename": "test.tsx_renderHeader_eHcyUclS5KI", + "path": "src", "extension": "tsx", - "parent": "renderHeader_zBbHWn4e8Cg", + "parent": null, "ctxKind": "function", "ctxName": "$", "captures": false, "loc": [ - 137, - 162 + 92, + 175 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_2.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_2.snap index 2f83708d077..f9491cf7759 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_2.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_2.snap @@ -15,68 +15,68 @@ export const Header = component$(() => { ); }); -============================= test.tsx_Header_component_J4uyIhaBNR4.tsx (ENTRY POINT)== +============================= src/test.tsx == +import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Header_component_J4uyIhaBNR4 = ()=>{ - console.log("mount"); - return
import("./test.tsx_Header_component_div_onClick_i7ekvWH3674"), "Header_component_div_onClick_i7ekvWH3674")}/>; -}; +export const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_oO0vQsEtDrk"), "Header_component_oO0vQsEtDrk")); + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,OAAO,MAAM,uBAAS,uHAKnB\"}") +============================= src/test.tsx_Header_component_div_onClick_zsv4eSExDyc.tsx (ENTRY POINT)== -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAEiC;IAC7B,QAAQ,GAAG,CAAC;IACZ,QACK,IAAI;AAEb\"}") +export const Header_component_div_onClick_zsv4eSExDyc = (ctx)=>console.log(ctx); +export { _hW } from "@builder.io/qwik"; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAKwB,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Header_component_J4uyIhaBNR4", + "origin": "src/test.tsx", + "name": "Header_component_div_onClick_zsv4eSExDyc", "entry": null, - "displayName": "test.tsx_Header_component", - "hash": "J4uyIhaBNR4", - "canonicalFilename": "test.tsx_Header_component_J4uyIhaBNR4", - "path": "", + "displayName": "test.tsx_Header_component_div_onClick", + "hash": "zsv4eSExDyc", + "canonicalFilename": "test.tsx_Header_component_div_onClick_zsv4eSExDyc", + "path": "src", "extension": "tsx", - "parent": null, + "parent": "Header_component_oO0vQsEtDrk", "ctxKind": "function", - "ctxName": "component$", + "ctxName": "$", "captures": false, "loc": [ - 85, - 194 + 156, + 181 ] } */ -============================= test.tsx == +============================= src/test.tsx_Header_component_oO0vQsEtDrk.tsx (ENTRY POINT)== -import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_J4uyIhaBNR4"), "Header_component_J4uyIhaBNR4")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,OAAO,MAAM,uBAAS,uHAKnB\"}") -============================= test.tsx_Header_component_div_onClick_i7ekvWH3674.tsx (ENTRY POINT)== - -export const Header_component_div_onClick_i7ekvWH3674 = (ctx)=>console.log(ctx); -export { _hW } from "@builder.io/qwik"; +export const Header_component_oO0vQsEtDrk = ()=>{ + console.log("mount"); + return
import("./test.tsx_Header_component_div_onClick_zsv4eSExDyc"), "Header_component_div_onClick_zsv4eSExDyc")}/>; +}; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAKwB,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAEiC;IAC7B,QAAQ,GAAG,CAAC;IACZ,QACK,IAAI;AAEb\"}") /* { - "origin": "test.tsx", - "name": "Header_component_div_onClick_i7ekvWH3674", + "origin": "src/test.tsx", + "name": "Header_component_oO0vQsEtDrk", "entry": null, - "displayName": "test.tsx_Header_component_div_onClick", - "hash": "i7ekvWH3674", - "canonicalFilename": "test.tsx_Header_component_div_onClick_i7ekvWH3674", - "path": "", + "displayName": "test.tsx_Header_component", + "hash": "oO0vQsEtDrk", + "canonicalFilename": "test.tsx_Header_component_oO0vQsEtDrk", + "path": "src", "extension": "tsx", - "parent": "Header_component_J4uyIhaBNR4", + "parent": null, "ctxKind": "function", - "ctxName": "$", + "ctxName": "component$", "captures": false, "loc": [ - 156, - 181 + 85, + 194 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_3.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_3.snap index 4f4ed4ac3c1..7d2ac146e53 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_3.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_3.snap @@ -18,25 +18,25 @@ export const App = () => { return Header; }); -============================= test.tsx_App_Header_component_B9F3YeqcO1w.tsx (ENTRY POINT)== +============================= src/test.tsx_App_Header_component_LGSPR1gzfBQ.tsx (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; -export const App_Header_component_B9F3YeqcO1w = ()=>{ +export const App_Header_component_LGSPR1gzfBQ = ()=>{ console.log("mount"); - return
import("./test.tsx_App_Header_component_div_onClick_aO7uI7Iw6oQ"), "App_Header_component_div_onClick_aO7uI7Iw6oQ")}/>; + return
import("./test.tsx_App_Header_component_div_onClick_YyrivfnN9jQ"), "App_Header_component_div_onClick_YyrivfnN9jQ")}/>; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";gDAG8B;IACtB,QAAQ,GAAG,CAAC;IACZ,QACK,IAAI;AAEb\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";gDAG8B;IACtB,QAAQ,GAAG,CAAC;IACZ,QACK,IAAI;AAEb\"}") /* { - "origin": "test.tsx", - "name": "App_Header_component_B9F3YeqcO1w", + "origin": "src/test.tsx", + "name": "App_Header_component_LGSPR1gzfBQ", "entry": null, "displayName": "test.tsx_App_Header_component", - "hash": "B9F3YeqcO1w", - "canonicalFilename": "test.tsx_App_Header_component_B9F3YeqcO1w", - "path": "", + "hash": "LGSPR1gzfBQ", + "canonicalFilename": "test.tsx_App_Header_component_LGSPR1gzfBQ", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -48,24 +48,35 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_Header_component_div_onClick_aO7uI7Iw6oQ.tsx (ENTRY POINT)== +============================= src/test.tsx == -export const App_Header_component_div_onClick_aO7uI7Iw6oQ = (ctx)=>console.log(ctx); +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const App = ()=>{ + const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_Header_component_LGSPR1gzfBQ"), "App_Header_component_LGSPR1gzfBQ")); + return Header; +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,OAAO,MAAM,MAAM;IACf,MAAM,uBAAS;IAMf,OAAO;AACX,EAAG\"}") +============================= src/test.tsx_App_Header_component_div_onClick_YyrivfnN9jQ.tsx (ENTRY POINT)== + +export const App_Header_component_div_onClick_YyrivfnN9jQ = (ctx)=>console.log(ctx); export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"4DAM4B,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"4DAM4B,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "App_Header_component_div_onClick_aO7uI7Iw6oQ", + "origin": "src/test.tsx", + "name": "App_Header_component_div_onClick_YyrivfnN9jQ", "entry": null, "displayName": "test.tsx_App_Header_component_div_onClick", - "hash": "aO7uI7Iw6oQ", - "canonicalFilename": "test.tsx_App_Header_component_div_onClick_aO7uI7Iw6oQ", - "path": "", + "hash": "YyrivfnN9jQ", + "canonicalFilename": "test.tsx_App_Header_component_div_onClick_YyrivfnN9jQ", + "path": "src", "extension": "tsx", - "parent": "App_Header_component_B9F3YeqcO1w", + "parent": "App_Header_component_LGSPR1gzfBQ", "ctxKind": "function", "ctxName": "$", "captures": false, @@ -75,17 +86,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const App = ()=>{ - const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_Header_component_B9F3YeqcO1w"), "App_Header_component_B9F3YeqcO1w")); - return Header; -}; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,OAAO,MAAM,MAAM;IACf,MAAM,uBAAS;IAMf,OAAO;AACX,EAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_4.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_4.snap index 400e83cb21b..20c3641b8cf 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_4.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_4.snap @@ -18,25 +18,25 @@ export function App() { return Header; } -============================= test.tsx_App_Header_component_B9F3YeqcO1w.tsx (ENTRY POINT)== +============================= src/test.tsx_App_Header_component_LGSPR1gzfBQ.tsx (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; -export const App_Header_component_B9F3YeqcO1w = ()=>{ +export const App_Header_component_LGSPR1gzfBQ = ()=>{ console.log("mount"); - return
import("./test.tsx_App_Header_component_div_onClick_aO7uI7Iw6oQ"), "App_Header_component_div_onClick_aO7uI7Iw6oQ")}/>; + return
import("./test.tsx_App_Header_component_div_onClick_YyrivfnN9jQ"), "App_Header_component_div_onClick_YyrivfnN9jQ")}/>; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";gDAG8B;IACtB,QAAQ,GAAG,CAAC;IACZ,QACK,IAAI;AAEb\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";gDAG8B;IACtB,QAAQ,GAAG,CAAC;IACZ,QACK,IAAI;AAEb\"}") /* { - "origin": "test.tsx", - "name": "App_Header_component_B9F3YeqcO1w", + "origin": "src/test.tsx", + "name": "App_Header_component_LGSPR1gzfBQ", "entry": null, "displayName": "test.tsx_App_Header_component", - "hash": "B9F3YeqcO1w", - "canonicalFilename": "test.tsx_App_Header_component_B9F3YeqcO1w", - "path": "", + "hash": "LGSPR1gzfBQ", + "canonicalFilename": "test.tsx_App_Header_component_LGSPR1gzfBQ", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -48,24 +48,35 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_Header_component_div_onClick_aO7uI7Iw6oQ.tsx (ENTRY POINT)== +============================= src/test.tsx == -export const App_Header_component_div_onClick_aO7uI7Iw6oQ = (ctx)=>console.log(ctx); +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export function App() { + const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_Header_component_LGSPR1gzfBQ"), "App_Header_component_LGSPR1gzfBQ")); + return Header; +} + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,OAAO,SAAS;IACZ,MAAM,uBAAS;IAMf,OAAO;AACX\"}") +============================= src/test.tsx_App_Header_component_div_onClick_YyrivfnN9jQ.tsx (ENTRY POINT)== + +export const App_Header_component_div_onClick_YyrivfnN9jQ = (ctx)=>console.log(ctx); export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"4DAM4B,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"4DAM4B,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "App_Header_component_div_onClick_aO7uI7Iw6oQ", + "origin": "src/test.tsx", + "name": "App_Header_component_div_onClick_YyrivfnN9jQ", "entry": null, "displayName": "test.tsx_App_Header_component_div_onClick", - "hash": "aO7uI7Iw6oQ", - "canonicalFilename": "test.tsx_App_Header_component_div_onClick_aO7uI7Iw6oQ", - "path": "", + "hash": "YyrivfnN9jQ", + "canonicalFilename": "test.tsx_App_Header_component_div_onClick_YyrivfnN9jQ", + "path": "src", "extension": "tsx", - "parent": "App_Header_component_B9F3YeqcO1w", + "parent": "App_Header_component_LGSPR1gzfBQ", "ctxKind": "function", "ctxName": "$", "captures": false, @@ -75,17 +86,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export function App() { - const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_Header_component_B9F3YeqcO1w"), "App_Header_component_B9F3YeqcO1w")); - return Header; -} - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,OAAO,SAAS;IACZ,MAAM,uBAAS;IAMf,OAAO;AACX\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_5.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_5.snap index 5a9cae7da3b..9c67463f041 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_5.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_5.snap @@ -17,70 +17,70 @@ export const Header = component$(() => { ); }); -============================= test.tsx_Header_component_J4uyIhaBNR4.tsx (ENTRY POINT)== +============================= src/test.tsx == +import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Header_component_J4uyIhaBNR4 = ()=>{ - return <> -
console.log("1")}/> -
import("./test.tsx_Header_component_div_onClick_i7ekvWH3674"), "Header_component_div_onClick_i7ekvWH3674")}/> - ; -}; +export const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_oO0vQsEtDrk"), "Header_component_oO0vQsEtDrk")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,OAAO,MAAM,uBAAS,uHAOnB\"}") +============================= src/test.tsx_Header_component_div_onClick_zsv4eSExDyc.tsx (ENTRY POINT)== + +export const Header_component_div_onClick_zsv4eSExDyc = (ctx)=>console.log("2"); +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAEiC;IAC7B,SACM;YACE,CAAC,IAAI,SAAS,CAAC,MAAQ,QAAQ,GAAG,CAAC,OAAO;YAC1C,CAAC,IAAI,4IAAwC;QACjD;AAER\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAM4B,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Header_component_J4uyIhaBNR4", + "origin": "src/test.tsx", + "name": "Header_component_div_onClick_zsv4eSExDyc", "entry": null, - "displayName": "test.tsx_Header_component", - "hash": "J4uyIhaBNR4", - "canonicalFilename": "test.tsx_Header_component_J4uyIhaBNR4", - "path": "", + "displayName": "test.tsx_Header_component_div_onClick", + "hash": "zsv4eSExDyc", + "canonicalFilename": "test.tsx_Header_component_div_onClick_zsv4eSExDyc", + "path": "src", "extension": "tsx", - "parent": null, + "parent": "Header_component_oO0vQsEtDrk", "ctxKind": "function", - "ctxName": "component$", + "ctxName": "$", "captures": false, "loc": [ - 85, - 250 + 200, + 225 ] } */ -============================= test.tsx == +============================= src/test.tsx_Header_component_oO0vQsEtDrk.tsx (ENTRY POINT)== -import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_J4uyIhaBNR4"), "Header_component_J4uyIhaBNR4")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,OAAO,MAAM,uBAAS,uHAOnB\"}") -============================= test.tsx_Header_component_div_onClick_i7ekvWH3674.tsx (ENTRY POINT)== - -export const Header_component_div_onClick_i7ekvWH3674 = (ctx)=>console.log("2"); -export { _hW } from "@builder.io/qwik"; +export const Header_component_oO0vQsEtDrk = ()=>{ + return <> +
console.log("1")}/> +
import("./test.tsx_Header_component_div_onClick_zsv4eSExDyc"), "Header_component_div_onClick_zsv4eSExDyc")}/> + ; +}; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAM4B,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAEiC;IAC7B,SACM;YACE,CAAC,IAAI,SAAS,CAAC,MAAQ,QAAQ,GAAG,CAAC,OAAO;YAC1C,CAAC,IAAI,4IAAwC;QACjD;AAER\"}") /* { - "origin": "test.tsx", - "name": "Header_component_div_onClick_i7ekvWH3674", + "origin": "src/test.tsx", + "name": "Header_component_oO0vQsEtDrk", "entry": null, - "displayName": "test.tsx_Header_component_div_onClick", - "hash": "i7ekvWH3674", - "canonicalFilename": "test.tsx_Header_component_div_onClick_i7ekvWH3674", - "path": "", + "displayName": "test.tsx_Header_component", + "hash": "oO0vQsEtDrk", + "canonicalFilename": "test.tsx_Header_component_oO0vQsEtDrk", + "path": "src", "extension": "tsx", - "parent": "Header_component_J4uyIhaBNR4", + "parent": null, "ctxKind": "function", - "ctxName": "$", + "ctxName": "component$", "captures": false, "loc": [ - 200, - 225 + 85, + 250 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_6.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_6.snap index 39373a49c08..2a345daf4a0 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_6.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_6.snap @@ -10,22 +10,22 @@ snapshot_kind: text import { $, component$ } from '@builder.io/qwik'; export const sym1 = $((ctx) => console.log("1")); -============================= test.tsx_sym1_aXUrPXX5Lak.tsx (ENTRY POINT)== +============================= src/test.tsx_sym1_3tnndhaq9xQ.tsx (ENTRY POINT)== -export const sym1_aXUrPXX5Lak = (ctx)=>console.log("1"); +export const sym1_3tnndhaq9xQ = (ctx)=>console.log("1"); export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"gCAEsB,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"gCAEsB,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "sym1_aXUrPXX5Lak", + "origin": "src/test.tsx", + "name": "sym1_3tnndhaq9xQ", "entry": null, "displayName": "test.tsx_sym1", - "hash": "aXUrPXX5Lak", - "canonicalFilename": "test.tsx_sym1_aXUrPXX5Lak", - "path": "", + "hash": "3tnndhaq9xQ", + "canonicalFilename": "test.tsx_sym1_3tnndhaq9xQ", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -37,13 +37,13 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx == +============================= src/test.tsx == import { qrl } from "@builder.io/qwik"; -export const sym1 = /*#__PURE__*/ qrl(()=>import("./test.tsx_sym1_aXUrPXX5Lak"), "sym1_aXUrPXX5Lak"); +export const sym1 = /*#__PURE__*/ qrl(()=>import("./test.tsx_sym1_3tnndhaq9xQ"), "sym1_3tnndhaq9xQ"); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";AAEA,OAAO,MAAM,wFAAoC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";AAEA,OAAO,MAAM,wFAAoC\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_7.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_7.snap index 71203e72531..efbd1943f66 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_7.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_7.snap @@ -22,63 +22,60 @@ const App = component$(() => { ); }); -============================= test.tsx_Header_component_J4uyIhaBNR4.tsx (ENTRY POINT)== +============================= src/test.tsx == +import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Header_component_J4uyIhaBNR4 = ()=>{ - console.log("mount"); - return
import("./test.tsx_Header_component_div_onClick_i7ekvWH3674"), "Header_component_div_onClick_i7ekvWH3674")}/>; -}; +export const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_oO0vQsEtDrk"), "Header_component_oO0vQsEtDrk")); +/*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAGiC;IAC7B,QAAQ,GAAG,CAAC;IACZ,QACK,IAAI;AAEX\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,uBAAS,uHAKjB;cAEO\"}") +============================= src/test.tsx_Header_component_div_onClick_zsv4eSExDyc.tsx (ENTRY POINT)== + +export const Header_component_div_onClick_zsv4eSExDyc = (ctx)=>console.log(ctx); +export { _hW } from "@builder.io/qwik"; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAMwB,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Header_component_J4uyIhaBNR4", + "origin": "src/test.tsx", + "name": "Header_component_div_onClick_zsv4eSExDyc", "entry": null, - "displayName": "test.tsx_Header_component", - "hash": "J4uyIhaBNR4", - "canonicalFilename": "test.tsx_Header_component_J4uyIhaBNR4", - "path": "", + "displayName": "test.tsx_Header_component_div_onClick", + "hash": "zsv4eSExDyc", + "canonicalFilename": "test.tsx_Header_component_div_onClick_zsv4eSExDyc", + "path": "src", "extension": "tsx", - "parent": null, + "parent": "Header_component_oO0vQsEtDrk", "ctxKind": "function", - "ctxName": "component$", + "ctxName": "$", "captures": false, "loc": [ - 86, - 197 + 157, + 182 ] } */ -============================= test.tsx == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_J4uyIhaBNR4"), "Header_component_J4uyIhaBNR4")); -/*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,uBAAS,uHAKjB;cAEO\"}") -============================= test.tsx_App_component_ckEPmXZlub0.tsx (ENTRY POINT)== +============================= src/test.tsx_App_component_F6JpluHHZ5A.tsx (ENTRY POINT)== import { Header } from "./test"; -export const App_component_ckEPmXZlub0 = ()=>{ +export const App_component_F6JpluHHZ5A = ()=>{ return
; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAUuB;IACnB,QACK;AAET\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAUuB;IACnB,QACK;AAET\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -90,30 +87,33 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Header_component_div_onClick_i7ekvWH3674.tsx (ENTRY POINT)== +============================= src/test.tsx_Header_component_oO0vQsEtDrk.tsx (ENTRY POINT)== -export const Header_component_div_onClick_i7ekvWH3674 = (ctx)=>console.log(ctx); -export { _hW } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const Header_component_oO0vQsEtDrk = ()=>{ + console.log("mount"); + return
import("./test.tsx_Header_component_div_onClick_zsv4eSExDyc"), "Header_component_div_onClick_zsv4eSExDyc")}/>; +}; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAMwB,CAAC,MAAQ,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAGiC;IAC7B,QAAQ,GAAG,CAAC;IACZ,QACK,IAAI;AAEX\"}") /* { - "origin": "test.tsx", - "name": "Header_component_div_onClick_i7ekvWH3674", + "origin": "src/test.tsx", + "name": "Header_component_oO0vQsEtDrk", "entry": null, - "displayName": "test.tsx_Header_component_div_onClick", - "hash": "i7ekvWH3674", - "canonicalFilename": "test.tsx_Header_component_div_onClick_i7ekvWH3674", - "path": "", + "displayName": "test.tsx_Header_component", + "hash": "oO0vQsEtDrk", + "canonicalFilename": "test.tsx_Header_component_oO0vQsEtDrk", + "path": "src", "extension": "tsx", - "parent": "Header_component_J4uyIhaBNR4", + "parent": null, "ctxKind": "function", - "ctxName": "$", + "ctxName": "component$", "captures": false, "loc": [ - 157, - 182 + 86, + 197 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_8.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_8.snap index c2cab9435c5..d6942132c0d 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_8.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_8.snap @@ -20,24 +20,32 @@ export const Header = component$(() => { }); }); -============================= test.tsx_Header_component_J4uyIhaBNR4.tsx (ENTRY POINT)== +============================= src/test.tsx == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_oO0vQsEtDrk"), "Header_component_oO0vQsEtDrk")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,uBAAS,uHASnB\"}") +============================= src/test.tsx_Header_component_oO0vQsEtDrk.tsx (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; -export const Header_component_J4uyIhaBNR4 = ()=>{ - return /*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_1_2B8d0oH9ZWc"), "Header_component_1_2B8d0oH9ZWc"); +export const Header_component_oO0vQsEtDrk = ()=>{ + return /*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_1_eEYImYNVM0I"), "Header_component_1_eEYImYNVM0I"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAGiC;IAC7B;AAQJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAGiC;IAC7B;AAQJ\"}") /* { - "origin": "test.tsx", - "name": "Header_component_J4uyIhaBNR4", + "origin": "src/test.tsx", + "name": "Header_component_oO0vQsEtDrk", "entry": null, "displayName": "test.tsx_Header_component", - "hash": "J4uyIhaBNR4", - "canonicalFilename": "test.tsx_Header_component_J4uyIhaBNR4", - "path": "", + "hash": "oO0vQsEtDrk", + "canonicalFilename": "test.tsx_Header_component_oO0vQsEtDrk", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -49,10 +57,10 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Header_component_1_2B8d0oH9ZWc.tsx (ENTRY POINT)== +============================= src/test.tsx_Header_component_1_eEYImYNVM0I.tsx (ENTRY POINT)== import { Header } from "./test"; -export const Header_component_1_2B8d0oH9ZWc = (hola)=>{ +export const Header_component_1_eEYImYNVM0I = (hola)=>{ const hola = this; const { something, styff } = hola; hola.nothere.stuff[global]; @@ -61,18 +69,18 @@ export const Header_component_1_2B8d0oH9ZWc = (hola)=>{ export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";8CAIa,CAAC;IACN,MAAM,OAAO,IAAI;IACjB,MAAM,EAAC,SAAS,EAAE,KAAK,EAAC,GAAG;IACb,KAAK,OAAO,CAAC,KAAK,CAAC,OAAO;IACxC,QACK;AAET\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";8CAIa,CAAC;IACN,MAAM,OAAO,IAAI;IACjB,MAAM,EAAC,SAAS,EAAE,KAAK,EAAC,GAAG;IACb,KAAK,OAAO,CAAC,KAAK,CAAC,OAAO;IACxC,QACK;AAET\"}") /* { - "origin": "test.tsx", - "name": "Header_component_1_2B8d0oH9ZWc", + "origin": "src/test.tsx", + "name": "Header_component_1_eEYImYNVM0I", "entry": null, "displayName": "test.tsx_Header_component_1", - "hash": "2B8d0oH9ZWc", - "canonicalFilename": "test.tsx_Header_component_1_2B8d0oH9ZWc", - "path": "", + "hash": "eEYImYNVM0I", + "canonicalFilename": "test.tsx_Header_component_1_eEYImYNVM0I", + "path": "src", "extension": "tsx", - "parent": "Header_component_J4uyIhaBNR4", + "parent": "Header_component_oO0vQsEtDrk", "ctxKind": "function", "ctxName": "$", "captures": false, @@ -82,14 +90,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_J4uyIhaBNR4"), "Header_component_J4uyIhaBNR4")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,uBAAS,uHASnB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_9.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_9.snap index 4b454163486..5ebbd70cfa8 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_9.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_9.snap @@ -20,25 +20,32 @@ const Header = $((decl1, {decl2}, [decl3]) => { try{}catch({decl19}){} }); -============================= test.tsx_Header_WjUaUQN7Oxg.tsx (ENTRY POINT)== +============================= src/test.tsx == -export const Header_WjUaUQN7Oxg = (decl1, { decl2 }, [decl3])=>{ +import { qrl } from "@builder.io/qwik"; +/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_9tTea9iPE30"), "Header_9tTea9iPE30"); + + +Some("{\"version\":3,\"sources\":[],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"\"}") +============================= src/test.tsx_Header_9tTea9iPE30.tsx (ENTRY POINT)== + +export const Header_9tTea9iPE30 = (decl1, { decl2 }, [decl3])=>{ const { decl4, key: decl5 } = this; let [decl6, ...decl7] = stuff; }; export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"kCAEiB,CAAC,OAAO,EAAC,KAAK,EAAC,EAAE,CAAC,MAAM;IACrC,MAAM,EAAC,KAAK,EAAE,KAAK,KAAK,EAAC,GAAG,IAAI;IAChC,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG;AAQ5B\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"kCAEiB,CAAC,OAAO,EAAC,KAAK,EAAC,EAAE,CAAC,MAAM;IACrC,MAAM,EAAC,KAAK,EAAE,KAAK,KAAK,EAAC,GAAG,IAAI;IAChC,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG;AAQ5B\"}") /* { - "origin": "test.tsx", - "name": "Header_WjUaUQN7Oxg", + "origin": "src/test.tsx", + "name": "Header_9tTea9iPE30", "entry": null, "displayName": "test.tsx_Header", - "hash": "WjUaUQN7Oxg", - "canonicalFilename": "test.tsx_Header_WjUaUQN7Oxg", - "path": "", + "hash": "9tTea9iPE30", + "canonicalFilename": "test.tsx_Header_9tTea9iPE30", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -50,13 +57,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx == - -import { qrl } from "@builder.io/qwik"; -/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_WjUaUQN7Oxg"), "Header_WjUaUQN7Oxg"); - - -Some("{\"version\":3,\"sources\":[],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_build_server.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_build_server.snap index 46dee69238d..632910a4dc9 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_build_server.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_build_server.snap @@ -39,19 +39,19 @@ export const App = component$(() => { ); }); -============================= test.tsx == +============================= src/test.tsx == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; export const functionThatNeedsWindow = ()=>{}; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "s_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "s_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAQA,OAAO,MAAM,0BAA0B,KAMvC,EAAE;AAEF,OAAO,MAAM,oBAAM,qGAehB\"}") -============================= test.tsx_App_component_ckEPmXZlub0.tsx (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAQA,OAAO,MAAM,0BAA0B,KAMvC,EAAE;AAEF,OAAO,MAAM,oBAAM,qGAehB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.tsx (ENTRY POINT)== import { mongodb } from "mondodb"; -export const s_ckEPmXZlub0 = ()=>{ +export const s_F6JpluHHZ5A = ()=>{ useMount$(()=>{ console.log('server', mongodb()); }); @@ -62,16 +62,16 @@ export const s_ckEPmXZlub0 = ()=>{ }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";6BAgB8B;IAC1B,UAAU;QAEF,QAAQ,GAAG,CAAC,UAAU;IAK9B;IACA,QACK,IAAI;YACD,EAAe,EAAE,MAAM,EAAE,GAAG;YAC5B,OAAsB;QAC1B,EAAE;AAEV\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";6BAgB8B;IAC1B,UAAU;QAEF,QAAQ,GAAG,CAAC,UAAU;IAK9B;IACA,QACK,IAAI;YACD,EAAe,EAAE,MAAM,EAAE,GAAG;YAC5B,OAAsB;QAC1B,EAAE;AAEV\"}") /* { - "origin": "test.tsx", - "name": "s_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "s_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_capture_imports.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_capture_imports.snap index af1169237cd..144f091ee5a 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_capture_imports.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_capture_imports.snap @@ -17,62 +17,61 @@ export const App = component$(() => { useStyles$(css3); }) -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAMA,OAAO,MAAM,oBAAM,iHAGjB\"}") -============================= test.tsx_App_component_useStyles_t35nSa5UV7U.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAMA,OAAO,MAAM,oBAAM,iHAGjB\"}") +============================= src/test.tsx_App_component_useStyles_1_H09R3Tf964w.js (ENTRY POINT)== -import css1 from "./global.css"; -import css2 from "./style.css"; -export const App_component_useStyles_t35nSa5UV7U = `${css1}${css2}`; +import css3 from "./style.css"; +export const App_component_useStyles_1_H09R3Tf964w = css3; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;mDAOe,GAAG,OAAO,MAAM\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";qDAQe\"}") /* { - "origin": "test.tsx", - "name": "App_component_useStyles_t35nSa5UV7U", + "origin": "src/test.tsx", + "name": "App_component_useStyles_1_H09R3Tf964w", "entry": null, - "displayName": "test.tsx_App_component_useStyles", - "hash": "t35nSa5UV7U", - "canonicalFilename": "test.tsx_App_component_useStyles_t35nSa5UV7U", - "path": "", + "displayName": "test.tsx_App_component_useStyles_1", + "hash": "H09R3Tf964w", + "canonicalFilename": "test.tsx_App_component_useStyles_1_H09R3Tf964w", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", "ctxName": "useStyles$", "captures": false, "loc": [ - 212, - 228 + 246, + 250 ] } */ -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; import { useStylesQrl } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ()=>{ - useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useStyles_t35nSa5UV7U"), "App_component_useStyles_t35nSa5UV7U")); - useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useStyles_1_xBK4W0ZKWe8"), "App_component_useStyles_1_xBK4W0ZKWe8")); +export const App_component_F6JpluHHZ5A = ()=>{ + useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useStyles_ya0IZ2trrfA"), "App_component_useStyles_ya0IZ2trrfA")); + useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useStyles_1_H09R3Tf964w"), "App_component_useStyles_1_H09R3Tf964w")); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAM8B;IAC1B;IACA;AACJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAM8B;IAC1B;IACA;AACJ\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -84,30 +83,31 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_useStyles_1_xBK4W0ZKWe8.js (ENTRY POINT)== +============================= src/test.tsx_App_component_useStyles_ya0IZ2trrfA.js (ENTRY POINT)== -import css3 from "./style.css"; -export const App_component_useStyles_1_xBK4W0ZKWe8 = css3; +import css1 from "./global.css"; +import css2 from "./style.css"; +export const App_component_useStyles_ya0IZ2trrfA = `${css1}${css2}`; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";qDAQe\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;mDAOe,GAAG,OAAO,MAAM\"}") /* { - "origin": "test.tsx", - "name": "App_component_useStyles_1_xBK4W0ZKWe8", + "origin": "src/test.tsx", + "name": "App_component_useStyles_ya0IZ2trrfA", "entry": null, - "displayName": "test.tsx_App_component_useStyles_1", - "hash": "xBK4W0ZKWe8", - "canonicalFilename": "test.tsx_App_component_useStyles_1_xBK4W0ZKWe8", - "path": "", + "displayName": "test.tsx_App_component_useStyles", + "hash": "ya0IZ2trrfA", + "canonicalFilename": "test.tsx_App_component_useStyles_ya0IZ2trrfA", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", "ctxName": "useStyles$", "captures": false, "loc": [ - 246, - 250 + 212, + 228 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_capturing_fn_class.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_capturing_fn_class.snap index 3ef4b1c5868..670acd5f13a 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_capturing_fn_class.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_capturing_fn_class.snap @@ -25,72 +25,72 @@ export const App = component$(() => { }); }) -============================= test.js == +============================= src/test.tsx_App_component_1_10FTcCMrdRw.js (ENTRY POINT)== -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAcjB\"}") -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== - -import { qrl } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ()=>{ - return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_w0t0o3QMovU"), "App_component_1_w0t0o3QMovU"); +import { _jsxQ } from "@builder.io/qwik"; +export const App_component_1_10FTcCMrdRw = ()=>{ + hola(); + new Thing(); + return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "oJ_0"); }; +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAG8B;IAO1B;AAOJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";2CAUa;IACP;IACA,IAAI;IACJ,qBACI,MAAC;AAEP\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_1_10FTcCMrdRw", "entry": null, - "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "displayName": "test.tsx_App_component_1", + "hash": "10FTcCMrdRw", + "canonicalFilename": "test.tsx_App_component_1_10FTcCMrdRw", + "path": "src", "extension": "js", - "parent": null, + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", - "ctxName": "component$", + "ctxName": "$", "captures": false, "loc": [ - 83, - 293 + 198, + 289 ] } */ -============================= test.tsx_App_component_1_w0t0o3QMovU.js (ENTRY POINT)== +============================= src/test.js == -import { _jsxQ } from "@builder.io/qwik"; -export const App_component_1_w0t0o3QMovU = ()=>{ - hola(); - new Thing(); - return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "u6_0"); +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAcjB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== + +import { qrl } from "@builder.io/qwik"; +export const App_component_F6JpluHHZ5A = ()=>{ + return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_10FTcCMrdRw"), "App_component_1_10FTcCMrdRw"); }; -export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";2CAUa;IACP;IACA,IAAI;IACJ,qBACI,MAAC;AAEP\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAG8B;IAO1B;AAOJ\"}") /* { - "origin": "test.tsx", - "name": "App_component_1_w0t0o3QMovU", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, - "displayName": "test.tsx_App_component_1", - "hash": "w0t0o3QMovU", - "canonicalFilename": "test.tsx_App_component_1_w0t0o3QMovU", - "path": "", + "displayName": "test.tsx_App_component", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": null, "ctxKind": "function", - "ctxName": "$", + "ctxName": "component$", "captures": false, "loc": [ - 198, - 289 + 83, + 293 ] } */ @@ -100,7 +100,7 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" { "category": "error", "code": "C02", - "file": "test.tsx", + "file": "src/test.tsx", "message": "Reference to identifier 'Thing' can not be used inside a Qrl($) scope because it's a function", "highlights": null, "suggestions": null, @@ -109,7 +109,7 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" { "category": "error", "code": "C02", - "file": "test.tsx", + "file": "src/test.tsx", "message": "Reference to identifier 'hola' can not be used inside a Qrl($) scope because it's a function", "highlights": null, "suggestions": null, diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_class_name.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_class_name.snap index 3af8a97a597..94f45765637 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_class_name.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_class_name.snap @@ -27,22 +27,22 @@ export const App2 = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const App2 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App2_component_3yveMqbQ3Fs.js"), "App2_component_3yveMqbQ3Fs")); +export const App2 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App2_component_qTLWO4R2ZnQ.js"), "App2_component_qTLWO4R2ZnQ")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,qBAAO,sHAgBjB\"}") -============================= test.tsx_App2_component_3yveMqbQ3Fs.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,qBAAO,sHAgBjB\"}") +============================= src/test.tsx_App2_component_qTLWO4R2ZnQ.js (ENTRY POINT)== import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { _IMMUTABLE } from "@builder.io/qwik"; import { _fnSignal } from "@builder.io/qwik"; import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; -export const App2_component_3yveMqbQ3Fs = ()=>{ +export const App2_component_qTLWO4R2ZnQ = ()=>{ const signal = useSignal(); const computed = signal.value + 'foo'; return /*#__PURE__*/ _jsxC(_Fragment, { @@ -66,7 +66,7 @@ export const App2_component_3yveMqbQ3Fs = ()=>{ [_IMMUTABLE]: { className: _IMMUTABLE } - }, 3, "u6_0"), + }, 3, "oJ_0"), /*#__PURE__*/ _jsxC(Foo, { get className () { return signal.value; @@ -76,31 +76,31 @@ export const App2_component_3yveMqbQ3Fs = ()=>{ signal ], "p0.value") } - }, 3, "u6_1"), + }, 3, "oJ_1"), /*#__PURE__*/ _jsxC(Foo, { className: signal, [_IMMUTABLE]: { className: _IMMUTABLE } - }, 3, "u6_2"), + }, 3, "oJ_2"), /*#__PURE__*/ _jsxC(Foo, { className: computed - }, 3, "u6_3") + }, 3, "oJ_3") ] - }, 1, "u6_4"); + }, 1, "oJ_4"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;0CAG+B;IAC3B,MAAM,SAAS;IACf,MAAM,WAAW,OAAO,KAAK,GAAG;IAChC,qBACI;;0BACI,MAAC;gBAAI,WAAU;;0BACf,MAAC;gBAAI,SAAS,kBAAE,GAAO,KAAK;;;;0BAC5B,MAAC;gBAAI,WAAW;;0BAChB,MAAC;gBAAI,WAAW;;0BAEhB,MAAC;gBAAI,WAAU;;oBAAV,SAAS;;;0BACd,MAAC;oBAAI;2BAAW,OAAO,KAAK;;;oBAAvB,SAAS,kBAAE,GAAO,KAAK;;;;;0BAC5B,MAAC;gBAAI,WAAW;;oBAAX,SAAS;;;0BACd,MAAC;gBAAI,WAAW;;;;AAG5B\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;0CAG+B;IAC3B,MAAM,SAAS;IACf,MAAM,WAAW,OAAO,KAAK,GAAG;IAChC,qBACI;;0BACI,MAAC;gBAAI,WAAU;;0BACf,MAAC;gBAAI,SAAS,kBAAE,GAAO,KAAK;;;;0BAC5B,MAAC;gBAAI,WAAW;;0BAChB,MAAC;gBAAI,WAAW;;0BAEhB,MAAC;gBAAI,WAAU;;oBAAV,SAAS;;;0BACd,MAAC;oBAAI;2BAAW,OAAO,KAAK;;;oBAAvB,SAAS,kBAAE,GAAO,KAAK;;;;;0BAC5B,MAAC;gBAAI,WAAW;;oBAAX,SAAS;;;0BACd,MAAC;gBAAI,WAAW;;;;AAG5B\"}") /* { - "origin": "test.tsx", - "name": "App2_component_3yveMqbQ3Fs", + "origin": "src/test.tsx", + "name": "App2_component_qTLWO4R2ZnQ", "entry": null, "displayName": "test.tsx_App2_component", - "hash": "3yveMqbQ3Fs", - "canonicalFilename": "test.tsx_App2_component_3yveMqbQ3Fs", - "path": "", + "hash": "qTLWO4R2ZnQ", + "canonicalFilename": "test.tsx_App2_component_qTLWO4R2ZnQ", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_custom_inlined_functions.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_custom_inlined_functions.snap index 58de65b34a0..06a35e763d3 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_custom_inlined_functions.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_custom_inlined_functions.snap @@ -31,108 +31,85 @@ export const Lightweight = (props) => { }); }); -============================= test.js == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -import { wrap, useEffect } from '@builder.io/qwik'; -export const useMemoQrl = (qrt)=>{ - useEffect(qrt); -}; -export const useMemo$ = wrap(useMemoQrl); -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); -export const Lightweight = (props)=>{ - useMemoQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Lightweight_useMemo_UIcxVTQF1a8"), "Lightweight_useMemo_UIcxVTQF1a8")); -}; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AACA,SAAkC,IAAI,EAAE,SAAS,QAAQ,mBAAmB;AAE5E,OAAO,MAAM,aAAa,CAAC;IACvB,UAAU;AACd,EAAE;AAEF,OAAO,MAAM,WAAW,KAAK,YAAY;AAEzC,OAAO,MAAM,oBAAM,iHAQhB;AAEH,OAAO,MAAM,cAAc,CAAC;IACxB;AAGJ,EAAG\"}") -============================= test.tsx_App_component_useMemo_6Sc9KVki3Y0.js (ENTRY POINT)== +============================= src/test.tsx_App_component_1_10FTcCMrdRw.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; -export const App_component_useMemo_6Sc9KVki3Y0 = ()=>{ +import { _fnSignal } from "@builder.io/qwik"; +import { _jsxQ } from "@builder.io/qwik"; +export const App_component_1_10FTcCMrdRw = ()=>{ const [state] = useLexicalScope(); - console.log(state.count); + return /*#__PURE__*/ _jsxQ("div", null, null, _fnSignal((p0)=>p0.count, [ + state + ], "p0.count"), 3, "oJ_0"); }; +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";iDAWa;;IACL,QAAQ,GAAG,CAAC,MAAM,KAAK\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;2CAca;;yBACL,MAAC,mCAAK,GAAM,KAAK\"}") /* { - "origin": "test.tsx", - "name": "App_component_useMemo_6Sc9KVki3Y0", + "origin": "src/test.tsx", + "name": "App_component_1_10FTcCMrdRw", "entry": null, - "displayName": "test.tsx_App_component_useMemo", - "hash": "6Sc9KVki3Y0", - "canonicalFilename": "test.tsx_App_component_useMemo_6Sc9KVki3Y0", - "path": "", + "displayName": "test.tsx_App_component_1", + "hash": "10FTcCMrdRw", + "canonicalFilename": "test.tsx_App_component_1_10FTcCMrdRw", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", - "ctxName": "useMemo$", + "ctxName": "$", "captures": true, "loc": [ - 280, - 327 + 343, + 389 ] } */ -============================= test.tsx_Lightweight_useMemo_UIcxVTQF1a8.js (ENTRY POINT)== +============================= src/test.js == -export const Lightweight_useMemo_UIcxVTQF1a8 = ()=>{ - console.log(state.count); +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +import { wrap, useEffect } from '@builder.io/qwik'; +export const useMemoQrl = (qrt)=>{ + useEffect(qrt); +}; +export const useMemo$ = wrap(useMemoQrl); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); +export const Lightweight = (props)=>{ + useMemoQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Lightweight_useMemo_jLs9B00CvfM"), "Lightweight_useMemo_jLs9B00CvfM")); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"+CAoBa;IACL,QAAQ,GAAG,CAAC,MAAM,KAAK;AAC3B\"}") -/* -{ - "origin": "test.tsx", - "name": "Lightweight_useMemo_UIcxVTQF1a8", - "entry": null, - "displayName": "test.tsx_Lightweight_useMemo", - "hash": "UIcxVTQF1a8", - "canonicalFilename": "test.tsx_Lightweight_useMemo_UIcxVTQF1a8", - "path": "", - "extension": "js", - "parent": null, - "ctxKind": "function", - "ctxName": "useMemo$", - "captures": false, - "loc": [ - 450, - 497 - ] -} -*/ -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AACA,SAAkC,IAAI,EAAE,SAAS,QAAQ,mBAAmB;AAE5E,OAAO,MAAM,aAAa,CAAC;IACvB,UAAU;AACd,EAAE;AAEF,OAAO,MAAM,WAAW,KAAK,YAAY;AAEzC,OAAO,MAAM,oBAAM,iHAQhB;AAEH,OAAO,MAAM,cAAc,CAAC;IACxB;AAGJ,EAAG\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; import { useMemoQrl } from "./test"; import { useStore } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = (props)=>{ +export const App_component_F6JpluHHZ5A = (props)=>{ const state = useStore({ count: 0 }); - useMemoQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useMemo_6Sc9KVki3Y0"), "App_component_useMemo_6Sc9KVki3Y0", [ + useMemoQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useMemo_zQ0JQuT0K84"), "App_component_useMemo_zQ0JQuT0K84", [ state ])); - return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_w0t0o3QMovU"), "App_component_1_w0t0o3QMovU", [ + return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_10FTcCMrdRw"), "App_component_1_10FTcCMrdRw", [ state ]); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;yCAS8B,CAAC;IAC3B,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAChC;;;IAGA;;;AAGJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;yCAS8B,CAAC;IAC3B,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAChC;;;IAGA;;;AAGJ\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -144,38 +121,61 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_1_w0t0o3QMovU.js (ENTRY POINT)== +============================= src/test.tsx_App_component_useMemo_zQ0JQuT0K84.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; -import { _fnSignal } from "@builder.io/qwik"; -import { _jsxQ } from "@builder.io/qwik"; -export const App_component_1_w0t0o3QMovU = ()=>{ +export const App_component_useMemo_zQ0JQuT0K84 = ()=>{ const [state] = useLexicalScope(); - return /*#__PURE__*/ _jsxQ("div", null, null, _fnSignal((p0)=>p0.count, [ - state - ], "p0.count"), 3, "u6_0"); + console.log(state.count); }; -export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;2CAca;;yBACL,MAAC,mCAAK,GAAM,KAAK\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";iDAWa;;IACL,QAAQ,GAAG,CAAC,MAAM,KAAK\"}") /* { - "origin": "test.tsx", - "name": "App_component_1_w0t0o3QMovU", + "origin": "src/test.tsx", + "name": "App_component_useMemo_zQ0JQuT0K84", "entry": null, - "displayName": "test.tsx_App_component_1", - "hash": "w0t0o3QMovU", - "canonicalFilename": "test.tsx_App_component_1_w0t0o3QMovU", - "path": "", + "displayName": "test.tsx_App_component_useMemo", + "hash": "zQ0JQuT0K84", + "canonicalFilename": "test.tsx_App_component_useMemo_zQ0JQuT0K84", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", - "ctxName": "$", + "ctxName": "useMemo$", "captures": true, "loc": [ - 343, - 389 + 280, + 327 + ] +} +*/ +============================= src/test.tsx_Lightweight_useMemo_jLs9B00CvfM.js (ENTRY POINT)== + +export const Lightweight_useMemo_jLs9B00CvfM = ()=>{ + console.log(state.count); +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"+CAoBa;IACL,QAAQ,GAAG,CAAC,MAAM,KAAK;AAC3B\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Lightweight_useMemo_jLs9B00CvfM", + "entry": null, + "displayName": "test.tsx_Lightweight_useMemo", + "hash": "jLs9B00CvfM", + "canonicalFilename": "test.tsx_Lightweight_useMemo_jLs9B00CvfM", + "path": "src", + "extension": "js", + "parent": null, + "ctxKind": "function", + "ctxName": "useMemo$", + "captures": false, + "loc": [ + 450, + 497 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dead_code.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dead_code.snap index 50794f50f79..52f87dd2d9b 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dead_code.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dead_code.snap @@ -21,24 +21,32 @@ export const Foo = component$(({foo}) => { ); }) -============================= test.tsx_Foo_component_HTDRsvUbLiE.tsx (ENTRY POINT)== +============================= src/test.tsx == -export const Foo_component_HTDRsvUbLiE = (props)=>{ +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_eZLoPe62E2c"), "Foo_component_eZLoPe62E2c")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAIA,OAAO,MAAM,oBAAM,iHASjB\"}") +============================= src/test.tsx_Foo_component_eZLoPe62E2c.tsx (ENTRY POINT)== + +export const Foo_component_eZLoPe62E2c = (props)=>{ useMount$(()=>{}); return
; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"yCAI8B;IAC1B,UAAU,KAIV;IACA,QACK;AAET\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"yCAI8B;IAC1B,UAAU,KAIV;IACA,QACK;AAET\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_HTDRsvUbLiE", + "origin": "src/test.tsx", + "name": "Foo_component_eZLoPe62E2c", "entry": null, "displayName": "test.tsx_Foo_component", - "hash": "HTDRsvUbLiE", - "canonicalFilename": "test.tsx_Foo_component_HTDRsvUbLiE", - "path": "", + "hash": "eZLoPe62E2c", + "canonicalFilename": "test.tsx_Foo_component_eZLoPe62E2c", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -50,14 +58,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_HTDRsvUbLiE"), "Foo_component_HTDRsvUbLiE")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAIA,OAAO,MAAM,oBAAM,iHASjB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_children.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_children.snap index e96c1467b32..a238f9f3031 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_children.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_children.snap @@ -50,7 +50,7 @@ export const App = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { _fnSignal } from "@builder.io/qwik"; @@ -60,7 +60,7 @@ import { inlinedQrl } from "@builder.io/qwik"; import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { useStore, mutable } from '@builder.io/qwik'; import { dep } from './file'; -const TextContent_component_puSwpKXO7Kg = (props)=>{ +const TextContent_component_liCu0FCPyL8 = (props)=>{ return /*#__PURE__*/ _jsxC(_Fragment, { children: [ /*#__PURE__*/ _jsxQ("div", null, null, [ @@ -76,10 +76,10 @@ const TextContent_component_puSwpKXO7Kg = (props)=>{ ], "p0.class") ], 3, null) ] - }, 3, "u6_0"); + }, 3, "oJ_0"); }; -export const TextContent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(TextContent_component_puSwpKXO7Kg, "TextContent_component_puSwpKXO7Kg")); -const App_component_ckEPmXZlub0 = ()=>{ +export const TextContent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(TextContent_component_liCu0FCPyL8, "TextContent_component_liCu0FCPyL8")); +const App_component_F6JpluHHZ5A = ()=>{ const signal = useSignal(0); const store = useStore({}); return /*#__PURE__*/ _jsxC(_Fragment, { @@ -114,12 +114,12 @@ const App_component_ckEPmXZlub0 = ()=>{ /*#__PURE__*/ _jsxQ("div", null, null, mutable(signal), 1, null), /*#__PURE__*/ _jsxQ("div", null, null, signal.value + dep, 1, null) ] - }, 1, "u6_1"); + }, 1, "oJ_1"); }; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_ckEPmXZlub0, "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_F6JpluHHZ5A, "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;AACA,SAAqB,QAAQ,EAAE,OAAO,QAAQ,mBAAmB;AAEjE,SAAQ,GAAG,QAAO,SAAS;0CAEW,CAAC;IACnC,qBACI;;0BACI,MAAC;gBAAI;gCAAU,EAAK,CAAC,UAAU;;;;0BAC/B,MAAC;gBAAI;gCAAQ,GAAM,KAAK;;;;;;AAGpC;AAPA,OAAO,MAAM,4BAAc,+GAOxB;kCAE2B;IAC1B,MAAM,SAAS,UAAU;IACzB,MAAM,QAAQ,SAAS,CAAC;IACxB,qBACI;;0BACI,MAAC,mBAAI;0BACL,MAAC,mBAAK,CAAC,IAAI,CAAC;0BACZ,MAAC,mBAAK;0BACN,MAAC,mBAAK;0BACN,MAAC,mBAAK,CAAC,IAAI,EAAE,IAAI;0BACjB,MAAC,mBAAK,OAAO,CAAC,IAAI,EAAE,IAAI,KAAK,WAAW,KAAK;0BAC7C,MAAC,mBAAK;0BACN,MAAC,mCAAK,GAAO,KAAK;;;0BAClB,MAAC,mCAAK,KAAK,GAAO,KAAK;;;0BACvB,MAAC,mCAAK,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI;;;0BAC7B,MAAC,mCAAK,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS;;;0BACzC,MAAC,mBAAK;0BACN,MAAC,mBAAK,IAAI,KAAK;0BACf,MAAC,mBAAK,IAAI,KAAK,GAAG;0BAClB,MAAC,mBAAK;0BACN,MAAC,mBAAK,YAAY,KAAK;0BACvB,MAAC,mBAAK,YAAY,KAAK,GAAG;0BAC1B,MAAC,mBAAK,OAAO,KAAK;0BAClB,MAAC,mBAAK,OAAO,KAAK,GAAG;0BACrB,MAAC,mBAAK,QAAQ;0BACd,MAAC,mBAAK,OAAO,KAAK,GAAG;;;AAGjC;AA5BA,OAAO,MAAM,oBAAM,+FA4BhB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;AACA,SAAqB,QAAQ,EAAE,OAAO,QAAQ,mBAAmB;AAEjE,SAAQ,GAAG,QAAO,SAAS;0CAEW,CAAC;IACnC,qBACI;;0BACI,MAAC;gBAAI;gCAAU,EAAK,CAAC,UAAU;;;;0BAC/B,MAAC;gBAAI;gCAAQ,GAAM,KAAK;;;;;;AAGpC;AAPA,OAAO,MAAM,4BAAc,+GAOxB;kCAE2B;IAC1B,MAAM,SAAS,UAAU;IACzB,MAAM,QAAQ,SAAS,CAAC;IACxB,qBACI;;0BACI,MAAC,mBAAI;0BACL,MAAC,mBAAK,CAAC,IAAI,CAAC;0BACZ,MAAC,mBAAK;0BACN,MAAC,mBAAK;0BACN,MAAC,mBAAK,CAAC,IAAI,EAAE,IAAI;0BACjB,MAAC,mBAAK,OAAO,CAAC,IAAI,EAAE,IAAI,KAAK,WAAW,KAAK;0BAC7C,MAAC,mBAAK;0BACN,MAAC,mCAAK,GAAO,KAAK;;;0BAClB,MAAC,mCAAK,KAAK,GAAO,KAAK;;;0BACvB,MAAC,mCAAK,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI;;;0BAC7B,MAAC,mCAAK,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS;;;0BACzC,MAAC,mBAAK;0BACN,MAAC,mBAAK,IAAI,KAAK;0BACf,MAAC,mBAAK,IAAI,KAAK,GAAG;0BAClB,MAAC,mBAAK;0BACN,MAAC,mBAAK,YAAY,KAAK;0BACvB,MAAC,mBAAK,YAAY,KAAK,GAAG;0BAC1B,MAAC,mBAAK,OAAO,KAAK;0BAClB,MAAC,mBAAK,OAAO,KAAK,GAAG;0BACrB,MAAC,mBAAK,QAAQ;0BACd,MAAC,mBAAK,OAAO,KAAK,GAAG;;;AAGjC;AA5BA,OAAO,MAAM,oBAAM,+FA4BhB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_cmp.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_cmp.snap index 5fed14de3a3..77591edb7bc 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_cmp.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_cmp.snap @@ -48,7 +48,7 @@ export const App = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { _IMMUTABLE } from "@builder.io/qwik"; @@ -58,7 +58,7 @@ import { inlinedQrl } from "@builder.io/qwik"; import { useStore, mutable } from '@builder.io/qwik'; import { dep } from './file'; import { Cmp } from './cmp'; -const App_component_ckEPmXZlub0 = ()=>{ +const App_component_F6JpluHHZ5A = ()=>{ const signal = useSignal(0); const store = useStore({}); return /*#__PURE__*/ _jsxC(Cmp, { @@ -138,12 +138,12 @@ const App_component_ckEPmXZlub0 = ()=>{ signal ], "p0.value+unknown()") } - }, 3, "u6_0"); + }, 3, "oJ_0"); }; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_ckEPmXZlub0, "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_F6JpluHHZ5A, "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AACA,SAAqB,QAAQ,EAAE,OAAO,QAAQ,mBAAmB;AAEjE,SAAQ,GAAG,QAAO,SAAS;AAC3B,SAAQ,GAAG,QAAO,QAAQ;kCAEI;IAC1B,MAAM,SAAS,UAAU;IACzB,MAAM,QAAQ,SAAS,CAAC;IACxB,qBACI,MAAC;QACG,YAAW;QACX,aAAa,CAAC,IAAI,CAAC;QACnB,cAAc;QACd,eAAe;QACf,YAAY,CAAC,IAAI,EAAE,IAAI;QACvB,aAAa,OAAO,CAAC,IAAI,EAAE,IAAI,KAAK,WAAW,KAAK;QAEpD,QAAQ;YACR;mBAAa,OAAO,KAAK;;YACzB;mBAAqB,KAAK,OAAO,KAAK;;YAEtC;mBAAO,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI;;YAC9B;mBAAe,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS;;QAElD,KAAK;YACL;mBAAW,IAAI,KAAK;;YACpB;mBAAa,IAAI,KAAK,GAAG;;YAEzB;mBAAQ;;YACR;mBAAc,YAAY,KAAK;;YAC/B;mBAAgB,YAAY,KAAK,GAAG;;YAGpC;mBAAU,OAAO,KAAK;;YACtB;mBAAW,OAAO,KAAK,GAAG;;QAC1B,WAAW,QAAQ;QACnB,WAAW,OAAO,KAAK,GAAG;;YA1B1B,UAAU;YACV,WAAW;YACX,YAAY;YACZ,aAAa;YACb,UAAU;YACV,WAAW;YAEX,MAAM;YACN,WAAW,kBAAE,GAAO,KAAK;;;YACzB,mBAAmB,kBAAE,KAAK,GAAO,KAAK;;;YAEtC,KAAK,kBAAE,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI;;;YAC9B,aAAa,kBAAE,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS;;;YAElD,GAAG;YACH,SAAS;YACT,WAAW;YAEX,MAAM;YACN,YAAY;YACZ,cAAc;YAGd,QAAQ,kBAAE,GAAO,KAAK;;;YACtB,SAAS,kBAAE,GAAO,KAAK,GAAG;;;;;AAKtC;AAlCA,OAAO,MAAM,oBAAM,+FAkChB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AACA,SAAqB,QAAQ,EAAE,OAAO,QAAQ,mBAAmB;AAEjE,SAAQ,GAAG,QAAO,SAAS;AAC3B,SAAQ,GAAG,QAAO,QAAQ;kCAEI;IAC1B,MAAM,SAAS,UAAU;IACzB,MAAM,QAAQ,SAAS,CAAC;IACxB,qBACI,MAAC;QACG,YAAW;QACX,aAAa,CAAC,IAAI,CAAC;QACnB,cAAc;QACd,eAAe;QACf,YAAY,CAAC,IAAI,EAAE,IAAI;QACvB,aAAa,OAAO,CAAC,IAAI,EAAE,IAAI,KAAK,WAAW,KAAK;QAEpD,QAAQ;YACR;mBAAa,OAAO,KAAK;;YACzB;mBAAqB,KAAK,OAAO,KAAK;;YAEtC;mBAAO,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI;;YAC9B;mBAAe,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS;;QAElD,KAAK;YACL;mBAAW,IAAI,KAAK;;YACpB;mBAAa,IAAI,KAAK,GAAG;;YAEzB;mBAAQ;;YACR;mBAAc,YAAY,KAAK;;YAC/B;mBAAgB,YAAY,KAAK,GAAG;;YAGpC;mBAAU,OAAO,KAAK;;YACtB;mBAAW,OAAO,KAAK,GAAG;;QAC1B,WAAW,QAAQ;QACnB,WAAW,OAAO,KAAK,GAAG;;YA1B1B,UAAU;YACV,WAAW;YACX,YAAY;YACZ,aAAa;YACb,UAAU;YACV,WAAW;YAEX,MAAM;YACN,WAAW,kBAAE,GAAO,KAAK;;;YACzB,mBAAmB,kBAAE,KAAK,GAAO,KAAK;;;YAEtC,KAAK,kBAAE,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI;;;YAC9B,aAAa,kBAAE,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS;;;YAElD,GAAG;YACH,SAAS;YACT,WAAW;YAEX,MAAM;YACN,YAAY;YACZ,cAAc;YAGd,QAAQ,kBAAE,GAAO,KAAK;;;YACtB,SAAS,kBAAE,GAAO,KAAK,GAAG;;;;;AAKtC;AAlCA,OAAO,MAAM,oBAAM,+FAkChB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_complext_children.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_complext_children.snap index e6cb3804109..2baff9307bf 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_complext_children.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_complext_children.snap @@ -27,7 +27,7 @@ export const App = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; @@ -35,7 +35,7 @@ import { _jsxC } from "@builder.io/qwik"; import { inlinedQrl } from "@builder.io/qwik"; import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { useStore } from '@builder.io/qwik'; -const App_component_ckEPmXZlub0 = ()=>{ +const App_component_F6JpluHHZ5A = ()=>{ useSignal(0); const store = useStore({}); return /*#__PURE__*/ _jsxC(_Fragment, { @@ -45,13 +45,13 @@ const App_component_ckEPmXZlub0 = ()=>{ key, " - ", value - ], 1, "u6_0")), 1, null) - }, 1, "u6_1"); + ], 1, "oJ_0")), 1, null) + }, 1, "oJ_1"); }; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_ckEPmXZlub0, "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_F6JpluHHZ5A, "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AACA,SAAqB,QAAQ,QAAiB,mBAAmB;kCAInC;IACX,UAAU;IACzB,MAAM,QAAQ,SAAS,CAAC;IACxB,qBACI;kBACI,cAAA,MAAC;YAAG,IAAG;WACF,OAAO,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,iBACxC,MAAC;gBACI;gBAAI;gBAAI;;;AAM7B;AAdA,OAAO,MAAM,oBAAM,+FAchB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AACA,SAAqB,QAAQ,QAAiB,mBAAmB;kCAInC;IACX,UAAU;IACzB,MAAM,QAAQ,SAAS,CAAC;IACxB,qBACI;kBACI,cAAA,MAAC;YAAG,IAAG;WACF,OAAO,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,iBACxC,MAAC;gBACI;gBAAI;gBAAI;;;AAM7B;AAdA,OAAO,MAAM,oBAAM,+FAchB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_div.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_div.snap index 64999a4b554..580b9fa78ce 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_div.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_div.snap @@ -59,7 +59,7 @@ export const App = component$((props) => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { _fnSignal } from "@builder.io/qwik"; @@ -68,7 +68,7 @@ import { inlinedQrl } from "@builder.io/qwik"; import { useStore, mutable } from '@builder.io/qwik'; import { dep } from './file'; import styles from './styles.module.css'; -const App_component_ckEPmXZlub0 = (props)=>{ +const App_component_F6JpluHHZ5A = (props)=>{ const signal = useSignal(0); const store = useStore({}); const count = props.counter.count; @@ -115,12 +115,12 @@ const App_component_ckEPmXZlub0 = (props)=>{ noInline2: _fnSignal((p0)=>p0.value + unknown(), [ signal ], "p0.value+unknown()") - }, null, 3, "u6_0"); + }, null, 3, "oJ_0"); }; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_ckEPmXZlub0, "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_F6JpluHHZ5A, "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;AACA,SAAqB,QAAQ,EAAE,OAAO,QAAQ,mBAAmB;AAEjE,SAAQ,GAAG,QAAO,SAAS;AAC3B,OAAO,YAAY,sBAAsB;kCAEX,CAAC;IAC3B,MAAM,SAAS,UAAU;IACzB,MAAM,QAAQ,SAAS,CAAC;IACxB,MAAM,QAAQ,MAAM,OAAO,CAAC,KAAK;IAEjC,qBACI,MAAC;QACG,OAAO;YACH,MAAM,QAAQ,MAAM;YACpB,KAAK,QAAQ,MAAM;YACnB,SAAS;YACT,QAAQ;QACZ;QA4BA,WAAW,QAAQ;QACnB,WAAW,OAAO,KAAK,GAAG;;QA5B1B,aAAa,OAAO,GAAG;QACvB,gBAAgB,OAAO,QAAQ;QAC/B,YAAW;QACX,aAAa,CAAC,IAAI,CAAC;QACnB,cAAc;QACd,eAAe;QACf,YAAY,CAAC,IAAI,EAAE,IAAI;QACvB,aAAa,OAAO,CAAC,IAAI,EAAE,IAAI,KAAK,WAAW,KAAK;QAEpD,QAAQ;QACR,WAAW,kBAAE,GAAO,KAAK;;;QACzB,mBAAmB,kBAAE,KAAK,GAAO,KAAK;;;QAEtC,KAAK,kBAAE,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI;;;QAC9B,aAAa,kBAAE,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS;;;QAElD,KAAK;QACL,WAAW,IAAI,KAAK;QACpB,aAAa,IAAI,KAAK,GAAG;QAEzB,QAAQ;QACR,cAAc,YAAY,KAAK;QAC/B,gBAAgB,YAAY,KAAK,GAAG;QAGpC,QAAQ,kBAAE,GAAO,KAAK;;;QACtB,SAAS,kBAAE,GAAO,KAAK,GAAG;;;;AAMtC;AA7CA,OAAO,MAAM,oBAAM,+FA6ChB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;AACA,SAAqB,QAAQ,EAAE,OAAO,QAAQ,mBAAmB;AAEjE,SAAQ,GAAG,QAAO,SAAS;AAC3B,OAAO,YAAY,sBAAsB;kCAEX,CAAC;IAC3B,MAAM,SAAS,UAAU;IACzB,MAAM,QAAQ,SAAS,CAAC;IACxB,MAAM,QAAQ,MAAM,OAAO,CAAC,KAAK;IAEjC,qBACI,MAAC;QACG,OAAO;YACH,MAAM,QAAQ,MAAM;YACpB,KAAK,QAAQ,MAAM;YACnB,SAAS;YACT,QAAQ;QACZ;QA4BA,WAAW,QAAQ;QACnB,WAAW,OAAO,KAAK,GAAG;;QA5B1B,aAAa,OAAO,GAAG;QACvB,gBAAgB,OAAO,QAAQ;QAC/B,YAAW;QACX,aAAa,CAAC,IAAI,CAAC;QACnB,cAAc;QACd,eAAe;QACf,YAAY,CAAC,IAAI,EAAE,IAAI;QACvB,aAAa,OAAO,CAAC,IAAI,EAAE,IAAI,KAAK,WAAW,KAAK;QAEpD,QAAQ;QACR,WAAW,kBAAE,GAAO,KAAK;;;QACzB,mBAAmB,kBAAE,KAAK,GAAO,KAAK;;;QAEtC,KAAK,kBAAE,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI;;;QAC9B,aAAa,kBAAE,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS;;;QAElD,KAAK;QACL,WAAW,IAAI,KAAK;QACpB,aAAa,IAAI,KAAK,GAAG;QAEzB,QAAQ;QACR,cAAc,YAAY,KAAK;QAC/B,gBAAgB,YAAY,KAAK,GAAG;QAGpC,QAAQ,kBAAE,GAAO,KAAK;;;QACtB,SAAS,kBAAE,GAAO,KAAK,GAAG;;;;AAMtC;AA7CA,OAAO,MAAM,oBAAM,+FA6ChB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_multiple_children.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_multiple_children.snap index 4183a6bc997..735b8dde9cb 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_multiple_children.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_derived_signals_multiple_children.snap @@ -41,7 +41,7 @@ export const App = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; @@ -51,7 +51,7 @@ import { inlinedQrl } from "@builder.io/qwik"; import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { useStore, mutable } from '@builder.io/qwik'; import { dep } from './file'; -const App_component_ckEPmXZlub0 = ()=>{ +const App_component_F6JpluHHZ5A = ()=>{ const signal = useSignal(0); const store = useStore({}); return /*#__PURE__*/ _jsxC(_Fragment, { @@ -146,12 +146,12 @@ const App_component_ckEPmXZlub0 = ()=>{ signal.value + dep ], 1, null) ] - }, 1, "u6_0"); + }, 1, "oJ_0"); }; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_ckEPmXZlub0, "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_F6JpluHHZ5A, "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;AACA,SAAqB,QAAQ,EAAE,OAAO,QAAQ,mBAAmB;AAEjE,SAAQ,GAAG,QAAO,SAAS;kCAEG;IAC1B,MAAM,SAAS,UAAU;IACzB,MAAM,QAAQ,SAAS,CAAC;IACxB,qBACI;;0BACI,MAAC,mBAAI;0BACL,MAAC;gBAAI;gBAAO,CAAC,IAAI,CAAC;;0BAClB,MAAC;gBAAI;gBAAO;;0BACZ,MAAC;gBAAI;gBAAO;;0BACZ,MAAC;gBAAI;gBAAO,CAAC,IAAI,EAAE,IAAI;;0BACvB,MAAC;gBAAI;gBAAO,OAAO,CAAC,IAAI,EAAE,IAAI,KAAK,WAAW,KAAK;;0BACnD,MAAC;gBAAI;gBAAO;;0BACZ,MAAC;gBAAI;gCAAO,GAAO,KAAK;;;;0BACxB,MAAC;gBAAI;gCAAO,KAAK,GAAO,KAAK;;;;0BAC7B,MAAC;gBAAI;gCAAO,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI;;;;0BACnC,MAAC;gBAAI;gCAAO,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS;;;;0BAC/C,MAAC;gBAAI;gBAAO;;0BACZ,MAAC;gBAAI;gBAAO,IAAI,KAAK;;0BACrB,MAAC;gBAAI;gBAAO,IAAI,KAAK,GAAG;;0BACxB,MAAC;gBAAI;gBAAO;;0BACZ,MAAC;gBAAI;gBAAO,YAAY,KAAK;;0BAC7B,MAAC;gBAAI;gBAAO,YAAY,KAAK,GAAG;;0BAChC,MAAC;gBAAI;gBAAO,OAAO,KAAK;;0BACxB,MAAC;gBAAI;gBAAO,OAAO,KAAK,GAAG;;0BAC3B,MAAC;gBAAI;gBAAO,QAAQ;;0BACpB,MAAC;gBAAI;gBAAO,OAAO,KAAK,GAAG;;;;AAGvC;AA5BA,OAAO,MAAM,oBAAM,+FA4BhB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;AACA,SAAqB,QAAQ,EAAE,OAAO,QAAQ,mBAAmB;AAEjE,SAAQ,GAAG,QAAO,SAAS;kCAEG;IAC1B,MAAM,SAAS,UAAU;IACzB,MAAM,QAAQ,SAAS,CAAC;IACxB,qBACI;;0BACI,MAAC,mBAAI;0BACL,MAAC;gBAAI;gBAAO,CAAC,IAAI,CAAC;;0BAClB,MAAC;gBAAI;gBAAO;;0BACZ,MAAC;gBAAI;gBAAO;;0BACZ,MAAC;gBAAI;gBAAO,CAAC,IAAI,EAAE,IAAI;;0BACvB,MAAC;gBAAI;gBAAO,OAAO,CAAC,IAAI,EAAE,IAAI,KAAK,WAAW,KAAK;;0BACnD,MAAC;gBAAI;gBAAO;;0BACZ,MAAC;gBAAI;gCAAO,GAAO,KAAK;;;;0BACxB,MAAC;gBAAI;gCAAO,KAAK,GAAO,KAAK;;;;0BAC7B,MAAC;gBAAI;gCAAO,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI;;;;0BACnC,MAAC;gBAAI;gCAAO,GAAM,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS;;;;0BAC/C,MAAC;gBAAI;gBAAO;;0BACZ,MAAC;gBAAI;gBAAO,IAAI,KAAK;;0BACrB,MAAC;gBAAI;gBAAO,IAAI,KAAK,GAAG;;0BACxB,MAAC;gBAAI;gBAAO;;0BACZ,MAAC;gBAAI;gBAAO,YAAY,KAAK;;0BAC7B,MAAC;gBAAI;gBAAO,YAAY,KAAK,GAAG;;0BAChC,MAAC;gBAAI;gBAAO,OAAO,KAAK;;0BACxB,MAAC;gBAAI;gBAAO,OAAO,KAAK,GAAG;;0BAC3B,MAAC;gBAAI;gBAAO,QAAQ;;0BACpB,MAAC;gBAAI;gBAAO,OAAO,KAAK,GAAG;;;;AAGvC;AA5BA,OAAO,MAAM,oBAAM,+FA4BhB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dev_mode.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dev_mode.snap index 011f9829bb0..ce152d79aa7 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dev_mode.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dev_mode.snap @@ -17,57 +17,83 @@ export const App = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrlDEV } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrlDEV(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0", { - file: "test.tsx", +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrlDEV(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A", { + file: "src/test.tsx", lo: 90, hi: 229, displayName: "test.tsx_App_component" })); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM;;;;;IAMhB\"}") -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM;;;;;IAMhB\"}") +============================= src/test.tsx_App_component_Cmp_p_onClick_44EtmIdf4XQ.js (ENTRY POINT)== + +export const App_component_Cmp_p_onClick_44EtmIdf4XQ = ()=>console.log('warn'); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"uDAMuC,IAAM,QAAQ,GAAG,CAAC\"}") +/* +{ + "origin": "src/test.tsx", + "name": "App_component_Cmp_p_onClick_44EtmIdf4XQ", + "entry": null, + "displayName": "test.tsx_App_component_Cmp_p_onClick", + "hash": "44EtmIdf4XQ", + "canonicalFilename": "test.tsx_App_component_Cmp_p_onClick_44EtmIdf4XQ", + "path": "src", + "extension": "js", + "parent": "App_component_F6JpluHHZ5A", + "ctxKind": "eventHandler", + "ctxName": "onClick$", + "captures": false, + "loc": [ + 164, + 189 + ] +} +*/ +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { qrlDEV } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ()=>{ +export const App_component_F6JpluHHZ5A = ()=>{ return /*#__PURE__*/ _jsxC(Cmp, { children: /*#__PURE__*/ _jsxQ("p", null, { class: "stuff", - onClick$: /*#__PURE__*/ qrlDEV(()=>import("./test.tsx_App_component_Cmp_p_onClick_vuXzfUTkpto"), "App_component_Cmp_p_onClick_vuXzfUTkpto", { - file: "test.tsx", + onClick$: /*#__PURE__*/ qrlDEV(()=>import("./test.tsx_App_component_Cmp_p_onClick_44EtmIdf4XQ"), "App_component_Cmp_p_onClick_44EtmIdf4XQ", { + file: "src/test.tsx", lo: 164, hi: 189, displayName: "test.tsx_App_component_Cmp_p_onClick" }) }, "Hello Qwik", 3, null, { - fileName: "test.tsx", + fileName: "src/test.tsx", lineNumber: 7, columnNumber: 13 }) - }, 3, "u6_0", { - fileName: "test.tsx", + }, 3, "oJ_0", { + fileName: "src/test.tsx", lineNumber: 6, columnNumber: 9 }); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;yCAG8B;IAC1B,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YAAQ,QAAQ;;;;;;WAA6B;;;;;;;;;;AAGlE\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;yCAG8B;IAC1B,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YAAQ,QAAQ;;;;;;WAA6B;;;;;;;;;;AAGlE\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -79,32 +105,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_Cmp_p_onClick_vuXzfUTkpto.js (ENTRY POINT)== - -export const App_component_Cmp_p_onClick_vuXzfUTkpto = ()=>console.log('warn'); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"uDAMuC,IAAM,QAAQ,GAAG,CAAC\"}") -/* -{ - "origin": "test.tsx", - "name": "App_component_Cmp_p_onClick_vuXzfUTkpto", - "entry": null, - "displayName": "test.tsx_App_component_Cmp_p_onClick", - "hash": "vuXzfUTkpto", - "canonicalFilename": "test.tsx_App_component_Cmp_p_onClick_vuXzfUTkpto", - "path": "", - "extension": "js", - "parent": "App_component_ckEPmXZlub0", - "ctxKind": "eventHandler", - "ctxName": "onClick$", - "captures": false, - "loc": [ - 164, - 189 - ] -} -*/ == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dev_mode_inlined.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dev_mode_inlined.snap index f14e55631f8..aa7621c3c37 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dev_mode_inlined.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_dev_mode_inlined.snap @@ -17,7 +17,7 @@ export const App = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { inlinedQrlDEV } from "@builder.io/qwik"; @@ -27,31 +27,31 @@ export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrlDEV(()=>{ return /*#__PURE__*/ _jsxC(Cmp, { children: /*#__PURE__*/ _jsxQ("p", null, { class: "stuff", - onClick$: /*#__PURE__*/ inlinedQrlDEV(()=>console.log('warn'), "App_component_Cmp_p_onClick_vuXzfUTkpto", { - file: "test.tsx", + onClick$: /*#__PURE__*/ inlinedQrlDEV(()=>console.log('warn'), "App_component_Cmp_p_onClick_44EtmIdf4XQ", { + file: "src/test.tsx", lo: 164, hi: 189, displayName: "test.tsx_App_component_Cmp_p_onClick" }) }, "Hello Qwik", 3, null, { - fileName: "test.tsx", + fileName: "src/test.tsx", lineNumber: 7, columnNumber: 13 }) - }, 3, "u6_0", { - fileName: "test.tsx", + }, 3, "oJ_0", { + fileName: "src/test.tsx", lineNumber: 6, columnNumber: 9 }); -}, "App_component_ckEPmXZlub0", { - file: "test.tsx", +}, "App_component_F6JpluHHZ5A", { + file: "src/test.tsx", lo: 90, hi: 229, displayName: "test.tsx_App_component" })); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;AAGA,OAAO,MAAM,oBAAM,yCAAW;IAC1B,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YAAQ,QAAQ,8BAAE,IAAM,QAAQ,GAAG,CAAC;;;;;;WAAS;;;;;;;;;;AAGlE;;;;;IAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;AAGA,OAAO,MAAM,oBAAM,yCAAW;IAC1B,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YAAQ,QAAQ,8BAAE,IAAM,QAAQ,GAAG,CAAC;;;;;;WAAS;;;;;;;;;;AAGlE;;;;;IAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_drop_side_effects.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_drop_side_effects.snap index 7737987ae82..077783f484e 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_drop_side_effects.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_drop_side_effects.snap @@ -36,7 +36,48 @@ export default component$(() => { ) }); -============================= test.js == +============================= src/test.tsx_test_component_r7Fl19tSLhk.js (ENTRY POINT)== + +import { _jsxQ } from "@builder.io/qwik"; +import { qrlDEV } from "@builder.io/qwik"; +export const test_component_r7Fl19tSLhk = ()=>{ + return /*#__PURE__*/ _jsxQ("button", null, { + onClick$: /*#__PURE__*/ qrlDEV(()=>import("./test.tsx_test_component_button_onClick_pUqBSniOWcc"), "test_component_button_onClick_pUqBSniOWcc", { + file: "src/test.tsx", + lo: 567, + hi: 584, + displayName: "test.tsx_test_component_button_onClick" + }) + }, null, 3, "oJ_0", { + fileName: "src/test.tsx", + lineNumber: 27, + columnNumber: 7 + }); +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;0CAwB0B;IACtB,qBACE,MAAC;QAAO,QAAQ;;;;;;;;;;;AAEpB\"}") +/* +{ + "origin": "src/test.tsx", + "name": "test_component_r7Fl19tSLhk", + "entry": null, + "displayName": "test.tsx_test_component", + "hash": "r7Fl19tSLhk", + "canonicalFilename": "test.tsx_test_component_r7Fl19tSLhk", + "path": "src", + "extension": "js", + "parent": null, + "ctxKind": "function", + "ctxName": "component$", + "captures": false, + "loc": [ + 522, + 605 + ] +} +*/ +============================= src/test.js == import { serverQrl } from "@builder.io/qwik-city"; import { _noopQrlDEV } from "@builder.io/qwik"; @@ -50,39 +91,39 @@ import { sideEffect } from './secret'; console.log('run'); })(); sideEffect(); -export const api = serverQrl(/*#__PURE__*/ _noopQrlDEV("api_server_JonPp043gH0", { - file: "test.tsx", +export const api = serverQrl(/*#__PURE__*/ _noopQrlDEV("api_server_5GoX0lDOyJQ", { + file: "src/test.tsx", lo: 0, hi: 0, displayName: "test.tsx_api_server" })); -export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrlDEV(()=>import("./test.tsx_test_component_LUXeXe0DQrg"), "test_component_LUXeXe0DQrg", { - file: "test.tsx", +export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrlDEV(()=>import("./test.tsx_test_component_r7Fl19tSLhk"), "test_component_r7Fl19tSLhk", { + file: "src/test.tsx", lo: 522, hi: 605, displayName: "test.tsx_test_component" })); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;AAMA,SAAS,UAAU,QAAQ,WAAW;AAKtC,CAAC;IACG,QAAQ,GAAG,CAAC;AACd,CAAC;AACD,CAAC;IACC,QAAQ,GAAG,CAAC;AACd,CAAC;AAEH;AAEA,OAAO,MAAM,MAAM;;;;;IAEhB;AAEH,6BAAe;;;;;IAIV\"}") -============================= test.tsx_test_component_button_onClick_DGk9xLyRokA.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;AAMA,SAAS,UAAU,QAAQ,WAAW;AAKtC,CAAC;IACG,QAAQ,GAAG,CAAC;AACd,CAAC;AACD,CAAC;IACC,QAAQ,GAAG,CAAC;AACd,CAAC;AAEH;AAEA,OAAO,MAAM,MAAM;;;;;IAEhB;AAEH,6BAAe;;;;;IAIV\"}") +============================= src/test.tsx_test_component_button_onClick_pUqBSniOWcc.js (ENTRY POINT)== import { api } from "./test"; -export const test_component_button_onClick_DGk9xLyRokA = ()=>await api(); +export const test_component_button_onClick_pUqBSniOWcc = ()=>await api(); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yDA0BwB,IAAM,MAAM\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yDA0BwB,IAAM,MAAM\"}") /* { - "origin": "test.tsx", - "name": "test_component_button_onClick_DGk9xLyRokA", + "origin": "src/test.tsx", + "name": "test_component_button_onClick_pUqBSniOWcc", "entry": null, "displayName": "test.tsx_test_component_button_onClick", - "hash": "DGk9xLyRokA", - "canonicalFilename": "test.tsx_test_component_button_onClick_DGk9xLyRokA", - "path": "", + "hash": "pUqBSniOWcc", + "canonicalFilename": "test.tsx_test_component_button_onClick_pUqBSniOWcc", + "path": "src", "extension": "js", - "parent": "test_component_LUXeXe0DQrg", + "parent": "test_component_r7Fl19tSLhk", "ctxKind": "eventHandler", "ctxName": "onClick$", "captures": false, @@ -92,47 +133,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_test_component_LUXeXe0DQrg.js (ENTRY POINT)== - -import { _jsxQ } from "@builder.io/qwik"; -import { qrlDEV } from "@builder.io/qwik"; -export const test_component_LUXeXe0DQrg = ()=>{ - return /*#__PURE__*/ _jsxQ("button", null, { - onClick$: /*#__PURE__*/ qrlDEV(()=>import("./test.tsx_test_component_button_onClick_DGk9xLyRokA"), "test_component_button_onClick_DGk9xLyRokA", { - file: "test.tsx", - lo: 567, - hi: 584, - displayName: "test.tsx_test_component_button_onClick" - }) - }, null, 3, "u6_0", { - fileName: "test.tsx", - lineNumber: 27, - columnNumber: 7 - }); -}; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;0CAwB0B;IACtB,qBACE,MAAC;QAAO,QAAQ;;;;;;;;;;;AAEpB\"}") -/* -{ - "origin": "test.tsx", - "name": "test_component_LUXeXe0DQrg", - "entry": null, - "displayName": "test.tsx_test_component", - "hash": "LUXeXe0DQrg", - "canonicalFilename": "test.tsx_test_component_LUXeXe0DQrg", - "path": "", - "extension": "js", - "parent": null, - "ctxKind": "function", - "ctxName": "component$", - "captures": false, - "loc": [ - 522, - 605 - ] -} -*/ == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_explicit_ext_no_transpile.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_explicit_ext_no_transpile.snap index ff234b9d8fa..92843a322bf 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_explicit_ext_no_transpile.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_explicit_ext_no_transpile.snap @@ -16,60 +16,61 @@ export const App = component$((props) => { )); }); -============================= test.tsx == +============================= src/test.tsx == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0.tsx"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A.tsx"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,qHAKhB\"}") -============================= test.tsx_App_component_useStyles_t35nSa5UV7U.tsx == +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,qHAKhB\"}") +============================= src/test.tsx_App_component_1_10FTcCMrdRw.tsx == -export const App_component_useStyles_t35nSa5UV7U = 'hola'; +export const App_component_1_10FTcCMrdRw = ()=>
; +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mDAIe\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"2CAKa,KACJ,MAAM\"}") /* { - "origin": "test.tsx", - "name": "App_component_useStyles_t35nSa5UV7U", + "origin": "src/test.tsx", + "name": "App_component_1_10FTcCMrdRw", "entry": "entry_segments", - "displayName": "test.tsx_App_component_useStyles", - "hash": "t35nSa5UV7U", - "canonicalFilename": "test.tsx_App_component_useStyles_t35nSa5UV7U", - "path": "", + "displayName": "test.tsx_App_component_1", + "hash": "10FTcCMrdRw", + "canonicalFilename": "test.tsx_App_component_1_10FTcCMrdRw", + "path": "src", "extension": "tsx", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", - "ctxName": "useStyles$", + "ctxName": "$", "captures": false, "loc": [ - 123, - 129 + 145, + 178 ] } */ -============================= test.tsx_App_component_ckEPmXZlub0.tsx == +============================= src/test.tsx_App_component_F6JpluHHZ5A.tsx == import { qrl } from "@builder.io/qwik"; import { useStylesQrl } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = (props)=>{ - useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useStyles_t35nSa5UV7U.tsx"), "App_component_useStyles_t35nSa5UV7U")); - return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_w0t0o3QMovU.tsx"), "App_component_1_w0t0o3QMovU"); +export const App_component_F6JpluHHZ5A = (props)=>{ + useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useStyles_ya0IZ2trrfA.tsx"), "App_component_useStyles_ya0IZ2trrfA")); + return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_10FTcCMrdRw.tsx"), "App_component_1_10FTcCMrdRw"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAG8B,CAAC;IAC3B;IACA;AAGJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAG8B,CAAC;IAC3B;IACA;AAGJ\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": "entry_segments", "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -81,30 +82,29 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_1_w0t0o3QMovU.tsx == +============================= src/test.tsx_App_component_useStyles_ya0IZ2trrfA.tsx == -export const App_component_1_w0t0o3QMovU = ()=>
; -export { _hW } from "@builder.io/qwik"; +export const App_component_useStyles_ya0IZ2trrfA = 'hola'; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"2CAKa,KACJ,MAAM\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mDAIe\"}") /* { - "origin": "test.tsx", - "name": "App_component_1_w0t0o3QMovU", + "origin": "src/test.tsx", + "name": "App_component_useStyles_ya0IZ2trrfA", "entry": "entry_segments", - "displayName": "test.tsx_App_component_1", - "hash": "w0t0o3QMovU", - "canonicalFilename": "test.tsx_App_component_1_w0t0o3QMovU", - "path": "", + "displayName": "test.tsx_App_component_useStyles", + "hash": "ya0IZ2trrfA", + "canonicalFilename": "test.tsx_App_component_useStyles_ya0IZ2trrfA", + "path": "src", "extension": "tsx", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", - "ctxName": "$", + "ctxName": "useStyles$", "captures": false, "loc": [ - 145, - 178 + 123, + 129 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_explicit_ext_transpile.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_explicit_ext_transpile.snap index 3af09df6e72..4f77e27b43a 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_explicit_ext_transpile.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_explicit_ext_transpile.snap @@ -16,60 +16,62 @@ export const App = component$((props) => { )); }); -============================= test.js == +============================= src/test.tsx_App_component_1_10FTcCMrdRw.js (ENTRY POINT)== -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0.js"), "App_component_ckEPmXZlub0")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,oHAKhB\"}") -============================= test.tsx_App_component_useStyles_t35nSa5UV7U.js (ENTRY POINT)== - -export const App_component_useStyles_t35nSa5UV7U = 'hola'; +import { _jsxQ } from "@builder.io/qwik"; +export const App_component_1_10FTcCMrdRw = ()=>/*#__PURE__*/ _jsxQ("div", null, null, null, 3, "oJ_0"); +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mDAIe\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";2CAKa,kBACL,MAAC\"}") /* { - "origin": "test.tsx", - "name": "App_component_useStyles_t35nSa5UV7U", + "origin": "src/test.tsx", + "name": "App_component_1_10FTcCMrdRw", "entry": null, - "displayName": "test.tsx_App_component_useStyles", - "hash": "t35nSa5UV7U", - "canonicalFilename": "test.tsx_App_component_useStyles_t35nSa5UV7U", - "path": "", + "displayName": "test.tsx_App_component_1", + "hash": "10FTcCMrdRw", + "canonicalFilename": "test.tsx_App_component_1_10FTcCMrdRw", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", - "ctxName": "useStyles$", + "ctxName": "$", "captures": false, "loc": [ - 123, - 129 + 145, + 178 ] } */ -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +============================= src/test.js == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A.js"), "App_component_F6JpluHHZ5A")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,oHAKhB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; import { useStylesQrl } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = (props)=>{ - useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useStyles_t35nSa5UV7U.js"), "App_component_useStyles_t35nSa5UV7U")); - return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_w0t0o3QMovU.js"), "App_component_1_w0t0o3QMovU"); +export const App_component_F6JpluHHZ5A = (props)=>{ + useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useStyles_ya0IZ2trrfA.js"), "App_component_useStyles_ya0IZ2trrfA")); + return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_10FTcCMrdRw.js"), "App_component_1_10FTcCMrdRw"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAG8B,CAAC;IAC3B;IACA;AAGJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAG8B,CAAC;IAC3B;IACA;AAGJ\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -81,31 +83,29 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_1_w0t0o3QMovU.js (ENTRY POINT)== +============================= src/test.tsx_App_component_useStyles_ya0IZ2trrfA.js (ENTRY POINT)== -import { _jsxQ } from "@builder.io/qwik"; -export const App_component_1_w0t0o3QMovU = ()=>/*#__PURE__*/ _jsxQ("div", null, null, null, 3, "u6_0"); -export { _hW } from "@builder.io/qwik"; +export const App_component_useStyles_ya0IZ2trrfA = 'hola'; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";2CAKa,kBACL,MAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mDAIe\"}") /* { - "origin": "test.tsx", - "name": "App_component_1_w0t0o3QMovU", + "origin": "src/test.tsx", + "name": "App_component_useStyles_ya0IZ2trrfA", "entry": null, - "displayName": "test.tsx_App_component_1", - "hash": "w0t0o3QMovU", - "canonicalFilename": "test.tsx_App_component_1_w0t0o3QMovU", - "path": "", + "displayName": "test.tsx_App_component_useStyles", + "hash": "ya0IZ2trrfA", + "canonicalFilename": "test.tsx_App_component_useStyles_ya0IZ2trrfA", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", - "ctxName": "$", + "ctxName": "useStyles$", "captures": false, "loc": [ - 145, - 178 + 123, + 129 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_export_issue.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_export_issue.snap index 68d9c13ceaa..183388674b1 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_export_issue.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_export_issue.snap @@ -27,75 +27,75 @@ export { Other as App }; export default App; -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); -export const Root = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Root_component_royhjYaCbYE"), "Root_component_royhjYaCbYE")); +const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); +export const Root = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Root_component_yDXD6i0JpLs"), "Root_component_yDXD6i0JpLs")); const Other = 12; export { Other as App }; export default App; export { App as _auto_App }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,MAAM,oBAAM;AAOZ,OAAO,MAAM,qBAAO,mHAIjB;AAEH,MAAM,QAAQ;AACd,SAAS,SAAS,GAAG,GAAG;AAExB,eAAe,IAAI\"}") -============================= test.tsx_Root_component_royhjYaCbYE.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,MAAM,oBAAM;AAOZ,OAAO,MAAM,qBAAO,mHAIjB;AAEH,MAAM,QAAQ;AACd,SAAS,SAAS,GAAG,GAAG;AAExB,eAAe,IAAI\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== -import { _auto_App as App } from "./test"; -import { _jsxC } from "@builder.io/qwik"; -export const Root_component_royhjYaCbYE = (props)=>{ - return /*#__PURE__*/ _jsxC(App, null, 3, "u6_1"); +import { _jsxQ } from "@builder.io/qwik"; +export const App_component_F6JpluHHZ5A = ()=>{ + return /*#__PURE__*/ _jsxQ("div", null, null, "hola", 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;0CAU+B,CAAC;IAC5B,qBACI,MAAC;AAET\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAGuB;IACnB,qBACI,MAAC,mBAAI;AAEb\"}") /* { - "origin": "test.tsx", - "name": "Root_component_royhjYaCbYE", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, - "displayName": "test.tsx_Root_component", - "hash": "royhjYaCbYE", - "canonicalFilename": "test.tsx_Root_component_royhjYaCbYE", - "path": "", + "displayName": "test.tsx_App_component", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", "ctxName": "component$", "captures": false, "loc": [ - 162, - 218 + 73, + 126 ] } */ -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +============================= src/test.tsx_Root_component_yDXD6i0JpLs.js (ENTRY POINT)== -import { _jsxQ } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ()=>{ - return /*#__PURE__*/ _jsxQ("div", null, null, "hola", 3, "u6_0"); +import { _auto_App as App } from "./test"; +import { _jsxC } from "@builder.io/qwik"; +export const Root_component_yDXD6i0JpLs = (props)=>{ + return /*#__PURE__*/ _jsxC(App, null, 3, "oJ_1"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAGuB;IACnB,qBACI,MAAC,mBAAI;AAEb\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;0CAU+B,CAAC;IAC5B,qBACI,MAAC;AAET\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "Root_component_yDXD6i0JpLs", "entry": null, - "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "displayName": "test.tsx_Root_component", + "hash": "yDXD6i0JpLs", + "canonicalFilename": "test.tsx_Root_component_yDXD6i0JpLs", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", "ctxName": "component$", "captures": false, "loc": [ - 73, - 126 + 162, + 218 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component.snap index 555ac79a6a7..49bfca0ff9b 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component.snap @@ -17,26 +17,35 @@ const Header = component$(() => { ); }); -============================= test.tsx_Header_component_J4uyIhaBNR4.tsx (ENTRY POINT)== +============================= src/test.tsx == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +import { $, component$, useStore } from '@builder.io/qwik'; +const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_oO0vQsEtDrk"), "Header_component_oO0vQsEtDrk")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AACA,SAAS,CAAC,EAAE,UAAU,EAAE,QAAQ,QAAQ,mBAAmB;AAC3D,MAAM,uBAAS\"}") +============================= src/test.tsx_Header_component_oO0vQsEtDrk.tsx (ENTRY POINT)== import { useStore } from "@builder.io/qwik"; -export const Header_component_J4uyIhaBNR4 = ()=>{ +export const Header_component_oO0vQsEtDrk = ()=>{ const thing = useStore(); const { foo, bar } = foo(); return
{thing}
; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAE0B;IACtB,MAAM,QAAQ;IACd,MAAM,EAAC,GAAG,EAAE,GAAG,EAAC,GAAG;IAEnB,QACK,KAAK,QAAQ;AAEtB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAE0B;IACtB,MAAM,QAAQ;IACd,MAAM,EAAC,GAAG,EAAE,GAAG,EAAC,GAAG;IAEnB,QACK,KAAK,QAAQ;AAEtB\"}") /* { - "origin": "test.tsx", - "name": "Header_component_J4uyIhaBNR4", + "origin": "src/test.tsx", + "name": "Header_component_oO0vQsEtDrk", "entry": null, "displayName": "test.tsx_Header_component", - "hash": "J4uyIhaBNR4", - "canonicalFilename": "test.tsx_Header_component_J4uyIhaBNR4", - "path": "", + "hash": "oO0vQsEtDrk", + "canonicalFilename": "test.tsx_Header_component_oO0vQsEtDrk", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -48,15 +57,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -import { $, component$, useStore } from '@builder.io/qwik'; -const Header = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Header_component_J4uyIhaBNR4"), "Header_component_J4uyIhaBNR4")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AACA,SAAS,CAAC,EAAE,UAAU,EAAE,QAAQ,QAAQ,mBAAmB;AAC3D,MAAM,uBAAS\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component_2.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component_2.snap index 6d20a433bc9..518f4401f28 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component_2.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component_2.snap @@ -36,7 +36,7 @@ export const App = component$((props) => { ); }) -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; @@ -47,31 +47,31 @@ export const useCounter = ()=>{ }); }; export const STEP = 1; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AACA,SAAwB,QAAQ,QAAQ,mBAAmB;AAC3D,OAAO,MAAM,aAAa;IACtB,OAAO,SAAS;QAAC,OAAO;IAAC;AAC7B,EAAC;AAED,OAAO,MAAM,OAAO,EAAE;AAEtB,OAAO,MAAM,oBAAM,iHAoBjB\"}") -============================= test.tsx_App_component_div_onClick_1CGetmFZx0g.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AACA,SAAwB,QAAQ,QAAQ,mBAAmB;AAC3D,OAAO,MAAM,aAAa;IACtB,OAAO,SAAS;QAAC,OAAO;IAAC;AAC7B,EAAC;AAED,OAAO,MAAM,OAAO,EAAE;AAEtB,OAAO,MAAM,oBAAM,iHAoBjB\"}") +============================= src/test.tsx_App_component_div_onClick_NMS0rmTkj3A.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; -export const App_component_div_onClick_1CGetmFZx0g = ()=>{ +export const App_component_div_onClick_NMS0rmTkj3A = ()=>{ const [count2, state] = useLexicalScope(); return state.count += count2; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";qDAeuB;;WAAM,MAAM,KAAK,IAAE\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";qDAeuB;;WAAM,MAAM,KAAK,IAAE\"}") /* { - "origin": "test.tsx", - "name": "App_component_div_onClick_1CGetmFZx0g", + "origin": "src/test.tsx", + "name": "App_component_div_onClick_NMS0rmTkj3A", "entry": null, "displayName": "test.tsx_App_component_div_onClick", - "hash": "1CGetmFZx0g", - "canonicalFilename": "test.tsx_App_component_div_onClick_1CGetmFZx0g", - "path": "", + "hash": "NMS0rmTkj3A", + "canonicalFilename": "test.tsx_App_component_div_onClick_NMS0rmTkj3A", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "eventHandler", "ctxName": "onClick$", "captures": true, @@ -81,38 +81,7 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_div_button_onClick_f5NwW9e63a4.js (ENTRY POINT)== - -import { useLexicalScope } from "@builder.io/qwik"; -import { STEP } from "./test"; -export const App_component_div_button_onClick_f5NwW9e63a4 = ()=>{ - const [btn, props, state, thing] = useLexicalScope(); - return state.count += btn.offset + thing + STEP + 2 + props.step; -}; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;4DAmB8B;;WAAM,MAAM,KAAK,IAAI,IAAI,MAAM,GAAG,QAAQ,OARrD,IAQqE,MAAM,IAAI\"}") -/* -{ - "origin": "test.tsx", - "name": "App_component_div_button_onClick_f5NwW9e63a4", - "entry": null, - "displayName": "test.tsx_App_component_div_button_onClick", - "hash": "f5NwW9e63a4", - "canonicalFilename": "test.tsx_App_component_div_button_onClick_f5NwW9e63a4", - "path": "", - "extension": "js", - "parent": "App_component_ckEPmXZlub0", - "ctxKind": "eventHandler", - "ctxName": "onClick$", - "captures": true, - "loc": [ - 522, - 590 - ] -} -*/ -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { _fnSignal } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; @@ -120,14 +89,14 @@ import { _wrapSignal } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; import { useCounter } from "./test"; import { useStore } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = (props)=>{ +export const App_component_F6JpluHHZ5A = (props)=>{ const state = useCounter(); const thing = useStore({ thing: 0 }); const count2 = state.count * 2; return /*#__PURE__*/ _jsxQ("div", { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_div_onClick_1CGetmFZx0g"), "App_component_div_onClick_1CGetmFZx0g", [ + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_div_onClick_NMS0rmTkj3A"), "App_component_div_onClick_NMS0rmTkj3A", [ count2, state ]) @@ -136,27 +105,27 @@ export const App_component_ckEPmXZlub0 = (props)=>{ state ], "p0.count"), 3, null), buttons.map((btn)=>/*#__PURE__*/ _jsxQ("button", { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_div_button_onClick_f5NwW9e63a4"), "App_component_div_button_onClick_f5NwW9e63a4", [ + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_div_button_onClick_2ypPn3hE4LA"), "App_component_div_button_onClick_2ypPn3hE4LA", [ btn, props, state, thing ]) - }, null, _wrapSignal(btn, "name"), 0, "u6_0")) - ], 0, "u6_1"); + }, null, _wrapSignal(btn, "name"), 0, "oJ_0")) + ], 0, "oJ_1"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;yCAQ8B,CAAC;IAC3B,MAAM,QAAQ;IACd,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAGhC,MAAM,SAAS,MAAM,KAAK,GAAG;IAC7B,qBACI,MAAC;QAAI,QAAQ;;;;;sBACT,MAAC,oCAAM,GAAM,KAAK;;;QACjB,QAAQ,GAAG,CAAC,CAAA,oBACT,MAAC;gBACG,QAAQ;;;;;;iCAEP;;AAOrB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;yCAQ8B,CAAC;IAC3B,MAAM,QAAQ;IACd,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAGhC,MAAM,SAAS,MAAM,KAAK,GAAG;IAC7B,qBACI,MAAC;QAAI,QAAQ;;;;;sBACT,MAAC,oCAAM,GAAM,KAAK;;;QACjB,QAAQ,GAAG,CAAC,CAAA,oBACT,MAAC;gBACG,QAAQ;;;;;;iCAEP;;AAOrB\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -168,6 +137,37 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ +============================= src/test.tsx_App_component_div_button_onClick_2ypPn3hE4LA.js (ENTRY POINT)== + +import { useLexicalScope } from "@builder.io/qwik"; +import { STEP } from "./test"; +export const App_component_div_button_onClick_2ypPn3hE4LA = ()=>{ + const [btn, props, state, thing] = useLexicalScope(); + return state.count += btn.offset + thing + STEP + 2 + props.step; +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;4DAmB8B;;WAAM,MAAM,KAAK,IAAI,IAAI,MAAM,GAAG,QAAQ,OARrD,IAQqE,MAAM,IAAI\"}") +/* +{ + "origin": "src/test.tsx", + "name": "App_component_div_button_onClick_2ypPn3hE4LA", + "entry": null, + "displayName": "test.tsx_App_component_div_button_onClick", + "hash": "2ypPn3hE4LA", + "canonicalFilename": "test.tsx_App_component_div_button_onClick_2ypPn3hE4LA", + "path": "src", + "extension": "js", + "parent": "App_component_F6JpluHHZ5A", + "ctxKind": "eventHandler", + "ctxName": "onClick$", + "captures": true, + "loc": [ + 522, + 590 + ] +} +*/ == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component_capture_props.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component_capture_props.snap index 67069a4c94d..912bfa1b813 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component_capture_props.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_functional_component_capture_props.snap @@ -23,35 +23,91 @@ export const App = component$(({count, rest: [I2, {I3, v1: [I4], I5=v2, ...I6}, }); }) -============================= test.js == +============================= src/test.tsx_App_component_1_10FTcCMrdRw.js (ENTRY POINT)== + +import { useLexicalScope } from "@builder.io/qwik"; +import { _jsxQ } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const App_component_1_10FTcCMrdRw = ()=>{ + const [C2, C3, C4, C5, C6, C7, C8, I2, I3, I4, I5, I6, I7, I8, count, state] = useLexicalScope(); + return /*#__PURE__*/ _jsxQ("div", { + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_div_onClick_NMS0rmTkj3A"), "App_component_div_onClick_NMS0rmTkj3A", [ + count, + state + ]) + }, null, [ + I2, + I3, + I4, + I5, + I6, + I7, + I8, + C2, + C3, + C4, + C5, + C6, + C7, + C8, + v1, + v2, + v3 + ], 0, "oJ_0"); +}; +export { _hW } from "@builder.io/qwik"; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;2CAMa;;IACL,qBACI,MAAC;QAAI,QAAQ;;;;;QACR;QAAI;QAAI;QAAI;QAAI;QAAI;QAAI;QACxB;QAAI;QAAI;QAAI;QAAI;QAAI;QAAI;QACxB;QAAI;QAAI\"}") +/* +{ + "origin": "src/test.tsx", + "name": "App_component_1_10FTcCMrdRw", + "entry": null, + "displayName": "test.tsx_App_component_1", + "hash": "10FTcCMrdRw", + "canonicalFilename": "test.tsx_App_component_1_10FTcCMrdRw", + "path": "src", + "extension": "js", + "parent": "App_component_F6JpluHHZ5A", + "ctxKind": "function", + "ctxName": "$", + "captures": true, + "loc": [ + 293, + 536 + ] +} +*/ +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAYjB\"}") -============================= test.tsx_App_component_div_onClick_1CGetmFZx0g.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAYjB\"}") +============================= src/test.tsx_App_component_div_onClick_NMS0rmTkj3A.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; -export const App_component_div_onClick_1CGetmFZx0g = ()=>{ +export const App_component_div_onClick_NMS0rmTkj3A = ()=>{ const [count, state] = useLexicalScope(); return state.count += count + total; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";qDAQ2B;;WAAM,MAAM,KAAK,IAAI,QAAQ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";qDAQ2B;;WAAM,MAAM,KAAK,IAAI,QAAQ\"}") /* { - "origin": "test.tsx", - "name": "App_component_div_onClick_1CGetmFZx0g", + "origin": "src/test.tsx", + "name": "App_component_div_onClick_NMS0rmTkj3A", "entry": null, "displayName": "test.tsx_App_component_div_onClick", - "hash": "1CGetmFZx0g", - "canonicalFilename": "test.tsx_App_component_div_onClick_1CGetmFZx0g", - "path": "", + "hash": "NMS0rmTkj3A", + "canonicalFilename": "test.tsx_App_component_div_onClick_NMS0rmTkj3A", + "path": "src", "extension": "js", - "parent": "App_component_1_w0t0o3QMovU", + "parent": "App_component_1_10FTcCMrdRw", "ctxKind": "eventHandler", "ctxName": "onClick$", "captures": true, @@ -61,16 +117,16 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; import { useStore } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ({ count, rest: [I2, { I3, v1: [I4], I5 = v2, ...I6 }, I7 = v3, ...I8] })=>{ +export const App_component_F6JpluHHZ5A = ({ count, rest: [I2, { I3, v1: [I4], I5 = v2, ...I6 }, I7 = v3, ...I8] })=>{ const state = useStore({ count: 0 }); const { rest: [C2, { C3, v1: [C4], C5 = v2, ...C6 }, C7 = v3, ...C8] } = foo(); - return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_w0t0o3QMovU"), "App_component_1_w0t0o3QMovU", [ + return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_10FTcCMrdRw"), "App_component_1_10FTcCMrdRw", [ C2, C3, C4, @@ -91,16 +147,16 @@ export const App_component_ckEPmXZlub0 = ({ count, rest: [I2, { I3, v1: [I4], I5 }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAG8B,CAAC,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAC,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,KAAG,EAAE,EAAE,GAAG,IAAG,EAAE,KAAG,EAAE,EAAE,GAAG,GAAG,EAAC;IAC1F,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAChC,MAAM,EAAC,MAAM,CAAC,IAAI,EAAC,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,KAAG,EAAE,EAAE,GAAG,IAAG,EAAE,KAAG,EAAE,EAAE,GAAG,GAAG,EAAC,GAAG;IACjE;;;;;;;;;;;;;;;;;;AASJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAG8B,CAAC,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAC,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,KAAG,EAAE,EAAE,GAAG,IAAG,EAAE,KAAG,EAAE,EAAE,GAAG,GAAG,EAAC;IAC1F,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAChC,MAAM,EAAC,MAAM,CAAC,IAAI,EAAC,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,KAAG,EAAE,EAAE,GAAG,IAAG,EAAE,KAAG,EAAE,EAAE,GAAG,GAAG,EAAC,GAAG;IACjE;;;;;;;;;;;;;;;;;;AASJ\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -112,62 +168,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_1_w0t0o3QMovU.js (ENTRY POINT)== - -import { useLexicalScope } from "@builder.io/qwik"; -import { _jsxQ } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const App_component_1_w0t0o3QMovU = ()=>{ - const [C2, C3, C4, C5, C6, C7, C8, I2, I3, I4, I5, I6, I7, I8, count, state] = useLexicalScope(); - return /*#__PURE__*/ _jsxQ("div", { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_div_onClick_1CGetmFZx0g"), "App_component_div_onClick_1CGetmFZx0g", [ - count, - state - ]) - }, null, [ - I2, - I3, - I4, - I5, - I6, - I7, - I8, - C2, - C3, - C4, - C5, - C6, - C7, - C8, - v1, - v2, - v3 - ], 0, "u6_0"); -}; -export { _hW } from "@builder.io/qwik"; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;2CAMa;;IACL,qBACI,MAAC;QAAI,QAAQ;;;;;QACR;QAAI;QAAI;QAAI;QAAI;QAAI;QAAI;QACxB;QAAI;QAAI;QAAI;QAAI;QAAI;QAAI;QACxB;QAAI;QAAI\"}") -/* -{ - "origin": "test.tsx", - "name": "App_component_1_w0t0o3QMovU", - "entry": null, - "displayName": "test.tsx_App_component_1", - "hash": "w0t0o3QMovU", - "canonicalFilename": "test.tsx_App_component_1_w0t0o3QMovU", - "path": "", - "extension": "js", - "parent": "App_component_ckEPmXZlub0", - "ctxKind": "function", - "ctxName": "$", - "captures": true, - "loc": [ - 293, - 536 - ] -} -*/ == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_getter_generation.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_getter_generation.snap index f010321eb5d..00057d4b35d 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_getter_generation.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_getter_generation.snap @@ -40,22 +40,13 @@ export const Cmp = component$((props) => { ); }); -============================= test.js == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); -export const Cmp = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Cmp_component_4ryKJTOKjWE"), "Cmp_component_4ryKJTOKjWE")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAoBhB;AAEH,OAAO,MAAM,oBAAM,iHAOhB\"}") -============================= test.tsx_Cmp_component_4ryKJTOKjWE.js (ENTRY POINT)== +============================= src/test.tsx_Cmp_component_Uk9AK3jpZks.js (ENTRY POINT)== import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { _fnSignal } from "@builder.io/qwik"; import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; -export const Cmp_component_4ryKJTOKjWE = (props)=>{ +export const Cmp_component_Uk9AK3jpZks = (props)=>{ return /*#__PURE__*/ _jsxC(_Fragment, { children: [ /*#__PURE__*/ _jsxQ("p", null, { @@ -73,20 +64,20 @@ export const Cmp_component_4ryKJTOKjWE = (props)=>{ /*#__PURE__*/ _jsxQ("span", null, null, null, 3, null) ], 3, null) ] - }, 3, "u6_1"); + }, 3, "oJ_1"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;yCAyB8B,CAAC;IAC3B,qBACI;;0BACI,MAAC;gBAAE,YAAU,kBAAE,GAAM,KAAK;;;+BAAG,GAAM,MAAM,CAAC,KAAK;;;0BAC/C,MAAC;gBAAE;gCAAO,GAAM,KAAK;;;8BAAC,MAAC;;;;AAGnC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;yCAyB8B,CAAC;IAC3B,qBACI;;0BACI,MAAC;gBAAE,YAAU,kBAAE,GAAM,KAAK;;;+BAAG,GAAM,MAAM,CAAC,KAAK;;;0BAC/C,MAAC;gBAAE;gCAAO,GAAM,KAAK;;;8BAAC,MAAC;;;;AAGnC\"}") /* { - "origin": "test.tsx", - "name": "Cmp_component_4ryKJTOKjWE", + "origin": "src/test.tsx", + "name": "Cmp_component_Uk9AK3jpZks", "entry": null, "displayName": "test.tsx_Cmp_component", - "hash": "4ryKJTOKjWE", - "canonicalFilename": "test.tsx_Cmp_component_4ryKJTOKjWE", - "path": "", + "hash": "Uk9AK3jpZks", + "canonicalFilename": "test.tsx_Cmp_component_Uk9AK3jpZks", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -98,14 +89,23 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +============================= src/test.js == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); +export const Cmp = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Cmp_component_Uk9AK3jpZks"), "Cmp_component_Uk9AK3jpZks")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAoBhB;AAEH,OAAO,MAAM,oBAAM,iHAOhB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { Cmp } from "./test"; import { _IMMUTABLE } from "@builder.io/qwik"; import { _fnSignal } from "@builder.io/qwik"; import { _jsxC } from "@builder.io/qwik"; import { useStore } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ()=>{ +export const App_component_F6JpluHHZ5A = ()=>{ const store = useStore({ count: 0, stuff: 0, @@ -145,20 +145,20 @@ export const App_component_ckEPmXZlub0 = ()=>{ signal ], 'p0.formData?.get("username")') } - }, 3, "u6_0"); + }, 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;yCAG8B;IAC1B,MAAM,QAAQ,SAAS;QACnB,OAAO;QACP,OAAO;QACP,QAAQ;YACJ,OAAO;QACX;IACJ;IACA,MAAM,SAAS,UAAU;IACzB,qBACI,MAAC;QACG,MAAmB;YACnB;mBAAO,MAAM,KAAK;;YAClB;mBAAQ,MAAM,MAAM,CAAC,KAAK;;QAC1B,QAAQ;YACR;mBAAO,MAAM,KAAK,GAAG;;YACrB;mBAAO,OAAO,QAAQ,EAAE,IAAI;;;YAL5B,IAAI;YACJ,KAAK,kBAAE,GAAM,KAAK;;;YAClB,MAAM,kBAAE,GAAM,MAAM,CAAC,KAAK;;;YAC1B,MAAM;YACN,KAAK,kBAAE,GAAM,KAAK,GAAG;;;YACrB,KAAK,kBAAE,GAAO,QAAQ,EAAE,IAAI;;;;;AAIxC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;yCAG8B;IAC1B,MAAM,QAAQ,SAAS;QACnB,OAAO;QACP,OAAO;QACP,QAAQ;YACJ,OAAO;QACX;IACJ;IACA,MAAM,SAAS,UAAU;IACzB,qBACI,MAAC;QACG,MAAmB;YACnB;mBAAO,MAAM,KAAK;;YAClB;mBAAQ,MAAM,MAAM,CAAC,KAAK;;QAC1B,QAAQ;YACR;mBAAO,MAAM,KAAK,GAAG;;YACrB;mBAAO,OAAO,QAAQ,EAAE,IAAI;;;YAL5B,IAAI;YACJ,KAAK,kBAAE,GAAM,KAAK;;;YAClB,MAAM,kBAAE,GAAM,MAAM,CAAC,KAAK;;;YAC1B,MAAM;YACN,KAAK,kBAAE,GAAM,KAAK,GAAG;;;YACrB,KAAK,kBAAE,GAAO,QAAQ,EAAE,IAAI;;;;;AAIxC\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_immutable_analysis.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_immutable_analysis.snap index 511527766b2..9a29c28d889 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_immutable_analysis.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_immutable_analysis.snap @@ -57,99 +57,75 @@ export const App = component$((props) => { ); }); -============================= test.tsx_App_component_Fragment_Div_onEvent_zrFduYbT3xM.js (ENTRY POINT)== +============================= src/test.tsx_App_component_Fragment_Div_transparent_vXQ6JUvtxwI.js (ENTRY POINT)== -export const App_component_Fragment_Div_onEvent_zrFduYbT3xM = ()=>console.log('stuff'); +export const App_component_Fragment_Div_transparent_vXQ6JUvtxwI = ()=>{ + console.log('stuff'); +}; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"8DAsB0B,IAAM,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"kEAuB8B;IAAO,QAAQ,GAAG,CAAC;AAAQ\"}") /* { - "origin": "test.tsx", - "name": "App_component_Fragment_Div_onEvent_zrFduYbT3xM", + "origin": "src/test.tsx", + "name": "App_component_Fragment_Div_transparent_vXQ6JUvtxwI", "entry": null, - "displayName": "test.tsx_App_component_Fragment_Div_onEvent", - "hash": "zrFduYbT3xM", - "canonicalFilename": "test.tsx_App_component_Fragment_Div_onEvent_zrFduYbT3xM", - "path": "", + "displayName": "test.tsx_App_component_Fragment_Div_transparent", + "hash": "vXQ6JUvtxwI", + "canonicalFilename": "test.tsx_App_component_Fragment_Div_transparent_vXQ6JUvtxwI", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "jSXProp", - "ctxName": "onEvent$", + "ctxName": "transparent$", "captures": false, "loc": [ - 665, - 691 + 723, + 751 ] } */ -============================= test.js == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAKA,OAAO,MAAM,oBAAM,iHA4ChB\"}") -============================= test.tsx_App_component_Fragment_Div_immutable4_2zF7jA3Yti0.js (ENTRY POINT)== +============================= src/test.tsx_App_component_remove_01pLabTyWUg.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; -export const App_component_Fragment_Div_immutable4_2zF7jA3Yti0 = (ev)=>{ +export const App_component_remove_01pLabTyWUg = (id)=>{ const [state] = useLexicalScope(); - return console.log(state.count); + const d = state.data; + d.splice(d.findIndex((d)=>d.id === id), 1); }; +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";iEA8B6B,CAAC;;WAAO,QAAQ,GAAG,CAAC,MAAM,KAAK\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";gDAQqB,CAAC;;IACd,MAAM,IAAI,MAAM,IAAI;IACpB,EAAE,MAAM,CACN,EAAE,SAAS,CAAC,CAAC,IAAM,EAAE,EAAE,KAAK,KAC5B\"}") /* { - "origin": "test.tsx", - "name": "App_component_Fragment_Div_immutable4_2zF7jA3Yti0", + "origin": "src/test.tsx", + "name": "App_component_remove_01pLabTyWUg", "entry": null, - "displayName": "test.tsx_App_component_Fragment_Div_immutable4", - "hash": "2zF7jA3Yti0", - "canonicalFilename": "test.tsx_App_component_Fragment_Div_immutable4_2zF7jA3Yti0", - "path": "", + "displayName": "test.tsx_App_component_remove", + "hash": "01pLabTyWUg", + "canonicalFilename": "test.tsx_App_component_remove_01pLabTyWUg", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", - "ctxKind": "jSXProp", - "ctxName": "immutable4$", + "parent": "App_component_F6JpluHHZ5A", + "ctxKind": "function", + "ctxName": "$", "captures": true, "loc": [ - 984, - 1016 + 267, + 405 ] } */ -============================= test.tsx_App_component_Fragment_Div_transparent_eeDEK6EM1oo.js (ENTRY POINT)== +============================= src/test.js == -export const App_component_Fragment_Div_transparent_eeDEK6EM1oo = ()=>{ - console.log('stuff'); -}; +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"kEAuB8B;IAAO,QAAQ,GAAG,CAAC;AAAQ\"}") -/* -{ - "origin": "test.tsx", - "name": "App_component_Fragment_Div_transparent_eeDEK6EM1oo", - "entry": null, - "displayName": "test.tsx_App_component_Fragment_Div_transparent", - "hash": "eeDEK6EM1oo", - "canonicalFilename": "test.tsx_App_component_Fragment_Div_transparent_eeDEK6EM1oo", - "path": "", - "extension": "js", - "parent": "App_component_ckEPmXZlub0", - "ctxKind": "jSXProp", - "ctxName": "transparent$", - "captures": false, - "loc": [ - 723, - 751 - ] -} -*/ -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAKA,OAAO,MAAM,oBAAM,iHA4ChB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { _IMMUTABLE } from "@builder.io/qwik"; @@ -160,11 +136,11 @@ import importedValue from "v"; import { qrl } from "@builder.io/qwik"; import styles from "./styles.module.css"; import { useStore } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = (props)=>{ +export const App_component_F6JpluHHZ5A = (props)=>{ const state = useStore({ count: 0 }); - const remove = /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_remove_pU6yOC5P6sY"), "App_component_remove_pU6yOC5P6sY", [ + const remove = /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_remove_01pLabTyWUg"), "App_component_remove_01pLabTyWUg", [ state ]); return /*#__PURE__*/ _jsxC(_Fragment, { @@ -182,15 +158,15 @@ export const App_component_ckEPmXZlub0 = (props)=>{ return window.document; }, onClick$: props.onClick$, - onEvent$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_Fragment_Div_onEvent_zrFduYbT3xM"), "App_component_Fragment_Div_onEvent_zrFduYbT3xM"), - transparent$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_Fragment_Div_transparent_eeDEK6EM1oo"), "App_component_Fragment_Div_transparent_eeDEK6EM1oo"), + onEvent$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_Fragment_Div_onEvent_CZJGid7QVLE"), "App_component_Fragment_Div_onEvent_CZJGid7QVLE"), + transparent$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_Fragment_Div_transparent_vXQ6JUvtxwI"), "App_component_Fragment_Div_transparent_vXQ6JUvtxwI"), immutable1: "stuff", immutable2: { foo: 'bar', baz: importedValue ? true : false }, immutable3: 2, - immutable4$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_Fragment_Div_immutable4_2zF7jA3Yti0"), "App_component_Fragment_Div_immutable4_2zF7jA3Yti0", [ + immutable4$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_Fragment_Div_immutable4_zGXuUsOjYvc"), "App_component_Fragment_Div_immutable4_zGXuUsOjYvc", [ state ]), immutable5: [ @@ -212,7 +188,7 @@ export const App_component_ckEPmXZlub0 = (props)=>{ immutable4$: _IMMUTABLE, immutable5: _IMMUTABLE } - }, 2, "u6_0"), + }, 2, "oJ_0"), "[].map(() => (", /*#__PURE__*/ _jsxC(props.Model, { class: state, @@ -242,23 +218,23 @@ export const App_component_ckEPmXZlub0 = (props)=>{ ], '{foo:"bar",baz:p0.count?true:false}'), mutable3: _IMMUTABLE } - }, 3, "u6_1"), + }, 3, "oJ_1"), "));" ] - }, 1, "u6_2"); + }, 1, "oJ_2"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;;yCAK8B,CAAC;IAE3B,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAChC,MAAM;;;IAON,qBACI;;0BACI,MAAC;gBAAgB,UAAU,MAAM,QAAQ;;gBAAtC,OAAM;eAAkC;0BAC3C,MAAC;oBACG;2BAAO,OAAO,GAAG;;oBACjB;2BAAU,OAAO,QAAQ;;gBACzB,UAAU,MAAM,QAAQ;gBACxB,QAAQ;gBACR,YAAY;gBACZ,YAAW;gBACX,YAAY;oBACR,KAAK;oBACL,KAAK,gBAAgB,OAAO;gBAChC;gBACA,YAAY;gBACZ,WAAW;;;gBACX,YAAY;oBAAC;oBAAG;oBAAG;oBAAe;oBAAM,CAAC;iBAAE;0BAE3C,cAAA,MAAC,iBAAE;;oBAdH,KAAK;oBACL,QAAQ;oBAER,QAAQ;oBACR,YAAY;oBACZ,UAAU;oBACV,UAAU;oBAIV,UAAU;oBACV,WAAW;oBACX,UAAU;;;YAGR;0BAEF,MA9BI,MAAT;gBA+BS,OAAO;gBACP,SAAS;oBACT;2BAAU;wBACN,KAAK;wBACL,KAAK,MAAM,KAAK,GAAG,OAAO;oBAC9B;;gBACA,UAAU,CAAC,IAAM,QAAQ,GAAG,CAAC,MAAM,KAAK,CAAC;gBACzC,UAAU;oBAAC;oBAAG;oBAAG;oBAAO;oBAAM,CAAC;iBAAE;;oBAPjC,KAAK;oBACL,OAAO;oBACP,QAAQ,kBAAE,CAAA;4BACN,KAAK;4BACL,KAAK,GAAM,KAAK,GAAG,OAAO;wBAC9B,CAAA;;;oBAEA,QAAQ;;;YACV;;;AAIlB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;;yCAK8B,CAAC;IAE3B,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAChC,MAAM;;;IAON,qBACI;;0BACI,MAAC;gBAAgB,UAAU,MAAM,QAAQ;;gBAAtC,OAAM;eAAkC;0BAC3C,MAAC;oBACG;2BAAO,OAAO,GAAG;;oBACjB;2BAAU,OAAO,QAAQ;;gBACzB,UAAU,MAAM,QAAQ;gBACxB,QAAQ;gBACR,YAAY;gBACZ,YAAW;gBACX,YAAY;oBACR,KAAK;oBACL,KAAK,gBAAgB,OAAO;gBAChC;gBACA,YAAY;gBACZ,WAAW;;;gBACX,YAAY;oBAAC;oBAAG;oBAAG;oBAAe;oBAAM,CAAC;iBAAE;0BAE3C,cAAA,MAAC,iBAAE;;oBAdH,KAAK;oBACL,QAAQ;oBAER,QAAQ;oBACR,YAAY;oBACZ,UAAU;oBACV,UAAU;oBAIV,UAAU;oBACV,WAAW;oBACX,UAAU;;;YAGR;0BAEF,MA9BI,MAAT;gBA+BS,OAAO;gBACP,SAAS;oBACT;2BAAU;wBACN,KAAK;wBACL,KAAK,MAAM,KAAK,GAAG,OAAO;oBAC9B;;gBACA,UAAU,CAAC,IAAM,QAAQ,GAAG,CAAC,MAAM,KAAK,CAAC;gBACzC,UAAU;oBAAC;oBAAG;oBAAG;oBAAO;oBAAM,CAAC;iBAAE;;oBAPjC,KAAK;oBACL,OAAO;oBACP,QAAQ,kBAAE,CAAA;4BACN,KAAK;4BACL,KAAK,GAAM,KAAK,GAAG,OAAO;wBAC9B,CAAA;;;oBAEA,QAAQ;;;YACV;;;AAIlB\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -270,35 +246,59 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_remove_pU6yOC5P6sY.js (ENTRY POINT)== +============================= src/test.tsx_App_component_Fragment_Div_onEvent_CZJGid7QVLE.js (ENTRY POINT)== + +export const App_component_Fragment_Div_onEvent_CZJGid7QVLE = ()=>console.log('stuff'); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"8DAsB0B,IAAM,QAAQ,GAAG,CAAC\"}") +/* +{ + "origin": "src/test.tsx", + "name": "App_component_Fragment_Div_onEvent_CZJGid7QVLE", + "entry": null, + "displayName": "test.tsx_App_component_Fragment_Div_onEvent", + "hash": "CZJGid7QVLE", + "canonicalFilename": "test.tsx_App_component_Fragment_Div_onEvent_CZJGid7QVLE", + "path": "src", + "extension": "js", + "parent": "App_component_F6JpluHHZ5A", + "ctxKind": "jSXProp", + "ctxName": "onEvent$", + "captures": false, + "loc": [ + 665, + 691 + ] +} +*/ +============================= src/test.tsx_App_component_Fragment_Div_immutable4_zGXuUsOjYvc.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; -export const App_component_remove_pU6yOC5P6sY = (id)=>{ +export const App_component_Fragment_Div_immutable4_zGXuUsOjYvc = (ev)=>{ const [state] = useLexicalScope(); - const d = state.data; - d.splice(d.findIndex((d)=>d.id === id), 1); + return console.log(state.count); }; -export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";gDAQqB,CAAC;;IACd,MAAM,IAAI,MAAM,IAAI;IACpB,EAAE,MAAM,CACN,EAAE,SAAS,CAAC,CAAC,IAAM,EAAE,EAAE,KAAK,KAC5B\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";iEA8B6B,CAAC;;WAAO,QAAQ,GAAG,CAAC,MAAM,KAAK\"}") /* { - "origin": "test.tsx", - "name": "App_component_remove_pU6yOC5P6sY", + "origin": "src/test.tsx", + "name": "App_component_Fragment_Div_immutable4_zGXuUsOjYvc", "entry": null, - "displayName": "test.tsx_App_component_remove", - "hash": "pU6yOC5P6sY", - "canonicalFilename": "test.tsx_App_component_remove_pU6yOC5P6sY", - "path": "", + "displayName": "test.tsx_App_component_Fragment_Div_immutable4", + "hash": "zGXuUsOjYvc", + "canonicalFilename": "test.tsx_App_component_Fragment_Div_immutable4_zGXuUsOjYvc", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", - "ctxKind": "function", - "ctxName": "$", + "parent": "App_component_F6JpluHHZ5A", + "ctxKind": "jSXProp", + "ctxName": "immutable4$", "captures": true, "loc": [ - 267, - 405 + 984, + 1016 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_immutable_function_components.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_immutable_function_components.snap index 2a87773a0f8..3f7cb8d9d55 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_immutable_function_components.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_immutable_function_components.snap @@ -17,20 +17,20 @@ export const App = component$((props: Stuff) => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { inlinedQrl } from "@builder.io/qwik"; import { Slot } from '@builder.io/qwik'; -const App_component_ckEPmXZlub0 = (props)=>{ - return /*#__PURE__*/ _jsxQ("div", null, null, /*#__PURE__*/ _jsxC(Slot, null, 3, "u6_0"), 1, "u6_1"); +const App_component_F6JpluHHZ5A = (props)=>{ + return /*#__PURE__*/ _jsxQ("div", null, null, /*#__PURE__*/ _jsxC(Slot, null, 3, "oJ_0"), 1, "oJ_1"); }; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_ckEPmXZlub0, "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_F6JpluHHZ5A, "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;AACA,SAA+B,IAAI,QAAQ,mBAAmB;kCAEhC,CAAC;IAC3B,qBACI,MAAC,iCACG,MAAC;AAGb;AANA,OAAO,MAAM,oBAAM,+FAMhB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;AACA,SAA+B,IAAI,QAAQ,mBAAmB;kCAEhC,CAAC;IAC3B,qBACI,MAAC,iCACG,MAAC;AAGb;AANA,OAAO,MAAM,oBAAM,+FAMhB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_import_assertion.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_import_assertion.snap index 63eecc27e30..c3ee0a19d0e 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_import_assertion.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_import_assertion.snap @@ -14,34 +14,34 @@ export const Greeter = component$(() => { return json; }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Greeter = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Greeter_component_n7HuG2hhU0Q"), "Greeter_component_n7HuG2hhU0Q")); +export const Greeter = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Greeter_component_ePjmTcgQ0IY"), "Greeter_component_ePjmTcgQ0IY")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAIA,OAAO,MAAM,wBAAU,yHAEpB\"}") -============================= test.tsx_Greeter_component_n7HuG2hhU0Q.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAIA,OAAO,MAAM,wBAAU,yHAEpB\"}") +============================= src/test.tsx_Greeter_component_ePjmTcgQ0IY.js (ENTRY POINT)== import json from "./foo.json" with { type: "json" }; -export const Greeter_component_n7HuG2hhU0Q = ()=>{ +export const Greeter_component_ePjmTcgQ0IY = ()=>{ return json; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mCAEqC;IAAE,MAAM;AAAO;6CAElB;IAC9B,OAAO;AACX\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mCAEqC;IAAE,MAAM;AAAO;6CAElB;IAC9B,OAAO;AACX\"}") /* { - "origin": "test.tsx", - "name": "Greeter_component_n7HuG2hhU0Q", + "origin": "src/test.tsx", + "name": "Greeter_component_ePjmTcgQ0IY", "entry": null, "displayName": "test.tsx_Greeter_component", - "hash": "n7HuG2hhU0Q", - "canonicalFilename": "test.tsx_Greeter_component_n7HuG2hhU0Q", - "path": "", + "hash": "ePjmTcgQ0IY", + "canonicalFilename": "test.tsx_Greeter_component_ePjmTcgQ0IY", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_inlined_entry_strategy.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_inlined_entry_strategy.snap index 26ba06b71e3..66a26d0151a 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_inlined_entry_strategy.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_inlined_entry_strategy.snap @@ -30,7 +30,7 @@ export const Child = component$(() => { }); -============================= test.tsx == +============================= src/test.tsx == import { componentQrl } from "@builder.io/qwik"; import { useStylesQrl } from "@builder.io/qwik"; @@ -41,7 +41,7 @@ import { useStore } from '@builder.io/qwik'; import { thing } from './sibling'; import mongodb from 'mongodb'; export const Child = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(()=>{ - useStylesQrl(/*#__PURE__*/ inlinedQrl('somestring', "Child_component_useStyles_qBZTuFM0160")); + useStylesQrl(/*#__PURE__*/ inlinedQrl('somestring', "Child_component_useStyles_qcj80V13pCs")); const state = useStore({ count: 0 }); @@ -49,15 +49,15 @@ export const Child = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(()=>{ useBrowserVisibleTaskQrl(/*#__PURE__*/ inlinedQrl(()=>{ const [state] = useLexicalScope(); state.count = thing.doStuff() + import("./sibling"); - }, "Child_component_useBrowserVisibleTask_0IGFPOyJmQA", [ + }, "Child_component_useBrowserVisibleTask_o1cN2Yii0Kg", [ state ])); - return
console.log(mongodb), "Child_component_div_onClick_elliVSnAiOQ")}> + return
console.log(mongodb), "Child_component_div_onClick_mfAbs3oHQGQ")}>
; -}, "Child_component_9GyF01GDKqw")); +}, "Child_component_r5lvTXKSpwk")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AACA,SAA6C,QAAQ,QAAoB,mBAAmB;AAC5F,SAAS,KAAK,QAAQ,YAAY;AAClC,OAAO,aAAa,UAAU;AAE9B,OAAO,MAAM,sBAAQ,sCAAW;IAE5B,sCAAW;IACX,MAAM,QAAQ,SAAS;QACnB,OAAO;IACX;IAEA,qBAAqB;IACrB,kDAAuB;;QACnB,MAAM,KAAK,GAAG,MAAM,OAAO,KAAK,MAAM,CAAC;;;;IAG3C,QACK,IAAI,mCAAU,IAAM,QAAQ,GAAG,CAAC,sDAAU;QAC3C,EAAE;AAEV,mCAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AACA,SAA6C,QAAQ,QAAoB,mBAAmB;AAC5F,SAAS,KAAK,QAAQ,YAAY;AAClC,OAAO,aAAa,UAAU;AAE9B,OAAO,MAAM,sBAAQ,sCAAW;IAE5B,sCAAW;IACX,MAAM,QAAQ,SAAS;QACnB,OAAO;IACX;IAEA,qBAAqB;IACrB,kDAAuB;;QACnB,MAAM,KAAK,GAAG,MAAM,OAAO,KAAK,MAAM,CAAC;;;;IAG3C,QACK,IAAI,mCAAU,IAAM,QAAQ,GAAG,CAAC,sDAAU;QAC3C,EAAE;AAEV,mCAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_input_bind.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_input_bind.snap index cc36343c5c3..f9c89fb1180 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_input_bind.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_input_bind.snap @@ -25,7 +25,7 @@ export const Greeter = component$(() => { ) }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { useLexicalScope } from "@builder.io/qwik"; @@ -45,7 +45,7 @@ export const Greeter = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(()=>{ "onInput$": /*#__PURE__*/ inlinedQrl((_, elm)=>{ const [value] = useLexicalScope(); return value.value = elm.value; - }, "s_6IZeYpXCNXA", [ + }, "s_Jj0d17BBj2c", [ value ]) }, null, 3, null), @@ -54,7 +54,7 @@ export const Greeter = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(()=>{ "onInput$": /*#__PURE__*/ inlinedQrl((_, elm)=>{ const [checked] = useLexicalScope(); return checked.value = elm.checked; - }, "s_JPI3bLCVnso", [ + }, "s_Ep0t9x0DJpI", [ checked ]) }, null, 3, null), @@ -63,7 +63,7 @@ export const Greeter = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(()=>{ "onChange$": /*#__PURE__*/ inlinedQrl((_, elm)=>{ const [stuff] = useLexicalScope(); return stuff.value = elm.stuff; - }, "s_eyREJ0lZTFw", [ + }, "s_VcE8HRv4EVU", [ stuff ]) }, null, 3, null), @@ -72,11 +72,11 @@ export const Greeter = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(()=>{ value ], "p0.value"), 3, null) ] - }, 3, "u6_0"); -}, "s_n7HuG2hhU0Q")); + }, 3, "oJ_0"); +}, "s_ePjmTcgQ0IY")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;AAGA,OAAO,MAAM,wBAAU,sCAAW;IAC9B,MAAM,QAAQ,UAAU;IACxB,MAAM,UAAU,UAAU;IAC1B,MAAM,QAAQ;IACd,qBACI;;0BACI,MAAC;yBAAkB;;;2BAAA;;;;;0BACnB,MAAC;2BAAoB;;;2BAAA;;;;;0BACrB,MAAC;yBAAkB;;;2BAAA;;;;;0BACnB,MAAC,mBAAK;0BACN,MAAC,mCAAK,GAAM,KAAK;;;;;AAI7B,qBAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;AAGA,OAAO,MAAM,wBAAU,sCAAW;IAC9B,MAAM,QAAQ,UAAU;IACxB,MAAM,UAAU,UAAU;IAC1B,MAAM,QAAQ;IACd,qBACI;;0BACI,MAAC;yBAAkB;;;2BAAA;;;;;0BACnB,MAAC;2BAAoB;;;2BAAA;;;;;0BACrB,MAAC;yBAAkB;;;2BAAA;;;;;0BACnB,MAAC,mBAAK;0BACN,MAAC,mCAAK,GAAM,KAAK;;;;;AAI7B,qBAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_invalid_references.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_invalid_references.snap index 4e9f42c391e..281772abb39 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_invalid_references.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_invalid_references.snap @@ -24,7 +24,38 @@ export const App = component$(({count}) => { }); }) -============================= test.js == +============================= src/test.tsx_App_component_1_10FTcCMrdRw.js (ENTRY POINT)== + +import { _auto_I10 as I10 } from "./test"; +import { _jsxC } from "@builder.io/qwik"; +export const App_component_1_10FTcCMrdRw = ()=>{ + return /*#__PURE__*/ _jsxC(I10, null, 3, "oJ_0"); +}; +export { _hW } from "@builder.io/qwik"; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;2CAWa;IACL,qBACI,MAAC;AAET\"}") +/* +{ + "origin": "src/test.tsx", + "name": "App_component_1_10FTcCMrdRw", + "entry": null, + "displayName": "test.tsx_App_component_1", + "hash": "10FTcCMrdRw", + "canonicalFilename": "test.tsx_App_component_1_10FTcCMrdRw", + "path": "src", + "extension": "js", + "parent": "App_component_F6JpluHHZ5A", + "ctxKind": "function", + "ctxName": "$", + "captures": false, + "loc": [ + 313, + 377 + ] +} +*/ +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; @@ -33,7 +64,7 @@ const [I2, { I3, v1: [I4], I5 = v2, ...I6 }, I7 = v3, ...I8] = obj; function I9() {} class I10 { } -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); export { I1 as _auto_I1 }; export { I10 as _auto_I10 }; export { I2 as _auto_I2 }; @@ -46,8 +77,8 @@ export { I8 as _auto_I8 }; export { I9 as _auto_I9 }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,MAAM,KAAK;AACX,MAAM,CAAC,IAAI,EAAC,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,KAAG,EAAE,EAAE,GAAG,IAAG,EAAE,KAAG,EAAE,EAAE,GAAG,GAAG,GAAG;AACzD,SAAS,MAAM;AACf,MAAM;AAAK;AAEX,OAAO,MAAM,oBAAM,iHAQjB\"}") -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,MAAM,KAAK;AACX,MAAM,CAAC,IAAI,EAAC,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,KAAG,EAAE,EAAE,GAAG,IAAG,EAAE,KAAG,EAAE,EAAE,GAAG,GAAG,GAAG;AACzD,SAAS,MAAM;AACf,MAAM;AAAK;AAEX,OAAO,MAAM,oBAAM,iHAQjB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { _auto_I1 as I1 } from "./test"; import { _auto_I2 as I2 } from "./test"; @@ -59,23 +90,23 @@ import { _auto_I7 as I7 } from "./test"; import { _auto_I8 as I8 } from "./test"; import { _auto_I9 as I9 } from "./test"; import { qrl } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = (props)=>{ +export const App_component_F6JpluHHZ5A = (props)=>{ console.log(I1, I2, I3, I4, I5, I6, I7, I8, I9); console.log(itsok, v1, v2, v3, obj); - return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_w0t0o3QMovU"), "App_component_1_w0t0o3QMovU"); + return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_10FTcCMrdRw"), "App_component_1_10FTcCMrdRw"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;;;yCAQ8B;IAC1B,QAAQ,GAAG,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI;IAC5C,QAAQ,GAAG,CAAC,OAAO,IAAI,IAAI,IAAI;IAC/B;AAKJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;;;yCAQ8B;IAC1B,QAAQ,GAAG,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI;IAC5C,QAAQ,GAAG,CAAC,OAAO,IAAI,IAAI,IAAI;IAC/B;AAKJ\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -87,37 +118,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_1_w0t0o3QMovU.js (ENTRY POINT)== - -import { _auto_I10 as I10 } from "./test"; -import { _jsxC } from "@builder.io/qwik"; -export const App_component_1_w0t0o3QMovU = ()=>{ - return /*#__PURE__*/ _jsxC(I10, null, 3, "u6_0"); -}; -export { _hW } from "@builder.io/qwik"; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;2CAWa;IACL,qBACI,MAAC;AAET\"}") -/* -{ - "origin": "test.tsx", - "name": "App_component_1_w0t0o3QMovU", - "entry": null, - "displayName": "test.tsx_App_component_1", - "hash": "w0t0o3QMovU", - "canonicalFilename": "test.tsx_App_component_1_w0t0o3QMovU", - "path": "", - "extension": "js", - "parent": "App_component_ckEPmXZlub0", - "ctxKind": "function", - "ctxName": "$", - "captures": false, - "loc": [ - 313, - 377 - ] -} -*/ == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_invalid_segment_expr1.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_invalid_segment_expr1.snap index f62cf0504c4..39f571bde25 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_invalid_segment_expr1.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_invalid_segment_expr1.snap @@ -22,60 +22,61 @@ export const App = component$(() => { return $(render); }) -============================= test.js == +============================= src/test.tsx_App_component_1_10FTcCMrdRw.js (ENTRY POINT)== -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAKA,OAAO,MAAM,oBAAM,iHASjB\"}") -============================= test.tsx_App_component_useStyles_t35nSa5UV7U.js (ENTRY POINT)== - -export const App_component_useStyles_t35nSa5UV7U = style; +export const App_component_1_10FTcCMrdRw = render; +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mDAOe\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"2CAaa\"}") /* { - "origin": "test.tsx", - "name": "App_component_useStyles_t35nSa5UV7U", + "origin": "src/test.tsx", + "name": "App_component_1_10FTcCMrdRw", "entry": null, - "displayName": "test.tsx_App_component_useStyles", - "hash": "t35nSa5UV7U", - "canonicalFilename": "test.tsx_App_component_useStyles_t35nSa5UV7U", - "path": "", + "displayName": "test.tsx_App_component_1", + "hash": "10FTcCMrdRw", + "canonicalFilename": "test.tsx_App_component_1_10FTcCMrdRw", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", - "ctxName": "useStyles$", + "ctxName": "$", "captures": false, "loc": [ - 219, - 224 + 325, + 331 ] } */ -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +============================= src/test.js == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAKA,OAAO,MAAM,oBAAM,iHASjB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; import { useStylesQrl } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ()=>{ - useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useStyles_t35nSa5UV7U"), "App_component_useStyles_t35nSa5UV7U")); - return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_w0t0o3QMovU"), "App_component_1_w0t0o3QMovU"); +export const App_component_F6JpluHHZ5A = ()=>{ + useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_useStyles_ya0IZ2trrfA"), "App_component_useStyles_ya0IZ2trrfA")); + return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_1_10FTcCMrdRw"), "App_component_1_10FTcCMrdRw"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAK8B;IAE1B;IAMA;AACJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAK8B;IAE1B;IAMA;AACJ\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -87,30 +88,29 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_1_w0t0o3QMovU.js (ENTRY POINT)== +============================= src/test.tsx_App_component_useStyles_ya0IZ2trrfA.js (ENTRY POINT)== -export const App_component_1_w0t0o3QMovU = render; -export { _hW } from "@builder.io/qwik"; +export const App_component_useStyles_ya0IZ2trrfA = style; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"2CAaa\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mDAOe\"}") /* { - "origin": "test.tsx", - "name": "App_component_1_w0t0o3QMovU", + "origin": "src/test.tsx", + "name": "App_component_useStyles_ya0IZ2trrfA", "entry": null, - "displayName": "test.tsx_App_component_1", - "hash": "w0t0o3QMovU", - "canonicalFilename": "test.tsx_App_component_1_w0t0o3QMovU", - "path": "", + "displayName": "test.tsx_App_component_useStyles", + "hash": "ya0IZ2trrfA", + "canonicalFilename": "test.tsx_App_component_useStyles_ya0IZ2trrfA", + "path": "src", "extension": "js", - "parent": "App_component_ckEPmXZlub0", + "parent": "App_component_F6JpluHHZ5A", "ctxKind": "function", - "ctxName": "$", + "ctxName": "useStyles$", "captures": false, "loc": [ - 325, - 331 + 219, + 224 ] } */ @@ -120,7 +120,7 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" { "category": "error", "code": "C03", - "file": "test.tsx", + "file": "src/test.tsx", "message": "Qrl($) scope is not a function, but it's capturing local identifiers: style", "highlights": [ { @@ -138,7 +138,7 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" { "category": "error", "code": "C03", - "file": "test.tsx", + "file": "src/test.tsx", "message": "Qrl($) scope is not a function, but it's capturing local identifiers: render", "highlights": [ { diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_issue_33443.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_issue_33443.snap index 3c658426556..a74c8aa758d 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_issue_33443.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_issue_33443.snap @@ -23,7 +23,7 @@ export const Issue3742 = component$(({description = '', other}: any) => { ) }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { _fnSignal } from "@builder.io/qwik"; @@ -31,11 +31,11 @@ import { useLexicalScope } from "@builder.io/qwik"; import { inlinedQrl } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { useSignal } from '@builder.io/qwik'; -const Issue3742_component_div_button_onClick_a504K2BCEXg = ()=>{ +const Issue3742_component_div_button_onClick_LFjidS20gKM = ()=>{ const [counter] = useLexicalScope(); return counter.value++; }; -const Issue3742_component_svSy0PlWTAw = (props)=>{ +const Issue3742_component_RLS9GkchagU = (props)=>{ const counter = useSignal(0); return /*#__PURE__*/ _jsxQ("div", null, { title: _fnSignal((p0, p1)=>(p1.description ?? '') && 'description' in p1.other ? `Hello ${p0.value}` : `Bye ${p0.value}`, [ @@ -45,16 +45,16 @@ const Issue3742_component_svSy0PlWTAw = (props)=>{ }, [ "Issue3742", /*#__PURE__*/ _jsxQ("button", null, { - onClick$: /*#__PURE__*/ inlinedQrl(Issue3742_component_div_button_onClick_a504K2BCEXg, "Issue3742_component_div_button_onClick_a504K2BCEXg", [ + onClick$: /*#__PURE__*/ inlinedQrl(Issue3742_component_div_button_onClick_LFjidS20gKM, "Issue3742_component_div_button_onClick_LFjidS20gKM", [ counter ]) }, "Increment", 3, null) - ], 3, "u6_0"); + ], 3, "oJ_0"); }; -export const Issue3742 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(Issue3742_component_svSy0PlWTAw, "Issue3742_component_svSy0PlWTAw")); +export const Issue3742 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(Issue3742_component_RLS9GkchagU, "Issue3742_component_RLS9GkchagU")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AACA,SAAqB,SAAS,QAAQ,mBAAmB;2DAS/B;;WAAM,QAAQ,KAAK;;wCAPT;IAChC,MAAM,UAAU,UAAU;IAC1B,qBACE,MAAC;QACC,KAAK,sBAAE,AAAC,IAJsB,eAAc,OAIrB,oBAJyB,QAIC,CAAC,MAAM,EAAE,GAAQ,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,GAAQ,KAAK,EAAE;;;;;QACnG;sBAEC,MAAC;YAAO,QAAQ;;;WAAyB;;AAK/C;AAZF,OAAO,MAAM,0BAAY,2GAYpB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AACA,SAAqB,SAAS,QAAQ,mBAAmB;2DAS/B;;WAAM,QAAQ,KAAK;;wCAPT;IAChC,MAAM,UAAU,UAAU;IAC1B,qBACE,MAAC;QACC,KAAK,sBAAE,AAAC,IAJsB,eAAc,OAIrB,oBAJyB,QAIC,CAAC,MAAM,EAAE,GAAQ,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,GAAQ,KAAK,EAAE;;;;;QACnG;sBAEC,MAAC;YAAO,QAAQ;;;WAAyB;;AAK/C;AAZF,OAAO,MAAM,0BAAY,2GAYpB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_issue_4438.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_issue_4438.snap index 2731e2a6fb4..3b9a3833747 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_issue_4438.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_issue_4438.snap @@ -19,7 +19,7 @@ export const App = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; @@ -27,7 +27,7 @@ import { _jsxC } from "@builder.io/qwik"; import { inlinedQrl } from "@builder.io/qwik"; import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { useSignal } from '@builder.io/qwik'; -const App_component_ckEPmXZlub0 = ()=>{ +const App_component_F6JpluHHZ5A = ()=>{ const toggle = useSignal(false); return /*#__PURE__*/ _jsxC(_Fragment, { children: [ @@ -36,12 +36,12 @@ const App_component_ckEPmXZlub0 = ()=>{ }, null, null, 3, null), /*#__PURE__*/ _jsxQ("div", null, null, toggle.value ? $localize`singular` : $localize`plural`, 1, null) ] - }, 1, "u6_0"); + }, 1, "oJ_0"); }; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_ckEPmXZlub0, "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(App_component_F6JpluHHZ5A, "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AACA,SAAqB,SAAS,QAAQ,mBAAmB;kCAE3B;IAC1B,MAAM,SAAS,UAAU;IACzB,qBACI;;0BACI,MAAC;gBAAI,WAAS,OAAO,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG;;0BACnD,MAAC,mBAAK,OAAO,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;;;AAGxE;AARA,OAAO,MAAM,oBAAM,+FAQhB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AACA,SAAqB,SAAS,QAAQ,mBAAmB;kCAE3B;IAC1B,MAAM,SAAS,UAAU;IACzB,qBACI;;0BACI,MAAC;gBAAI,WAAS,OAAO,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG;;0BACnD,MAAC,mBAAK,OAAO,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;;;AAGxE;AARA,OAAO,MAAM,oBAAM,+FAQhB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx.snap index 915d66ae9a9..1a237c51f3e 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx.snap @@ -47,7 +47,7 @@ export const Foo = component$((props) => { tagName: "my-foo", }); -============================= test.js == +============================= src/test.js == import { _jsxQ } from "@builder.io/qwik"; import { _jsxS } from "@builder.io/qwik"; @@ -63,34 +63,34 @@ export const Lightweight = (props)=>{ ...props }, null, 0, null) ] - }, 1, "u6_0"), 1, "u6_1"); + }, 1, "oJ_0"), 1, "oJ_1"); }; -export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_HTDRsvUbLiE"), "Foo_component_HTDRsvUbLiE"), { +export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_eZLoPe62E2c"), "Foo_component_eZLoPe62E2c"), { tagName: "my-foo" }); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;AAGA,OAAO,MAAM,cAAc,CAAC;IACxB,qBACI,MAAC,iCACG;;0BACI,MAAC;0BACD,MAAC;gBAAQ,GAAG,KAAK;;;;AAIjC,EAAE;AAEF,OAAO,MAAM,oBAAM,iHAuBhB;IACC,SAAS;AACb,GAAG\"}") -============================= test.tsx_Foo_component_HTDRsvUbLiE.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;AAGA,OAAO,MAAM,cAAc,CAAC;IACxB,qBACI,MAAC,iCACG;;0BACI,MAAC;0BACD,MAAC;gBAAQ,GAAG,KAAK;;;;AAIjC,EAAE;AAEF,OAAO,MAAM,oBAAM,iHAuBhB;IACC,SAAS;AACb,GAAG\"}") +============================= src/test.tsx_Foo_component_eZLoPe62E2c.js (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; -export const Foo_component_HTDRsvUbLiE = (props)=>{ - return /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_1_DvU6FitWglY"), "Foo_component_1_DvU6FitWglY", [ +export const Foo_component_eZLoPe62E2c = (props)=>{ + return /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_1_Q0jkSkaqC5c"), "Foo_component_1_Q0jkSkaqC5c", [ props ]); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAc8B,CAAC;IAC3B;;;AAsBJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAc8B,CAAC;IAC3B;;;AAsBJ\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_HTDRsvUbLiE", + "origin": "src/test.tsx", + "name": "Foo_component_eZLoPe62E2c", "entry": null, "displayName": "test.tsx_Foo_component", - "hash": "HTDRsvUbLiE", - "canonicalFilename": "test.tsx_Foo_component_HTDRsvUbLiE", - "path": "", + "hash": "eZLoPe62E2c", + "canonicalFilename": "test.tsx_Foo_component_eZLoPe62E2c", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -102,14 +102,14 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Foo_component_1_DvU6FitWglY.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_1_Q0jkSkaqC5c.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; import { Lightweight } from "./test"; import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; -export const Foo_component_1_DvU6FitWglY = ()=>{ +export const Foo_component_1_Q0jkSkaqC5c = ()=>{ const [props] = useLexicalScope(); return /*#__PURE__*/ _jsxQ("div", null, null, [ /*#__PURE__*/ _jsxC(_Fragment, { @@ -124,12 +124,12 @@ export const Foo_component_1_DvU6FitWglY = ()=>{ class: "class" }, "12", 3, null) ] - }, 3, "u6_2"), + }, 3, "oJ_2"), /*#__PURE__*/ _jsxQ("div", null, { class: "class" }, /*#__PURE__*/ _jsxC(Lightweight, { ...props - }, 0, "u6_3"), 1, null), + }, 0, "oJ_3"), 1, null), /*#__PURE__*/ _jsxQ("div", null, { class: "class" }, [ @@ -140,23 +140,23 @@ export const Foo_component_1_DvU6FitWglY = ()=>{ /*#__PURE__*/ _jsxQ("div", null, { class: "class" }, children, 3, null) - ], 1, "u6_4"); + ], 1, "oJ_4"); }; export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;2CAea;;IACL,qBACI,MAAC;sBACG;;8BACI,MAAC;oBAAI,OAAM;;8BACX,MAAC;oBAAI,OAAM;;8BACX,MAAC;oBAAI,OAAM;mBAAQ;;;sBAEvB,MAAC;YAAI,OAAM;yBACP,MAAC;YAAa,GAAG,KAAK;;sBAE1B,MAAC;YAAI,OAAM;;0BACP,MAAC;0BACD,MAAC;0BACD,MAAC;;sBAEL,MAAC;YAAI,OAAM;WACN\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;2CAea;;IACL,qBACI,MAAC;sBACG;;8BACI,MAAC;oBAAI,OAAM;;8BACX,MAAC;oBAAI,OAAM;;8BACX,MAAC;oBAAI,OAAM;mBAAQ;;;sBAEvB,MAAC;YAAI,OAAM;yBACP,MAAC;YAAa,GAAG,KAAK;;sBAE1B,MAAC;YAAI,OAAM;;0BACP,MAAC;0BACD,MAAC;0BACD,MAAC;;sBAEL,MAAC;YAAI,OAAM;WACN\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_1_DvU6FitWglY", + "origin": "src/test.tsx", + "name": "Foo_component_1_Q0jkSkaqC5c", "entry": null, "displayName": "test.tsx_Foo_component_1", - "hash": "DvU6FitWglY", - "canonicalFilename": "test.tsx_Foo_component_1_DvU6FitWglY", - "path": "", + "hash": "Q0jkSkaqC5c", + "canonicalFilename": "test.tsx_Foo_component_1_Q0jkSkaqC5c", + "path": "src", "extension": "js", - "parent": "Foo_component_HTDRsvUbLiE", + "parent": "Foo_component_eZLoPe62E2c", "ctxKind": "function", "ctxName": "$", "captures": true, diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_import_source.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_import_source.snap index 6a1c277b0a3..744b8e15b75 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_import_source.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_import_source.snap @@ -19,7 +19,7 @@ export const App2 = qwikify$(() => (
console.log('App2')}>
)); -============================= test.js == +============================= src/test.js == /* @jsxImportSource react */ import { qwikifyQrl } from "./qwikfy"; import { qrl } from "@builder.io/qwik"; @@ -27,28 +27,28 @@ import { jsx as _jsx } from "react/jsx-runtime"; export const App = ()=>/*#__PURE__*/ _jsx("div", { onClick$: ()=>console.log('App') }); -export const App2 = qwikifyQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App2_qwikify_RKJW7oCMdS4.js"), "App2_qwikify_RKJW7oCMdS4")); +export const App2 = qwikifyQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App2_qwikify_pguht4dlv0c.js"), "App2_qwikify_pguht4dlv0c")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"AACA,0BAA0B;;;AAI1B,OAAO,MAAM,MAAM,kBACf,KAAC;QAAI,UAAU,IAAI,QAAQ,GAAG,CAAC;OACjC;AAEF,OAAO,MAAM,OAAO,gHAEjB\"}") -============================= test.tsx_App2_qwikify_RKJW7oCMdS4.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"AACA,0BAA0B;;;AAI1B,OAAO,MAAM,MAAM,kBACf,KAAC;QAAI,UAAU,IAAI,QAAQ,GAAG,CAAC;OACjC;AAEF,OAAO,MAAM,OAAO,gHAEjB\"}") +============================= src/test.tsx_App2_qwikify_pguht4dlv0c.js (ENTRY POINT)== import { jsx as _jsx } from "react/jsx-runtime"; -export const App2_qwikify_RKJW7oCMdS4 = ()=>/*#__PURE__*/ _jsx("div", { +export const App2_qwikify_pguht4dlv0c = ()=>/*#__PURE__*/ _jsx("div", { onClick$: ()=>console.log('App2') }); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";wCAS6B,kBACzB,KAAC;QAAI,UAAU,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";wCAS6B,kBACzB,KAAC;QAAI,UAAU,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "App2_qwikify_RKJW7oCMdS4", + "origin": "src/test.tsx", + "name": "App2_qwikify_pguht4dlv0c", "entry": null, "displayName": "test.tsx_App2_qwikify", - "hash": "RKJW7oCMdS4", - "canonicalFilename": "test.tsx_App2_qwikify_RKJW7oCMdS4", - "path": "", + "hash": "pguht4dlv0c", + "canonicalFilename": "test.tsx_App2_qwikify_pguht4dlv0c", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_keyed.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_keyed.snap index ed68537fc31..f4d274ed54a 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_keyed.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_keyed.snap @@ -21,31 +21,31 @@ export const App = component$((props: Stuff) => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0.js"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A.js"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,oHAUhB\"}") -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,oHAUhB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { _IMMUTABLE } from "@builder.io/qwik"; import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = (props)=>{ +export const App_component_F6JpluHHZ5A = (props)=>{ return /*#__PURE__*/ _jsxC(_Fragment, { children: [ /*#__PURE__*/ _jsxC(Cmp, null, 3, "stuff"), - /*#__PURE__*/ _jsxC(Cmp, null, 3, "u6_0"), + /*#__PURE__*/ _jsxC(Cmp, null, 3, "oJ_0"), /*#__PURE__*/ _jsxC(Cmp, { prop: "23", [_IMMUTABLE]: { prop: _IMMUTABLE } - }, 3, "u6_1"), + }, 3, "oJ_1"), /*#__PURE__*/ _jsxC(Cmp, { prop: "23", [_IMMUTABLE]: { @@ -54,20 +54,20 @@ export const App_component_ckEPmXZlub0 = (props)=>{ }, 3, props.stuff), /*#__PURE__*/ _jsxQ("p", null, null, "Hello Qwik", 3, props.stuff) ] - }, 1, "u6_2"); + }, 1, "oJ_2"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;yCAG8B,CAAC;IAC3B,qBACI;;0BACI,MAAC,cAAQ;0BACT,MAAC;0BACD,MAAC;gBAAI,MAAK;;oBAAL,IAAI;;;0BACT,MAAC;gBAAI,MAAK;;oBAAL,IAAI;;kBAAW,MAAM,KAAK;0BAC/B,MAAC,iBAAoB,iBAAb,MAAM,KAAK;;;AAG/B\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;yCAG8B,CAAC;IAC3B,qBACI;;0BACI,MAAC,cAAQ;0BACT,MAAC;0BACD,MAAC;gBAAI,MAAK;;oBAAL,IAAI;;;0BACT,MAAC;gBAAI,MAAK;;oBAAL,IAAI;;kBAAW,MAAM,KAAK;0BAC/B,MAAC,iBAAoB,iBAAb,MAAM,KAAK;;;AAG/B\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_listeners.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_listeners.snap index 724ea1a4eff..08d4144bf45 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_listeners.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_jsx_listeners.snap @@ -39,60 +39,86 @@ export const Foo = component$(() => { tagName: "my-foo", }); -============================= test.tsx_Foo_component_div_host_onDocumentScroll_Zip7mifsjRY.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_onDocumentScroll_1_V8yCZGJV4xU.js (ENTRY POINT)== -export const Foo_component_div_host_onDocumentScroll_Zip7mifsjRY = ()=>console.log('host:onDocument:scroll'); +export const Foo_component_div_onDocumentScroll_1_V8yCZGJV4xU = ()=>console.log('onWindowScroll'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mEAkBwC,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"gEAWmC,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_div_host_onDocumentScroll_Zip7mifsjRY", + "origin": "src/test.tsx", + "name": "Foo_component_div_onDocumentScroll_1_V8yCZGJV4xU", "entry": null, - "displayName": "test.tsx_Foo_component_div_host_onDocumentScroll", - "hash": "Zip7mifsjRY", - "canonicalFilename": "test.tsx_Foo_component_div_host_onDocumentScroll_Zip7mifsjRY", - "path": "", + "displayName": "test.tsx_Foo_component_div_onDocumentScroll_1", + "hash": "V8yCZGJV4xU", + "canonicalFilename": "test.tsx_Foo_component_div_onDocumentScroll_1_V8yCZGJV4xU", + "path": "src", "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", + "parent": "Foo_component_1_Q0jkSkaqC5c", + "ctxKind": "eventHandler", + "ctxName": "onDocumentScroll$", + "captures": false, + "loc": [ + 365, + 398 + ] +} +*/ +============================= src/test.tsx_Foo_component_div_host_onDocumentScroll_1_prNcLu2fBS4.js (ENTRY POINT)== + +export const Foo_component_div_host_onDocumentScroll_1_prNcLu2fBS4 = ()=>console.log('host:onWindow:scroll'); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"qEAmBwC,IAAI,QAAQ,GAAG,CAAC\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Foo_component_div_host_onDocumentScroll_1_prNcLu2fBS4", + "entry": null, + "displayName": "test.tsx_Foo_component_div_host_onDocumentScroll_1", + "hash": "prNcLu2fBS4", + "canonicalFilename": "test.tsx_Foo_component_div_host_onDocumentScroll_1_prNcLu2fBS4", + "path": "src", + "extension": "js", + "parent": "Foo_component_1_Q0jkSkaqC5c", "ctxKind": "eventHandler", "ctxName": "host:onDocumentScroll$", "captures": false, "loc": [ - 712, - 753 + 795, + 834 ] } */ -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_HTDRsvUbLiE"), "Foo_component_HTDRsvUbLiE"), { +export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_eZLoPe62E2c"), "Foo_component_eZLoPe62E2c"), { tagName: "my-foo" }); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHA0BhB;IACC,SAAS;AACb,GAAG\"}") -============================= test.tsx_Foo_component_HTDRsvUbLiE.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHA0BhB;IACC,SAAS;AACb,GAAG\"}") +============================= src/test.tsx_Foo_component_eZLoPe62E2c.js (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; -export const Foo_component_HTDRsvUbLiE = ()=>{ - return /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_1_DvU6FitWglY"), "Foo_component_1_DvU6FitWglY"); +export const Foo_component_eZLoPe62E2c = ()=>{ + return /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_1_Q0jkSkaqC5c"), "Foo_component_1_Q0jkSkaqC5c"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAG8B;IAE1B;AAwBJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAG8B;IAE1B;AAwBJ\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_HTDRsvUbLiE", + "origin": "src/test.tsx", + "name": "Foo_component_eZLoPe62E2c", "entry": null, "displayName": "test.tsx_Foo_component", - "hash": "HTDRsvUbLiE", - "canonicalFilename": "test.tsx_Foo_component_HTDRsvUbLiE", - "path": "", + "hash": "eZLoPe62E2c", + "canonicalFilename": "test.tsx_Foo_component_eZLoPe62E2c", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -104,199 +130,199 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Foo_component_div_host_onClick_cPEH970JbEY.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_onDocument_scroLL_0KtIVQvzzXA.js (ENTRY POINT)== -export const Foo_component_div_host_onClick_cPEH970JbEY = ()=>console.log('host:onClick$'); +export const Foo_component_div_onDocument_scroLL_0KtIVQvzzXA = ()=>console.log('onDocument-scroLL'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"0DAiB+B,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"+DAeoC,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_div_host_onClick_cPEH970JbEY", + "origin": "src/test.tsx", + "name": "Foo_component_div_onDocument_scroLL_0KtIVQvzzXA", "entry": null, - "displayName": "test.tsx_Foo_component_div_host_onClick", - "hash": "cPEH970JbEY", - "canonicalFilename": "test.tsx_Foo_component_div_host_onClick_cPEH970JbEY", - "path": "", + "displayName": "test.tsx_Foo_component_div_onDocument_scroLL", + "hash": "0KtIVQvzzXA", + "canonicalFilename": "test.tsx_Foo_component_div_onDocument_scroLL_0KtIVQvzzXA", + "path": "src", "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", + "parent": "Foo_component_1_Q0jkSkaqC5c", "ctxKind": "eventHandler", - "ctxName": "host:onClick$", + "ctxName": "onDocument-scroLL$", "captures": false, "loc": [ - 638, - 670 + 568, + 604 ] } */ -============================= test.tsx_Foo_component_1_DvU6FitWglY.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_host_onClick_N0aLOhClgXg.js (ENTRY POINT)== -import { _jsxQ } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const Foo_component_1_DvU6FitWglY = ()=>{ - const handler = /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_handler_H10xZtD0e7w"), "Foo_component_handler_H10xZtD0e7w"); - return /*#__PURE__*/ _jsxQ("div", null, { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onClick_M48DYiidSJw"), "Foo_component_div_onClick_M48DYiidSJw"), - onDocumentScroll$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onDocumentScroll_rwFFtFiVuKc"), "Foo_component_div_onDocumentScroll_rwFFtFiVuKc"), - onDocumentScroll$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onDocumentScroll_1_CwneoGpmTZI"), "Foo_component_div_onDocumentScroll_1_CwneoGpmTZI"), - "on-cLick$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_on_cLick_IoAsJW8vYJc"), "Foo_component_div_on_cLick_IoAsJW8vYJc"), - "onDocument-sCroll$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onDocument_sCroll_5VNik61PZOM"), "Foo_component_div_onDocument_sCroll_5VNik61PZOM"), - "onDocument-scroLL$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onDocument_scroLL_1q0Sgr8te3g"), "Foo_component_div_onDocument_scroLL_1q0Sgr8te3g"), - "host:onClick$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_host_onClick_cPEH970JbEY"), "Foo_component_div_host_onClick_cPEH970JbEY"), - "host:onDocumentScroll$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_host_onDocumentScroll_Zip7mifsjRY"), "Foo_component_div_host_onDocumentScroll_Zip7mifsjRY"), - "host:onDocumentScroll$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_host_onDocumentScroll_1_Em1LspK7JVg"), "Foo_component_div_host_onDocumentScroll_1_Em1LspK7JVg"), - onKeyup$: handler, - "onDocument:keyup$": handler, - "onWindow:keyup$": handler, - custom$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_custom_pyHnxab17ms"), "Foo_component_div_custom_pyHnxab17ms") - }, null, 3, "u6_0"); -}; -export { _hW } from "@builder.io/qwik"; +export const Foo_component_div_host_onClick_N0aLOhClgXg = ()=>console.log('host:onClick$'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;2CAKa;IACL,MAAM;IACN,qBACI,MAAC;QACG,QAAQ;QACR,iBAAiB;QACjB,iBAAiB;QAEjB,WAAS;QACT,oBAAkB;QAClB,oBAAkB;QAPtB,eAkBE;QAlBF,wBAkBE;QAlBF,wBAkBE;QALE,UAAU;QAbd,qBAcuB;QAdvB,mBAeqB;QAEjB,OAAO;;AAGnB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"0DAiB+B,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_1_DvU6FitWglY", + "origin": "src/test.tsx", + "name": "Foo_component_div_host_onClick_N0aLOhClgXg", "entry": null, - "displayName": "test.tsx_Foo_component_1", - "hash": "DvU6FitWglY", - "canonicalFilename": "test.tsx_Foo_component_1_DvU6FitWglY", - "path": "", + "displayName": "test.tsx_Foo_component_div_host_onClick", + "hash": "N0aLOhClgXg", + "canonicalFilename": "test.tsx_Foo_component_div_host_onClick_N0aLOhClgXg", + "path": "src", "extension": "js", - "parent": "Foo_component_HTDRsvUbLiE", - "ctxKind": "function", - "ctxName": "$", + "parent": "Foo_component_1_Q0jkSkaqC5c", + "ctxKind": "eventHandler", + "ctxName": "host:onClick$", "captures": false, "loc": [ - 105, - 1041 + 638, + 670 ] } */ -============================= test.tsx_Foo_component_div_host_onDocumentScroll_1_Em1LspK7JVg.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_custom_iXKuZ4Oo040.js (ENTRY POINT)== -export const Foo_component_div_host_onDocumentScroll_1_Em1LspK7JVg = ()=>console.log('host:onWindow:scroll'); +export const Foo_component_div_custom_iXKuZ4Oo040 = ()=>console.log('custom'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"qEAmBwC,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"oDAyByB,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_div_host_onDocumentScroll_1_Em1LspK7JVg", + "origin": "src/test.tsx", + "name": "Foo_component_div_custom_iXKuZ4Oo040", "entry": null, - "displayName": "test.tsx_Foo_component_div_host_onDocumentScroll_1", - "hash": "Em1LspK7JVg", - "canonicalFilename": "test.tsx_Foo_component_div_host_onDocumentScroll_1_Em1LspK7JVg", - "path": "", + "displayName": "test.tsx_Foo_component_div_custom", + "hash": "iXKuZ4Oo040", + "canonicalFilename": "test.tsx_Foo_component_div_custom_iXKuZ4Oo040", + "path": "src", "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", + "parent": "Foo_component_1_Q0jkSkaqC5c", "ctxKind": "eventHandler", - "ctxName": "host:onDocumentScroll$", + "ctxName": "custom$", "captures": false, "loc": [ - 795, - 834 + 984, + 1009 ] } */ -============================= test.tsx_Foo_component_div_custom_pyHnxab17ms.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_onDocumentScroll_wsbuz62v7JM.js (ENTRY POINT)== -export const Foo_component_div_custom_pyHnxab17ms = ()=>console.log('custom'); +export const Foo_component_div_onDocumentScroll_wsbuz62v7JM = ()=>console.log('onDocumentScroll'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"oDAyByB,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"8DAUmC,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_div_custom_pyHnxab17ms", + "origin": "src/test.tsx", + "name": "Foo_component_div_onDocumentScroll_wsbuz62v7JM", "entry": null, - "displayName": "test.tsx_Foo_component_div_custom", - "hash": "pyHnxab17ms", - "canonicalFilename": "test.tsx_Foo_component_div_custom_pyHnxab17ms", - "path": "", + "displayName": "test.tsx_Foo_component_div_onDocumentScroll", + "hash": "wsbuz62v7JM", + "canonicalFilename": "test.tsx_Foo_component_div_onDocumentScroll_wsbuz62v7JM", + "path": "src", "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", + "parent": "Foo_component_1_Q0jkSkaqC5c", "ctxKind": "eventHandler", - "ctxName": "custom$", + "ctxName": "onDocumentScroll$", "captures": false, "loc": [ - 984, - 1009 + 293, + 328 ] } */ -============================= test.tsx_Foo_component_div_onDocument_scroLL_1q0Sgr8te3g.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_1_Q0jkSkaqC5c.js (ENTRY POINT)== -export const Foo_component_div_onDocument_scroLL_1q0Sgr8te3g = ()=>console.log('onDocument-scroLL'); +import { _jsxQ } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const Foo_component_1_Q0jkSkaqC5c = ()=>{ + const handler = /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_handler_uSWNL9qHA0Q"), "Foo_component_handler_uSWNL9qHA0Q"); + return /*#__PURE__*/ _jsxQ("div", null, { + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onClick_Uapiy40JUtg"), "Foo_component_div_onClick_Uapiy40JUtg"), + onDocumentScroll$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onDocumentScroll_wsbuz62v7JM"), "Foo_component_div_onDocumentScroll_wsbuz62v7JM"), + onDocumentScroll$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onDocumentScroll_1_V8yCZGJV4xU"), "Foo_component_div_onDocumentScroll_1_V8yCZGJV4xU"), + "on-cLick$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_on_cLick_81aAZEwAGMs"), "Foo_component_div_on_cLick_81aAZEwAGMs"), + "onDocument-sCroll$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onDocument_sCroll_Eiolnh9fo0o"), "Foo_component_div_onDocument_sCroll_Eiolnh9fo0o"), + "onDocument-scroLL$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onDocument_scroLL_0KtIVQvzzXA"), "Foo_component_div_onDocument_scroLL_0KtIVQvzzXA"), + "host:onClick$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_host_onClick_N0aLOhClgXg"), "Foo_component_div_host_onClick_N0aLOhClgXg"), + "host:onDocumentScroll$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_host_onDocumentScroll_MZklXRTGKKA"), "Foo_component_div_host_onDocumentScroll_MZklXRTGKKA"), + "host:onDocumentScroll$": /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_host_onDocumentScroll_1_prNcLu2fBS4"), "Foo_component_div_host_onDocumentScroll_1_prNcLu2fBS4"), + onKeyup$: handler, + "onDocument:keyup$": handler, + "onWindow:keyup$": handler, + custom$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_custom_iXKuZ4Oo040"), "Foo_component_div_custom_iXKuZ4Oo040") + }, null, 3, "oJ_0"); +}; +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"+DAeoC,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;2CAKa;IACL,MAAM;IACN,qBACI,MAAC;QACG,QAAQ;QACR,iBAAiB;QACjB,iBAAiB;QAEjB,WAAS;QACT,oBAAkB;QAClB,oBAAkB;QAPtB,eAkBE;QAlBF,wBAkBE;QAlBF,wBAkBE;QALE,UAAU;QAbd,qBAcuB;QAdvB,mBAeqB;QAEjB,OAAO;;AAGnB\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_div_onDocument_scroLL_1q0Sgr8te3g", + "origin": "src/test.tsx", + "name": "Foo_component_1_Q0jkSkaqC5c", "entry": null, - "displayName": "test.tsx_Foo_component_div_onDocument_scroLL", - "hash": "1q0Sgr8te3g", - "canonicalFilename": "test.tsx_Foo_component_div_onDocument_scroLL_1q0Sgr8te3g", - "path": "", + "displayName": "test.tsx_Foo_component_1", + "hash": "Q0jkSkaqC5c", + "canonicalFilename": "test.tsx_Foo_component_1_Q0jkSkaqC5c", + "path": "src", "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", - "ctxKind": "eventHandler", - "ctxName": "onDocument-scroLL$", + "parent": "Foo_component_eZLoPe62E2c", + "ctxKind": "function", + "ctxName": "$", "captures": false, "loc": [ - 568, - 604 + 105, + 1041 ] } */ -============================= test.tsx_Foo_component_div_onDocumentScroll_1_CwneoGpmTZI.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_host_onDocumentScroll_MZklXRTGKKA.js (ENTRY POINT)== -export const Foo_component_div_onDocumentScroll_1_CwneoGpmTZI = ()=>console.log('onWindowScroll'); +export const Foo_component_div_host_onDocumentScroll_MZklXRTGKKA = ()=>console.log('host:onDocument:scroll'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"gEAWmC,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mEAkBwC,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_div_onDocumentScroll_1_CwneoGpmTZI", + "origin": "src/test.tsx", + "name": "Foo_component_div_host_onDocumentScroll_MZklXRTGKKA", "entry": null, - "displayName": "test.tsx_Foo_component_div_onDocumentScroll_1", - "hash": "CwneoGpmTZI", - "canonicalFilename": "test.tsx_Foo_component_div_onDocumentScroll_1_CwneoGpmTZI", - "path": "", + "displayName": "test.tsx_Foo_component_div_host_onDocumentScroll", + "hash": "MZklXRTGKKA", + "canonicalFilename": "test.tsx_Foo_component_div_host_onDocumentScroll_MZklXRTGKKA", + "path": "src", "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", + "parent": "Foo_component_1_Q0jkSkaqC5c", "ctxKind": "eventHandler", - "ctxName": "onDocumentScroll$", + "ctxName": "host:onDocumentScroll$", "captures": false, "loc": [ - 365, - 398 + 712, + 753 ] } */ -============================= test.tsx_Foo_component_div_on_cLick_IoAsJW8vYJc.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_on_cLick_81aAZEwAGMs.js (ENTRY POINT)== -export const Foo_component_div_on_cLick_IoAsJW8vYJc = ()=>console.log('on-cLick$'); +export const Foo_component_div_on_cLick_81aAZEwAGMs = ()=>console.log('on-cLick$'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"sDAa2B,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"sDAa2B,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_div_on_cLick_IoAsJW8vYJc", + "origin": "src/test.tsx", + "name": "Foo_component_div_on_cLick_81aAZEwAGMs", "entry": null, "displayName": "test.tsx_Foo_component_div_on_cLick", - "hash": "IoAsJW8vYJc", - "canonicalFilename": "test.tsx_Foo_component_div_on_cLick_IoAsJW8vYJc", - "path": "", + "hash": "81aAZEwAGMs", + "canonicalFilename": "test.tsx_Foo_component_div_on_cLick_81aAZEwAGMs", + "path": "src", "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", + "parent": "Foo_component_1_Q0jkSkaqC5c", "ctxKind": "eventHandler", "ctxName": "on-cLick$", "captures": false, @@ -306,23 +332,23 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Foo_component_div_onClick_M48DYiidSJw.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_onClick_Uapiy40JUtg.js (ENTRY POINT)== -export const Foo_component_div_onClick_M48DYiidSJw = ()=>console.log('onClick$'); +export const Foo_component_div_onClick_Uapiy40JUtg = ()=>console.log('onClick$'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"qDAS0B,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"qDAS0B,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_div_onClick_M48DYiidSJw", + "origin": "src/test.tsx", + "name": "Foo_component_div_onClick_Uapiy40JUtg", "entry": null, "displayName": "test.tsx_Foo_component_div_onClick", - "hash": "M48DYiidSJw", - "canonicalFilename": "test.tsx_Foo_component_div_onClick_M48DYiidSJw", - "path": "", + "hash": "Uapiy40JUtg", + "canonicalFilename": "test.tsx_Foo_component_div_onClick_Uapiy40JUtg", + "path": "src", "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", + "parent": "Foo_component_1_Q0jkSkaqC5c", "ctxKind": "eventHandler", "ctxName": "onClick$", "captures": false, @@ -332,50 +358,24 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Foo_component_div_onDocumentScroll_rwFFtFiVuKc.js (ENTRY POINT)== - -export const Foo_component_div_onDocumentScroll_rwFFtFiVuKc = ()=>console.log('onDocumentScroll'); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"8DAUmC,IAAI,QAAQ,GAAG,CAAC\"}") -/* -{ - "origin": "test.tsx", - "name": "Foo_component_div_onDocumentScroll_rwFFtFiVuKc", - "entry": null, - "displayName": "test.tsx_Foo_component_div_onDocumentScroll", - "hash": "rwFFtFiVuKc", - "canonicalFilename": "test.tsx_Foo_component_div_onDocumentScroll_rwFFtFiVuKc", - "path": "", - "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", - "ctxKind": "eventHandler", - "ctxName": "onDocumentScroll$", - "captures": false, - "loc": [ - 293, - 328 - ] -} -*/ -============================= test.tsx_Foo_component_handler_H10xZtD0e7w.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_handler_uSWNL9qHA0Q.js (ENTRY POINT)== -export const Foo_component_handler_H10xZtD0e7w = ()=>console.log('reused'); +export const Foo_component_handler_uSWNL9qHA0Q = ()=>console.log('reused'); export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"iDAM0B,IAAM,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"iDAM0B,IAAM,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_handler_H10xZtD0e7w", + "origin": "src/test.tsx", + "name": "Foo_component_handler_uSWNL9qHA0Q", "entry": null, "displayName": "test.tsx_Foo_component_handler", - "hash": "H10xZtD0e7w", - "canonicalFilename": "test.tsx_Foo_component_handler_H10xZtD0e7w", - "path": "", + "hash": "uSWNL9qHA0Q", + "canonicalFilename": "test.tsx_Foo_component_handler_uSWNL9qHA0Q", + "path": "src", "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", + "parent": "Foo_component_1_Q0jkSkaqC5c", "ctxKind": "function", "ctxName": "$", "captures": false, @@ -385,23 +385,23 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Foo_component_div_onDocument_sCroll_5VNik61PZOM.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_onDocument_sCroll_Eiolnh9fo0o.js (ENTRY POINT)== -export const Foo_component_div_onDocument_sCroll_5VNik61PZOM = ()=>console.log('onDocument-sCroll'); +export const Foo_component_div_onDocument_sCroll_Eiolnh9fo0o = ()=>console.log('onDocument-sCroll'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"+DAcoC,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"+DAcoC,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_div_onDocument_sCroll_5VNik61PZOM", + "origin": "src/test.tsx", + "name": "Foo_component_div_onDocument_sCroll_Eiolnh9fo0o", "entry": null, "displayName": "test.tsx_Foo_component_div_onDocument_sCroll", - "hash": "5VNik61PZOM", - "canonicalFilename": "test.tsx_Foo_component_div_onDocument_sCroll_5VNik61PZOM", - "path": "", + "hash": "Eiolnh9fo0o", + "canonicalFilename": "test.tsx_Foo_component_div_onDocument_sCroll_Eiolnh9fo0o", + "path": "src", "extension": "js", - "parent": "Foo_component_1_DvU6FitWglY", + "parent": "Foo_component_1_Q0jkSkaqC5c", "ctxKind": "eventHandler", "ctxName": "onDocument-sCroll$", "captures": false, diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_lightweight_functional.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_lightweight_functional.snap index 622119140f6..8c520b17154 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_lightweight_functional.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_lightweight_functional.snap @@ -32,11 +32,63 @@ export const ButtonArrow = ({text, color}) => { ); } -============================= test.tsx_Foo_component_HTDRsvUbLiE.tsx (ENTRY POINT)== +============================= src/test.tsx == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_eZLoPe62E2c"), "Foo_component_eZLoPe62E2c"), { + tagName: "my-foo" +}); +export function Button({ text, color }) { + return ; +} +export const ButtonArrow = ({ text, color })=>{ + return ; +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAOhB;IACC,SAAS;AACb,GAAG;AAEH,OAAO,SAAS,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC;IAChC,QACK,OAAO,UAAU,OAAO;;;SAAyC,OAAO;AAEjF;AAEA,OAAO,MAAM,cAAc,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC;IACrC,QACK,OAAO,UAAU,OAAO;;;SAAyC,OAAO;AAEjF,EAAC\"}") +============================= src/test.tsx_Button_button_onClick_V3Il1pOeUx0.tsx (ENTRY POINT)== + +import { useLexicalScope } from "@builder.io/qwik"; +export const Button_button_onClick_V3Il1pOeUx0 = ()=>{ + const [color, text] = useLexicalScope(); + return console.log(text, color); +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";iDAgB2C;;WAAI,QAAQ,GAAG,CAAC,MAAM\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Button_button_onClick_V3Il1pOeUx0", + "entry": null, + "displayName": "test.tsx_Button_button_onClick", + "hash": "V3Il1pOeUx0", + "canonicalFilename": "test.tsx_Button_button_onClick_V3Il1pOeUx0", + "path": "src", + "extension": "tsx", + "parent": null, + "ctxKind": "jSXProp", + "ctxName": "onClick$", + "captures": true, + "loc": [ + 349, + 377 + ] +} +*/ +============================= src/test.tsx_Foo_component_eZLoPe62E2c.tsx (ENTRY POINT)== import { Button } from "./test"; import { ButtonArrow } from "./test"; -export const Foo_component_HTDRsvUbLiE = (props1)=>{ +export const Foo_component_eZLoPe62E2c = (props1)=>{ return
; -} -export const ButtonArrow = ({ text, color })=>{ - return ; -}; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAOhB;IACC,SAAS;AACb,GAAG;AAEH,OAAO,SAAS,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC;IAChC,QACK,OAAO,UAAU,OAAO;;;SAAyC,OAAO;AAEjF;AAEA,OAAO,MAAM,cAAc,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC;IACrC,QACK,OAAO,UAAU,OAAO;;;SAAyC,OAAO;AAEjF,EAAC\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_manual_chunks.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_manual_chunks.snap index da36161540b..d669780b4ce 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_manual_chunks.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_manual_chunks.snap @@ -46,12 +46,56 @@ export const Child = component$(() => { ); }); -============================= test.tsx_Parent_component_useTask_gDH1EtUWqBU.js == +============================= src/test.tsx_Child_component_r5lvTXKSpwk.js == + +import { _fnSignal } from "@builder.io/qwik"; +import { _jsxQ } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +import { useStore } from "@builder.io/qwik"; +import { useTaskQrl } from "@builder.io/qwik"; +export const Child_component_r5lvTXKSpwk = ()=>{ + const state = useStore({ + text: '' + }); + // Double count watch + useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_useTask_Sg9Xn0owg6A"), "Child_component_useTask_Sg9Xn0owg6A", [ + state + ])); + return /*#__PURE__*/ _jsxQ("div", null, { + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_div_onClick_mfAbs3oHQGQ"), "Child_component_div_onClick_mfAbs3oHQGQ") + }, _fnSignal((p0)=>p0.text, [ + state + ], "p0.text"), 3, "oJ_1"); +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;2CAuBgC;IAC5B,MAAM,QAAQ,SAAS;QACnB,MAAM;IACV;IAEA,qBAAqB;IACrB;;;IAIA,qBACI,MAAC;QAAI,QAAQ;uBACR,GAAM,IAAI;;;AAGvB\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Child_component_r5lvTXKSpwk", + "entry": "src/test.tsx_entry_Child", + "displayName": "test.tsx_Child_component", + "hash": "r5lvTXKSpwk", + "canonicalFilename": "test.tsx_Child_component_r5lvTXKSpwk", + "path": "src", + "extension": "js", + "parent": null, + "ctxKind": "function", + "ctxName": "component$", + "captures": false, + "loc": [ + 519, + 799 + ] +} +*/ +============================= src/test.tsx_Parent_component_useTask_gZtBersfWT0.js == import { useLexicalScope } from "@builder.io/qwik"; import mongo from "mongodb"; import redis from "redis"; -export const Parent_component_useTask_gDH1EtUWqBU = async ()=>{ +export const Parent_component_useTask_gZtBersfWT0 = async ()=>{ const [state] = useLexicalScope(); state.text = await mongo.users(); redis.set(state.text); @@ -59,18 +103,18 @@ export const Parent_component_useTask_gDH1EtUWqBU = async ()=>{ export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;oDAWa;;IACL,MAAM,IAAI,GAAG,MAAM,MAAM,KAAK;IAC9B,MAAM,GAAG,CAAC,MAAM,IAAI\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;oDAWa;;IACL,MAAM,IAAI,GAAG,MAAM,MAAM,KAAK;IAC9B,MAAM,GAAG,CAAC,MAAM,IAAI\"}") /* { - "origin": "test.tsx", - "name": "Parent_component_useTask_gDH1EtUWqBU", - "entry": "test.tsx_entry_Parent", + "origin": "src/test.tsx", + "name": "Parent_component_useTask_gZtBersfWT0", + "entry": "src/test.tsx_entry_Parent", "displayName": "test.tsx_Parent_component_useTask", - "hash": "gDH1EtUWqBU", - "canonicalFilename": "test.tsx_Parent_component_useTask_gDH1EtUWqBU", - "path": "", + "hash": "gZtBersfWT0", + "canonicalFilename": "test.tsx_Parent_component_useTask_gZtBersfWT0", + "path": "src", "extension": "js", - "parent": "Parent_component_0TaiDayHrlo", + "parent": "Parent_component_RvpwMo6p6KE", "ctxKind": "function", "ctxName": "useTask$", "captures": true, @@ -80,108 +124,90 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Parent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_0TaiDayHrlo"), "Parent_component_0TaiDayHrlo")); -export const Child = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_9GyF01GDKqw"), "Child_component_9GyF01GDKqw")); +export const Parent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_RvpwMo6p6KE"), "Parent_component_RvpwMo6p6KE")); +export const Child = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_r5lvTXKSpwk"), "Child_component_r5lvTXKSpwk")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAKA,OAAO,MAAM,uBAAS,uHAgBnB;AAEH,OAAO,MAAM,sBAAQ,qHAelB\"}") -============================= test.tsx_Child_component_useTask_Oh4n7ZeqJkU.js == +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAKA,OAAO,MAAM,uBAAS,uHAgBnB;AAEH,OAAO,MAAM,sBAAQ,qHAelB\"}") +============================= src/test.tsx_Child_component_div_onClick_mfAbs3oHQGQ.js (ENTRY POINT)== -import { useLexicalScope } from "@builder.io/qwik"; -import mongo from "mongodb"; -export const Child_component_useTask_Oh4n7ZeqJkU = async ()=>{ - const [state] = useLexicalScope(); - state.text = await mongo.users(); -}; -export { _hW } from "@builder.io/qwik"; +export const Child_component_div_onClick_mfAbs3oHQGQ = ()=>console.log('child'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;mDA6Ba;;IACL,MAAM,IAAI,GAAG,MAAM,MAAM,KAAK\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"uDAkCuB,IAAM,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Child_component_useTask_Oh4n7ZeqJkU", - "entry": "test.tsx_entry_Child", - "displayName": "test.tsx_Child_component_useTask", - "hash": "Oh4n7ZeqJkU", - "canonicalFilename": "test.tsx_Child_component_useTask_Oh4n7ZeqJkU", - "path": "", + "origin": "src/test.tsx", + "name": "Child_component_div_onClick_mfAbs3oHQGQ", + "entry": null, + "displayName": "test.tsx_Child_component_div_onClick", + "hash": "mfAbs3oHQGQ", + "canonicalFilename": "test.tsx_Child_component_div_onClick_mfAbs3oHQGQ", + "path": "src", "extension": "js", - "parent": "Child_component_9GyF01GDKqw", - "ctxKind": "function", - "ctxName": "useTask$", - "captures": true, + "parent": "Child_component_r5lvTXKSpwk", + "ctxKind": "eventHandler", + "ctxName": "onClick$", + "captures": false, "loc": [ - 621, - 682 + 722, + 748 ] } */ -============================= test.tsx_Parent_component_0TaiDayHrlo.js == +============================= src/test.tsx_Child_component_useTask_Sg9Xn0owg6A.js == -import { _fnSignal } from "@builder.io/qwik"; -import { _jsxQ } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -import { useStore } from "@builder.io/qwik"; -import { useTaskQrl } from "@builder.io/qwik"; -export const Parent_component_0TaiDayHrlo = ()=>{ - const state = useStore({ - text: '' - }); - // Double count watch - useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_useTask_gDH1EtUWqBU"), "Parent_component_useTask_gDH1EtUWqBU", [ - state - ])); - return /*#__PURE__*/ _jsxQ("div", null, { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_div_onClick_C5XE49Nqd3A"), "Parent_component_div_onClick_C5XE49Nqd3A") - }, _fnSignal((p0)=>p0.text, [ - state - ], "p0.text"), 3, "u6_0"); +import { useLexicalScope } from "@builder.io/qwik"; +import mongo from "mongodb"; +export const Child_component_useTask_Sg9Xn0owg6A = async ()=>{ + const [state] = useLexicalScope(); + state.text = await mongo.users(); }; +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;4CAKiC;IAC7B,MAAM,QAAQ,SAAS;QACnB,MAAM;IACV;IAEA,qBAAqB;IACrB;;;IAKA,qBACI,MAAC;QAAI,QAAQ;uBACR,GAAM,IAAI;;;AAGvB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;mDA6Ba;;IACL,MAAM,IAAI,GAAG,MAAM,MAAM,KAAK\"}") /* { - "origin": "test.tsx", - "name": "Parent_component_0TaiDayHrlo", - "entry": "test.tsx_entry_Parent", - "displayName": "test.tsx_Parent_component", - "hash": "0TaiDayHrlo", - "canonicalFilename": "test.tsx_Parent_component_0TaiDayHrlo", - "path": "", + "origin": "src/test.tsx", + "name": "Child_component_useTask_Sg9Xn0owg6A", + "entry": "src/test.tsx_entry_Child", + "displayName": "test.tsx_Child_component_useTask", + "hash": "Sg9Xn0owg6A", + "canonicalFilename": "test.tsx_Child_component_useTask_Sg9Xn0owg6A", + "path": "src", "extension": "js", - "parent": null, + "parent": "Child_component_r5lvTXKSpwk", "ctxKind": "function", - "ctxName": "component$", - "captures": false, + "ctxName": "useTask$", + "captures": true, "loc": [ - 171, - 483 + 621, + 682 ] } */ -============================= test.tsx_Parent_component_div_onClick_C5XE49Nqd3A.js (ENTRY POINT)== +============================= src/test.tsx_Parent_component_div_onClick_PGf4qR0tjaA.js (ENTRY POINT)== -export const Parent_component_div_onClick_C5XE49Nqd3A = ()=>console.log('parent'); +export const Parent_component_div_onClick_PGf4qR0tjaA = ()=>console.log('parent'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAiBuB,IAAM,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAiBuB,IAAM,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Parent_component_div_onClick_C5XE49Nqd3A", + "origin": "src/test.tsx", + "name": "Parent_component_div_onClick_PGf4qR0tjaA", "entry": null, "displayName": "test.tsx_Parent_component_div_onClick", - "hash": "C5XE49Nqd3A", - "canonicalFilename": "test.tsx_Parent_component_div_onClick_C5XE49Nqd3A", - "path": "", + "hash": "PGf4qR0tjaA", + "canonicalFilename": "test.tsx_Parent_component_div_onClick_PGf4qR0tjaA", + "path": "src", "extension": "js", - "parent": "Parent_component_0TaiDayHrlo", + "parent": "Parent_component_RvpwMo6p6KE", "ctxKind": "eventHandler", "ctxName": "onClick$", "captures": false, @@ -191,73 +217,47 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Child_component_9GyF01GDKqw.js == +============================= src/test.tsx_Parent_component_RvpwMo6p6KE.js == import { _fnSignal } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; import { useStore } from "@builder.io/qwik"; import { useTaskQrl } from "@builder.io/qwik"; -export const Child_component_9GyF01GDKqw = ()=>{ +export const Parent_component_RvpwMo6p6KE = ()=>{ const state = useStore({ text: '' }); // Double count watch - useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_useTask_Oh4n7ZeqJkU"), "Child_component_useTask_Oh4n7ZeqJkU", [ + useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_useTask_gZtBersfWT0"), "Parent_component_useTask_gZtBersfWT0", [ state ])); return /*#__PURE__*/ _jsxQ("div", null, { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_div_onClick_elliVSnAiOQ"), "Child_component_div_onClick_elliVSnAiOQ") + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_div_onClick_PGf4qR0tjaA"), "Parent_component_div_onClick_PGf4qR0tjaA") }, _fnSignal((p0)=>p0.text, [ state - ], "p0.text"), 3, "u6_1"); + ], "p0.text"), 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;2CAuBgC;IAC5B,MAAM,QAAQ,SAAS;QACnB,MAAM;IACV;IAEA,qBAAqB;IACrB;;;IAIA,qBACI,MAAC;QAAI,QAAQ;uBACR,GAAM,IAAI;;;AAGvB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;4CAKiC;IAC7B,MAAM,QAAQ,SAAS;QACnB,MAAM;IACV;IAEA,qBAAqB;IACrB;;;IAKA,qBACI,MAAC;QAAI,QAAQ;uBACR,GAAM,IAAI;;;AAGvB\"}") /* { - "origin": "test.tsx", - "name": "Child_component_9GyF01GDKqw", - "entry": "test.tsx_entry_Child", - "displayName": "test.tsx_Child_component", - "hash": "9GyF01GDKqw", - "canonicalFilename": "test.tsx_Child_component_9GyF01GDKqw", - "path": "", + "origin": "src/test.tsx", + "name": "Parent_component_RvpwMo6p6KE", + "entry": "src/test.tsx_entry_Parent", + "displayName": "test.tsx_Parent_component", + "hash": "RvpwMo6p6KE", + "canonicalFilename": "test.tsx_Parent_component_RvpwMo6p6KE", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", "ctxName": "component$", "captures": false, "loc": [ - 519, - 799 - ] -} -*/ -============================= test.tsx_Child_component_div_onClick_elliVSnAiOQ.js (ENTRY POINT)== - -export const Child_component_div_onClick_elliVSnAiOQ = ()=>console.log('child'); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"uDAkCuB,IAAM,QAAQ,GAAG,CAAC\"}") -/* -{ - "origin": "test.tsx", - "name": "Child_component_div_onClick_elliVSnAiOQ", - "entry": null, - "displayName": "test.tsx_Child_component_div_onClick", - "hash": "elliVSnAiOQ", - "canonicalFilename": "test.tsx_Child_component_div_onClick_elliVSnAiOQ", - "path": "", - "extension": "js", - "parent": "Child_component_9GyF01GDKqw", - "ctxKind": "eventHandler", - "ctxName": "onClick$", - "captures": false, - "loc": [ - 722, - 748 + 171, + 483 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_missing_custom_inlined_functions.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_missing_custom_inlined_functions.snap index 128d7984a9b..a3e3d5df392 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_missing_custom_inlined_functions.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_missing_custom_inlined_functions.snap @@ -24,7 +24,7 @@ export const App = component$((props) => { )); }); -============================= test.js == +============================= src/test.js == import { _fnSignal } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; @@ -41,18 +41,18 @@ export const App = component$((props)=>{ }); return $(()=>/*#__PURE__*/ _jsxQ("div", null, null, _fnSignal((p0)=>p0.count, [ state - ], "p0.count"), 3, "u6_0")); + ], "p0.count"), 3, "oJ_0")); }); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AACA,SAAiD,QAAQ,EAAQ,SAAS,QAAQ,mBAAmB;AAGrG,OAAO,MAAM,WAAW,CAAC;IACrB,UAAU;AACd,EAAE;AAEF,OAAO,MAAM,MAAM,WAAW,CAAC;IAC3B,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAChC,SAAS;QACL,QAAQ,GAAG,CAAC,MAAM,KAAK;IAC3B;IACA,OAAO,EAAE,kBACL,MAAC,mCAAK,GAAM,KAAK;;;AAEzB,GAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AACA,SAAiD,QAAQ,EAAQ,SAAS,QAAQ,mBAAmB;AAGrG,OAAO,MAAM,WAAW,CAAC;IACrB,UAAU;AACd,EAAE;AAEF,OAAO,MAAM,MAAM,WAAW,CAAC;IAC3B,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAChC,SAAS;QACL,QAAQ,GAAG,CAAC,MAAM,KAAK;IAC3B;IACA,OAAO,EAAE,kBACL,MAAC,mCAAK,GAAM,KAAK;;;AAEzB,GAAG\"}") == DIAGNOSTICS == [ { "category": "error", "code": "C05", - "file": "test.tsx", + "file": "src/test.tsx", "message": "Found 'useMemo$' but did not find the corresponding 'useMemoQrl' exported in the same file. Please check that it is exported and spelled correctly", "highlights": [ { diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_multi_capture.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_multi_capture.snap index dee2e0b1adb..5839c6b5143 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_multi_capture.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_multi_capture.snap @@ -31,81 +31,83 @@ export const Bar = component$(({bar}) => { }); }) -============================= test.tsx_Foo_component_HTDRsvUbLiE.jsx (ENTRY POINT)== +============================= src/test.jsx == +import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Foo_component_HTDRsvUbLiE = (props)=>{ - return /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_1_DvU6FitWglY"), "Foo_component_1_DvU6FitWglY", [ - props - ]); +export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_eZLoPe62E2c"), "Foo_component_eZLoPe62E2c")); +export const Bar = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Bar_component_H0Lo8K0SD5k"), "Bar_component_H0Lo8K0SD5k")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAUjB;AAEF,OAAO,MAAM,oBAAM,iHAQjB\"}") +============================= src/test.tsx_Bar_component_1_ad8sv5lVgzs.jsx (ENTRY POINT)== + +import { useLexicalScope } from "@builder.io/qwik"; +export const Bar_component_1_ad8sv5lVgzs = ()=>{ + const [props] = useLexicalScope(); + return
+ {props.bar} +
; }; +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAG8B;IAE1B;;;AAQJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";2CAgBa;;IACL,QACK,IAAI;cACH,OAJkB,IAIb;YACP,EAAE\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_HTDRsvUbLiE", + "origin": "src/test.tsx", + "name": "Bar_component_1_ad8sv5lVgzs", "entry": null, - "displayName": "test.tsx_Foo_component", - "hash": "HTDRsvUbLiE", - "canonicalFilename": "test.tsx_Foo_component_HTDRsvUbLiE", - "path": "", + "displayName": "test.tsx_Bar_component_1", + "hash": "ad8sv5lVgzs", + "canonicalFilename": "test.tsx_Bar_component_1_ad8sv5lVgzs", + "path": "src", "extension": "jsx", - "parent": null, + "parent": "Bar_component_H0Lo8K0SD5k", "ctxKind": "function", - "ctxName": "component$", - "captures": false, + "ctxName": "$", + "captures": true, "loc": [ - 83, - 278 + 337, + 434 ] } */ -============================= test.jsx == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_HTDRsvUbLiE"), "Foo_component_HTDRsvUbLiE")); -export const Bar = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Bar_component_L80pS8Hxf1Y"), "Bar_component_L80pS8Hxf1Y")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAUjB;AAEF,OAAO,MAAM,oBAAM,iHAQjB\"}") -============================= test.tsx_Bar_component_L80pS8Hxf1Y.jsx (ENTRY POINT)== +============================= src/test.tsx_Foo_component_eZLoPe62E2c.jsx (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; -export const Bar_component_L80pS8Hxf1Y = (props)=>{ - return /*#__PURE__*/ qrl(()=>import("./test.tsx_Bar_component_1_0xSyNSnVu3k"), "Bar_component_1_0xSyNSnVu3k", [ +export const Foo_component_eZLoPe62E2c = (props)=>{ + return /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_1_Q0jkSkaqC5c"), "Foo_component_1_Q0jkSkaqC5c", [ props ]); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAe8B;IAC1B;;;AAOJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAG8B;IAE1B;;;AAQJ\"}") /* { - "origin": "test.tsx", - "name": "Bar_component_L80pS8Hxf1Y", + "origin": "src/test.tsx", + "name": "Foo_component_eZLoPe62E2c", "entry": null, - "displayName": "test.tsx_Bar_component", - "hash": "L80pS8Hxf1Y", - "canonicalFilename": "test.tsx_Bar_component_L80pS8Hxf1Y", - "path": "", + "displayName": "test.tsx_Foo_component", + "hash": "eZLoPe62E2c", + "canonicalFilename": "test.tsx_Foo_component_eZLoPe62E2c", + "path": "src", "extension": "jsx", "parent": null, "ctxKind": "function", "ctxName": "component$", "captures": false, "loc": [ - 311, - 438 + 83, + 278 ] } */ -============================= test.tsx_Foo_component_1_DvU6FitWglY.jsx (ENTRY POINT)== +============================= src/test.tsx_Foo_component_1_Q0jkSkaqC5c.jsx (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; -export const Foo_component_1_DvU6FitWglY = ()=>{ +export const Foo_component_1_Q0jkSkaqC5c = ()=>{ const [props] = useLexicalScope(); const fn = ({ aaa })=>aaa; return
@@ -115,18 +117,18 @@ export const Foo_component_1_DvU6FitWglY = ()=>{ export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";2CAKa;;IACL,MAAM,KAAK,CAAC,EAAC,GAAG,EAAC,GAAK;IACtB,QACK,IAAI;cACH,OANkB,KAMZ,MALH,GAKc;YACnB,EAAE\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";2CAKa;;IACL,MAAM,KAAK,CAAC,EAAC,GAAG,EAAC,GAAK;IACtB,QACK,IAAI;cACH,OANkB,KAMZ,MALH,GAKc;YACnB,EAAE\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_1_DvU6FitWglY", + "origin": "src/test.tsx", + "name": "Foo_component_1_Q0jkSkaqC5c", "entry": null, "displayName": "test.tsx_Foo_component_1", - "hash": "DvU6FitWglY", - "canonicalFilename": "test.tsx_Foo_component_1_DvU6FitWglY", - "path": "", + "hash": "Q0jkSkaqC5c", + "canonicalFilename": "test.tsx_Foo_component_1_Q0jkSkaqC5c", + "path": "src", "extension": "jsx", - "parent": "Foo_component_HTDRsvUbLiE", + "parent": "Foo_component_eZLoPe62E2c", "ctxKind": "function", "ctxName": "$", "captures": true, @@ -136,36 +138,34 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Bar_component_1_0xSyNSnVu3k.jsx (ENTRY POINT)== +============================= src/test.tsx_Bar_component_H0Lo8K0SD5k.jsx (ENTRY POINT)== -import { useLexicalScope } from "@builder.io/qwik"; -export const Bar_component_1_0xSyNSnVu3k = ()=>{ - const [props] = useLexicalScope(); - return
- {props.bar} -
; +import { qrl } from "@builder.io/qwik"; +export const Bar_component_H0Lo8K0SD5k = (props)=>{ + return /*#__PURE__*/ qrl(()=>import("./test.tsx_Bar_component_1_ad8sv5lVgzs"), "Bar_component_1_ad8sv5lVgzs", [ + props + ]); }; -export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";2CAgBa;;IACL,QACK,IAAI;cACH,OAJkB,IAIb;YACP,EAAE\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAe8B;IAC1B;;;AAOJ\"}") /* { - "origin": "test.tsx", - "name": "Bar_component_1_0xSyNSnVu3k", + "origin": "src/test.tsx", + "name": "Bar_component_H0Lo8K0SD5k", "entry": null, - "displayName": "test.tsx_Bar_component_1", - "hash": "0xSyNSnVu3k", - "canonicalFilename": "test.tsx_Bar_component_1_0xSyNSnVu3k", - "path": "", + "displayName": "test.tsx_Bar_component", + "hash": "H0Lo8K0SD5k", + "canonicalFilename": "test.tsx_Bar_component_H0Lo8K0SD5k", + "path": "src", "extension": "jsx", - "parent": "Bar_component_L80pS8Hxf1Y", + "parent": null, "ctxKind": "function", - "ctxName": "$", - "captures": true, + "ctxName": "component$", + "captures": false, "loc": [ - 337, - 434 + 311, + 438 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_mutable_children.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_mutable_children.snap index a8bee5776fb..0f5c7c94ab0 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_mutable_children.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_mutable_children.snap @@ -102,7 +102,7 @@ export const AppStatic = component$((props: Stuff) => { ); }); -============================= test.js == +============================= src/test.js == import { _jsxQ } from "@builder.io/qwik"; import { _jsxC } from "@builder.io/qwik"; @@ -116,61 +116,61 @@ import Image from './image.jpg?jsx'; export function Fn1(props) { _jsxBranch(); return /*#__PURE__*/ _jsxC(_Fragment, { - children: /*#__PURE__*/ _jsxQ("div", null, null, prop < 2 ? /*#__PURE__*/ _jsxQ("p", null, null, "1", 3, "u6_0") : /*#__PURE__*/ _jsxC(Stuff, { + children: /*#__PURE__*/ _jsxQ("div", null, null, prop < 2 ? /*#__PURE__*/ _jsxQ("p", null, null, "1", 3, "oJ_0") : /*#__PURE__*/ _jsxC(Stuff, { children: "2" - }, 3, "u6_1"), 1, null) - }, 1, "u6_2"); + }, 3, "oJ_1"), 1, null) + }, 1, "oJ_2"); } export function Fn2(props) { _jsxBranch(); return /*#__PURE__*/ _jsxQ("div", null, null, [ - prop.value && /*#__PURE__*/ _jsxC(Stuff, null, 3, "u6_3"), + prop.value && /*#__PURE__*/ _jsxC(Stuff, null, 3, "oJ_3"), /*#__PURE__*/ _jsxQ("div", null, null, null, 3, null) - ], 1, "u6_4"); + ], 1, "oJ_4"); } export function Fn3(props) { _jsxBranch(); - if (prop.value) return /*#__PURE__*/ _jsxC(Stuff, null, 3, "u6_5"); - return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "u6_6"); + if (prop.value) return /*#__PURE__*/ _jsxC(Stuff, null, 3, "oJ_5"); + return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "oJ_6"); } export function Fn4(props) { _jsxBranch(); - if (prop.value) return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "u6_7"); - return /*#__PURE__*/ _jsxC(Stuff, null, 3, "u6_8"); + if (prop.value) return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "oJ_7"); + return /*#__PURE__*/ _jsxC(Stuff, null, 3, "oJ_8"); } -export const Arrow = (props)=>/*#__PURE__*/ _jsxBranch(/*#__PURE__*/ _jsxQ("div", null, null, prop < 2 ? /*#__PURE__*/ _jsxQ("p", null, null, "1", 3, "u6_9") : /*#__PURE__*/ _jsxC(Stuff, { +export const Arrow = (props)=>/*#__PURE__*/ _jsxBranch(/*#__PURE__*/ _jsxQ("div", null, null, prop < 2 ? /*#__PURE__*/ _jsxQ("p", null, null, "1", 3, "oJ_9") : /*#__PURE__*/ _jsxC(Stuff, { children: "2" - }, 3, "u6_10"), 1, "u6_11")); -const AppDynamic1_component_R00UJ05gbes = (props)=>{ + }, 3, "oJ_10"), 1, "oJ_11")); +const AppDynamic1_component_jkwfkNU6A0s = (props)=>{ _jsxBranch(); return /*#__PURE__*/ _jsxC(_Fragment, { - children: /*#__PURE__*/ _jsxQ("div", null, null, prop < 2 ? /*#__PURE__*/ _jsxQ("p", null, null, "1", 3, "u6_12") : /*#__PURE__*/ _jsxC(Stuff, { + children: /*#__PURE__*/ _jsxQ("div", null, null, prop < 2 ? /*#__PURE__*/ _jsxQ("p", null, null, "1", 3, "oJ_12") : /*#__PURE__*/ _jsxC(Stuff, { children: "2" - }, 3, "u6_13"), 1, null) - }, 1, "u6_14"); + }, 3, "oJ_13"), 1, null) + }, 1, "oJ_14"); }; -export const AppDynamic1 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(AppDynamic1_component_R00UJ05gbes, "AppDynamic1_component_R00UJ05gbes")); -const AppDynamic2_component_3EY2zm0v00A = (props)=>{ +export const AppDynamic1 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(AppDynamic1_component_jkwfkNU6A0s, "AppDynamic1_component_jkwfkNU6A0s")); +const AppDynamic2_component_uTngMOG6M4Y = (props)=>{ _jsxBranch(); return /*#__PURE__*/ _jsxQ("div", null, null, [ - prop.value && /*#__PURE__*/ _jsxC(Stuff, null, 3, "u6_15"), + prop.value && /*#__PURE__*/ _jsxC(Stuff, null, 3, "oJ_15"), /*#__PURE__*/ _jsxQ("div", null, null, null, 3, null) - ], 1, "u6_16"); + ], 1, "oJ_16"); }; -export const AppDynamic2 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(AppDynamic2_component_3EY2zm0v00A, "AppDynamic2_component_3EY2zm0v00A")); -const AppDynamic3_component_FVq83NlbTDQ = (props)=>{ +export const AppDynamic2 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(AppDynamic2_component_uTngMOG6M4Y, "AppDynamic2_component_uTngMOG6M4Y")); +const AppDynamic3_component_l5WSuC7GJGE = (props)=>{ _jsxBranch(); - if (prop.value) return /*#__PURE__*/ _jsxC(Stuff, null, 3, "u6_17"); - return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "u6_18"); + if (prop.value) return /*#__PURE__*/ _jsxC(Stuff, null, 3, "oJ_17"); + return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "oJ_18"); }; -export const AppDynamic3 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(AppDynamic3_component_FVq83NlbTDQ, "AppDynamic3_component_FVq83NlbTDQ")); -const AppDynamic4_component_IO0yr8UvWEI = (props)=>{ +export const AppDynamic3 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(AppDynamic3_component_l5WSuC7GJGE, "AppDynamic3_component_l5WSuC7GJGE")); +const AppDynamic4_component_EsBZsmizFXM = (props)=>{ _jsxBranch(); - if (prop.value) return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "u6_19"); - return /*#__PURE__*/ _jsxC(Stuff, null, 3, "u6_20"); + if (prop.value) return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "oJ_19"); + return /*#__PURE__*/ _jsxC(Stuff, null, 3, "oJ_20"); }; -export const AppDynamic4 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(AppDynamic4_component_IO0yr8UvWEI, "AppDynamic4_component_IO0yr8UvWEI")); -const AppStatic_component_gYRXqF3G5nE = (props)=>{ +export const AppDynamic4 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(AppDynamic4_component_EsBZsmizFXM, "AppDynamic4_component_EsBZsmizFXM")); +const AppStatic_component_z0uFEGcXtHg = (props)=>{ _jsxBranch(); return /*#__PURE__*/ _jsxC(_Fragment, { children: [ @@ -178,15 +178,15 @@ const AppStatic_component_gYRXqF3G5nE = (props)=>{ "Static ", f ? 1 : 3 ], 3, null), - /*#__PURE__*/ _jsxQ("div", null, null, prop < 2 ? /*#__PURE__*/ _jsxQ("p", null, null, "1", 3, "u6_21") : /*#__PURE__*/ _jsxQ("p", null, null, "2", 3, null), 3, null), - /*#__PURE__*/ _jsxQ("div", null, null, prop.value && /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "u6_22"), 3, null), + /*#__PURE__*/ _jsxQ("div", null, null, prop < 2 ? /*#__PURE__*/ _jsxQ("p", null, null, "1", 3, "oJ_21") : /*#__PURE__*/ _jsxQ("p", null, null, "2", 3, null), 3, null), + /*#__PURE__*/ _jsxQ("div", null, null, prop.value && /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "oJ_22"), 3, null), /*#__PURE__*/ _jsxQ("div", null, null, prop.value && /*#__PURE__*/ _jsxC(Fragment, { - children: /*#__PURE__*/ _jsxC(Slot, null, 3, "u6_23") - }, 1, "u6_24"), 1, null), + children: /*#__PURE__*/ _jsxC(Slot, null, 3, "oJ_23") + }, 1, "oJ_24"), 1, null), /*#__PURE__*/ _jsxQ("div", null, null, prop.value && /*#__PURE__*/ _jsxC(_Fragment, { children: /*#__PURE__*/ _jsxQ("div", null, null, null, 3, null) - }, 3, "u6_25"), 1, null), - /*#__PURE__*/ _jsxQ("div", null, null, prop.value && /*#__PURE__*/ _jsxC(Image, null, 3, "u6_26"), 3, null), + }, 3, "oJ_25"), 1, null), + /*#__PURE__*/ _jsxQ("div", null, null, prop.value && /*#__PURE__*/ _jsxC(Image, null, 3, "oJ_26"), 3, null), /*#__PURE__*/ _jsxQ("div", null, null, [ "Static ", f ? 1 : 3 @@ -207,12 +207,12 @@ const AppStatic_component_gYRXqF3G5nE = (props)=>{ stuff() ], 1, null) ] - }, 1, "u6_27"); + }, 1, "oJ_27"); }; -export const AppStatic = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(AppStatic_component_gYRXqF3G5nE, "AppStatic_component_gYRXqF3G5nE")); +export const AppStatic = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(AppStatic_component_z0uFEGcXtHg, "AppStatic_component_z0uFEGcXtHg")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;AACA,SAA+B,IAAI,EAAE,QAAQ,QAAQ,mBAAmB;AACxE,OAAO,WAAW,kBAAkB;AAEpC,OAAO,SAAS,IAAI,KAAY;;IAC5B,qBACI;kBACI,cAAA,MAAC,mBAAK,OAAO,kBAAI,MAAC,iBAAE,gCAAQ,MAAC;sBAAM;;;AAG/C;AAEA,OAAO,SAAS,IAAI,KAAY;;IAC5B,qBACI,MAAC;QAAK,KAAK,KAAK,kBAAI,MAAC;sBAAe,MAAC;;AAE7C;AAEA,OAAO,SAAS,IAAI,KAAY;;IAC5B,IAAI,KAAK,KAAK,EACV,qBACI,MAAC;IAGT,qBACI,MAAC;AAET;AAEA,OAAO,SAAS,IAAI,KAAY;;IAC5B,IAAI,KAAK,KAAK,EACV,qBACI,MAAC;IAGT,qBACI,MAAC;AAET;AAEA,OAAO,MAAM,QAAQ,CAAC,+CAAiB,MAAC,mBAAK,OAAO,kBAAI,MAAC,iBAAE,gCAAQ,MAAC;kBAAM;iCAAiB;0CAErD,CAAC;;IACnC,qBACI;kBACI,cAAA,MAAC,mBAAK,OAAO,kBAAI,MAAC,iBAAE,iCAAQ,MAAC;sBAAM;;;AAG/C;AANA,OAAO,MAAM,4BAAc,+GAMxB;0CACmC,CAAC;;IACnC,qBACI,MAAC;QAAK,KAAK,KAAK,kBAAI,MAAC;sBAAe,MAAC;;AAE7C;AAJA,OAAO,MAAM,4BAAc,+GAIxB;0CAEmC,CAAC;;IACnC,IAAI,KAAK,KAAK,EACV,qBACI,MAAC;IAGT,qBACI,MAAC;AAET;AATA,OAAO,MAAM,4BAAc,+GASxB;0CAEmC,CAAC;;IACnC,IAAI,KAAK,KAAK,EACV,qBACI,MAAC;IAGT,qBACI,MAAC;AAET;AATA,OAAO,MAAM,4BAAc,+GASxB;wCAEiC,CAAC;;IACjC,qBACI;;0BACI,MAAC;gBAAI;gBAAQ,IAAI,IAAI;;0BACrB,MAAC,mBAAK,OAAO,kBAAI,MAAC,iBAAE,iCAAQ,MAAC,iBAAE;0BAE/B,MAAC,mBAAK,KAAK,KAAK,kBAAI,MAAC;0BACrB,MAAC,mBAAK,KAAK,KAAK,kBAAI,MAAC;0BAAS,cAAA,MAAC;;0BAC/B,MAAC,mBAAK,KAAK,KAAK,kBAAI;0BAAE,cAAA,MAAC;;0BACvB,MAAC,mBAAK,KAAK,KAAK,kBAAI,MAAC;0BACrB,MAAC;gBAAI;gBAAQ,IAAI,IAAI;;0BACrB,MAAC,mBAAI;0BACL,MAAC;gBAAI;gCAAQ,GAAM,KAAK;;;;0BACxB,MAAC;gBAAI;gBAAQ;;0BACb,MAAC;gBAAI;gBAAQ;;;;AAGzB;AAjBA,OAAO,MAAM,0BAAY,2GAiBtB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;AACA,SAA+B,IAAI,EAAE,QAAQ,QAAQ,mBAAmB;AACxE,OAAO,WAAW,kBAAkB;AAEpC,OAAO,SAAS,IAAI,KAAY;;IAC5B,qBACI;kBACI,cAAA,MAAC,mBAAK,OAAO,kBAAI,MAAC,iBAAE,gCAAQ,MAAC;sBAAM;;;AAG/C;AAEA,OAAO,SAAS,IAAI,KAAY;;IAC5B,qBACI,MAAC;QAAK,KAAK,KAAK,kBAAI,MAAC;sBAAe,MAAC;;AAE7C;AAEA,OAAO,SAAS,IAAI,KAAY;;IAC5B,IAAI,KAAK,KAAK,EACV,qBACI,MAAC;IAGT,qBACI,MAAC;AAET;AAEA,OAAO,SAAS,IAAI,KAAY;;IAC5B,IAAI,KAAK,KAAK,EACV,qBACI,MAAC;IAGT,qBACI,MAAC;AAET;AAEA,OAAO,MAAM,QAAQ,CAAC,+CAAiB,MAAC,mBAAK,OAAO,kBAAI,MAAC,iBAAE,gCAAQ,MAAC;kBAAM;iCAAiB;0CAErD,CAAC;;IACnC,qBACI;kBACI,cAAA,MAAC,mBAAK,OAAO,kBAAI,MAAC,iBAAE,iCAAQ,MAAC;sBAAM;;;AAG/C;AANA,OAAO,MAAM,4BAAc,+GAMxB;0CACmC,CAAC;;IACnC,qBACI,MAAC;QAAK,KAAK,KAAK,kBAAI,MAAC;sBAAe,MAAC;;AAE7C;AAJA,OAAO,MAAM,4BAAc,+GAIxB;0CAEmC,CAAC;;IACnC,IAAI,KAAK,KAAK,EACV,qBACI,MAAC;IAGT,qBACI,MAAC;AAET;AATA,OAAO,MAAM,4BAAc,+GASxB;0CAEmC,CAAC;;IACnC,IAAI,KAAK,KAAK,EACV,qBACI,MAAC;IAGT,qBACI,MAAC;AAET;AATA,OAAO,MAAM,4BAAc,+GASxB;wCAEiC,CAAC;;IACjC,qBACI;;0BACI,MAAC;gBAAI;gBAAQ,IAAI,IAAI;;0BACrB,MAAC,mBAAK,OAAO,kBAAI,MAAC,iBAAE,iCAAQ,MAAC,iBAAE;0BAE/B,MAAC,mBAAK,KAAK,KAAK,kBAAI,MAAC;0BACrB,MAAC,mBAAK,KAAK,KAAK,kBAAI,MAAC;0BAAS,cAAA,MAAC;;0BAC/B,MAAC,mBAAK,KAAK,KAAK,kBAAI;0BAAE,cAAA,MAAC;;0BACvB,MAAC,mBAAK,KAAK,KAAK,kBAAI,MAAC;0BACrB,MAAC;gBAAI;gBAAQ,IAAI,IAAI;;0BACrB,MAAC,mBAAI;0BACL,MAAC;gBAAI;gCAAQ,GAAM,KAAK;;;;0BACxB,MAAC;gBAAI;gBAAQ;;0BACb,MAAC;gBAAI;gBAAQ;;;;AAGzB;AAjBA,OAAO,MAAM,0BAAY,2GAiBtB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_noop_dev_mode.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_noop_dev_mode.snap index 65ddcbc54da..6cf6da58250 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_noop_dev_mode.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_noop_dev_mode.snap @@ -31,38 +31,38 @@ export const App = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrlDEV } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrlDEV(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0", { - file: "test.tsx", +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrlDEV(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A", { + file: "src/test.tsx", lo: 107, hi: 569, displayName: "test.tsx_App_component" })); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM;;;;;IAoBhB\"}") -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM;;;;;IAoBhB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { _noopQrlDEV } from "@builder.io/qwik"; import { serverStuffQrl } from "@builder.io/qwik"; import { useStore } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ()=>{ +export const App_component_F6JpluHHZ5A = ()=>{ const stuff = useStore(); - serverStuffQrl(/*#__PURE__*/ _noopQrlDEV("App_component_serverStuff_ebyHaP15ytQ", { - file: "test.tsx", + serverStuffQrl(/*#__PURE__*/ _noopQrlDEV("App_component_serverStuff_45Fvq7bwVoM", { + file: "src/test.tsx", lo: 0, hi: 0, displayName: "test.tsx_App_component_serverStuff" }, [ stuff ])); - serverStuffQrl(/*#__PURE__*/ _noopQrlDEV("App_component_serverStuff_1_PQCqO0ANabY", { - file: "test.tsx", + serverStuffQrl(/*#__PURE__*/ _noopQrlDEV("App_component_serverStuff_1_XZtqt4d0b84", { + file: "src/test.tsx", lo: 0, hi: 0, displayName: "test.tsx_App_component_serverStuff_1" @@ -70,43 +70,43 @@ export const App_component_ckEPmXZlub0 = ()=>{ return /*#__PURE__*/ _jsxC(Cmp, { children: /*#__PURE__*/ _jsxQ("p", null, { class: "stuff", - shouldRemove$: /*#__PURE__*/ _noopQrlDEV("App_component_Cmp_p_shouldRemove_uU0MG0jvQD4", { - file: "test.tsx", + shouldRemove$: /*#__PURE__*/ _noopQrlDEV("App_component_Cmp_p_shouldRemove_i7XEYQUiJ8w", { + file: "src/test.tsx", lo: 0, hi: 0, displayName: "test.tsx_App_component_Cmp_p_shouldRemove" }, [ stuff ]), - onClick$: /*#__PURE__*/ _noopQrlDEV("App_component_Cmp_p_onClick_vuXzfUTkpto", { - file: "test.tsx", + onClick$: /*#__PURE__*/ _noopQrlDEV("App_component_Cmp_p_onClick_44EtmIdf4XQ", { + file: "src/test.tsx", lo: 0, hi: 0, displayName: "test.tsx_App_component_Cmp_p_onClick" }) }, "Hello Qwik", 3, null, { - fileName: "test.tsx", + fileName: "src/test.tsx", lineNumber: 16, columnNumber: 13 }) - }, 3, "u6_0", { - fileName: "test.tsx", + }, 3, "oJ_0", { + fileName: "src/test.tsx", lineNumber: 15, columnNumber: 9 }); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;yCAG8B;IAC1B,MAAM,QAAQ;IACd;;;;;;;;IAIA;;;;;;IAIA,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YACL,aAAa;;;;;;;;YACb,QAAQ;;;;;;WACX;;;;;;;;;;AAKb\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;yCAG8B;IAC1B,MAAM,QAAQ;IACd;;;;;;;;IAIA;;;;;;IAIA,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YACL,aAAa;;;;;;;;YACb,QAAQ;;;;;;WACX;;;;;;;;;;AAKb\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_of_synchronous_qrl.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_of_synchronous_qrl.snap index 471fcf58ab9..6b4e7f7d37d 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_of_synchronous_qrl.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_of_synchronous_qrl.snap @@ -24,21 +24,13 @@ snapshot_kind: text ); }); -============================= test.js == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_LUXeXe0DQrg"), "test_component_LUXeXe0DQrg")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGQ,6BAAe,mHAaZ\"}") -============================= test.tsx_test_component_LUXeXe0DQrg.js (ENTRY POINT)== +============================= src/test.tsx_test_component_r7Fl19tSLhk.js (ENTRY POINT)== import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { _qrlSync } from "@builder.io/qwik"; -export const test_component_LUXeXe0DQrg = ()=>{ +export const test_component_r7Fl19tSLhk = ()=>{ return /*#__PURE__*/ _jsxC(_Fragment, { children: [ /*#__PURE__*/ _jsxQ("input", { @@ -56,20 +48,20 @@ export const test_component_LUXeXe0DQrg = ()=>{ onClick$: _qrlSync((event, target)=>event.preventDefault(), "(event,target)=>event.preventDefault()") }, null, null, 2, null) ] - }, 1, "u6_0"); + }, 1, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;0CAGkC;IAC1B,qBACI;;0BACI,MAAC;gBAAM,QAAQ,WAAQ,SAAS,KAAK,EAAE,MAAM;oBACzC,4BAA4B;oBAC5B,MAAM,cAAc;gBACxB;;0BACA,MAAC;gBAAM,QAAQ,WAAQ,CAAC,OAAO;oBAC3B,MAAM,cAAc;gBACxB;;0BACA,MAAC;gBAAM,QAAQ,WAAQ,CAAC,OAAO,SAAW,MAAM,cAAc;;;;AAGtE\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;0CAGkC;IAC1B,qBACI;;0BACI,MAAC;gBAAM,QAAQ,WAAQ,SAAS,KAAK,EAAE,MAAM;oBACzC,4BAA4B;oBAC5B,MAAM,cAAc;gBACxB;;0BACA,MAAC;gBAAM,QAAQ,WAAQ,CAAC,OAAO;oBAC3B,MAAM,cAAc;gBACxB;;0BACA,MAAC;gBAAM,QAAQ,WAAQ,CAAC,OAAO,SAAW,MAAM,cAAc;;;;AAGtE\"}") /* { - "origin": "test.tsx", - "name": "test_component_LUXeXe0DQrg", + "origin": "src/test.tsx", + "name": "test_component_r7Fl19tSLhk", "entry": null, "displayName": "test.tsx_test_component", - "hash": "LUXeXe0DQrg", - "canonicalFilename": "test.tsx_test_component_LUXeXe0DQrg", - "path": "", + "hash": "r7Fl19tSLhk", + "canonicalFilename": "test.tsx_test_component_r7Fl19tSLhk", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -81,6 +73,14 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ +============================= src/test.js == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_r7Fl19tSLhk"), "test_component_r7Fl19tSLhk")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGQ,6BAAe,mHAaZ\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3542.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3542.snap index 62e634bf1f7..cf5cea84011 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3542.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3542.snap @@ -22,7 +22,7 @@ export const AtomStatus = component$(({ctx,atom})=>{ ); }) -============================= test.jsx == +============================= src/test.jsx == import { componentQrl } from "@builder.io/qwik"; import { useLexicalScope } from "@builder.io/qwik"; @@ -36,7 +36,7 @@ export const AtomStatus = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((p return atomStatusClick(props.ctx, ev, [ props.atom ]); - }, "AtomStatus_component_span_onClick_Owf5fKaOlF0", [ + }, "AtomStatus_component_span_onClick_CDOHJkTm7fU", [ props ])} class={[ "atom", @@ -44,10 +44,10 @@ export const AtomStatus = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((p props.ctx.store[props.atom.ID] ? "selected" : null ]}> ; -}, "AtomStatus_component_hdwpoUtydSA")); +}, "AtomStatus_component_IOrlbTTaqMw")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;AAGA,OAAO,MAAM,2BAAa,sCAAW;IACjC,IAAI,SAAS,MAD0B,KACrB,MAAM;IACxB,IAAG,CAAC,MAFmC,KAE9B,IAAI,EACT,SAAO;SACJ,IAAI,KAAK,SAAS,CAAC,MAJa,KAIR,IAAI,KAAG,KAAK,SAAS,CAAC,MAJd,KAImB,IAAI,GAC1D,SAAO;IAEX,QACK,KAAK,OAAO,MARsB,KAQjB,EAAE,EAAE,mCAAU,CAAC;;eAAK,sBARP,KAQ2B,IAAG;kBAR1B;SAQgC;;;QAAG,OAAO;QAAC;QAAO;QAAO,MAR7D,IAQiE,KAAK,CAAC,MARnE,KAQwE,EAAE,CAAC,GAAC,aAAW;KAAK,EAAE;QACjI,EAAE;AAEV,wCAAE\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;AAGA,OAAO,MAAM,2BAAa,sCAAW;IACjC,IAAI,SAAS,MAD0B,KACrB,MAAM;IACxB,IAAG,CAAC,MAFmC,KAE9B,IAAI,EACT,SAAO;SACJ,IAAI,KAAK,SAAS,CAAC,MAJa,KAIR,IAAI,KAAG,KAAK,SAAS,CAAC,MAJd,KAImB,IAAI,GAC1D,SAAO;IAEX,QACK,KAAK,OAAO,MARsB,KAQjB,EAAE,EAAE,mCAAU,CAAC;;eAAK,sBARP,KAQ2B,IAAG;kBAR1B;SAQgC;;;QAAG,OAAO;QAAC;QAAO;QAAO,MAR7D,IAQiE,KAAK,CAAC,MARnE,KAQwE,EAAE,CAAC,GAAC,aAAW;KAAK,EAAE;QACjI,EAAE;AAEV,wCAAE\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3561.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3561.snap index b60af1a9f8f..29ddb6a9746 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3561.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3561.snap @@ -28,7 +28,7 @@ export const Issue3561 = component$(() => { return

; }); -============================= test.jsx == +============================= src/test.jsx == import { componentQrl } from "@builder.io/qwik"; import { inlinedQrl } from "@builder.io/qwik"; @@ -45,10 +45,10 @@ export const Issue3561 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(()= const { currentVariant: { variantImage, variantNumber, setContents } = {} } = props.product; console.log(variantImage, variantNumber, setContents); return

; -}, "Issue3561_component_hHTw654BZB8")); +}, "Issue3561_component_tGHIaV4lh9c")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,0BAAY,sCAAW;IAChC,MAAM,QAAQ,SAAS;QACrB,SAAS;YACP,gBAAgB;gBACd,cAAc;gBACd,eAAe;gBACf,aAAa;YACf;QACF;IACF;IACA,MAAM,EACJ,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC,EAClE,GAAG,MAAM,OAAO;IAEjB,QAAQ,GAAG,CAAC,cAAc,eAAe;IAEzC,QAAQ,IAAI;AACd,uCAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,0BAAY,sCAAW;IAChC,MAAM,QAAQ,SAAS;QACrB,SAAS;YACP,gBAAgB;gBACd,cAAc;gBACd,eAAe;gBACf,aAAa;YACf;QACF;IACF;IACA,MAAM,EACJ,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC,EAClE,GAAG,MAAM,OAAO;IAEjB,QAAQ,GAAG,CAAC,cAAc,eAAe;IAEzC,QAAQ,IAAI;AACd,uCAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3795.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3795.snap index f7de961955a..8c2083a282d 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3795.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_3795.snap @@ -19,7 +19,7 @@ export const Issue3795 = component$(() => { ) }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; @@ -35,11 +35,11 @@ export const Issue3795 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(()= firstAssignment, " ", secondAssignment - ], 1, "u6_0"); -}, "Issue3795_component_wsE8beycatI")); + ], 1, "oJ_0"); +}, "Issue3795_component_hznmbocNG78")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;AAGA,OAAO,MAAM,0BAAY,sCAAW;IAChC,IAAI,OAAO;IACX,MAAM,kBAAkB;IACxB,QAAQ;IACR,MAAM,mBAAmB;IACzB,qBACE,MAAC;QAAI,IAAG;;QAAqB;QAAgB;QAAE;;AAEnD,uCAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;AAGA,OAAO,MAAM,0BAAY,sCAAW;IAChC,IAAI,OAAO;IACX,MAAM,kBAAkB;IACxB,QAAQ;IACR,MAAM,mBAAmB;IACzB,qBACE,MAAC;QAAI,IAAG;;QAAqB;QAAgB;QAAE;;AAEnD,uCAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_4386.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_4386.snap index 72709e800f8..adb1687400f 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_4386.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_optimization_issue_4386.snap @@ -22,7 +22,7 @@ export const FOO_MAPPING = { return <>{value}; }); -============================= test.jsx == +============================= src/test.jsx == import { componentQrl } from "@builder.io/qwik"; import { inlinedQrl } from "@builder.io/qwik"; @@ -33,10 +33,10 @@ export const FOO_MAPPING = { }; export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(()=>{ return <>{FOO_MAPPING['A']}; -}, "test_component_LUXeXe0DQrg")); +}, "test_component_r7Fl19tSLhk")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,cAAc;IACvB,GAAG;IACH,GAAG;IACH,GAAG;AACL,EAAE;AAEF,6BAAe,sCAAW;IAIxB,UAFc,WAAW,CADb,IACkB;AAGhC,kCAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,cAAc;IACvB,GAAG;IACH,GAAG;IACH,GAAG;AACL,EAAE;AAEF,6BAAe,sCAAW;IAIxB,UAFc,WAAW,CADb,IACkB;AAGhC,kCAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_parsed_inlined_qrls.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_parsed_inlined_qrls.snap index 40d5743fce3..6e605072075 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_parsed_inlined_qrls.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_parsed_inlined_qrls.snap @@ -42,7 +42,7 @@ export const App = /*#__PURE__*/ componentQrl(inlinedQrl(()=>{ export const STYLES = ".red { color: red; }"; -============================= test.tsx == +============================= src/test.tsx == import { _fnSignal } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; @@ -68,12 +68,12 @@ export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(()=>{ store ]) }, null, "Click", 2, null), 1, null) - ], 1, "u6_0"); + ], 1, "oJ_0"); }, "s_Fh88JClhbC0")); export const STYLES = ".red { color: red; }"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AACA,SAAS,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAa,eAAe,QAAQ,mBAAmB;AAElG,OAAO,MAAM,MAAM,WAAW,GAAG,sCAAwB;IACrD,oCAAsB;IACtB,oCAAsB;IAEtB,MAAM,QAAQ,SAAS;QACnB,OAAO;IACX;IACA,OAAO,WAAW,GAAG,MAAK,mBACZ;QACN,WAAW,GAAG,MAAK,iBACL;YACN;4BACA,GAAM,KAAK;;;SACd;QAEL,WAAW,GAAG,MAAI,iBACJ,WAAW,GAAG,MAAI;YACxB,QAAQ,2BAAa;gBACjB,MAAM,CAAC,MAAM,GAAG;gBAChB,OAAO,MAAM,KAAK;YACtB;;;iBAGU;KAGrB;AAET,qBAAiC;AAEjC,OAAO,MAAM,SAAS,uBAAuB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AACA,SAAS,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAa,eAAe,QAAQ,mBAAmB;AAElG,OAAO,MAAM,MAAM,WAAW,GAAG,sCAAwB;IACrD,oCAAsB;IACtB,oCAAsB;IAEtB,MAAM,QAAQ,SAAS;QACnB,OAAO;IACX;IACA,OAAO,WAAW,GAAG,MAAK,mBACZ;QACN,WAAW,GAAG,MAAK,iBACL;YACN;4BACA,GAAM,KAAK;;;SACd;QAEL,WAAW,GAAG,MAAI,iBACJ,WAAW,GAAG,MAAI;YACxB,QAAQ,2BAAa;gBACjB,MAAM,CAAC,MAAM,GAAG;gBAChB,OAAO,MAAM,KAAK;YACtB;;;iBAGU;KAGrB;AAET,qBAAiC;AAEjC,OAAO,MAAM,SAAS,uBAAuB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_preserve_filenames.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_preserve_filenames.snap index 2c047f6ced2..96fe3a2671b 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_preserve_filenames.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_preserve_filenames.snap @@ -17,7 +17,7 @@ export const App = component$((props) => { ); }); -============================= test.tsx == +============================= src/test.tsx == import { componentQrl } from "@builder.io/qwik"; import { inlinedQrl } from "@builder.io/qwik"; @@ -27,13 +27,13 @@ export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props)=> return /*#__PURE__*/ _jsxC(Cmp, { children: /*#__PURE__*/ _jsxQ("p", null, { class: "stuff", - onClick$: /*#__PURE__*/ inlinedQrl(()=>console.log('warn'), "App_component_Cmp_p_onClick_vuXzfUTkpto") + onClick$: /*#__PURE__*/ inlinedQrl(()=>console.log('warn'), "App_component_Cmp_p_onClick_44EtmIdf4XQ") }, "Hello Qwik", 3, null) - }, 3, "u6_0"); -}, "App_component_ckEPmXZlub0")); + }, 3, "oJ_0"); +}, "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;AAGA,OAAO,MAAM,oBAAM,sCAAW,CAAC;IAC3B,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YAAQ,QAAQ,2BAAE,IAAM,QAAQ,GAAG,CAAC;WAAS;;AAGlE,iCAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;AAGA,OAAO,MAAM,oBAAM,sCAAW,CAAC;IAC3B,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YAAQ,QAAQ,2BAAE,IAAM,QAAQ,GAAG,CAAC;WAAS;;AAGlE,iCAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_preserve_filenames_segments.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_preserve_filenames_segments.snap index 2e27055506d..e7eea8929ab 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_preserve_filenames_segments.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_preserve_filenames_segments.snap @@ -20,42 +20,68 @@ export const App = component$((props: Stuff) => { export const foo = () => console.log('foo'); -============================= test.tsx == +============================= src/test.tsx == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0.js"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A.js"), "App_component_F6JpluHHZ5A")); export const foo = ()=>console.log('foo'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,oHAOhB;AAEH,OAAO,MAAM,MAAM,IAAM,QAAQ,GAAG,CAAC,OAAO\"}") -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,oHAOhB;AAEH,OAAO,MAAM,MAAM,IAAM,QAAQ,GAAG,CAAC,OAAO\"}") +============================= src/test.tsx_App_component_Cmp_p_onClick_44EtmIdf4XQ.js (ENTRY POINT)== + +export const App_component_Cmp_p_onClick_44EtmIdf4XQ = ()=>console.log('warn'); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"uDAOuC,IAAM,QAAQ,GAAG,CAAC\"}") +/* +{ + "origin": "src/test.tsx", + "name": "App_component_Cmp_p_onClick_44EtmIdf4XQ", + "entry": null, + "displayName": "test.tsx_App_component_Cmp_p_onClick", + "hash": "44EtmIdf4XQ", + "canonicalFilename": "test.tsx_App_component_Cmp_p_onClick_44EtmIdf4XQ", + "path": "src", + "extension": "js", + "parent": "App_component_F6JpluHHZ5A", + "ctxKind": "eventHandler", + "ctxName": "onClick$", + "captures": false, + "loc": [ + 187, + 212 + ] +} +*/ +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { foo } from "./test.tsx"; import { qrl } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = (props)=>{ +export const App_component_F6JpluHHZ5A = (props)=>{ foo(); return /*#__PURE__*/ _jsxC(Cmp, { children: /*#__PURE__*/ _jsxQ("p", null, { class: "stuff", - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_Cmp_p_onClick_vuXzfUTkpto.js"), "App_component_Cmp_p_onClick_vuXzfUTkpto") + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_Cmp_p_onClick_44EtmIdf4XQ.js"), "App_component_Cmp_p_onClick_44EtmIdf4XQ") }, "Hello Qwik", 3, null) - }, 3, "u6_0"); + }, 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;yCAG8B,CAAC;IAC3B;IACA,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YAAQ,QAAQ;WAA6B;;AAGlE\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;yCAG8B,CAAC;IAC3B;IACA,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YAAQ,QAAQ;WAA6B;;AAGlE\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -67,32 +93,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_Cmp_p_onClick_vuXzfUTkpto.js (ENTRY POINT)== - -export const App_component_Cmp_p_onClick_vuXzfUTkpto = ()=>console.log('warn'); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"uDAOuC,IAAM,QAAQ,GAAG,CAAC\"}") -/* -{ - "origin": "test.tsx", - "name": "App_component_Cmp_p_onClick_vuXzfUTkpto", - "entry": null, - "displayName": "test.tsx_App_component_Cmp_p_onClick", - "hash": "vuXzfUTkpto", - "canonicalFilename": "test.tsx_App_component_Cmp_p_onClick_vuXzfUTkpto", - "path": "", - "extension": "js", - "parent": "App_component_ckEPmXZlub0", - "ctxKind": "eventHandler", - "ctxName": "onClick$", - "captures": false, - "loc": [ - 187, - 212 - ] -} -*/ == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_prod_node.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_prod_node.snap index 556162d4255..86f97912b91 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_prod_node.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_prod_node.snap @@ -19,28 +19,36 @@ export const Foo = component$(() => { ); }); -============================= test.tsx_Foo_component_HTDRsvUbLiE.tsx (ENTRY POINT)== +============================= src/test.tsx == +import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const s_HTDRsvUbLiE = ()=>{ +export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_eZLoPe62E2c"), "s_eZLoPe62E2c")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,qGAQhB\"}") +============================= src/test.tsx_Foo_component_eZLoPe62E2c.tsx (ENTRY POINT)== + +import { qrl } from "@builder.io/qwik"; +export const s_eZLoPe62E2c = ()=>{ return
-
import("./test.tsx_Foo_component_div_div_onClick_9DcJc0uJDDo"), "s_9DcJc0uJDDo")}/> -
import("./test.tsx_Foo_component_div_div_onClick_1_RjQdy8I0MXc"), "s_RjQdy8I0MXc")}/> -
import("./test.tsx_Foo_component_div_div_onClick_2_w9ptFRBVK1E"), "s_w9ptFRBVK1E")}/> +
import("./test.tsx_Foo_component_div_div_onClick_XKgOGPaICvo"), "s_XKgOGPaICvo")}/> +
import("./test.tsx_Foo_component_div_div_onClick_1_Y6cuRNdbpKM"), "s_Y6cuRNdbpKM")}/> +
import("./test.tsx_Foo_component_div_div_onClick_2_Bms9cr0HwnU"), "s_Bms9cr0HwnU")}/>
; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";6BAG8B;IAC1B,QACK,IAAI;YACD,CAAC,IAAI,mHAAuC;YAC5C,CAAC,IAAI,qHAAwC;YAC7C,CAAC,IAAI,qHAAuC;QAChD,EAAE;AAEV\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";6BAG8B;IAC1B,QACK,IAAI;YACD,CAAC,IAAI,mHAAuC;YAC5C,CAAC,IAAI,qHAAwC;YAC7C,CAAC,IAAI,qHAAuC;QAChD,EAAE;AAEV\"}") /* { - "origin": "test.tsx", - "name": "s_HTDRsvUbLiE", + "origin": "src/test.tsx", + "name": "s_eZLoPe62E2c", "entry": null, "displayName": "test.tsx_Foo_component", - "hash": "HTDRsvUbLiE", - "canonicalFilename": "test.tsx_Foo_component_HTDRsvUbLiE", - "path": "", + "hash": "eZLoPe62E2c", + "canonicalFilename": "test.tsx_Foo_component_eZLoPe62E2c", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -52,92 +60,84 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Foo_component_div_div_onClick_9DcJc0uJDDo.tsx (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_div_onClick_2_Bms9cr0HwnU.tsx (ENTRY POINT)== -export const s_9DcJc0uJDDo = ()=>console.log('first'); +export const s_Bms9cr0HwnU = ()=>console.log('third'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"6BAM2B,IAAM,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"6BAQ2B,IAAM,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "s_9DcJc0uJDDo", + "origin": "src/test.tsx", + "name": "s_Bms9cr0HwnU", "entry": null, - "displayName": "test.tsx_Foo_component_div_div_onClick", - "hash": "9DcJc0uJDDo", - "canonicalFilename": "test.tsx_Foo_component_div_div_onClick_9DcJc0uJDDo", - "path": "", + "displayName": "test.tsx_Foo_component_div_div_onClick_2", + "hash": "Bms9cr0HwnU", + "canonicalFilename": "test.tsx_Foo_component_div_div_onClick_2_Bms9cr0HwnU", + "path": "src", "extension": "tsx", - "parent": "s_HTDRsvUbLiE", + "parent": "s_eZLoPe62E2c", "ctxKind": "jSXProp", "ctxName": "onClick$", "captures": false, "loc": [ - 142, - 168 + 257, + 283 ] } */ -============================= test.tsx_Foo_component_div_div_onClick_2_w9ptFRBVK1E.tsx (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_div_onClick_1_Y6cuRNdbpKM.tsx (ENTRY POINT)== -export const s_w9ptFRBVK1E = ()=>console.log('third'); +export const s_Y6cuRNdbpKM = ()=>console.log('second'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"6BAQ2B,IAAM,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"6BAO2B,IAAM,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "s_w9ptFRBVK1E", + "origin": "src/test.tsx", + "name": "s_Y6cuRNdbpKM", "entry": null, - "displayName": "test.tsx_Foo_component_div_div_onClick_2", - "hash": "w9ptFRBVK1E", - "canonicalFilename": "test.tsx_Foo_component_div_div_onClick_2_w9ptFRBVK1E", - "path": "", + "displayName": "test.tsx_Foo_component_div_div_onClick_1", + "hash": "Y6cuRNdbpKM", + "canonicalFilename": "test.tsx_Foo_component_div_div_onClick_1_Y6cuRNdbpKM", + "path": "src", "extension": "tsx", - "parent": "s_HTDRsvUbLiE", + "parent": "s_eZLoPe62E2c", "ctxKind": "jSXProp", "ctxName": "onClick$", "captures": false, "loc": [ - 257, - 283 + 199, + 226 ] } */ -============================= test.tsx_Foo_component_div_div_onClick_1_RjQdy8I0MXc.tsx (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_div_onClick_XKgOGPaICvo.tsx (ENTRY POINT)== -export const s_RjQdy8I0MXc = ()=>console.log('second'); +export const s_XKgOGPaICvo = ()=>console.log('first'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"6BAO2B,IAAM,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"6BAM2B,IAAM,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "s_RjQdy8I0MXc", + "origin": "src/test.tsx", + "name": "s_XKgOGPaICvo", "entry": null, - "displayName": "test.tsx_Foo_component_div_div_onClick_1", - "hash": "RjQdy8I0MXc", - "canonicalFilename": "test.tsx_Foo_component_div_div_onClick_1_RjQdy8I0MXc", - "path": "", + "displayName": "test.tsx_Foo_component_div_div_onClick", + "hash": "XKgOGPaICvo", + "canonicalFilename": "test.tsx_Foo_component_div_div_onClick_XKgOGPaICvo", + "path": "src", "extension": "tsx", - "parent": "s_HTDRsvUbLiE", + "parent": "s_eZLoPe62E2c", "ctxKind": "jSXProp", "ctxName": "onClick$", "captures": false, "loc": [ - 199, - 226 + 142, + 168 ] } */ -============================= test.tsx == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_HTDRsvUbLiE"), "s_HTDRsvUbLiE")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,qGAQhB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_props_optimization.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_props_optimization.snap index 98f5960c155..459061cfdb9 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_props_optimization.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_props_optimization.snap @@ -48,7 +48,7 @@ export const NoWorks3 = component$(({count, stuff = hola()}) => { ); }); -============================= test.js == +============================= src/test.js == import { _restProps } from "@builder.io/qwik"; import { componentQrl } from "@builder.io/qwik"; @@ -72,7 +72,7 @@ export const Works = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props) const [props, rest] = useLexicalScope(); track(()=>props.count); console.log(props.count, rest, props.stuff, props.some ?? 3, props.stuffDefault ?? 123); - }, "Works_component_useTask_pjo5U5Ikll0", [ + }, "Works_component_useTask_jQgKWAKQkAo", [ props, rest ])); @@ -106,37 +106,37 @@ export const Works = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props) props ], "p0.count"), override: _IMMUTABLE - }, 0, "u6_0"); -}, "Works_component_t45qL4vNGv0")); + }, 0, "oJ_0"); +}, "Works_component_3Z6btR1NEOY")); export const NoWorks2 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(({ count, stuff: { hey } })=>{ console.log(hey); useTaskQrl(/*#__PURE__*/ inlinedQrl(({ track })=>{ const [count] = useLexicalScope(); track(()=>count); console.log(count); - }, "NoWorks2_component_useTask_lXiqwbxxjq0", [ + }, "NoWorks2_component_useTask_fGqqQeqv0g8", [ count ])); return /*#__PURE__*/ _jsxQ("div", { class: count - }, null, count, 1, "u6_1"); -}, "NoWorks2_component_JPD9t2HyEKg")); + }, null, count, 1, "oJ_1"); +}, "NoWorks2_component_fKHOq2l3bro")); export const NoWorks3 = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(({ count, stuff = hola() })=>{ console.log(stuff); useTaskQrl(/*#__PURE__*/ inlinedQrl(({ track })=>{ const [count] = useLexicalScope(); track(()=>count); console.log(count); - }, "NoWorks3_component_useTask_3cQGU0s1VwU", [ + }, "NoWorks3_component_useTask_p0CJUeD0WP0", [ count ])); return /*#__PURE__*/ _jsxQ("div", { class: count - }, null, count, 1, "u6_2"); -}, "NoWorks3_component_fc13h5yYn14")); + }, null, count, 1, "oJ_2"); +}, "NoWorks3_component_ElpYI6RLRSc")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;;AAGA,OAAO,MAAM,sBAAQ,sCAAW;;;;;;;;IAO5B,QAAQ,GAAG,OAHX,aAFA,QAAO;IAMP,oCAAS,CAAC,EAAC,KAAK,EAAC;;QACb,MAAM,UARV;QASI,QAAQ,GAAG,OATf,OASuB,YANvB,aAFA,QAAO,SAGP,gBAAqB;;;;;IAOrB,qBACI,MAAC;YAAI;yBAXT,QAAO;;YAWc;mBAAQ;gBAAE,IAAI,QAXnC,QAAO;YAW6B;;YAAG;yBAZvC;;QAYsD,GAAG,IAAI;QAAE,QAAQ;qCAZvE;;;;QAYS,IAAI,qBAXb,QAAO;;;QAWc,MAAM,kBAAE,CAAA;gBAAE,IAAI,KAXnC,QAAO;YAW6B,CAAA;;;QAAG,KAAK,qBAZ5C;;;QAY+D,QAAQ;;AAE3E,mCAAG;AAEH,OAAO,MAAM,yBAAW,sCAAW,CAAC,EAAC,KAAK,EAAE,OAAO,EAAC,GAAG,EAAC,EAAC;IACrD,QAAQ,GAAG,CAAC;IACZ,oCAAS,CAAC,EAAC,KAAK,EAAC;;QACb,MAAM,IAAM;QACZ,QAAQ,GAAG,CAAC;;;;IAEhB,qBACI,MAAC;QAAI,OAAO;aAAQ;AAE5B,sCAAG;AAEH,OAAO,MAAM,yBAAW,sCAAW,CAAC,EAAC,KAAK,EAAE,QAAQ,MAAM,EAAC;IACvD,QAAQ,GAAG,CAAC;IACZ,oCAAS,CAAC,EAAC,KAAK,EAAC;;QACb,MAAM,IAAM;QACZ,QAAQ,GAAG,CAAC;;;;IAEhB,qBACI,MAAC;QAAI,OAAO;aAAQ;AAE5B,sCAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;;AAGA,OAAO,MAAM,sBAAQ,sCAAW;;;;;;;;IAO5B,QAAQ,GAAG,OAHX,aAFA,QAAO;IAMP,oCAAS,CAAC,EAAC,KAAK,EAAC;;QACb,MAAM,UARV;QASI,QAAQ,GAAG,OATf,OASuB,YANvB,aAFA,QAAO,SAGP,gBAAqB;;;;;IAOrB,qBACI,MAAC;YAAI;yBAXT,QAAO;;YAWc;mBAAQ;gBAAE,IAAI,QAXnC,QAAO;YAW6B;;YAAG;yBAZvC;;QAYsD,GAAG,IAAI;QAAE,QAAQ;qCAZvE;;;;QAYS,IAAI,qBAXb,QAAO;;;QAWc,MAAM,kBAAE,CAAA;gBAAE,IAAI,KAXnC,QAAO;YAW6B,CAAA;;;QAAG,KAAK,qBAZ5C;;;QAY+D,QAAQ;;AAE3E,mCAAG;AAEH,OAAO,MAAM,yBAAW,sCAAW,CAAC,EAAC,KAAK,EAAE,OAAO,EAAC,GAAG,EAAC,EAAC;IACrD,QAAQ,GAAG,CAAC;IACZ,oCAAS,CAAC,EAAC,KAAK,EAAC;;QACb,MAAM,IAAM;QACZ,QAAQ,GAAG,CAAC;;;;IAEhB,qBACI,MAAC;QAAI,OAAO;aAAQ;AAE5B,sCAAG;AAEH,OAAO,MAAM,yBAAW,sCAAW,CAAC,EAAC,KAAK,EAAE,QAAQ,MAAM,EAAC;IACvD,QAAQ,GAAG,CAAC;IACZ,oCAAS,CAAC,EAAC,KAAK,EAAC;;QACb,MAAM,IAAM;QACZ,QAAQ,GAAG,CAAC;;;;IAEhB,qBACI,MAAC;QAAI,OAAO;aAAQ;AAE5B,sCAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_qwik_conflict.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_qwik_conflict.snap index c922c3e679e..90972cfd333 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_qwik_conflict.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_qwik_conflict.snap @@ -39,7 +39,64 @@ export const Root = component$(() => { tagName: "my-foo", }); -============================= test.js == +============================= src/test.tsx_Root_component_useStyles_aIt0F4HqeUM.js (ENTRY POINT)== + +export const Root_component_useStyles_aIt0F4HqeUM = 'thing'; +export { _hW } from "@builder.io/qwik"; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"oDAuBgB\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Root_component_useStyles_aIt0F4HqeUM", + "entry": null, + "displayName": "test.tsx_Root_component_useStyles", + "hash": "aIt0F4HqeUM", + "canonicalFilename": "test.tsx_Root_component_useStyles_aIt0F4HqeUM", + "path": "src", + "extension": "js", + "parent": "Root_component_yDXD6i0JpLs", + "ctxKind": "function", + "ctxName": "$", + "captures": false, + "loc": [ + 535, + 542 + ] +} +*/ +============================= src/test.tsx_Root_component_1_e6ykmW7F5lU.js (ENTRY POINT)== + +import { _jsxQ } from "@builder.io/qwik"; +export const Root_component_1_e6ykmW7F5lU = ()=>{ + return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "oJ_1"); +}; +export { _hW } from "@builder.io/qwik"; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAwBa;IACL,qBACI,MAAC;AAET\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Root_component_1_e6ykmW7F5lU", + "entry": null, + "displayName": "test.tsx_Root_component_1", + "hash": "e6ykmW7F5lU", + "canonicalFilename": "test.tsx_Root_component_1_e6ykmW7F5lU", + "path": "src", + "extension": "js", + "parent": "Root_component_yDXD6i0JpLs", + "ctxKind": "function", + "ctxName": "$", + "captures": false, + "loc": [ + 559, + 618 + ] +} +*/ +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; @@ -48,41 +105,41 @@ export const hW = 12; export const handleWatch = 42; const componentQrl1 = ()=>console.log('not this', qrl1()); componentQrl1(); -export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_HTDRsvUbLiE"), "Foo_component_HTDRsvUbLiE"), { +export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_eZLoPe62E2c"), "Foo_component_eZLoPe62E2c"), { tagName: "my-foo" }); -export const Root = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Root_component_royhjYaCbYE"), "Root_component_royhjYaCbYE"), { +export const Root = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Root_component_yDXD6i0JpLs"), "Root_component_yDXD6i0JpLs"), { tagName: "my-foo" }); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,SAAS,OAAA,IAAG,QAAQ,wBAAwB;AAE5C,OAAO,MAAM,KAAK,GAAG;AACrB,OAAO,MAAM,cAAc,GAAG;AAE9B,MAAM,gBAAe,IAAM,QAAQ,GAAG,CAAC,YAAY;AAEnD;AACA,OAAO,MAAM,oBAAM,iHAQhB;IACC,SAAS;AACb,GAAG;AAEH,OAAO,MAAM,qBAAO,mHAOjB;IACC,SAAS;AACb,GAAG\"}") -============================= test.tsx_Foo_component_HTDRsvUbLiE.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,SAAS,OAAA,IAAG,QAAQ,wBAAwB;AAE5C,OAAO,MAAM,KAAK,GAAG;AACrB,OAAO,MAAM,cAAc,GAAG;AAE9B,MAAM,gBAAe,IAAM,QAAQ,GAAG,CAAC,YAAY;AAEnD;AACA,OAAO,MAAM,oBAAM,iHAQhB;IACC,SAAS;AACb,GAAG;AAEH,OAAO,MAAM,qBAAO,mHAOjB;IACC,SAAS;AACb,GAAG\"}") +============================= src/test.tsx_Foo_component_eZLoPe62E2c.js (ENTRY POINT)== import { _jsxQ } from "@builder.io/qwik"; import { hW } from "./test"; import { handleWatch } from "./test"; import { qrl } from "@builder.io/qwik"; -export const Foo_component_HTDRsvUbLiE = ()=>{ +export const Foo_component_eZLoPe62E2c = ()=>{ useStyles$('thing'); const qwik = hW + handleWatch; console.log(qwik); return /*#__PURE__*/ _jsxQ("div", null, { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onClick_M48DYiidSJw"), "Foo_component_div_onClick_M48DYiidSJw") - }, null, 3, "u6_0"); + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_div_onClick_Uapiy40JUtg"), "Foo_component_div_onClick_Uapiy40JUtg") + }, null, 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;yCAU8B;IAC1B,WAAW;IACX,MAAM,OAAO,KAAK;IAClB,QAAQ,GAAG,CAAC;IAEZ,qBACI,MAAC;QAAI,QAAQ;;AAErB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;yCAU8B;IAC1B,WAAW;IACX,MAAM,OAAO,KAAK;IAClB,QAAQ,GAAG,CAAC;IAEZ,qBACI,MAAC;QAAI,QAAQ;;AAErB\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_HTDRsvUbLiE", + "origin": "src/test.tsx", + "name": "Foo_component_eZLoPe62E2c", "entry": null, "displayName": "test.tsx_Foo_component", - "hash": "HTDRsvUbLiE", - "canonicalFilename": "test.tsx_Foo_component_HTDRsvUbLiE", - "path": "", + "hash": "eZLoPe62E2c", + "canonicalFilename": "test.tsx_Foo_component_eZLoPe62E2c", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -94,53 +151,26 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Root_component_useStyles_u5DkUxGrGnU.js (ENTRY POINT)== - -export const Root_component_useStyles_u5DkUxGrGnU = 'thing'; -export { _hW } from "@builder.io/qwik"; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"oDAuBgB\"}") -/* -{ - "origin": "test.tsx", - "name": "Root_component_useStyles_u5DkUxGrGnU", - "entry": null, - "displayName": "test.tsx_Root_component_useStyles", - "hash": "u5DkUxGrGnU", - "canonicalFilename": "test.tsx_Root_component_useStyles_u5DkUxGrGnU", - "path": "", - "extension": "js", - "parent": "Root_component_royhjYaCbYE", - "ctxKind": "function", - "ctxName": "$", - "captures": false, - "loc": [ - 535, - 542 - ] -} -*/ -============================= test.tsx_Root_component_royhjYaCbYE.js (ENTRY POINT)== +============================= src/test.tsx_Root_component_yDXD6i0JpLs.js (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; import { useStyles } from "@builder.io/qwik"; -export const Root_component_royhjYaCbYE = ()=>{ - useStyles(/*#__PURE__*/ qrl(()=>import("./test.tsx_Root_component_useStyles_u5DkUxGrGnU"), "Root_component_useStyles_u5DkUxGrGnU")); - return /*#__PURE__*/ qrl(()=>import("./test.tsx_Root_component_1_cBpQNYDUHI4"), "Root_component_1_cBpQNYDUHI4"); +export const Root_component_yDXD6i0JpLs = ()=>{ + useStyles(/*#__PURE__*/ qrl(()=>import("./test.tsx_Root_component_useStyles_aIt0F4HqeUM"), "Root_component_useStyles_aIt0F4HqeUM")); + return /*#__PURE__*/ qrl(()=>import("./test.tsx_Root_component_1_e6ykmW7F5lU"), "Root_component_1_e6ykmW7F5lU"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;0CAsB+B;IAC3B;IACA;AAKJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;0CAsB+B;IAC3B;IACA;AAKJ\"}") /* { - "origin": "test.tsx", - "name": "Root_component_royhjYaCbYE", + "origin": "src/test.tsx", + "name": "Root_component_yDXD6i0JpLs", "entry": null, "displayName": "test.tsx_Root_component", - "hash": "royhjYaCbYE", - "canonicalFilename": "test.tsx_Root_component_royhjYaCbYE", - "path": "", + "hash": "yDXD6i0JpLs", + "canonicalFilename": "test.tsx_Root_component_yDXD6i0JpLs", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -152,53 +182,23 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Root_component_1_cBpQNYDUHI4.js (ENTRY POINT)== - -import { _jsxQ } from "@builder.io/qwik"; -export const Root_component_1_cBpQNYDUHI4 = ()=>{ - return /*#__PURE__*/ _jsxQ("div", null, null, null, 3, "u6_1"); -}; -export { _hW } from "@builder.io/qwik"; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";4CAwBa;IACL,qBACI,MAAC;AAET\"}") -/* -{ - "origin": "test.tsx", - "name": "Root_component_1_cBpQNYDUHI4", - "entry": null, - "displayName": "test.tsx_Root_component_1", - "hash": "cBpQNYDUHI4", - "canonicalFilename": "test.tsx_Root_component_1_cBpQNYDUHI4", - "path": "", - "extension": "js", - "parent": "Root_component_royhjYaCbYE", - "ctxKind": "function", - "ctxName": "$", - "captures": false, - "loc": [ - 559, - 618 - ] -} -*/ -============================= test.tsx_Foo_component_div_onClick_M48DYiidSJw.js (ENTRY POINT)== +============================= src/test.tsx_Foo_component_div_onClick_Uapiy40JUtg.js (ENTRY POINT)== -export const Foo_component_div_onClick_M48DYiidSJw = ()=>console.log(23); +export const Foo_component_div_onClick_Uapiy40JUtg = ()=>console.log(23); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"qDAgBuB,IAAK,QAAQ,GAAG,CAFvB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"qDAgBuB,IAAK,QAAQ,GAAG,CAFvB\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_div_onClick_M48DYiidSJw", + "origin": "src/test.tsx", + "name": "Foo_component_div_onClick_Uapiy40JUtg", "entry": null, "displayName": "test.tsx_Foo_component_div_onClick", - "hash": "M48DYiidSJw", - "canonicalFilename": "test.tsx_Foo_component_div_onClick_M48DYiidSJw", - "path": "", + "hash": "Uapiy40JUtg", + "canonicalFilename": "test.tsx_Foo_component_div_onClick_Uapiy40JUtg", + "path": "src", "extension": "js", - "parent": "Foo_component_HTDRsvUbLiE", + "parent": "Foo_component_eZLoPe62E2c", "ctxKind": "eventHandler", "ctxName": "onClick$", "captures": false, diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments.snap index fee13c268fb..29dd9900a42 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments.snap @@ -19,7 +19,7 @@ export const Works = component$((props) => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { serverQrl } from "@builder.io/qwik"; @@ -33,17 +33,17 @@ export const Works = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props) return /*#__PURE__*/ _jsxC(_Fragment, { children: [ /*#__PURE__*/ _jsxQ("div", { - onClick$: serverQrl(/*#__PURE__*/ inlinedQrl(/*#__PURE__*/ _regSymbol(()=>console.log('in server', 'hola'), "gcSPFNpGYgg"), "Works_component_Fragment_div_onClick_server_gcSPFNpGYgg")) + onClick$: serverQrl(/*#__PURE__*/ inlinedQrl(/*#__PURE__*/ _regSymbol(()=>console.log('in server', 'hola'), "ZCuj0J410Z8"), "Works_component_Fragment_div_onClick_server_ZCuj0J410Z8")) }, null, null, 2, null), /*#__PURE__*/ _jsxQ("div", null, { - onClick$: /*#__PURE__*/ _noopQrl("Works_component_Fragment_div_onClick_nO4DPVZWP7g") + onClick$: /*#__PURE__*/ _noopQrl("Works_component_Fragment_div_onClick_2AmGpAP9cjk") }, null, 3, null) ] - }, 1, "u6_0"); -}, "Works_component_t45qL4vNGv0")); + }, 1, "oJ_0"); +}, "Works_component_3Z6btR1NEOY")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;AAGA,OAAO,MAAM,sBAAQ,sCAAW,CAAC;IAE7B,qBACI;;0BACA,MAAC;gBAAI,UAAU,4DAAQ,IAAM,QAAQ,GAAG,CAAC,aAHhC;;0BAIT,MAAC;gBAAI,QAAQ;;;;AAGrB,mCAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;AAGA,OAAO,MAAM,sBAAQ,sCAAW,CAAC;IAE7B,qBACI;;0BACA,MAAC;gBAAI,UAAU,4DAAQ,IAAM,QAAQ,GAAG,CAAC,aAHhC;;0BAIT,MAAC;gBAAI,QAAQ;;;;AAGrB,mCAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments_hoisted.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments_hoisted.snap index 5cdf62b58c9..d7b30f3c005 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments_hoisted.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments_hoisted.snap @@ -19,7 +19,7 @@ export const Works = component$((props) => { const STYLES = '.class {}'; -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { useStyleQrl } from "@builder.io/qwik"; @@ -27,19 +27,19 @@ import { inlinedQrl } from "@builder.io/qwik"; import { serverQrl } from "@builder.io/qwik"; import { _regSymbol } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; -const Works_component_div_onClick_server_OsNoEFc5SM4 = /*#__PURE__*/ _regSymbol(()=>console.log('in server', 'hola'), "OsNoEFc5SM4"); -const Works_component_t45qL4vNGv0 = (props)=>{ - useStyleQrl(/*#__PURE__*/ inlinedQrl(STYLES, "Works_component_useStyle_i40UL9JyQpg")); +const Works_component_div_onClick_server_oOLZoiwE2FM = /*#__PURE__*/ _regSymbol(()=>console.log('in server', 'hola'), "oOLZoiwE2FM"); +const Works_component_3Z6btR1NEOY = (props)=>{ + useStyleQrl(/*#__PURE__*/ inlinedQrl(STYLES, "Works_component_useStyle_MBEjolU5hGc")); return /*#__PURE__*/ _jsxQ("div", { - onClick$: serverQrl(/*#__PURE__*/ inlinedQrl(Works_component_div_onClick_server_OsNoEFc5SM4, "Works_component_div_onClick_server_OsNoEFc5SM4")) - }, null, null, 2, "u6_0"); + onClick$: serverQrl(/*#__PURE__*/ inlinedQrl(Works_component_div_onClick_server_oOLZoiwE2FM, "Works_component_div_onClick_server_oOLZoiwE2FM")) + }, null, null, 2, "oJ_0"); }; -export const Works = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(Works_component_t45qL4vNGv0, "Works_component_t45qL4vNGv0")); +export const Works = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(Works_component_3Z6btR1NEOY, "Works_component_3Z6btR1NEOY")); const STYLES = '.class {}'; export { STYLES as _auto_STYLES }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;gFAO+B,IAAM,QAAQ,GAAG,CAAC,aAFhC;oCAFe,CAAC;IAC7B,qCAAU;IAEV,qBACI,MAAC;QAAI,UAAU;;AAEvB;AANA,OAAO,MAAM,sBAAQ,mGAMlB;AAEH,MAAM,SAAS\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;gFAO+B,IAAM,QAAQ,GAAG,CAAC,aAFhC;oCAFe,CAAC;IAC7B,qCAAU;IAEV,qBACI,MAAC;QAAI,UAAU;;AAEvB;AANA,OAAO,MAAM,sBAAQ,mGAMlB;AAEH,MAAM,SAAS\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments_inlined.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments_inlined.snap index 80cfff0fdb2..1077ddd8623 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments_inlined.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_reg_ctx_name_segments_inlined.snap @@ -15,7 +15,7 @@ export const Works = component$((props) => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { serverQrl } from "@builder.io/qwik"; @@ -24,12 +24,12 @@ import { inlinedQrl } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; export const Works = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props)=>{ return /*#__PURE__*/ _jsxQ("div", { - onClick$: serverQrl(/*#__PURE__*/ inlinedQrl(/*#__PURE__*/ _regSymbol(()=>console.log('in server', 'hola'), "OsNoEFc5SM4"), "Works_component_div_onClick_server_OsNoEFc5SM4")) - }, null, null, 2, "u6_0"); -}, "Works_component_t45qL4vNGv0")); + onClick$: serverQrl(/*#__PURE__*/ inlinedQrl(/*#__PURE__*/ _regSymbol(()=>console.log('in server', 'hola'), "oOLZoiwE2FM"), "Works_component_div_onClick_server_oOLZoiwE2FM")) + }, null, null, 2, "oJ_0"); +}, "Works_component_3Z6btR1NEOY")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AAEA,OAAO,MAAM,sBAAQ,sCAAW,CAAC;IAE7B,qBACI,MAAC;QAAI,UAAU,4DAAQ,IAAM,QAAQ,GAAG,CAAC,aAFhC;;AAIjB,mCAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;AAEA,OAAO,MAAM,sBAAQ,sCAAW,CAAC;IAE7B,qBACI,MAAC;QAAI,UAAU,4DAAQ,IAAM,QAAQ,GAAG,CAAC,aAFhC;;AAIjB,mCAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_renamed_exports.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_renamed_exports.snap index 6caf4aae84f..a2f54857ea5 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_renamed_exports.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_renamed_exports.snap @@ -17,40 +17,32 @@ export const App = Component((props) => { )); }); -============================= test.js == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_Component_NuXFTHRjvXE"), "App_Component_NuXFTHRjvXE")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAMhB\"}") -============================= test.tsx_App_Component_1_A08tXHb9pEk.js (ENTRY POINT)== +============================= src/test.tsx_App_Component_1_tK0LpNLmbzI.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; import { _fnSignal } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; -export const App_Component_1_A08tXHb9pEk = ()=>{ +export const App_Component_1_tK0LpNLmbzI = ()=>{ const [state] = useLexicalScope(); return /*#__PURE__*/ _jsxQ("div", null, null, _fnSignal((p0)=>p0.thing, [ state - ], "p0.thing"), 3, "u6_0"); + ], "p0.thing"), 3, "oJ_0"); }; export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;2CAMoB;;yBACZ,MAAC,mCAAK,GAAM,KAAK\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;2CAMoB;;yBACZ,MAAC,mCAAK,GAAM,KAAK\"}") /* { - "origin": "test.tsx", - "name": "App_Component_1_A08tXHb9pEk", + "origin": "src/test.tsx", + "name": "App_Component_1_tK0LpNLmbzI", "entry": null, "displayName": "test.tsx_App_Component_1", - "hash": "A08tXHb9pEk", - "canonicalFilename": "test.tsx_App_Component_1_A08tXHb9pEk", - "path": "", + "hash": "tK0LpNLmbzI", + "canonicalFilename": "test.tsx_App_Component_1_tK0LpNLmbzI", + "path": "src", "extension": "js", - "parent": "App_Component_NuXFTHRjvXE", + "parent": "App_Component_I1YSTdd4LFE", "ctxKind": "function", "ctxName": "$", "captures": true, @@ -60,30 +52,30 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_Component_NuXFTHRjvXE.js (ENTRY POINT)== +============================= src/test.tsx_App_Component_I1YSTdd4LFE.js (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; import { useStore } from "@builder.io/qwik"; -export const App_Component_NuXFTHRjvXE = (props)=>{ +export const App_Component_I1YSTdd4LFE = (props)=>{ const state = useStore({ thing: 0 }); - return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_Component_1_A08tXHb9pEk"), "App_Component_1_A08tXHb9pEk", [ + return /*#__PURE__*/ qrl(()=>import("./test.tsx_App_Component_1_tK0LpNLmbzI"), "App_Component_1_tK0LpNLmbzI", [ state ]); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAG6B,CAAC;IAC1B,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAEhC;;;AAGJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAG6B,CAAC;IAC1B,MAAM,QAAQ,SAAS;QAAC,OAAO;IAAC;IAEhC;;;AAGJ\"}") /* { - "origin": "test.tsx", - "name": "App_Component_NuXFTHRjvXE", + "origin": "src/test.tsx", + "name": "App_Component_I1YSTdd4LFE", "entry": null, "displayName": "test.tsx_App_Component", - "hash": "NuXFTHRjvXE", - "canonicalFilename": "test.tsx_App_Component_NuXFTHRjvXE", - "path": "", + "hash": "I1YSTdd4LFE", + "canonicalFilename": "test.tsx_App_Component_I1YSTdd4LFE", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -95,6 +87,14 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ +============================= src/test.js == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_Component_I1YSTdd4LFE"), "App_Component_I1YSTdd4LFE")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAMhB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_server_auth.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_server_auth.snap index 22d960597b1..6fc0c5f6305 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_server_auth.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_server_auth.snap @@ -46,30 +46,20 @@ export const { onRequest, logout, getSession, signup } = auth$({ ] }); -============================= test.js == - -import { serverAuthQrl } from "@auth/qwik"; -import { qrl } from "@builder.io/qwik"; -import { authQrl } from "@auth/qwik"; -export const { onRequest, logout, getSession, signup } = serverAuthQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_serverAuth_qVqpX2a0p9Y"), "serverAuth_qVqpX2a0p9Y")); -export const { onRequest, logout, getSession, signup } = authQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_auth_GU0aY5QCETY"), "auth_GU0aY5QCETY")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;AAMA,OAAO,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,4GAetD;AAEH,OAAO,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,0FAetD\"}") -============================= test.tsx_auth_GU0aY5QCETY.js (ENTRY POINT)== +============================= src/test.tsx_serverAuth_Fc7Elbk3n1M.js (ENTRY POINT)== import Facebook from "next-auth/providers/facebook"; import GitHub from "@auth/core/providers/github"; import Google from "next-auth/providers/google"; -export const auth_GU0aY5QCETY = { +export const serverAuth_Fc7Elbk3n1M = { providers: [ GitHub({ clientId: process.env.GITHUB_ID, clientSecret: process.env.GITHUB_SECRET }), Facebook({ - clientId: process.env.FACEBOOK_ID, - clientSecret: process.env.FACEBOOK_SECRET + clientId: import.meta.env.FACEBOOK_ID, + clientSecret: import.meta.env.FACEBOOK_SECRET }), Google({ clientId: process.env.GOOGLE_ID, @@ -79,41 +69,51 @@ export const auth_GU0aY5QCETY = { }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;gCAuB+D;IAC3D,WAAW;QACX,OAAO;YACH,UAAU,QAAQ,GAAG,CAAC,SAAS;YAC/B,cAAc,QAAQ,GAAG,CAAC,aAAa;QAC3C;QACA,SAAS;YACL,UAAU,QAAQ,GAAG,CAAC,WAAW;YACjC,cAAc,QAAQ,GAAG,CAAC,eAAe;QAC7C;QACA,OAAO;YACH,UAAU,QAAQ,GAAG,CAAC,SAAS;YAC/B,cAAc,QAAQ,GAAG,CAAC,aAAa;QAC3C;KACC;AACL\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;sCAMqE;IACjE,WAAW;QACX,OAAO;YACH,UAAU,QAAQ,GAAG,CAAC,SAAS;YAC/B,cAAc,QAAQ,GAAG,CAAC,aAAa;QAC3C;QACA,SAAS;YACL,UAAU,YAAY,GAAG,CAAC,WAAW;YACrC,cAAc,YAAY,GAAG,CAAC,eAAe;QACjD;QACA,OAAO;YACH,UAAU,QAAQ,GAAG,CAAC,SAAS;YAC/B,cAAc,QAAQ,GAAG,CAAC,aAAa;QAC3C;KACC;AACL\"}") /* { - "origin": "test.tsx", - "name": "auth_GU0aY5QCETY", + "origin": "src/test.tsx", + "name": "serverAuth_Fc7Elbk3n1M", "entry": null, - "displayName": "test.tsx_auth", - "hash": "GU0aY5QCETY", - "canonicalFilename": "test.tsx_auth_GU0aY5QCETY", - "path": "", + "displayName": "test.tsx_serverAuth", + "hash": "Fc7Elbk3n1M", + "canonicalFilename": "test.tsx_serverAuth_Fc7Elbk3n1M", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", - "ctxName": "auth$", + "ctxName": "serverAuth$", "captures": false, "loc": [ - 704, - 1065 + 268, + 637 ] } */ -============================= test.tsx_serverAuth_qVqpX2a0p9Y.js (ENTRY POINT)== +============================= src/test.js == + +import { serverAuthQrl } from "@auth/qwik"; +import { qrl } from "@builder.io/qwik"; +import { authQrl } from "@auth/qwik"; +export const { onRequest, logout, getSession, signup } = serverAuthQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_serverAuth_Fc7Elbk3n1M"), "serverAuth_Fc7Elbk3n1M")); +export const { onRequest, logout, getSession, signup } = authQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_auth_914Jx9TPmpM"), "auth_914Jx9TPmpM")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;AAMA,OAAO,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,4GAetD;AAEH,OAAO,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,0FAetD\"}") +============================= src/test.tsx_auth_914Jx9TPmpM.js (ENTRY POINT)== import Facebook from "next-auth/providers/facebook"; import GitHub from "@auth/core/providers/github"; import Google from "next-auth/providers/google"; -export const serverAuth_qVqpX2a0p9Y = { +export const auth_914Jx9TPmpM = { providers: [ GitHub({ clientId: process.env.GITHUB_ID, clientSecret: process.env.GITHUB_SECRET }), Facebook({ - clientId: import.meta.env.FACEBOOK_ID, - clientSecret: import.meta.env.FACEBOOK_SECRET + clientId: process.env.FACEBOOK_ID, + clientSecret: process.env.FACEBOOK_SECRET }), Google({ clientId: process.env.GOOGLE_ID, @@ -123,24 +123,24 @@ export const serverAuth_qVqpX2a0p9Y = { }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;sCAMqE;IACjE,WAAW;QACX,OAAO;YACH,UAAU,QAAQ,GAAG,CAAC,SAAS;YAC/B,cAAc,QAAQ,GAAG,CAAC,aAAa;QAC3C;QACA,SAAS;YACL,UAAU,YAAY,GAAG,CAAC,WAAW;YACrC,cAAc,YAAY,GAAG,CAAC,eAAe;QACjD;QACA,OAAO;YACH,UAAU,QAAQ,GAAG,CAAC,SAAS;YAC/B,cAAc,QAAQ,GAAG,CAAC,aAAa;QAC3C;KACC;AACL\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;gCAuB+D;IAC3D,WAAW;QACX,OAAO;YACH,UAAU,QAAQ,GAAG,CAAC,SAAS;YAC/B,cAAc,QAAQ,GAAG,CAAC,aAAa;QAC3C;QACA,SAAS;YACL,UAAU,QAAQ,GAAG,CAAC,WAAW;YACjC,cAAc,QAAQ,GAAG,CAAC,eAAe;QAC7C;QACA,OAAO;YACH,UAAU,QAAQ,GAAG,CAAC,SAAS;YAC/B,cAAc,QAAQ,GAAG,CAAC,aAAa;QAC3C;KACC;AACL\"}") /* { - "origin": "test.tsx", - "name": "serverAuth_qVqpX2a0p9Y", + "origin": "src/test.tsx", + "name": "auth_914Jx9TPmpM", "entry": null, - "displayName": "test.tsx_serverAuth", - "hash": "qVqpX2a0p9Y", - "canonicalFilename": "test.tsx_serverAuth_qVqpX2a0p9Y", - "path": "", + "displayName": "test.tsx_auth", + "hash": "914Jx9TPmpM", + "canonicalFilename": "test.tsx_auth_914Jx9TPmpM", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", - "ctxName": "serverAuth$", + "ctxName": "auth$", "captures": false, "loc": [ - 268, - 637 + 704, + 1065 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_skip_transform.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_skip_transform.snap index 826d3cf929f..413531501b5 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_skip_transform.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_skip_transform.snap @@ -18,17 +18,17 @@ export const App = component$((props) => { )); }); -============================= test.js == +============================= src/test.js == import { _jsxQ } from "@builder.io/qwik"; export const handler = $(()=>console.log('hola')); export const App = component$((props)=>{ useStyles$('hola'); - return $(()=>/*#__PURE__*/ _jsxQ("div", null, null, state.thing, 3, "u6_0")); + return $(()=>/*#__PURE__*/ _jsxQ("div", null, null, state.thing, 3, "oJ_0")); }); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";AAGA,OAAO,MAAM,UAAU,EAAE,IAAI,QAAQ,GAAG,CAAC,SAAS;AAElD,OAAO,MAAM,MAAM,WAAW,CAAC;IAC3B,WAAW;IACX,OAAO,EAAE,kBACL,MAAC,mBAAK,MAAM,KAAK;AAEzB,GAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";AAGA,OAAO,MAAM,UAAU,EAAE,IAAI,QAAQ,GAAG,CAAC,SAAS;AAElD,OAAO,MAAM,MAAM,WAAW,CAAC;IAC3B,WAAW;IACX,OAAO,EAAE,kBACL,MAAC,mBAAK,MAAM,KAAK;AAEzB,GAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_spread_jsx.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_spread_jsx.snap index 058df84cee6..557472b1578 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_spread_jsx.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_spread_jsx.snap @@ -39,17 +39,17 @@ export const RouterHead = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; /** * The RouterHead component is placed inside of the document `` element. - */ export const RouterHead = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_RouterHead_component_DPA76mgIou0"), "RouterHead_component_DPA76mgIou0")); + */ export const RouterHead = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_RouterHead_component_NlSk80fBK8A"), "RouterHead_component_NlSk80fBK8A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAIA;;CAEC,GACD,OAAO,MAAM,2BAAa,+HAyBvB\"}") -============================= test.tsx_RouterHead_component_DPA76mgIou0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAIA;;CAEC,GACD,OAAO,MAAM,2BAAa,+HAyBvB\"}") +============================= src/test.tsx_RouterHead_component_NlSk80fBK8A.js (ENTRY POINT)== import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { createElement as _createElement } from "@builder.io/qwik"; @@ -59,7 +59,7 @@ import { _jsxQ } from "@builder.io/qwik"; import { _jsxS } from "@builder.io/qwik"; import { useDocumentHead } from "@builder.io/qwik-city"; import { useLocation } from "@builder.io/qwik-city"; -export const RouterHead_component_DPA76mgIou0 = ()=>{ +export const RouterHead_component_NlSk80fBK8A = ()=>{ const head = useDocumentHead(); const loc = useLocation(); return /*#__PURE__*/ _jsxC(_Fragment, { @@ -82,7 +82,7 @@ export const RouterHead_component_DPA76mgIou0 = ()=>{ }, null, 3, null), head.meta.map((m)=>/*#__PURE__*/ _jsxS("meta", { ...m - }, null, 0, "u6_0")), + }, null, 0, "oJ_0")), head.links.map((l)=>/*#__PURE__*/ _createElement("link", { ...l, key: l.key @@ -93,20 +93,20 @@ export const RouterHead_component_DPA76mgIou0 = ()=>{ key: s.key })) ] - }, 1, "u6_1"); + }, 1, "oJ_1"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;gDAOqC;IACnC,MAAM,OAAO;IACb,MAAM,MAAM;IAEZ,qBACE;;0BACE,MAAC,qBAAO,KAAK,KAAK;0BAElB,MAAC;gBAAK,KAAI;gBAAY,IAAI,kBAAE,GAAI,IAAI;;;;0BACpC,MAAC;gBAAK,MAAK;gBAAW,SAAQ;;0BAC9B,MAAC;gBAAK,KAAI;gBAAO,MAAK;gBAAgB,MAAK;;YAE1C,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,kBACd,MAAC;oBAAM,GAAG,CAAC;;YAGZ,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,kBACf,eAAC;oBAAM,GAAG,CAAC;oBAAE,KAAK,EAAE,GAAG;;YAGxB,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,kBAChB,eAAC;oBAAO,GAAG,EAAE,KAAK;oBAAE,yBAAyB,EAAE,KAAK;oBAAE,KAAK,EAAE,GAAG;;;;AAIxE\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;gDAOqC;IACnC,MAAM,OAAO;IACb,MAAM,MAAM;IAEZ,qBACE;;0BACE,MAAC,qBAAO,KAAK,KAAK;0BAElB,MAAC;gBAAK,KAAI;gBAAY,IAAI,kBAAE,GAAI,IAAI;;;;0BACpC,MAAC;gBAAK,MAAK;gBAAW,SAAQ;;0BAC9B,MAAC;gBAAK,KAAI;gBAAO,MAAK;gBAAgB,MAAK;;YAE1C,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,kBACd,MAAC;oBAAM,GAAG,CAAC;;YAGZ,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,kBACf,eAAC;oBAAM,GAAG,CAAC;oBAAE,KAAK,EAAE,GAAG;;YAGxB,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,kBAChB,eAAC;oBAAO,GAAG,EAAE,KAAK;oBAAE,yBAAyB,EAAE,KAAK;oBAAE,KAAK,EAAE,GAAG;;;;AAIxE\"}") /* { - "origin": "test.tsx", - "name": "RouterHead_component_DPA76mgIou0", + "origin": "src/test.tsx", + "name": "RouterHead_component_NlSk80fBK8A", "entry": null, "displayName": "test.tsx_RouterHead_component", - "hash": "DPA76mgIou0", - "canonicalFilename": "test.tsx_RouterHead_component_DPA76mgIou0", - "path": "", + "hash": "NlSk80fBK8A", + "canonicalFilename": "test.tsx_RouterHead_component_NlSk80fBK8A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_exports_unused.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_exports_unused.snap index 21549ca1084..1932a02d948 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_exports_unused.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_exports_unused.snap @@ -23,34 +23,34 @@ export default component$(()=> { return
cmp
}); -============================= test.tsx == +============================= src/test.tsx == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; export const onGet = ()=>{ throw "Symbol removed by Qwik Optimizer, it can not be called from current platform"; }; -export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_LUXeXe0DQrg"), "test_component_LUXeXe0DQrg")); +export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_r7Fl19tSLhk"), "test_component_r7Fl19tSLhk")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;aAIa;;;AASb,6BAAe,mHAEZ\"}") -============================= test.tsx_test_component_LUXeXe0DQrg.tsx (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;aAIa;;;AASb,6BAAe,mHAEZ\"}") +============================= src/test.tsx_test_component_r7Fl19tSLhk.tsx (ENTRY POINT)== -export const test_component_LUXeXe0DQrg = ()=>{ +export const test_component_r7Fl19tSLhk = ()=>{ return
cmp
; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"0CAa0B;IACtB,QAAQ,IAAI,GAAG,EAAE;AACrB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"0CAa0B;IACtB,QAAQ,IAAI,GAAG,EAAE;AACrB\"}") /* { - "origin": "test.tsx", - "name": "test_component_LUXeXe0DQrg", + "origin": "src/test.tsx", + "name": "test_component_r7Fl19tSLhk", "entry": null, "displayName": "test.tsx_test_component", - "hash": "LUXeXe0DQrg", - "canonicalFilename": "test.tsx_test_component_LUXeXe0DQrg", - "path": "", + "hash": "r7Fl19tSLhk", + "canonicalFilename": "test.tsx_test_component_r7Fl19tSLhk", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_exports_used.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_exports_used.snap index 3ba2029e48c..0de85ad1f5e 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_exports_used.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_exports_used.snap @@ -26,66 +26,37 @@ export default component$(()=> { return
cmp
}); -============================= test.tsx_test_component_useResource_4a8wVY7wh38.tsx (ENTRY POINT)== - -import { onGet } from "./test"; -export const test_component_useResource_4a8wVY7wh38 = ()=>{ - return onGet(); -}; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";sDAciB;IACT,OAAO;AACX\"}") -/* -{ - "origin": "test.tsx", - "name": "test_component_useResource_4a8wVY7wh38", - "entry": null, - "displayName": "test.tsx_test_component_useResource", - "hash": "4a8wVY7wh38", - "canonicalFilename": "test.tsx_test_component_useResource_4a8wVY7wh38", - "path": "", - "extension": "tsx", - "parent": "test_component_LUXeXe0DQrg", - "ctxKind": "function", - "ctxName": "useResource$", - "captures": false, - "loc": [ - 282, - 319 - ] -} -*/ -============================= test.tsx == +============================= src/test.tsx == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; export const onGet = ()=>{ throw "Symbol removed by Qwik Optimizer, it can not be called from current platform"; }; -export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_LUXeXe0DQrg"), "test_component_LUXeXe0DQrg")); +export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_r7Fl19tSLhk"), "test_component_r7Fl19tSLhk")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;aAIa;;;AASb,6BAAe,mHAKZ\"}") -============================= test.tsx_test_component_LUXeXe0DQrg.tsx (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;aAIa;;;AASb,6BAAe,mHAKZ\"}") +============================= src/test.tsx_test_component_r7Fl19tSLhk.tsx (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; import { useResourceQrl } from "@builder.io/qwik"; -export const test_component_LUXeXe0DQrg = ()=>{ - useResourceQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_useResource_4a8wVY7wh38"), "test_component_useResource_4a8wVY7wh38")); +export const test_component_r7Fl19tSLhk = ()=>{ + useResourceQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_useResource_Ls8ZgXT9Mfw"), "test_component_useResource_Ls8ZgXT9Mfw")); return
cmp
; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;0CAa0B;IACtB;IAGA,QAAQ,IAAI,GAAG,EAAE;AACrB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;0CAa0B;IACtB;IAGA,QAAQ,IAAI,GAAG,EAAE;AACrB\"}") /* { - "origin": "test.tsx", - "name": "test_component_LUXeXe0DQrg", + "origin": "src/test.tsx", + "name": "test_component_r7Fl19tSLhk", "entry": null, "displayName": "test.tsx_test_component", - "hash": "LUXeXe0DQrg", - "canonicalFilename": "test.tsx_test_component_LUXeXe0DQrg", - "path": "", + "hash": "r7Fl19tSLhk", + "canonicalFilename": "test.tsx_test_component_r7Fl19tSLhk", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -97,6 +68,35 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ +============================= src/test.tsx_test_component_useResource_Ls8ZgXT9Mfw.tsx (ENTRY POINT)== + +import { onGet } from "./test"; +export const test_component_useResource_Ls8ZgXT9Mfw = ()=>{ + return onGet(); +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";sDAciB;IACT,OAAO;AACX\"}") +/* +{ + "origin": "src/test.tsx", + "name": "test_component_useResource_Ls8ZgXT9Mfw", + "entry": null, + "displayName": "test.tsx_test_component_useResource", + "hash": "Ls8ZgXT9Mfw", + "canonicalFilename": "test.tsx_test_component_useResource_Ls8ZgXT9Mfw", + "path": "src", + "extension": "tsx", + "parent": "test_component_r7Fl19tSLhk", + "ctxKind": "function", + "ctxName": "useResource$", + "captures": false, + "loc": [ + 282, + 319 + ] +} +*/ == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_server_code.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_server_code.snap index 14ec6113476..42452651562 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_server_code.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_strip_server_code.snap @@ -49,13 +49,42 @@ export const Parent = component$(() => { ); }); -============================= test.tsx_Parent_component_useTask_gDH1EtUWqBU.js (ENTRY POINT)== +============================= src/test.tsx_Parent_component_serverStuff_a_wYKwSboXvRc.js (ENTRY POINT)== + +export const Parent_component_serverStuff_a_wYKwSboXvRc = ()=>{ +// from $(), should not be removed +}; +export { _hW } from "@builder.io/qwik"; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"0DAqBoB;AACR,kCAAkC;AACtC\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Parent_component_serverStuff_a_wYKwSboXvRc", + "entry": null, + "displayName": "test.tsx_Parent_component_serverStuff_a", + "hash": "wYKwSboXvRc", + "canonicalFilename": "test.tsx_Parent_component_serverStuff_a_wYKwSboXvRc", + "path": "src", + "extension": "js", + "parent": "Parent_component_serverStuff_TnrpLBotfco", + "ctxKind": "function", + "ctxName": "$", + "captures": false, + "loc": [ + 602, + 666 + ] +} +*/ +============================= src/test.tsx_Parent_component_useTask_gZtBersfWT0.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; import { isServer } from "@builder.io/qwik/build"; import mongo from "mongodb"; import redis from "redis"; -export const Parent_component_useTask_gDH1EtUWqBU = async ()=>{ +export const Parent_component_useTask_gZtBersfWT0 = async ()=>{ const [state] = useLexicalScope(); if (!isServer) return; state.text = await mongo.users(); @@ -64,18 +93,18 @@ export const Parent_component_useTask_gDH1EtUWqBU = async ()=>{ export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;oDAaa;;IACL,IAAI,CAAC,UAAU;IACf,MAAM,IAAI,GAAG,MAAM,MAAM,KAAK;IAC9B,MAAM,GAAG,CAAC,MAAM,IAAI\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;oDAaa;;IACL,IAAI,CAAC,UAAU;IACf,MAAM,IAAI,GAAG,MAAM,MAAM,KAAK;IAC9B,MAAM,GAAG,CAAC,MAAM,IAAI\"}") /* { - "origin": "test.tsx", - "name": "Parent_component_useTask_gDH1EtUWqBU", + "origin": "src/test.tsx", + "name": "Parent_component_useTask_gZtBersfWT0", "entry": null, "displayName": "test.tsx_Parent_component_useTask", - "hash": "gDH1EtUWqBU", - "canonicalFilename": "test.tsx_Parent_component_useTask_gDH1EtUWqBU", - "path": "", + "hash": "gZtBersfWT0", + "canonicalFilename": "test.tsx_Parent_component_useTask_gZtBersfWT0", + "path": "src", "extension": "js", - "parent": "Parent_component_0TaiDayHrlo", + "parent": "Parent_component_RvpwMo6p6KE", "ctxKind": "function", "ctxName": "useTask$", "captures": true, @@ -85,72 +114,98 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.js == +============================= src/test.tsx_Parent_component_serverStuff_b_client_jKGxStF8RD8.js (ENTRY POINT)== + +export const Parent_component_serverStuff_b_client_jKGxStF8RD8 = ()=>{ +// from clien$(), should not be removed +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"iEAwB0B;AACd,uCAAuC;AAC3C\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Parent_component_serverStuff_b_client_jKGxStF8RD8", + "entry": null, + "displayName": "test.tsx_Parent_component_serverStuff_b_client", + "hash": "jKGxStF8RD8", + "canonicalFilename": "test.tsx_Parent_component_serverStuff_b_client_jKGxStF8RD8", + "path": "src", + "extension": "js", + "parent": "Parent_component_serverStuff_TnrpLBotfco", + "ctxKind": "function", + "ctxName": "client$", + "captures": false, + "loc": [ + 695, + 764 + ] +} +*/ +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Parent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_0TaiDayHrlo"), "Parent_component_0TaiDayHrlo")); +export const Parent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_RvpwMo6p6KE"), "Parent_component_RvpwMo6p6KE")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAOA,OAAO,MAAM,uBAAS,uHAkCnB\"}") -============================= test.tsx_Parent_component_serverStuff_a_2ca3HLDC7yc.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAOA,OAAO,MAAM,uBAAS,uHAkCnB\"}") +============================= src/test.tsx_Parent_component_useTask_1_lfHNT0D6V2k.js (ENTRY POINT)== -export const Parent_component_serverStuff_a_2ca3HLDC7yc = ()=>{ -// from $(), should not be removed +export const Parent_component_useTask_1_lfHNT0D6V2k = ()=>{ +// Code }; export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"0DAqBoB;AACR,kCAAkC;AACtC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"sDAgCa;AACL,OAAO;AACX\"}") /* { - "origin": "test.tsx", - "name": "Parent_component_serverStuff_a_2ca3HLDC7yc", + "origin": "src/test.tsx", + "name": "Parent_component_useTask_1_lfHNT0D6V2k", "entry": null, - "displayName": "test.tsx_Parent_component_serverStuff_a", - "hash": "2ca3HLDC7yc", - "canonicalFilename": "test.tsx_Parent_component_serverStuff_a_2ca3HLDC7yc", - "path": "", + "displayName": "test.tsx_Parent_component_useTask_1", + "hash": "lfHNT0D6V2k", + "canonicalFilename": "test.tsx_Parent_component_useTask_1_lfHNT0D6V2k", + "path": "src", "extension": "js", - "parent": "Parent_component_serverStuff_r1qAHX7Opp0", + "parent": "Parent_component_RvpwMo6p6KE", "ctxKind": "function", - "ctxName": "$", + "ctxName": "useTask$", "captures": false, "loc": [ - 602, - 666 + 839, + 868 ] } */ -============================= test.tsx_Parent_component_serverStuff_b_client_v9qawr2Inkk.js (ENTRY POINT)== +============================= src/test.tsx_Parent_component_div_onClick_PGf4qR0tjaA.js (ENTRY POINT)== -export const Parent_component_serverStuff_b_client_v9qawr2Inkk = ()=>{ -// from clien$(), should not be removed -}; +export const Parent_component_div_onClick_PGf4qR0tjaA = ()=>console.log('parent'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"iEAwB0B;AACd,uCAAuC;AAC3C\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAqCuB,IAAM,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Parent_component_serverStuff_b_client_v9qawr2Inkk", + "origin": "src/test.tsx", + "name": "Parent_component_div_onClick_PGf4qR0tjaA", "entry": null, - "displayName": "test.tsx_Parent_component_serverStuff_b_client", - "hash": "v9qawr2Inkk", - "canonicalFilename": "test.tsx_Parent_component_serverStuff_b_client_v9qawr2Inkk", - "path": "", + "displayName": "test.tsx_Parent_component_div_onClick", + "hash": "PGf4qR0tjaA", + "canonicalFilename": "test.tsx_Parent_component_div_onClick_PGf4qR0tjaA", + "path": "src", "extension": "js", - "parent": "Parent_component_serverStuff_r1qAHX7Opp0", - "ctxKind": "function", - "ctxName": "client$", + "parent": "Parent_component_RvpwMo6p6KE", + "ctxKind": "eventHandler", + "ctxName": "onClick$", "captures": false, "loc": [ - 695, - 764 + 908, + 935 ] } */ -============================= test.tsx_Parent_component_0TaiDayHrlo.js (ENTRY POINT)== +============================= src/test.tsx_Parent_component_RvpwMo6p6KE.js (ENTRY POINT)== import { _fnSignal } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; @@ -160,35 +215,35 @@ import { serverLoaderQrl } from "@builder.io/qwik"; import { serverStuffQrl } from "@builder.io/qwik"; import { useStore } from "@builder.io/qwik"; import { useTaskQrl } from "@builder.io/qwik"; -export const Parent_component_0TaiDayHrlo = ()=>{ +export const Parent_component_RvpwMo6p6KE = ()=>{ const state = useStore({ text: '' }); // Double count watch - useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_useTask_gDH1EtUWqBU"), "Parent_component_useTask_gDH1EtUWqBU", [ + useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_useTask_gZtBersfWT0"), "Parent_component_useTask_gZtBersfWT0", [ state ])); - serverStuffQrl(/*#__PURE__*/ _noopQrl("Parent_component_serverStuff_r1qAHX7Opp0")); - serverLoaderQrl(/*#__PURE__*/ _noopQrl("Parent_component_serverLoader_k1L0DiPQV1I")); - useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_useTask_1_P8oRQhHsurk"), "Parent_component_useTask_1_P8oRQhHsurk")); + serverStuffQrl(/*#__PURE__*/ _noopQrl("Parent_component_serverStuff_TnrpLBotfco")); + serverLoaderQrl(/*#__PURE__*/ _noopQrl("Parent_component_serverLoader_q0dZPQGVRYw")); + useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_useTask_1_lfHNT0D6V2k"), "Parent_component_useTask_1_lfHNT0D6V2k")); return /*#__PURE__*/ _jsxQ("div", null, { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_div_onClick_C5XE49Nqd3A"), "Parent_component_div_onClick_C5XE49Nqd3A") + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_div_onClick_PGf4qR0tjaA"), "Parent_component_div_onClick_PGf4qR0tjaA") }, _fnSignal((p0)=>p0.text, [ state - ], "p0.text"), 3, "u6_0"); + ], "p0.text"), 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;4CAOiC;IAC7B,MAAM,QAAQ,SAAS;QACnB,MAAM;IACV;IAEA,qBAAqB;IACrB;;;IAMA;IAWA;IAEA;IAIA,qBACI,MAAC;QAAI,QAAQ;uBACR,GAAM,IAAI;;;AAGvB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;;;4CAOiC;IAC7B,MAAM,QAAQ,SAAS;QACnB,MAAM;IACV;IAEA,qBAAqB;IACrB;;;IAMA;IAWA;IAEA;IAIA,qBACI,MAAC;QAAI,QAAQ;uBACR,GAAM,IAAI;;;AAGvB\"}") /* { - "origin": "test.tsx", - "name": "Parent_component_0TaiDayHrlo", + "origin": "src/test.tsx", + "name": "Parent_component_RvpwMo6p6KE", "entry": null, "displayName": "test.tsx_Parent_component", - "hash": "0TaiDayHrlo", - "canonicalFilename": "test.tsx_Parent_component_0TaiDayHrlo", - "path": "", + "hash": "RvpwMo6p6KE", + "canonicalFilename": "test.tsx_Parent_component_RvpwMo6p6KE", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -200,61 +255,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Parent_component_div_onClick_C5XE49Nqd3A.js (ENTRY POINT)== - -export const Parent_component_div_onClick_C5XE49Nqd3A = ()=>console.log('parent'); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAqCuB,IAAM,QAAQ,GAAG,CAAC\"}") -/* -{ - "origin": "test.tsx", - "name": "Parent_component_div_onClick_C5XE49Nqd3A", - "entry": null, - "displayName": "test.tsx_Parent_component_div_onClick", - "hash": "C5XE49Nqd3A", - "canonicalFilename": "test.tsx_Parent_component_div_onClick_C5XE49Nqd3A", - "path": "", - "extension": "js", - "parent": "Parent_component_0TaiDayHrlo", - "ctxKind": "eventHandler", - "ctxName": "onClick$", - "captures": false, - "loc": [ - 908, - 935 - ] -} -*/ -============================= test.tsx_Parent_component_useTask_1_P8oRQhHsurk.js (ENTRY POINT)== - -export const Parent_component_useTask_1_P8oRQhHsurk = ()=>{ -// Code -}; -export { _hW } from "@builder.io/qwik"; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"sDAgCa;AACL,OAAO;AACX\"}") -/* -{ - "origin": "test.tsx", - "name": "Parent_component_useTask_1_P8oRQhHsurk", - "entry": null, - "displayName": "test.tsx_Parent_component_useTask_1", - "hash": "P8oRQhHsurk", - "canonicalFilename": "test.tsx_Parent_component_useTask_1_P8oRQhHsurk", - "path": "", - "extension": "js", - "parent": "Parent_component_0TaiDayHrlo", - "ctxKind": "function", - "ctxName": "useTask$", - "captures": false, - "loc": [ - 839, - 868 - ] -} -*/ == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_transpile_jsx_only.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_transpile_jsx_only.snap index 3c765849f4d..d72c42efd6c 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_transpile_jsx_only.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_transpile_jsx_only.snap @@ -17,31 +17,57 @@ export const App = component$((props) => { ); }); -============================= test.tsx_App_component_ckEPmXZlub0.ts (ENTRY POINT)== +============================= src/test.tsx_App_component_Cmp_p_onClick_44EtmIdf4XQ.ts (ENTRY POINT)== + +export const App_component_Cmp_p_onClick_44EtmIdf4XQ = ()=>console.log('warn'); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"uDAMuC,IAAM,QAAQ,GAAG,CAAC\"}") +/* +{ + "origin": "src/test.tsx", + "name": "App_component_Cmp_p_onClick_44EtmIdf4XQ", + "entry": null, + "displayName": "test.tsx_App_component_Cmp_p_onClick", + "hash": "44EtmIdf4XQ", + "canonicalFilename": "test.tsx_App_component_Cmp_p_onClick_44EtmIdf4XQ", + "path": "src", + "extension": "ts", + "parent": "App_component_F6JpluHHZ5A", + "ctxKind": "eventHandler", + "ctxName": "onClick$", + "captures": false, + "loc": [ + 169, + 194 + ] +} +*/ +============================= src/test.tsx_App_component_F6JpluHHZ5A.ts (ENTRY POINT)== import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = (props)=>{ +export const App_component_F6JpluHHZ5A = (props)=>{ return /*#__PURE__*/ _jsxC(Cmp, { children: /*#__PURE__*/ _jsxQ("p", null, { class: "stuff", - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_Cmp_p_onClick_vuXzfUTkpto.ts"), "App_component_Cmp_p_onClick_vuXzfUTkpto") + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_Cmp_p_onClick_44EtmIdf4XQ.ts"), "App_component_Cmp_p_onClick_44EtmIdf4XQ") }, "Hello Qwik", 3, null) - }, 3, "u6_0"); + }, 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;yCAG8B,CAAC;IAC3B,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YAAQ,QAAQ;WAA6B;;AAGlE\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;yCAG8B,CAAC;IAC3B,qBACI,MAAC;kBACG,cAAA,MAAC;YAAE,OAAM;YAAQ,QAAQ;WAA6B;;AAGlE\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "ts", "parent": null, "ctxKind": "function", @@ -53,40 +79,14 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_App_component_Cmp_p_onClick_vuXzfUTkpto.ts (ENTRY POINT)== - -export const App_component_Cmp_p_onClick_vuXzfUTkpto = ()=>console.log('warn'); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"uDAMuC,IAAM,QAAQ,GAAG,CAAC\"}") -/* -{ - "origin": "test.tsx", - "name": "App_component_Cmp_p_onClick_vuXzfUTkpto", - "entry": null, - "displayName": "test.tsx_App_component_Cmp_p_onClick", - "hash": "vuXzfUTkpto", - "canonicalFilename": "test.tsx_App_component_Cmp_p_onClick_vuXzfUTkpto", - "path": "", - "extension": "ts", - "parent": "App_component_ckEPmXZlub0", - "ctxKind": "eventHandler", - "ctxName": "onClick$", - "captures": false, - "loc": [ - 169, - 194 - ] -} -*/ -============================= test.ts == +============================= src/test.ts == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0.ts"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A.ts"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,oHAMhB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,oHAMhB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_transpile_ts_only.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_transpile_ts_only.snap index 9ecc02d5e37..f1925d5f09b 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_transpile_ts_only.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_transpile_ts_only.snap @@ -17,18 +17,18 @@ export const App = component$((props: Stuff) => { ); }); -============================= test.jsx == +============================= src/test.jsx == import { componentQrl } from "@builder.io/qwik"; import { inlinedQrl } from "@builder.io/qwik"; export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props)=>{ return -

console.log('warn'), "App_component_Cmp_p_onClick_vuXzfUTkpto")}>Hello Qwik

+

console.log('warn'), "App_component_Cmp_p_onClick_44EtmIdf4XQ")}>Hello Qwik

; -}, "App_component_ckEPmXZlub0")); +}, "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,sCAAW,CAAC;IAC3B,QACK,IAAI;YACD,CAAC,EAAE,MAAM,QAAQ,mCAAU,IAAM,QAAQ,GAAG,CAAC,qDAAS,UAAU,EAAE,EAAE;QACxE,EAAE;AAEV,iCAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,sCAAW,CAAC;IAC3B,QACK,IAAI;YACD,CAAC,EAAE,MAAM,QAAQ,mCAAU,IAAM,QAAQ,GAAG,CAAC,qDAAS,UAAU,EAAE,EAAE;QACxE,EAAE;AAEV,iCAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums.snap index 3d0a3dfd05a..77f43d45971 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums.snap @@ -23,7 +23,7 @@ export const App = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; @@ -32,35 +32,35 @@ export var Thing = /*#__PURE__*/ function(Thing) { Thing[Thing["B"] = 1] = "B"; return Thing; }({}); -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,IAAA,AAAK,+BAAA;;;WAAA;MAGX;AAED,OAAO,MAAM,oBAAM,iHAOhB\"}") -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,IAAA,AAAK,+BAAA;;;WAAA;MAGX;AAED,OAAO,MAAM,oBAAM,iHAOhB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ()=>{ +export const App_component_F6JpluHHZ5A = ()=>{ console.log(0); return /*#__PURE__*/ _jsxC(_Fragment, { children: /*#__PURE__*/ _jsxQ("p", null, { class: "stuff" }, "Hello Qwik", 3, null) - }, 3, "u6_0"); + }, 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;yCAQ8B;IAC1B,QAAQ,GAAG;IACX,qBACI;kBACI,cAAA,MAAC;YAAE,OAAM;WAAQ;;AAG7B\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;yCAQ8B;IAC1B,QAAQ,GAAG;IACX,qBACI;kBACI,cAAA,MAAC;YAAE,OAAM;WAAQ;;AAG7B\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums_issue_1341.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums_issue_1341.snap index 1717c64cc19..42983827529 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums_issue_1341.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums_issue_1341.snap @@ -23,7 +23,7 @@ export const App = component$(() => { ); }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; @@ -32,35 +32,35 @@ import { qrl } from "@builder.io/qwik"; Thing[Thing["B"] = 1] = "B"; return Thing; })({}); -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;wBAGK;;;WAAA;;AAKL,OAAO,MAAM,oBAAM,iHAOhB\"}") -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;wBAGK;;;WAAA;;AAKL,OAAO,MAAM,oBAAM,iHAOhB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { _jsxC } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ()=>{ +export const App_component_F6JpluHHZ5A = ()=>{ console.log(0); return /*#__PURE__*/ _jsxC(_Fragment, { children: /*#__PURE__*/ _jsxQ("p", null, { class: "stuff" }, "Hello Qwik", 3, null) - }, 3, "u6_0"); + }, 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;yCAQ8B;IAC1B,QAAQ,GAAG;IACX,qBACI;kBACI,cAAA,MAAC;YAAE,OAAM;WAAQ;;AAG7B\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;yCAQ8B;IAC1B,QAAQ,GAAG;IACX,qBACI;kBACI,cAAA,MAAC;YAAE,OAAM;WAAQ;;AAG7B\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums_no_transpile.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums_no_transpile.snap index 6ca8300c283..b313ce61cec 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums_no_transpile.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_ts_enums_no_transpile.snap @@ -23,7 +23,7 @@ export const App = component$(() => { ); }); -============================= test.tsx == +============================= src/test.tsx == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; @@ -31,14 +31,14 @@ export enum Thing { A, B } -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,YAAY;IACR;IACA;;AAGJ,OAAO,MAAM,oBAAM,iHAOhB\"}") -============================= test.tsx_App_component_ckEPmXZlub0.tsx (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,YAAY;IACR;IACA;;AAGJ,OAAO,MAAM,oBAAM,iHAOhB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.tsx (ENTRY POINT)== import { Thing } from "./test"; -export const App_component_ckEPmXZlub0 = ()=>{ +export const App_component_F6JpluHHZ5A = ()=>{ console.log(Thing.A); return <>

Hello Qwik

@@ -46,16 +46,16 @@ export const App_component_ckEPmXZlub0 = ()=>{ }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAQ8B;IAC1B,QAAQ,GAAG,CAAC,MAAM,CAAC;IACnB,SACM;YACE,CAAC,EAAE,MAAM,QAAQ,UAAU,EAAE,EAAE;QACnC;AAER\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAQ8B;IAC1B,QAAQ,GAAG,CAAC,MAAM,CAAC;IACnB,SACM;YACE,CAAC,EAAE,MAAM,QAAQ,UAAU,EAAE,EAAE;QACnC;AAER\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_client_effect.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_client_effect.snap index 809be7b7048..817409f505c 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_client_effect.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_client_effect.snap @@ -32,81 +32,37 @@ export const Child = component$(() => { }); -============================= test.tsx_Child_component_useBrowserVisibleTask_0IGFPOyJmQA.js (ENTRY POINT)== - -import { useLexicalScope } from "@builder.io/qwik"; -export const Child_component_useBrowserVisibleTask_0IGFPOyJmQA = ()=>{ - const [state] = useLexicalScope(); - const timer = setInterval(()=>{ - state.count++; - }, 1000); - return ()=>{ - clearInterval(timer); - }; -}; -export { _hW } from "@builder.io/qwik"; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";iEAS2B;;IACnB,MAAM,QAAQ,YAAY;QAC1B,MAAM,KAAK;IACX,GAAG;IACH,OAAO;QACP,cAAc;IACd\"}") -/* -{ - "origin": "test.tsx", - "name": "Child_component_useBrowserVisibleTask_0IGFPOyJmQA", - "entry": null, - "displayName": "test.tsx_Child_component_useBrowserVisibleTask", - "hash": "0IGFPOyJmQA", - "canonicalFilename": "test.tsx_Child_component_useBrowserVisibleTask_0IGFPOyJmQA", - "path": "", - "extension": "js", - "parent": "Child_component_9GyF01GDKqw", - "ctxKind": "function", - "ctxName": "useBrowserVisibleTask$", - "captures": true, - "loc": [ - 244, - 403 - ] -} -*/ -============================= test.js == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const Child = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_9GyF01GDKqw"), "Child_component_9GyF01GDKqw")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,sBAAQ,qHAoBlB\"}") -============================= test.tsx_Child_component_9GyF01GDKqw.js (ENTRY POINT)== +============================= src/test.tsx_Child_component_r5lvTXKSpwk.js (ENTRY POINT)== import { _fnSignal } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; import { useBrowserVisibleTaskQrl } from "@builder.io/qwik"; import { useStore } from "@builder.io/qwik"; -export const Child_component_9GyF01GDKqw = ()=>{ +export const Child_component_r5lvTXKSpwk = ()=>{ const state = useStore({ count: 0 }); // Double count watch - useBrowserVisibleTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_useBrowserVisibleTask_0IGFPOyJmQA"), "Child_component_useBrowserVisibleTask_0IGFPOyJmQA", [ + useBrowserVisibleTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_useBrowserVisibleTask_o1cN2Yii0Kg"), "Child_component_useBrowserVisibleTask_o1cN2Yii0Kg", [ state ])); return /*#__PURE__*/ _jsxQ("div", null, null, _fnSignal((p0)=>p0.count, [ state - ], "p0.count"), 3, "u6_0"); + ], "p0.count"), 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;2CAGgC;IAC5B,MAAM,QAAQ,SAAS;QACnB,OAAO;IACX;IAEA,qBAAqB;IACrB;;;IASA,qBACI,MAAC,mCACA,GAAM,KAAK;;;AAGpB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;2CAGgC;IAC5B,MAAM,QAAQ,SAAS;QACnB,OAAO;IACX;IAEA,qBAAqB;IACrB;;;IASA,qBACI,MAAC,mCACA,GAAM,KAAK;;;AAGpB\"}") /* { - "origin": "test.tsx", - "name": "Child_component_9GyF01GDKqw", + "origin": "src/test.tsx", + "name": "Child_component_r5lvTXKSpwk", "entry": null, "displayName": "test.tsx_Child_component", - "hash": "9GyF01GDKqw", - "canonicalFilename": "test.tsx_Child_component_9GyF01GDKqw", - "path": "", + "hash": "r5lvTXKSpwk", + "canonicalFilename": "test.tsx_Child_component_r5lvTXKSpwk", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -118,6 +74,50 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ +============================= src/test.js == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const Child = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_r5lvTXKSpwk"), "Child_component_r5lvTXKSpwk")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,sBAAQ,qHAoBlB\"}") +============================= src/test.tsx_Child_component_useBrowserVisibleTask_o1cN2Yii0Kg.js (ENTRY POINT)== + +import { useLexicalScope } from "@builder.io/qwik"; +export const Child_component_useBrowserVisibleTask_o1cN2Yii0Kg = ()=>{ + const [state] = useLexicalScope(); + const timer = setInterval(()=>{ + state.count++; + }, 1000); + return ()=>{ + clearInterval(timer); + }; +}; +export { _hW } from "@builder.io/qwik"; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";iEAS2B;;IACnB,MAAM,QAAQ,YAAY;QAC1B,MAAM,KAAK;IACX,GAAG;IACH,OAAO;QACP,cAAc;IACd\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Child_component_useBrowserVisibleTask_o1cN2Yii0Kg", + "entry": null, + "displayName": "test.tsx_Child_component_useBrowserVisibleTask", + "hash": "o1cN2Yii0Kg", + "canonicalFilename": "test.tsx_Child_component_useBrowserVisibleTask_o1cN2Yii0Kg", + "path": "src", + "extension": "js", + "parent": "Child_component_r5lvTXKSpwk", + "ctxKind": "function", + "ctxName": "useBrowserVisibleTask$", + "captures": true, + "loc": [ + 244, + 403 + ] +} +*/ == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_optimization.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_optimization.snap index ccd60cedbb8..0056a3d7a1e 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_optimization.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_optimization.snap @@ -22,7 +22,7 @@ export const Works = component$((props) => { ); }); -============================= test.jsx == +============================= src/test.jsx == import { componentQrl } from "@builder.io/qwik"; import { inlinedQrl } from "@builder.io/qwik"; @@ -33,10 +33,10 @@ export const Works = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props) } }); return
{foo}
; -}, "Works_component_t45qL4vNGv0")); +}, "Works_component_3Z6btR1NEOY")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,sBAAQ,sCAAW,CAAC;IAC7B,MAAM,QAAgB,SAAS;QAAC,OAAM;YAAC,OAAM;QAAC;IAAC;IAO/C,QACK,IAAI,MAJM,AADH,MAHsC,MAA3C,YAEA,MACW,GAAG,CACF,OAAO,CAAnB,OAIgB,MAAM;AAEjC,mCAAG\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,sBAAQ,sCAAW,CAAC;IAC7B,MAAM,QAAgB,SAAS;QAAC,OAAM;YAAC,OAAM;QAAC;IAAC;IAO/C,QACK,IAAI,MAJM,AADH,MAHsC,MAA3C,YAEA,MACW,GAAG,CACF,OAAO,CAAnB,OAIgB,MAAM;AAEjC,mCAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_server_mount.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_server_mount.snap index 5be46ef633b..700a8f7268d 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_server_mount.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_use_server_mount.snap @@ -46,12 +46,56 @@ export const Child = component$(() => { ); }); -============================= test.tsx_Parent_component_useTask_gDH1EtUWqBU.js == +============================= src/test.tsx_Child_component_r5lvTXKSpwk.js == + +import { _fnSignal } from "@builder.io/qwik"; +import { _jsxQ } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +import { useStore } from "@builder.io/qwik"; +import { useTaskQrl } from "@builder.io/qwik"; +export const Child_component_r5lvTXKSpwk = ()=>{ + const state = useStore({ + text: '' + }); + // Double count watch + useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_useTask_Sg9Xn0owg6A"), "Child_component_useTask_Sg9Xn0owg6A", [ + state + ])); + return /*#__PURE__*/ _jsxQ("div", null, { + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_div_onClick_mfAbs3oHQGQ"), "Child_component_div_onClick_mfAbs3oHQGQ") + }, _fnSignal((p0)=>p0.text, [ + state + ], "p0.text"), 3, "oJ_1"); +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;2CAuBgC;IAC5B,MAAM,QAAQ,SAAS;QACnB,MAAM;IACV;IAEA,qBAAqB;IACrB;;;IAIA,qBACI,MAAC;QAAI,QAAQ;uBACR,GAAM,IAAI;;;AAGvB\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Child_component_r5lvTXKSpwk", + "entry": "src/test.tsx_entry_Child", + "displayName": "test.tsx_Child_component", + "hash": "r5lvTXKSpwk", + "canonicalFilename": "test.tsx_Child_component_r5lvTXKSpwk", + "path": "src", + "extension": "js", + "parent": null, + "ctxKind": "function", + "ctxName": "component$", + "captures": false, + "loc": [ + 519, + 799 + ] +} +*/ +============================= src/test.tsx_Parent_component_useTask_gZtBersfWT0.js == import { useLexicalScope } from "@builder.io/qwik"; import mongo from "mongodb"; import redis from "redis"; -export const Parent_component_useTask_gDH1EtUWqBU = async ()=>{ +export const Parent_component_useTask_gZtBersfWT0 = async ()=>{ const [state] = useLexicalScope(); state.text = await mongo.users(); redis.set(state.text); @@ -59,18 +103,18 @@ export const Parent_component_useTask_gDH1EtUWqBU = async ()=>{ export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;oDAWa;;IACL,MAAM,IAAI,GAAG,MAAM,MAAM,KAAK;IAC9B,MAAM,GAAG,CAAC,MAAM,IAAI\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;oDAWa;;IACL,MAAM,IAAI,GAAG,MAAM,MAAM,KAAK;IAC9B,MAAM,GAAG,CAAC,MAAM,IAAI\"}") /* { - "origin": "test.tsx", - "name": "Parent_component_useTask_gDH1EtUWqBU", - "entry": "test.tsx_entry_Parent", + "origin": "src/test.tsx", + "name": "Parent_component_useTask_gZtBersfWT0", + "entry": "src/test.tsx_entry_Parent", "displayName": "test.tsx_Parent_component_useTask", - "hash": "gDH1EtUWqBU", - "canonicalFilename": "test.tsx_Parent_component_useTask_gDH1EtUWqBU", - "path": "", + "hash": "gZtBersfWT0", + "canonicalFilename": "test.tsx_Parent_component_useTask_gZtBersfWT0", + "path": "src", "extension": "js", - "parent": "Parent_component_0TaiDayHrlo", + "parent": "Parent_component_RvpwMo6p6KE", "ctxKind": "function", "ctxName": "useTask$", "captures": true, @@ -80,108 +124,90 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Parent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_0TaiDayHrlo"), "Parent_component_0TaiDayHrlo")); -export const Child = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_9GyF01GDKqw"), "Child_component_9GyF01GDKqw")); +export const Parent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_RvpwMo6p6KE"), "Parent_component_RvpwMo6p6KE")); +export const Child = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_r5lvTXKSpwk"), "Child_component_r5lvTXKSpwk")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAKA,OAAO,MAAM,uBAAS,uHAgBnB;AAEH,OAAO,MAAM,sBAAQ,qHAelB\"}") -============================= test.tsx_Child_component_useTask_Oh4n7ZeqJkU.js == +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAKA,OAAO,MAAM,uBAAS,uHAgBnB;AAEH,OAAO,MAAM,sBAAQ,qHAelB\"}") +============================= src/test.tsx_Child_component_div_onClick_mfAbs3oHQGQ.js (ENTRY POINT)== -import { useLexicalScope } from "@builder.io/qwik"; -import mongo from "mongodb"; -export const Child_component_useTask_Oh4n7ZeqJkU = async ()=>{ - const [state] = useLexicalScope(); - state.text = await mongo.users(); -}; -export { _hW } from "@builder.io/qwik"; +export const Child_component_div_onClick_mfAbs3oHQGQ = ()=>console.log('child'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;mDA6Ba;;IACL,MAAM,IAAI,GAAG,MAAM,MAAM,KAAK\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"uDAkCuB,IAAM,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Child_component_useTask_Oh4n7ZeqJkU", - "entry": "test.tsx_entry_Child", - "displayName": "test.tsx_Child_component_useTask", - "hash": "Oh4n7ZeqJkU", - "canonicalFilename": "test.tsx_Child_component_useTask_Oh4n7ZeqJkU", - "path": "", + "origin": "src/test.tsx", + "name": "Child_component_div_onClick_mfAbs3oHQGQ", + "entry": null, + "displayName": "test.tsx_Child_component_div_onClick", + "hash": "mfAbs3oHQGQ", + "canonicalFilename": "test.tsx_Child_component_div_onClick_mfAbs3oHQGQ", + "path": "src", "extension": "js", - "parent": "Child_component_9GyF01GDKqw", - "ctxKind": "function", - "ctxName": "useTask$", - "captures": true, + "parent": "Child_component_r5lvTXKSpwk", + "ctxKind": "eventHandler", + "ctxName": "onClick$", + "captures": false, "loc": [ - 621, - 682 + 722, + 748 ] } */ -============================= test.tsx_Parent_component_0TaiDayHrlo.js == +============================= src/test.tsx_Child_component_useTask_Sg9Xn0owg6A.js == -import { _fnSignal } from "@builder.io/qwik"; -import { _jsxQ } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -import { useStore } from "@builder.io/qwik"; -import { useTaskQrl } from "@builder.io/qwik"; -export const Parent_component_0TaiDayHrlo = ()=>{ - const state = useStore({ - text: '' - }); - // Double count watch - useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_useTask_gDH1EtUWqBU"), "Parent_component_useTask_gDH1EtUWqBU", [ - state - ])); - return /*#__PURE__*/ _jsxQ("div", null, { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_div_onClick_C5XE49Nqd3A"), "Parent_component_div_onClick_C5XE49Nqd3A") - }, _fnSignal((p0)=>p0.text, [ - state - ], "p0.text"), 3, "u6_0"); +import { useLexicalScope } from "@builder.io/qwik"; +import mongo from "mongodb"; +export const Child_component_useTask_Sg9Xn0owg6A = async ()=>{ + const [state] = useLexicalScope(); + state.text = await mongo.users(); }; +export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;4CAKiC;IAC7B,MAAM,QAAQ,SAAS;QACnB,MAAM;IACV;IAEA,qBAAqB;IACrB;;;IAKA,qBACI,MAAC;QAAI,QAAQ;uBACR,GAAM,IAAI;;;AAGvB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;mDA6Ba;;IACL,MAAM,IAAI,GAAG,MAAM,MAAM,KAAK\"}") /* { - "origin": "test.tsx", - "name": "Parent_component_0TaiDayHrlo", - "entry": "test.tsx_entry_Parent", - "displayName": "test.tsx_Parent_component", - "hash": "0TaiDayHrlo", - "canonicalFilename": "test.tsx_Parent_component_0TaiDayHrlo", - "path": "", + "origin": "src/test.tsx", + "name": "Child_component_useTask_Sg9Xn0owg6A", + "entry": "src/test.tsx_entry_Child", + "displayName": "test.tsx_Child_component_useTask", + "hash": "Sg9Xn0owg6A", + "canonicalFilename": "test.tsx_Child_component_useTask_Sg9Xn0owg6A", + "path": "src", "extension": "js", - "parent": null, + "parent": "Child_component_r5lvTXKSpwk", "ctxKind": "function", - "ctxName": "component$", - "captures": false, + "ctxName": "useTask$", + "captures": true, "loc": [ - 171, - 483 + 621, + 682 ] } */ -============================= test.tsx_Parent_component_div_onClick_C5XE49Nqd3A.js (ENTRY POINT)== +============================= src/test.tsx_Parent_component_div_onClick_PGf4qR0tjaA.js (ENTRY POINT)== -export const Parent_component_div_onClick_C5XE49Nqd3A = ()=>console.log('parent'); +export const Parent_component_div_onClick_PGf4qR0tjaA = ()=>console.log('parent'); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAiBuB,IAAM,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"wDAiBuB,IAAM,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "Parent_component_div_onClick_C5XE49Nqd3A", + "origin": "src/test.tsx", + "name": "Parent_component_div_onClick_PGf4qR0tjaA", "entry": null, "displayName": "test.tsx_Parent_component_div_onClick", - "hash": "C5XE49Nqd3A", - "canonicalFilename": "test.tsx_Parent_component_div_onClick_C5XE49Nqd3A", - "path": "", + "hash": "PGf4qR0tjaA", + "canonicalFilename": "test.tsx_Parent_component_div_onClick_PGf4qR0tjaA", + "path": "src", "extension": "js", - "parent": "Parent_component_0TaiDayHrlo", + "parent": "Parent_component_RvpwMo6p6KE", "ctxKind": "eventHandler", "ctxName": "onClick$", "captures": false, @@ -191,73 +217,47 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Child_component_9GyF01GDKqw.js == +============================= src/test.tsx_Parent_component_RvpwMo6p6KE.js == import { _fnSignal } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; import { useStore } from "@builder.io/qwik"; import { useTaskQrl } from "@builder.io/qwik"; -export const Child_component_9GyF01GDKqw = ()=>{ +export const Parent_component_RvpwMo6p6KE = ()=>{ const state = useStore({ text: '' }); // Double count watch - useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_useTask_Oh4n7ZeqJkU"), "Child_component_useTask_Oh4n7ZeqJkU", [ + useTaskQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_useTask_gZtBersfWT0"), "Parent_component_useTask_gZtBersfWT0", [ state ])); return /*#__PURE__*/ _jsxQ("div", null, { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Child_component_div_onClick_elliVSnAiOQ"), "Child_component_div_onClick_elliVSnAiOQ") + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Parent_component_div_onClick_PGf4qR0tjaA"), "Parent_component_div_onClick_PGf4qR0tjaA") }, _fnSignal((p0)=>p0.text, [ state - ], "p0.text"), 3, "u6_1"); + ], "p0.text"), 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;2CAuBgC;IAC5B,MAAM,QAAQ,SAAS;QACnB,MAAM;IACV;IAEA,qBAAqB;IACrB;;;IAIA,qBACI,MAAC;QAAI,QAAQ;uBACR,GAAM,IAAI;;;AAGvB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;4CAKiC;IAC7B,MAAM,QAAQ,SAAS;QACnB,MAAM;IACV;IAEA,qBAAqB;IACrB;;;IAKA,qBACI,MAAC;QAAI,QAAQ;uBACR,GAAM,IAAI;;;AAGvB\"}") /* { - "origin": "test.tsx", - "name": "Child_component_9GyF01GDKqw", - "entry": "test.tsx_entry_Child", - "displayName": "test.tsx_Child_component", - "hash": "9GyF01GDKqw", - "canonicalFilename": "test.tsx_Child_component_9GyF01GDKqw", - "path": "", + "origin": "src/test.tsx", + "name": "Parent_component_RvpwMo6p6KE", + "entry": "src/test.tsx_entry_Parent", + "displayName": "test.tsx_Parent_component", + "hash": "RvpwMo6p6KE", + "canonicalFilename": "test.tsx_Parent_component_RvpwMo6p6KE", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", "ctxName": "component$", "captures": false, "loc": [ - 519, - 799 - ] -} -*/ -============================= test.tsx_Child_component_div_onClick_elliVSnAiOQ.js (ENTRY POINT)== - -export const Child_component_div_onClick_elliVSnAiOQ = ()=>console.log('child'); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"uDAkCuB,IAAM,QAAQ,GAAG,CAAC\"}") -/* -{ - "origin": "test.tsx", - "name": "Child_component_div_onClick_elliVSnAiOQ", - "entry": null, - "displayName": "test.tsx_Child_component_div_onClick", - "hash": "elliVSnAiOQ", - "canonicalFilename": "test.tsx_Child_component_div_onClick_elliVSnAiOQ", - "path": "", - "extension": "js", - "parent": "Child_component_9GyF01GDKqw", - "ctxKind": "eventHandler", - "ctxName": "onClick$", - "captures": false, - "loc": [ - 722, - 748 + 171, + 483 ] } */ diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_with_style.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_with_style.snap index b40c248233c..5bfdaa27d82 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_with_style.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_with_style.snap @@ -18,23 +18,33 @@ export const Foo = component$(() => { tagName: "my-foo", }); -============================= test.tsx_Foo_component_useStyles_pV9TSCBIhw8.tsx (ENTRY POINT)== +============================= src/test.tsx == -export const Foo_component_useStyles_pV9TSCBIhw8 = '.class {}'; +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_eZLoPe62E2c"), "Foo_component_eZLoPe62E2c"), { + tagName: "my-foo" +}); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAKhB;IACC,SAAS;AACb,GAAG\"}") +============================= src/test.tsx_Foo_component_useStyles_roc82K1FwkU.tsx (ENTRY POINT)== + +export const Foo_component_useStyles_roc82K1FwkU = '.class {}'; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mDAIe\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"mDAIe\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_useStyles_pV9TSCBIhw8", + "origin": "src/test.tsx", + "name": "Foo_component_useStyles_roc82K1FwkU", "entry": null, "displayName": "test.tsx_Foo_component_useStyles", - "hash": "pV9TSCBIhw8", - "canonicalFilename": "test.tsx_Foo_component_useStyles_pV9TSCBIhw8", - "path": "", + "hash": "roc82K1FwkU", + "canonicalFilename": "test.tsx_Foo_component_useStyles_roc82K1FwkU", + "path": "src", "extension": "tsx", - "parent": "Foo_component_HTDRsvUbLiE", + "parent": "Foo_component_eZLoPe62E2c", "ctxKind": "function", "ctxName": "useStyles$", "captures": false, @@ -44,26 +54,26 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Foo_component_HTDRsvUbLiE.tsx (ENTRY POINT)== +============================= src/test.tsx_Foo_component_eZLoPe62E2c.tsx (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; import { useStylesQrl } from "@builder.io/qwik"; -export const Foo_component_HTDRsvUbLiE = ()=>{ - useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_useStyles_pV9TSCBIhw8"), "Foo_component_useStyles_pV9TSCBIhw8")); +export const Foo_component_eZLoPe62E2c = ()=>{ + useStylesQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_useStyles_roc82K1FwkU"), "Foo_component_useStyles_roc82K1FwkU")); return
; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAG8B;IAC1B;IACA,QACK,IAAI,MAAM;AAEnB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;yCAG8B;IAC1B;IACA,QACK,IAAI,MAAM;AAEnB\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_HTDRsvUbLiE", + "origin": "src/test.tsx", + "name": "Foo_component_eZLoPe62E2c", "entry": null, "displayName": "test.tsx_Foo_component", - "hash": "HTDRsvUbLiE", - "canonicalFilename": "test.tsx_Foo_component_HTDRsvUbLiE", - "path": "", + "hash": "eZLoPe62E2c", + "canonicalFilename": "test.tsx_Foo_component_eZLoPe62E2c", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -75,16 +85,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_HTDRsvUbLiE"), "Foo_component_HTDRsvUbLiE"), { - tagName: "my-foo" -}); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAKhB;IACC,SAAS;AACb,GAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_with_tagname.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_with_tagname.snap index be0bbee3f6d..6c508f10ac0 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_with_tagname.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__example_with_tagname.snap @@ -20,24 +20,34 @@ export const Foo = component$(() => { tagName: "my-foo", }); -============================= test.tsx_Foo_component_HTDRsvUbLiE.tsx (ENTRY POINT)== +============================= src/test.tsx == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_eZLoPe62E2c"), "Foo_component_eZLoPe62E2c"), { + tagName: "my-foo" +}); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAOhB;IACC,SAAS;AACb,GAAG\"}") +============================= src/test.tsx_Foo_component_eZLoPe62E2c.tsx (ENTRY POINT)== import { qrl } from "@builder.io/qwik"; -export const Foo_component_HTDRsvUbLiE = ()=>{ - return /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_1_DvU6FitWglY"), "Foo_component_1_DvU6FitWglY"); +export const Foo_component_eZLoPe62E2c = ()=>{ + return /*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_1_Q0jkSkaqC5c"), "Foo_component_1_Q0jkSkaqC5c"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAG8B;IAC1B;AAMJ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAG8B;IAC1B;AAMJ\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_HTDRsvUbLiE", + "origin": "src/test.tsx", + "name": "Foo_component_eZLoPe62E2c", "entry": null, "displayName": "test.tsx_Foo_component", - "hash": "HTDRsvUbLiE", - "canonicalFilename": "test.tsx_Foo_component_HTDRsvUbLiE", - "path": "", + "hash": "eZLoPe62E2c", + "canonicalFilename": "test.tsx_Foo_component_eZLoPe62E2c", + "path": "src", "extension": "tsx", "parent": null, "ctxKind": "function", @@ -49,27 +59,27 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Foo_component_1_DvU6FitWglY.tsx (ENTRY POINT)== +============================= src/test.tsx_Foo_component_1_Q0jkSkaqC5c.tsx (ENTRY POINT)== -export const Foo_component_1_DvU6FitWglY = ()=>{ +export const Foo_component_1_Q0jkSkaqC5c = ()=>{ return
; }; export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"2CAIa;IACL,QACK,IAAI;YACL,EAAE;AAEV\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"2CAIa;IACL,QACK,IAAI;YACL,EAAE;AAEV\"}") /* { - "origin": "test.tsx", - "name": "Foo_component_1_DvU6FitWglY", + "origin": "src/test.tsx", + "name": "Foo_component_1_Q0jkSkaqC5c", "entry": null, "displayName": "test.tsx_Foo_component_1", - "hash": "DvU6FitWglY", - "canonicalFilename": "test.tsx_Foo_component_1_DvU6FitWglY", - "path": "", + "hash": "Q0jkSkaqC5c", + "canonicalFilename": "test.tsx_Foo_component_1_Q0jkSkaqC5c", + "path": "src", "extension": "tsx", - "parent": "Foo_component_HTDRsvUbLiE", + "parent": "Foo_component_eZLoPe62E2c", "ctxKind": "function", "ctxName": "$", "captures": false, @@ -79,16 +89,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export const Foo = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Foo_component_HTDRsvUbLiE"), "Foo_component_HTDRsvUbLiE"), { - tagName: "my-foo" -}); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAOhB;IACC,SAAS;AACb,GAAG\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__impure_template_fns.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__impure_template_fns.snap index befd83e89cb..a33e2b8771b 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__impure_template_fns.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__impure_template_fns.snap @@ -28,7 +28,7 @@ snapshot_kind: text ); }); -============================= test.tsx_test_component_LUXeXe0DQrg.ts (ENTRY POINT)== +============================= src/test.tsx_test_component_r7Fl19tSLhk.ts (ENTRY POINT)== import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { _jsxC } from "@builder.io/qwik"; @@ -36,7 +36,7 @@ import { _jsxQ } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; import { _auto_useFoo as useFoo } from "./test"; import { useSignal } from "@builder.io/qwik"; -export const test_component_LUXeXe0DQrg = ()=>{ +export const test_component_r7Fl19tSLhk = ()=>{ const count = useSignal(0); const foo = useFoo(count); return /*#__PURE__*/ _jsxC(_Fragment, { @@ -44,25 +44,25 @@ export const test_component_LUXeXe0DQrg = ()=>{ /*#__PURE__*/ _jsxQ("p", null, null, foo("test"), 1, null), /*#__PURE__*/ _jsxQ("p", null, null, foo`test`, 1, null), /*#__PURE__*/ _jsxQ("button", null, { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_Fragment_button_onClick_eF3QEzgQWcY"), "test_component_Fragment_button_onClick_eF3QEzgQWcY", [ + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_Fragment_button_onClick_93KnhrzhnFI"), "test_component_Fragment_button_onClick_93KnhrzhnFI", [ count ]) }, "Count up", 3, null) ] - }, 1, "u6_0"); + }, 1, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;0CAU4B;IACzB,MAAM,QAAQ,UAAU;IACxB,MAAM,MAAM,OAAO;IACnB,qBACC;;0BACC,MAAC,iBAAG,IAAI;0BACR,MAAC,iBAAG,GAAG,CAAC,IAAI,CAAC;0BACb,MAAC;gBAAO,QAAQ;;;eAAuB;;;AAG1C\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;0CAU4B;IACzB,MAAM,QAAQ,UAAU;IACxB,MAAM,MAAM,OAAO;IACnB,qBACC;;0BACC,MAAC,iBAAG,IAAI;0BACR,MAAC,iBAAG,GAAG,CAAC,IAAI,CAAC;0BACb,MAAC;gBAAO,QAAQ;;;eAAuB;;;AAG1C\"}") /* { - "origin": "test.tsx", - "name": "test_component_LUXeXe0DQrg", + "origin": "src/test.tsx", + "name": "test_component_r7Fl19tSLhk", "entry": null, "displayName": "test.tsx_test_component", - "hash": "LUXeXe0DQrg", - "canonicalFilename": "test.tsx_test_component_LUXeXe0DQrg", - "path": "", + "hash": "r7Fl19tSLhk", + "canonicalFilename": "test.tsx_test_component_r7Fl19tSLhk", + "path": "src", "extension": "ts", "parent": null, "ctxKind": "function", @@ -74,27 +74,27 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_test_component_Fragment_button_onClick_eF3QEzgQWcY.ts (ENTRY POINT)== +============================= src/test.tsx_test_component_Fragment_button_onClick_93KnhrzhnFI.ts (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; -export const test_component_Fragment_button_onClick_eF3QEzgQWcY = ()=>{ +export const test_component_Fragment_button_onClick_93KnhrzhnFI = ()=>{ const [count] = useLexicalScope(); return count.value++; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";kEAiBuB;;WAAM,MAAM,KAAK\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";kEAiBuB;;WAAM,MAAM,KAAK\"}") /* { - "origin": "test.tsx", - "name": "test_component_Fragment_button_onClick_eF3QEzgQWcY", + "origin": "src/test.tsx", + "name": "test_component_Fragment_button_onClick_93KnhrzhnFI", "entry": null, "displayName": "test.tsx_test_component_Fragment_button_onClick", - "hash": "eF3QEzgQWcY", - "canonicalFilename": "test.tsx_test_component_Fragment_button_onClick_eF3QEzgQWcY", - "path": "", + "hash": "93KnhrzhnFI", + "canonicalFilename": "test.tsx_test_component_Fragment_button_onClick_93KnhrzhnFI", + "path": "src", "extension": "ts", - "parent": "test_component_LUXeXe0DQrg", + "parent": "test_component_r7Fl19tSLhk", "ctxKind": "eventHandler", "ctxName": "onClick$", "captures": true, @@ -104,7 +104,7 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.ts == +============================= src/test.ts == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; @@ -115,11 +115,11 @@ const useFoo = (count)=>{ }; return tag; }; -export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_LUXeXe0DQrg"), "test_component_LUXeXe0DQrg")); +export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_r7Fl19tSLhk"), "test_component_r7Fl19tSLhk")); export { useFoo as _auto_useFoo }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEE,MAAM,SAAS,CAAC;IACf,MAAM,MAAM,CAAC;QACZ,MAAM,QAAQ,OAAO,MAAM,WAAW,IAAI,CAAC,CAAC,EAAE;QAC9C,OAAO,GAAG,MAAM,CAAC,EAAE,MAAM,KAAK,EAAE;IACjC;IACA,OAAO;AACR;AAEA,6BAAe,mHAUZ\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEE,MAAM,SAAS,CAAC;IACf,MAAM,MAAM,CAAC;QACZ,MAAM,QAAQ,OAAO,MAAM,WAAW,IAAI,CAAC,CAAC,EAAE;QAC9C,OAAO,GAAG,MAAM,CAAC,EAAE,MAAM,KAAK,EAAE;IACjC;IACA,OAAO;AACR;AAEA,6BAAe,mHAUZ\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_150.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_150.snap index 243976b0fc8..81ff011141b 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_150.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_150.snap @@ -27,31 +27,31 @@ export const Greeter = component$(() => { const d = $(()=>console.log('thing')); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Greeter = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Greeter_component_n7HuG2hhU0Q"), "Greeter_component_n7HuG2hhU0Q")); -/*#__PURE__*/ qrl(()=>import("./test.tsx_d_wKNFJEIQVUA"), "d_wKNFJEIQVUA"); +export const Greeter = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Greeter_component_ePjmTcgQ0IY"), "Greeter_component_ePjmTcgQ0IY")); +/*#__PURE__*/ qrl(()=>import("./test.tsx_d_VD1cSQHOMXk"), "d_VD1cSQHOMXk"); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAIA,OAAO,MAAM,wBAAU,yHAapB\"}") -============================= test.tsx_d_wKNFJEIQVUA.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAIA,OAAO,MAAM,wBAAU,yHAapB\"}") +============================= src/test.tsx_d_VD1cSQHOMXk.js (ENTRY POINT)== -export const d_wKNFJEIQVUA = ()=>console.log('thing'); +export const d_VD1cSQHOMXk = ()=>console.log('thing'); export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"6BAmBY,IAAI,QAAQ,GAAG,CAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"6BAmBY,IAAI,QAAQ,GAAG,CAAC\"}") /* { - "origin": "test.tsx", - "name": "d_wKNFJEIQVUA", + "origin": "src/test.tsx", + "name": "d_VD1cSQHOMXk", "entry": null, "displayName": "test.tsx_d", - "hash": "wKNFJEIQVUA", - "canonicalFilename": "test.tsx_d_wKNFJEIQVUA", - "path": "", + "hash": "VD1cSQHOMXk", + "canonicalFilename": "test.tsx_d_VD1cSQHOMXk", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -63,12 +63,44 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Greeter_component_1_krCndSwhX4U.js (ENTRY POINT)== +============================= src/test.tsx_Greeter_component_ePjmTcgQ0IY.js (ENTRY POINT)== + +import { qrl } from "@builder.io/qwik"; +export const Greeter_component_ePjmTcgQ0IY = ()=>{ + const stuff = useStore(); + return /*#__PURE__*/ qrl(()=>import("./test.tsx_Greeter_component_1_6yuFsZC7ct4"), "Greeter_component_1_6yuFsZC7ct4", [ + stuff + ]); +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";6CAIkC;IAC9B,MAAM,QAAQ;IACd;;;AAWJ\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Greeter_component_ePjmTcgQ0IY", + "entry": null, + "displayName": "test.tsx_Greeter_component", + "hash": "ePjmTcgQ0IY", + "canonicalFilename": "test.tsx_Greeter_component_ePjmTcgQ0IY", + "path": "src", + "extension": "js", + "parent": null, + "ctxKind": "function", + "ctxName": "component$", + "captures": false, + "loc": [ + 117, + 417 + ] +} +*/ +============================= src/test.tsx_Greeter_component_1_6yuFsZC7ct4.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { hola } from "sdfds"; -export const Greeter_component_1_krCndSwhX4U = ()=>{ +export const Greeter_component_1_6yuFsZC7ct4 = ()=>{ const [stuff] = useLexicalScope(); return /*#__PURE__*/ _jsxQ("div", { class: { @@ -76,23 +108,23 @@ export const Greeter_component_1_krCndSwhX4U = ()=>{ 'bar': stuff.condition, 'baz': hola ? 'true' : 'false' } - }, null, null, 3, "u6_0"); + }, null, null, 3, "oJ_0"); }; export { _hW } from "@builder.io/qwik"; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;+CAMa;;IACL,qBACI,MAAC;QACG,OAAO;YACH,OAAO;YACP,OAAO,MAAM,SAAS;YACtB,OAAO,OAAO,SAAS;QAC3B\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;+CAMa;;IACL,qBACI,MAAC;QACG,OAAO;YACH,OAAO;YACP,OAAO,MAAM,SAAS;YACtB,OAAO,OAAO,SAAS;QAC3B\"}") /* { - "origin": "test.tsx", - "name": "Greeter_component_1_krCndSwhX4U", + "origin": "src/test.tsx", + "name": "Greeter_component_1_6yuFsZC7ct4", "entry": null, "displayName": "test.tsx_Greeter_component_1", - "hash": "krCndSwhX4U", - "canonicalFilename": "test.tsx_Greeter_component_1_krCndSwhX4U", - "path": "", + "hash": "6yuFsZC7ct4", + "canonicalFilename": "test.tsx_Greeter_component_1_6yuFsZC7ct4", + "path": "src", "extension": "js", - "parent": "Greeter_component_n7HuG2hhU0Q", + "parent": "Greeter_component_ePjmTcgQ0IY", "ctxKind": "function", "ctxName": "$", "captures": true, @@ -102,38 +134,6 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Greeter_component_n7HuG2hhU0Q.js (ENTRY POINT)== - -import { qrl } from "@builder.io/qwik"; -export const Greeter_component_n7HuG2hhU0Q = ()=>{ - const stuff = useStore(); - return /*#__PURE__*/ qrl(()=>import("./test.tsx_Greeter_component_1_krCndSwhX4U"), "Greeter_component_1_krCndSwhX4U", [ - stuff - ]); -}; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";6CAIkC;IAC9B,MAAM,QAAQ;IACd;;;AAWJ\"}") -/* -{ - "origin": "test.tsx", - "name": "Greeter_component_n7HuG2hhU0Q", - "entry": null, - "displayName": "test.tsx_Greeter_component", - "hash": "n7HuG2hhU0Q", - "canonicalFilename": "test.tsx_Greeter_component_n7HuG2hhU0Q", - "path": "", - "extension": "js", - "parent": null, - "ctxKind": "function", - "ctxName": "component$", - "captures": false, - "loc": [ - 117, - 417 - ] -} -*/ == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_476.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_476.snap index 5a2cafe14cc..d62ae738f21 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_476.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_476.snap @@ -23,7 +23,7 @@ export const Root = () => { ); }; -============================= test.tsx == +============================= src/test.tsx == import { Counter } from "./counter.tsx"; export const Root = ()=>{ @@ -39,7 +39,7 @@ export const Root = ()=>{ }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"AACA,SAAS,OAAO,QAAQ,gBAAgB;AAExC,OAAO,MAAM,OAAO;IAChB,QACK,KAAK;YACF,CAAC,KAAK;gBACF,CAAC,KAAK,QAAQ,SAAU;gBACxB,CAAC,MAAM,cAAc,EAAE,MAAM;YACjC,EAAE,KAAK;YACP,CAAC,KAAK;gBACF,CAAC,QAAQ,SAAS,IAAK;YAC3B,EAAE,KAAK;QACX,EAAE;AAEV,EAAE\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"AACA,SAAS,OAAO,QAAQ,gBAAgB;AAExC,OAAO,MAAM,OAAO;IAChB,QACK,KAAK;YACF,CAAC,KAAK;gBACF,CAAC,KAAK,QAAQ,SAAU;gBACxB,CAAC,MAAM,cAAc,EAAE,MAAM;YACjC,EAAE,KAAK;YACP,CAAC,KAAK;gBACF,CAAC,QAAQ,SAAS,IAAK;YAC3B,EAAE,KAAK;QACX,EAAE;AAEV,EAAE\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_5008.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_5008.snap index 4e7f69fd8ac..7b2fbc0dab4 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_5008.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_5008.snap @@ -24,15 +24,7 @@ snapshot_kind: text ); }); -============================= test.js == - -import { componentQrl } from "@builder.io/qwik"; -import { qrl } from "@builder.io/qwik"; -export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_LUXeXe0DQrg"), "test_component_LUXeXe0DQrg")); - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGQ,6BAAe,mHAaZ\"}") -============================= test.tsx_test_component_LUXeXe0DQrg.js (ENTRY POINT)== +============================= src/test.tsx_test_component_r7Fl19tSLhk.js (ENTRY POINT)== import { Fragment as _Fragment } from "@builder.io/qwik/jsx-runtime"; import { _jsxC } from "@builder.io/qwik"; @@ -40,7 +32,7 @@ import { _jsxQ } from "@builder.io/qwik"; import { _wrapSignal } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; import { useStore } from "@builder.io/qwik"; -export const test_component_LUXeXe0DQrg = ()=>{ +export const test_component_r7Fl19tSLhk = ()=>{ const store = useStore([ { value: 0 @@ -49,7 +41,7 @@ export const test_component_LUXeXe0DQrg = ()=>{ return /*#__PURE__*/ _jsxC(_Fragment, { children: [ /*#__PURE__*/ _jsxQ("button", null, { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_Fragment_button_onClick_eF3QEzgQWcY"), "test_component_Fragment_button_onClick_eF3QEzgQWcY", [ + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_Fragment_button_onClick_93KnhrzhnFI"), "test_component_Fragment_button_onClick_93KnhrzhnFI", [ store ]) }, "+1", 3, null), @@ -64,20 +56,20 @@ export const test_component_LUXeXe0DQrg = ()=>{ _wrapSignal(v, "value") ], 1, "arrow_" + idx)) ] - }, 1, "u6_0"); + }, 1, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;0CAGkC;IAC1B,MAAM,QAAQ,SAAS;QAAC;YAAE,OAAO;QAAE;KAAE;IACrC,qBACI;;0BACA,MAAC;gBAAO,QAAQ;;;eAA0B;YACzC,MAAM,GAAG,CAAC,SAAU,CAAC,EAAE,GAAG;gBACvB,qBAAO,MAAC;oBAAsB;gCAAW;sBAAxB,QAAQ;YAC7B;YACC,MAAM,GAAG,CAAC,CAAC,GAAG,oBACX,MAAC;oBAAyB;gCAAQ;sBAAxB,WAAW;;;AAI7B\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;;;;0CAGkC;IAC1B,MAAM,QAAQ,SAAS;QAAC;YAAE,OAAO;QAAE;KAAE;IACrC,qBACI;;0BACA,MAAC;gBAAO,QAAQ;;;eAA0B;YACzC,MAAM,GAAG,CAAC,SAAU,CAAC,EAAE,GAAG;gBACvB,qBAAO,MAAC;oBAAsB;gCAAW;sBAAxB,QAAQ;YAC7B;YACC,MAAM,GAAG,CAAC,CAAC,GAAG,oBACX,MAAC;oBAAyB;gCAAQ;sBAAxB,WAAW;;;AAI7B\"}") /* { - "origin": "test.tsx", - "name": "test_component_LUXeXe0DQrg", + "origin": "src/test.tsx", + "name": "test_component_r7Fl19tSLhk", "entry": null, "displayName": "test.tsx_test_component", - "hash": "LUXeXe0DQrg", - "canonicalFilename": "test.tsx_test_component_LUXeXe0DQrg", - "path": "", + "hash": "r7Fl19tSLhk", + "canonicalFilename": "test.tsx_test_component_r7Fl19tSLhk", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", @@ -89,27 +81,27 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_test_component_Fragment_button_onClick_eF3QEzgQWcY.js (ENTRY POINT)== +============================= src/test.tsx_test_component_Fragment_button_onClick_93KnhrzhnFI.js (ENTRY POINT)== import { useLexicalScope } from "@builder.io/qwik"; -export const test_component_Fragment_button_onClick_eF3QEzgQWcY = ()=>{ +export const test_component_Fragment_button_onClick_93KnhrzhnFI = ()=>{ const [store] = useLexicalScope(); return store[0].value++; }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";kEAO8B;;WAAM,KAAK,CAAC,EAAE,CAAC,KAAK\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";kEAO8B;;WAAM,KAAK,CAAC,EAAE,CAAC,KAAK\"}") /* { - "origin": "test.tsx", - "name": "test_component_Fragment_button_onClick_eF3QEzgQWcY", + "origin": "src/test.tsx", + "name": "test_component_Fragment_button_onClick_93KnhrzhnFI", "entry": null, "displayName": "test.tsx_test_component_Fragment_button_onClick", - "hash": "eF3QEzgQWcY", - "canonicalFilename": "test.tsx_test_component_Fragment_button_onClick_eF3QEzgQWcY", - "path": "", + "hash": "93KnhrzhnFI", + "canonicalFilename": "test.tsx_test_component_Fragment_button_onClick_93KnhrzhnFI", + "path": "src", "extension": "js", - "parent": "test_component_LUXeXe0DQrg", + "parent": "test_component_r7Fl19tSLhk", "ctxKind": "eventHandler", "ctxName": "onClick$", "captures": true, @@ -119,6 +111,14 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ +============================= src/test.js == + +import { componentQrl } from "@builder.io/qwik"; +import { qrl } from "@builder.io/qwik"; +export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_r7Fl19tSLhk"), "test_component_r7Fl19tSLhk")); + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGQ,6BAAe,mHAaZ\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_964.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_964.snap index 8cc229536cf..77fba441dcf 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_964.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__issue_964.snap @@ -17,35 +17,35 @@ export const App = component$(() => { return

Hello Qwik

; }); -============================= test.js == +============================= src/test.js == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_ckEPmXZlub0"), "App_component_ckEPmXZlub0")); +export const App = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_App_component_F6JpluHHZ5A"), "App_component_F6JpluHHZ5A")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAMhB\"}") -============================= test.tsx_App_component_ckEPmXZlub0.js (ENTRY POINT)== +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAGA,OAAO,MAAM,oBAAM,iHAMhB\"}") +============================= src/test.tsx_App_component_F6JpluHHZ5A.js (ENTRY POINT)== import { _jsxQ } from "@builder.io/qwik"; -export const App_component_ckEPmXZlub0 = ()=>{ +export const App_component_F6JpluHHZ5A = ()=>{ console.log(function*(lo, t) { console.log((yield (yield lo)(t.href).then((r)=>r.json()))); }); - return /*#__PURE__*/ _jsxQ("p", null, null, "Hello Qwik", 3, "u6_0"); + return /*#__PURE__*/ _jsxQ("p", null, null, "Hello Qwik", 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAG8B;IAC1B,QAAQ,GAAG,CAAC,UAAU,EAAO,EAAE,CAAM;QACrC,QAAQ,GAAG,CAAC,CAAA,MAAM,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,IAAM,EAAE,IAAI,GAAE;IACzD;IAEA,qBAAO,MAAC,iBAAE;AACd\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";yCAG8B;IAC1B,QAAQ,GAAG,CAAC,UAAU,EAAO,EAAE,CAAM;QACrC,QAAQ,GAAG,CAAC,CAAA,MAAM,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,IAAM,EAAE,IAAI,GAAE;IACzD;IAEA,qBAAO,MAAC,iBAAE;AACd\"}") /* { - "origin": "test.tsx", - "name": "App_component_ckEPmXZlub0", + "origin": "src/test.tsx", + "name": "App_component_F6JpluHHZ5A", "entry": null, "displayName": "test.tsx_App_component", - "hash": "ckEPmXZlub0", - "canonicalFilename": "test.tsx_App_component_ckEPmXZlub0", - "path": "", + "hash": "F6JpluHHZ5A", + "canonicalFilename": "test.tsx_App_component_F6JpluHHZ5A", + "path": "src", "extension": "js", "parent": null, "ctxKind": "function", diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__lib_mode_fn_signal.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__lib_mode_fn_signal.snap index 5920e5ae095..ecaab5cd817 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__lib_mode_fn_signal.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__lib_mode_fn_signal.snap @@ -21,12 +21,42 @@ export const Counter = component$(() => { ); }); -============================= test.tsx_Counter_component_zTmRHlL09Gg.ts (ENTRY POINT)== +============================= src/test.tsx_Counter_component_div_p_button_onClick_1jMxlL7je0A.ts (ENTRY POINT)== + +import { useLexicalScope } from "@builder.io/qwik"; +export const Counter_component_div_p_button_onClick_1jMxlL7je0A = ()=>{ + const [count] = useLexicalScope(); + return count.value++; +}; + + +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";kEAS0B;;WAAM,MAAM,KAAK\"}") +/* +{ + "origin": "src/test.tsx", + "name": "Counter_component_div_p_button_onClick_1jMxlL7je0A", + "entry": null, + "displayName": "test.tsx_Counter_component_div_p_button_onClick", + "hash": "1jMxlL7je0A", + "canonicalFilename": "test.tsx_Counter_component_div_p_button_onClick_1jMxlL7je0A", + "path": "src", + "extension": "ts", + "parent": "Counter_component_Ej6kWAZLDGU", + "ctxKind": "eventHandler", + "ctxName": "onClick$", + "captures": true, + "loc": [ + 217, + 236 + ] +} +*/ +============================= src/test.tsx_Counter_component_Ej6kWAZLDGU.ts (ENTRY POINT)== import { _fnSignal } from "@builder.io/qwik"; import { _jsxQ } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Counter_component_zTmRHlL09Gg = ()=>{ +export const Counter_component_Ej6kWAZLDGU = ()=>{ const count = useSignal(0); return /*#__PURE__*/ _jsxQ("div", null, null, [ /*#__PURE__*/ _jsxQ("p", null, null, [ @@ -36,24 +66,24 @@ export const Counter_component_zTmRHlL09Gg = ()=>{ ], "p0.value") ], 3, null), /*#__PURE__*/ _jsxQ("p", null, null, /*#__PURE__*/ _jsxQ("button", null, { - onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Counter_component_div_p_button_onClick_Kqq00U8qaIM"), "Counter_component_div_p_button_onClick_Kqq00U8qaIM", [ + onClick$: /*#__PURE__*/ qrl(()=>import("./test.tsx_Counter_component_div_p_button_onClick_1jMxlL7je0A"), "Counter_component_div_p_button_onClick_1jMxlL7je0A", [ count ]) }, "Increment", 3, null), 3, null) - ], 3, "u6_0"); + ], 3, "oJ_0"); }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;6CAEkC;IAChC,MAAM,QAAQ,UAAU;IAExB,qBACE,MAAC;sBACC,MAAC;YAAE;4BAAQ,GAAM,KAAK;;;;sBACtB,MAAC,+BACC,MAAC;YAAO,QAAQ;;;WAAuB;;AAI/C\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;;6CAEkC;IAChC,MAAM,QAAQ,UAAU;IAExB,qBACE,MAAC;sBACC,MAAC;YAAE;4BAAQ,GAAM,KAAK;;;;sBACtB,MAAC,+BACC,MAAC;YAAO,QAAQ;;;WAAuB;;AAI/C\"}") /* { - "origin": "test.tsx", - "name": "Counter_component_zTmRHlL09Gg", + "origin": "src/test.tsx", + "name": "Counter_component_Ej6kWAZLDGU", "entry": null, "displayName": "test.tsx_Counter_component", - "hash": "zTmRHlL09Gg", - "canonicalFilename": "test.tsx_Counter_component_zTmRHlL09Gg", - "path": "", + "hash": "Ej6kWAZLDGU", + "canonicalFilename": "test.tsx_Counter_component_Ej6kWAZLDGU", + "path": "src", "extension": "ts", "parent": null, "ctxKind": "function", @@ -65,44 +95,14 @@ Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\" ] } */ -============================= test.tsx_Counter_component_div_p_button_onClick_Kqq00U8qaIM.ts (ENTRY POINT)== - -import { useLexicalScope } from "@builder.io/qwik"; -export const Counter_component_div_p_button_onClick_Kqq00U8qaIM = ()=>{ - const [count] = useLexicalScope(); - return count.value++; -}; - - -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";kEAS0B;;WAAM,MAAM,KAAK\"}") -/* -{ - "origin": "test.tsx", - "name": "Counter_component_div_p_button_onClick_Kqq00U8qaIM", - "entry": null, - "displayName": "test.tsx_Counter_component_div_p_button_onClick", - "hash": "Kqq00U8qaIM", - "canonicalFilename": "test.tsx_Counter_component_div_p_button_onClick_Kqq00U8qaIM", - "path": "", - "extension": "ts", - "parent": "Counter_component_zTmRHlL09Gg", - "ctxKind": "eventHandler", - "ctxName": "onClick$", - "captures": true, - "loc": [ - 217, - 236 - ] -} -*/ -============================= test.ts == +============================= src/test.ts == import { componentQrl } from "@builder.io/qwik"; import { qrl } from "@builder.io/qwik"; -export const Counter = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Counter_component_zTmRHlL09Gg"), "Counter_component_zTmRHlL09Gg")); +export const Counter = /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_Counter_component_Ej6kWAZLDGU"), "Counter_component_Ej6kWAZLDGU")); -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,OAAO,MAAM,wBAAU,yHAWpB\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\";;AAEA,OAAO,MAAM,wBAAU,yHAWpB\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__special_jsx.snap b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__special_jsx.snap index 18e3f6fc11d..a36e7563d2d 100644 --- a/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__special_jsx.snap +++ b/packages/qwik/src/optimizer/core/src/snapshots/qwik_core__test__special_jsx.snap @@ -15,7 +15,7 @@ export const App = () => { return jsx('div', props, 'Hello Qwik'); } -============================= test.tsx == +============================= src/test.tsx == // don't transpile jsx with non-plain-object props import { jsx } from '@builder.io/qwik'; @@ -25,7 +25,7 @@ export const App = ()=>{ }; -Some("{\"version\":3,\"sources\":[\"test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"AACA,kDAAkD;AAClD,SAAS,GAAG,QAAQ,mBAAmB;AAEvC,OAAO,MAAM,MAAM;IACf,MAAM,QAAQ,CAAC;IACf,OAAO,IAAI,OAAO,OAAO;AAC7B,EAAC\"}") +Some("{\"version\":3,\"sources\":[\"src/test.tsx\"],\"sourceRoot\":\"/user/qwik\",\"names\":[],\"mappings\":\"AACA,kDAAkD;AAClD,SAAS,GAAG,QAAQ,mBAAmB;AAEvC,OAAO,MAAM,MAAM;IACf,MAAM,QAAQ,CAAC;IACf,OAAO,IAAI,OAAO,OAAO;AAC7B,EAAC\"}") == DIAGNOSTICS == [] diff --git a/packages/qwik/src/optimizer/core/src/test.rs b/packages/qwik/src/optimizer/core/src/test.rs index 2e5765fdced..c3089aefdc6 100644 --- a/packages/qwik/src/optimizer/core/src/test.rs +++ b/packages/qwik/src/optimizer/core/src/test.rs @@ -3653,11 +3653,11 @@ struct TestInput { impl TestInput { pub fn default() -> Self { Self { - filename: "test.tsx".to_string(), + filename: "src/test.tsx".to_string(), dev_path: None, - src_dir: "/user/qwik/src/".to_string(), + src_dir: "".to_string(), root_dir: Some("/user/qwik".to_string()), - code: "/user/qwik/src/".to_string(), + code: "".to_string(), manual_chunks: None, entry_strategy: EntryStrategy::Segment, minify: MinifyMode::Simplify,