svelte 3.44.1 → 3.44.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/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/compiler.js +10 -14
- package/compiler.js.map +1 -1
- package/compiler.mjs +10 -14
- package/compiler.mjs.map +1 -1
- package/internal/index.js +1 -1
- package/internal/index.mjs +1 -1
- package/package.json +14 -1
- package/types/compiler/preprocess/types.d.ts +3 -3
- package/types/compiler/utils/patterns.d.ts +2 -0
- package/types/runtime/transition/index.d.ts +4 -2
package/compiler.mjs
CHANGED
|
@@ -8206,6 +8206,8 @@ const parse_expression_at = (source, index) => parseExpressionAt$1(source, index
|
|
|
8206
8206
|
});
|
|
8207
8207
|
|
|
8208
8208
|
const whitespace = /[ \t\r\n]/;
|
|
8209
|
+
const start_whitespace = /^[ \t\r\n]*/;
|
|
8210
|
+
const end_whitespace = /[ \t\r\n]*$/;
|
|
8209
8211
|
const dimensions = /^(?:offset|client)(?:Width|Height)$/;
|
|
8210
8212
|
|
|
8211
8213
|
function list(items, conjunction = 'or') {
|
|
@@ -16392,6 +16394,7 @@ const globals = new Set([
|
|
|
16392
16394
|
'undefined',
|
|
16393
16395
|
'URIError',
|
|
16394
16396
|
'URL',
|
|
16397
|
+
'URLSearchParams',
|
|
16395
16398
|
'window'
|
|
16396
16399
|
]);
|
|
16397
16400
|
const reserved = new Set([
|
|
@@ -17220,16 +17223,10 @@ function read_context(parser) {
|
|
|
17220
17223
|
}
|
|
17221
17224
|
|
|
17222
17225
|
function trim_start(str) {
|
|
17223
|
-
|
|
17224
|
-
while (whitespace.test(str[i]))
|
|
17225
|
-
i += 1;
|
|
17226
|
-
return str.slice(i);
|
|
17226
|
+
return str.replace(start_whitespace, '');
|
|
17227
17227
|
}
|
|
17228
17228
|
function trim_end(str) {
|
|
17229
|
-
|
|
17230
|
-
while (whitespace.test(str[i - 1]))
|
|
17231
|
-
i -= 1;
|
|
17232
|
-
return str.slice(0, i);
|
|
17229
|
+
return str.replace(end_whitespace, '');
|
|
17233
17230
|
}
|
|
17234
17231
|
|
|
17235
17232
|
function to_string(node) {
|
|
@@ -30138,7 +30135,7 @@ class Component {
|
|
|
30138
30135
|
if (result) {
|
|
30139
30136
|
const { compile_options, name } = this;
|
|
30140
30137
|
const { format = 'esm' } = compile_options;
|
|
30141
|
-
const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.44.
|
|
30138
|
+
const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.44.2'}`;
|
|
30142
30139
|
const program = { type: 'Program', body: result.js };
|
|
30143
30140
|
walk(program, {
|
|
30144
30141
|
enter: (node, parent, key) => {
|
|
@@ -31585,10 +31582,10 @@ async function process_tag(tag_name, preprocessor, source) {
|
|
|
31585
31582
|
const { string, map } = await replace_in_code(tag_regex, process_single_tag, source);
|
|
31586
31583
|
return { string, map, dependencies };
|
|
31587
31584
|
}
|
|
31588
|
-
async function process_markup(
|
|
31585
|
+
async function process_markup(process, source) {
|
|
31589
31586
|
const processed = await process({
|
|
31590
31587
|
content: source.source,
|
|
31591
|
-
filename
|
|
31588
|
+
filename: source.filename
|
|
31592
31589
|
});
|
|
31593
31590
|
if (processed) {
|
|
31594
31591
|
return {
|
|
@@ -31607,7 +31604,6 @@ async function process_markup(filename, process, source) {
|
|
|
31607
31604
|
}
|
|
31608
31605
|
}
|
|
31609
31606
|
async function preprocess(source, preprocessor, options) {
|
|
31610
|
-
// @ts-ignore todo: doublecheck
|
|
31611
31607
|
const filename = (options && options.filename) || preprocessor.filename; // legacy
|
|
31612
31608
|
const preprocessors = preprocessor ? (Array.isArray(preprocessor) ? preprocessor : [preprocessor]) : [];
|
|
31613
31609
|
const markup = preprocessors.map(p => p.markup).filter(Boolean);
|
|
@@ -31617,7 +31613,7 @@ async function preprocess(source, preprocessor, options) {
|
|
|
31617
31613
|
// TODO keep track: what preprocessor generated what sourcemap?
|
|
31618
31614
|
// to make debugging easier = detect low-resolution sourcemaps in fn combine_mappings
|
|
31619
31615
|
for (const process of markup) {
|
|
31620
|
-
result.update_source(await process_markup(
|
|
31616
|
+
result.update_source(await process_markup(process, result));
|
|
31621
31617
|
}
|
|
31622
31618
|
for (const process of script) {
|
|
31623
31619
|
result.update_source(await process_tag('script', process, result));
|
|
@@ -31628,7 +31624,7 @@ async function preprocess(source, preprocessor, options) {
|
|
|
31628
31624
|
return result.to_processed();
|
|
31629
31625
|
}
|
|
31630
31626
|
|
|
31631
|
-
const VERSION = '3.44.
|
|
31627
|
+
const VERSION = '3.44.2';
|
|
31632
31628
|
|
|
31633
31629
|
export { VERSION, compile, parse$3 as parse, preprocess, walk };
|
|
31634
31630
|
//# sourceMappingURL=compiler.mjs.map
|