Skip to content

Commit 76ce303

Browse files
authored
chore: bump esrap (#14969)
* chore: bump esrap * fix * bump again
1 parent 9b6e65f commit 76ce303

File tree

45 files changed

+414
-414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+414
-414
lines changed

packages/svelte/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
"axobject-query": "^4.1.0",
156156
"clsx": "^2.1.1",
157157
"esm-env": "^1.2.1",
158-
"esrap": "^1.3.2",
158+
"esrap": "^1.4.2",
159159
"is-reference": "^3.0.3",
160160
"locate-character": "^3.0.0",
161161
"magic-string": "^0.30.11",

packages/svelte/src/compiler/errors.js

+165-165
Large diffs are not rendered by default.

packages/svelte/src/compiler/warnings.js

+156-156
Large diffs are not rendered by default.

packages/svelte/src/internal/client/warnings.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function hydration_attribute_changed(attribute, html, value) {
7676
*/
7777
export function hydration_html_changed(location) {
7878
if (DEV) {
79-
console.warn(`%c[svelte] hydration_html_changed\n%c${location ? `The value of an \`{@html ...}\` block ${location} changed between server and client renders. The client value will be ignored in favour of the server value` : "The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}\nhttps://svelte.dev/e/hydration_html_changed`, bold, normal);
79+
console.warn(`%c[svelte] hydration_html_changed\n%c${location ? `The value of an \`{@html ...}\` block ${location} changed between server and client renders. The client value will be ignored in favour of the server value` : 'The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value'}\nhttps://svelte.dev/e/hydration_html_changed`, bold, normal);
8080
} else {
8181
console.warn(`https://svelte.dev/e/hydration_html_changed`);
8282
}
@@ -88,7 +88,7 @@ export function hydration_html_changed(location) {
8888
*/
8989
export function hydration_mismatch(location) {
9090
if (DEV) {
91-
console.warn(`%c[svelte] hydration_mismatch\n%c${location ? `Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}` : "Hydration failed because the initial UI does not match what was rendered on the server"}\nhttps://svelte.dev/e/hydration_mismatch`, bold, normal);
91+
console.warn(`%c[svelte] hydration_mismatch\n%c${location ? `Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}` : 'Hydration failed because the initial UI does not match what was rendered on the server'}\nhttps://svelte.dev/e/hydration_mismatch`, bold, normal);
9292
} else {
9393
console.warn(`https://svelte.dev/e/hydration_mismatch`);
9494
}
@@ -149,7 +149,7 @@ export function ownership_invalid_binding(parent, child, owner) {
149149
*/
150150
export function ownership_invalid_mutation(component, owner) {
151151
if (DEV) {
152-
console.warn(`%c[svelte] ownership_invalid_mutation\n%c${component ? `${component} mutated a value owned by ${owner}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead` : "Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}\nhttps://svelte.dev/e/ownership_invalid_mutation`, bold, normal);
152+
console.warn(`%c[svelte] ownership_invalid_mutation\n%c${component ? `${component} mutated a value owned by ${owner}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead` : 'Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead'}\nhttps://svelte.dev/e/ownership_invalid_mutation`, bold, normal);
153153
} else {
154154
console.warn(`https://svelte.dev/e/ownership_invalid_mutation`);
155155
}

packages/svelte/src/internal/shared/warnings.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function state_snapshot_uncloneable(properties) {
2929
? `The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals:
3030
3131
${properties}`
32-
: "Value cannot be cloned with `$state.snapshot` — the original value was returned"}\nhttps://svelte.dev/e/state_snapshot_uncloneable`, bold, normal);
32+
: 'Value cannot be cloned with `$state.snapshot` — the original value was returned'}\nhttps://svelte.dev/e/state_snapshot_uncloneable`, bold, normal);
3333
} else {
3434
console.warn(`https://svelte.dev/e/state_snapshot_uncloneable`);
3535
}

packages/svelte/tests/snapshot/samples/await-block-scope/_expected/client/index.svelte.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import "svelte/internal/disclose-version";
2-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import * as $ from 'svelte/internal/client';
33

44
function increment(_, counter) {
55
counter.count += 1;
@@ -26,11 +26,11 @@ export default function Await_block_scope($$anchor) {
2626
var text_1 = $.sibling(node);
2727

2828
$.template_effect(() => {
29-
$.set_text(text, `clicks: ${counter.count ?? ""}`);
30-
$.set_text(text_1, ` ${counter.count ?? ""}`);
29+
$.set_text(text, `clicks: ${counter.count ?? ''}`);
30+
$.set_text(text_1, ` ${counter.count ?? ''}`);
3131
});
3232

3333
$.append($$anchor, fragment);
3434
}
3535

36-
$.delegate(["click"]);
36+
$.delegate(['click']);

packages/svelte/tests/snapshot/samples/await-block-scope/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Await_block_scope($$payload) {
44
let counter = { count: 0 };

packages/svelte/tests/snapshot/samples/bind-component-snippet/_expected/client/index.svelte.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import "svelte/internal/disclose-version";
2-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import * as $ from 'svelte/internal/client';
33
import TextInput from './Child.svelte';
44

55
const snippet = ($$anchor) => {
66
$.next();
77

8-
var text = $.text("Something");
8+
var text = $.text('Something');
99

1010
$.append($$anchor, text);
1111
};
@@ -29,6 +29,6 @@ export default function Bind_component_snippet($$anchor) {
2929

3030
var text_1 = $.sibling(node);
3131

32-
$.template_effect(() => $.set_text(text_1, ` value: ${$.get(value) ?? ""}`));
32+
$.template_effect(() => $.set_text(text_1, ` value: ${$.get(value) ?? ''}`));
3333
$.append($$anchor, fragment);
3434
}

packages/svelte/tests/snapshot/samples/bind-component-snippet/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22
import TextInput from './Child.svelte';
33

44
function snippet($$payload) {

packages/svelte/tests/snapshot/samples/bind-this/_expected/client/index.svelte.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import "svelte/internal/disclose-version";
2-
import "svelte/internal/flags/legacy";
3-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import 'svelte/internal/flags/legacy';
3+
import * as $ from 'svelte/internal/client';
44

55
export default function Bind_this($$anchor) {
66
$.bind_this(Foo($$anchor, { $$legacy: true }), ($$value) => foo = $$value, () => foo);

packages/svelte/tests/snapshot/samples/bind-this/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Bind_this($$payload) {
44
Foo($$payload, {});

packages/svelte/tests/snapshot/samples/class-state-field-constructor-assignment/_expected/client/index.svelte.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import "svelte/internal/disclose-version";
2-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import * as $ from 'svelte/internal/client';
33

44
export default function Class_state_field_constructor_assignment($$anchor, $$props) {
55
$.push($$props, true);

packages/svelte/tests/snapshot/samples/class-state-field-constructor-assignment/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Class_state_field_constructor_assignment($$payload, $$props) {
44
$.push();

packages/svelte/tests/snapshot/samples/destructured-assignments/_expected/client/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* index.svelte.js generated by Svelte VERSION */
2-
import * as $ from "svelte/internal/client";
2+
import * as $ from 'svelte/internal/client';
33

44
let a = $.state(1);
55
let b = $.state(2);

packages/svelte/tests/snapshot/samples/destructured-assignments/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* index.svelte.js generated by Svelte VERSION */
2-
import * as $ from "svelte/internal/server";
2+
import * as $ from 'svelte/internal/server';
33

44
let a = 1;
55
let b = 2;

packages/svelte/tests/snapshot/samples/dynamic-attributes-casing/_expected/client/main.svelte.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import "svelte/internal/disclose-version";
2-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import * as $ from 'svelte/internal/client';
33

44
var root = $.template(`<div></div> <svg></svg> <custom-element></custom-element> <div></div> <svg></svg> <custom-element></custom-element>`, 3);
55

@@ -13,20 +13,20 @@ export default function Main($$anchor) {
1313
var custom_element = $.sibling(svg, 2);
1414
var div_1 = $.sibling(custom_element, 2);
1515

16-
$.template_effect(() => $.set_attribute(div_1, "foobar", y()));
16+
$.template_effect(() => $.set_attribute(div_1, 'foobar', y()));
1717

1818
var svg_1 = $.sibling(div_1, 2);
1919

20-
$.template_effect(() => $.set_attribute(svg_1, "viewBox", y()));
20+
$.template_effect(() => $.set_attribute(svg_1, 'viewBox', y()));
2121

2222
var custom_element_1 = $.sibling(svg_1, 2);
2323

24-
$.template_effect(() => $.set_custom_element_data(custom_element_1, "fooBar", y()));
24+
$.template_effect(() => $.set_custom_element_data(custom_element_1, 'fooBar', y()));
2525

2626
$.template_effect(() => {
27-
$.set_attribute(div, "foobar", x);
28-
$.set_attribute(svg, "viewBox", x);
29-
$.set_custom_element_data(custom_element, "fooBar", x);
27+
$.set_attribute(div, 'foobar', x);
28+
$.set_attribute(svg, 'viewBox', x);
29+
$.set_custom_element_data(custom_element, 'fooBar', x);
3030
});
3131

3232
$.append($$anchor, fragment);
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Main($$payload) {
44
// needs to be a snapshot test because jsdom does auto-correct the attribute casing
55
let x = 'test';
66
let y = () => 'test';
77

8-
$$payload.out += `<div${$.attr("foobar", x)}></div> <svg${$.attr("viewBox", x)}></svg> <custom-element${$.attr("foobar", x)}></custom-element> <div${$.attr("foobar", y())}></div> <svg${$.attr("viewBox", y())}></svg> <custom-element${$.attr("foobar", y())}></custom-element>`;
8+
$$payload.out += `<div${$.attr('foobar', x)}></div> <svg${$.attr('viewBox', x)}></svg> <custom-element${$.attr('foobar', x)}></custom-element> <div${$.attr('foobar', y())}></div> <svg${$.attr('viewBox', y())}></svg> <custom-element${$.attr('foobar', y())}></custom-element>`;
99
}

packages/svelte/tests/snapshot/samples/each-string-template/_expected/client/index.svelte.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import "svelte/internal/disclose-version";
2-
import "svelte/internal/flags/legacy";
3-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import 'svelte/internal/flags/legacy';
3+
import * as $ from 'svelte/internal/client';
44

55
export default function Each_string_template($$anchor) {
66
var fragment = $.comment();
@@ -11,7 +11,7 @@ export default function Each_string_template($$anchor) {
1111

1212
var text = $.text();
1313

14-
$.template_effect(() => $.set_text(text, `${thing ?? ""}, `));
14+
$.template_effect(() => $.set_text(text, `${thing ?? ''}, `));
1515
$.append($$anchor, text);
1616
});
1717

packages/svelte/tests/snapshot/samples/each-string-template/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Each_string_template($$payload) {
44
const each_array = $.ensure_array_like(['foo', 'bar', 'baz']);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/* index.svelte.js generated by Svelte VERSION */
2-
import * as $ from "svelte/internal/client";
2+
import * as $ from 'svelte/internal/client';
33

44
export const object = $.proxy({ ok: true });
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/* index.svelte.js generated by Svelte VERSION */
2-
import * as $ from "svelte/internal/server";
2+
import * as $ from 'svelte/internal/server';
33

44
export const object = { ok: true };

packages/svelte/tests/snapshot/samples/function-prop-no-getter/_expected/client/index.svelte.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import "svelte/internal/disclose-version";
2-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import * as $ from 'svelte/internal/client';
33

44
export default function Function_prop_no_getter($$anchor) {
55
let count = $.state(0);
@@ -19,7 +19,7 @@ export default function Function_prop_no_getter($$anchor) {
1919

2020
var text = $.text();
2121

22-
$.template_effect(() => $.set_text(text, `clicks: ${$.get(count) ?? ""}`));
22+
$.template_effect(() => $.set_text(text, `clicks: ${$.get(count) ?? ''}`));
2323
$.append($$anchor, text);
2424
},
2525
$$slots: { default: true }

packages/svelte/tests/snapshot/samples/function-prop-no-getter/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Function_prop_no_getter($$payload) {
44
let count = 0;

packages/svelte/tests/snapshot/samples/hello-world/_expected/client/index.svelte.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import "svelte/internal/disclose-version";
2-
import "svelte/internal/flags/legacy";
3-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import 'svelte/internal/flags/legacy';
3+
import * as $ from 'svelte/internal/client';
44

55
var root = $.template(`<h1>hello world</h1>`);
66

packages/svelte/tests/snapshot/samples/hello-world/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Hello_world($$payload) {
44
$$payload.out += `<h1>hello world</h1>`;

packages/svelte/tests/snapshot/samples/hmr/_expected/client/index.svelte.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import "svelte/internal/disclose-version";
2-
import "svelte/internal/flags/legacy";
3-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import 'svelte/internal/flags/legacy';
3+
import * as $ from 'svelte/internal/client';
44

55
var root = $.template(`<h1>hello world</h1>`);
66

packages/svelte/tests/snapshot/samples/hmr/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Hmr($$payload) {
44
$$payload.out += `<h1>hello world</h1>`;

packages/svelte/tests/snapshot/samples/imports-in-modules/_expected/client/index.svelte.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import "svelte/internal/disclose-version";
2-
import "svelte/internal/flags/legacy";
3-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import 'svelte/internal/flags/legacy';
3+
import * as $ from 'svelte/internal/client';
44
import { random } from './module.svelte';
55

66
export default function Imports_in_modules($$anchor) {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* module.svelte.js generated by Svelte VERSION */
2-
import * as $ from "svelte/internal/client";
2+
import * as $ from 'svelte/internal/client';
33
import { random } from './export';
44

55
export { random };

packages/svelte/tests/snapshot/samples/imports-in-modules/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22
import { random } from './module.svelte';
33

44
export default function Imports_in_modules($$payload) {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* module.svelte.js generated by Svelte VERSION */
2-
import * as $ from "svelte/internal/server";
2+
import * as $ from 'svelte/internal/server';
33
import { random } from './export';
44

55
export { random };

packages/svelte/tests/snapshot/samples/props-identifier/_expected/client/index.svelte.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import "svelte/internal/disclose-version";
2-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import * as $ from 'svelte/internal/client';
33

44
export default function Props_identifier($$anchor, $$props) {
55
$.push($$props, true);
66

7-
let props = $.rest_props($$props, ["$$slots", "$$events", "$$legacy"]);
7+
let props = $.rest_props($$props, ['$$slots', '$$events', '$$legacy']);
88

99
$$props.a;
1010
props[a];

packages/svelte/tests/snapshot/samples/props-identifier/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Props_identifier($$payload, $$props) {
44
$.push();

packages/svelte/tests/snapshot/samples/purity/_expected/client/index.svelte.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import "svelte/internal/disclose-version";
2-
import "svelte/internal/flags/legacy";
3-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import 'svelte/internal/flags/legacy';
3+
import * as $ from 'svelte/internal/client';
44

55
var root = $.template(`<p></p> <p></p> <!>`, 1);
66

packages/svelte/tests/snapshot/samples/purity/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Purity($$payload) {
44
$$payload.out += `<p>${$.escape(Math.max(0, Math.min(0, 100)))}</p> <p>${$.escape(location.href)}</p> `;

packages/svelte/tests/snapshot/samples/skip-static-subtree/_expected/client/index.svelte.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import "svelte/internal/disclose-version";
2-
import * as $ from "svelte/internal/client";
1+
import 'svelte/internal/disclose-version';
2+
import * as $ from 'svelte/internal/client';
33

44
var root = $.template(`<header><nav><a href="/">Home</a> <a href="/away">Away</a></nav></header> <main><h1> </h1> <div class="static"><p>we don't need to traverse these nodes</p></div> <p>or</p> <p>these</p> <p>ones</p> <!> <p>these</p> <p>trailing</p> <p>nodes</p> <p>can</p> <p>be</p> <p>completely</p> <p>ignored</p></main> <cant-skip><custom-elements></custom-elements></cant-skip> <div><input></div> <div><source></div> <select><option>a</option></select> <img src="..." alt="" loading="lazy"> <div><img src="..." alt="" loading="lazy"></div>`, 3);
55

@@ -20,7 +20,7 @@ export default function Skip_static_subtree($$anchor, $$props) {
2020
var cant_skip = $.sibling(main, 2);
2121
var custom_elements = $.child(cant_skip);
2222

23-
$.set_custom_element_data(custom_elements, "with", "attributes");
23+
$.set_custom_element_data(custom_elements, 'with', 'attributes');
2424
$.reset(cant_skip);
2525

2626
var div = $.sibling(cant_skip, 2);
@@ -38,7 +38,7 @@ export default function Skip_static_subtree($$anchor, $$props) {
3838
var select = $.sibling(div_1, 2);
3939
var option = $.child(select);
4040

41-
option.value = null == (option.__value = "a") ? "" : "a";
41+
option.value = null == (option.__value = 'a') ? '' : 'a';
4242
$.reset(select);
4343

4444
var img = $.sibling(select, 2);

packages/svelte/tests/snapshot/samples/skip-static-subtree/_expected/server/index.svelte.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as $ from "svelte/internal/server";
1+
import * as $ from 'svelte/internal/server';
22

33
export default function Skip_static_subtree($$payload, $$props) {
44
let { title, content } = $$props;

0 commit comments

Comments
 (0)