diff --git a/src/helpers/extract-expressions.js b/src/helpers/extract-expressions.js index f90f62e3..10122fae 100644 --- a/src/helpers/extract-expressions.js +++ b/src/helpers/extract-expressions.js @@ -2,9 +2,9 @@ import isLiteralOrSpecial, { isLiteralOrSpecialNode } from "./is-literal-or-spec import last from "./last"; import * as t from "babel-types"; -function addClosureVar(expression, closureVars) { +function addClosureVar(expression, closureVars, defaultName) { const init = expression.node; - const id = expression.scope.generateUidIdentifierBasedOnNode(init); + const id = expression.scope.generateUidIdentifierBasedOnNode(init, defaultName); closureVars.push({ id, init }); return id; @@ -74,7 +74,7 @@ const expressionExtractor = { JSXSpreadAttribute(path) { const { closureVarsStack } = this; const argument = path.get("argument"); - const id = addClosureVar(argument, last(closureVarsStack)); + const id = addClosureVar(argument, last(closureVarsStack), "spread"); argument.replaceWith(id) }, @@ -89,7 +89,7 @@ const expressionExtractor = { // Only call defer JSX Children Expressions if (!path.parentPath.isJSXElement()) { - expression.replaceWith(addClosureVar(expression, closureVars)); + expression.replaceWith(addClosureVar(expression, closureVars, path.parentPath.node.name.name)); return; } @@ -105,7 +105,7 @@ const expressionExtractor = { // Exit early if there's nothing to defer. if (deferred.length === 0) { - expression.replaceWith(addClosureVar(expression, closureVars)); + expression.replaceWith(addClosureVar(expression, closureVars, "child")); return; } diff --git a/test/fixtures/attributes/jsx-element-computed-attr/expected.js b/test/fixtures/attributes/jsx-element-computed-attr/expected.js index cb445edc..3801e890 100644 --- a/test/fixtures/attributes/jsx-element-computed-attr/expected.js +++ b/test/fixtures/attributes/jsx-element-computed-attr/expected.js @@ -6,8 +6,8 @@ var _jsxWrapper = function _jsxWrapper(func, args) { }; }; -var _span$wrapper = function _span$wrapper(_ref) { - return elementVoid("span", null, null, "attr", _ref); +var _span$wrapper = function _span$wrapper(_attr) { + return elementVoid("span", null, null, "attr", _attr); }; function render() { diff --git a/test/fixtures/attributes/jsx-element-computed-child/expected.js b/test/fixtures/attributes/jsx-element-computed-child/expected.js index 58fdebf6..5b3f5c86 100644 --- a/test/fixtures/attributes/jsx-element-computed-child/expected.js +++ b/test/fixtures/attributes/jsx-element-computed-child/expected.js @@ -37,10 +37,10 @@ var _renderArbitrary = function _renderArbitrary(child) { } }; -var _span$wrapper = function _span$wrapper(_ref) { +var _span$wrapper = function _span$wrapper(_child) { elementOpen("span"); - _renderArbitrary(_ref); + _renderArbitrary(_child); return elementClose("span"); }; diff --git a/test/fixtures/attributes/nested-element-in-attribute/expected.js b/test/fixtures/attributes/nested-element-in-attribute/expected.js index 5be60b6f..8fafa5c4 100644 --- a/test/fixtures/attributes/nested-element-in-attribute/expected.js +++ b/test/fixtures/attributes/nested-element-in-attribute/expected.js @@ -38,9 +38,9 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _span$statics = ["key", ""], - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { elementOpen("li"); - elementOpen("span", _file$name, (_span$statics[1] = _file$name, _span$statics), "file", _file, "onclick", _ref); + elementOpen("span", _file$name, (_span$statics[1] = _file$name, _span$statics), "file", _file, "onclick", _onclick); _renderArbitrary(_file$name2); diff --git a/test/fixtures/call-expression-defer/wrapper/logical/expected.js b/test/fixtures/call-expression-defer/wrapper/logical/expected.js index 42616fce..9fc2cbc6 100644 --- a/test/fixtures/call-expression-defer/wrapper/logical/expected.js +++ b/test/fixtures/call-expression-defer/wrapper/logical/expected.js @@ -37,16 +37,16 @@ var _renderArbitrary = function _renderArbitrary(child) { } }; -var _div$wrapper = function _div$wrapper(_deferred, _b, _deferred2, _b2, _ref, _ref2, _deferred3, _b3, _deferred4, _b4, _deferred5, _b5, _deferred6, _b6) { +var _div$wrapper = function _div$wrapper(_deferred, _b, _deferred2, _b2, _child, _child2, _deferred3, _b3, _deferred4, _b4, _deferred5, _b5, _deferred6, _b6) { elementOpen("div"); _renderArbitrary(_b == 0 ? _deferred : _deferred()); _renderArbitrary(_b2 == 0 ? _deferred2 : _deferred2()); - _renderArbitrary(_ref); + _renderArbitrary(_child); - _renderArbitrary(_ref2); + _renderArbitrary(_child2); _renderArbitrary(_b3 == 0 ? _deferred3 : _deferred3()); diff --git a/test/fixtures/eager-expressions/non-root/expected.js b/test/fixtures/eager-expressions/non-root/expected.js index db00f990..70eec9e9 100644 --- a/test/fixtures/eager-expressions/non-root/expected.js +++ b/test/fixtures/eager-expressions/non-root/expected.js @@ -37,19 +37,19 @@ var _renderArbitrary = function _renderArbitrary(child) { } }; -var _test$wrapper = function _test$wrapper(_ref, _ref2, _ref3, _ref4, _ref5, _ref6) { - elementOpen("div", null, null, "attr", _ref); - elementOpen("div", null, null, "first", _ref2); +var _test$wrapper = function _test$wrapper(_attr, _first, _child, _child2, _second, _child3) { + elementOpen("div", null, null, "attr", _attr); + elementOpen("div", null, null, "first", _first); - _renderArbitrary(_ref3); + _renderArbitrary(_child); elementClose("div"); - _renderArbitrary(_ref4); + _renderArbitrary(_child2); - elementOpen("div", null, null, "second", _ref5); + elementOpen("div", null, null, "second", _second); - _renderArbitrary(_ref6); + _renderArbitrary(_child3); elementClose("div"); return elementClose("div"); diff --git a/test/fixtures/eager-expressions/root-nested-function/expected.js b/test/fixtures/eager-expressions/root-nested-function/expected.js index ba8af5ef..9063dccc 100644 --- a/test/fixtures/eager-expressions/root-nested-function/expected.js +++ b/test/fixtures/eager-expressions/root-nested-function/expected.js @@ -44,10 +44,10 @@ var _map$wrapper = function _map$wrapper(_i) { return elementClose("map"); }, - _div$wrapper = function _div$wrapper(_ref, _ref2) { - elementOpen("div", null, null, "first", _ref); + _div$wrapper = function _div$wrapper(_first, _child) { + elementOpen("div", null, null, "first", _first); - _renderArbitrary(_ref2); + _renderArbitrary(_child); return elementClose("div"); }; diff --git a/test/fixtures/expression-children/14/expected.js b/test/fixtures/expression-children/14/expected.js index 60b38724..94a73da5 100644 --- a/test/fixtures/expression-children/14/expected.js +++ b/test/fixtures/expression-children/14/expected.js @@ -37,10 +37,10 @@ var _renderArbitrary = function _renderArbitrary(child) { } }; -var _span$wrapper = function _span$wrapper(_i, _ref, _i2) { +var _span$wrapper = function _span$wrapper(_i, _child, _i2) { elementOpen("span", null, null, "attr", _i); - _renderArbitrary(_ref); + _renderArbitrary(_child); _renderArbitrary(_i2); diff --git a/test/fixtures/expression-children/9/expected.js b/test/fixtures/expression-children/9/expected.js index bc4627d5..369bd47e 100644 --- a/test/fixtures/expression-children/9/expected.js +++ b/test/fixtures/expression-children/9/expected.js @@ -37,17 +37,17 @@ var _renderArbitrary = function _renderArbitrary(child) { } }; -var _one$wrapper = function _one$wrapper(_ref) { +var _one$wrapper = function _one$wrapper(_child) { elementOpen("one"); - _renderArbitrary(_ref); + _renderArbitrary(_child); return elementClose("one"); }, - _two$wrapper = function _two$wrapper(_ref2) { + _two$wrapper = function _two$wrapper(_child2) { elementOpen("two"); - _renderArbitrary(_ref2); + _renderArbitrary(_child2); return elementClose("two"); }; diff --git a/test/fixtures/fast-root/comments/disable-inline/child-funciton-level/expected.js b/test/fixtures/fast-root/comments/disable-inline/child-funciton-level/expected.js index 86d21518..abae3c1c 100644 --- a/test/fixtures/fast-root/comments/disable-inline/child-funciton-level/expected.js +++ b/test/fixtures/fast-root/comments/disable-inline/child-funciton-level/expected.js @@ -38,8 +38,8 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _li$statics = ["key", ""], - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { - elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _ref); + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { + elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _onclick); _renderArbitrary(_file$name2); diff --git a/test/fixtures/fast-root/comments/disable-inline/child-level/expected.js b/test/fixtures/fast-root/comments/disable-inline/child-level/expected.js index cb2caa5e..2a695b0b 100644 --- a/test/fixtures/fast-root/comments/disable-inline/child-level/expected.js +++ b/test/fixtures/fast-root/comments/disable-inline/child-level/expected.js @@ -38,8 +38,8 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _li$statics = ["key", ""], - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { - elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _ref); + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { + elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _onclick); _renderArbitrary(_file$name2); diff --git a/test/fixtures/fast-root/comments/disable-inline/function-level/expected.js b/test/fixtures/fast-root/comments/disable-inline/function-level/expected.js index 4200f9af..85261f04 100644 --- a/test/fixtures/fast-root/comments/disable-inline/function-level/expected.js +++ b/test/fixtures/fast-root/comments/disable-inline/function-level/expected.js @@ -38,8 +38,8 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _li$statics = ["key", ""], - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { - elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _ref); + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { + elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _onclick); _renderArbitrary(_file$name2); diff --git a/test/fixtures/fast-root/comments/disable-inline/root-level/expected.js b/test/fixtures/fast-root/comments/disable-inline/root-level/expected.js index eb2926bc..9bc39e41 100644 --- a/test/fixtures/fast-root/comments/disable-inline/root-level/expected.js +++ b/test/fixtures/fast-root/comments/disable-inline/root-level/expected.js @@ -38,8 +38,8 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _li$statics = ["key", ""], - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { - elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _ref); + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { + elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _onclick); _renderArbitrary(_file$name2); diff --git a/test/fixtures/fast-root/comments/enable-inline/no-comment/expected.js b/test/fixtures/fast-root/comments/enable-inline/no-comment/expected.js index 78286cb4..10f7476a 100644 --- a/test/fixtures/fast-root/comments/enable-inline/no-comment/expected.js +++ b/test/fixtures/fast-root/comments/enable-inline/no-comment/expected.js @@ -38,8 +38,8 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _li$statics = ["key", ""], - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { - elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _ref); + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { + elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _onclick); _renderArbitrary(_file$name2); diff --git a/test/fixtures/fast-root/true/attribute-nested-attribute/expected.js b/test/fixtures/fast-root/true/attribute-nested-attribute/expected.js index 3f387094..893eb595 100644 --- a/test/fixtures/fast-root/true/attribute-nested-attribute/expected.js +++ b/test/fixtures/fast-root/true/attribute-nested-attribute/expected.js @@ -38,15 +38,15 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _span$statics = ["key", ""], - _span$wrapper = function _span$wrapper(_file$name3, _file2, _ref2, _file$name4) { - elementOpen("span", _file$name3, (_span$statics[1] = _file$name3, _span$statics), "file", _file2, "onclick", _ref2); + _span$wrapper = function _span$wrapper(_file$name3, _file2, _onclick2, _file$name4) { + elementOpen("span", _file$name3, (_span$statics[1] = _file$name3, _span$statics), "file", _file2, "onclick", _onclick2); _renderArbitrary(_file$name4); return elementClose("span"); }, - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { - elementOpen("li", null, null, "attr", _jsxWrapper(_span$wrapper, [_file$name, _file, _ref, _file$name2])); + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { + elementOpen("li", null, null, "attr", _jsxWrapper(_span$wrapper, [_file$name, _file, _onclick, _file$name2])); return elementClose("li"); }; diff --git a/test/fixtures/fast-root/true/attribute/expected.js b/test/fixtures/fast-root/true/attribute/expected.js index ffb337fc..188a092e 100644 --- a/test/fixtures/fast-root/true/attribute/expected.js +++ b/test/fixtures/fast-root/true/attribute/expected.js @@ -38,8 +38,8 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _li$statics = ["key", ""], - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { - elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _ref); + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { + elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _onclick); _renderArbitrary(_file$name2); diff --git a/test/fixtures/fast-root/true/nested-attribute-nested-attribute/expected.js b/test/fixtures/fast-root/true/nested-attribute-nested-attribute/expected.js index 95ac4f31..5a87f506 100644 --- a/test/fixtures/fast-root/true/nested-attribute-nested-attribute/expected.js +++ b/test/fixtures/fast-root/true/nested-attribute-nested-attribute/expected.js @@ -38,17 +38,17 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _span$statics = ["key", ""], - _span$wrapper = function _span$wrapper(_file$name3, _file2, _ref2, _file$name4) { + _span$wrapper = function _span$wrapper(_file$name3, _file2, _onclick2, _file$name4) { elementOpen("span"); - elementOpen("span", _file$name3, (_span$statics[1] = _file$name3, _span$statics), "file", _file2, "onclick", _ref2); + elementOpen("span", _file$name3, (_span$statics[1] = _file$name3, _span$statics), "file", _file2, "onclick", _onclick2); _renderArbitrary(_file$name4); elementClose("span"); return elementClose("span"); }, - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { - elementOpen("li", null, null, "attr", _jsxWrapper(_span$wrapper, [_file$name, _file, _ref, _file$name2])); + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { + elementOpen("li", null, null, "attr", _jsxWrapper(_span$wrapper, [_file$name, _file, _onclick, _file$name2])); return elementClose("li"); }; diff --git a/test/fixtures/fast-root/true/nested-attribute/expected.js b/test/fixtures/fast-root/true/nested-attribute/expected.js index 5be60b6f..8fafa5c4 100644 --- a/test/fixtures/fast-root/true/nested-attribute/expected.js +++ b/test/fixtures/fast-root/true/nested-attribute/expected.js @@ -38,9 +38,9 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _span$statics = ["key", ""], - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { elementOpen("li"); - elementOpen("span", _file$name, (_span$statics[1] = _file$name, _span$statics), "file", _file, "onclick", _ref); + elementOpen("span", _file$name, (_span$statics[1] = _file$name, _span$statics), "file", _file, "onclick", _onclick); _renderArbitrary(_file$name2); diff --git a/test/fixtures/fast-root/true/secondary-element/expected.js b/test/fixtures/fast-root/true/secondary-element/expected.js index 4faf025f..2ae0e18f 100644 --- a/test/fixtures/fast-root/true/secondary-element/expected.js +++ b/test/fixtures/fast-root/true/secondary-element/expected.js @@ -45,8 +45,8 @@ var _ul$wrapper = function _ul$wrapper(_deferred, _args) { return elementClose("ul"); }, _li$statics = ["key", ""], - _li$wrapper = function _li$wrapper(_file$name, _file, _ref, _file$name2) { - elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _ref); + _li$wrapper = function _li$wrapper(_file$name, _file, _onclick, _file$name2) { + elementOpen("li", _file$name, (_li$statics[1] = _file$name, _li$statics), "file", _file, "onclick", _onclick); _renderArbitrary(_file$name2); diff --git a/test/fixtures/inline-expressions/eager-children/expected.js b/test/fixtures/inline-expressions/eager-children/expected.js index 7def00cd..6a8a9405 100644 --- a/test/fixtures/inline-expressions/eager-children/expected.js +++ b/test/fixtures/inline-expressions/eager-children/expected.js @@ -1,8 +1,8 @@ function render() { var i = 0; - var _ref = i++, - _ref2 = i++; + var _attr = i++, + _other = i++; elementOpen("root", null, null, "attr", i++); - elementVoid("div", null, null, "attr", _ref, "other", _ref2); + elementVoid("div", null, null, "attr", _attr, "other", _other); return elementClose("root"); } \ No newline at end of file diff --git a/test/fixtures/key/mutate/jsx-in-attribute-updates-key/expected.js b/test/fixtures/key/mutate/jsx-in-attribute-updates-key/expected.js index 02713dfa..fb25c980 100644 --- a/test/fixtures/key/mutate/jsx-in-attribute-updates-key/expected.js +++ b/test/fixtures/key/mutate/jsx-in-attribute-updates-key/expected.js @@ -6,14 +6,14 @@ var _jsxWrapper = function _jsxWrapper(func, args) { }; }; -var _div$wrapper = function _div$wrapper(_ref) { - return elementVoid("div", null, null, "attr", _ref); +var _div$wrapper = function _div$wrapper(_attr) { + return elementVoid("div", null, null, "attr", _attr); }, _div$statics = ["key", ""]; function render() { - var _attr, _div$key; + var _attr2, _div$key; - _attr = _jsxWrapper(_div$wrapper, [i++]); - return elementVoid("div", _div$key = i++, (_div$statics[1] = _div$key, _div$statics), "attr2", _attr); + _attr2 = _jsxWrapper(_div$wrapper, [i++]); + return elementVoid("div", _div$key = i++, (_div$statics[1] = _div$key, _div$statics), "attr2", _attr2); } \ No newline at end of file diff --git a/test/fixtures/key/mutate/spread-attributes-mutated-key/expected.js b/test/fixtures/key/mutate/spread-attributes-mutated-key/expected.js index 318c9e3e..91372428 100644 --- a/test/fixtures/key/mutate/spread-attributes-mutated-key/expected.js +++ b/test/fixtures/key/mutate/spread-attributes-mutated-key/expected.js @@ -25,4 +25,4 @@ function render() { elementOpenEnd("div"); return elementClose("div"); -} +} \ No newline at end of file diff --git a/test/fixtures/key/mutate/wrapper-other-attr-updates-key/expected.js b/test/fixtures/key/mutate/wrapper-other-attr-updates-key/expected.js index efdaf0e7..c4325e8b 100644 --- a/test/fixtures/key/mutate/wrapper-other-attr-updates-key/expected.js +++ b/test/fixtures/key/mutate/wrapper-other-attr-updates-key/expected.js @@ -38,9 +38,9 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _div$statics = ["key", ""], - _div$wrapper = function _div$wrapper(_ref, _ref2, _ref3) { - elementOpen("div", null, null, "attr", _ref); - elementVoid("div", _ref3, (_div$statics[1] = _ref3, _div$statics), "attr2", _ref2); + _div$wrapper = function _div$wrapper(_attr, _attr2, _key) { + elementOpen("div", null, null, "attr", _attr); + elementVoid("div", _key, (_div$statics[1] = _key, _div$statics), "attr2", _attr2); return elementClose("div"); }; diff --git a/test/fixtures/key/mutate/wrapper-spread-attribute-updates-key/expected.js b/test/fixtures/key/mutate/wrapper-spread-attribute-updates-key/expected.js index 1564dcf4..b4df3bad 100644 --- a/test/fixtures/key/mutate/wrapper-spread-attribute-updates-key/expected.js +++ b/test/fixtures/key/mutate/wrapper-spread-attribute-updates-key/expected.js @@ -38,9 +38,9 @@ var _renderArbitrary = function _renderArbitrary(child) { }; var _div$statics = ["key", ""], - _div$wrapper = function _div$wrapper(_ref, _obj, _ref2) { - elementOpen("div", null, null, "attr", _ref); - elementVoid("div", _ref2, (_div$statics[1] = _ref2, _div$statics), "spread", _obj); + _div$wrapper = function _div$wrapper(_attr, _obj, _key) { + elementOpen("div", null, null, "attr", _attr); + elementVoid("div", _key, (_div$statics[1] = _key, _div$statics), "spread", _obj); return elementClose("div"); }; diff --git a/test/fixtures/patch-root/module-source-import-specifier/expected.js b/test/fixtures/patch-root/module-source-import-specifier/expected.js index c3897952..9561566a 100644 --- a/test/fixtures/patch-root/module-source-import-specifier/expected.js +++ b/test/fixtures/patch-root/module-source-import-specifier/expected.js @@ -55,4 +55,4 @@ var todoItems = items.map(function (x) { _renderArbitrary(todoItems); return (0, _idomWrapper.elementClose)("div"); -}); +}); \ No newline at end of file diff --git a/test/fixtures/patch-root/module-source-import-wildcard/expected.js b/test/fixtures/patch-root/module-source-import-wildcard/expected.js index 2f9a8a02..5e583372 100644 --- a/test/fixtures/patch-root/module-source-import-wildcard/expected.js +++ b/test/fixtures/patch-root/module-source-import-wildcard/expected.js @@ -59,4 +59,4 @@ iDOM.patch(container, function () { _renderArbitrary(todoItems); return (0, _idomWrapper.elementClose)("div"); -}); +}); \ No newline at end of file diff --git a/test/fixtures/patch-root/object/expected.js b/test/fixtures/patch-root/object/expected.js index e8badac8..6e62475b 100644 --- a/test/fixtures/patch-root/object/expected.js +++ b/test/fixtures/patch-root/object/expected.js @@ -59,4 +59,4 @@ Component.prototype.template = function (data) { Component.prototype.render = function () { (0, _incrementalDom.patch)(this.element, this.template, this.data); -}; +}; \ No newline at end of file diff --git a/test/fixtures/patch-root/requires-root-node/expected.js b/test/fixtures/patch-root/requires-root-node/expected.js index 5a8eaa8f..2aa27575 100644 --- a/test/fixtures/patch-root/requires-root-node/expected.js +++ b/test/fixtures/patch-root/requires-root-node/expected.js @@ -22,4 +22,4 @@ function todoItems() { (0, _incrementalDom.patch)(container, function () { todoItems(); -}); +}); \ No newline at end of file diff --git a/test/fixtures/program/expression-children/expected.js b/test/fixtures/program/expression-children/expected.js index bc653c54..8c2aed6f 100644 --- a/test/fixtures/program/expression-children/expected.js +++ b/test/fixtures/program/expression-children/expected.js @@ -7,8 +7,8 @@ var _jsxWrapper = function _jsxWrapper(func, args) { }; var _div$statics = ["key", ""], - _div$wrapper = function _div$wrapper(_ref) { - elementOpen("div", _ref, (_div$statics[1] = _ref, _div$statics)); + _div$wrapper = function _div$wrapper(_key) { + elementOpen("div", _key, (_div$statics[1] = _key, _div$statics)); return elementClose("div"); }; diff --git a/test/fixtures/program/hoist/expected.js b/test/fixtures/program/hoist/expected.js index bc653c54..8c2aed6f 100644 --- a/test/fixtures/program/hoist/expected.js +++ b/test/fixtures/program/hoist/expected.js @@ -7,8 +7,8 @@ var _jsxWrapper = function _jsxWrapper(func, args) { }; var _div$statics = ["key", ""], - _div$wrapper = function _div$wrapper(_ref) { - elementOpen("div", _ref, (_div$statics[1] = _ref, _div$statics)); + _div$wrapper = function _div$wrapper(_key) { + elementOpen("div", _key, (_div$statics[1] = _key, _div$statics)); return elementClose("div"); }; diff --git a/test/fixtures/runtime/module/wrapper-eager/expected.js b/test/fixtures/runtime/module/wrapper-eager/expected.js index 68b6ca46..0be7720d 100644 --- a/test/fixtures/runtime/module/wrapper-eager/expected.js +++ b/test/fixtures/runtime/module/wrapper-eager/expected.js @@ -1,7 +1,7 @@ var _iDOM = require("iDOM"); -var _div$wrapper = function _div$wrapper(_ref) { - return elementVoid("div", null, null, "attr", _ref); +var _div$wrapper = function _div$wrapper(_attr) { + return elementVoid("div", null, null, "attr", _attr); }; function render() {