@sigil-dev/compiler 0.10.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/package.json +1 -1
- package/src/babel/index.ts +801 -801
- package/src/babel/jsx/conditional-return.ts +71 -71
- package/src/babel/jsx/text-node.ts +193 -193
- package/src/babel/jsx/textarea.ts +58 -58
- package/src/bun-plugin.ts +119 -119
- package/test/bun-plugin.test.ts +60 -60
- package/test/conditional-return.test.ts +82 -82
- package/test/hydration.test.ts +380 -380
- package/test/render-parity.test.ts +5 -5
|
@@ -946,10 +946,10 @@ describe("textarea content", () => {
|
|
|
946
946
|
describe("names the compiled code uses itself", () => {
|
|
947
947
|
// hydration checks `instanceof Text` / `instanceof Node`: a component with
|
|
948
948
|
// that name must not shadow the DOM's (it threw "non-object prototype")
|
|
949
|
-
test("components called Text and Node", () => {
|
|
950
|
-
expectAll(
|
|
951
|
-
`let name = $state("a"); let items = $state(["x"]); const Text = ({ l }) => <i>{l}</i>; const Node = () => <u />; export const App = () => <pre><span>{name}</span><b>{items.map((i) => <em>{i}</em>)}</b><Text l="t" /><Node /></pre>;`,
|
|
952
|
-
"<pre><span>a</span><b><em>x</em></b><i>t</i><u></u></pre>",
|
|
953
|
-
);
|
|
949
|
+
test("components called Text and Node", () => {
|
|
950
|
+
expectAll(
|
|
951
|
+
`let name = $state("a"); let items = $state(["x"]); const Text = ({ l }) => <i>{l}</i>; const Node = () => <u />; export const App = () => <pre><span>{name}</span><b>{items.map((i) => <em>{i}</em>)}</b><Text l="t" /><Node /></pre>;`,
|
|
952
|
+
"<pre><span>a</span><b><em>x</em></b><i>t</i><u></u></pre>",
|
|
953
|
+
);
|
|
954
954
|
});
|
|
955
955
|
});
|