From 2cee6fb141be0cd04397be756fcf18694f424328 Mon Sep 17 00:00:00 2001 From: Paolo Ricciuti Date: Thu, 11 Jul 2024 00:33:25 +0200 Subject: [PATCH] fix: playground warnings (#12394) --- sites/svelte-5-preview/src/lib/workers/compiler/index.js | 4 ++-- sites/svelte-5-preview/src/lib/workers/workers.d.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sites/svelte-5-preview/src/lib/workers/compiler/index.js b/sites/svelte-5-preview/src/lib/workers/compiler/index.js index 43ef1c7bb0..46853c3984 100644 --- a/sites/svelte-5-preview/src/lib/workers/compiler/index.js +++ b/sites/svelte-5-preview/src/lib/workers/compiler/index.js @@ -76,7 +76,7 @@ function compile({ id, source, options, return_ast }) { js: js.code, css: css?.code || `/* Add a tag to see compiled CSS */`, error: null, - warnings, + warnings: warnings.map((warning) => warning.toJSON()), metadata, ast } @@ -95,7 +95,7 @@ function compile({ id, source, options, return_ast }) { js: compiled.js.code, css, error: null, - warnings: compiled.warnings, + warnings: compiled.warnings.map((warning) => warning.toJSON()), metadata: compiled.metadata } }; diff --git a/sites/svelte-5-preview/src/lib/workers/workers.d.ts b/sites/svelte-5-preview/src/lib/workers/workers.d.ts index 2c0015cf32..e66e075c14 100644 --- a/sites/svelte-5-preview/src/lib/workers/workers.d.ts +++ b/sites/svelte-5-preview/src/lib/workers/workers.d.ts @@ -12,9 +12,9 @@ export type CompileMessageData = { js: string; css: string; ast?: import('svelte/types/compiler/interfaces').Ast; - }; - metadata?: { - runes: boolean; + metadata?: { + runes: boolean; + }; }; };