From 206819637742e0e09ede8d4f062889f72e668066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Fri, 24 Jun 2022 15:50:43 +0200 Subject: [PATCH] [IMP] compiler: generate templates in strict mode Before this commit, generated template functions were not using strict mode. This may be a bad idea, since strict mode could be more performant in some cases. --- src/compiler/code_generator.ts | 5 +- tests/__snapshots__/reactivity.test.ts.snap | 18 ++ tests/app/__snapshots__/app.test.ts.snap | 4 + .../__snapshots__/attributes.test.ts.snap | 58 +++++++ .../__snapshots__/comments.test.ts.snap | 3 + .../__snapshots__/event_handling.test.ts.snap | 33 ++++ .../compiler/__snapshots__/misc.test.ts.snap | 6 + .../__snapshots__/qweb_memory.test.ts.snap | 1 + .../simple_templates.test.ts.snap | 29 ++++ tests/compiler/__snapshots__/svg.test.ts.snap | 9 + .../__snapshots__/t_call.test.ts.snap | 62 +++++++ .../__snapshots__/t_debug_log.test.ts.snap | 4 + .../compiler/__snapshots__/t_esc.test.ts.snap | 12 ++ .../__snapshots__/t_foreach.test.ts.snap | 18 ++ .../compiler/__snapshots__/t_if.test.ts.snap | 26 +++ .../compiler/__snapshots__/t_key.test.ts.snap | 6 + .../compiler/__snapshots__/t_out.test.ts.snap | 30 ++++ .../compiler/__snapshots__/t_ref.test.ts.snap | 8 + .../compiler/__snapshots__/t_set.test.ts.snap | 29 ++++ .../compiler/__snapshots__/t_tag.test.ts.snap | 8 + .../__snapshots__/template_set.test.ts.snap | 7 + .../__snapshots__/translation.test.ts.snap | 5 + .../__snapshots__/white_space.test.ts.snap | 7 + .../__snapshots__/basics.test.ts.snap | 90 ++++++++++ .../__snapshots__/concurrency.test.ts.snap | 132 ++++++++++++++ .../__snapshots__/error_handling.test.ts.snap | 80 +++++++++ .../__snapshots__/event_handling.test.ts.snap | 9 + .../higher_order_component.test.ts.snap | 13 ++ .../__snapshots__/hooks.test.ts.snap | 28 +++ .../__snapshots__/lifecycle.test.ts.snap | 62 +++++++ .../__snapshots__/props.test.ts.snap | 22 +++ .../props_validation.test.ts.snap | 104 +++++++++++ .../__snapshots__/reactivity.test.ts.snap | 10 ++ .../__snapshots__/refs.test.ts.snap | 6 + .../__snapshots__/rendering.test.ts.snap | 22 +++ .../__snapshots__/slots.test.ts.snap | 163 ++++++++++++++++++ .../__snapshots__/style_class.test.ts.snap | 35 ++++ .../__snapshots__/t_call.test.ts.snap | 31 ++++ .../__snapshots__/t_call_block.test.ts.snap | 1 + .../__snapshots__/t_component.test.ts.snap | 16 ++ .../__snapshots__/t_foreach.test.ts.snap | 20 +++ .../__snapshots__/t_key.test.ts.snap | 14 ++ .../__snapshots__/t_model.test.ts.snap | 27 +++ .../__snapshots__/t_on.test.ts.snap | 24 +++ .../__snapshots__/t_props.test.ts.snap | 10 ++ .../__snapshots__/t_set.test.ts.snap | 19 ++ tests/misc/__snapshots__/portal.test.ts.snap | 42 +++++ 47 files changed, 1367 insertions(+), 1 deletion(-) diff --git a/src/compiler/code_generator.ts b/src/compiler/code_generator.ts index 6bb513ff..630f4248 100644 --- a/src/compiler/code_generator.ts +++ b/src/compiler/code_generator.ts @@ -265,7 +265,10 @@ export class CodeGenerator { tKeyExpr: null, }); // define blocks and utility functions - let mainCode = [` let { text, createBlock, list, multi, html, toggler, comment } = bdom;`]; + let mainCode = [ + ` "use strict";`, + `let { text, createBlock, list, multi, html, toggler, comment } = bdom;`, + ]; if (this.helpers.size) { mainCode.push(`let { ${[...this.helpers].join(", ")} } = helpers;`); } diff --git a/tests/__snapshots__/reactivity.test.ts.snap b/tests/__snapshots__/reactivity.test.ts.snap index 01a773a1..558d1cc4 100644 --- a/tests/__snapshots__/reactivity.test.ts.snap +++ b/tests/__snapshots__/reactivity.test.ts.snap @@ -49,6 +49,7 @@ exports[`Reactivity: useState concurrent renderings 3`] = ` exports[`Reactivity: useState destroyed component before being mounted is inactive 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; const comp1 = app.createComponent(\`Child\`, true, false, false, true); @@ -67,6 +68,7 @@ exports[`Reactivity: useState destroyed component before being mounted is inacti exports[`Reactivity: useState destroyed component before being mounted is inactive 2`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\`); @@ -81,6 +83,7 @@ exports[`Reactivity: useState destroyed component before being mounted is inacti exports[`Reactivity: useState destroyed component is inactive 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; const comp1 = app.createComponent(\`Child\`, true, false, false, true); @@ -99,6 +102,7 @@ exports[`Reactivity: useState destroyed component is inactive 1`] = ` exports[`Reactivity: useState destroyed component is inactive 2`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\`); @@ -113,6 +117,7 @@ exports[`Reactivity: useState destroyed component is inactive 2`] = ` exports[`Reactivity: useState one components can subscribe twice to same context 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -128,6 +133,7 @@ exports[`Reactivity: useState one components can subscribe twice to same context exports[`Reactivity: useState parent and children subscribed to same context 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; const comp1 = app.createComponent(\`Child\`, true, false, false, true); @@ -144,6 +150,7 @@ exports[`Reactivity: useState parent and children subscribed to same context 1`] exports[`Reactivity: useState parent and children subscribed to same context 2`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\`); @@ -221,6 +228,7 @@ exports[`Reactivity: useState several nodes on different level use same context exports[`Reactivity: useState two components are updated in parallel 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; const comp1 = app.createComponent(\`Child\`, true, false, false, true); const comp2 = app.createComponent(\`Child\`, true, false, false, true); @@ -238,6 +246,7 @@ exports[`Reactivity: useState two components are updated in parallel 1`] = ` exports[`Reactivity: useState two components are updated in parallel 2`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\`); @@ -252,6 +261,7 @@ exports[`Reactivity: useState two components are updated in parallel 2`] = ` exports[`Reactivity: useState two components can subscribe to same context 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; const comp1 = app.createComponent(\`Child\`, true, false, false, true); const comp2 = app.createComponent(\`Child\`, true, false, false, true); @@ -269,6 +279,7 @@ exports[`Reactivity: useState two components can subscribe to same context 1`] = exports[`Reactivity: useState two components can subscribe to same context 2`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\`); @@ -283,6 +294,7 @@ exports[`Reactivity: useState two components can subscribe to same context 2`] = exports[`Reactivity: useState two independent components on different levels are updated in parallel 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; const comp1 = app.createComponent(\`Child\`, true, false, false, true); const comp2 = app.createComponent(\`Parent\`, true, false, false, true); @@ -300,6 +312,7 @@ exports[`Reactivity: useState two independent components on different levels are exports[`Reactivity: useState two independent components on different levels are updated in parallel 2`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\`); @@ -314,6 +327,7 @@ exports[`Reactivity: useState two independent components on different levels are exports[`Reactivity: useState two independent components on different levels are updated in parallel 3`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; const comp1 = app.createComponent(\`Child\`, true, false, false, true); @@ -329,6 +343,7 @@ exports[`Reactivity: useState two independent components on different levels are exports[`Reactivity: useState useContext=useState hook is reactive, for one component 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -343,6 +358,7 @@ exports[`Reactivity: useState useContext=useState hook is reactive, for one comp exports[`Reactivity: useState useless atoms should be deleted 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, withKey } = helpers; const comp1 = app.createComponent(\`Quantity\`, true, false, false, false); @@ -369,6 +385,7 @@ exports[`Reactivity: useState useless atoms should be deleted 1`] = ` exports[`Reactivity: useState useless atoms should be deleted 2`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -383,6 +400,7 @@ exports[`Reactivity: useState useless atoms should be deleted 2`] = ` exports[`Reactivity: useState very simple use, with initial value 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); diff --git a/tests/app/__snapshots__/app.test.ts.snap b/tests/app/__snapshots__/app.test.ts.snap index 010c4172..31bf6979 100644 --- a/tests/app/__snapshots__/app.test.ts.snap +++ b/tests/app/__snapshots__/app.test.ts.snap @@ -3,6 +3,7 @@ exports[`app App supports env with getters/setters 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -18,6 +19,7 @@ exports[`app App supports env with getters/setters 1`] = ` exports[`app can configure an app with props 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -32,6 +34,7 @@ exports[`app can configure an app with props 1`] = ` exports[`app destroy remove the widget from the DOM 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -45,6 +48,7 @@ exports[`app destroy remove the widget from the DOM 1`] = ` exports[`app warnIfNoStaticProps works as expected 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); diff --git a/tests/compiler/__snapshots__/attributes.test.ts.snap b/tests/compiler/__snapshots__/attributes.test.ts.snap index f4e51d84..4cd65ea4 100644 --- a/tests/compiler/__snapshots__/attributes.test.ts.snap +++ b/tests/compiler/__snapshots__/attributes.test.ts.snap @@ -3,6 +3,7 @@ exports[`attributes changing a class with t-att-class (preexisting class 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -17,6 +18,7 @@ exports[`attributes changing a class with t-att-class (preexisting class 1`] = ` exports[`attributes changing a class with t-att-class 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -31,6 +33,7 @@ exports[`attributes changing a class with t-att-class 1`] = ` exports[`attributes changing an attribute with t-att- 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -45,6 +48,7 @@ exports[`attributes changing an attribute with t-att- 1`] = ` exports[`attributes class and t-att-class should combine together 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -59,6 +63,7 @@ exports[`attributes class and t-att-class should combine together 1`] = ` exports[`attributes class and t-attf-class with ternary operation 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -73,6 +78,7 @@ exports[`attributes class and t-attf-class with ternary operation 1`] = ` exports[`attributes dynamic attribute evaluating to 0 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -87,6 +93,7 @@ exports[`attributes dynamic attribute evaluating to 0 1`] = ` exports[`attributes dynamic attribute falsy variable 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -101,6 +108,7 @@ exports[`attributes dynamic attribute falsy variable 1`] = ` exports[`attributes dynamic attribute with a dash 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -115,6 +123,7 @@ exports[`attributes dynamic attribute with a dash 1`] = ` exports[`attributes dynamic attributes 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -129,6 +138,7 @@ exports[`attributes dynamic attributes 1`] = ` exports[`attributes dynamic attributes with backticks 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -143,6 +153,7 @@ exports[`attributes dynamic attributes with backticks 1`] = ` exports[`attributes dynamic class attribute 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -157,6 +168,7 @@ exports[`attributes dynamic class attribute 1`] = ` exports[`attributes dynamic class attribute evaluating to 0 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -171,6 +183,7 @@ exports[`attributes dynamic class attribute evaluating to 0 1`] = ` exports[`attributes dynamic class attribute that starts and ends with a space 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -185,6 +198,7 @@ exports[`attributes dynamic class attribute that starts and ends with a space 1` exports[`attributes dynamic class attribute which is only a space 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -199,6 +213,7 @@ exports[`attributes dynamic class attribute which is only a space 1`] = ` exports[`attributes dynamic class attribute with multiple consecutive spaces 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -213,6 +228,7 @@ exports[`attributes dynamic class attribute with multiple consecutive spaces 1`] exports[`attributes dynamic empty class attribute 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -227,6 +243,7 @@ exports[`attributes dynamic empty class attribute 1`] = ` exports[`attributes dynamic formatted attributes with a dash 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -241,6 +258,7 @@ exports[`attributes dynamic formatted attributes with a dash 1`] = ` exports[`attributes dynamic undefined class attribute 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -255,6 +273,7 @@ exports[`attributes dynamic undefined class attribute 1`] = ` exports[`attributes dynamic undefined generic attribute 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -269,6 +288,7 @@ exports[`attributes dynamic undefined generic attribute 1`] = ` exports[`attributes fixed variable 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -283,6 +303,7 @@ exports[`attributes fixed variable 1`] = ` exports[`attributes format expression 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -297,6 +318,7 @@ exports[`attributes format expression 1`] = ` exports[`attributes format literal 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -311,6 +333,7 @@ exports[`attributes format literal 1`] = ` exports[`attributes format multiple 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -325,6 +348,7 @@ exports[`attributes format multiple 1`] = ` exports[`attributes format value 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -339,6 +363,7 @@ exports[`attributes format value 1`] = ` exports[`attributes from object variables set previously 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; @@ -357,6 +382,7 @@ exports[`attributes from object variables set previously 1`] = ` exports[`attributes from variables set previously (no external node) 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; @@ -375,6 +401,7 @@ exports[`attributes from variables set previously (no external node) 1`] = ` exports[`attributes from variables set previously 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; @@ -393,6 +420,7 @@ exports[`attributes from variables set previously 1`] = ` exports[`attributes object 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -407,6 +435,7 @@ exports[`attributes object 1`] = ` exports[`attributes static attributes 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -420,6 +449,7 @@ exports[`attributes static attributes 1`] = ` exports[`attributes static attributes on void elements 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\\"Test\\"/\`); @@ -433,6 +463,7 @@ exports[`attributes static attributes on void elements 1`] = ` exports[`attributes static attributes with backticks 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -446,6 +477,7 @@ exports[`attributes static attributes with backticks 1`] = ` exports[`attributes static attributes with dashes 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -459,6 +491,7 @@ exports[`attributes static attributes with dashes 1`] = ` exports[`attributes string interpolation, alternate syntax 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -473,6 +506,7 @@ exports[`attributes string interpolation, alternate syntax 1`] = ` exports[`attributes t-att-class and class should combine together 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -487,6 +521,7 @@ exports[`attributes t-att-class and class should combine together 1`] = ` exports[`attributes t-att-class with multiple classes 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -501,6 +536,7 @@ exports[`attributes t-att-class with multiple classes 1`] = ` exports[`attributes t-att-class with multiple classes 2`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -515,6 +551,7 @@ exports[`attributes t-att-class with multiple classes 2`] = ` exports[`attributes t-att-class with multiple classes 3`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -529,6 +566,7 @@ exports[`attributes t-att-class with multiple classes 3`] = ` exports[`attributes t-att-class with multiple classes, some of which are duplicate 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -543,6 +581,7 @@ exports[`attributes t-att-class with multiple classes, some of which are duplica exports[`attributes t-att-class with object 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -557,6 +596,7 @@ exports[`attributes t-att-class with object 1`] = ` exports[`attributes t-att-class with object 2`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -571,6 +611,7 @@ exports[`attributes t-att-class with object 2`] = ` exports[`attributes t-att-class with object 3`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -585,6 +626,7 @@ exports[`attributes t-att-class with object 3`] = ` exports[`attributes t-attf-class 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -599,6 +641,7 @@ exports[`attributes t-attf-class 1`] = ` exports[`attributes t-attf-class should combine with class 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -613,6 +656,7 @@ exports[`attributes t-attf-class should combine with class 1`] = ` exports[`attributes t-attf-class with multiple classes 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -627,6 +671,7 @@ exports[`attributes t-attf-class with multiple classes 1`] = ` exports[`attributes t-attf-class with multiple classes separated by multiple spaces 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -641,6 +686,7 @@ exports[`attributes t-attf-class with multiple classes separated by multiple spa exports[`attributes tuple literal 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -655,6 +701,7 @@ exports[`attributes tuple literal 1`] = ` exports[`attributes tuple variable 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -669,6 +716,7 @@ exports[`attributes tuple variable 1`] = ` exports[`attributes two classes 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -682,6 +730,7 @@ exports[`attributes two classes 1`] = ` exports[`attributes two dynamic attributes 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -697,6 +746,7 @@ exports[`attributes two dynamic attributes 1`] = ` exports[`attributes updating classes (with obj notation) 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -711,6 +761,7 @@ exports[`attributes updating classes (with obj notation) 1`] = ` exports[`attributes various escapes 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
\`); @@ -727,6 +778,7 @@ exports[`attributes various escapes 1`] = ` exports[`attributes various escapes 2 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`
<
\`); @@ -740,6 +792,7 @@ exports[`attributes various escapes 2 1`] = ` exports[`special cases for some specific html attributes/properties input of type checkbox with t-att-indeterminate 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\`); @@ -754,6 +807,7 @@ exports[`special cases for some specific html attributes/properties input of typ exports[`special cases for some specific html attributes/properties input type= checkbox, with t-att-checked 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\`); @@ -768,6 +822,7 @@ exports[`special cases for some specific html attributes/properties input type= exports[`special cases for some specific html attributes/properties input with t-att-value 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\`); @@ -782,6 +837,7 @@ exports[`special cases for some specific html attributes/properties input with t exports[`special cases for some specific html attributes/properties select with t-att-value 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`\`); @@ -796,6 +852,7 @@ exports[`special cases for some specific html attributes/properties select with exports[`special cases for some specific html attributes/properties textarea with t-att-value 1`] = ` "function anonymous(app, bdom, helpers ) { + \\"use strict\\"; let { text, createBlock, list, multi, html, toggler, comment } = bdom; let block1 = createBlock(\`