diff --git a/packages/cli/package.json b/packages/cli/package.json index 62d0782ee8..2774c1c30b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@builder.io/mitosis-cli", - "version": "0.0.23", + "version": "0.0.24", "description": "mitosis CLI", "types": "build/types/types.d.ts", "bin": { diff --git a/packages/core/package.json b/packages/core/package.json index 46a96f75af..65d6bacc8a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -25,7 +25,7 @@ "engines": { "npm": "99999999.9.9" }, - "version": "0.0.62", + "version": "0.0.63", "homepage": "https://github.com/BuilderIO/mitosis", "main": "./dist/src/index.js", "exports": { diff --git a/packages/core/src/__tests__/__snapshots__/svelte.test.ts.snap b/packages/core/src/__tests__/__snapshots__/svelte.test.ts.snap index 3140103069..eb383ae105 100644 --- a/packages/core/src/__tests__/__snapshots__/svelte.test.ts.snap +++ b/packages/core/src/__tests__/__snapshots__/svelte.test.ts.snap @@ -1011,7 +1011,7 @@ exports[`Svelte Javascript Test Img 1`] = ` export let altText; function mitosis_styling(node, vars) { - Object.entries(vars).forEach(([p, v]) => { + Object.entries(vars || {}).forEach(([p, v]) => { node.style[p] = v; }); } @@ -1074,7 +1074,7 @@ exports[`Svelte Javascript Test Section 1`] = ` export let maxWidth; function mitosis_styling(node, vars) { - Object.entries(vars).forEach(([p, v]) => { + Object.entries(vars || {}).forEach(([p, v]) => { node.style[p] = v; }); } @@ -1098,7 +1098,7 @@ exports[`Svelte Javascript Test Section 2`] = ` export let attributes; function mitosis_styling(node, vars) { - Object.entries(vars).forEach(([p, v]) => { + Object.entries(vars || {}).forEach(([p, v]) => { node.style[p] = v; }); } @@ -1307,7 +1307,7 @@ exports[`Svelte Javascript Test Video 1`] = ` export let loop; function mitosis_styling(node, vars) { - Object.entries(vars).forEach(([p, v]) => { + Object.entries(vars || {}).forEach(([p, v]) => { node.style[p] = v; }); } @@ -3024,7 +3024,7 @@ exports[`Svelte Typescript Test Img 1`] = ` export let altText: ImgProps[\\"altText\\"]; function mitosis_styling(node, vars) { - Object.entries(vars).forEach(([p, v]) => { + Object.entries(vars || {}).forEach(([p, v]) => { node.style[p] = v; }); } @@ -3114,7 +3114,7 @@ exports[`Svelte Typescript Test Section 1`] = ` export let maxWidth: SectionProps[\\"maxWidth\\"]; function mitosis_styling(node, vars) { - Object.entries(vars).forEach(([p, v]) => { + Object.entries(vars || {}).forEach(([p, v]) => { node.style[p] = v; }); } @@ -3146,7 +3146,7 @@ exports[`Svelte Typescript Test Section 2`] = ` export let attributes: SectionProps[\\"attributes\\"]; function mitosis_styling(node, vars) { - Object.entries(vars).forEach(([p, v]) => { + Object.entries(vars || {}).forEach(([p, v]) => { node.style[p] = v; }); } @@ -3430,7 +3430,7 @@ exports[`Svelte Typescript Test Video 1`] = ` export let loop: VideoProps[\\"loop\\"]; function mitosis_styling(node, vars) { - Object.entries(vars).forEach(([p, v]) => { + Object.entries(vars || {}).forEach(([p, v]) => { node.style[p] = v; }); } diff --git a/packages/core/src/generators/svelte.ts b/packages/core/src/generators/svelte.ts index a4f1e33c1a..01e016883f 100644 --- a/packages/core/src/generators/svelte.ts +++ b/packages/core/src/generators/svelte.ts @@ -463,7 +463,7 @@ export const componentToSvelte: TranspilerGenerator = hasStyle(json) ? ` function mitosis_styling (node, vars) { - Object.entries(vars).forEach(([ p, v ]) => { node.style[p] = v }) + Object.entries(vars || {}).forEach(([ p, v ]) => { node.style[p] = v }) } ` : '' diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 4db6c88428..7fe9185c47 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@builder.io/eslint-plugin-mitosis", - "version": "0.0.7", + "version": "0.0.8", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT",