From eb3ef949eea6abb15369874c88c767b2b634bfa5 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 22 Jun 2021 09:16:25 -0400 Subject: [PATCH] update js sample snapshots --- .../action-custom-event-handler/expected.js | 2 +- test/js/samples/action/expected.js | 4 +-- test/js/samples/bind-open/expected.js | 2 +- test/js/samples/bind-width-height/expected.js | 4 +-- .../bindings-readonly-order/expected.js | 2 +- .../samples/capture-inject-state/expected.js | 28 +++++++-------- .../expected.js | 2 +- .../samples/component-static-var/expected.js | 4 +-- .../expected.js | 2 +- .../expected.js | 2 +- .../expected.js | 2 +- .../samples/computed-collapsed-if/expected.js | 2 +- test/js/samples/data-attribute/expected.js | 2 +- test/js/samples/debug-empty/expected.js | 12 +++---- .../debug-foo-bar-baz-things/expected.js | 30 ++++++++-------- test/js/samples/debug-foo/expected.js | 18 +++++----- test/js/samples/debug-hoisted/expected.js | 8 ++--- .../samples/debug-no-dependencies/expected.js | 4 +-- .../samples/deconflict-builtins/expected.js | 2 +- .../js/samples/deconflict-globals/expected.js | 6 ++-- .../expected.js | 14 ++++---- test/js/samples/dynamic-import/expected.js | 4 +-- .../each-block-array-literal/expected.js | 10 +++--- .../each-block-changed-check/expected.js | 8 ++--- .../each-block-keyed-animated/expected.js | 2 +- test/js/samples/each-block-keyed/expected.js | 2 +- .../js/samples/if-block-no-update/expected.js | 2 +- test/js/samples/if-block-simple/expected.js | 2 +- .../expected.js | 6 ++-- .../inline-style-optimized-url/expected.js | 2 +- .../inline-style-optimized/expected.js | 2 +- .../inline-style-unoptimized/expected.js | 6 ++-- .../inline-style-without-updates/expected.js | 2 +- test/js/samples/input-files/expected.js | 2 +- .../input-no-initial-value/expected.js | 2 +- test/js/samples/input-range/expected.js | 2 +- test/js/samples/input-value/expected.js | 2 +- .../input-without-blowback-guard/expected.js | 2 +- test/js/samples/loop-protect/expected.js | 10 +++--- test/js/samples/media-bindings/expected.js | 22 ++++++------ .../non-imported-component/expected.js | 2 +- .../samples/non-mutable-reference/expected.js | 2 +- test/js/samples/optional-chaining/expected.js | 36 +++++++++---------- .../reactive-class-optimized/expected.js | 4 +-- .../expected.js | 2 +- .../expected.js | 6 ++-- .../samples/select-dynamic-value/expected.js | 2 +- .../samples/src-attribute-check/expected.js | 4 +-- .../samples/ssr-no-oncreate-etc/expected.js | 8 ++--- test/js/samples/title/expected.js | 2 +- test/js/samples/transition-local/expected.js | 4 +-- .../transition-repeated-outro/expected.js | 4 +-- .../samples/unchanged-expression/expected.js | 8 ++--- .../expected.js | 2 +- .../use-elements-as-anchors/expected.js | 10 +++--- test/js/samples/video-bindings/expected.js | 8 ++--- .../samples/window-binding-scroll/expected.js | 2 +- 57 files changed, 174 insertions(+), 174 deletions(-) diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js index 51656290d6..6433d5b04a 100644 --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -56,7 +56,7 @@ function instance($$self, $$props, $$invalidate) { const foo_function = () => handleFoo(bar); $$self.$$set = $$props => { - if ("bar" in $$props) $$invalidate(0, bar = $$props.bar); + if ('bar' in $$props) $$invalidate(0, bar = $$props.bar); }; return [bar, foo_function]; diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index d52960bddd..689669c5bc 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -48,11 +48,11 @@ function link(node) { history.pushState(null, null, event.target.href); } - node.addEventListener("click", onClick); + node.addEventListener('click', onClick); return { destroy() { - node.removeEventListener("click", onClick); + node.removeEventListener('click', onClick); } }; } diff --git a/test/js/samples/bind-open/expected.js b/test/js/samples/bind-open/expected.js index 56ff302845..669cb41405 100644 --- a/test/js/samples/bind-open/expected.js +++ b/test/js/samples/bind-open/expected.js @@ -53,7 +53,7 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = $$props => { - if ("open" in $$props) $$invalidate(0, open = $$props.open); + if ('open' in $$props) $$invalidate(0, open = $$props.open); }; return [open, details_toggle_handler]; diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js index f23c20b683..8966e57c9c 100644 --- a/test/js/samples/bind-width-height/expected.js +++ b/test/js/samples/bind-width-height/expected.js @@ -47,8 +47,8 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = $$props => { - if ("w" in $$props) $$invalidate(0, w = $$props.w); - if ("h" in $$props) $$invalidate(1, h = $$props.h); + if ('w' in $$props) $$invalidate(0, w = $$props.w); + if ('h' in $$props) $$invalidate(1, h = $$props.h); }; return [w, h, div_elementresize_handler]; diff --git a/test/js/samples/bindings-readonly-order/expected.js b/test/js/samples/bindings-readonly-order/expected.js index 78a71dcd84..ea83573ee3 100644 --- a/test/js/samples/bindings-readonly-order/expected.js +++ b/test/js/samples/bindings-readonly-order/expected.js @@ -69,7 +69,7 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = $$props => { - if ("files" in $$props) $$invalidate(0, files = $$props.files); + if ('files' in $$props) $$invalidate(0, files = $$props.files); }; return [files, input0_change_handler, input1_change_handler]; diff --git a/test/js/samples/capture-inject-state/expected.js b/test/js/samples/capture-inject-state/expected.js index 6485526bd4..58e1879553 100644 --- a/test/js/samples/capture-inject-state/expected.js +++ b/test/js/samples/capture-inject-state/expected.js @@ -95,7 +95,7 @@ const moduleContantProps = 4; let moduleLet; const moduleConst = 2; let shadowedByModule; -const priv = "priv"; +const priv = 'priv'; function instance($$self, $$props, $$invalidate) { let computed; @@ -106,22 +106,22 @@ function instance($$self, $$props, $$invalidate) { $$self.$$.on_destroy.push(() => $$unsubscribe_prop()); let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Component", slots, []); + validate_slots('Component', slots, []); let { prop } = $$props; - validate_store(prop, "prop"); + validate_store(prop, 'prop'); $$subscribe_prop(); let { alias: realName } = $$props; let local; let shadowedByModule; - const writable_props = ["prop", "alias"]; + const writable_props = ['prop', 'alias']; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); }); $$self.$$set = $$props => { - if ("prop" in $$props) $$subscribe_prop($$invalidate(0, prop = $$props.prop)); - if ("alias" in $$props) $$invalidate(1, realName = $$props.alias); + if ('prop' in $$props) $$subscribe_prop($$invalidate(0, prop = $$props.prop)); + if ('alias' in $$props) $$invalidate(1, realName = $$props.alias); }; $$self.$capture_state = () => ({ @@ -140,11 +140,11 @@ function instance($$self, $$props, $$invalidate) { }); $$self.$inject_state = $$props => { - if ("prop" in $$props) $$subscribe_prop($$invalidate(0, prop = $$props.prop)); - if ("realName" in $$props) $$invalidate(1, realName = $$props.realName); - if ("local" in $$props) $$invalidate(3, local = $$props.local); - if ("shadowedByModule" in $$props) $$invalidate(4, shadowedByModule = $$props.shadowedByModule); - if ("computed" in $$props) computed = $$props.computed; + if ('prop' in $$props) $$subscribe_prop($$invalidate(0, prop = $$props.prop)); + if ('realName' in $$props) $$invalidate(1, realName = $$props.realName); + if ('local' in $$props) $$invalidate(3, local = $$props.local); + if ('shadowedByModule' in $$props) $$invalidate(4, shadowedByModule = $$props.shadowedByModule); + if ('computed' in $$props) computed = $$props.computed; }; if ($$props && "$$inject" in $$props) { @@ -170,11 +170,11 @@ class Component extends SvelteComponentDev { const { ctx } = this.$$; const props = options.props || {}; - if (/*prop*/ ctx[0] === undefined && !("prop" in props)) { + if (/*prop*/ ctx[0] === undefined && !('prop' in props)) { console.warn(" was created without expected prop 'prop'"); } - if (/*realName*/ ctx[1] === undefined && !("alias" in props)) { + if (/*realName*/ ctx[1] === undefined && !('alias' in props)) { console.warn(" was created without expected prop 'alias'"); } } diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index 67335ce246..bd1f3ce3d2 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -49,7 +49,7 @@ function instance($$self, $$props, $$invalidate) { let { foo = 42 } = $$props; $$self.$$set = $$props => { - if ("foo" in $$props) $$invalidate(0, foo = $$props.foo); + if ('foo' in $$props) $$invalidate(0, foo = $$props.foo); }; return [foo]; diff --git a/test/js/samples/component-static-var/expected.js b/test/js/samples/component-static-var/expected.js index 2cd5ed386f..9e481a25c3 100644 --- a/test/js/samples/component-static-var/expected.js +++ b/test/js/samples/component-static-var/expected.js @@ -16,8 +16,8 @@ import { transition_out } from "svelte/internal"; -import Foo from "./Foo.svelte"; -import Bar from "./Bar.svelte"; +import Foo from './Foo.svelte'; +import Bar from './Bar.svelte'; function create_fragment(ctx) { let foo; diff --git a/test/js/samples/component-store-access-invalidate/expected.js b/test/js/samples/component-store-access-invalidate/expected.js index 4c7bfd7009..2742481aef 100644 --- a/test/js/samples/component-store-access-invalidate/expected.js +++ b/test/js/samples/component-store-access-invalidate/expected.js @@ -13,7 +13,7 @@ import { text } from "svelte/internal"; -import { writable } from "svelte/store"; +import { writable } from 'svelte/store'; function create_fragment(ctx) { let h1; diff --git a/test/js/samples/component-store-file-invalidate/expected.js b/test/js/samples/component-store-file-invalidate/expected.js index d2fb3d0be4..86a467f368 100644 --- a/test/js/samples/component-store-file-invalidate/expected.js +++ b/test/js/samples/component-store-file-invalidate/expected.js @@ -7,7 +7,7 @@ import { set_store_value } from "svelte/internal"; -import { count } from "./store.js"; +import { count } from './store.js'; function instance($$self, $$props, $$invalidate) { let $count; diff --git a/test/js/samples/component-store-reassign-invalidate/expected.js b/test/js/samples/component-store-reassign-invalidate/expected.js index 0cf555bf0d..9047316cef 100644 --- a/test/js/samples/component-store-reassign-invalidate/expected.js +++ b/test/js/samples/component-store-reassign-invalidate/expected.js @@ -15,7 +15,7 @@ import { text } from "svelte/internal"; -import { writable } from "svelte/store"; +import { writable } from 'svelte/store'; function create_fragment(ctx) { let h1; diff --git a/test/js/samples/computed-collapsed-if/expected.js b/test/js/samples/computed-collapsed-if/expected.js index 3e70d6a7ae..8bcb5ed8b7 100644 --- a/test/js/samples/computed-collapsed-if/expected.js +++ b/test/js/samples/computed-collapsed-if/expected.js @@ -13,7 +13,7 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = $$props => { - if ("x" in $$props) $$invalidate(0, x = $$props.x); + if ('x' in $$props) $$invalidate(0, x = $$props.x); }; return [x, a, b]; diff --git a/test/js/samples/data-attribute/expected.js b/test/js/samples/data-attribute/expected.js index 8c30e6f6db..2b2f8870e4 100644 --- a/test/js/samples/data-attribute/expected.js +++ b/test/js/samples/data-attribute/expected.js @@ -48,7 +48,7 @@ function instance($$self, $$props, $$invalidate) { let { bar } = $$props; $$self.$$set = $$props => { - if ("bar" in $$props) $$invalidate(0, bar = $$props.bar); + if ('bar' in $$props) $$invalidate(0, bar = $$props.bar); }; return [bar]; diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index c18eb8699c..55303b41b7 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -70,22 +70,22 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Component", slots, []); + validate_slots('Component', slots, []); let { name } = $$props; - const writable_props = ["name"]; + const writable_props = ['name']; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); }); $$self.$$set = $$props => { - if ("name" in $$props) $$invalidate(0, name = $$props.name); + if ('name' in $$props) $$invalidate(0, name = $$props.name); }; $$self.$capture_state = () => ({ name }); $$self.$inject_state = $$props => { - if ("name" in $$props) $$invalidate(0, name = $$props.name); + if ('name' in $$props) $$invalidate(0, name = $$props.name); }; if ($$props && "$$inject" in $$props) { @@ -110,7 +110,7 @@ class Component extends SvelteComponentDev { const { ctx } = this.$$; const props = options.props || {}; - if (/*name*/ ctx[0] === undefined && !("name" in props)) { + if (/*name*/ ctx[0] === undefined && !('name' in props)) { console.warn(" was created without expected prop 'name'"); } } diff --git a/test/js/samples/debug-foo-bar-baz-things/expected.js b/test/js/samples/debug-foo-bar-baz-things/expected.js index 12a04b438b..3377d35018 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -171,31 +171,31 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Component", slots, []); + validate_slots('Component', slots, []); let { things } = $$props; let { foo } = $$props; let { bar } = $$props; let { baz } = $$props; - const writable_props = ["things", "foo", "bar", "baz"]; + const writable_props = ['things', 'foo', 'bar', 'baz']; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); }); $$self.$$set = $$props => { - if ("things" in $$props) $$invalidate(0, things = $$props.things); - if ("foo" in $$props) $$invalidate(1, foo = $$props.foo); - if ("bar" in $$props) $$invalidate(2, bar = $$props.bar); - if ("baz" in $$props) $$invalidate(3, baz = $$props.baz); + if ('things' in $$props) $$invalidate(0, things = $$props.things); + if ('foo' in $$props) $$invalidate(1, foo = $$props.foo); + if ('bar' in $$props) $$invalidate(2, bar = $$props.bar); + if ('baz' in $$props) $$invalidate(3, baz = $$props.baz); }; $$self.$capture_state = () => ({ things, foo, bar, baz }); $$self.$inject_state = $$props => { - if ("things" in $$props) $$invalidate(0, things = $$props.things); - if ("foo" in $$props) $$invalidate(1, foo = $$props.foo); - if ("bar" in $$props) $$invalidate(2, bar = $$props.bar); - if ("baz" in $$props) $$invalidate(3, baz = $$props.baz); + if ('things' in $$props) $$invalidate(0, things = $$props.things); + if ('foo' in $$props) $$invalidate(1, foo = $$props.foo); + if ('bar' in $$props) $$invalidate(2, bar = $$props.bar); + if ('baz' in $$props) $$invalidate(3, baz = $$props.baz); }; if ($$props && "$$inject" in $$props) { @@ -220,19 +220,19 @@ class Component extends SvelteComponentDev { const { ctx } = this.$$; const props = options.props || {}; - if (/*things*/ ctx[0] === undefined && !("things" in props)) { + if (/*things*/ ctx[0] === undefined && !('things' in props)) { console.warn(" was created without expected prop 'things'"); } - if (/*foo*/ ctx[1] === undefined && !("foo" in props)) { + if (/*foo*/ ctx[1] === undefined && !('foo' in props)) { console.warn(" was created without expected prop 'foo'"); } - if (/*bar*/ ctx[2] === undefined && !("bar" in props)) { + if (/*bar*/ ctx[2] === undefined && !('bar' in props)) { console.warn(" was created without expected prop 'bar'"); } - if (/*baz*/ ctx[3] === undefined && !("baz" in props)) { + if (/*baz*/ ctx[3] === undefined && !('baz' in props)) { console.warn(" was created without expected prop 'baz'"); } } diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 029d525883..518897c237 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -165,25 +165,25 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Component", slots, []); + validate_slots('Component', slots, []); let { things } = $$props; let { foo } = $$props; - const writable_props = ["things", "foo"]; + const writable_props = ['things', 'foo']; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); }); $$self.$$set = $$props => { - if ("things" in $$props) $$invalidate(0, things = $$props.things); - if ("foo" in $$props) $$invalidate(1, foo = $$props.foo); + if ('things' in $$props) $$invalidate(0, things = $$props.things); + if ('foo' in $$props) $$invalidate(1, foo = $$props.foo); }; $$self.$capture_state = () => ({ things, foo }); $$self.$inject_state = $$props => { - if ("things" in $$props) $$invalidate(0, things = $$props.things); - if ("foo" in $$props) $$invalidate(1, foo = $$props.foo); + if ('things' in $$props) $$invalidate(0, things = $$props.things); + if ('foo' in $$props) $$invalidate(1, foo = $$props.foo); }; if ($$props && "$$inject" in $$props) { @@ -208,11 +208,11 @@ class Component extends SvelteComponentDev { const { ctx } = this.$$; const props = options.props || {}; - if (/*things*/ ctx[0] === undefined && !("things" in props)) { + if (/*things*/ ctx[0] === undefined && !('things' in props)) { console.warn(" was created without expected prop 'things'"); } - if (/*foo*/ ctx[1] === undefined && !("foo" in props)) { + if (/*foo*/ ctx[1] === undefined && !('foo' in props)) { console.warn(" was created without expected prop 'foo'"); } } diff --git a/test/js/samples/debug-hoisted/expected.js b/test/js/samples/debug-hoisted/expected.js index 8dbd718404..9fc4f7cf4f 100644 --- a/test/js/samples/debug-hoisted/expected.js +++ b/test/js/samples/debug-hoisted/expected.js @@ -50,20 +50,20 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Component", slots, []); + validate_slots('Component', slots, []); let obj = { x: 5 }; let kobzol = 5; const writable_props = []; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); }); $$self.$capture_state = () => ({ obj, kobzol }); $$self.$inject_state = $$props => { - if ("obj" in $$props) $$invalidate(0, obj = $$props.obj); - if ("kobzol" in $$props) $$invalidate(1, kobzol = $$props.kobzol); + if ('obj' in $$props) $$invalidate(0, obj = $$props.obj); + if ('kobzol' in $$props) $$invalidate(1, kobzol = $$props.kobzol); }; if ($$props && "$$inject" in $$props) { diff --git a/test/js/samples/debug-no-dependencies/expected.js b/test/js/samples/debug-no-dependencies/expected.js index 29e518d9b1..8107b890a6 100644 --- a/test/js/samples/debug-no-dependencies/expected.js +++ b/test/js/samples/debug-no-dependencies/expected.js @@ -137,11 +137,11 @@ function create_fragment(ctx) { function instance($$self, $$props) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Component", slots, []); + validate_slots('Component', slots, []); const writable_props = []; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); }); return []; diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 6bc60194aa..8c9bb83b5b 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -105,7 +105,7 @@ function instance($$self, $$props, $$invalidate) { let { createElement } = $$props; $$self.$$set = $$props => { - if ("createElement" in $$props) $$invalidate(0, createElement = $$props.createElement); + if ('createElement' in $$props) $$invalidate(0, createElement = $$props.createElement); }; return [createElement]; diff --git a/test/js/samples/deconflict-globals/expected.js b/test/js/samples/deconflict-globals/expected.js index 7168eba6a5..c048cc2ddd 100644 --- a/test/js/samples/deconflict-globals/expected.js +++ b/test/js/samples/deconflict-globals/expected.js @@ -1,17 +1,17 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, init, safe_not_equal } from "svelte/internal"; -import { onMount } from "svelte"; +import { onMount } from 'svelte'; function instance($$self, $$props, $$invalidate) { - let { foo = "bar" } = $$props; + let { foo = 'bar' } = $$props; onMount(() => { alert(JSON.stringify(data())); }); $$self.$$set = $$props => { - if ("foo" in $$props) $$invalidate(0, foo = $$props.foo); + if ('foo' in $$props) $$invalidate(0, foo = $$props.foo); }; return [foo]; diff --git a/test/js/samples/dev-warning-missing-data-computed/expected.js b/test/js/samples/dev-warning-missing-data-computed/expected.js index a981d88dca..5e10ec55f8 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -66,24 +66,24 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Component", slots, []); + validate_slots('Component', slots, []); let { foo } = $$props; let bar; - const writable_props = ["foo"]; + const writable_props = ['foo']; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); }); $$self.$$set = $$props => { - if ("foo" in $$props) $$invalidate(0, foo = $$props.foo); + if ('foo' in $$props) $$invalidate(0, foo = $$props.foo); }; $$self.$capture_state = () => ({ foo, bar }); $$self.$inject_state = $$props => { - if ("foo" in $$props) $$invalidate(0, foo = $$props.foo); - if ("bar" in $$props) $$invalidate(1, bar = $$props.bar); + if ('foo' in $$props) $$invalidate(0, foo = $$props.foo); + if ('bar' in $$props) $$invalidate(1, bar = $$props.bar); }; if ($$props && "$$inject" in $$props) { @@ -114,7 +114,7 @@ class Component extends SvelteComponentDev { const { ctx } = this.$$; const props = options.props || {}; - if (/*foo*/ ctx[0] === undefined && !("foo" in props)) { + if (/*foo*/ ctx[0] === undefined && !('foo' in props)) { console.warn(" was created without expected prop 'foo'"); } } diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index d1085f431b..d25a825d3b 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -11,7 +11,7 @@ import { transition_out } from "svelte/internal"; -import LazyLoad from "./LazyLoad.svelte"; +import LazyLoad from './LazyLoad.svelte'; function create_fragment(ctx) { let lazyload; @@ -42,7 +42,7 @@ function create_fragment(ctx) { }; } -const func = () => import("./Foo.svelte"); +const func = () => import('./Foo.svelte'); class Component extends SvelteComponent { constructor(options) { diff --git a/test/js/samples/each-block-array-literal/expected.js b/test/js/samples/each-block-array-literal/expected.js index fe51ac5bc3..bb5a04e952 100644 --- a/test/js/samples/each-block-array-literal/expected.js +++ b/test/js/samples/each-block-array-literal/expected.js @@ -107,11 +107,11 @@ function instance($$self, $$props, $$invalidate) { let { e } = $$props; $$self.$$set = $$props => { - if ("a" in $$props) $$invalidate(0, a = $$props.a); - if ("b" in $$props) $$invalidate(1, b = $$props.b); - if ("c" in $$props) $$invalidate(2, c = $$props.c); - if ("d" in $$props) $$invalidate(3, d = $$props.d); - if ("e" in $$props) $$invalidate(4, e = $$props.e); + if ('a' in $$props) $$invalidate(0, a = $$props.a); + if ('b' in $$props) $$invalidate(1, b = $$props.b); + if ('c' in $$props) $$invalidate(2, c = $$props.c); + if ('d' in $$props) $$invalidate(3, d = $$props.d); + if ('e' in $$props) $$invalidate(4, e = $$props.e); }; return [a, b, c, d, e]; diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index 0020235d44..19947edbbb 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -154,10 +154,10 @@ function instance($$self, $$props, $$invalidate) { let { foo } = $$props; $$self.$$set = $$props => { - if ("comments" in $$props) $$invalidate(0, comments = $$props.comments); - if ("elapsed" in $$props) $$invalidate(1, elapsed = $$props.elapsed); - if ("time" in $$props) $$invalidate(2, time = $$props.time); - if ("foo" in $$props) $$invalidate(3, foo = $$props.foo); + if ('comments' in $$props) $$invalidate(0, comments = $$props.comments); + if ('elapsed' in $$props) $$invalidate(1, elapsed = $$props.elapsed); + if ('time' in $$props) $$invalidate(2, time = $$props.time); + if ('foo' in $$props) $$invalidate(3, foo = $$props.foo); }; return [comments, elapsed, time, foo]; diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index b48073f5a7..6f7c22a086 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -130,7 +130,7 @@ function instance($$self, $$props, $$invalidate) { let { things } = $$props; $$self.$$set = $$props => { - if ("things" in $$props) $$invalidate(0, things = $$props.things); + if ('things' in $$props) $$invalidate(0, things = $$props.things); }; return [things]; diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index 7808ed677f..a275697d8e 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -99,7 +99,7 @@ function instance($$self, $$props, $$invalidate) { let { things } = $$props; $$self.$$set = $$props => { - if ("things" in $$props) $$invalidate(0, things = $$props.things); + if ('things' in $$props) $$invalidate(0, things = $$props.things); }; return [things]; diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index c67b33fa85..25f197eb1a 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -89,7 +89,7 @@ function instance($$self, $$props, $$invalidate) { let { foo } = $$props; $$self.$$set = $$props => { - if ("foo" in $$props) $$invalidate(0, foo = $$props.foo); + if ('foo' in $$props) $$invalidate(0, foo = $$props.foo); }; return [foo]; diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index 4cdd73cddb..6debe92c24 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) { let { foo } = $$props; $$self.$$set = $$props => { - if ("foo" in $$props) $$invalidate(0, foo = $$props.foo); + if ('foo' in $$props) $$invalidate(0, foo = $$props.foo); }; return [foo]; diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js index 0a9d0a1e8e..4e4dba16d5 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected.js +++ b/test/js/samples/inline-style-optimized-multiple/expected.js @@ -45,9 +45,9 @@ function instance($$self, $$props, $$invalidate) { let { y } = $$props; $$self.$$set = $$props => { - if ("color" in $$props) $$invalidate(0, color = $$props.color); - if ("x" in $$props) $$invalidate(1, x = $$props.x); - if ("y" in $$props) $$invalidate(2, y = $$props.y); + if ('color' in $$props) $$invalidate(0, color = $$props.color); + if ('x' in $$props) $$invalidate(1, x = $$props.x); + if ('y' in $$props) $$invalidate(2, y = $$props.y); }; return [color, x, y]; diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js index 0debb03585..a861e9dc7e 100644 --- a/test/js/samples/inline-style-optimized-url/expected.js +++ b/test/js/samples/inline-style-optimized-url/expected.js @@ -38,7 +38,7 @@ function instance($$self, $$props, $$invalidate) { let { data } = $$props; $$self.$$set = $$props => { - if ("data" in $$props) $$invalidate(0, data = $$props.data); + if ('data' in $$props) $$invalidate(0, data = $$props.data); }; return [data]; diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js index b7db0f1cf3..ea4f39ab47 100644 --- a/test/js/samples/inline-style-optimized/expected.js +++ b/test/js/samples/inline-style-optimized/expected.js @@ -38,7 +38,7 @@ function instance($$self, $$props, $$invalidate) { let { color } = $$props; $$self.$$set = $$props => { - if ("color" in $$props) $$invalidate(0, color = $$props.color); + if ('color' in $$props) $$invalidate(0, color = $$props.color); }; return [color]; diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 0688f14b9b..2900fb6ce7 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -55,9 +55,9 @@ function instance($$self, $$props, $$invalidate) { let { value } = $$props; $$self.$$set = $$props => { - if ("style" in $$props) $$invalidate(0, style = $$props.style); - if ("key" in $$props) $$invalidate(1, key = $$props.key); - if ("value" in $$props) $$invalidate(2, value = $$props.value); + if ('style' in $$props) $$invalidate(0, style = $$props.style); + if ('key' in $$props) $$invalidate(1, key = $$props.key); + if ('value' in $$props) $$invalidate(2, value = $$props.value); }; return [style, key, value]; diff --git a/test/js/samples/inline-style-without-updates/expected.js b/test/js/samples/inline-style-without-updates/expected.js index 375896f259..ebfffe902c 100644 --- a/test/js/samples/inline-style-without-updates/expected.js +++ b/test/js/samples/inline-style-without-updates/expected.js @@ -30,7 +30,7 @@ function create_fragment(ctx) { }; } -let color = "red"; +let color = 'red'; class Component extends SvelteComponent { constructor(options) { diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js index 8adc7443f5..42ddddbcb3 100644 --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -50,7 +50,7 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = $$props => { - if ("files" in $$props) $$invalidate(0, files = $$props.files); + if ('files' in $$props) $$invalidate(0, files = $$props.files); }; return [files, input_change_handler]; diff --git a/test/js/samples/input-no-initial-value/expected.js b/test/js/samples/input-no-initial-value/expected.js index 3354aa3111..a91a95bde2 100644 --- a/test/js/samples/input-no-initial-value/expected.js +++ b/test/js/samples/input-no-initial-value/expected.js @@ -69,7 +69,7 @@ function instance($$self, $$props, $$invalidate) { function handleSubmit(event) { event.preventDefault(); - console.log("value", test); + console.log('value', test); } function input_input_handler() { diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js index a855ca3653..7ced4b176b 100644 --- a/test/js/samples/input-range/expected.js +++ b/test/js/samples/input-range/expected.js @@ -61,7 +61,7 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = $$props => { - if ("value" in $$props) $$invalidate(0, value = $$props.value); + if ('value' in $$props) $$invalidate(0, value = $$props.value); }; return [value, input_change_input_handler]; diff --git a/test/js/samples/input-value/expected.js b/test/js/samples/input-value/expected.js index 781a2ae603..2491a24256 100644 --- a/test/js/samples/input-value/expected.js +++ b/test/js/samples/input-value/expected.js @@ -64,7 +64,7 @@ function create_fragment(ctx) { } function instance($$self, $$props, $$invalidate) { - let name = "change me"; + let name = 'change me'; function onInput(event) { $$invalidate(0, name = event.target.value); diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index 6c5b215623..007177bda5 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -54,7 +54,7 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = $$props => { - if ("foo" in $$props) $$invalidate(0, foo = $$props.foo); + if ('foo' in $$props) $$invalidate(0, foo = $$props.foo); }; return [foo, input_change_handler]; diff --git a/test/js/samples/loop-protect/expected.js b/test/js/samples/loop-protect/expected.js index 26721d6be6..04033d0d95 100644 --- a/test/js/samples/loop-protect/expected.js +++ b/test/js/samples/loop-protect/expected.js @@ -54,7 +54,7 @@ function create_fragment(ctx) { } function foo() { - const guard = "foo"; + const guard = 'foo'; { const guard_1 = loop_guard(100); @@ -68,7 +68,7 @@ function foo() { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots("Component", slots, []); + validate_slots('Component', slots, []); let node; { @@ -110,11 +110,11 @@ function instance($$self, $$props, $$invalidate) { const writable_props = []; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$" && key !== "slot") console_1.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1.warn(` was created with unknown prop '${key}'`); }); function div_binding($$value) { - binding_callbacks[$$value ? "unshift" : "push"](() => { + binding_callbacks[$$value ? 'unshift' : 'push'](() => { node = $$value; $$invalidate(0, node); }); @@ -123,7 +123,7 @@ function instance($$self, $$props, $$invalidate) { $$self.$capture_state = () => ({ node, foo }); $$self.$inject_state = $$props => { - if ("node" in $$props) $$invalidate(0, node = $$props.node); + if ('node' in $$props) $$invalidate(0, node = $$props.node); }; if ($$props && "$$inject" in $$props) { diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index 867d4a7dad..5005eb47d1 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -174,17 +174,17 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = $$props => { - if ("buffered" in $$props) $$invalidate(0, buffered = $$props.buffered); - if ("seekable" in $$props) $$invalidate(1, seekable = $$props.seekable); - if ("played" in $$props) $$invalidate(2, played = $$props.played); - if ("currentTime" in $$props) $$invalidate(3, currentTime = $$props.currentTime); - if ("duration" in $$props) $$invalidate(4, duration = $$props.duration); - if ("paused" in $$props) $$invalidate(5, paused = $$props.paused); - if ("volume" in $$props) $$invalidate(6, volume = $$props.volume); - if ("muted" in $$props) $$invalidate(7, muted = $$props.muted); - if ("playbackRate" in $$props) $$invalidate(8, playbackRate = $$props.playbackRate); - if ("seeking" in $$props) $$invalidate(9, seeking = $$props.seeking); - if ("ended" in $$props) $$invalidate(10, ended = $$props.ended); + if ('buffered' in $$props) $$invalidate(0, buffered = $$props.buffered); + if ('seekable' in $$props) $$invalidate(1, seekable = $$props.seekable); + if ('played' in $$props) $$invalidate(2, played = $$props.played); + if ('currentTime' in $$props) $$invalidate(3, currentTime = $$props.currentTime); + if ('duration' in $$props) $$invalidate(4, duration = $$props.duration); + if ('paused' in $$props) $$invalidate(5, paused = $$props.paused); + if ('volume' in $$props) $$invalidate(6, volume = $$props.volume); + if ('muted' in $$props) $$invalidate(7, muted = $$props.muted); + if ('playbackRate' in $$props) $$invalidate(8, playbackRate = $$props.playbackRate); + if ('seeking' in $$props) $$invalidate(9, seeking = $$props.seeking); + if ('ended' in $$props) $$invalidate(10, ended = $$props.ended); }; return [ diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index 5a6b8e8bb7..e3f2760ce0 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -14,7 +14,7 @@ import { transition_out } from "svelte/internal"; -import Imported from "Imported.svelte"; +import Imported from 'Imported.svelte'; function create_fragment(ctx) { let imported; diff --git a/test/js/samples/non-mutable-reference/expected.js b/test/js/samples/non-mutable-reference/expected.js index 93f2145a2e..adc67b9bc4 100644 --- a/test/js/samples/non-mutable-reference/expected.js +++ b/test/js/samples/non-mutable-reference/expected.js @@ -29,7 +29,7 @@ function create_fragment(ctx) { }; } -let name = "world"; +let name = 'world'; class Component extends SvelteComponent { constructor(options) { diff --git a/test/js/samples/optional-chaining/expected.js b/test/js/samples/optional-chaining/expected.js index 8aa94796c1..57369ddb72 100644 --- a/test/js/samples/optional-chaining/expected.js +++ b/test/js/samples/optional-chaining/expected.js @@ -23,9 +23,9 @@ function create_fragment(ctx) { let t1_value = /*b*/ ctx[1]?.optional + ""; let t1; let t2; - let t3_value = /*c*/ ctx[2]["computed"] + ""; + let t3_value = /*c*/ ctx[2]['computed'] + ""; let t3; - let t4_value = /*d*/ ctx[3]?.["computed_optional"] + ""; + let t4_value = /*d*/ ctx[3]?.['computed_optional'] + ""; let t4; let t5; let t6_value = /*e*/ ctx[4]() + ""; @@ -48,8 +48,8 @@ function create_fragment(ctx) { props: { a: /*a*/ ctx[0].normal, b: /*b*/ ctx[1]?.optional, - c: /*c*/ ctx[2]["computed"], - d: /*d*/ ctx[3]?.["computed_optional"], + c: /*c*/ ctx[2]['computed'], + d: /*d*/ ctx[3]?.['computed_optional'], e: /*e*/ ctx[4](), f: /*f*/ ctx[5]?.() } @@ -71,8 +71,8 @@ function create_fragment(ctx) { create_component(component.$$.fragment); attr(div, "a", div_a_value = /*a*/ ctx[0].normal); attr(div, "b", div_b_value = /*b*/ ctx[1]?.optional); - attr(div, "c", div_c_value = /*c*/ ctx[2]["computed"]); - attr(div, "d", div_d_value = /*d*/ ctx[3]?.["computed_optional"]); + attr(div, "c", div_c_value = /*c*/ ctx[2]['computed']); + attr(div, "d", div_d_value = /*d*/ ctx[3]?.['computed_optional']); attr(div, "e", div_e_value = /*e*/ ctx[4]()); attr(div, "f", div_f_value = /*f*/ ctx[5]?.()); }, @@ -94,8 +94,8 @@ function create_fragment(ctx) { p(ctx, [dirty]) { if ((!current || dirty & /*a*/ 1) && t0_value !== (t0_value = /*a*/ ctx[0].normal + "")) set_data(t0, t0_value); if ((!current || dirty & /*b*/ 2) && t1_value !== (t1_value = /*b*/ ctx[1]?.optional + "")) set_data(t1, t1_value); - if ((!current || dirty & /*c*/ 4) && t3_value !== (t3_value = /*c*/ ctx[2]["computed"] + "")) set_data(t3, t3_value); - if ((!current || dirty & /*d*/ 8) && t4_value !== (t4_value = /*d*/ ctx[3]?.["computed_optional"] + "")) set_data(t4, t4_value); + if ((!current || dirty & /*c*/ 4) && t3_value !== (t3_value = /*c*/ ctx[2]['computed'] + "")) set_data(t3, t3_value); + if ((!current || dirty & /*d*/ 8) && t4_value !== (t4_value = /*d*/ ctx[3]?.['computed_optional'] + "")) set_data(t4, t4_value); if ((!current || dirty & /*e*/ 16) && t6_value !== (t6_value = /*e*/ ctx[4]() + "")) set_data(t6, t6_value); if ((!current || dirty & /*f*/ 32) && t7_value !== (t7_value = /*f*/ ctx[5]?.() + "")) set_data(t7, t7_value); @@ -107,11 +107,11 @@ function create_fragment(ctx) { attr(div, "b", div_b_value); } - if (!current || dirty & /*c*/ 4 && div_c_value !== (div_c_value = /*c*/ ctx[2]["computed"])) { + if (!current || dirty & /*c*/ 4 && div_c_value !== (div_c_value = /*c*/ ctx[2]['computed'])) { attr(div, "c", div_c_value); } - if (!current || dirty & /*d*/ 8 && div_d_value !== (div_d_value = /*d*/ ctx[3]?.["computed_optional"])) { + if (!current || dirty & /*d*/ 8 && div_d_value !== (div_d_value = /*d*/ ctx[3]?.['computed_optional'])) { attr(div, "d", div_d_value); } @@ -126,8 +126,8 @@ function create_fragment(ctx) { const component_changes = {}; if (dirty & /*a*/ 1) component_changes.a = /*a*/ ctx[0].normal; if (dirty & /*b*/ 2) component_changes.b = /*b*/ ctx[1]?.optional; - if (dirty & /*c*/ 4) component_changes.c = /*c*/ ctx[2]["computed"]; - if (dirty & /*d*/ 8) component_changes.d = /*d*/ ctx[3]?.["computed_optional"]; + if (dirty & /*c*/ 4) component_changes.c = /*c*/ ctx[2]['computed']; + if (dirty & /*d*/ 8) component_changes.d = /*d*/ ctx[3]?.['computed_optional']; if (dirty & /*e*/ 16) component_changes.e = /*e*/ ctx[4](); if (dirty & /*f*/ 32) component_changes.f = /*f*/ ctx[5]?.(); component.$set(component_changes); @@ -168,12 +168,12 @@ function instance($$self, $$props, $$invalidate) { let Component; $$self.$$set = $$props => { - if ("a" in $$props) $$invalidate(0, a = $$props.a); - if ("b" in $$props) $$invalidate(1, b = $$props.b); - if ("c" in $$props) $$invalidate(2, c = $$props.c); - if ("d" in $$props) $$invalidate(3, d = $$props.d); - if ("e" in $$props) $$invalidate(4, e = $$props.e); - if ("f" in $$props) $$invalidate(5, f = $$props.f); + if ('a' in $$props) $$invalidate(0, a = $$props.a); + if ('b' in $$props) $$invalidate(1, b = $$props.b); + if ('c' in $$props) $$invalidate(2, c = $$props.c); + if ('d' in $$props) $$invalidate(3, d = $$props.d); + if ('e' in $$props) $$invalidate(4, e = $$props.e); + if ('f' in $$props) $$invalidate(5, f = $$props.f); }; return [a, b, c, d, e, f, Component]; diff --git a/test/js/samples/reactive-class-optimized/expected.js b/test/js/samples/reactive-class-optimized/expected.js index b7c2c3a60b..1d0606ad60 100644 --- a/test/js/samples/reactive-class-optimized/expected.js +++ b/test/js/samples/reactive-class-optimized/expected.js @@ -13,7 +13,7 @@ import { toggle_class } from "svelte/internal"; -import { reactiveStoreVal, unreactiveExport } from "./store"; +import { reactiveStoreVal, unreactiveExport } from './store'; function create_fragment(ctx) { let div0; @@ -159,4 +159,4 @@ class Component extends SvelteComponent { } } -export default Component; +export default Component; \ No newline at end of file diff --git a/test/js/samples/reactive-values-non-topologically-ordered/expected.js b/test/js/samples/reactive-values-non-topologically-ordered/expected.js index dbfd794dc7..82af20ee90 100644 --- a/test/js/samples/reactive-values-non-topologically-ordered/expected.js +++ b/test/js/samples/reactive-values-non-topologically-ordered/expected.js @@ -7,7 +7,7 @@ function instance($$self, $$props, $$invalidate) { let b; $$self.$$set = $$props => { - if ("x" in $$props) $$invalidate(0, x = $$props.x); + if ('x' in $$props) $$invalidate(0, x = $$props.x); }; $$self.$$.update = () => { diff --git a/test/js/samples/reactive-values-non-writable-dependencies/expected.js b/test/js/samples/reactive-values-non-writable-dependencies/expected.js index 5196a770d9..ca01bda65b 100644 --- a/test/js/samples/reactive-values-non-writable-dependencies/expected.js +++ b/test/js/samples/reactive-values-non-writable-dependencies/expected.js @@ -6,13 +6,13 @@ function instance($$self, $$props, $$invalidate) { let { b = 2 } = $$props; $$self.$$set = $$props => { - if ("a" in $$props) $$invalidate(0, a = $$props.a); - if ("b" in $$props) $$invalidate(1, b = $$props.b); + if ('a' in $$props) $$invalidate(0, a = $$props.a); + if ('b' in $$props) $$invalidate(1, b = $$props.b); }; $$self.$$.update = () => { if ($$self.$$.dirty & /*a, b*/ 3) { - $: console.log("max", Math.max(a, b)); + $: console.log('max', Math.max(a, b)); } }; diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js index 8777cd2600..cd1ab1d812 100644 --- a/test/js/samples/select-dynamic-value/expected.js +++ b/test/js/samples/select-dynamic-value/expected.js @@ -51,7 +51,7 @@ function instance($$self, $$props, $$invalidate) { let { current } = $$props; $$self.$$set = $$props => { - if ("current" in $$props) $$invalidate(0, current = $$props.current); + if ('current' in $$props) $$invalidate(0, current = $$props.current); }; return [current]; diff --git a/test/js/samples/src-attribute-check/expected.js b/test/js/samples/src-attribute-check/expected.js index 93638edfb4..c68187c495 100644 --- a/test/js/samples/src-attribute-check/expected.js +++ b/test/js/samples/src-attribute-check/expected.js @@ -68,8 +68,8 @@ function instance($$self, $$props, $$invalidate) { let { slug } = $$props; $$self.$$set = $$props => { - if ("url" in $$props) $$invalidate(0, url = $$props.url); - if ("slug" in $$props) $$invalidate(1, slug = $$props.slug); + if ('url' in $$props) $$invalidate(0, url = $$props.url); + if ('slug' in $$props) $$invalidate(1, slug = $$props.slug); }; return [url, slug]; diff --git a/test/js/samples/ssr-no-oncreate-etc/expected.js b/test/js/samples/ssr-no-oncreate-etc/expected.js index b91deb3e97..09ae6fd4a6 100644 --- a/test/js/samples/ssr-no-oncreate-etc/expected.js +++ b/test/js/samples/ssr-no-oncreate-etc/expected.js @@ -1,14 +1,14 @@ /* generated by Svelte vX.Y.Z */ import { create_ssr_component } from "svelte/internal"; -import { onDestroy, onMount } from "svelte"; +import { onDestroy, onMount } from 'svelte'; function preload(input) { return output; } function foo() { - console.log("foo"); + console.log('foo'); } function swipe(node, callback) { @@ -17,11 +17,11 @@ function swipe(node, callback) { const Component = create_ssr_component(($$result, $$props, $$bindings, slots) => { onMount(() => { - console.log("onMount"); + console.log('onMount'); }); onDestroy(() => { - console.log("onDestroy"); + console.log('onDestroy'); }); return ``; diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js index b10f569759..6385f36acc 100644 --- a/test/js/samples/title/expected.js +++ b/test/js/samples/title/expected.js @@ -23,7 +23,7 @@ function instance($$self, $$props, $$invalidate) { let { custom } = $$props; $$self.$$set = $$props => { - if ("custom" in $$props) $$invalidate(0, custom = $$props.custom); + if ('custom' in $$props) $$invalidate(0, custom = $$props.custom); }; return [custom]; diff --git a/test/js/samples/transition-local/expected.js b/test/js/samples/transition-local/expected.js index ea3d9db3d7..1824ccb066 100644 --- a/test/js/samples/transition-local/expected.js +++ b/test/js/samples/transition-local/expected.js @@ -125,8 +125,8 @@ function instance($$self, $$props, $$invalidate) { let { y } = $$props; $$self.$$set = $$props => { - if ("x" in $$props) $$invalidate(0, x = $$props.x); - if ("y" in $$props) $$invalidate(1, y = $$props.y); + if ('x' in $$props) $$invalidate(0, x = $$props.x); + if ('y' in $$props) $$invalidate(1, y = $$props.y); }; return [x, y]; diff --git a/test/js/samples/transition-repeated-outro/expected.js b/test/js/samples/transition-repeated-outro/expected.js index 12483ab91a..a2cbedffea 100644 --- a/test/js/samples/transition-repeated-outro/expected.js +++ b/test/js/samples/transition-repeated-outro/expected.js @@ -14,7 +14,7 @@ import { transition_out } from "svelte/internal"; -import { fade } from "svelte/transition"; +import { fade } from 'svelte/transition'; function create_if_block(ctx) { let div; @@ -103,7 +103,7 @@ function instance($$self, $$props, $$invalidate) { let { num = 1 } = $$props; $$self.$$set = $$props => { - if ("num" in $$props) $$invalidate(0, num = $$props.num); + if ('num' in $$props) $$invalidate(0, num = $$props.num); }; return [num]; diff --git a/test/js/samples/unchanged-expression/expected.js b/test/js/samples/unchanged-expression/expected.js index 673d5b6abc..48ae8131ff 100644 --- a/test/js/samples/unchanged-expression/expected.js +++ b/test/js/samples/unchanged-expression/expected.js @@ -69,14 +69,14 @@ function create_fragment(ctx) { }; } -let world1 = "world"; -let world2 = "world"; +let world1 = 'world'; +let world2 = 'world'; function instance($$self, $$props, $$invalidate) { - const world3 = "world"; + const world3 = 'world'; function foo() { - $$invalidate(0, world3 = "svelte"); + $$invalidate(0, world3 = 'svelte'); } return [world3]; diff --git a/test/js/samples/unreferenced-state-not-invalidated/expected.js b/test/js/samples/unreferenced-state-not-invalidated/expected.js index 53044c7ed6..8c238a8397 100644 --- a/test/js/samples/unreferenced-state-not-invalidated/expected.js +++ b/test/js/samples/unreferenced-state-not-invalidated/expected.js @@ -12,7 +12,7 @@ import { text } from "svelte/internal"; -import { onMount } from "svelte"; +import { onMount } from 'svelte'; function create_fragment(ctx) { let p; diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index d07411518e..8a45cb54c8 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -244,11 +244,11 @@ function instance($$self, $$props, $$invalidate) { let { e } = $$props; $$self.$$set = $$props => { - if ("a" in $$props) $$invalidate(0, a = $$props.a); - if ("b" in $$props) $$invalidate(1, b = $$props.b); - if ("c" in $$props) $$invalidate(2, c = $$props.c); - if ("d" in $$props) $$invalidate(3, d = $$props.d); - if ("e" in $$props) $$invalidate(4, e = $$props.e); + if ('a' in $$props) $$invalidate(0, a = $$props.a); + if ('b' in $$props) $$invalidate(1, b = $$props.b); + if ('c' in $$props) $$invalidate(2, c = $$props.c); + if ('d' in $$props) $$invalidate(3, d = $$props.d); + if ('e' in $$props) $$invalidate(4, e = $$props.e); }; return [a, b, c, d, e]; diff --git a/test/js/samples/video-bindings/expected.js b/test/js/samples/video-bindings/expected.js index 8afa670bbb..020bab574c 100644 --- a/test/js/samples/video-bindings/expected.js +++ b/test/js/samples/video-bindings/expected.js @@ -94,10 +94,10 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = $$props => { - if ("currentTime" in $$props) $$invalidate(0, currentTime = $$props.currentTime); - if ("videoHeight" in $$props) $$invalidate(1, videoHeight = $$props.videoHeight); - if ("videoWidth" in $$props) $$invalidate(2, videoWidth = $$props.videoWidth); - if ("offsetWidth" in $$props) $$invalidate(3, offsetWidth = $$props.offsetWidth); + if ('currentTime' in $$props) $$invalidate(0, currentTime = $$props.currentTime); + if ('videoHeight' in $$props) $$invalidate(1, videoHeight = $$props.videoHeight); + if ('videoWidth' in $$props) $$invalidate(2, videoWidth = $$props.videoWidth); + if ('offsetWidth' in $$props) $$invalidate(3, offsetWidth = $$props.offsetWidth); }; return [ diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 09a4d3737d..ae155d42bf 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -79,7 +79,7 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = $$props => { - if ("y" in $$props) $$invalidate(0, y = $$props.y); + if ('y' in $$props) $$invalidate(0, y = $$props.y); }; return [y, onwindowscroll];