From ea76ccd05757f1bda9f6ea456f970ead0461e10c Mon Sep 17 00:00:00 2001
From: Michael Rawlings
Date: Wed, 18 Jan 2023 13:21:44 -0500
Subject: [PATCH] fix: text hydration (#126)
---
.sizes.json | 32 +++---
packages/runtime/src/dom/hydrate.ts | 2 +-
.../__snapshots__/html.expected/template.js | 3 +-
.../__snapshots__/html.expected/template.js | 3 +-
.../__snapshots__/html.expected/template.js | 3 +-
.../__snapshots__/html.expected/template.js | 5 +-
.../__snapshots__/html.expected/template.js | 8 +-
.../__snapshots__/html.expected/template.js | 7 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 7 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 2 +-
.../basic-chain/__snapshots__/ssr.expected.md | 8 +-
.../html.expected/components/my-button.js | 4 +-
.../html.expected/components/my-button.js | 6 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../html.expected/components/counter.js | 4 +-
.../__snapshots__/hydrate.expected.md | 10 +-
.../__snapshots__/ssr.expected.md | 14 +--
.../__snapshots__/hydrate.expected.md | 33 +++---
.../__snapshots__/ssr.expected.md | 22 ++--
.../server.ts | 14 +--
.../__snapshots__/hydrate.expected.md | 30 ++---
.../__snapshots__/ssr.expected.md | 20 ++--
.../basic-conditional-counter/server.ts | 9 +-
.../__snapshots__/html.expected/template.js | 5 +-
.../__snapshots__/hydrate.expected.md | 3 +-
.../__snapshots__/ssr.expected.md | 16 ++-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 22 ++--
.../__snapshots__/ssr.expected.md | 14 +--
.../__snapshots__/html.expected/template.js | 3 +-
.../__snapshots__/ssr.expected.md | 14 +--
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 2 +-
.../__snapshots__/ssr.expected.md | 8 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 22 ++--
.../__snapshots__/ssr.expected.md | 24 ++--
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 10 +-
.../__snapshots__/ssr.expected.md | 24 ++--
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 10 +-
.../__snapshots__/ssr.expected.md | 24 ++--
.../html.expected/components/comments.js | 10 +-
.../__snapshots__/ssr.expected.md | 108 +++++++++---------
.../html.expected/components/layout.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/ssr.expected.md | 16 +--
.../__snapshots__/html.expected/template.js | 5 +-
.../__snapshots__/html.expected/template.js | 8 +-
.../__snapshots__/html.expected/template.js | 8 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 8 +-
.../__snapshots__/html.expected/template.js | 6 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 22 ++--
.../__snapshots__/ssr.expected.md | 14 +--
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 22 ++--
.../__snapshots__/ssr.expected.md | 14 +--
.../__tests__/fixtures/body-content/server.ts | 6 +-
.../components/display-intersection.js | 4 +-
.../__snapshots__/html.expected/template.js | 2 +-
.../__snapshots__/ssr.expected.md | 14 +--
.../__snapshots__/html.expected/template.js | 4 +-
.../html.expected/components/child.js | 4 +-
.../__snapshots__/ssr.expected.md | 8 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/ssr.expected.md | 8 +-
.../__snapshots__/html.expected/other.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/ssr.expected.md | 8 +-
.../html.expected/components/other.js | 3 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/ssr.expected.md | 18 ++-
.../__snapshots__/html.expected/template.js | 7 +-
.../__snapshots__/ssr.expected.md | 18 ++-
.../html.expected/components/child.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/ssr.expected.md | 20 ++--
.../html.expected/components/child.js | 4 +-
.../__snapshots__/ssr.expected.md | 8 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../html.expected/components/child/index.js | 3 +-
.../__snapshots__/html.expected/hello.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 2 +-
.../__snapshots__/ssr.expected.md | 8 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 2 +-
.../__snapshots__/ssr.expected.md | 8 +-
.../html.expected/components/child.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 36 +++---
.../__snapshots__/ssr.expected.md | 32 +++---
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 18 +--
.../__snapshots__/html.expected/template.js | 6 +-
.../__snapshots__/html.expected/template.js | 2 +-
.../__snapshots__/hydrate.expected.md | 24 ++--
.../__snapshots__/ssr.expected.md | 10 +-
.../html.expected/components/child/index.js | 3 +-
.../__snapshots__/html.expected/template.js | 2 +-
.../__snapshots__/html.expected/template.js | 10 +-
.../__snapshots__/html.expected/template.js | 8 +-
.../__snapshots__/html.expected/template.js | 30 ++---
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../id-tag/__snapshots__/hydrate.expected.md | 4 +-
.../id-tag/__snapshots__/ssr.expected.md | 14 +--
.../__snapshots__/html.expected/template.js | 6 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 18 +--
.../__snapshots__/ssr.expected.md | 14 +--
.../__snapshots__/html.expected/template.js | 4 +-
.../let-tag/__snapshots__/hydrate.expected.md | 36 +++---
.../let-tag/__snapshots__/ssr.expected.md | 30 ++---
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 32 +++---
.../__snapshots__/ssr.expected.md | 20 ++--
.../__snapshots__/html.expected/template.js | 5 +-
.../__snapshots__/html.expected/template.js | 2 +-
.../__snapshots__/hydrate.expected.md | 6 +-
.../__snapshots__/ssr.expected.md | 10 +-
.../__snapshots__/html.expected/template.js | 2 +-
.../__snapshots__/hydrate.expected.md | 6 +-
.../__snapshots__/ssr.expected.md | 10 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 2 +-
.../__snapshots__/ssr.expected.md | 8 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/ssr.expected.md | 8 +-
.../__snapshots__/html.expected/template.js | 8 +-
.../__snapshots__/html.expected/template.js | 5 +-
.../__snapshots__/html.expected/template.js | 2 +-
.../__snapshots__/ssr.expected.md | 20 ++--
.../__snapshots__/html.expected/template.js | 2 +-
.../__snapshots__/ssr.expected.md | 18 +--
.../__snapshots__/html.expected/template.js | 2 +-
.../__snapshots__/ssr.expected.md | 18 +--
.../__snapshots__/html.expected/template.js | 3 +-
.../__snapshots__/ssr.expected.md | 20 ++--
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 46 ++++----
.../__snapshots__/ssr.expected.md | 44 +++----
.../__snapshots__/html.expected/template.js | 6 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 66 +++++------
.../__snapshots__/ssr.expected.md | 48 ++++----
.../__snapshots__/html.expected/template.js | 8 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 6 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 3 +-
.../update-html/__snapshots__/ssr.expected.md | 6 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/hydrate.expected.md | 3 +-
.../update-text/__snapshots__/ssr.expected.md | 6 +-
.../__snapshots__/html.expected/template.js | 4 +-
.../__snapshots__/html.expected/template.js | 3 +-
packages/translator/src/util/walks.ts | 108 +++++++++---------
packages/translator/src/util/writer.ts | 22 +++-
.../translator/src/visitors/placeholder.ts | 1 +
.../translator/src/visitors/tag/native-tag.ts | 4 +
packages/translator/src/visitors/text.ts | 19 ++-
177 files changed, 972 insertions(+), 982 deletions(-)
diff --git a/.sizes.json b/.sizes.json
index 668e809f6..4c47efd3e 100644
--- a/.sizes.json
+++ b/.sizes.json
@@ -7,9 +7,9 @@
{
"name": "*",
"total": {
- "min": 12300,
- "gzip": 5180,
- "brotli": 4738
+ "min": 12304,
+ "gzip": 5179,
+ "brotli": 4751
}
},
{
@@ -35,17 +35,17 @@
"user": {
"min": 207,
"gzip": 182,
- "brotli": 152
+ "brotli": 153
},
"runtime": {
- "min": 2635,
- "gzip": 1333,
- "brotli": 1191
+ "min": 2639,
+ "gzip": 1330,
+ "brotli": 1188
},
"total": {
- "min": 2842,
- "gzip": 1515,
- "brotli": 1343
+ "min": 2846,
+ "gzip": 1512,
+ "brotli": 1341
}
},
{
@@ -71,16 +71,16 @@
"user": {
"min": 943,
"gzip": 585,
- "brotli": 538
+ "brotli": 537
},
"runtime": {
- "min": 7966,
- "gzip": 3606,
- "brotli": 3279
+ "min": 7970,
+ "gzip": 3605,
+ "brotli": 3280
},
"total": {
- "min": 8909,
- "gzip": 4191,
+ "min": 8913,
+ "gzip": 4190,
"brotli": 3817
}
}
diff --git a/packages/runtime/src/dom/hydrate.ts b/packages/runtime/src/dom/hydrate.ts
index 29fce157c..00bd16981 100644
--- a/packages/runtime/src/dom/hydrate.ts
+++ b/packages/runtime/src/dom/hydrate.ts
@@ -96,7 +96,7 @@ export function init(runtimeId = "M" /* [a-zA-Z0-9]+ */) {
const data = nodeValue.slice(nodeValue.indexOf(" ") + 1);
if (token === HydrateSymbols.NODE) {
- scope[data] = currentNode.nextSibling;
+ scope[data] = currentNode.previousSibling;
} else if (token === HydrateSymbols.SECTION_START) {
stack.push(currentScopeId);
currentScopeId = scopeId;
diff --git a/packages/translator/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/template.js b/packages/translator/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/template.js
index 30772b12c..a31828941 100644
--- a/packages/translator/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/template.js
+++ b/packages/translator/src/__tests__/fixtures/at-tag-inside-if-tag/__snapshots__/html.expected/template.js
@@ -1,4 +1,4 @@
-import { markHydrateNode as _markHydrateNode, write as _write, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
+import { write as _write, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
import _customTag from "./components/custom-tag/index.marko";
const _renderer = ({
x
@@ -6,7 +6,6 @@ const _renderer = ({
const _scope = _nextScopeId();
let _thing;
const _scope = _nextScopeId();
- _write(`${_markHydrateNode(_scope, 0)}`);
if (x) {
const _scope = _nextScopeId();
_thing = {
diff --git a/packages/translator/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.expected/template.js b/packages/translator/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.expected/template.js
index 5fc658618..a723d390f 100644
--- a/packages/translator/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.expected/template.js
+++ b/packages/translator/src/__tests__/fixtures/at-tags-dynamic-and-static/__snapshots__/html.expected/template.js
@@ -1,10 +1,9 @@
-import { markHydrateNode as _markHydrateNode, write as _write, nextScopeId as _nextScopeId, maybeFlush as _maybeFlush, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
+import { nextScopeId as _nextScopeId, maybeFlush as _maybeFlush, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
import _hello from "./components/hello/index.marko";
const _renderer = (input, _tagVar) => {
const _scope = _nextScopeId();
const _item = [];
const _scope = _nextScopeId();
- _write(`${_markHydrateNode(_scope, 0)}`);
for (const a in {
a: 1,
b: 2
diff --git a/packages/translator/src/__tests__/fixtures/at-tags-dynamic-tag-parent/__snapshots__/html.expected/template.js b/packages/translator/src/__tests__/fixtures/at-tags-dynamic-tag-parent/__snapshots__/html.expected/template.js
index eb0894406..84b8a6946 100644
--- a/packages/translator/src/__tests__/fixtures/at-tags-dynamic-tag-parent/__snapshots__/html.expected/template.js
+++ b/packages/translator/src/__tests__/fixtures/at-tags-dynamic-tag-parent/__snapshots__/html.expected/template.js
@@ -1,9 +1,8 @@
-import { markHydrateNode as _markHydrateNode, write as _write, dynamicTag as _dynamicTag, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
+import { write as _write, dynamicTag as _dynamicTag, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
const _renderer = ({
x
}, _tagVar) => {
const _scope = _nextScopeId();
- _write(`${_markHydrateNode(_scope, 0)}`);
_dynamicTag(x, {
header: {
class: "my-header",
diff --git a/packages/translator/src/__tests__/fixtures/at-tags-dynamic-with-params/__snapshots__/html.expected/template.js b/packages/translator/src/__tests__/fixtures/at-tags-dynamic-with-params/__snapshots__/html.expected/template.js
index e4e1a26ca..916473912 100644
--- a/packages/translator/src/__tests__/fixtures/at-tags-dynamic-with-params/__snapshots__/html.expected/template.js
+++ b/packages/translator/src/__tests__/fixtures/at-tags-dynamic-with-params/__snapshots__/html.expected/template.js
@@ -1,4 +1,4 @@
-import { markHydrateNode as _markHydrateNode, write as _write, escapeXML as _escapeXML, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
+import { escapeXML as _escapeXML, markHydrateNode as _markHydrateNode, write as _write, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
import _hello from "./components/hello/index.marko";
const _renderer = ({
x
@@ -6,12 +6,11 @@ const _renderer = ({
const _scope = _nextScopeId();
let _item;
const _scope = _nextScopeId();
- _write(`${_markHydrateNode(_scope, 0)}`);
if (x) {
const _scope = _nextScopeId();
_item = {
renderBody(y) {
- _write(`${_markHydrateNode(_scope, 0)}${_escapeXML(y)}`);
+ _write(`${_escapeXML(y)}${_markHydrateNode(_scope, 0)}`);
}
};
}
diff --git a/packages/translator/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.expected/template.js b/packages/translator/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.expected/template.js
index 9f8c4df29..7898db27a 100644
--- a/packages/translator/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.expected/template.js
+++ b/packages/translator/src/__tests__/fixtures/at-tags-dynamic/__snapshots__/html.expected/template.js
@@ -1,14 +1,12 @@
-import { markHydrateNode as _markHydrateNode, write as _write, nextScopeId as _nextScopeId, maybeFlush as _maybeFlush, escapeXML as _escapeXML, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
+import { write as _write, nextScopeId as _nextScopeId, maybeFlush as _maybeFlush, escapeXML as _escapeXML, markHydrateNode as _markHydrateNode, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
import _hello from "./components/hello/index.marko";
const _renderer = (input, _tagVar) => {
const _scope = _nextScopeId();
const _col = [];
const _scope = _nextScopeId();
const _item = [];
- _write(`${_markHydrateNode(_scope, 0)}`);
for (const color of ["red", "blue", "green"]) {
const _scope = _nextScopeId();
- _write(`${_markHydrateNode(_scope, 0)}`);
if (color === "red") {
const _scope = _nextScopeId();
_item.push({
@@ -32,19 +30,17 @@ const _renderer = (input, _tagVar) => {
}
_maybeFlush();
}
- _write(`${_markHydrateNode(_scope, 0)}`);
let _i = 0;
for (const col of [["a", "b"], ["c", "d"]]) {
let i = _i++;
const _scope = _nextScopeId();
const _row = [];
- _write(`${_markHydrateNode(_scope, 0)}`);
for (const row of col) {
const _scope = _nextScopeId();
_row.push({
row: row,
renderBody() {
- _write(`${_markHydrateNode(_scope, 0)}${_escapeXML(row)}`);
+ _write(`${_escapeXML(row)}${_markHydrateNode(_scope, 0)}`);
}
});
_maybeFlush();
diff --git a/packages/translator/src/__tests__/fixtures/attr-class/__snapshots__/html.expected/template.js b/packages/translator/src/__tests__/fixtures/attr-class/__snapshots__/html.expected/template.js
index d0807c6e9..e609e6911 100644
--- a/packages/translator/src/__tests__/fixtures/attr-class/__snapshots__/html.expected/template.js
+++ b/packages/translator/src/__tests__/fixtures/attr-class/__snapshots__/html.expected/template.js
@@ -1,4 +1,4 @@
-import { markHydrateNode as _markHydrateNode, classAttr as _classAttr, write as _write, nextScopeId as _nextScopeId, dynamicTag as _dynamicTag, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
+import { classAttr as _classAttr, markHydrateNode as _markHydrateNode, write as _write, nextScopeId as _nextScopeId, dynamicTag as _dynamicTag, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
import _customTag from "./components/custom-tag.marko";
const _renderer = (input, _tagVar) => {
const _scope = _nextScopeId();
@@ -6,10 +6,10 @@ const _renderer = (input, _tagVar) => {
c,
d
} = input;
- _write(`${_markHydrateNode(_scope, 0)}`);
+ }])}>${_markHydrateNode(_scope, 0)}`);
_customTag({
class: ["a", {
b: c,
@@ -25,7 +25,6 @@ const _renderer = (input, _tagVar) => {
const _scope = _nextScopeId();
}
});
- _write(`${_markHydrateNode(_scope, 1)}`);
_dynamicTag(input.test, {
class: ["a", {
b: c,
diff --git a/packages/translator/src/__tests__/fixtures/attr-escape/__snapshots__/html.expected/template.js b/packages/translator/src/__tests__/fixtures/attr-escape/__snapshots__/html.expected/template.js
index f2c88986e..b5098a62d 100644
--- a/packages/translator/src/__tests__/fixtures/attr-escape/__snapshots__/html.expected/template.js
+++ b/packages/translator/src/__tests__/fixtures/attr-escape/__snapshots__/html.expected/template.js
@@ -1,7 +1,7 @@
-import { markHydrateNode as _markHydrateNode, classAttr as _classAttr, attr as _attr, write as _write, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
+import { classAttr as _classAttr, attr as _attr, markHydrateNode as _markHydrateNode, write as _write, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
const _renderer = (input, _tagVar) => {
const _scope = _nextScopeId();
- _write(`${_markHydrateNode(_scope, 0)}`);
+ _write(`${_markHydrateNode(_scope, 0)}`);
};
export default _renderer;
export const render = /* @__PURE__ */_createRenderer(_renderer);
\ No newline at end of file
diff --git a/packages/translator/src/__tests__/fixtures/attr-style/__snapshots__/html.expected/template.js b/packages/translator/src/__tests__/fixtures/attr-style/__snapshots__/html.expected/template.js
index 381f7d739..f504f0c35 100644
--- a/packages/translator/src/__tests__/fixtures/attr-style/__snapshots__/html.expected/template.js
+++ b/packages/translator/src/__tests__/fixtures/attr-style/__snapshots__/html.expected/template.js
@@ -1,13 +1,13 @@
-import { markHydrateNode as _markHydrateNode, styleAttr as _styleAttr, write as _write, nextScopeId as _nextScopeId, dynamicTag as _dynamicTag, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
+import { styleAttr as _styleAttr, markHydrateNode as _markHydrateNode, write as _write, nextScopeId as _nextScopeId, dynamicTag as _dynamicTag, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
import _customTag from "./components/custom-tag.marko";
const _renderer = ({
color,
test
}, _tagVar) => {
const _scope = _nextScopeId();
- _write(`${_markHydrateNode(_scope, 0)}`);
+ })}>${_markHydrateNode(_scope, 0)}`);
_customTag({
style: {
color: color
@@ -30,7 +30,6 @@ const _renderer = ({
const _scope = _nextScopeId();
}
});
- _write(`${_markHydrateNode(_scope, 1)}`);
_dynamicTag(test, {
style: {
color: "green"
diff --git a/packages/translator/src/__tests__/fixtures/attr-template-literal-escape/__snapshots__/html.expected/template.js b/packages/translator/src/__tests__/fixtures/attr-template-literal-escape/__snapshots__/html.expected/template.js
index 3c5625106..919bd0905 100644
--- a/packages/translator/src/__tests__/fixtures/attr-template-literal-escape/__snapshots__/html.expected/template.js
+++ b/packages/translator/src/__tests__/fixtures/attr-template-literal-escape/__snapshots__/html.expected/template.js
@@ -1,9 +1,9 @@
-import { markHydrateNode as _markHydrateNode, attr as _attr, write as _write, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
+import { attr as _attr, markHydrateNode as _markHydrateNode, write as _write, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
const _renderer = ({
name
}, _tagVar) => {
const _scope = _nextScopeId();
- _write(`${_markHydrateNode(_scope, 0)}`);
+ _write(`${_markHydrateNode(_scope, 0)}`);
};
export default _renderer;
export const render = /* @__PURE__ */_createRenderer(_renderer);
\ No newline at end of file
diff --git a/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/html.expected/template.js b/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/html.expected/template.js
index 1e2a7982a..a78160238 100644
--- a/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/html.expected/template.js
+++ b/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/html.expected/template.js
@@ -1,10 +1,10 @@
-import { markHydrateNode as _markHydrateNode, escapeXML as _escapeXML, write as _write, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
+import { escapeXML as _escapeXML, markHydrateNode as _markHydrateNode, write as _write, nextScopeId as _nextScopeId, createRenderer as _createRenderer } from "@marko/runtime-fluurt/src/html";
const _renderer = (input, _tagVar) => {
const _scope = _nextScopeId();
const x = 1;
const y = x * 2;
const z = y * 3;
- _write(`${_markHydrateNode(_scope, 0)}${_escapeXML(z)}
`);
+ _write(`${_escapeXML(z)}${_markHydrateNode(_scope, 0)}
`);
};
export default _renderer;
export const render = /* @__PURE__ */_createRenderer(_renderer);
\ No newline at end of file
diff --git a/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/hydrate.expected.md b/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/hydrate.expected.md
index 637cd719b..e5ba77a1f 100644
--- a/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/hydrate.expected.md
+++ b/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/hydrate.expected.md
@@ -4,8 +4,8 @@
-
6
+
diff --git a/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/ssr.expected.md b/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/ssr.expected.md
index fecf646b9..d7de23489 100644
--- a/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/ssr.expected.md
+++ b/packages/translator/src/__tests__/fixtures/basic-chain/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 6
+ 6
# Render "End"
@@ -8,8 +8,8 @@
-
6
+