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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Svelte changelog
|
|
2
2
|
|
|
3
|
+
## 3.44.2
|
|
4
|
+
|
|
5
|
+
* Fix overly restrictive preprocessor types ([#6904](https://github.com/sveltejs/svelte/pull/6904))
|
|
6
|
+
* More specific typing for crossfade function - returns a tuple, not an array ([#6926](https://github.com/sveltejs/svelte/issues/6926))
|
|
7
|
+
* Add `URLSearchParams` as a known global ([#6938](https://github.com/sveltejs/svelte/pull/6938))
|
|
8
|
+
* Add `types` field to `exports` map ([#6939](https://github.com/sveltejs/svelte/issues/6939))
|
|
9
|
+
|
|
3
10
|
## 3.44.1
|
|
4
11
|
|
|
5
12
|
* Fix code generation when a multi-line `return` statement contains comments ([code-red#36](https://github.com/Rich-Harris/code-red/issues/36))
|
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ npm run test -- -g transition
|
|
|
64
64
|
|
|
65
65
|
## svelte.dev
|
|
66
66
|
|
|
67
|
-
The source code for https://svelte.dev, including all the documentation, lives in the [site](site) directory. The site is built with [
|
|
67
|
+
The source code for https://svelte.dev, including all the documentation, lives in the [site](site) directory. The site is built with [SvelteKit](https://kit.svelte.dev).
|
|
68
68
|
|
|
69
69
|
### Is svelte.dev down?
|
|
70
70
|
|
package/compiler.js
CHANGED
|
@@ -8212,6 +8212,8 @@
|
|
|
8212
8212
|
});
|
|
8213
8213
|
|
|
8214
8214
|
const whitespace = /[ \t\r\n]/;
|
|
8215
|
+
const start_whitespace = /^[ \t\r\n]*/;
|
|
8216
|
+
const end_whitespace = /[ \t\r\n]*$/;
|
|
8215
8217
|
const dimensions = /^(?:offset|client)(?:Width|Height)$/;
|
|
8216
8218
|
|
|
8217
8219
|
function list(items, conjunction = 'or') {
|
|
@@ -16398,6 +16400,7 @@
|
|
|
16398
16400
|
'undefined',
|
|
16399
16401
|
'URIError',
|
|
16400
16402
|
'URL',
|
|
16403
|
+
'URLSearchParams',
|
|
16401
16404
|
'window'
|
|
16402
16405
|
]);
|
|
16403
16406
|
const reserved = new Set([
|
|
@@ -17226,16 +17229,10 @@
|
|
|
17226
17229
|
}
|
|
17227
17230
|
|
|
17228
17231
|
function trim_start(str) {
|
|
17229
|
-
|
|
17230
|
-
while (whitespace.test(str[i]))
|
|
17231
|
-
i += 1;
|
|
17232
|
-
return str.slice(i);
|
|
17232
|
+
return str.replace(start_whitespace, '');
|
|
17233
17233
|
}
|
|
17234
17234
|
function trim_end(str) {
|
|
17235
|
-
|
|
17236
|
-
while (whitespace.test(str[i - 1]))
|
|
17237
|
-
i -= 1;
|
|
17238
|
-
return str.slice(0, i);
|
|
17235
|
+
return str.replace(end_whitespace, '');
|
|
17239
17236
|
}
|
|
17240
17237
|
|
|
17241
17238
|
function to_string(node) {
|
|
@@ -30144,7 +30141,7 @@
|
|
|
30144
30141
|
if (result) {
|
|
30145
30142
|
const { compile_options, name } = this;
|
|
30146
30143
|
const { format = 'esm' } = compile_options;
|
|
30147
|
-
const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.44.
|
|
30144
|
+
const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.44.2'}`;
|
|
30148
30145
|
const program = { type: 'Program', body: result.js };
|
|
30149
30146
|
walk(program, {
|
|
30150
30147
|
enter: (node, parent, key) => {
|
|
@@ -31591,10 +31588,10 @@
|
|
|
31591
31588
|
const { string, map } = await replace_in_code(tag_regex, process_single_tag, source);
|
|
31592
31589
|
return { string, map, dependencies };
|
|
31593
31590
|
}
|
|
31594
|
-
async function process_markup(
|
|
31591
|
+
async function process_markup(process, source) {
|
|
31595
31592
|
const processed = await process({
|
|
31596
31593
|
content: source.source,
|
|
31597
|
-
filename
|
|
31594
|
+
filename: source.filename
|
|
31598
31595
|
});
|
|
31599
31596
|
if (processed) {
|
|
31600
31597
|
return {
|
|
@@ -31613,7 +31610,6 @@
|
|
|
31613
31610
|
}
|
|
31614
31611
|
}
|
|
31615
31612
|
async function preprocess(source, preprocessor, options) {
|
|
31616
|
-
// @ts-ignore todo: doublecheck
|
|
31617
31613
|
const filename = (options && options.filename) || preprocessor.filename; // legacy
|
|
31618
31614
|
const preprocessors = preprocessor ? (Array.isArray(preprocessor) ? preprocessor : [preprocessor]) : [];
|
|
31619
31615
|
const markup = preprocessors.map(p => p.markup).filter(Boolean);
|
|
@@ -31623,7 +31619,7 @@
|
|
|
31623
31619
|
// TODO keep track: what preprocessor generated what sourcemap?
|
|
31624
31620
|
// to make debugging easier = detect low-resolution sourcemaps in fn combine_mappings
|
|
31625
31621
|
for (const process of markup) {
|
|
31626
|
-
result.update_source(await process_markup(
|
|
31622
|
+
result.update_source(await process_markup(process, result));
|
|
31627
31623
|
}
|
|
31628
31624
|
for (const process of script) {
|
|
31629
31625
|
result.update_source(await process_tag('script', process, result));
|
|
@@ -31634,7 +31630,7 @@
|
|
|
31634
31630
|
return result.to_processed();
|
|
31635
31631
|
}
|
|
31636
31632
|
|
|
31637
|
-
const VERSION = '3.44.
|
|
31633
|
+
const VERSION = '3.44.2';
|
|
31638
31634
|
|
|
31639
31635
|
exports.VERSION = VERSION;
|
|
31640
31636
|
exports.compile = compile;
|