diff --git a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/all.txt b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/all.txt
index 9d636f477..742c7f3d1 100644
--- a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/all.txt
+++ b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/all.txt
@@ -109,8 +109,8 @@
]
},
"metadata": {
- "hoistable": false,
- "hoistable_params": [],
+ "hoisted": false,
+ "hoisted_params": [],
"scope": {
"root": {
"conflicts": {}
@@ -313,7 +313,7 @@
"id": {
"type": "Identifier",
"start": 31,
- "end": 24,
+ "end": 35,
"loc": {
"start": {
"line": 2,
@@ -325,7 +325,9 @@
}
},
"name": "name",
- "typeAnnotation": null
+ "typeAnnotation": {
+ "type": "EmptyStatement"
+ }
},
"init": null
}
@@ -482,6 +484,7 @@
"file": "Dummy.svelte",
"mappings": "AAWkB",
"names": [],
+ "ignoreList": [],
"sources": [
"Dummy.svelte"
]
@@ -489,11 +492,12 @@
},
"dependencies": [],
"js": {
- "code": "import \"svelte/internal/disclose-version\";\nimport * as $ from \"svelte/internal/client\";\n\nvar root = $.template(``);\n\nexport default function Dummy($$anchor, $$props) {\n\tlet name = $.prop($$props, \"name\");\n\tlet clicks = $.mutable_source(0);\n\tvar button = root();\n\tvar text = $.child(button);\n\n\t$.template_effect(() => $.set_text(text, `${name() ?? \"\"} clicks: ${$.get(clicks) ?? \"\"}`));\n\n\t$.event(\n\t\t\"click\",\n\t\tbutton,\n\t\t() => {\n\t\t\t$.update(clicks);\n\t\t},\n\t\tfalse\n\t);\n\n\t$.append($$anchor, button);\n}",
+ "code": "import \"svelte/internal/disclose-version\";\nimport * as $ from \"svelte/internal/client\";\n\nvar root = $.template(``);\n\nexport default function Dummy($$anchor, $$props) {\n\tlet name = $.prop($$props, \"name\", 8);\n\tlet clicks = $.mutable_state(0);\n\tvar button = root();\n\tvar text = $.child(button);\n\n\t$.reset(button);\n\t$.template_effect(() => $.set_text(text, `${name() ?? \"\"} clicks: ${$.get(clicks) ?? \"\"}`));\n\n\t$.event(\"click\", button, () => {\n\t\t$.update(clicks);\n\t});\n\n\t$.append($$anchor, button);\n}",
"map": {
"version": 3,
- "mappings": ";;;;;;KACY,IAAY;KACnB,MAAM,oBAAG,CAAC;;;;6CAMV,IAAI,0BAAW,MAAM",
+ "mappings": ";;;;;;KACY,IAAY;KACnB,MAAM,mBAAG,CAAC;;;;;6CAMV,IAAI,0BAAW,MAAM;;;WADxB,MAAM",
"names": [],
+ "ignoreList": [],
"sources": [
"Dummy.svelte"
]
@@ -509,14 +513,15 @@
"dependencies": [],
"map": {
"version": 3,
- "mappings": "AAAA,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AACjB,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM;AACxB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACf,CAAC,CAAC,MAAM;;AAER,CAAC;AACD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjB,EAAE,MAAM,CAAC,CAAC;AACV,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B;;AAEA,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;;CAKlB,CAAC,CAAC,KAAK",
+ "mappings": "AAAA,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AACjB,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM;AACxB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACf,CAAC,CAAC,MAAM;;AAER,CAAC;AACD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjB,EAAE,MAAM,CAAC,CAAC;AACV,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B;;AAEA,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;;CAMlB,CAAC,CAAC,KAAK",
"names": [],
+ "ignoreList": [],
"sources": [
"Dummy.svelte"
]
}
},
- "source": "\n\n\n\n\n",
+ "source": "\n\n\n\n\n",
"ssr": false,
"warnings": []
}
\ No newline at end of file
diff --git a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/custom-element.txt b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/custom-element.txt
index 83966e289..bf04a311d 100644
--- a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/custom-element.txt
+++ b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/custom-element.txt
@@ -3,27 +3,28 @@ import * as $ from "svelte/internal/client";
var root = $.template(``);
+const $$css = {
+ hash: "svelte-d8vj6a",
+ code: "button.svelte-d8vj6a {\n color: #000099;\n}"
+};
+
export default function Dummy($$anchor, $$props) {
$.push($$props, false);
+ $.append_styles($$anchor, $$css);
- let name = $.prop($$props, "name", 4);
- let clicks = $.mutable_source(0);
+ let name = $.prop($$props, "name", 12);
+ let clicks = $.mutable_state(0);
var button = root();
var text = $.child(button);
+ $.reset(button);
$.template_effect(() => $.set_text(text, `${name() ?? ""} clicks: ${$.get(clicks) ?? ""}`));
- $.event(
- "click",
- button,
- () => {
- $.update(clicks);
- },
- false
- );
+ $.event("click", button, () => {
+ $.update(clicks);
+ });
$.append($$anchor, button);
- $.append_styles($$anchor, "svelte-d8vj6a", "button.svelte-d8vj6a {\n color: #000099;\n}");
return $.pop({
get name() {
diff --git a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-all.txt b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-all.txt
index 07c6aaa20..7a2979457 100644
--- a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-all.txt
+++ b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-all.txt
@@ -1,11 +1,11 @@
-export const ast={"html":{"type":"Fragment","start":73,"end":149,"children":[{"type":"Text","start":71,"end":73,"raw":"\n\n","data":"\n\n"},{"type":"Element","start":73,"end":149,"name":"button","attributes":[{"start":82,"end":115,"type":"EventHandler","name":"click","modifiers":[],"expression":{"type":"ArrowFunctionExpression","start":92,"end":114,"loc":{"start":{"line":7,"column":11},"end":{"line":9,"column":2}},"id":null,"expression":false,"generator":false,"async":false,"params":[],"body":{"type":"BlockStatement","start":98,"end":114,"loc":{"start":{"line":7,"column":17},"end":{"line":9,"column":2}},"body":[{"type":"ExpressionStatement","start":102,"end":111,"loc":{"start":{"line":8,"column":2},"end":{"line":8,"column":11}},"expression":{"type":"UpdateExpression","start":102,"end":110,"loc":{"start":{"line":8,"column":2},"end":{"line":8,"column":10}},"operator":"++","prefix":false,"argument":{"type":"Identifier","start":102,"end":108,"loc":{"start":{"line":8,"column":2},"end":{"line":8,"column":8}},"name":"clicks"}}}]},"metadata":{"hoistable":false,"hoistable_params":[],"scope":{"root":{"conflicts":{}},"parent":{"root":{"conflicts":{}},"parent":{"root":{"conflicts":{}},"parent":{"root":{"conflicts":{}},"parent":{"root":{"conflicts":{}},"parent":{"root":{"conflicts":{}},"parent":null,"declarations":{},"declarators":{},"references":{},"function_depth":0},"declarations":{},"declarators":{},"references":{},"function_depth":1},"declarations":{},"declarators":{},"references":{},"function_depth":2},"declarations":{},"declarators":{},"references":{},"function_depth":3},"declarations":{},"declarators":{},"references":{},"function_depth":4},"declarations":{},"declarators":{},"references":{},"function_depth":5}}}},{"type":"Attribute","start":-1,"end":-1,"name":"class","value":[{"type":"Text","data":"svelte-d8vj6a","raw":"svelte-d8vj6a","start":-1,"end":-1}]}],"children":[{"type":"MustacheTag","start":116,"end":122,"expression":{"type":"Identifier","start":117,"end":121,"loc":{"start":{"line":9,"column":5},"end":{"line":9,"column":9}},"name":"name"}},{"type":"Text","start":122,"end":131,"raw":" clicks: ","data":" clicks: "},{"type":"MustacheTag","start":131,"end":139,"expression":{"type":"Identifier","start":132,"end":138,"loc":{"start":{"line":9,"column":20},"end":{"line":9,"column":26}},"name":"clicks"}}]},{"type":"Text","start":149,"end":151,"raw":"\n\n","data":"\n\n"}]},"instance":{"type":"Script","start":0,"end":71,"context":"default","content":{"type":"Program","start":18,"end":62,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":0}},"body":[{"type":"ExportNamedDeclaration","start":20,"end":44,"loc":{"start":{"line":2,"column":1},"end":{"line":2,"column":25}},"exportKind":"value","declaration":{"type":"VariableDeclaration","start":27,"end":44,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":25}},"declarations":[{"type":"VariableDeclarator","start":31,"end":43,"loc":{"start":{"line":2,"column":12},"end":{"line":2,"column":24}},"id":{"type":"Identifier","start":31,"end":24,"loc":{"start":{"line":2,"column":12},"end":{"line":2,"column":24}},"name":"name","typeAnnotation":null},"init":null}],"kind":"let"},"specifiers":[],"source":null},{"type":"VariableDeclaration","start":46,"end":61,"loc":{"start":{"line":3,"column":1},"end":{"line":3,"column":16}},"declarations":[{"type":"VariableDeclarator","start":50,"end":60,"loc":{"start":{"line":3,"column":5},"end":{"line":3,"column":15}},"id":{"type":"Identifier","start":50,"end":56,"loc":{"start":{"line":3,"column":5},"end":{"line":3,"column":11}},"name":"clicks"},"init":{"type":"Literal","start":59,"end":60,"loc":{"start":{"line":3,"column":14},"end":{"line":3,"column":15}},"value":0,"raw":"0"}}],"kind":"let"}],"sourceType":"module"}},"css":{"type":"Style","start":151,"end":206,"attributes":[{"type":"Attribute","start":158,"end":169,"name":"lang","value":[{"start":164,"end":168,"type":"Text","raw":"scss","data":"scss"}]}],"children":[{"type":"Rule","prelude":{"type":"SelectorList","start":170,"end":176,"children":[{"type":"Selector","start":170,"end":176,"children":[{"type":"TypeSelector","name":"button","start":170,"end":176}]}]},"block":{"type":"Block","start":177,"end":198,"children":[{"type":"Declaration","start":181,"end":195,"property":"color","value":"#000099"}]},"start":170,"end":198}],"content":{"start":170,"end":198,"styles":"button {\n color: #000099;\n}","comment":null}}}
-export const css={"code":"button.svelte-d8vj6a {\n color: #000099;\n}","map":{"version":3,"file":"Dummy.svelte","mappings":"AAWkB","names":[],"sources":["Dummy.svelte"]}}
+export const ast={"html":{"type":"Fragment","start":73,"end":149,"children":[{"type":"Text","start":71,"end":73,"raw":"\n\n","data":"\n\n"},{"type":"Element","start":73,"end":149,"name":"button","attributes":[{"start":82,"end":115,"type":"EventHandler","name":"click","modifiers":[],"expression":{"type":"ArrowFunctionExpression","start":92,"end":114,"loc":{"start":{"line":7,"column":11},"end":{"line":9,"column":2}},"id":null,"expression":false,"generator":false,"async":false,"params":[],"body":{"type":"BlockStatement","start":98,"end":114,"loc":{"start":{"line":7,"column":17},"end":{"line":9,"column":2}},"body":[{"type":"ExpressionStatement","start":102,"end":111,"loc":{"start":{"line":8,"column":2},"end":{"line":8,"column":11}},"expression":{"type":"UpdateExpression","start":102,"end":110,"loc":{"start":{"line":8,"column":2},"end":{"line":8,"column":10}},"operator":"++","prefix":false,"argument":{"type":"Identifier","start":102,"end":108,"loc":{"start":{"line":8,"column":2},"end":{"line":8,"column":8}},"name":"clicks"}}}]},"metadata":{"hoisted":false,"hoisted_params":[],"scope":{"root":{"conflicts":{}},"parent":{"root":{"conflicts":{}},"parent":{"root":{"conflicts":{}},"parent":{"root":{"conflicts":{}},"parent":{"root":{"conflicts":{}},"parent":{"root":{"conflicts":{}},"parent":null,"declarations":{},"declarators":{},"references":{},"function_depth":0},"declarations":{},"declarators":{},"references":{},"function_depth":1},"declarations":{},"declarators":{},"references":{},"function_depth":2},"declarations":{},"declarators":{},"references":{},"function_depth":3},"declarations":{},"declarators":{},"references":{},"function_depth":4},"declarations":{},"declarators":{},"references":{},"function_depth":5}}}},{"type":"Attribute","start":-1,"end":-1,"name":"class","value":[{"type":"Text","data":"svelte-d8vj6a","raw":"svelte-d8vj6a","start":-1,"end":-1}]}],"children":[{"type":"MustacheTag","start":116,"end":122,"expression":{"type":"Identifier","start":117,"end":121,"loc":{"start":{"line":9,"column":5},"end":{"line":9,"column":9}},"name":"name"}},{"type":"Text","start":122,"end":131,"raw":" clicks: ","data":" clicks: "},{"type":"MustacheTag","start":131,"end":139,"expression":{"type":"Identifier","start":132,"end":138,"loc":{"start":{"line":9,"column":20},"end":{"line":9,"column":26}},"name":"clicks"}}]},{"type":"Text","start":149,"end":151,"raw":"\n\n","data":"\n\n"}]},"instance":{"type":"Script","start":0,"end":71,"context":"default","content":{"type":"Program","start":18,"end":62,"loc":{"start":{"line":1,"column":0},"end":{"line":4,"column":0}},"body":[{"type":"ExportNamedDeclaration","start":20,"end":44,"loc":{"start":{"line":2,"column":1},"end":{"line":2,"column":25}},"exportKind":"value","declaration":{"type":"VariableDeclaration","start":27,"end":44,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":25}},"declarations":[{"type":"VariableDeclarator","start":31,"end":43,"loc":{"start":{"line":2,"column":12},"end":{"line":2,"column":24}},"id":{"type":"Identifier","start":31,"end":35,"loc":{"start":{"line":2,"column":12},"end":{"line":2,"column":24}},"name":"name","typeAnnotation":{"type":"EmptyStatement"}},"init":null}],"kind":"let"},"specifiers":[],"source":null},{"type":"VariableDeclaration","start":46,"end":61,"loc":{"start":{"line":3,"column":1},"end":{"line":3,"column":16}},"declarations":[{"type":"VariableDeclarator","start":50,"end":60,"loc":{"start":{"line":3,"column":5},"end":{"line":3,"column":15}},"id":{"type":"Identifier","start":50,"end":56,"loc":{"start":{"line":3,"column":5},"end":{"line":3,"column":11}},"name":"clicks"},"init":{"type":"Literal","start":59,"end":60,"loc":{"start":{"line":3,"column":14},"end":{"line":3,"column":15}},"value":0,"raw":"0"}}],"kind":"let"}],"sourceType":"module"}},"css":{"type":"Style","start":151,"end":206,"attributes":[{"type":"Attribute","start":158,"end":169,"name":"lang","value":[{"start":164,"end":168,"type":"Text","raw":"scss","data":"scss"}]}],"children":[{"type":"Rule","prelude":{"type":"SelectorList","start":170,"end":176,"children":[{"type":"Selector","start":170,"end":176,"children":[{"type":"TypeSelector","name":"button","start":170,"end":176}]}]},"block":{"type":"Block","start":177,"end":198,"children":[{"type":"Declaration","start":181,"end":195,"property":"color","value":"#000099"}]},"start":170,"end":198}],"content":{"start":170,"end":198,"styles":"button {\n color: #000099;\n}","comment":null}}}
+export const css={"code":"button.svelte-d8vj6a {\n color: #000099;\n}","map":{"version":3,"file":"Dummy.svelte","mappings":"AAWkB","names":[],"ignoreList":[],"sources":["Dummy.svelte"]}}
export const dependencies=[]
-export const js={"code":"import \"svelte/internal/disclose-version\";\nimport * as $ from \"svelte/internal/client\";\n\nvar root = $.template(``);\n\nexport default function Dummy($$anchor, $$props) {\n\tlet name = $.prop($$props, \"name\");\n\tlet clicks = $.mutable_source(0);\n\tvar button = root();\n\tvar text = $.child(button);\n\n\t$.template_effect(() => $.set_text(text, `${name() ?? \"\"} clicks: ${$.get(clicks) ?? \"\"}`));\n\n\t$.event(\n\t\t\"click\",\n\t\tbutton,\n\t\t() => {\n\t\t\t$.update(clicks);\n\t\t},\n\t\tfalse\n\t);\n\n\t$.append($$anchor, button);\n}","map":{"version":3,"mappings":";;;;;;KACY,IAAY;KACnB,MAAM,oBAAG,CAAC;;;;6CAMV,IAAI,0BAAW,MAAM","names":[],"sources":["Dummy.svelte"]}}
+export const js={"code":"import \"svelte/internal/disclose-version\";\nimport * as $ from \"svelte/internal/client\";\n\nvar root = $.template(``);\n\nexport default function Dummy($$anchor, $$props) {\n\tlet name = $.prop($$props, \"name\", 8);\n\tlet clicks = $.mutable_state(0);\n\tvar button = root();\n\tvar text = $.child(button);\n\n\t$.reset(button);\n\t$.template_effect(() => $.set_text(text, `${name() ?? \"\"} clicks: ${$.get(clicks) ?? \"\"}`));\n\n\t$.event(\"click\", button, () => {\n\t\t$.update(clicks);\n\t});\n\n\t$.append($$anchor, button);\n}","map":{"version":3,"mappings":";;;;;;KACY,IAAY;KACnB,MAAM,mBAAG,CAAC;;;;;6CAMV,IAAI,0BAAW,MAAM;;;WADxB,MAAM","names":[],"ignoreList":[],"sources":["Dummy.svelte"]}}
export const lang="ts"
export const metadata={"runes":false}
export const normalizedFilename="/src/Dummy.svelte"
-export const preprocessed={"code":"\n\n\n\n\n","dependencies":[],"map":{"version":3,"mappings":"AAAA,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AACjB,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM;AACxB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACf,CAAC,CAAC,MAAM;;AAER,CAAC;AACD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjB,EAAE,MAAM,CAAC,CAAC;AACV,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B;;AAEA,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;;CAKlB,CAAC,CAAC,KAAK","names":[],"sources":["Dummy.svelte"]}}
-export const source="\n\n\n\n\n"
+export const preprocessed={"code":"\n\n\n\n\n","dependencies":[],"map":{"version":3,"mappings":"AAAA,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AACjB,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM;AACxB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACf,CAAC,CAAC,MAAM;;AAER,CAAC;AACD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjB,EAAE,MAAM,CAAC,CAAC;AACV,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B;;AAEA,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;;CAMlB,CAAC,CAAC,KAAK","names":[],"ignoreList":[],"sources":["Dummy.svelte"]}}
+export const source="\n\n\n\n\n"
export const ssr=false
export const warnings=[]
diff --git a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-preprocessed.txt b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-preprocessed.txt
index b5da183e3..5cc295f30 100644
--- a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-preprocessed.txt
+++ b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-preprocessed.txt
@@ -1,4 +1,4 @@
export const code="\n\n\n\n\n"
export const dependencies=[]
-export const map={"version":3,"mappings":"AAAA,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AACjB,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM;AACxB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACf,CAAC,CAAC,MAAM;;AAER,CAAC;AACD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjB,EAAE,MAAM,CAAC,CAAC;AACV,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B;;AAEA,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;;CAKlB,CAAC,CAAC,KAAK","names":[],"sources":["Dummy.svelte"]}
+export const map={"version":3,"mappings":"AAAA,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AACjB,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM;AACxB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACf,CAAC,CAAC,MAAM;;AAER,CAAC;AACD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjB,EAAE,MAAM,CAAC,CAAC;AACV,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B;;AAEA,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;;CAMlB,CAAC,CAAC,KAAK","names":[],"ignoreList":[],"sources":["Dummy.svelte"]}
export default code
diff --git a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-script.txt b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-script.txt
index e2d5b1f92..6a5e73370 100644
--- a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-script.txt
+++ b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-script.txt
@@ -1,3 +1,3 @@
-export const code="import \"svelte/internal/disclose-version\";\nimport * as $ from \"svelte/internal/client\";\n\nvar root = $.template(``);\n\nexport default function Dummy($$anchor, $$props) {\n\tlet name = $.prop($$props, \"name\");\n\tlet clicks = $.mutable_source(0);\n\tvar button = root();\n\tvar text = $.child(button);\n\n\t$.template_effect(() => $.set_text(text, `${name() ?? \"\"} clicks: ${$.get(clicks) ?? \"\"}`));\n\n\t$.event(\n\t\t\"click\",\n\t\tbutton,\n\t\t() => {\n\t\t\t$.update(clicks);\n\t\t},\n\t\tfalse\n\t);\n\n\t$.append($$anchor, button);\n}"
-export const map={"version":3,"mappings":";;;;;;KACY,IAAY;KACnB,MAAM,oBAAG,CAAC;;;;6CAMV,IAAI,0BAAW,MAAM","names":[],"sources":["Dummy.svelte"]}
+export const code="import \"svelte/internal/disclose-version\";\nimport * as $ from \"svelte/internal/client\";\n\nvar root = $.template(``);\n\nexport default function Dummy($$anchor, $$props) {\n\tlet name = $.prop($$props, \"name\", 8);\n\tlet clicks = $.mutable_state(0);\n\tvar button = root();\n\tvar text = $.child(button);\n\n\t$.reset(button);\n\t$.template_effect(() => $.set_text(text, `${name() ?? \"\"} clicks: ${$.get(clicks) ?? \"\"}`));\n\n\t$.event(\"click\", button, () => {\n\t\t$.update(clicks);\n\t});\n\n\t$.append($$anchor, button);\n}"
+export const map={"version":3,"mappings":";;;;;;KACY,IAAY;KACnB,MAAM,mBAAG,CAAC;;;;;6CAMV,IAAI,0BAAW,MAAM;;;WADxB,MAAM","names":[],"ignoreList":[],"sources":["Dummy.svelte"]}
export default code
diff --git a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-style.txt b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-style.txt
index 551f4449a..2d2bd84ce 100644
--- a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-style.txt
+++ b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/mixed-style.txt
@@ -1,3 +1,3 @@
export const code="button.svelte-d8vj6a {\n color: #000099;\n}"
-export const map={"version":3,"file":"Dummy.svelte","mappings":"AAWkB","names":[],"sources":["Dummy.svelte"]}
+export const map={"version":3,"file":"Dummy.svelte","mappings":"AAWkB","names":[],"ignoreList":[],"sources":["Dummy.svelte"]}
export default code
diff --git a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/raw.txt b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/raw.txt
index 21db6c29d..b193bc953 100644
--- a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/raw.txt
+++ b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/raw.txt
@@ -10,8 +10,9 @@
>
diff --git a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/script.txt b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/script.txt
index 0930bb2f9..192ab268f 100644
--- a/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/script.txt
+++ b/packages/e2e-tests/import-queries/__tests__/__snapshots__/svelte-5/script.txt
@@ -4,21 +4,17 @@ import * as $ from "svelte/internal/client";
var root = $.template(``);
export default function Dummy($$anchor, $$props) {
- let name = $.prop($$props, "name");
- let clicks = $.mutable_source(0);
+ let name = $.prop($$props, "name", 8);
+ let clicks = $.mutable_state(0);
var button = root();
var text = $.child(button);
+ $.reset(button);
$.template_effect(() => $.set_text(text, `${name() ?? ""} clicks: ${$.get(clicks) ?? ""}`));
- $.event(
- "click",
- button,
- () => {
- $.update(clicks);
- },
- false
- );
+ $.event("click", button, () => {
+ $.update(clicks);
+ });
$.append($$anchor, button);
}
\ No newline at end of file
diff --git a/packages/e2e-tests/import-queries/__tests__/import-queries.spec.ts b/packages/e2e-tests/import-queries/__tests__/import-queries.spec.ts
index d676da1e2..b9f6d7eb2 100644
--- a/packages/e2e-tests/import-queries/__tests__/import-queries.spec.ts
+++ b/packages/e2e-tests/import-queries/__tests__/import-queries.spec.ts
@@ -16,8 +16,7 @@ function snapshotFilename(name: string) {
return `./__snapshots__/svelte-${svelteMajor}/${name}.txt`;
}
-// TODO remove .skip in this file once svelte5 output is considered stable
-describe.skip('raw', () => {
+describe('raw', () => {
test('does not have failed requests', async () => {
browserLogs.forEach((msg) => {
expect(msg).not.toMatch('404');
diff --git a/packages/e2e-tests/import-queries/src/Dummy.svelte b/packages/e2e-tests/import-queries/src/Dummy.svelte
index 21db6c29d..b193bc953 100644
--- a/packages/e2e-tests/import-queries/src/Dummy.svelte
+++ b/packages/e2e-tests/import-queries/src/Dummy.svelte
@@ -10,8 +10,9 @@
>
diff --git a/packages/e2e-tests/preprocess-with-vite/__tests__/preprocess-with-vite.spec.ts b/packages/e2e-tests/preprocess-with-vite/__tests__/preprocess-with-vite.spec.ts
index a7d33265d..948caf8ee 100644
--- a/packages/e2e-tests/preprocess-with-vite/__tests__/preprocess-with-vite.spec.ts
+++ b/packages/e2e-tests/preprocess-with-vite/__tests__/preprocess-with-vite.spec.ts
@@ -3,7 +3,7 @@ import { expect } from 'vitest';
test('should render App', async () => {
expect(await getText('h1.foo')).toBe('Hello world');
- expect(await getColor('#app-scss')).toBe('rgb(0, 0, 153)'); // darken($blue, 20)
+ expect(await getColor('#app-scss')).toBe('rgb(0, 0, 153)'); // color.adjust($blue, $lightness: -20%)
expect(await getText('#foo-title')).toBe('Styles with stylus blub');
expect(await getColor('#foo-title')).toBe('magenta');
expect(await getColor('p.note')).toBe('rgb(255, 62, 0)');
diff --git a/packages/e2e-tests/preprocess-with-vite/src/App.svelte b/packages/e2e-tests/preprocess-with-vite/src/App.svelte
index c325b33b3..998cea291 100644
--- a/packages/e2e-tests/preprocess-with-vite/src/App.svelte
+++ b/packages/e2e-tests/preprocess-with-vite/src/App.svelte
@@ -11,9 +11,10 @@