svelte 5.45.1 → 5.45.2
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/package.json
CHANGED
package/src/compiler/errors.js
CHANGED
|
@@ -1129,6 +1129,15 @@ export function expected_pattern(node) {
|
|
|
1129
1129
|
e(node, 'expected_pattern', `Expected identifier or destructure pattern\nhttps://svelte.dev/e/expected_pattern`);
|
|
1130
1130
|
}
|
|
1131
1131
|
|
|
1132
|
+
/**
|
|
1133
|
+
* Expected 'html', 'render', 'attach', 'const', or 'debug'
|
|
1134
|
+
* @param {null | number | NodeLike} node
|
|
1135
|
+
* @returns {never}
|
|
1136
|
+
*/
|
|
1137
|
+
export function expected_tag(node) {
|
|
1138
|
+
e(node, 'expected_tag', `Expected 'html', 'render', 'attach', 'const', or 'debug'\nhttps://svelte.dev/e/expected_tag`);
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1132
1141
|
/**
|
|
1133
1142
|
* Expected token %token%
|
|
1134
1143
|
* @param {null | number | NodeLike} node
|
|
@@ -724,6 +724,7 @@ function special(parser) {
|
|
|
724
724
|
expression: new ExpressionMetadata()
|
|
725
725
|
}
|
|
726
726
|
});
|
|
727
|
+
return;
|
|
727
728
|
}
|
|
728
729
|
|
|
729
730
|
if (parser.eat('render')) {
|
|
@@ -755,5 +756,7 @@ function special(parser) {
|
|
|
755
756
|
snippets: new Set()
|
|
756
757
|
}
|
|
757
758
|
});
|
|
759
|
+
return;
|
|
758
760
|
}
|
|
761
|
+
e.expected_tag(parser.index);
|
|
759
762
|
}
|
|
@@ -54,7 +54,10 @@ export function transform_body(instance_body, runner, transform) {
|
|
|
54
54
|
);
|
|
55
55
|
|
|
56
56
|
const statements = visited.declarations.map((node) => {
|
|
57
|
-
if (
|
|
57
|
+
if (
|
|
58
|
+
node.id.type === 'Identifier' &&
|
|
59
|
+
(node.id.name.startsWith('$$d') || node.id.name.startsWith('$$array'))
|
|
60
|
+
) {
|
|
58
61
|
// this is an intermediate declaration created in VariableDeclaration.js;
|
|
59
62
|
// subsequent statements depend on it
|
|
60
63
|
return b.var(node.id, node.init);
|
package/src/version.js
CHANGED