svelte 5.45.7 → 5.45.8
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
|
@@ -117,21 +117,8 @@ export class Parser {
|
|
|
117
117
|
e.unexpected_eof(this.index);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
while (regex_whitespace.test(template[start])) start += 1;
|
|
123
|
-
|
|
124
|
-
let end = /** @type {number} */ (
|
|
125
|
-
this.root.fragment.nodes[this.root.fragment.nodes.length - 1].end
|
|
126
|
-
);
|
|
127
|
-
while (regex_whitespace.test(template[end - 1])) end -= 1;
|
|
128
|
-
|
|
129
|
-
this.root.start = start;
|
|
130
|
-
this.root.end = end;
|
|
131
|
-
} else {
|
|
132
|
-
// @ts-ignore
|
|
133
|
-
this.root.start = this.root.end = null;
|
|
134
|
-
}
|
|
120
|
+
this.root.start = 0;
|
|
121
|
+
this.root.end = template.length;
|
|
135
122
|
|
|
136
123
|
const options_index = this.root.fragment.nodes.findIndex(
|
|
137
124
|
/** @param {any} thing */
|
|
@@ -146,5 +146,15 @@ export function VariableDeclarator(node, context) {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
context.
|
|
149
|
+
if (node.init && get_rune(node.init, context.state.scope) === '$props') {
|
|
150
|
+
// prevent erroneous `state_referenced_locally` warnings on prop fallbacks
|
|
151
|
+
context.visit(node.id, {
|
|
152
|
+
...context.state,
|
|
153
|
+
function_depth: context.state.function_depth + 1
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
context.visit(node.init);
|
|
157
|
+
} else {
|
|
158
|
+
context.next();
|
|
159
|
+
}
|
|
150
160
|
}
|
package/src/version.js
CHANGED