From a9ea4ce0413e58a0730cd908e1db258620f62137 Mon Sep 17 00:00:00 2001 From: pk Date: Fri, 9 Nov 2018 20:18:16 +0100 Subject: [PATCH 001/510] Failing test for #1844 --- .../Nested.html | 3 +++ .../_config.js | 2 ++ .../main.html | 13 +++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.html create mode 100644 test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/_config.js create mode 100644 test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.html diff --git a/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.html b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.html new file mode 100644 index 0000000000..6ddd61d4d1 --- /dev/null +++ b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.html @@ -0,0 +1,3 @@ +

+ +

diff --git a/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/_config.js b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/_config.js new file mode 100644 index 0000000000..02a61bed5e --- /dev/null +++ b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/_config.js @@ -0,0 +1,2 @@ +export default { +}; diff --git a/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.html b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.html new file mode 100644 index 0000000000..3f5fad9363 --- /dev/null +++ b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.html @@ -0,0 +1,13 @@ + + Hello + + + From 2491b163413e554689f5f1357152e9d9a06068ac Mon Sep 17 00:00:00 2001 From: pk Date: Wed, 30 Jan 2019 18:27:11 +0100 Subject: [PATCH 002/510] Failing test for #1999 --- .../each-block-keyed-recursive/_config.js | 26 +++++++++++++++++++ .../each-block-keyed-recursive/main.html | 12 +++++++++ 2 files changed, 38 insertions(+) create mode 100644 test/runtime/samples/each-block-keyed-recursive/_config.js create mode 100644 test/runtime/samples/each-block-keyed-recursive/main.html diff --git a/test/runtime/samples/each-block-keyed-recursive/_config.js b/test/runtime/samples/each-block-keyed-recursive/_config.js new file mode 100644 index 0000000000..e124f14ccf --- /dev/null +++ b/test/runtime/samples/each-block-keyed-recursive/_config.js @@ -0,0 +1,26 @@ +export default { + props: { + titles: [{ name: 'b' }, { name: 'c' }], + tree: [ + {id: 1, sub: null}, + {id: 2, sub: [{id: 11}]} + ] + }, + + html: ` +
1
+
2\n
11
+ `, + + test({ assert, component, target }) { + component.tree = [ + {id: 1, sub: null}, + {id: 2, sub: null} + ]; + + assert.htmlEqual(target.innerHTML, ` +
1
+
2
+ `); + } +}; diff --git a/test/runtime/samples/each-block-keyed-recursive/main.html b/test/runtime/samples/each-block-keyed-recursive/main.html new file mode 100644 index 0000000000..5e90ec501c --- /dev/null +++ b/test/runtime/samples/each-block-keyed-recursive/main.html @@ -0,0 +1,12 @@ + + +{#each tree as item, i (item.id)} +
+ {item.id} + {#if item.sub} + + {/if} +
+{/each} From 6550fe8116ae249f1f074e1a5c8a403ca84c0813 Mon Sep 17 00:00:00 2001 From: pk Date: Wed, 30 Jan 2019 18:45:24 +0100 Subject: [PATCH 003/510] Oops --- test/runtime/samples/each-block-keyed-recursive/_config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/runtime/samples/each-block-keyed-recursive/_config.js b/test/runtime/samples/each-block-keyed-recursive/_config.js index e124f14ccf..7ad044228b 100644 --- a/test/runtime/samples/each-block-keyed-recursive/_config.js +++ b/test/runtime/samples/each-block-keyed-recursive/_config.js @@ -1,6 +1,5 @@ export default { props: { - titles: [{ name: 'b' }, { name: 'c' }], tree: [ {id: 1, sub: null}, {id: 2, sub: [{id: 11}]} From 256fd84fcb72681cd0d1afa1b9b0290fdc29403a Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 17 Mar 2019 16:14:41 -0400 Subject: [PATCH 004/510] allow transition functions to return nothing --- src/internal/transitions.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/internal/transitions.js b/src/internal/transitions.js index a6579b0cef..8af0d37f89 100644 --- a/src/internal/transitions.js +++ b/src/internal/transitions.js @@ -40,6 +40,8 @@ export function on_outro(callback) { outros.callbacks.push(callback); } +const null_transition = { duration: 0 }; + export function create_in_transition(node, fn, params) { let config = fn(node, params); let running = false; @@ -58,7 +60,7 @@ export function create_in_transition(node, fn, params) { easing = linear, tick = noop, css - } = config; + } = config || null_transition; if (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++); tick(0, 1); @@ -132,7 +134,7 @@ export function create_out_transition(node, fn, params) { easing = linear, tick = noop, css - } = config; + } = config || null_transition; if (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css); @@ -221,7 +223,7 @@ export function create_bidirectional_transition(node, fn, params, intro) { easing = linear, tick = noop, css - } = config; + } = config || null_transition; const program = { start: window.performance.now() + delay, From cf7c7d15eda52e0c6da08e8dd7b10805e6679910 Mon Sep 17 00:00:00 2001 From: Vlad Glushchuk Date: Mon, 8 Apr 2019 20:28:16 +0200 Subject: [PATCH 005/510] Add bind:text and bind:html support for contenteditable elements Fixes #310 --- src/compile/nodes/Element.ts | 21 ++++++++- .../render-dom/wrappers/Element/Binding.ts | 16 +++++++ .../render-dom/wrappers/Element/index.ts | 6 +++ src/compile/render-ssr/handlers/Element.ts | 23 +++++++--- .../samples/contenteditable-html/_config.js | 43 +++++++++++++++++++ .../samples/contenteditable-html/main.svelte | 6 +++ .../samples/contenteditable-text/_config.js | 37 ++++++++++++++++ .../samples/contenteditable-text/main.svelte | 6 +++ .../contenteditable-dynamic/errors.json | 15 +++++++ .../contenteditable-dynamic/input.svelte | 6 +++ .../contenteditable-missing/errors.json | 15 +++++++ .../contenteditable-missing/input.svelte | 4 ++ 12 files changed, 192 insertions(+), 6 deletions(-) create mode 100644 test/runtime/samples/contenteditable-html/_config.js create mode 100644 test/runtime/samples/contenteditable-html/main.svelte create mode 100644 test/runtime/samples/contenteditable-text/_config.js create mode 100644 test/runtime/samples/contenteditable-text/main.svelte create mode 100644 test/validator/samples/contenteditable-dynamic/errors.json create mode 100644 test/validator/samples/contenteditable-dynamic/input.svelte create mode 100644 test/validator/samples/contenteditable-missing/errors.json create mode 100644 test/validator/samples/contenteditable-missing/input.svelte diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts index bc1991c57e..2838129e36 100644 --- a/src/compile/nodes/Element.ts +++ b/src/compile/nodes/Element.ts @@ -570,7 +570,26 @@ export default class Element extends Node { message: `'${binding.name}' is not a valid binding on void elements like <${this.name}>. Use a wrapper element instead` }); } - } else if (name !== 'this') { + } else if ( + name === 'text' || + name === 'html' + ){ + const contenteditable = this.attributes.find( + (attribute: Attribute) => attribute.name === 'contenteditable' + ); + + if (!contenteditable) { + component.error(binding, { + code: `missing-contenteditable-attribute`, + message: `'contenteditable' attribute is required for text and html two-way bindings` + }); + } else if (contenteditable && !contenteditable.is_static) { + component.error(contenteditable, { + code: `dynamic-contenteditable-attribute`, + message: `'contenteditable' attribute cannot be dynamic if element uses two-way binding` + }); + } + } else if (name !== 'this') { component.error(binding, { code: `invalid-binding`, message: `'${binding.name}' is not a valid binding` diff --git a/src/compile/render-dom/wrappers/Element/Binding.ts b/src/compile/render-dom/wrappers/Element/Binding.ts index 828d664001..d0e5375aef 100644 --- a/src/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compile/render-dom/wrappers/Element/Binding.ts @@ -201,6 +201,14 @@ function get_dom_updater( return `${element.var}.checked = ${condition};` } + if (binding.node.name === 'text') { + return `${element.var}.textContent = ${binding.snippet};`; + } + + if (binding.node.name === 'html') { + return `${element.var}.innerHTML = ${binding.snippet};`; + } + return `${element.var}.${binding.node.name} = ${binding.snippet};`; } @@ -313,6 +321,14 @@ function get_value_from_dom( return `@time_ranges_to_array(this.${name})` } + if (name === 'text') { + return `this.textContent`; + } + + if (name === 'html') { + return `this.innerHTML`; + } + // everything else return `this.${name}`; } diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts index 80a8308b93..10a56eaace 100644 --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -29,6 +29,12 @@ const events = [ node.name === 'textarea' || node.name === 'input' && !/radio|checkbox|range/.test(node.get_static_attribute_value('type')) }, + { + event_names: ['input'], + filter: (node: Element, name: string) => + (name === 'text' || name === 'html') && + node.attributes.some(attribute => attribute.name === 'contenteditable') + }, { event_names: ['change'], filter: (node: Element, name: string) => diff --git a/src/compile/render-ssr/handlers/Element.ts b/src/compile/render-ssr/handlers/Element.ts index 0c2cdc489e..f38bc0e151 100644 --- a/src/compile/render-ssr/handlers/Element.ts +++ b/src/compile/render-ssr/handlers/Element.ts @@ -48,7 +48,12 @@ const boolean_attributes = new Set([ export default function(node, renderer, options) { let opening_tag = `<${node.name}`; - let textarea_contents; // awkward special case + let node_contents; // awkward special case + const contenteditable = ( + node.name !== 'textarea' && + node.name !== 'input' && + node.attributes.some((attribute: Node) => attribute.name === 'contenteditable') + ); const slot = node.get_static_attribute_value('slot'); if (slot && node.has_ancestor('InlineComponent')) { @@ -77,7 +82,7 @@ export default function(node, renderer, options) { args.push(snip(attribute.expression)); } else { if (attribute.name === 'value' && node.name === 'textarea') { - textarea_contents = stringify_attribute(attribute, true); + node_contents = stringify_attribute(attribute, true); } else if (attribute.is_true) { args.push(`{ ${quote_name_if_necessary(attribute.name)}: true }`); } else if ( @@ -99,7 +104,7 @@ export default function(node, renderer, options) { if (attribute.type !== 'Attribute') return; if (attribute.name === 'value' && node.name === 'textarea') { - textarea_contents = stringify_attribute(attribute, true); + node_contents = stringify_attribute(attribute, true); } else if (attribute.is_true) { opening_tag += ` ${attribute.name}`; } else if ( @@ -128,6 +133,14 @@ export default function(node, renderer, options) { if (name === 'group') { // TODO server-render group bindings + } else if (contenteditable && (node === 'text' || node === 'html')) { + const snippet = snip(expression) + if (name == 'text') { + node_contents = '${@escape(' + snippet + ')}' + } else { + // Do not escape HTML content + node_contents = '${' + snippet + '}' + } } else { const snippet = snip(expression); opening_tag += ' ${(v => v ? ("' + name + '" + (v === true ? "" : "=" + JSON.stringify(v))) : "")(' + snippet + ')}'; @@ -142,8 +155,8 @@ export default function(node, renderer, options) { renderer.append(opening_tag); - if (node.name === 'textarea' && textarea_contents !== undefined) { - renderer.append(textarea_contents); + if ((node.name === 'textarea' || contenteditable) && node_contents !== undefined) { + renderer.append(node_contents); } else { renderer.render(node.children, options); } diff --git a/test/runtime/samples/contenteditable-html/_config.js b/test/runtime/samples/contenteditable-html/_config.js new file mode 100644 index 0000000000..cd2a822655 --- /dev/null +++ b/test/runtime/samples/contenteditable-html/_config.js @@ -0,0 +1,43 @@ +export default { + props: { + name: 'world', + }, + + html: ` + world +

hello world

+ `, + + ssrHtml: ` + world +

hello world

+ `, + + async test({ assert, component, target, window }) { + const el = target.querySelector('editor'); + assert.equal(el.innerHTML, 'world'); + + el.innerHTML = 'everybody'; + + // No updates to data yet + assert.htmlEqual(target.innerHTML, ` + everybody +

hello world

+ `); + + // Handle user input + const event = new window.Event('input'); + await el.dispatchEvent(event); + assert.htmlEqual(target.innerHTML, ` + everybody +

hello everybody

+ `); + + component.name = 'goodbye'; + assert.equal(el.innerHTML, 'goodbye'); + assert.htmlEqual(target.innerHTML, ` + goodbye +

hello goodbye

+ `); + }, +}; diff --git a/test/runtime/samples/contenteditable-html/main.svelte b/test/runtime/samples/contenteditable-html/main.svelte new file mode 100644 index 0000000000..53b4e81c88 --- /dev/null +++ b/test/runtime/samples/contenteditable-html/main.svelte @@ -0,0 +1,6 @@ + + + +

hello {@html name}

\ No newline at end of file diff --git a/test/runtime/samples/contenteditable-text/_config.js b/test/runtime/samples/contenteditable-text/_config.js new file mode 100644 index 0000000000..4935a3a9a7 --- /dev/null +++ b/test/runtime/samples/contenteditable-text/_config.js @@ -0,0 +1,37 @@ +export default { + props: { + name: 'world', + }, + + html: ` + world +

hello world

+ `, + + ssrHtml: ` + world +

hello world

+ `, + + async test({ assert, component, target, window }) { + const el = target.querySelector('editor'); + assert.equal(el.textContent, 'world'); + + const event = new window.Event('input'); + + el.textContent = 'everybody'; + await el.dispatchEvent(event); + + assert.htmlEqual(target.innerHTML, ` + everybody +

hello everybody

+ `); + + component.name = 'goodbye'; + assert.equal(el.textContent, 'goodbye'); + assert.htmlEqual(target.innerHTML, ` + goodbye +

hello goodbye

+ `); + }, +}; diff --git a/test/runtime/samples/contenteditable-text/main.svelte b/test/runtime/samples/contenteditable-text/main.svelte new file mode 100644 index 0000000000..a71d9f0c5b --- /dev/null +++ b/test/runtime/samples/contenteditable-text/main.svelte @@ -0,0 +1,6 @@ + + + +

hello {name}

\ No newline at end of file diff --git a/test/validator/samples/contenteditable-dynamic/errors.json b/test/validator/samples/contenteditable-dynamic/errors.json new file mode 100644 index 0000000000..0c4c5585a6 --- /dev/null +++ b/test/validator/samples/contenteditable-dynamic/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "dynamic-contenteditable-attribute", + "message": "'contenteditable' attribute cannot be dynamic if element uses two-way binding", + "start": { + "line": 6, + "column": 8, + "character": 73 + }, + "end": { + "line": 6, + "column": 32, + "character": 97 + }, + "pos": 73 +}] \ No newline at end of file diff --git a/test/validator/samples/contenteditable-dynamic/input.svelte b/test/validator/samples/contenteditable-dynamic/input.svelte new file mode 100644 index 0000000000..97d2c9228c --- /dev/null +++ b/test/validator/samples/contenteditable-dynamic/input.svelte @@ -0,0 +1,6 @@ + + diff --git a/test/validator/samples/contenteditable-missing/errors.json b/test/validator/samples/contenteditable-missing/errors.json new file mode 100644 index 0000000000..9cadb20629 --- /dev/null +++ b/test/validator/samples/contenteditable-missing/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "missing-contenteditable-attribute", + "message": "'contenteditable' attribute is required for text and html two-way bindings", + "start": { + "line": 4, + "column": 8, + "character": 48 + }, + "end": { + "line": 4, + "column": 24, + "character": 64 + }, + "pos": 48 +}] \ No newline at end of file diff --git a/test/validator/samples/contenteditable-missing/input.svelte b/test/validator/samples/contenteditable-missing/input.svelte new file mode 100644 index 0000000000..47f125894a --- /dev/null +++ b/test/validator/samples/contenteditable-missing/input.svelte @@ -0,0 +1,4 @@ + + From 8deee95f141f32cd027467eb7c1d2bb8ff597007 Mon Sep 17 00:00:00 2001 From: Vlad Glushchuk Date: Mon, 8 Apr 2019 20:56:52 +0200 Subject: [PATCH 006/510] Fix a typo --- src/compile/render-ssr/handlers/Element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compile/render-ssr/handlers/Element.ts b/src/compile/render-ssr/handlers/Element.ts index f38bc0e151..cefe44ede8 100644 --- a/src/compile/render-ssr/handlers/Element.ts +++ b/src/compile/render-ssr/handlers/Element.ts @@ -133,7 +133,7 @@ export default function(node, renderer, options) { if (name === 'group') { // TODO server-render group bindings - } else if (contenteditable && (node === 'text' || node === 'html')) { + } else if (contenteditable && (name === 'text' || name === 'html')) { const snippet = snip(expression) if (name == 'text') { node_contents = '${@escape(' + snippet + ')}' From 7ec1bdb7126b185ef2dcf2a7105a8f5f57d6e44c Mon Sep 17 00:00:00 2001 From: Emil Tholin Date: Sat, 27 Apr 2019 21:35:32 +0200 Subject: [PATCH 007/510] Don't show 'Empty block' warnings for non-existent await branches --- src/compile/nodes/CatchBlock.ts | 6 +++-- src/compile/nodes/PendingBlock.ts | 6 +++-- src/compile/nodes/ThenBlock.ts | 6 +++-- src/parse/state/mustache.ts | 25 ++++++++++++++----- .../samples/await-then-catch/output.json | 5 +++- .../samples/await-no-catch/input.svelte | 9 +++++++ .../samples/await-no-catch/warnings.json | 1 + .../await-shorthand-no-catch/input.svelte | 7 ++++++ .../await-shorthand-no-catch/warnings.json | 1 + 9 files changed, 53 insertions(+), 13 deletions(-) create mode 100644 test/validator/samples/await-no-catch/input.svelte create mode 100644 test/validator/samples/await-no-catch/warnings.json create mode 100644 test/validator/samples/await-shorthand-no-catch/input.svelte create mode 100644 test/validator/samples/await-shorthand-no-catch/warnings.json diff --git a/src/compile/nodes/CatchBlock.ts b/src/compile/nodes/CatchBlock.ts index f728c1b850..0941e68d5b 100644 --- a/src/compile/nodes/CatchBlock.ts +++ b/src/compile/nodes/CatchBlock.ts @@ -15,6 +15,8 @@ export default class CatchBlock extends Node { this.scope.add(parent.error, parent.expression.dependencies, this); this.children = map_children(component, parent, this.scope, info.children); - this.warn_if_empty_block(); + if (!info.skip) { + this.warn_if_empty_block(); + } } -} \ No newline at end of file +} diff --git a/src/compile/nodes/PendingBlock.ts b/src/compile/nodes/PendingBlock.ts index 720442fab6..61e315481e 100644 --- a/src/compile/nodes/PendingBlock.ts +++ b/src/compile/nodes/PendingBlock.ts @@ -10,6 +10,8 @@ export default class PendingBlock extends Node { super(component, parent, scope, info); this.children = map_children(component, parent, scope, info.children); - this.warn_if_empty_block(); + if (!info.skip) { + this.warn_if_empty_block(); + } } -} \ No newline at end of file +} diff --git a/src/compile/nodes/ThenBlock.ts b/src/compile/nodes/ThenBlock.ts index 54319a7ae5..ace5cfb5c1 100644 --- a/src/compile/nodes/ThenBlock.ts +++ b/src/compile/nodes/ThenBlock.ts @@ -15,6 +15,8 @@ export default class ThenBlock extends Node { this.scope.add(parent.value, parent.expression.dependencies, this); this.children = map_children(component, parent, this.scope, info.children); - this.warn_if_empty_block(); + if (!info.skip) { + this.warn_if_empty_block(); + } } -} \ No newline at end of file +} diff --git a/src/parse/state/mustache.ts b/src/parse/state/mustache.ts index 1acae36c9c..c24b5995a2 100644 --- a/src/parse/state/mustache.ts +++ b/src/parse/state/mustache.ts @@ -172,7 +172,8 @@ export default function mustache(parser: Parser) { start, end: null, type: 'ThenBlock', - children: [] + children: [], + skip: false }; await_block.then = then_block; @@ -196,7 +197,8 @@ export default function mustache(parser: Parser) { start, end: null, type: 'CatchBlock', - children: [] + children: [], + skip: false }; await_block.catch = catch_block; @@ -235,19 +237,22 @@ export default function mustache(parser: Parser) { start: null, end: null, type: 'PendingBlock', - children: [] + children: [], + skip: true }, then: { start: null, end: null, type: 'ThenBlock', - children: [] + children: [], + skip: true }, catch: { start: null, end: null, type: 'CatchBlock', - children: [] + children: [], + skip: true }, } : { @@ -310,7 +315,15 @@ export default function mustache(parser: Parser) { parser.stack.push(block); if (type === 'AwaitBlock') { - const child_block = await_block_shorthand ? block.then : block.pending; + let child_block; + if (await_block_shorthand) { + block.then.skip = false; + child_block = block.then; + } else { + block.pending.skip = false; + child_block = block.pending; + } + child_block.start = parser.index; parser.stack.push(child_block); } diff --git a/test/parser/samples/await-then-catch/output.json b/test/parser/samples/await-then-catch/output.json index 21fc13eff9..f62ad16574 100644 --- a/test/parser/samples/await-then-catch/output.json +++ b/test/parser/samples/await-then-catch/output.json @@ -19,6 +19,7 @@ "pending": { "start": 19, "end": 39, + "skip": false, "type": "PendingBlock", "children": [ { @@ -53,6 +54,7 @@ "then": { "start": 39, "end": 88, + "skip": false, "type": "ThenBlock", "children": [ { @@ -98,6 +100,7 @@ "catch": { "start": 88, "end": 140, + "skip": false, "type": "CatchBlock", "children": [ { @@ -158,4 +161,4 @@ "css": null, "instance": null, "module": null -} \ No newline at end of file +} diff --git a/test/validator/samples/await-no-catch/input.svelte b/test/validator/samples/await-no-catch/input.svelte new file mode 100644 index 0000000000..1d332f0e32 --- /dev/null +++ b/test/validator/samples/await-no-catch/input.svelte @@ -0,0 +1,9 @@ + + +{#await promise} +

Loading

+{:then data} +

Data: {data}

+{/await} diff --git a/test/validator/samples/await-no-catch/warnings.json b/test/validator/samples/await-no-catch/warnings.json new file mode 100644 index 0000000000..fe51488c70 --- /dev/null +++ b/test/validator/samples/await-no-catch/warnings.json @@ -0,0 +1 @@ +[] diff --git a/test/validator/samples/await-shorthand-no-catch/input.svelte b/test/validator/samples/await-shorthand-no-catch/input.svelte new file mode 100644 index 0000000000..e106f8d842 --- /dev/null +++ b/test/validator/samples/await-shorthand-no-catch/input.svelte @@ -0,0 +1,7 @@ + + +{#await promise then data} +

Data: {data}

+{/await} diff --git a/test/validator/samples/await-shorthand-no-catch/warnings.json b/test/validator/samples/await-shorthand-no-catch/warnings.json new file mode 100644 index 0000000000..fe51488c70 --- /dev/null +++ b/test/validator/samples/await-shorthand-no-catch/warnings.json @@ -0,0 +1 @@ +[] From c965abc884d030865beeb790d53fa086dbee69ac Mon Sep 17 00:00:00 2001 From: thollander Date: Sun, 28 Apr 2019 00:48:15 +0200 Subject: [PATCH 008/510] Use the already defined type for AppendTarget --- src/compile/render-ssr/Renderer.ts | 4 +--- src/compile/render-ssr/handlers/InlineComponent.ts | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/compile/render-ssr/Renderer.ts b/src/compile/render-ssr/Renderer.ts index 73f89dba22..c97965de14 100644 --- a/src/compile/render-ssr/Renderer.ts +++ b/src/compile/render-ssr/Renderer.ts @@ -11,7 +11,7 @@ import Slot from './handlers/Slot'; import Tag from './handlers/Tag'; import Text from './handlers/Text'; import Title from './handlers/Title'; -import { CompileOptions } from '../../interfaces'; +import { AppendTarget, CompileOptions } from '../../interfaces'; type Handler = (node: any, renderer: Renderer, options: CompileOptions) => void; @@ -36,8 +36,6 @@ const handlers: Record = { Window: noop }; -type AppendTarget = any; // TODO - export default class Renderer { has_bindings = false; code = ''; diff --git a/src/compile/render-ssr/handlers/InlineComponent.ts b/src/compile/render-ssr/handlers/InlineComponent.ts index 289f2ff8f8..bc58be5df9 100644 --- a/src/compile/render-ssr/handlers/InlineComponent.ts +++ b/src/compile/render-ssr/handlers/InlineComponent.ts @@ -4,8 +4,7 @@ import { snip } from '../../utils/snip'; import Renderer from '../Renderer'; import { stringify_props } from '../../utils/stringify_props'; import { get_slot_scope } from './shared/get_slot_scope'; - -type AppendTarget = any; // TODO +import { AppendTarget } from '../../../interfaces'; function stringify_attribute(chunk: Node) { if (chunk.type === 'Text') { @@ -111,4 +110,4 @@ export default function(node, renderer: Renderer, options) { const slots = stringify_props(slot_fns); renderer.append(`\${@validate_component(${expression}, '${node.name}').$$render($$result, ${props}, ${bindings}, ${slots})}`); -} \ No newline at end of file +} From e0bebb56a9389c2740623db1cc95449c70aee981 Mon Sep 17 00:00:00 2001 From: Andrei Eftimie Date: Sun, 28 Apr 2019 15:31:19 +0300 Subject: [PATCH 009/510] Site: Fix slot typo in docs --- site/content/docs/02-template-syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 952272c6e1..260c3482d9 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -983,7 +983,7 @@ Named slots can also expose values. The `let:` directive goes on the element wit {/each} - + ``` From 788519b1c460080c2f64fecdc7dc255409efff60 Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Sat, 27 Apr 2019 17:11:49 +0100 Subject: [PATCH 010/510] Site: use pure javascript slugification library This library doesn't support languages but it has only 2 dependencies being free from native dependencies Closes #2508 --- site/README.md | 2 +- site/config.js | 1 - site/package-lock.json | 164 +++++++++++----------------------------- site/package.json | 2 +- site/src/utils/slug.js | 28 ++++--- site/test/utils/slug.js | 138 ++++++++++++++++----------------- 6 files changed, 131 insertions(+), 204 deletions(-) diff --git a/site/README.md b/site/README.md index 223830b3fa..1ba94e8b56 100644 --- a/site/README.md +++ b/site/README.md @@ -29,4 +29,4 @@ BASEURL=http://localhost:3000 Anchors are automatically generated using headings in the documentation and by default (for the english language) they are latinised to make sure the URL is always conforming to RFC3986. -If we need to translate the API documentation to a language using unicode chars, we can setup this app to export the correct anchors by setting up `SLUG_PRESERVE_UNICODE` to `true` and `SLUG_LANG` to the ISO 639-1 two-letter language code of your choice in `config.js`. +If we need to translate the API documentation to a language using unicode chars, we can setup this app to export the correct anchors by setting up `SLUG_PRESERVE_UNICODE` to `true` in `config.js`. diff --git a/site/config.js b/site/config.js index 25dfce0c22..097bd173a8 100644 --- a/site/config.js +++ b/site/config.js @@ -1,3 +1,2 @@ export const SLUG_PRESERVE_UNICODE = false; export const SLUG_SEPARATOR = '_'; -export const SLUG_LANG = 'en'; diff --git a/site/package-lock.json b/site/package-lock.json index a96697a7f2..67dc585991 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1370,6 +1370,16 @@ "resolved": "https://registry.npmjs.org/@polka/url/-/url-0.5.0.tgz", "integrity": "sha512-oZLYFEAzUKyi3SKnXvj32ZCEGH6RDnao7COuCVhDydMS9NrCSVXhM79VaKyP5+Zc33m0QXEd2DN3UkU7OsHcfw==" }, + "@sindresorhus/slugify": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-0.9.1.tgz", + "integrity": "sha512-b6heYM9dzZD13t2GOiEQTDE0qX+I1GyOotMwKh9VQqzuNiVdPVT8dM43fe9HNb/3ul+Qwd5oKSEDrDIfhq3bnQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "lodash.deburr": "^4.1.0" + } + }, "@sveltejs/svelte-repl": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.0.10.tgz", @@ -1401,15 +1411,6 @@ "@types/node": "*" } }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, "acorn": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", @@ -1704,16 +1705,6 @@ "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", "dev": true }, - "bulk-replace": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/bulk-replace/-/bulk-replace-0.0.1.tgz", - "integrity": "sha1-8JVoKolqvUs9ngjeQJzCIuIT+d0=" - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -2478,7 +2469,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2502,13 +2494,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2525,19 +2519,22 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2668,7 +2665,8 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2682,6 +2680,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2698,6 +2697,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2706,13 +2706,15 @@ "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2733,6 +2735,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2821,7 +2824,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2835,6 +2839,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2930,7 +2935,8 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2972,6 +2978,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2993,6 +3000,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3041,13 +3049,15 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true + "dev": true, + "optional": true } } }, @@ -3212,14 +3222,6 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "hepburn": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/hepburn/-/hepburn-1.1.1.tgz", - "integrity": "sha512-Ok3ZmMJN3ek4WFAL4f5t8k+BmrDRlS5qGjI4um+3cHH0SrYVzJgUTYwIfGvU8s/eWqOEY+gsINwjJSoaBG3A9g==", - "requires": { - "bulk-replace": "0.0.1" - } - }, "home-or-tmp": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-3.0.0.tgz", @@ -3619,11 +3621,6 @@ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", "dev": true }, - "keypress": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz", - "integrity": "sha1-SjGI1CkbZrT2XtuZ+AaqmuKTWSo=" - }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -3639,16 +3636,6 @@ "invert-kv": "^2.0.0" } }, - "limax": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/limax/-/limax-1.7.0.tgz", - "integrity": "sha512-ibcGylOXT5vry2JKfKwLWx2tZudRYWm4SzG9AE/cc5zqwW+3nQy/uPLUvfAUChRdmqxVrK6SNepmO7ZY8RoKfA==", - "requires": { - "hepburn": "^1.1.0", - "pinyin": "^2.8.3", - "speakingurl": "^14.0.1" - } - }, "load-bmfont": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/load-bmfont/-/load-bmfont-1.4.0.tgz", @@ -3693,6 +3680,12 @@ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, + "lodash.deburr": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-4.1.0.tgz", + "integrity": "sha1-3bG7s+8HRYwBd7oH3hRCLLAz/5s=", + "dev": true + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -3808,19 +3801,6 @@ "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", "dev": true }, - "mime-db": { - "version": "1.38.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", - "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" - }, - "mime-types": { - "version": "2.1.22", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", - "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", - "requires": { - "mime-db": "~1.38.0" - } - }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -4001,11 +3981,6 @@ "to-regex": "^3.0.1" } }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -4045,23 +4020,6 @@ "semver": "^5.3.0" } }, - "nodejieba": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/nodejieba/-/nodejieba-2.3.0.tgz", - "integrity": "sha512-ZzLsVuNDlrmcBQa/b8G/yegdXje2iFmktYmPksk6qLha1brKEANYqg4XPiBspF1D0y7Npho91KTmvKFcDr0UdA==", - "optional": true, - "requires": { - "nan": "~2.10.0" - }, - "dependencies": { - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "optional": true - } - } - }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -4433,26 +4391,6 @@ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, - "pinyin": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/pinyin/-/pinyin-2.8.3.tgz", - "integrity": "sha1-MBzLQ1jM/oAlI8S9ZAphK+5NfEs=", - "requires": { - "commander": "~1.1.1", - "nodejieba": "^2.2.1", - "object-assign": "^4.0.1" - }, - "dependencies": { - "commander": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-1.1.1.tgz", - "integrity": "sha1-UNFlGGiuYOzP8KLZ80WVN2vGsEE=", - "requires": { - "keypress": "0.1.x" - } - } - } - }, "pixelmatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", @@ -5206,11 +5144,6 @@ "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", "dev": true }, - "speakingurl": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz", - "integrity": "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==" - }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -5649,11 +5582,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", diff --git a/site/package.json b/site/package.json index 437cf0680d..e3a0a3b67f 100644 --- a/site/package.json +++ b/site/package.json @@ -20,7 +20,6 @@ "do-not-zip": "^1.0.0", "express-session": "^1.15.6", "golden-fleece": "^1.0.9", - "limax": "^1.7.0", "marked": "^0.6.1", "node-fetch": "^2.3.0", "passport": "^0.4.0", @@ -38,6 +37,7 @@ "@babel/plugin-transform-runtime": "^7.2.0", "@babel/preset-env": "^7.3.1", "@babel/runtime": "^7.3.1", + "@sindresorhus/slugify": "^0.9.1", "@sveltejs/svelte-repl": "0.0.10", "chokidar": "^2.1.2", "degit": "^2.1.3", diff --git a/site/src/utils/slug.js b/site/src/utils/slug.js index 4ad7b96b2a..79b82c12ce 100644 --- a/site/src/utils/slug.js +++ b/site/src/utils/slug.js @@ -1,14 +1,20 @@ -import limax from 'limax'; -import {SLUG_LANG, SLUG_SEPARATOR} from '../../config'; +import slugify from '@sindresorhus/slugify'; +import {SLUG_SEPARATOR} from '../../config'; -/* latinizer processor */ +/* url-safe processor */ -export const limaxProcessor = (string, lang = SLUG_LANG) => limax(string, { - custom: ['$'], - separator: SLUG_SEPARATOR, - maintainCase: true, - lang -}); +export const urlsafeSlugProcessor = string => + slugify(string, { + customReplacements: [ // runs before any other transformations + ['$', 'DOLLAR'], // `$destroy` & co + ['-', 'DASH'], // conflicts with `separator` + ], + separator: SLUG_SEPARATOR, + decamelize: false, + lowercase: false + }) + .replace(/DOLLAR/g, '$') + .replace(/DASH/g, '-'); /* unicode-preserver processor */ @@ -40,7 +46,7 @@ export const unicodeSafeProcessor = string => .chunks .reduce((accum, chunk) => { const processed = chunk.type === 'process' - ? limaxProcessor(chunk.string) + ? urlsafeSlugProcessor(chunk.string) : chunk.string; processed.length > 0 && accum.push(processed); @@ -52,7 +58,7 @@ export const unicodeSafeProcessor = string => /* session processor */ export const makeSessionSlugProcessor = (preserveUnicode = false) => { - const processor = preserveUnicode ? unicodeSafeProcessor : limaxProcessor; + const processor = preserveUnicode ? unicodeSafeProcessor : urlsafeSlugProcessor; const seen = new Set(); return string => { diff --git a/site/test/utils/slug.js b/site/test/utils/slug.js index c6d6c96685..17262c5e83 100644 --- a/site/test/utils/slug.js +++ b/site/test/utils/slug.js @@ -1,61 +1,61 @@ import {strict as assert} from 'assert'; -import {limaxProcessor, unicodeSafeProcessor} from '../../src/utils/slug'; -import {SLUG_SEPARATOR as _, SLUG_LANG} from '../../config'; +import {urlsafeSlugProcessor, unicodeSafeProcessor} from '../../src/utils/slug'; +import {SLUG_SEPARATOR as _} from '../../config'; describe('slug', () => { - describe('limaxProcessor (latinize unicode)', () => { + describe('urlsafeSlugProcessor', () => { describe('ascii', () => { it('space separated words', () => { assert.equal( - limaxProcessor('Text expressions'), - `text${_}expressions` + urlsafeSlugProcessor('Text expressions'), + `Text${_}expressions` ); }); it('numbered text', () => { assert.equal( - limaxProcessor('1. export creates'), + urlsafeSlugProcessor('1. export creates'), `1${_}export${_}creates` ); }); it('punctuated text', () => { assert.equal( - limaxProcessor('svelte.VERSION'), - `svelte${_}version` + urlsafeSlugProcessor('svelte.VERSION'), + `svelte${_}VERSION` ); }); it('text starting with the dollar sign', () => { assert.equal( - limaxProcessor('$destroy method'), + urlsafeSlugProcessor('$destroy method'), `$destroy${_}method` ); }); it('numbered text containing the dollar sign', () => { assert.equal( - limaxProcessor('1. export $destroy'), + urlsafeSlugProcessor('1. export $destroy'), `1${_}export${_}$destroy` ); }); it('text containing the equal char', () => { assert.equal( - limaxProcessor('script context=module'), + urlsafeSlugProcessor('script context=module'), `script${_}context${_}module` ); }); it('text containing the colon char', () => { assert.equal( - limaxProcessor('svelte:body'), + urlsafeSlugProcessor('svelte:body'), `svelte${_}body` ); }); it('text containing the slash char', () => { assert.equal( - limaxProcessor('svelte/motion'), + urlsafeSlugProcessor('svelte/motion'), `svelte${_}motion` ); }); it('text containing the comma char', () => { assert.equal( - limaxProcessor('svelte, motion'), + urlsafeSlugProcessor('svelte, motion'), `svelte${_}motion` ); }); @@ -63,156 +63,150 @@ describe('slug', () => { describe('unicode', () => { it('should translate symbols to English', () => { assert.equal( - limaxProcessor('Ich ♥ Deutsch'), - `ich${_}love${_}deutsch` + urlsafeSlugProcessor('Ich ♥ Deutsch'), + `Ich${_}love${_}Deutsch` ); }); it('should remove emoji', () => { assert.equal( - limaxProcessor('Ich 😍 Deutsch'), - `ich${_}deutsch` - ); - }); - it('should translate symbols to the given language (German)', () => { - assert.equal( - limaxProcessor('Ich ♥ Deutsch', 'de'), - `ich${_}liebe${_}deutsch` + urlsafeSlugProcessor('Ich 😍 Deutsch'), + `Ich${_}Deutsch` ); }); }); describe('cyricllic', () => { it('space separated words', () => { assert.equal( - limaxProcessor('Всплытие и перехват событий'), - `vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие и перехват событий'), + `Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('numbered text', () => { assert.equal( - limaxProcessor('1 Всплытие и перехват событий'), - `1${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('1 Всплытие и перехват событий'), + `1${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('punctuated text', () => { assert.equal( - limaxProcessor('.Всплытие.и.перехват событий'), - `vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('.Всплытие.и.перехват событий'), + `Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text starting with the dollar sign', () => { assert.equal( - limaxProcessor('$Всплытие $ перехват событий'), - `$vsplytie${_}$${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('$Всплытие $ перехват событий'), + `$Vsplytie${_}$${_}perehvat${_}sobytij` ); }); it('text containing the dollar sign', () => { assert.equal( - limaxProcessor('Всплытие$перехват'), - `vsplytie$perekhvat` + urlsafeSlugProcessor('Всплытие$перехват'), + `Vsplytie$perehvat` ); }); it('text containing the equal char', () => { assert.equal( - limaxProcessor('Всплытие = перехват=событий'), - `vsplytie${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие = перехват=событий'), + `Vsplytie${_}perehvat${_}sobytij` ); }); it('text containing the colon char', () => { assert.equal( - limaxProcessor('Всплытие : перехват:событий'), - `vsplytie${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие : перехват:событий'), + `Vsplytie${_}perehvat${_}sobytij` ); }); it('text containing the slash char', () => { assert.equal( - limaxProcessor('Всплытие / перехват/событий'), - `vsplytie${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие / перехват/событий'), + `Vsplytie${_}perehvat${_}sobytij` ); }); it('text containing the comma char', () => { assert.equal( - limaxProcessor('Всплытие, перехват'), - `vsplytie${_}perekhvat` + urlsafeSlugProcessor('Всплытие, перехват'), + `Vsplytie${_}perehvat` ); }); }); describe('ascii + cyricllic', () => { it('space separated words', () => { assert.equal( - limaxProcessor('Всплытие и export перехват событий'), - `vsplytie${_}i${_}export${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие и export перехват событий'), + `Vsplytie${_}i${_}export${_}perehvat${_}sobytij` ); }); it('ascii word concatenated to a cyricllic word', () => { assert.equal( - limaxProcessor('exportВсплытие'), - 'exportvsplytie' + urlsafeSlugProcessor('exportВсплытие'), + 'exportVsplytie' ); }); it('cyricllic word concatenated to an ascii word', () => { assert.equal( - limaxProcessor('Всплытиеexport'), - `vsplytieexport` + urlsafeSlugProcessor('Всплытиеexport'), + `Vsplytieexport` ); }); it('numbered text', () => { assert.equal( - limaxProcessor('1 export Всплытие и перехват событий'), - `1${_}export${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('1 export Всплытие и перехват событий'), + `1${_}export${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('punctuated text', () => { assert.equal( - limaxProcessor('.Всплытие.export.и.перехват событий'), - `vsplytie${_}export${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('.Всплытие.export.и.перехват событий'), + `Vsplytie${_}export${_}i${_}perehvat${_}sobytij` ); }); it('text starting with the dollar sign, followed by ascii char', () => { assert.equal( - limaxProcessor('$exportВсплытие перехват событий'), - `$exportvsplytie${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('$exportВсплытие перехват событий'), + `$exportVsplytie${_}perehvat${_}sobytij` ); }); it('text starting with the dollar sign, followed by unicode char', () => { assert.equal( - limaxProcessor('$Всплытие export перехват событий'), - `$vsplytie${_}export${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('$Всплытие export перехват событий'), + `$Vsplytie${_}export${_}perehvat${_}sobytij` ); }); it('text containing the dollar sign, followed by ascii char', () => { assert.equal( - limaxProcessor('export $destroy a component prop Всплытие и перехват событий'), - `export${_}$destroy${_}a${_}component${_}prop${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('export $destroy a component prop Всплытие и перехват событий'), + `export${_}$destroy${_}a${_}component${_}prop${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text containing the dollar sign, followed by unicode char', () => { assert.equal( - limaxProcessor('Всплытие export $Всплытие a component prop Всплытие и перехват событий'), - `vsplytie${_}export${_}$vsplytie${_}a${_}component${_}prop${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие export $Всплытие a component prop Всплытие и перехват событий'), + `Vsplytie${_}export${_}$Vsplytie${_}a${_}component${_}prop${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text containing the equal char', () => { assert.equal( - limaxProcessor('script context=module Всплытие=и перехват событий'), - `script${_}context${_}module${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('script context=module Всплытие=и перехват событий'), + `script${_}context${_}module${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text containing the colon char', () => { assert.equal( - limaxProcessor('svelte:body Всплытие и:перехват событий'), - `svelte${_}body${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('svelte:body Всплытие и:перехват событий'), + `svelte${_}body${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text containing the slash char', () => { assert.equal( - limaxProcessor('svelte/motion Всплытие и / перехват/событий'), - `svelte${_}motion${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('svelte/motion Всплытие и / перехват/событий'), + `svelte${_}motion${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text containing the comma char', () => { assert.equal( - limaxProcessor('Всплытие, export'), - `vsplytie${_}export` + urlsafeSlugProcessor('Всплытие, export'), + `Vsplytie${_}export` ); }); }); @@ -223,7 +217,7 @@ describe('slug', () => { it('space separated words', () => { assert.equal( unicodeSafeProcessor('Text expressions'), - `text${_}expressions` + `Text${_}expressions` ); }); it('numbered text', () => { @@ -235,7 +229,7 @@ describe('slug', () => { it('punctuated text', () => { assert.equal( unicodeSafeProcessor('svelte.VERSION'), - `svelte${_}version` + `svelte${_}VERSION` ); }); it('text starting with the dollar sign', () => { @@ -279,13 +273,13 @@ describe('slug', () => { it('should preserve symbols', () => { assert.equal( unicodeSafeProcessor('Ich ♥ Deutsch'), - `ich${_}love${_}deutsch` + `Ich${_}love${_}Deutsch` ); }); it('should remove emoji', () => { assert.equal( unicodeSafeProcessor('Ich 😍 Deutsch'), - `ich${_}deutsch` + `Ich${_}Deutsch` ); }); }); From 55efa0e0b15d945b90c93e1e1e9c52707f7a7247 Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Sat, 27 Apr 2019 21:06:02 +0100 Subject: [PATCH 011/510] Site: REPL temp fix for the output pane does not receiving touch events on mobile & tablet Applying this fix to make the site accessible on mobile again, will remove when https://github.com/sveltejs/svelte-repl/issues/8 gets fixed and published Fixes #2499 #2550 --- site/src/routes/examples/index.svelte | 22 +++++++++++++++++----- site/src/routes/repl/index.svelte | 14 ++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/site/src/routes/examples/index.svelte b/site/src/routes/examples/index.svelte index ccc03c4680..269d9388cf 100644 --- a/site/src/routes/examples/index.svelte +++ b/site/src/routes/examples/index.svelte @@ -97,11 +97,9 @@
-
+
-
+
Date: Sun, 28 Apr 2019 19:09:50 +0200 Subject: [PATCH 012/510] Check if a figcaption's first element ancestor is a figure --- src/compile/nodes/Element.ts | 16 +++++++++++++++- .../input.svelte | 10 ++++++++++ .../warnings.json | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 test/validator/samples/a11y-figcaption-in-non-element-block/input.svelte create mode 100644 test/validator/samples/a11y-figcaption-in-non-element-block/warnings.json diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts index b38ee5b6fb..ac2b81b3e7 100644 --- a/src/compile/nodes/Element.ts +++ b/src/compile/nodes/Element.ts @@ -224,7 +224,21 @@ export default class Element extends Node { } if (this.name === 'figcaption') { - if (this.parent.name !== 'figure') { + let { parent } = this; + let is_figure_parent = false; + + while (parent) { + if (parent.name === 'figure') { + is_figure_parent = true; + break; + } + if (parent.type === 'Element') { + break; + } + parent = parent.parent; + } + + if (!is_figure_parent) { this.component.warn(this, { code: `a11y-structure`, message: `A11y:
must be an immediate child of
` diff --git a/test/validator/samples/a11y-figcaption-in-non-element-block/input.svelte b/test/validator/samples/a11y-figcaption-in-non-element-block/input.svelte new file mode 100644 index 0000000000..9d4b6ded4d --- /dev/null +++ b/test/validator/samples/a11y-figcaption-in-non-element-block/input.svelte @@ -0,0 +1,10 @@ + + +
+ a picture of a foo + {#if caption} +
{caption}
+ {/if} +
diff --git a/test/validator/samples/a11y-figcaption-in-non-element-block/warnings.json b/test/validator/samples/a11y-figcaption-in-non-element-block/warnings.json new file mode 100644 index 0000000000..fe51488c70 --- /dev/null +++ b/test/validator/samples/a11y-figcaption-in-non-element-block/warnings.json @@ -0,0 +1 @@ +[] From 2484b9e597dc3d065dc5e7e7bec5e06879b36c27 Mon Sep 17 00:00:00 2001 From: thollander Date: Sun, 28 Apr 2019 20:20:35 +0200 Subject: [PATCH 013/510] Create a new abstraction level to handle `Block` - `AbstractBlock` contains the Block' specific rules - extends a `Node` - has a `block` and `children` - can warn if empty --- src/compile/nodes/CatchBlock.ts | 11 ++++------ src/compile/nodes/EachBlock.ts | 8 +++----- src/compile/nodes/ElseBlock.ts | 9 +++----- src/compile/nodes/IfBlock.ts | 10 +++------ src/compile/nodes/PendingBlock.ts | 9 +++----- src/compile/nodes/ThenBlock.ts | 9 +++----- src/compile/nodes/shared/AbstractBlock.ts | 25 +++++++++++++++++++++++ src/compile/nodes/shared/Node.ts | 16 ++------------- 8 files changed, 46 insertions(+), 51 deletions(-) create mode 100644 src/compile/nodes/shared/AbstractBlock.ts diff --git a/src/compile/nodes/CatchBlock.ts b/src/compile/nodes/CatchBlock.ts index f728c1b850..5171631845 100644 --- a/src/compile/nodes/CatchBlock.ts +++ b/src/compile/nodes/CatchBlock.ts @@ -1,12 +1,9 @@ -import Node from './shared/Node'; -import Block from '../render-dom/Block'; import map_children from './shared/map_children'; import TemplateScope from './shared/TemplateScope'; +import AbstractBlock from './shared/AbstractBlock'; -export default class CatchBlock extends Node { - block: Block; +export default class CatchBlock extends AbstractBlock { scope: TemplateScope; - children: Node[]; constructor(component, parent, scope, info) { super(component, parent, scope, info); @@ -14,7 +11,7 @@ export default class CatchBlock extends Node { this.scope = scope.child(); this.scope.add(parent.error, parent.expression.dependencies, this); this.children = map_children(component, parent, this.scope, info.children); - + this.warn_if_empty_block(); } -} \ No newline at end of file +} diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts index ce9b63fe47..d143cdd1ec 100644 --- a/src/compile/nodes/EachBlock.ts +++ b/src/compile/nodes/EachBlock.ts @@ -1,9 +1,9 @@ import Node from './shared/Node'; import ElseBlock from './ElseBlock'; -import Block from '../render-dom/Block'; import Expression from './shared/Expression'; import map_children from './shared/map_children'; import TemplateScope from './shared/TemplateScope'; +import AbstractBlock from './shared/AbstractBlock'; import { Node as INode } from '../../interfaces'; function unpack_destructuring(contexts: Array<{ name: string, tail: string }>, node: INode, tail: string) { @@ -25,10 +25,9 @@ function unpack_destructuring(contexts: Array<{ name: string, tail: string }>, n } } -export default class EachBlock extends Node { +export default class EachBlock extends AbstractBlock { type: 'EachBlock'; - block: Block; expression: Expression; context_node: Node; @@ -41,7 +40,6 @@ export default class EachBlock extends Node { has_animation: boolean; has_binding = false; - children: Node[]; else?: ElseBlock; constructor(component, parent, scope, info) { @@ -85,7 +83,7 @@ export default class EachBlock extends Node { } } - this.warn_if_empty_block(); // TODO would be better if EachBlock, IfBlock etc extended an abstract Block class + this.warn_if_empty_block(); this.else = info.else ? new ElseBlock(component, this, this.scope, info.else) diff --git a/src/compile/nodes/ElseBlock.ts b/src/compile/nodes/ElseBlock.ts index 90886f8fdc..61c1aa5455 100644 --- a/src/compile/nodes/ElseBlock.ts +++ b/src/compile/nodes/ElseBlock.ts @@ -1,11 +1,8 @@ -import Node from './shared/Node'; -import Block from '../render-dom/Block'; import map_children from './shared/map_children'; +import AbstractBlock from './shared/AbstractBlock'; -export default class ElseBlock extends Node { +export default class ElseBlock extends AbstractBlock { type: 'ElseBlock'; - children: Node[]; - block: Block; constructor(component, parent, scope, info) { super(component, parent, scope, info); @@ -13,4 +10,4 @@ export default class ElseBlock extends Node { this.warn_if_empty_block(); } -} \ No newline at end of file +} diff --git a/src/compile/nodes/IfBlock.ts b/src/compile/nodes/IfBlock.ts index 5b79d16385..ae6aede834 100644 --- a/src/compile/nodes/IfBlock.ts +++ b/src/compile/nodes/IfBlock.ts @@ -1,17 +1,13 @@ -import Node from './shared/Node'; import ElseBlock from './ElseBlock'; -import Block from '../render-dom/Block'; import Expression from './shared/Expression'; import map_children from './shared/map_children'; +import AbstractBlock from './shared/AbstractBlock'; -export default class IfBlock extends Node { +export default class IfBlock extends AbstractBlock { type: 'IfBlock'; expression: Expression; - children: any[]; else: ElseBlock; - block: Block; - constructor(component, parent, scope, info) { super(component, parent, scope, info); @@ -24,4 +20,4 @@ export default class IfBlock extends Node { this.warn_if_empty_block(); } -} \ No newline at end of file +} diff --git a/src/compile/nodes/PendingBlock.ts b/src/compile/nodes/PendingBlock.ts index 720442fab6..688039c2ec 100644 --- a/src/compile/nodes/PendingBlock.ts +++ b/src/compile/nodes/PendingBlock.ts @@ -1,10 +1,7 @@ -import Node from './shared/Node'; -import Block from '../render-dom/Block'; import map_children from './shared/map_children'; +import AbstractBlock from './shared/AbstractBlock'; -export default class PendingBlock extends Node { - block: Block; - children: Node[]; +export default class PendingBlock extends AbstractBlock { constructor(component, parent, scope, info) { super(component, parent, scope, info); @@ -12,4 +9,4 @@ export default class PendingBlock extends Node { this.warn_if_empty_block(); } -} \ No newline at end of file +} diff --git a/src/compile/nodes/ThenBlock.ts b/src/compile/nodes/ThenBlock.ts index 54319a7ae5..d8d251e1d7 100644 --- a/src/compile/nodes/ThenBlock.ts +++ b/src/compile/nodes/ThenBlock.ts @@ -1,12 +1,9 @@ -import Node from './shared/Node'; -import Block from '../render-dom/Block'; import map_children from './shared/map_children'; import TemplateScope from './shared/TemplateScope'; +import AbstractBlock from './shared/AbstractBlock'; -export default class ThenBlock extends Node { - block: Block; +export default class ThenBlock extends AbstractBlock { scope: TemplateScope; - children: Node[]; constructor(component, parent, scope, info) { super(component, parent, scope, info); @@ -17,4 +14,4 @@ export default class ThenBlock extends Node { this.warn_if_empty_block(); } -} \ No newline at end of file +} diff --git a/src/compile/nodes/shared/AbstractBlock.ts b/src/compile/nodes/shared/AbstractBlock.ts new file mode 100644 index 0000000000..1dfebd51f0 --- /dev/null +++ b/src/compile/nodes/shared/AbstractBlock.ts @@ -0,0 +1,25 @@ +import Block from '../../render-dom/Block'; +import Component from './../../Component'; +import Node from './Node'; + +export default class AbstractBlock extends Node { + block: Block; + children: Node[]; + + constructor(component: Component, parent, scope, info: any) { + super(component, parent, scope, info); + } + + warn_if_empty_block() { + if (!this.children || this.children.length > 1) return; + + const child = this.children[0]; + + if (!child || (child.type === 'Text' && !/[^ \r\n\f\v\t]/.test(child.data))) { + this.component.warn(this, { + code: 'empty-block', + message: 'Empty block' + }); + } + } +} diff --git a/src/compile/nodes/shared/Node.ts b/src/compile/nodes/shared/Node.ts index 92c1cc40d7..b6eaf9965d 100644 --- a/src/compile/nodes/shared/Node.ts +++ b/src/compile/nodes/shared/Node.ts @@ -1,3 +1,4 @@ +import Attribute from './../Attribute'; import Component from './../../Component'; export default class Node { @@ -12,6 +13,7 @@ export default class Node { can_use_innerhtml: boolean; var: string; + attributes: Attribute[]; constructor(component: Component, parent, scope, info: any) { this.start = info.start; @@ -64,18 +66,4 @@ export default class Node { this.parent.type === type || this.parent.has_ancestor(type) : false; } - - warn_if_empty_block() { - if (!/Block$/.test(this.type) || !this.children) return; - if (this.children.length > 1) return; - - const child = this.children[0]; - - if (!child || (child.type === 'Text' && !/[^ \r\n\f\v\t]/.test(child.data))) { - this.component.warn(this, { - code: 'empty-block', - message: 'Empty block' - }); - } - } } From 8839951185c6ce0abb8a1fe45e96394418e7950c Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Sat, 27 Apr 2019 17:52:14 +0100 Subject: [PATCH 014/510] Site: REPL, use the gist or example title in the page title Closes #2592 --- site/src/components/InlineSvg.svelte | 4 ++-- .../routes/repl/_components/AppControls/index.svelte | 3 +-- site/src/routes/repl/index.svelte | 10 ++++++---- site/src/utils/compat.js | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 site/src/utils/compat.js diff --git a/site/src/components/InlineSvg.svelte b/site/src/components/InlineSvg.svelte index e29810ae97..741ab7ec9e 100644 --- a/site/src/components/InlineSvg.svelte +++ b/site/src/components/InlineSvg.svelte @@ -5,7 +5,7 @@ - advantage of css-styling - https://github.com/jacobmischka/svelte-feather-icon - https://feathericons.com/ - - if requred we can split out app-controls to REPL only + - if required we can split out app-controls to REPL only ----------------------------------------------- --> @@ -112,4 +112,4 @@ - \ No newline at end of file + diff --git a/site/src/routes/repl/_components/AppControls/index.svelte b/site/src/routes/repl/_components/AppControls/index.svelte index 179a8e4470..1ccd511152 100644 --- a/site/src/routes/repl/_components/AppControls/index.svelte +++ b/site/src/routes/repl/_components/AppControls/index.svelte @@ -6,6 +6,7 @@ import downloadBlob from '../../_utils/downloadBlob.js'; import { user } from '../../../../user.js'; import { enter } from '../../../../utils/events.js'; + import { isMac } from '../../../../utils/compat.js'; const dispatch = createEventDispatcher(); @@ -20,8 +21,6 @@ let justSaved = false; let justForked = false; - const isMac = typeof navigator !== 'undefined' && navigator.platform === 'MacIntel'; - function wait(ms) { return new Promise(f => setTimeout(f, ms)); } diff --git a/site/src/routes/repl/index.svelte b/site/src/routes/repl/index.svelte index e89c3e0587..39dcfd78f9 100644 --- a/site/src/routes/repl/index.svelte +++ b/site/src/routes/repl/index.svelte @@ -27,7 +27,7 @@ let repl; let gist; - let name = 'loading...'; + let name = 'Loading...'; let zen_mode = false; let relaxed = false; let width = process.browser ? window.innerWidth : 1000; @@ -58,7 +58,9 @@ if (gist_id) { relaxed = false; - fetch(`gist/${gist_id}`).then(r => r.json()).then(data => { + fetch(`gist/${gist_id}`) + .then(r => r.json()) + .then(data => { gist = data; const { description, files } = data; @@ -201,7 +203,7 @@ - REPL • Svelte + {name} • REPL • Svelte @@ -212,9 +214,9 @@
diff --git a/site/src/utils/compat.js b/site/src/utils/compat.js new file mode 100644 index 0000000000..0b0f1e954b --- /dev/null +++ b/site/src/utils/compat.js @@ -0,0 +1 @@ +export const isMac = typeof navigator !== 'undefined' && navigator.platform === 'MacIntel'; From 211d86b4f810670d6549ba196c569a0b9f5d6d6a Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Sun, 28 Apr 2019 16:28:26 +0100 Subject: [PATCH 015/510] Update the message in the popup we get when we login in the REPL --- site/README.md | 18 +++++++++++------- site/src/server.js | 3 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/site/README.md b/site/README.md index 1ba94e8b56..c438bda5ca 100644 --- a/site/README.md +++ b/site/README.md @@ -17,13 +17,17 @@ By default, the REPL will fetch the most recent version of Svelte from https://u ## REPL GitHub integration -In order for the REPL's GitHub integration to work properly when running locally, you will need to create a GitHub OAuth app. Set its authorization callback URL to `http://localhost:3000/auth/callback`, and in this project, create `site/.env` containing: - -``` -GITHUB_CLIENT_ID=[your app's client id] -GITHUB_CLIENT_SECRET=[your app's client secret] -BASEURL=http://localhost:3000 -``` +In order for the REPL's GitHub integration to work properly when running locally, you will need to: +- [create a GitHub OAuth app](https://github.com/settings/developers): + - set `Authorization callback URL` to `http://localhost:3000/auth/callback`; + - set `Application name` as you like, and `Homepage URL` as `http://localhost:3000/`; + - create the app and take note of `Client ID` and `Client Secret` +- in this repo, create `site/.env` containing: + ``` + GITHUB_CLIENT_ID=[your app's Client ID] + GITHUB_CLIENT_SECRET=[your app's Client Secret] + BASEURL=http://localhost:3000 + ``` ## Translating the API docs diff --git a/site/src/server.js b/site/src/server.js index 3413e218d8..fabda7c0ce 100644 --- a/site/src/server.js +++ b/site/src/server.js @@ -82,11 +82,12 @@ if (process.env.GITHUB_CLIENT_ID) { res.end(`

Missing .env file

-

In order to use GitHub authentication, you will need to register an OAuth application with gist and read:user scopes, and create a .env file:

+

In order to use GitHub authentication, you will need to register an OAuth application and create a local .env file:

GITHUB_CLIENT_ID=[YOUR_APP_ID]\nGITHUB_CLIENT_SECRET=[YOUR_APP_SECRET]\nBASEURL=http://localhost:3000

The BASEURL variable should match the callback URL specified for your app.

+

See also here

`); }); From 4cbbabecb575f6adedeb149545105a3040c3208d Mon Sep 17 00:00:00 2001 From: Emil Tholin Date: Mon, 29 Apr 2019 22:31:35 +0200 Subject: [PATCH 016/510] Make null the default anchor of insertBefore --- src/internal/dom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/dom.js b/src/internal/dom.js index db1b95e4da..b84568a988 100644 --- a/src/internal/dom.js +++ b/src/internal/dom.js @@ -3,7 +3,7 @@ export function append(target, node) { } export function insert(target, node, anchor) { - target.insertBefore(node, anchor); + target.insertBefore(node, anchor || null); } export function detach(node) { From 5813248e5a958670c8c22648697e04e2efa17dc0 Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Sun, 28 Apr 2019 20:12:01 +0100 Subject: [PATCH 017/510] Site: add anchors to blog posts Closes #2609 --- site/src/routes/blog/[slug].svelte | 44 +++++++++++++++++++++++++++++- site/src/routes/blog/_posts.js | 18 +++++++++++- site/src/utils/slug.js | 8 +++++- 3 files changed, 67 insertions(+), 3 deletions(-) diff --git a/site/src/routes/blog/[slug].svelte b/site/src/routes/blog/[slug].svelte index c64130efe5..610fb6506b 100644 --- a/site/src/routes/blog/[slug].svelte +++ b/site/src/routes/blog/[slug].svelte @@ -133,6 +133,48 @@ border: 0.8rem solid var(--second); } + /* headers anchors */ + + .post :global(.offset-anchor) { + position: relative; + display: block; + top: calc(-1 * (var(--nav-h) + var(--top-offset) - 1rem)); + width: 0; + height: 0; + } + + .post :global(.anchor) { + position: absolute; + display: block; + background: url(/icons/link.svg) 0 50% no-repeat; + background-size: 1em 1em; + width: 1.4em; + height: 1em; + top: calc((var(--h3) - 24px) / 2); + left: -1.4em; + opacity: 0; + transition: opacity 0.2s; + border: none !important; /* TODO get rid of linkify */ + } + + .post :global(h2):hover :global(.anchor), + .post :global(h3):hover :global(.anchor), + .post :global(h4):hover :global(.anchor), + .post :global(h5):hover :global(.anchor), + .post :global(h6):hover :global(.anchor) { + opacity: 1; + } + + + @media (max-width: 768px) { + .post :global(.anchor) { + transform: scale(0.6); + opacity: 1; + top: calc((1em - 0.6 * 24px) / 2); + left: -1.0em; + } + } + @media (min-width: 910px) { .post :global(.max) { width: calc(100vw - 2 * var(--side-nav)); @@ -164,4 +206,4 @@ height: 640px; } } */ - \ No newline at end of file + diff --git a/site/src/routes/blog/_posts.js b/site/src/routes/blog/_posts.js index 7a99011c95..bc8c479f1b 100644 --- a/site/src/routes/blog/_posts.js +++ b/site/src/routes/blog/_posts.js @@ -1,10 +1,15 @@ import fs from 'fs'; import path from 'path'; -import { extract_frontmatter, langs, link_renderer } from '../../utils/markdown.js'; import marked from 'marked'; import PrismJS from 'prismjs'; import 'prismjs/components/prism-bash'; +import { extract_frontmatter, langs, link_renderer } from '../../utils/markdown'; +import { makeSlugProcessor } from '../../utils/slug'; +import { SLUG_PRESERVE_UNICODE } from '../../../config'; + +const makeSlug = makeSlugProcessor(SLUG_PRESERVE_UNICODE); + export default function get_posts() { return fs .readdirSync('content/blog') @@ -39,6 +44,17 @@ export default function get_posts() { return `
${highlighted}
`; }; + renderer.heading = (text, level, rawtext) => { + const fragment = makeSlug(rawtext); + + return ` + + + + ${text} + `; + }; + const html = marked( content.replace(/^\t+/gm, match => match.split('\t').join(' ')), { renderer } diff --git a/site/src/utils/slug.js b/site/src/utils/slug.js index 79b82c12ce..d99bc50ecb 100644 --- a/site/src/utils/slug.js +++ b/site/src/utils/slug.js @@ -55,10 +55,16 @@ export const unicodeSafeProcessor = string => }, []) .join(SLUG_SEPARATOR); +/* processor */ + +export const makeSlugProcessor = (preserveUnicode = false) => preserveUnicode + ? unicodeSafeProcessor + : urlsafeSlugProcessor; + /* session processor */ export const makeSessionSlugProcessor = (preserveUnicode = false) => { - const processor = preserveUnicode ? unicodeSafeProcessor : urlsafeSlugProcessor; + const processor = makeSlugProcessor(preserveUnicode); const seen = new Set(); return string => { From 764f71c30d7abdae8d36ad7cce9fa44c5e0e76d9 Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 29 Apr 2019 23:17:14 +0100 Subject: [PATCH 018/510] Site: Document createEventDispatcher. (#2583) --- site/content/docs/02-template-syntax.md | 6 +++++ site/content/docs/03-run-time.md | 33 ++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 260c3482d9..d573823402 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -366,7 +366,13 @@ Components can emit events using [createEventDispatcher](docs#createEventDispatc ``` +--- + +As with DOM events, if the `on:` directive is used without a value, the component will *forward* the event, meaning that a consumer of the component can listen for it. +```html + +``` ### Element bindings diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 0876cf3a36..6eae0094e9 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -176,8 +176,39 @@ Retrieves the context that belongs to the closest parent component with the spec #### `createEventDispatcher` -TODO +```js +dispatch: ((name: string, detail?: any) => void) = createEventDispatcher(); +``` + +--- + +Creates an event dispatcher that can be used to dispatch [component events](docs#Component_events). Event dispatchers are functions that can take two arguments: `name` and `detail`. + +Component events created with `createEventDispatcher` create a [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent). These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture) and are not cancellable with `event.preventDefault()`. The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail) property and can contain any type of data. + +```html + + +``` + +--- + +Events dispatched from child components can be listened to in their parent. Any data provided when the event was dispatched is available on the `detail` property of the event object. + +```html + + + +``` ### `svelte/store` From 60e73c41dceaad8354c312105edfadc887849f7b Mon Sep 17 00:00:00 2001 From: pngwn Date: Sat, 27 Apr 2019 00:10:35 +0100 Subject: [PATCH 019/510] Document svelte/animate - flip. --- site/content/docs/03-run-time.md | 46 +++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 6eae0094e9..5c012ebfa9 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -506,13 +506,51 @@ TODO * fade, fly, slide, scale, draw * crossfade... -### `svelte/animation` +### `svelte/animate` -TODO +The `svelte/animate` module exports one function for use with svelte [animations](docs#Animations). + +#### `flip` + +```sv +animate:flip={params} +``` + +The `flip` function calculates the start and end position of an element and animates between them, translating the `x` and `y` values. `flip` stands for [First, Last, Invert, Play](https://aerotwist.com/blog/flip-your-animations/). + +`flip` accepts the following parameters: + +* `delay` (`number`, default 0) — milliseconds before starting +* `duration` (`number` | `function`, default `d => Math.sqrt(d) * 120`) — see below +* `easing` (`function`, default [`cubicOut`](docs#cubicOut)) — an [easing function](docs#svelte_easing) + + +`duration` can be be provided as either: + +- a `number`, in milliseconds. +- a function, `distance: number => duration: number`, receiving the distance the element will travel in pixels and returning the duration in milliseconds. This allows you to assign a duration that is relative to the distance travelled by each element. + +--- + +You can see a full example on the [animations tutorial](tutorial/animate) + + +```html + + +{#each list as n (n)} +
+ {n} +
+{/each} +``` -* TODO this doesn't even exist yet -TODO ### `svelte/easing` From 0d890b1359ac5dfd04310c7ac9e6118f49d9d01c Mon Sep 17 00:00:00 2001 From: Conduitry Date: Mon, 29 Apr 2019 21:22:08 -0400 Subject: [PATCH 020/510] fix resubscriptions inside script block (#2435) --- src/compile/render-dom/index.ts | 2 +- test/runtime/samples/store-resubscribe-b/_config.js | 3 +++ test/runtime/samples/store-resubscribe-b/main.svelte | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/store-resubscribe-b/_config.js create mode 100644 test/runtime/samples/store-resubscribe-b/main.svelte diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts index a6ef0ac69c..5c095edb42 100644 --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -201,7 +201,7 @@ export default function dom( const variable = component.var_lookup.get(name); if (variable && (variable.hoistable || variable.global || variable.module)) return; - if (single) { + if (single && !(variable.subscribable && variable.reassigned)) { code.prependRight(node.start, `$$invalidate('${name}', `); code.appendLeft(node.end, `)`); } else { diff --git a/test/runtime/samples/store-resubscribe-b/_config.js b/test/runtime/samples/store-resubscribe-b/_config.js new file mode 100644 index 0000000000..d043bbcd87 --- /dev/null +++ b/test/runtime/samples/store-resubscribe-b/_config.js @@ -0,0 +1,3 @@ +export default { + html: `42`, +}; diff --git a/test/runtime/samples/store-resubscribe-b/main.svelte b/test/runtime/samples/store-resubscribe-b/main.svelte new file mode 100644 index 0000000000..0bc321f698 --- /dev/null +++ b/test/runtime/samples/store-resubscribe-b/main.svelte @@ -0,0 +1,7 @@ + + +{$foo} From d419274afd550f98d281e9d3eb051e24f314391a Mon Sep 17 00:00:00 2001 From: Emil Tholin Date: Tue, 30 Apr 2019 00:25:07 +0200 Subject: [PATCH 021/510] Narrow down checkbox transitions to background and left --- site/static/global.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/site/static/global.css b/site/static/global.css index 0681ee133a..4553898006 100644 --- a/site/static/global.css +++ b/site/static/global.css @@ -469,7 +469,6 @@ input[type="checkbox"]::before { top: 0; left: 0; background: var(--second); - -webkit-transition: .25s ease-out; /* box-sizing: border-box; */ box-sizing: content-box; } @@ -489,7 +488,7 @@ input[type="checkbox"]::after { border-radius: 1em; background: white; box-shadow: 0 0px 1px rgba(0,0,0,.4), 0 4px 2px rgba(0,0,0,.1); - -webkit-transition: .2s ease-out; + -webkit-transition: background .2s ease-out, left .2s ease-out; } input[type="checkbox"]:checked::after { From d2b202d30a3f793691ea4820eca8d71c8c63642a Mon Sep 17 00:00:00 2001 From: Loren Brichter Date: Tue, 30 Apr 2019 12:21:45 -0400 Subject: [PATCH 022/510] Subtle tweaks to spring animations Use verlet-style integration for spring animations. Rather than keeping track of "value" and velocity over time, keep track of value and previous-value, and derive velocity from the delta every tick. This has a few benefits, including greater stability (position and velocity can't drift) and simplifying signature of tick_spring (no need to pass velocity back up). Pulling "settled" flag out of the return signature as well means return value is just "next value", simplifying code mapping over objects and arrays, and eliminating duplicated code across get_initial_velocity, get_threshold and tick_spring. Refactored "threshold" calcs, extremely inexpensive to do inline in tick_spring rather than create a parallel structure. Also fixes a rare pathological case where springs will never settle (reading through the code, could happen if velocity was non-zero during a set() where target==current, threshold will be calculated to be zero and settled will always be set to false, leading to infinite animations). Functional changes: In my experience dealing with spring animations, there are a handful of edge-cases where it is nice to have library support. 99% of the time, the only times you'd want to fudge 'stiffness' and 'damping' is during a live interaction (e.g. dragging something around). By providing an idiomatic mechanism hopefully the code around dealing with that could be simpler. I propose an additional "options" parameter to 'set()' and 'update()'. If passed {hard:true} the set will be considered a "hard" set, where you want the value to be set to the target value immediately. This could be extremely useful when implementing dragging for instance. If passed {soft:true} or {soft:}, the set will be considered a "soft" set, where momentum will be preserved for some duration before settling. This could be useful when implementing "throwing", e.g. after a drag, on mouseup, 'soft set' to some position and the user's previous momentum will be honored before settling down. Technically momentum preservation happens to a degree now, but aggressive stiffness and/or damping values make it nearly unapparent. This handles the case where you may want more aggressive or heavily underdamped springs but without the apparent velocity discontinuity that happens on throw. (As a real example, in FaceTime, note behavior when tossing around the picture-in-picture, or the iPhone X gestural behavior when tossing apps back to the home screen). Internally this is implemented by temporarily setting mass to infinity and ramping back to normal over some duration. "Hard sets" are also special-cased to trigger a same-frame set and fulfilment, leading to more responsive dragging. Best case is a one frame improvement in drag latency (noticed in Safari). This also handles the "old way" method of munging 'stiffness' and 'damping' to 1, so the improvement applies to existing code. --- src/motion/spring.js | 182 ++++++++++++++++--------------------------- 1 file changed, 65 insertions(+), 117 deletions(-) diff --git a/src/motion/spring.js b/src/motion/spring.js index 2a5824f088..1f23d103f6 100644 --- a/src/motion/spring.js +++ b/src/motion/spring.js @@ -2,144 +2,92 @@ import { writable } from 'svelte/store'; // eslint-disable-line import/no-unreso import { loop } from 'svelte/internal'; // eslint-disable-line import/no-unresolved import { is_date } from './utils.js'; -function get_initial_velocity(value) { - if (typeof value === 'number' || is_date(value)) return 0; - - if (Array.isArray(value)) return value.map(get_initial_velocity); - - if (value && typeof value === 'object') { - const velocities = {}; - for (const k in value) velocities[k] = get_initial_velocity(value[k]); - return velocities; - } - - throw new Error(`Cannot spring ${typeof value} values`); -} - -function get_threshold(value, target_value, precision) { - if (typeof value === 'number' || is_date(value)) return precision * Math.abs((target_value - value)); - - if (Array.isArray(value)) return value.map((v, i) => get_threshold(v, target_value[i], precision)); - - if (value && typeof value === 'object') { - const threshold = {}; - for (const k in value) threshold[k] = get_threshold(value[k], target_value[k], precision); - return threshold; - } - - throw new Error(`Cannot spring ${typeof value} values`); -} - -function tick_spring(velocity, current_value, target_value, stiffness, damping, multiplier, threshold) { - let settled = true; - let value; - +function tick_spring(ctx, last_value, current_value, target_value) { if (typeof current_value === 'number' || is_date(current_value)) { const delta = target_value - current_value; - const spring = stiffness * delta; - const damper = damping * velocity; - - const acceleration = spring - damper; - - velocity += acceleration; - const d = velocity * multiplier; - - if (is_date(current_value)) { - value = new Date(current_value.getTime() + d); + const velocity = (current_value - last_value) / (ctx.dt||1/60); // guard div by 0 + const spring = ctx.opts.stiffness * delta; + const damper = ctx.opts.damping * velocity; + const acceleration = (spring - damper) * ctx.inv_mass; + const d = (velocity + acceleration) * ctx.dt; + + if (Math.abs(d) < ctx.opts.precision && Math.abs(delta) < ctx.opts.precision) { + return target_value; // settled } else { - value = current_value + d; - } - - if (Math.abs(d) > threshold || Math.abs(delta) > threshold) settled = false; - } - - else if (Array.isArray(current_value)) { - value = current_value.map((v, i) => { - const result = tick_spring( - velocity[i], - v, - target_value[i], - stiffness, - damping, - multiplier, - threshold[i] - ); - - velocity[i] = result.velocity; - if (!result.settled) settled = false; - return result.value; - }); - } - - else if (typeof current_value === 'object') { - value = {}; - for (const k in current_value) { - const result = tick_spring( - velocity[k], - current_value[k], - target_value[k], - stiffness, - damping, - multiplier, - threshold[k] - ); - - velocity[k] = result.velocity; - if (!result.settled) settled = false; - value[k] = result.value; + ctx.settled = false; // signal loop to keep ticking + return is_date(current_value) ? + new Date(current_value.getTime() + d) : current_value + d; } - } - - else { + } else if (Array.isArray(current_value)) { + return current_value.map((_, i) => + tick_spring(ctx, last_value[i], current_value[i], target_value[i])); + } else if (typeof current_value === 'object') { + let next_value = {}; + for (const k in current_value) + next_value[k] = tick_spring(ctx, last_value[k], current_value[k], target_value[k]); + return next_value; + } else { throw new Error(`Cannot spring ${typeof value} values`); } - - return { velocity, value, settled }; } export function spring(value, opts = {}) { const store = writable(value); + const { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts; - const { stiffness = 0.15, damping = 0.8, precision = 0.001 } = opts; - const velocity = get_initial_velocity(value); - - let task; + let last_time, task, current_token; + let last_value = value; let target_value = value; - let last_time; - let settled; - let threshold; - let current_token; - function set(new_value) { - target_value = new_value; - threshold = get_threshold(value, target_value, spring.precision); + let inv_mass = 1; + let inv_mass_recovery_rate = 0; + let cancel_task = false; + function set(new_value, opts = {}) { + target_value = new_value; const token = current_token = {}; + + if (opts.hard || (spring.stiffness >= 1 && spring.damping >= 1)) { + cancel_task = true; // cancel any running animation + last_time = window.performance.now(); + last_value = value; + store.set(value = target_value); + return new Promise(f => f()); // fulfil immediately + } else if (opts.soft) { + let rate = opts.soft === true ? .5 : +opts.soft; + inv_mass_recovery_rate = 1 / (rate * 60); + inv_mass = 0; // infinite mass, unaffected by spring forces + } if (!task) { last_time = window.performance.now(); - settled = false; - + cancel_task = false; + task = loop(now => { - ({ value, settled } = tick_spring( - velocity, - value, - target_value, - spring.stiffness, - spring.damping, - (now - last_time) * 60 / 1000, - threshold - )); + + if (cancel_task) { + cancel_task = false; + task = null; + return false; + } + + inv_mass = Math.min(inv_mass + inv_mass_recovery_rate, 1); + + const ctx = { + inv_mass, + opts: spring, + settled: true, // tick_spring may signal false + dt: (now - last_time) * 60 / 1000 + }; + const next_value = tick_spring(ctx, last_value, value, target_value); last_time = now; + last_value = value; + store.set(value = next_value); - if (settled) { - value = target_value; + if (ctx.settled) task = null; - } - - store.set(value); - return !settled; + return !ctx.settled; }); } @@ -152,7 +100,7 @@ export function spring(value, opts = {}) { const spring = { set, - update: fn => set(fn(target_value, value)), + update: (fn, opts) => set(fn(target_value, value), opts), subscribe: store.subscribe, stiffness, damping, @@ -160,4 +108,4 @@ export function spring(value, opts = {}) { }; return spring; -} \ No newline at end of file +} From 0e0da70917f5d1487c10d0848d4dbac1f5329885 Mon Sep 17 00:00:00 2001 From: Emil Tholin Date: Tue, 30 Apr 2019 22:56:47 +0200 Subject: [PATCH 023/510] Check 'injected' and 'fixed_reactive_declarations' independently --- src/compile/render-dom/index.ts | 5 +++-- test/runtime/samples/reactive-values-fixed/_config.js | 11 +++++++++++ .../runtime/samples/reactive-values-fixed/main.svelte | 6 ++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 test/runtime/samples/reactive-values-fixed/_config.js create mode 100644 test/runtime/samples/reactive-values-fixed/main.svelte diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts index a6ef0ac69c..af33a5b2f0 100644 --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -423,14 +423,15 @@ export default function dom( ${set && `$$self.$set = ${set};`} - ${reactive_declarations.length > 0 && deindent` ${injected.length && `let ${injected.join(', ')};`} + + ${reactive_declarations.length > 0 && deindent` $$self.$$.update = ($$dirty = { ${Array.from(all_reactive_dependencies).map(n => `${n}: 1`).join(', ')} }) => { ${reactive_declarations} }; + `} ${fixed_reactive_declarations} - `} return ${stringify_props(filtered_declarations)}; } diff --git a/test/runtime/samples/reactive-values-fixed/_config.js b/test/runtime/samples/reactive-values-fixed/_config.js new file mode 100644 index 0000000000..58aee09c35 --- /dev/null +++ b/test/runtime/samples/reactive-values-fixed/_config.js @@ -0,0 +1,11 @@ +export default { + html: ` +

4

+ `, + + test({ assert, component, target }) { + assert.htmlEqual(target.innerHTML, ` +

4

+ `); + } +}; diff --git a/test/runtime/samples/reactive-values-fixed/main.svelte b/test/runtime/samples/reactive-values-fixed/main.svelte new file mode 100644 index 0000000000..53445e03ba --- /dev/null +++ b/test/runtime/samples/reactive-values-fixed/main.svelte @@ -0,0 +1,6 @@ + + +

{squared}

From df602b74b066b014456f85b46482f84fb29fdfac Mon Sep 17 00:00:00 2001 From: Jon Ross Date: Tue, 30 Apr 2019 17:30:14 -0700 Subject: [PATCH 024/510] Add barebones description of `svelte/register` I don't know if this is correct, but it works for me and this is better than nothing. --- site/content/docs/03-run-time.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 5c012ebfa9..76cb1a9bb1 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -558,8 +558,17 @@ You can see a full example on the [animations tutorial](tutorial/animate) ### `svelte/register` -TODO +To render Svelte components server-side, use `require('svelte/register')`; after this, you can use `require` to include any `.svelte` file. + +```js +require('svelte/register'); + +const App = require('./App.svelte'); +... + +App.default.render({ title: 'name' }); +``` ### Client-side component API @@ -569,8 +578,6 @@ TODO const component = new Component(options) ``` ---- - A client-side component — that is, a component compiled with `generate: 'dom'` (or the `generate` option left unspecified) is a JavaScript class. ```js From 10f6da3109983535bcb3393ac23d80fda3821daa Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 30 Apr 2019 20:54:17 -0400 Subject: [PATCH 025/510] fix invalidating stores with UpdateExpression (#2625) --- src/compile/render-dom/index.ts | 26 ++++++------------- .../_config.js | 8 ++++++ .../main.svelte | 11 ++++++++ 3 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 test/runtime/samples/store-increment-updates-reactive/_config.js create mode 100644 test/runtime/samples/store-increment-updates-reactive/main.svelte diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts index a6ef0ac69c..622fc034fd 100644 --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -169,14 +169,15 @@ export default function dom( scope = scope.parent; } - if (node.type === 'AssignmentExpression') { + if (node.type === 'AssignmentExpression' || node.type === 'UpdateExpression') { + const assignee = node.type === 'AssignmentExpression' ? node.left : node.argument; let names = []; - if (node.left.type === 'MemberExpression') { - const left_object_name = get_object(node.left).name; + if (assignee.type === 'MemberExpression') { + const left_object_name = get_object(assignee).name; left_object_name && (names = [left_object_name]); } else { - names = extract_names(node.left); + names = extract_names(assignee); } if (node.operator === '=' && nodes_match(node.left, node.right)) { @@ -189,9 +190,10 @@ export default function dom( code.overwrite(node.start, node.end, dirty.map(n => component.invalidate(n)).join('; ')); } else { const single = ( - node.left.type === 'Identifier' && + node.type === 'AssignmentExpression' && + assignee.type === 'Identifier' && parent.type === 'ExpressionStatement' && - node.left.name[0] !== '$' + assignee.name[0] !== '$' ); names.forEach(name => { @@ -213,18 +215,6 @@ export default function dom( } } - else if (node.type === 'UpdateExpression') { - const { name } = get_object(node.argument); - - if (scope.find_owner(name) !== component.instance_scope) return; - - const variable = component.var_lookup.get(name); - if (variable && variable.hoistable) return; - - pending_assignments.add(name); - component.has_reactive_assignments = true; - } - if (pending_assignments.size > 0) { if (node.type === 'ArrowFunctionExpression') { const insert = Array.from(pending_assignments).map(name => component.invalidate(name)).join('; '); diff --git a/test/runtime/samples/store-increment-updates-reactive/_config.js b/test/runtime/samples/store-increment-updates-reactive/_config.js new file mode 100644 index 0000000000..f919d724f8 --- /dev/null +++ b/test/runtime/samples/store-increment-updates-reactive/_config.js @@ -0,0 +1,8 @@ +export default { + html: `0`, + + async test({ assert, component, target }) { + await component.increment(); + assert.htmlEqual(target.innerHTML, `1`); + } +}; diff --git a/test/runtime/samples/store-increment-updates-reactive/main.svelte b/test/runtime/samples/store-increment-updates-reactive/main.svelte new file mode 100644 index 0000000000..ceec177f7a --- /dev/null +++ b/test/runtime/samples/store-increment-updates-reactive/main.svelte @@ -0,0 +1,11 @@ + + +{$foo} From 511060ba9480028d1305f3e6f481754ba1ea1f11 Mon Sep 17 00:00:00 2001 From: raveling Date: Wed, 1 May 2019 11:46:28 +1000 Subject: [PATCH 026/510] improve referencing to code editor for mobile readers (#2632) * improve referencing to code editor for mobile readers The current documentation mentions "to the right" which is not accurate for people reading the tutorial on narrow-viewport devices. I changed it to "the code editor", but this may be improved upon to match other more common references. * typo --- site/content/tutorial/01-introduction/01-basics/text.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/tutorial/01-introduction/01-basics/text.md b/site/content/tutorial/01-introduction/01-basics/text.md index 95375edb25..c0fa2f48a3 100644 --- a/site/content/tutorial/01-introduction/01-basics/text.md +++ b/site/content/tutorial/01-introduction/01-basics/text.md @@ -29,4 +29,4 @@ Each tutorial chapter will have a 'Show me' button that you can click if you get ## Understanding components -In Svelte, an application is composed from one or more *components*. A component is a reusable self-contained block of code that encapsulates HTML, CSS and JavaScript that belong together, written into a `.svelte` file. The 'hello world' example on the right is a simple component. \ No newline at end of file +In Svelte, an application is composed from one or more *components*. A component is a reusable self-contained block of code that encapsulates HTML, CSS and JavaScript that belong together, written into a `.svelte` file. The 'hello world' example in the code editor is a simple component. From e73084b6affd9ebfc275857897a51df58095b6b4 Mon Sep 17 00:00:00 2001 From: Benjamin Milde Date: Wed, 1 May 2019 03:51:51 +0200 Subject: [PATCH 027/510] Hint at the reactivity limitation of array methods in the api docs (#2622) * Hint at the reactivity limitation of array methods in the api docs * tweaks --- site/content/docs/01-component-format.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/content/docs/01-component-format.md b/site/content/docs/01-component-format.md index d116dd8ff4..93af09b283 100644 --- a/site/content/docs/01-component-format.md +++ b/site/content/docs/01-component-format.md @@ -56,6 +56,8 @@ To change component state and trigger a re-render, just assign to a locally decl Update expressions (`count += 1`) and property assignments (`obj.x = y`) have the same effect. +Because Svelte's reactivity is based on assignments, using array methods like `.push()` and `.splice()` won't automatically trigger updates. Options for getting around this can be found in the [tutorial](tutorial/updating-arrays-and-objects). + ```html \ No newline at end of file diff --git a/test/runtime/samples/dev-warning-missing-data-component/Foo.svelte b/test/runtime/samples/dev-warning-missing-data-component/Foo.svelte index 95422444cc..99e26245ae 100644 --- a/test/runtime/samples/dev-warning-missing-data-component/Foo.svelte +++ b/test/runtime/samples/dev-warning-missing-data-component/Foo.svelte @@ -1,6 +1,7 @@
{x} {y}
\ No newline at end of file From 5a0be42006603944559130e5f4b85f49d9e23420 Mon Sep 17 00:00:00 2001 From: Emil Tholin Date: Tue, 30 Apr 2019 01:08:27 +0200 Subject: [PATCH 030/510] Remove the scope key from props when calculating spread --- src/internal/spread.js | 4 ++-- .../component-slot-spread-props/Nested.svelte | 4 ++++ .../component-slot-spread-props/_config.js | 19 +++++++++++++++++++ .../component-slot-spread-props/main.svelte | 8 ++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 test/runtime/samples/component-slot-spread-props/Nested.svelte create mode 100644 test/runtime/samples/component-slot-spread-props/_config.js create mode 100644 test/runtime/samples/component-slot-spread-props/main.svelte diff --git a/src/internal/spread.js b/src/internal/spread.js index 2b4c8c42d5..0075c947cd 100644 --- a/src/internal/spread.js +++ b/src/internal/spread.js @@ -2,7 +2,7 @@ export function get_spread_update(levels, updates) { const update = {}; const to_null_out = {}; - const accounted_for = {}; + const accounted_for = { $$scope: 1 }; let i = levels.length; while (i--) { @@ -34,4 +34,4 @@ export function get_spread_update(levels, updates) { } return update; -} \ No newline at end of file +} diff --git a/test/runtime/samples/component-slot-spread-props/Nested.svelte b/test/runtime/samples/component-slot-spread-props/Nested.svelte new file mode 100644 index 0000000000..08fb4697a9 --- /dev/null +++ b/test/runtime/samples/component-slot-spread-props/Nested.svelte @@ -0,0 +1,4 @@ +
+ +
+
diff --git a/test/runtime/samples/component-slot-spread-props/_config.js b/test/runtime/samples/component-slot-spread-props/_config.js new file mode 100644 index 0000000000..042bdca6ec --- /dev/null +++ b/test/runtime/samples/component-slot-spread-props/_config.js @@ -0,0 +1,19 @@ +export default { + html: ` +
+ +
+
+ `, + + async test({ assert, component, target }) { + component.value = 'foo'; + + assert.htmlEqual(target.innerHTML, ` +
+ +
+
+ `); + } +}; diff --git a/test/runtime/samples/component-slot-spread-props/main.svelte b/test/runtime/samples/component-slot-spread-props/main.svelte new file mode 100644 index 0000000000..69d1269217 --- /dev/null +++ b/test/runtime/samples/component-slot-spread-props/main.svelte @@ -0,0 +1,8 @@ + + + + + From 3b244a6fdefa35e84a13ac6dcd3b113783b19b06 Mon Sep 17 00:00:00 2001 From: Achim Vedam Date: Wed, 1 May 2019 23:13:13 +0200 Subject: [PATCH 031/510] Consistent sidebars 2641 (#2642) * consistent sidebar tutorial - added css-var for light sidebar-text for easy handling - provide higher contrast for better readability in code and blockquotes - push SHOW ME with higher contrast (on dark instead on white) * minor fixes on opacities and color * adjust sidebar-styles of docs and examples closes #2641 --- site/src/routes/docs/_GuideContents.svelte | 28 +++++----- .../routes/examples/_TableOfContents.svelte | 54 ++++++++++--------- .../tutorial/[slug]/_TableOfContents.svelte | 8 ++- site/src/routes/tutorial/[slug]/index.svelte | 31 +++++------ site/static/global.css | 1 + 5 files changed, 67 insertions(+), 55 deletions(-) diff --git a/site/src/routes/docs/_GuideContents.svelte b/site/src/routes/docs/_GuideContents.svelte index fb2a9dc177..f5407164e4 100644 --- a/site/src/routes/docs/_GuideContents.svelte +++ b/site/src/routes/docs/_GuideContents.svelte @@ -48,19 +48,12 @@ a { position: relative; - opacity: 0.75; - transition: opacity 0.2s; + transition: color 0.2s; border-bottom: none; padding: 0; color: var(--second); } - @media (min-width: 832px) { - a { - color: white; - } - } - .section { display: block; padding: 0 0 .8rem 0; @@ -78,22 +71,33 @@ } .section:hover, - .subsection:hover { + .subsection:hover, + .active { color: var(--flash); - opacity: 1 } .subsection[data-level="4"] { padding-left: 1.2rem; } - .active { opacity: 1 } - .icon-container { position: absolute; top: -.2rem; right: 2.4rem; } + + @media (min-width: 832px) { + a { + color: var(--sidebar-text); + } + + a:hover, + .section:hover, + .subsection:hover, + .active { + color: white + } + }
    diff --git a/site/src/routes/tutorial/[slug]/_TableOfContents.svelte b/site/src/routes/tutorial/[slug]/_TableOfContents.svelte index 4796a71587..b74cc46046 100644 --- a/site/src/routes/tutorial/[slug]/_TableOfContents.svelte +++ b/site/src/routes/tutorial/[slug]/_TableOfContents.svelte @@ -30,13 +30,17 @@ display: block; padding: 0.7em 0; text-align: center; - opacity: 0.7; + opacity: 0.75; color: white; } + a:hover { + opacity: 1; + } + a.disabled, a.disabled:hover, a.disabled:active { color: white; - opacity: 0.4; + opacity: 0.3; } span { diff --git a/site/src/routes/tutorial/[slug]/index.svelte b/site/src/routes/tutorial/[slug]/index.svelte index 5b2c2a6398..9afc3d40df 100644 --- a/site/src/routes/tutorial/[slug]/index.svelte +++ b/site/src/routes/tutorial/[slug]/index.svelte @@ -151,7 +151,7 @@ height: 100%; border-right: 1px solid var(--second); background-color: var(--second); - color: white; + color: var(--sidebar-text); } .chapter-markup { @@ -165,6 +165,7 @@ margin: 4rem 0 1.6rem 0; font-size: var(--h3); line-height: 1; + font-weight: 400; color: white; } @@ -173,16 +174,21 @@ } .chapter-markup :global(a) { + color: var(--sidebar-text); + } + + .chapter-markup :global(a:hover) { color: white; } + .chapter-markup :global(ul) { padding: 0 0 0 2em; } .chapter-markup :global(blockquote) { - background-color: rgba(255,255,255,.1); - color: white; + background-color: rgba(0,0,0,.17); + color: var(--sidebar-text); } .chapter-markup::-webkit-scrollbar { @@ -198,22 +204,22 @@ .chapter-markup :global(p) > :global(code), .chapter-markup :global(ul) :global(code) { - color: white; - background: rgba(255,255,255,.1); - padding: .2em .4em; + color: var(--sidebar-text); + background: rgba(0,0,0,.12); + padding: .2em .4em .3em; white-space: nowrap; position: relative; top: -0.1em; } .controls { - border-top: 1px solid rgba(255,255,255,.1); + border-top: 1px solid rgba(255,255,255,.15); padding: 1em 0 0 0; display: flex; } .show { - background: rgba(255,255,255,.1); + background: rgba(0,0,0,.4); padding: .2em .7em .3em; border-radius: var(--border-r); top: .1em; @@ -223,22 +229,17 @@ } .show:hover { - background: rgba(255,255,255,.2); + background: rgba(0,0,0,.65); + color: white; } a.next { - /* border-bottom: none; */ padding-right: 1.2em; background: no-repeat 100% 50% url(/icons/arrow-right.svg); background-size: 1em 1em; margin-left: auto; } - a.next:hover { - /* border-bottom: 2px solid currentColor; */ - /* text-decoration: underline; */ - } - .improve-chapter { padding: 1em 0 .5em 0; } diff --git a/site/static/global.css b/site/static/global.css index 4553898006..6c84f1abee 100644 --- a/site/static/global.css +++ b/site/static/global.css @@ -46,6 +46,7 @@ --flash: #40b3ff; --heading: var(--second); --text: #444; + --sidebar-text: rgba(255, 255, 255, .75); --border-w: .3rem; /* border-width */ --border-r: .4rem; /* border-radius */ } From b0e057233cf4caeae4c1e62527b6476c9b8c375f Mon Sep 17 00:00:00 2001 From: Emil Tholin Date: Thu, 2 May 2019 09:32:06 +0200 Subject: [PATCH 032/510] Add alert, confirm, and prompt to globals --- src/utils/names.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/names.ts b/src/utils/names.ts index 1f0a9cc29e..2eafdf06a3 100644 --- a/src/utils/names.ts +++ b/src/utils/names.ts @@ -2,8 +2,10 @@ import { isIdentifierStart, isIdentifierChar } from 'acorn'; import full_char_code_at from './full_char_code_at'; export const globals = new Set([ + 'alert', 'Array', 'Boolean', + 'confirm', 'console', 'Date', 'decodeURI', @@ -24,6 +26,7 @@ export const globals = new Set([ 'parseInt', 'process', 'Promise', + 'prompt', 'RegExp', 'Set', 'String', From b0447bf41ef5baa5c7087e22c78c3c32f17ca7a4 Mon Sep 17 00:00:00 2001 From: Emil Tholin Date: Thu, 2 May 2019 13:11:24 +0200 Subject: [PATCH 033/510] Remove v1 each key parsing --- src/parse/state/mustache.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/parse/state/mustache.ts b/src/parse/state/mustache.ts index 1acae36c9c..48a467a5c1 100644 --- a/src/parse/state/mustache.ts +++ b/src/parse/state/mustache.ts @@ -36,7 +36,7 @@ export default function mustache(parser: Parser) { parser.allow_whitespace(); - // {/if} or {/each} + // {/if}, {/each} or {/await} if (parser.eat('/')) { let block = parser.current(); let expected; @@ -287,13 +287,6 @@ export default function mustache(parser: Parser) { parser.allow_whitespace(); parser.eat(')', true); parser.allow_whitespace(); - } else if (parser.eat('@')) { - block.key = parser.read_identifier(); - if (!block.key) parser.error({ - code: `expected-name`, - message: `Expected name` - }); - parser.allow_whitespace(); } } From d53fd611f375695128927bfba1cfff34d72f06af Mon Sep 17 00:00:00 2001 From: Scotty Simpson Date: Thu, 2 May 2019 08:24:43 -0700 Subject: [PATCH 034/510] clarify autosubscription scope requirement (#2653) --- site/content/tutorial/08-stores/02-auto-subscriptions/text.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/content/tutorial/08-stores/02-auto-subscriptions/text.md b/site/content/tutorial/08-stores/02-auto-subscriptions/text.md index 87306f3354..af584261f4 100644 --- a/site/content/tutorial/08-stores/02-auto-subscriptions/text.md +++ b/site/content/tutorial/08-stores/02-auto-subscriptions/text.md @@ -39,6 +39,8 @@ It starts to get a bit boilerplatey though, especially if your component subscri

    The count is {$count}

    ``` +> Auto-subscription only works with store variables that are declared (or imported) at the top-level scope of a component. + You're not limited to using `$count` inside the markup, either — you can use it anywhere in the ` {#if $preloading} From 85b1850b77a0c0ac91bfde3b929a4c623989e7b4 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 2 May 2019 11:37:18 -0400 Subject: [PATCH 038/510] Move some stuff into @sveltejs/site-kit --- package-lock.json | 2 +- package.json | 3 +- site/content/docs/00-introduction.md | 2 +- site/package-lock.json | 1029 ++++++++--------- site/package.json | 1 + site/src/client.js | 1 + site/src/components/Icon.svelte | 39 - site/src/components/InlineSvg.svelte | 115 -- site/src/components/TopNav.svelte | 279 ----- site/src/components/unused/Logo.svelte | 28 - site/src/components/unused/debug-css.html | 68 -- site/src/components/unused/isometry.html | 28 - site/src/components/unused/theme-input.html | 81 -- site/src/components/unused/toaster.html | 49 - site/src/routes/_components/Example.svelte | 52 + site/src/routes/_layout.svelte | 28 +- site/src/routes/blog/_posts.js | 2 +- site/src/routes/docs/_sections.js | 11 +- site/src/routes/docs/index.svelte | 379 +----- site/src/routes/examples/index.svelte | 2 +- site/src/routes/index.svelte | 223 +--- .../repl/_components/AppControls/index.svelte | 2 +- .../tutorial/[slug]/_TableOfContents.svelte | 2 +- site/src/routes/tutorial/[slug]/index.json.js | 2 +- site/src/routes/tutorial/[slug]/index.svelte | 2 +- site/src/routes/tutorial/index.json.js | 2 +- site/src/template.html | 1 - site/src/utils/markdown.js | 61 - site/src/utils/navigation.js | 1 - site/static/svelte-logo-mask.svg | 17 +- site/static/svelte-logo-outline.svg | 21 +- site/static/svelte-logo.svg | 21 +- 32 files changed, 686 insertions(+), 1868 deletions(-) delete mode 100644 site/src/components/Icon.svelte delete mode 100644 site/src/components/InlineSvg.svelte delete mode 100644 site/src/components/TopNav.svelte delete mode 100644 site/src/components/unused/Logo.svelte delete mode 100644 site/src/components/unused/debug-css.html delete mode 100644 site/src/components/unused/isometry.html delete mode 100644 site/src/components/unused/theme-input.html delete mode 100644 site/src/components/unused/toaster.html create mode 100644 site/src/routes/_components/Example.svelte delete mode 100644 site/src/utils/markdown.js delete mode 100644 site/src/utils/navigation.js diff --git a/package-lock.json b/package-lock.json index 79b4a3d5fa..7c7363db2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-beta.25", + "version": "3.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 85836aaa14..5659f4215d 100644 --- a/package.json +++ b/package.json @@ -92,5 +92,6 @@ ], "sourceMap": true, "instrument": true - } + }, + "dependencies": {} } diff --git a/site/content/docs/00-introduction.md b/site/content/docs/00-introduction.md index 4730a0c1d5..c218cdfb5f 100644 --- a/site/content/docs/00-introduction.md +++ b/site/content/docs/00-introduction.md @@ -2,7 +2,7 @@ title: Before we begin --- -> Temporary note: This document is a work-in-progress. Please forgive any missing or misleading parts, and don't be shy about asking for help in the [Discord chatroom](https://discord.gg/yy75DKs). The [tutorial](tutorial) is more complete; start there. +> Temporary note: This document is a work-in-progress. Please forgive any missing or misleading parts, and don't be shy about asking for help in the [Discord chatroom](https://discord.gg/yy75DKs). The [tutorial](tutorial) is more complete; start there. This page contains detailed API reference documentation. It's intended to be a resource for people who already have some familiarity with Svelte. diff --git a/site/package-lock.json b/site/package-lock.json index 52f4c2693b..1e642a2479 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -14,18 +14,18 @@ } }, "@babel/core": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.3.tgz", - "integrity": "sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.4.tgz", + "integrity": "sha512-lQgGX3FPRgbz2SKmhMtYgJvVzGZrmjaF4apZ2bLwofAKiSjxU0drPh4S/VasyYXwaTs+A1gvQ45BN8SQJzHsQQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", - "@babel/helpers": "^7.4.3", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", + "@babel/generator": "^7.4.4", + "@babel/helpers": "^7.4.4", + "@babel/parser": "^7.4.4", + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4", "convert-source-map": "^1.1.0", "debug": "^4.1.0", "json5": "^2.1.0", @@ -53,12 +53,12 @@ } }, "@babel/generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", - "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", + "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", "dev": true, "requires": { - "@babel/types": "^7.4.0", + "@babel/types": "^7.4.4", "jsesc": "^2.5.1", "lodash": "^4.17.11", "source-map": "^0.5.0", @@ -85,24 +85,24 @@ } }, "@babel/helper-call-delegate": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.0.tgz", - "integrity": "sha512-SdqDfbVdNQCBp3WhK2mNdDvHd3BD6qbmIc43CAyjnsfCmgHMeqgDcM3BzY2lchi7HBJGJ2CVdynLWbezaE4mmQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", + "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.4.0", - "@babel/traverse": "^7.4.0", - "@babel/types": "^7.4.0" + "@babel/helper-hoist-variables": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" } }, "@babel/helper-define-map": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.0.tgz", - "integrity": "sha512-wAhQ9HdnLIywERVcSvX40CEJwKdAa1ID4neI9NXQPDOHwwA+57DqwLiPEVy2AIyWzAk0CQ8qx4awO0VUURwLtA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz", + "integrity": "sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg==", "dev": true, "requires": { "@babel/helper-function-name": "^7.1.0", - "@babel/types": "^7.4.0", + "@babel/types": "^7.4.4", "lodash": "^4.17.11" } }, @@ -137,12 +137,12 @@ } }, "@babel/helper-hoist-variables": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.0.tgz", - "integrity": "sha512-/NErCuoe/et17IlAQFKWM24qtyYYie7sFIrW/tIQXpck6vAu2hhtYYsKLBWQV+BQZMbcIYPU/QMYuTufrY4aQw==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", + "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==", "dev": true, "requires": { - "@babel/types": "^7.4.0" + "@babel/types": "^7.4.4" } }, "@babel/helper-member-expression-to-functions": { @@ -164,16 +164,16 @@ } }, "@babel/helper-module-transforms": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.3.tgz", - "integrity": "sha512-H88T9IySZW25anu5uqyaC1DaQre7ofM+joZtAaO2F8NBdFfupH0SZ4gKjgSFVcvtx/aAirqA9L9Clio2heYbZA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz", + "integrity": "sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/helper-simple-access": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/template": "^7.2.2", - "@babel/types": "^7.2.2", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/template": "^7.4.4", + "@babel/types": "^7.4.4", "lodash": "^4.17.11" } }, @@ -193,9 +193,9 @@ "dev": true }, "@babel/helper-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.3.tgz", - "integrity": "sha512-hnoq5u96pLCfgjXuj8ZLX3QQ+6nAulS+zSgi6HulUwFbEruRAKwbGLU5OvXkE14L8XW6XsQEKsIDfgthKLRAyA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz", + "integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==", "dev": true, "requires": { "lodash": "^4.17.11" @@ -215,15 +215,15 @@ } }, "@babel/helper-replace-supers": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz", - "integrity": "sha512-PVwCVnWWAgnal+kJ+ZSAphzyl58XrFeSKSAJRiqg5QToTsjL+Xu1f9+RJ+d+Q0aPhPfBGaYfkox66k86thxNSg==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz", + "integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.4.0", - "@babel/types": "^7.4.0" + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" } }, "@babel/helper-simple-access": { @@ -237,12 +237,12 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", - "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", "dev": true, "requires": { - "@babel/types": "^7.4.0" + "@babel/types": "^7.4.4" } }, "@babel/helper-wrap-function": { @@ -258,14 +258,14 @@ } }, "@babel/helpers": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.3.tgz", - "integrity": "sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz", + "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==", "dev": true, "requires": { - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0" + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" } }, "@babel/highlight": { @@ -280,9 +280,9 @@ } }, "@babel/parser": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", - "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.4.tgz", + "integrity": "sha512-5pCS4mOsL+ANsFZGdvNLybx4wtqAZJ0MJjMHxvzI3bvIsz6sQvzW8XX92EYIkiPtIvcfG3Aj+Ir5VNyjnZhP7w==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -307,9 +307,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz", - "integrity": "sha512-xC//6DNSSHVjq8O2ge0dyYlhshsH4T7XdCVoxbi5HzLYWfsC5ooFlJjrXk8RcAT+hjHAK9UjBXdylzSoDK3t4g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz", + "integrity": "sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -327,13 +327,13 @@ } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.0.tgz", - "integrity": "sha512-h/KjEZ3nK9wv1P1FSNb9G079jXrNYR0Ko+7XkOx85+gM24iZbPn0rh4vCftk+5QKY7y1uByFataBTmX7irEF1w==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz", + "integrity": "sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0", + "@babel/helper-regex": "^7.4.4", "regexpu-core": "^4.5.4" } }, @@ -392,9 +392,9 @@ } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.0.tgz", - "integrity": "sha512-EeaFdCeUULM+GPFEsf7pFcNSxM7hYjoj5fiYbyuiXobW4JhFnjAv9OWzNwHyHcKoPNpAfeRDuW6VyaXEDUBa7g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz", + "integrity": "sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -412,9 +412,9 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.0.tgz", - "integrity": "sha512-AWyt3k+fBXQqt2qb9r97tn3iBwFpiv9xdAiG+Gr2HpAZpuayvbL55yWrsV3MyHvXk/4vmSiedhDRl1YI2Iy5nQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz", + "integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -422,18 +422,18 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.3.tgz", - "integrity": "sha512-PUaIKyFUDtG6jF5DUJOfkBdwAS/kFFV3XFk7Nn0a6vR7ZT8jYw5cGtIlat77wcnd0C6ViGqo/wyNf4ZHytF/nQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz", + "integrity": "sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-define-map": "^7.4.0", + "@babel/helper-define-map": "^7.4.4", "@babel/helper-function-name": "^7.1.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.4.0", - "@babel/helper-split-export-declaration": "^7.4.0", + "@babel/helper-replace-supers": "^7.4.4", + "@babel/helper-split-export-declaration": "^7.4.4", "globals": "^11.1.0" } }, @@ -447,22 +447,22 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.3.tgz", - "integrity": "sha512-rVTLLZpydDFDyN4qnXdzwoVpk1oaXHIvPEOkOLyr88o7oHxVc/LyrnDx+amuBWGOwUb7D1s/uLsKBNTx08htZg==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz", + "integrity": "sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.3.tgz", - "integrity": "sha512-9Arc2I0AGynzXRR/oPdSALv3k0rM38IMFyto7kOCwb5F9sLUt2Ykdo3V9yUPR+Bgr4kb6bVEyLkPEiBhzcTeoA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz", + "integrity": "sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.3", + "@babel/helper-regex": "^7.4.4", "regexpu-core": "^4.5.4" } }, @@ -486,18 +486,18 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.3.tgz", - "integrity": "sha512-UselcZPwVWNSURnqcfpnxtMehrb8wjXYOimlYQPBnup/Zld426YzIhNEvuRsEWVHfESIECGrxoI6L5QqzuLH5Q==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz", + "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-transform-function-name": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.3.tgz", - "integrity": "sha512-uT5J/3qI/8vACBR9I1GlAuU/JqBtWdfCrynuOkrWG6nCDieZd5przB1vfP59FRHBZQ9DC2IUfqr/xKqzOD5x0A==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz", + "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==", "dev": true, "requires": { "@babel/helper-function-name": "^7.1.0", @@ -533,23 +533,23 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.3.tgz", - "integrity": "sha512-sMP4JqOTbMJMimqsSZwYWsMjppD+KRyDIUVW91pd7td0dZKAvPmhCaxhOzkzLParKwgQc7bdL9UNv+rpJB0HfA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz", + "integrity": "sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.4.3", + "@babel/helper-module-transforms": "^7.4.4", "@babel/helper-plugin-utils": "^7.0.0", "@babel/helper-simple-access": "^7.1.0" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.0.tgz", - "integrity": "sha512-gjPdHmqiNhVoBqus5qK60mWPp1CmYWp/tkh11mvb0rrys01HycEGD7NvvSoKXlWEfSM9TcL36CpsK8ElsADptQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz", + "integrity": "sha512-MSiModfILQc3/oqnG7NrP1jHaSPryO6tA2kOMmAQApz5dayPxWiHqmq4sWH2xF5LcQK56LlbKByCd8Aah/OIkQ==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.4.0", + "@babel/helper-hoist-variables": "^7.4.4", "@babel/helper-plugin-utils": "^7.0.0" } }, @@ -564,18 +564,18 @@ } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.2.tgz", - "integrity": "sha512-NsAuliSwkL3WO2dzWTOL1oZJHm0TM8ZY8ZSxk2ANyKkt5SQlToGA4pzctmq1BEjoacurdwZ3xp2dCQWJkME0gQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.4.tgz", + "integrity": "sha512-Ki+Y9nXBlKfhD+LXaRS7v95TtTGYRAf9Y1rTDiE75zf8YQz4GDaWRXosMfJBXxnk88mGFjWdCRIeqDbon7spYA==", "dev": true, "requires": { "regexp-tree": "^0.1.0" } }, "@babel/plugin-transform-new-target": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.0.tgz", - "integrity": "sha512-6ZKNgMQmQmrEX/ncuCwnnw1yVGoaOW5KpxNhoWI7pCQdA0uZ0HqHGqenCUIENAnxRjy2WwNQ30gfGdIgqJXXqw==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz", + "integrity": "sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" @@ -592,12 +592,12 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.3.tgz", - "integrity": "sha512-ULJYC2Vnw96/zdotCZkMGr2QVfKpIT/4/K+xWWY0MbOJyMZuk660BGkr3bEKWQrrciwz6xpmft39nA4BF7hJuA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz", + "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==", "dev": true, "requires": { - "@babel/helper-call-delegate": "^7.4.0", + "@babel/helper-call-delegate": "^7.4.4", "@babel/helper-get-function-arity": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0" } @@ -612,9 +612,9 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.3.tgz", - "integrity": "sha512-kEzotPuOpv6/iSlHroCDydPkKYw7tiJGKlmYp6iJn4a6C/+b2FdttlJsLKYxolYHgotTJ5G5UY5h0qey5ka3+A==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.4.tgz", + "integrity": "sha512-Zz3w+pX1SI0KMIiqshFZkwnVGUhDZzpX2vtPzfJBKQQq8WsP/Xy9DNdELWivxcKOCX/Pywge4SiEaPaLtoDT4g==", "dev": true, "requires": { "regenerator-transform": "^0.13.4" @@ -630,9 +630,9 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.3.tgz", - "integrity": "sha512-7Q61bU+uEI7bCUFReT1NKn7/X6sDQsZ7wL1sJ9IYMAO7cI+eg6x9re1cEw2fCRMbbTVyoeUKWSV1M6azEfKCfg==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.4.tgz", + "integrity": "sha512-aMVojEjPszvau3NRg+TIH14ynZLvPewH4xhlCW1w6A3rkxTS1m4uwzRclYR9oS+rl/dr+kT+pzbfHuAWP/lc7Q==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -670,9 +670,9 @@ } }, "@babel/plugin-transform-template-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz", - "integrity": "sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz", + "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", @@ -689,20 +689,20 @@ } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.3.tgz", - "integrity": "sha512-lnSNgkVjL8EMtnE8eSS7t2ku8qvKH3eqNf/IwIfnSPUqzgqYmRwzdsQWv4mNQAN9Nuo6Gz1Y0a4CSmdpu1Pp6g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz", + "integrity": "sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.3", + "@babel/helper-regex": "^7.4.4", "regexpu-core": "^4.5.4" } }, "@babel/polyfill": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.3.tgz", - "integrity": "sha512-rkv8WIvJshA5Ev8iNMGgz5WZkRtgtiPexiT7w5qevGTuT7ZBfM3de9ox1y9JR5/OXb/sWGBbWlHNa7vQKqku3Q==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.4.tgz", + "integrity": "sha512-WlthFLfhQQhh+A2Gn5NSFl0Huxz36x86Jn+E9OW7ibK8edKPq+KLy4apM1yDpQ8kJOVi1OVjpP4vSDLdrI04dg==", "dev": true, "requires": { "core-js": "^2.6.5", @@ -718,54 +718,54 @@ } }, "@babel/preset-env": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.4.3.tgz", - "integrity": "sha512-FYbZdV12yHdJU5Z70cEg0f6lvtpZ8jFSDakTm7WXeJbLXh4R0ztGEu/SW7G1nJ2ZvKwDhz8YrbA84eYyprmGqw==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.4.4.tgz", + "integrity": "sha512-FU1H+ACWqZZqfw1x2G1tgtSSYSfxJLkpaUQL37CenULFARDo+h4xJoVHzRoHbK+85ViLciuI7ME4WTIhFRBBlw==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-async-generator-functions": "^7.2.0", "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.4.3", + "@babel/plugin-proposal-object-rest-spread": "^7.4.4", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", "@babel/plugin-syntax-async-generators": "^7.2.0", "@babel/plugin-syntax-json-strings": "^7.2.0", "@babel/plugin-syntax-object-rest-spread": "^7.2.0", "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.4.0", + "@babel/plugin-transform-async-to-generator": "^7.4.4", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.4.0", - "@babel/plugin-transform-classes": "^7.4.3", + "@babel/plugin-transform-block-scoping": "^7.4.4", + "@babel/plugin-transform-classes": "^7.4.4", "@babel/plugin-transform-computed-properties": "^7.2.0", - "@babel/plugin-transform-destructuring": "^7.4.3", - "@babel/plugin-transform-dotall-regex": "^7.4.3", + "@babel/plugin-transform-destructuring": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", "@babel/plugin-transform-duplicate-keys": "^7.2.0", "@babel/plugin-transform-exponentiation-operator": "^7.2.0", - "@babel/plugin-transform-for-of": "^7.4.3", - "@babel/plugin-transform-function-name": "^7.4.3", + "@babel/plugin-transform-for-of": "^7.4.4", + "@babel/plugin-transform-function-name": "^7.4.4", "@babel/plugin-transform-literals": "^7.2.0", "@babel/plugin-transform-member-expression-literals": "^7.2.0", "@babel/plugin-transform-modules-amd": "^7.2.0", - "@babel/plugin-transform-modules-commonjs": "^7.4.3", - "@babel/plugin-transform-modules-systemjs": "^7.4.0", + "@babel/plugin-transform-modules-commonjs": "^7.4.4", + "@babel/plugin-transform-modules-systemjs": "^7.4.4", "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.2", - "@babel/plugin-transform-new-target": "^7.4.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.4", + "@babel/plugin-transform-new-target": "^7.4.4", "@babel/plugin-transform-object-super": "^7.2.0", - "@babel/plugin-transform-parameters": "^7.4.3", + "@babel/plugin-transform-parameters": "^7.4.4", "@babel/plugin-transform-property-literals": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.4.3", + "@babel/plugin-transform-regenerator": "^7.4.4", "@babel/plugin-transform-reserved-words": "^7.2.0", "@babel/plugin-transform-shorthand-properties": "^7.2.0", "@babel/plugin-transform-spread": "^7.2.0", "@babel/plugin-transform-sticky-regex": "^7.2.0", - "@babel/plugin-transform-template-literals": "^7.2.0", + "@babel/plugin-transform-template-literals": "^7.4.4", "@babel/plugin-transform-typeof-symbol": "^7.2.0", - "@babel/plugin-transform-unicode-regex": "^7.4.3", - "@babel/types": "^7.4.0", + "@babel/plugin-transform-unicode-regex": "^7.4.4", + "@babel/types": "^7.4.4", "browserslist": "^4.5.2", "core-js-compat": "^3.0.0", "invariant": "^2.2.2", @@ -774,37 +774,37 @@ } }, "@babel/runtime": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.3.tgz", - "integrity": "sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.4.tgz", + "integrity": "sha512-w0+uT71b6Yi7i5SE0co4NioIpSYS6lLiXvCzWzGSKvpK5vdQtCbICHMj+gbAKAOtxiV6HsVh/MBdaF9EQ6faSg==", "dev": true, "requires": { "regenerator-runtime": "^0.13.2" } }, "@babel/template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", - "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", + "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.0", - "@babel/types": "^7.4.0" + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4" } }, "@babel/traverse": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", - "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.4.tgz", + "integrity": "sha512-Gw6qqkw/e6AGzlyj9KnkabJX7VcubqPtkUQVAwkc0wUMldr3A/hezNB3Rc5eIvId95iSGkGIOe5hh1kMKf951A==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", + "@babel/generator": "^7.4.4", "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/types": "^7.4.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.11" @@ -828,9 +828,9 @@ } }, "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", + "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -839,12 +839,12 @@ } }, "@jimp/bmp": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.6.0.tgz", - "integrity": "sha512-zZOcVT1zK/1QL5a7qirkzPPgDKB1ianER7pBdpR2J71vx/g8MnrPbL3h/jEVPxjdci2Hph/VWhc/oLBtTbqO8w==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.6.4.tgz", + "integrity": "sha512-dhKM7Cjw4XoOefx3/we2+vWyTP6hQPpM7mEsziGjtsrK2f/e3/+hhHbEsQNgO9BOA1FPJRXAOiYHts9IlMH1mg==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "bmp-js": "^0.1.0", "core-js": "^2.5.7" }, @@ -858,12 +858,12 @@ } }, "@jimp/core": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/core/-/core-0.6.0.tgz", - "integrity": "sha512-ngAkyCLtX7buc2QyFy0ql/j4R2wGYQVsVhW2G3Y0GVAAklRIFIUYpyNKrqs228xA8f2O6XStbDStFlYkt7uNeg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/core/-/core-0.6.4.tgz", + "integrity": "sha512-nyiAXI8/uU54fGO53KrRB8pdn1s+IODZ+rj0jG2owsNJlTlagFrsZAy8IVTUCOiiXjh9TbwFo7D5XMrmi4KUww==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "any-base": "^1.1.0", "buffer": "^5.2.0", "core-js": "^2.5.7", @@ -885,12 +885,12 @@ } }, "@jimp/custom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.6.0.tgz", - "integrity": "sha512-+YZIWhf03Rfbi+VPbHomKInu3tcntF/aij/JrIJd1QZq13f8m3mRNxakXupiL18KH0C8BPNDk8RiwFX+HaOw3A==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.6.4.tgz", + "integrity": "sha512-sdBHrBoVr1+PFx4dlUAgXvvu4dG0esQobhg7qhpSLRje1ScavIgE2iXdJKpycgzrqwAOL8vW4/E5w2/rONlaoQ==", "dev": true, "requires": { - "@jimp/core": "^0.6.0", + "@jimp/core": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -903,12 +903,12 @@ } }, "@jimp/gif": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/gif/-/gif-0.6.0.tgz", - "integrity": "sha512-aWQ02P0ymTN1eh0BVsY+84wMdb/QeiVpCNQZl9y50cRnpuMM8TTmF/ZdCEBDiTRFcwXzHsqBXcLwEcYp3X2lTw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/gif/-/gif-0.6.4.tgz", + "integrity": "sha512-14mLoyG0UrYJsGNRoXBFvSJdFtBD0BSBwQ1zCNeW+HpQqdl+Kh5E1Pz4nqT2KNylJe1jypyR51Q2yndgcfGVyg==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7", "omggif": "^1.0.9" }, @@ -922,12 +922,12 @@ } }, "@jimp/jpeg": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/jpeg/-/jpeg-0.6.0.tgz", - "integrity": "sha512-quYb+lM4h57jQvr2q9dEIkc0laTljws4dunIdFhJRfa5UlNL5mHInk8h5MxyALo0mZdT07TAcxiDHw5QXZ28JQ==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/jpeg/-/jpeg-0.6.4.tgz", + "integrity": "sha512-NrFla9fZC/Bhw1Aa9vJ6cBOqpB5ylEPb9jD+yZ0fzcAw5HwILguS//oXv9EWLApIY1XsOMFFe0XWpY653rv8hw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7", "jpeg-js": "^0.3.4" }, @@ -941,12 +941,12 @@ } }, "@jimp/plugin-blit": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.6.0.tgz", - "integrity": "sha512-LjiCa+8OT2fgmvBpZt0ogurg/eu5kB8ZFWDRwHPcf8i+058sZC20dar/qrjVd5Knssq4ynjb5oAHsGuJq16Rqw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.6.4.tgz", + "integrity": "sha512-suVznd4XozkQIuECX0u8kMl+cAQpZN3WcbWXUcJaVxRi+VBvHIetG1Qs5qGLzuEg9627+kE7ppv0UgZ5mkE6lg==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -959,12 +959,12 @@ } }, "@jimp/plugin-blur": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.6.0.tgz", - "integrity": "sha512-/vjGcEiHda6OLTCYqXPFkfSTbL+RatZoGcp1vewcWqChUccn9QVINTlxB7nEI/3Nb/i7KdhOPNEQh1k6q6QXsw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.6.4.tgz", + "integrity": "sha512-M2fDMYUUtEKVNnCJZk5J0KSMzzISobmWfnG88RdHXJCkOn98kdawQFwTsYOfJJfCM8jWfhIxwZLFhC/2lkTN2w==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -977,12 +977,12 @@ } }, "@jimp/plugin-color": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.6.0.tgz", - "integrity": "sha512-mvDeAwN8ZpDkOaABMJ0w9zUzo9OOtu1qvvPkSirXDTMiXt1nsbfz8BoeoD7nU2MFhQj5MiGjH65UDnsH5ZzYuw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.6.4.tgz", + "integrity": "sha512-6Nfr2l9KSb6zH2fij8G6fQOw85TTkyRaBlqMvDmsQp/I1IlaDbXzA2C2Eh9jkQYZQDPu61B1MkmlEhJp/TUx6Q==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7", "tinycolor2": "^1.4.1" }, @@ -996,12 +996,12 @@ } }, "@jimp/plugin-contain": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-contain/-/plugin-contain-0.6.0.tgz", - "integrity": "sha512-gPHnoQkDztMbvnTVo01BaMoM/hhDJdeJ7FRToD4p4Qvdor4V0I6NXtjOeUPXfD94miTgh/UTyJDqeG4GZzi4sA==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-contain/-/plugin-contain-0.6.4.tgz", + "integrity": "sha512-qI1MxU1noS6NbEPu/bDDeP405aMviuIsfpOz8J3En8IwIwrJV22qt6QIHmF+eyng8CYgivwIPjEPzFzLR566Nw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1014,12 +1014,12 @@ } }, "@jimp/plugin-cover": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@jimp/plugin-cover/-/plugin-cover-0.6.1.tgz", - "integrity": "sha512-mYDchAeP9gcBCgi7vX2cYBNygY1s/YaEKEUvSh2H5+DJfxtp/eynW+bInypCfbQJArZZX+26F5GufWnkB8BOnw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-cover/-/plugin-cover-0.6.4.tgz", + "integrity": "sha512-z6eafPonj3LJY8cTEfRkXmOfCDi1+f0tbYaNvmiu+OrWJ3Ojw2hMt+BVVvJ8pKe1dWIFkCjxOjyjZWj1gEkaLw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1032,12 +1032,12 @@ } }, "@jimp/plugin-crop": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.6.1.tgz", - "integrity": "sha512-rnxkgLvm1oC7yCg8mOIUqLNjAzzRC0eVTD3hfYq3LzDMe2LfpU208WhtVw0IjSJ2N7OSrRztJcw+jkVF8nUJJg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.6.4.tgz", + "integrity": "sha512-w9TR+pn+GeWbznscGe2HRkPxInge0whAF3TLPWhPwBVjZChTT8dSDXsUpUlxQqvI4SfzuKp8z3/0SBqYDCzxxA==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1050,12 +1050,12 @@ } }, "@jimp/plugin-displace": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-displace/-/plugin-displace-0.6.0.tgz", - "integrity": "sha512-kkva5Fy3r7J7QmiqYQ5c9NeUKKkN7+KSfCGsZ6tkRHK4REMIXhQO/OnJN8XG6RReV29O6QykdyeTXDiHUDiROw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-displace/-/plugin-displace-0.6.4.tgz", + "integrity": "sha512-MEvtBXOAio/3iGJkKBrTtFs3Q38ez2Wy/wTD0Ruas+L8fjJR7l4mDgV+zjRr57CqB5mpY+L48VEoa2/gNXh9cg==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1068,12 +1068,12 @@ } }, "@jimp/plugin-dither": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-dither/-/plugin-dither-0.6.0.tgz", - "integrity": "sha512-ILSG7bl3SOqmcIa9C4nBvs0h0E0ObnMbeKWUZiNuz6i0OAlbxryiIfU4j0UVQD5XqT9ksC5mviVNrvOMw4SZLw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-dither/-/plugin-dither-0.6.4.tgz", + "integrity": "sha512-w+AGLcIMUeJZ4CI0FvFomahgKLcW+ICsLidUNOqyLzceluPAfug4X7vDhQ41pNkzKg0M1+Q1j0aWV8bdyF+LhA==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1086,12 +1086,12 @@ } }, "@jimp/plugin-flip": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-0.6.0.tgz", - "integrity": "sha512-MXGGwABjERvfqVadEzJuVAmbsEQfjxXD0O/mMBegU1Qh7/JmnKAVplQCnojsMPxUdao/FKZjQqOnB/j4LLJtOQ==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-0.6.4.tgz", + "integrity": "sha512-ukINMegMUM9KYjyDCiyYKYdSsbhNRLHDwOJN0xVRalmOKqNaZmjNbiMbaVxKlYt6sHW76RhSMOekw9f6GQB9tQ==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1104,12 +1104,12 @@ } }, "@jimp/plugin-gaussian": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-gaussian/-/plugin-gaussian-0.6.0.tgz", - "integrity": "sha512-RUsBCyj6Ukxgn/TU8v6c6WRbSFqKM0iknLVqDkKIuiOyJB7ougv66fqomh/i/h3ihIkEnf50BuO0c3ovrczfvw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-gaussian/-/plugin-gaussian-0.6.4.tgz", + "integrity": "sha512-C1P6ohzIddpNb7CX5X+ygbp+ow8Fpt64ZLoIgdjYPs/42HxKluvY62fVfMhY6m5zUGKIMbg0uYeAtz/9LRJPyw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1122,12 +1122,12 @@ } }, "@jimp/plugin-invert": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-invert/-/plugin-invert-0.6.0.tgz", - "integrity": "sha512-zTCqK8el6eqcNKAxw0y57gHBFgxygI5iM8dQDPyqsvVWO71i8XII7ubnJhEvPPN7vhIKlOSnS9XXglezvJoX4Q==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-invert/-/plugin-invert-0.6.4.tgz", + "integrity": "sha512-sleGz1jXaNEsP/5Ayqw8oez/6KesWcyCqovIuK4Z4kDmMc2ncuhsXIJQXDWtIF4tTQVzNEgrxUDNA4bi9xpCUA==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1140,12 +1140,12 @@ } }, "@jimp/plugin-mask": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-0.6.0.tgz", - "integrity": "sha512-zkZVqAA7lxWhkn5EbPjBQ6tPluYIGfLMSX4kD1gksj+MVJJnVAd459AVuEXCvkUvv4wG5AlH8m6ve5NZj9vvxw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-0.6.4.tgz", + "integrity": "sha512-3D4FbRxnpO9nzwa6cF8AImgO1aVReYbfRRO4I4bku4/iZ+kuU3fBLV+SRhB4c7di3ejG5u+rGsIfaNc94iYYvw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1158,12 +1158,12 @@ } }, "@jimp/plugin-normalize": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-normalize/-/plugin-normalize-0.6.0.tgz", - "integrity": "sha512-7bNGT+S0rw9gvmxpkNsA19JSqBZYFrAn9QhEmoN4HIimdKtJaoLJh/GnxrPuOBLuv1IPJntoTOOWvOmfrQ6/ww==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-normalize/-/plugin-normalize-0.6.4.tgz", + "integrity": "sha512-nOFMwOaVkOKArHkD/T6/1HKAPj3jlW6l0JduVDn1A5eIPCtlnyhlE9zdjgi5Q9IBR/gRjwW6tTzBKuJenS51kg==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1176,12 +1176,12 @@ } }, "@jimp/plugin-print": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@jimp/plugin-print/-/plugin-print-0.6.1.tgz", - "integrity": "sha512-gZOrYEOFtohRYsGJNh9fQkBgpiKjDfNXpiXmwdolqBF39pPxRvo9ivTIJ7sHCLpDL+SnQRdR0EHiJ08BFt5Yow==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-print/-/plugin-print-0.6.4.tgz", + "integrity": "sha512-3z5DLVCKg0NfZhHATEaYH/4XanIboPP1pOUoxIUeF++qOnGiGgH2giFJlRprHmx2l3E3DukR1v8pt54PGvfrFw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7", "load-bmfont": "^1.4.0" }, @@ -1195,12 +1195,12 @@ } }, "@jimp/plugin-resize": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.6.0.tgz", - "integrity": "sha512-m0AA/mPkJG++RuftBFDUMRenqgIN/uSh88Kqs33VURYaabApni4ML3QslE1TCJtl2Lnu1eosxYlbzODjHx49eg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.6.4.tgz", + "integrity": "sha512-fk2+KheUNClrOWj6aDNWj1r4byVQb6Qxy4aT1UHX5GXPHDA+nhlej7ghaYdzeWZYodeM3lpasYtByu1XE2qScQ==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1213,12 +1213,12 @@ } }, "@jimp/plugin-rotate": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.6.1.tgz", - "integrity": "sha512-+YYjO4Y664k0IfsPJVz4Er3pX+C8vYDWD9L2am01Jls4LT7GtUZbgIKuqwl8qXX0ENc/aF9UssuWIYVVzEoapw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.6.4.tgz", + "integrity": "sha512-44VgV5D4xQIYInJAVevdW9J3SOhGKyz0OEr2ciA8Q3ktonKx0O5Q1g2kbruiqxFSkK/u2CKPLeKXZzYCFrmJGQ==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1231,12 +1231,12 @@ } }, "@jimp/plugin-scale": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.6.0.tgz", - "integrity": "sha512-le/ttYwYioNPRoMlMaoJMCTv+m8d1v0peo/3J8E6Rf9ok7Bw3agkvjL9ILnsmr8jXj1YLrBSPKRs5nJ6ziM/qA==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.6.4.tgz", + "integrity": "sha512-RAQRaDiCHmEz+A8QS5d/Z38EnlNsQizz3Mu3NsjA8uFtJsv1yMKWXZSQuzniofZw8tlMV6oI3VdM0eQVE07/5w==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -1249,28 +1249,28 @@ } }, "@jimp/plugins": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@jimp/plugins/-/plugins-0.6.1.tgz", - "integrity": "sha512-gCgYxsQn3z5qifM8G4RfP6vQFKfwK/waVIE3I/mUY9QHZrf94sLuhcws+72hTLQ3It3m3QKaA1kSXrD9nkRdUw==", - "dev": true, - "requires": { - "@jimp/plugin-blit": "^0.6.0", - "@jimp/plugin-blur": "^0.6.0", - "@jimp/plugin-color": "^0.6.0", - "@jimp/plugin-contain": "^0.6.0", - "@jimp/plugin-cover": "^0.6.1", - "@jimp/plugin-crop": "^0.6.1", - "@jimp/plugin-displace": "^0.6.0", - "@jimp/plugin-dither": "^0.6.0", - "@jimp/plugin-flip": "^0.6.0", - "@jimp/plugin-gaussian": "^0.6.0", - "@jimp/plugin-invert": "^0.6.0", - "@jimp/plugin-mask": "^0.6.0", - "@jimp/plugin-normalize": "^0.6.0", - "@jimp/plugin-print": "^0.6.1", - "@jimp/plugin-resize": "^0.6.0", - "@jimp/plugin-rotate": "^0.6.1", - "@jimp/plugin-scale": "^0.6.0", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/plugins/-/plugins-0.6.4.tgz", + "integrity": "sha512-NpO/87CKnF4Q9r8gMl6w+jPKOM/C089qExkViD9cPvcFZEnyVOu7ucGzcMmTcabWOU62iQTOkRViPYr6XaK0LQ==", + "dev": true, + "requires": { + "@jimp/plugin-blit": "^0.6.4", + "@jimp/plugin-blur": "^0.6.4", + "@jimp/plugin-color": "^0.6.4", + "@jimp/plugin-contain": "^0.6.4", + "@jimp/plugin-cover": "^0.6.4", + "@jimp/plugin-crop": "^0.6.4", + "@jimp/plugin-displace": "^0.6.4", + "@jimp/plugin-dither": "^0.6.4", + "@jimp/plugin-flip": "^0.6.4", + "@jimp/plugin-gaussian": "^0.6.4", + "@jimp/plugin-invert": "^0.6.4", + "@jimp/plugin-mask": "^0.6.4", + "@jimp/plugin-normalize": "^0.6.4", + "@jimp/plugin-print": "^0.6.4", + "@jimp/plugin-resize": "^0.6.4", + "@jimp/plugin-rotate": "^0.6.4", + "@jimp/plugin-scale": "^0.6.4", "core-js": "^2.5.7", "timm": "^1.6.1" }, @@ -1284,12 +1284,12 @@ } }, "@jimp/png": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/png/-/png-0.6.0.tgz", - "integrity": "sha512-DBtMyQyrJxuKI7/1dVqLek+rCMM8U6BSOTHgo05wU7lhJKTB6fn2tbYfsnHQKzd9ld1M2qKuC+O1GTVdB2yl6w==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/png/-/png-0.6.4.tgz", + "integrity": "sha512-qv3oo6ll3XWVIToBwVC1wQX0MFKwpxbe2o+1ld9B4ZDavqvAHzalzcmTd/iyooI85CVDAcC3RRDo66oiizGZCQ==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.6.4", "core-js": "^2.5.7", "pngjs": "^3.3.3" }, @@ -1303,9 +1303,9 @@ } }, "@jimp/tiff": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.6.0.tgz", - "integrity": "sha512-PV95CquEsolFziq0zZrAEJIzZSKwMK89TvkOXTPDi/xesgdXGC2rtG1IZFpC9L4UX5hi/M5GaeJa49xULX6Nqw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.6.4.tgz", + "integrity": "sha512-8/vD4qleexmhPdppiu6fSstj/n/kGNTn8iIlf1emiqOuMN2PL9q5GOPDWU0xWdGNyJMMIDXJPgUFUkKfqXdg7w==", "dev": true, "requires": { "core-js": "^2.5.7", @@ -1321,16 +1321,16 @@ } }, "@jimp/types": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/types/-/types-0.6.0.tgz", - "integrity": "sha512-j4tm82huEWpLrwave/2NYnMTY6us/6K9Js6Vd/CHoM/ki8M71tMXEVzc8tly92wtnEzQ9+FEk0Ue6pYo68m/5A==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/types/-/types-0.6.4.tgz", + "integrity": "sha512-/EMbipQDg5U6DnBAgcSiydlMBRYoKhnaK7MJRImeTzhDJ6xfgNOF7lYq66o0kmaezKdG/cIwZ1CLecn2y3D8SQ==", "dev": true, "requires": { - "@jimp/bmp": "^0.6.0", - "@jimp/gif": "^0.6.0", - "@jimp/jpeg": "^0.6.0", - "@jimp/png": "^0.6.0", - "@jimp/tiff": "^0.6.0", + "@jimp/bmp": "^0.6.4", + "@jimp/gif": "^0.6.4", + "@jimp/jpeg": "^0.6.4", + "@jimp/png": "^0.6.4", + "@jimp/tiff": "^0.6.4", "core-js": "^2.5.7", "timm": "^1.6.1" }, @@ -1344,9 +1344,9 @@ } }, "@jimp/utils": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.6.0.tgz", - "integrity": "sha512-z5iYEfqc45vlYweROneNkjv32en6jS7lPL/eMLIvaEcQAHaoza20Dw8fUoJ0Ht9S92kR74xeTunAZq+gK2w67Q==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.6.4.tgz", + "integrity": "sha512-EFQurCyEnZLSM2Q1BYDTUmsOJPSOYEQd18Fvq8bGo8hnBHoGLWLWWyNi2l4cYhtpKmIXyhvQqa6/WaEpKPzvqA==", "dev": true, "requires": { "core-js": "^2.5.7" @@ -1366,9 +1366,9 @@ "integrity": "sha512-eq8gUzykpYPuOMrnyAzsL4KunhQXZKFiNsbThAwh19PrBAz2v8mECsj3YnxjYYifbB1w1vhR74nsXQWDi80oAg==" }, "@polka/url": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-0.5.0.tgz", - "integrity": "sha512-oZLYFEAzUKyi3SKnXvj32ZCEGH6RDnao7COuCVhDydMS9NrCSVXhM79VaKyP5+Zc33m0QXEd2DN3UkU7OsHcfw==" + "version": "1.0.0-next.1", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.1.tgz", + "integrity": "sha512-6d8YbKW4hjJMnU6ZJSDLtALWiB4J//OIPaP885ruf5U8MLZHigocDxhjgvLwbV6bGkikhllgTjD9eWioKWAQdA==" }, "@sindresorhus/slugify": { "version": "0.9.1", @@ -1380,6 +1380,16 @@ "lodash.deburr": "^4.1.0" } }, + "@sveltejs/site-kit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@sveltejs/site-kit/-/site-kit-1.0.3.tgz", + "integrity": "sha512-JFwFnzTGyCFI/j2qHiHaD3cvth2jurIgF72MwHayfmzJedcIEwEhj5qlKrDOjMc7Z95UV5Uuo20d2iVaF94slQ==", + "dev": true, + "requires": { + "@sindresorhus/slugify": "^0.9.1", + "golden-fleece": "^1.0.9" + } + }, "@sveltejs/svelte-repl": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.0.10.tgz", @@ -1397,9 +1407,9 @@ "dev": true }, "@types/node": { - "version": "11.13.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.4.tgz", - "integrity": "sha512-+rabAZZ3Yn7tF/XPGHupKIL5EcAbrLxnTr/hgQICxbeuAfWtT0UZSfULE+ndusckBItcv4o6ZeOJplQikVcLvQ==", + "version": "11.13.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.8.tgz", + "integrity": "sha512-szA3x/3miL90ZJxUCzx9haNbK5/zmPieGraZEe4WI+3srN0eGLiT22NXeMHmyhNEopn+IrxqMc7wdVwvPl8meg==", "dev": true }, "@types/resolve": { @@ -1523,9 +1533,9 @@ "dev": true }, "async-each": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.2.tgz", - "integrity": "sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", "dev": true }, "atob": { @@ -1667,14 +1677,14 @@ "dev": true }, "browserslist": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.4.tgz", - "integrity": "sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag==", + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.6.tgz", + "integrity": "sha512-o/hPOtbU9oX507lIqon+UvPYqpx3mHc8cV3QemSBTXwkG8gSQSK6UKvXcE/DcleU3+A59XTUHyCvZ5qGy8xVAg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000955", - "electron-to-chromium": "^1.3.122", - "node-releases": "^1.1.13" + "caniuse-lite": "^1.0.30000963", + "electron-to-chromium": "^1.3.127", + "node-releases": "^1.1.17" } }, "buffer": { @@ -1739,9 +1749,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000958", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000958.tgz", - "integrity": "sha512-+KfdlJj6IOOrYmX723ZymUttwietVOGQfVKPAkjn+hxWg6FyPVaaIq+euUDu5mK1lblkRcF4Nlw949Lrac72sA==", + "version": "1.0.30000963", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000963.tgz", + "integrity": "sha512-n4HUiullc7Lw0LyzpeLa2ffP8KxFBGdxqD/8G3bSL6oB758hZ2UE2CVK+tQN958tJIi0/tfpjAc67aAtoHgnrQ==", "dev": true }, "chalk": { @@ -1850,9 +1860,9 @@ "dev": true }, "codemirror": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.45.0.tgz", - "integrity": "sha512-c19j644usCE8gQaXa0jqn2B/HN9MnB2u6qPIrrhrMkB+QAP42y8G4QnTwuwbVSoUS1jEl7JU9HZMGhCDL0nsAw==" + "version": "5.46.0", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.46.0.tgz", + "integrity": "sha512-3QpMge0vg4QEhHW3hBAtCipJEWjTJrqLLXdIaWptJOblf1vHFeXLNtFhPai/uX2lnFCehWNk4yOdaMR853Z02w==" }, "collection-visit": { "version": "1.0.0", @@ -1886,9 +1896,9 @@ "dev": true }, "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", "dev": true }, "concat-map": { @@ -2061,6 +2071,11 @@ "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", "optional": true }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, "devalue": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/devalue/-/devalue-1.1.0.tgz", @@ -2090,9 +2105,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.124", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz", - "integrity": "sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w==", + "version": "1.3.129", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.129.tgz", + "integrity": "sha512-puirJsgZnedlFEmRa7WEUIaS8ZgHHn7d7inph+RiapCc0x80hdoDyEEpR9z3aRUSZy4fGxOTOFcxnGmySlrmhA==", "dev": true }, "emoji-regex": { @@ -2249,13 +2264,6 @@ "parseurl": "~1.3.2", "safe-buffer": "5.1.2", "uid-safe": "~2.1.5" - }, - "dependencies": { - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" - } } }, "extend-shallow": { @@ -2448,41 +2456,36 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", - "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", "dev": true, "optional": true, "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" }, "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "bundled": true, "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "optional": true + "bundled": true, + "dev": true }, "aproba": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "bundled": true, "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2492,17 +2495,13 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true, - "optional": true + "bundled": true, + "dev": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2510,74 +2509,61 @@ }, "chownr": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "bundled": true, "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true, - "optional": true + "bundled": true, + "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true, - "optional": true + "bundled": true, + "dev": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true + "bundled": true, + "dev": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "bundled": true, "dev": true, "optional": true }, "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.1.1", + "bundled": true, "dev": true, "optional": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "deep-extend": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "bundled": true, "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "bundled": true, "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "bundled": true, "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2586,15 +2572,13 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "bundled": true, "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2610,8 +2594,7 @@ }, "glob": { "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2625,15 +2608,13 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "bundled": true, "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2642,8 +2623,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2652,8 +2632,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2663,58 +2642,46 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true, - "optional": true + "bundled": true, + "dev": true }, "ini": { "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "bundled": true, "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "bundled": true, "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true, - "optional": true + "bundled": true, + "dev": true }, "minipass": { "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2722,8 +2689,7 @@ }, "minizlib": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", - "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2732,37 +2698,32 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "version": "2.1.1", + "bundled": true, "dev": true, "optional": true }, "needle": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.4.tgz", - "integrity": "sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA==", + "version": "2.3.0", + "bundled": true, "dev": true, "optional": true, "requires": { - "debug": "^2.1.2", + "debug": "^4.1.0", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz", - "integrity": "sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A==", + "version": "0.12.0", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2780,8 +2741,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2790,16 +2750,14 @@ } }, "npm-bundled": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz", - "integrity": "sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==", + "version": "1.0.6", + "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.2.0.tgz", - "integrity": "sha512-7Mni4Z8Xkx0/oegoqlcao/JpPCPEMtUvsmB0q7mgvlMinykJLSRTYuFqoQLYgGY8biuxIeiHO+QNJKbCfljewQ==", + "version": "1.4.1", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2809,8 +2767,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2822,46 +2779,38 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true, - "optional": true + "bundled": true, + "dev": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "bundled": true, "dev": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "bundled": true, "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "bundled": true, "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2871,22 +2820,19 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "bundled": true, "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "bundled": true, "dev": true, "optional": true }, "rc": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2898,8 +2844,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "bundled": true, "dev": true, "optional": true } @@ -2907,8 +2852,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2923,8 +2867,7 @@ }, "rimraf": { "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2933,52 +2876,43 @@ }, "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "optional": true + "bundled": true, + "dev": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "bundled": true, "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "bundled": true, "dev": true, "optional": true }, "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "version": "5.7.0", + "bundled": true, "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "bundled": true, "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "bundled": true, "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2987,8 +2921,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2997,25 +2930,21 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "bundled": true, "dev": true, "optional": true }, "tar": { "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -3030,15 +2959,13 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "bundled": true, "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -3047,17 +2974,13 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true, - "optional": true + "bundled": true, + "dev": true }, "yallist": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true, - "optional": true + "bundled": true, + "dev": true } } }, @@ -3133,9 +3056,9 @@ } }, "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, "golden-fleece": { @@ -3538,15 +3461,15 @@ } }, "jimp": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.6.1.tgz", - "integrity": "sha512-R46NBV0mbdC+1DwP/xbTmXULfxxAok5KA+XtZTPVku1S0mXvsaxZ65cQz1MhiPjxcIIQYidI3ZFIf2F+th3wMQ==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.6.4.tgz", + "integrity": "sha512-WQVMoNhkcq/fgthZOWeMdIguCVPg+t4PDFfSxvbNcrECwl8eq3/Ou2whcFWWjyW45m43yAJEY2UT7acDKl6uSQ==", "dev": true, "requires": { "@babel/polyfill": "^7.0.0", - "@jimp/custom": "^0.6.0", - "@jimp/plugins": "^0.6.1", - "@jimp/types": "^0.6.0", + "@jimp/custom": "^0.6.4", + "@jimp/plugins": "^0.6.4", + "@jimp/types": "^0.6.4", "core-js": "^2.5.7" }, "dependencies": { @@ -3559,9 +3482,9 @@ } }, "jpeg-js": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.4.tgz", - "integrity": "sha512-6IzjQxvnlT8UlklNmDXIJMWxijULjqGrzgqc0OG7YadZdvm7KPQ1j0ehmQQHckgEWOfgpptzcnWgESovxudpTA==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.5.tgz", + "integrity": "sha512-hvaExqwmQDS8O9qnZAVDXGWU43Tbu1V0wMZmjROjT11jloSgGICZpscG+P6Nyi1BVAvyu2ARRx8qmEW30sxgdQ==", "dev": true }, "js-levenshtein": { @@ -3577,9 +3500,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", - "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -3650,6 +3573,14 @@ "phin": "^2.9.1", "xhr": "^2.0.1", "xtend": "^4.0.0" + }, + "dependencies": { + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + } } }, "load-json-file": { @@ -3796,10 +3727,9 @@ } }, "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", + "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==" }, "mimic-fn": { "version": "2.1.0", @@ -3888,9 +3818,9 @@ } }, "mocha": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.1.3.tgz", - "integrity": "sha512-QdE/w//EPHrqgT5PNRUjRVHy6IJAzAf1R8n2O8W8K2RZ+NbPfOD5cBDp+PGa2Gptep37C/TdBiaNwakppEzEbg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.1.4.tgz", + "integrity": "sha512-PN8CIy4RXsIoxoFJzS4QNnCH4psUCPWc4/rPrst/ecSJJbLBkubMiyGCP2Kj/9YnWbotFqAoeXyXMucj7gwCFg==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -3902,7 +3832,7 @@ "glob": "7.1.3", "growl": "1.10.5", "he": "1.2.0", - "js-yaml": "3.13.0", + "js-yaml": "3.13.1", "log-symbols": "2.2.0", "minimatch": "3.0.4", "mkdirp": "0.5.1", @@ -4007,14 +3937,14 @@ } }, "node-fetch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz", - "integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.5.0.tgz", + "integrity": "sha512-YuZKluhWGJwCcUu4RlZstdAxr8bFfOVHakc1mplwHkk8J+tqM1Y5yraYvIUpeX8aY7+crCwiELJq7Vl0o0LWXw==" }, "node-releases": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.14.tgz", - "integrity": "sha512-d58EpVZRhQE60kWiWUaaPlK9dyC4zg3ZoMcHcky2d4hDksyQj0rUozwInOl0C66mBsqo01Tuns8AvxnL5S7PKg==", + "version": "1.1.17", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.17.tgz", + "integrity": "sha512-/SCjetyta1m7YXLgtACZGDYJdCSIBAWorDWkGCGZlydP2Ll7J48l7j/JxNYZ+xsgSPbWfdulVS/aY+GdjUsQ7Q==", "dev": true, "requires": { "semver": "^5.3.0" @@ -4287,9 +4217,9 @@ } }, "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, "pascalcase": { "version": "0.1.1", @@ -4413,13 +4343,6 @@ "requires": { "@polka/url": "^1.0.0-next.1", "trouter": "^3.0.1" - }, - "dependencies": { - "@polka/url": { - "version": "1.0.0-next.1", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.1.tgz", - "integrity": "sha512-6d8YbKW4hjJMnU6ZJSDLtALWiB4J//OIPaP885ruf5U8MLZHigocDxhjgvLwbV6bGkikhllgTjD9eWioKWAQdA==" - } } }, "posix-character-classes": { @@ -4555,9 +4478,9 @@ } }, "regexp-tree": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.5.tgz", - "integrity": "sha512-nUmxvfJyAODw+0B13hj8CFVAxhe7fDEAgJgaotBu3nnR+IgGgZq59YedJP5VYTlkEfqjuK6TuRpnymKdatLZfQ==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.6.tgz", + "integrity": "sha512-LFrA98Dw/heXqDojz7qKFdygZmFoiVlvE1Zp7Cq2cvF+ZA+03Gmhy0k0PQlsC1jvHPiTUSs+pDHEuSWv6+6D7w==", "dev": true }, "regexparam": { @@ -4645,9 +4568,9 @@ "dev": true }, "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", + "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", "requires": { "path-parse": "^1.0.6" } @@ -4679,13 +4602,13 @@ } }, "rollup": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.10.0.tgz", - "integrity": "sha512-U9t/JaKtO0+X0pSmLVKMrAZEixrbVzITf193TiEhfoVKCnd7pDimIFo94IxUCgbn6+v5VmduHkubx2VV1s0Ftw==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.10.1.tgz", + "integrity": "sha512-pW353tmBE7QP622ITkGxtqF0d5gSRCVPD9xqM+fcPjudeZfoXMFW2sCzsTe2TU/zU1xamIjiS9xuFCPVT9fESw==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "^11.13.4", + "@types/node": "^11.13.5", "acorn": "^6.1.1" } }, @@ -4840,9 +4763,9 @@ "dev": true }, "serialize-javascript": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", - "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", + "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", "dev": true }, "session-file-store": { @@ -4938,10 +4861,10 @@ "mime": "^2.3.1" }, "dependencies": { - "mime": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", - "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==" + "@polka/url": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-0.5.0.tgz", + "integrity": "sha512-oZLYFEAzUKyi3SKnXvj32ZCEGH6RDnao7COuCVhDydMS9NrCSVXhM79VaKyP5+Zc33m0QXEd2DN3UkU7OsHcfw==" } } }, diff --git a/site/package.json b/site/package.json index 9621d06600..7e56eaad54 100644 --- a/site/package.json +++ b/site/package.json @@ -37,6 +37,7 @@ "@babel/preset-env": "^7.3.1", "@babel/runtime": "^7.3.1", "@sindresorhus/slugify": "^0.9.1", + "@sveltejs/site-kit": "^1.0.3", "@sveltejs/svelte-repl": "0.0.10", "chokidar": "^2.1.2", "degit": "^2.1.3", diff --git a/site/src/client.js b/site/src/client.js index cec91725f0..bda299367b 100644 --- a/site/src/client.js +++ b/site/src/client.js @@ -1,3 +1,4 @@ +import '@sveltejs/site-kit/base.css'; import * as sapper from '@sapper/app'; sapper.start({ diff --git a/site/src/components/Icon.svelte b/site/src/components/Icon.svelte deleted file mode 100644 index 366b923911..0000000000 --- a/site/src/components/Icon.svelte +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - diff --git a/site/src/components/InlineSvg.svelte b/site/src/components/InlineSvg.svelte deleted file mode 100644 index 741ab7ec9e..0000000000 --- a/site/src/components/InlineSvg.svelte +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/site/src/components/TopNav.svelte b/site/src/components/TopNav.svelte deleted file mode 100644 index 8238f2a01d..0000000000 --- a/site/src/components/TopNav.svelte +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - -
    - -
    diff --git a/site/src/components/unused/Logo.svelte b/site/src/components/unused/Logo.svelte deleted file mode 100644 index 811e5b9442..0000000000 --- a/site/src/components/unused/Logo.svelte +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/site/src/components/unused/debug-css.html b/site/src/components/unused/debug-css.html deleted file mode 100644 index 745d7a11b1..0000000000 --- a/site/src/components/unused/debug-css.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - -{#if show} -
    -
    -
    -
    -
    -{/if} - - \ No newline at end of file diff --git a/site/src/components/unused/isometry.html b/site/src/components/unused/isometry.html deleted file mode 100644 index 6c2260ae50..0000000000 --- a/site/src/components/unused/isometry.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/site/src/components/unused/theme-input.html b/site/src/components/unused/theme-input.html deleted file mode 100644 index 8465cd8890..0000000000 --- a/site/src/components/unused/theme-input.html +++ /dev/null @@ -1,81 +0,0 @@ - -{#if color} - {/if} - -{#if text} - -{/if} - - - - - \ No newline at end of file diff --git a/site/src/components/unused/toaster.html b/site/src/components/unused/toaster.html deleted file mode 100644 index 6145efc568..0000000000 --- a/site/src/components/unused/toaster.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - diff --git a/site/src/routes/_components/Example.svelte b/site/src/routes/_components/Example.svelte new file mode 100644 index 0000000000..c07b4be0b5 --- /dev/null +++ b/site/src/routes/_components/Example.svelte @@ -0,0 +1,52 @@ + + + + +
    +
    + + +
    + + {#if intersecting} + + + {/if} + +
    +
    +
    \ No newline at end of file diff --git a/site/src/routes/_layout.svelte b/site/src/routes/_layout.svelte index 560fb9fcad..bc557fb4da 100644 --- a/site/src/routes/_layout.svelte +++ b/site/src/routes/_layout.svelte @@ -1,21 +1,37 @@ + + {#if $preloading} {/if} - {#if $page.path !== '/repl/embed'} -
    ``` +#### bind:group + +```sv +bind:group={variable} +``` + +--- + +Inputs that work together can use `bind:group`. + +```html + + + + + + + + + + + + +``` + +#### [bind:this](bind_element) + +```sv +bind:this={dom_node} +``` + +--- + +To get a reference to a DOM node, use `bind:this`. + +```html + + + +``` + -#### `class:` +#### class:*name* ```sv class:name={value} @@ -627,7 +632,7 @@ A `class:` directive provides a shorter way of toggling a class on an element. ``` -#### `use:` +#### use:*action* ```sv use:action @@ -692,7 +697,7 @@ An action can have parameters. If the returned value has an `update` method, it ``` -#### `transition:`/`in:`/`out:` +#### transition:/in:/out: ```sv transition:name @@ -908,7 +913,7 @@ Local transitions only play when the block they belong to is created or destroye ``` -#### `animate:` +#### animate: ```sv animate:name @@ -1044,7 +1049,7 @@ A custom animation function can also return a `tick` function, which is called * ### Component directives -#### on:*event* +#### [on:*eventname*](on_component_event) ```sv on:eventname={handler} @@ -1067,7 +1072,7 @@ As with DOM events, if the `on:` directive is used without a value, the componen ``` -#### bind:*property* +#### [bind:*property*](bind_component_property) ```sv bind:property={variable} @@ -1081,7 +1086,7 @@ You can bind to component props using the same mechanism. ``` -#### `bind:this` +#### [bind:this](bind_component) ```sv bind:this={component_instance} @@ -1135,7 +1140,7 @@ The content is exposed in the child component using the `` element, which
    ``` -#### Named slots (slot="name") +#### [``](slot_name) --- @@ -1156,7 +1161,7 @@ Named slots allow consumers to target specific areas. They can also have fallbac
    ``` -#### Let directive (let:name) +#### [``](slot_let) --- diff --git a/site/src/routes/docs/_sections.js b/site/src/routes/docs/_sections.js index 2d90b35f16..b6da2315f0 100644 --- a/site/src/routes/docs/_sections.js +++ b/site/src/routes/docs/_sections.js @@ -38,7 +38,7 @@ const blockTypes = [ ]; export default function() { - const makeSlug = make_session_slug_processor({ + const make_slug = make_session_slug_processor({ preserve_unicode: SLUG_PRESERVE_UNICODE, separator: SLUG_SEPARATOR }); @@ -51,7 +51,7 @@ export default function() { const { content, metadata } = extract_frontmatter(markdown); - const sectionSlug = makeSlug(metadata.title); + const section_slug = make_slug(metadata.title); const subsections = []; @@ -108,7 +108,15 @@ export default function() { }; renderer.heading = (text, level, rawtext) => { - const slug = makeSlug(rawtext); + let slug; + + const match = /(.+)<\/a>/.exec(text); + if (match) { + slug = match[1]; + text = match[2]; + } else { + slug = make_slug(rawtext); + } if (level === 3 || level === 4) { const title = text @@ -145,7 +153,7 @@ export default function() { html: html.replace(/@@(\d+)/g, (m, id) => hashes[id] || m), metadata, subsections, - slug: sectionSlug, + slug: section_slug, file, }; }); From dc973ee6ec549970521d7d4e1113cbb26d9e9c91 Mon Sep 17 00:00:00 2001 From: mrkishi Date: Sun, 9 Jun 2019 17:04:07 -0300 Subject: [PATCH 244/510] add ambient type for generated svelte components --- src/runtime/ambient.ts | 19 +++++++++++++++++++ src/runtime/index.ts | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 src/runtime/ambient.ts diff --git a/src/runtime/ambient.ts b/src/runtime/ambient.ts new file mode 100644 index 0000000000..b094056c59 --- /dev/null +++ b/src/runtime/ambient.ts @@ -0,0 +1,19 @@ +declare module '*.svelte' { + type Props = Record; + + export default class { + constructor(options: { + target: Element; + anchor?: Element; + props?: Props; + hydrate?: boolean; + intro?: boolean; + }); + + $set(props: Props): void; + $on(event: string, callback: (event: CustomEvent) => void): () => void; + $destroy(): void; + + [accessor: string]: any; + } +} diff --git a/src/runtime/index.ts b/src/runtime/index.ts index 40928da8a0..0973b93f1e 100644 --- a/src/runtime/index.ts +++ b/src/runtime/index.ts @@ -1,3 +1,5 @@ +import './ambient'; + export { onMount, onDestroy, From 7215260aa2da2395e18377beb81fbbb4f6e477dc Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 9 Jun 2019 16:22:16 -0400 Subject: [PATCH 245/510] tweak transition stuff --- site/content/docs/02-template-syntax.md | 106 +++++++++++++----------- 1 file changed, 57 insertions(+), 49 deletions(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index adef3d0757..a6e17f8bc2 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -377,6 +377,13 @@ Handlers can be declared inline with no performance penalty. As with attributes, Add *modifiers* to DOM events with the `|` character. +```html +
    + +
    +``` + The following modifiers are available: * `preventDefault` — calls `event.preventDefault()` before running the handler @@ -387,13 +394,6 @@ The following modifiers are available: Modifiers can be chained together, e.g. `on:click|once|capture={...}`. -```html -
    - -
    -``` - --- If the `on:` directive is used without a value, the component will *forward* the event, meaning that a consumer of the component can listen for it. @@ -697,43 +697,19 @@ An action can have parameters. If the returned value has an `update` method, it ``` -#### transition:/in:/out: +#### transition:*fn* ```sv -transition:name +transition:fn ``` ```sv -transition:name={params} +transition:fn={params} ``` ```sv -transition:name|local +transition:fn|local ``` ```sv -transition:name|local={params} -``` -```sv -in:name -``` -```sv -in:name={params} -``` -```sv -in:name|local -``` -```sv -in:name|local={params} -``` -```sv -out:name -``` -```sv -out:name={params} -``` -```sv -out:name|local -``` -```sv -out:name|local={params} +transition:fn|local={params} ``` @@ -749,7 +725,7 @@ transition = (node: HTMLElement, params: any) => { --- -A transition is triggered by an element entering or leaving the DOM as a result of a state change. Transitions do not run when a component is first mounted, but only on subsequent updates. +A transition is triggered by an element entering or leaving the DOM as a result of a state change. Elements inside an *outroing* block are kept in the DOM until all current transitions have completed. @@ -763,18 +739,6 @@ The `transition:` directive indicates a *bidirectional* transition, which means {/if} ``` ---- - -The `in:` and `out:` directives are not bidirectional. An in transition will continue to 'play' alongside the out transition, if the block is outroed while the transition is in progress. If an out transition is aborted, transitions will restart from scratch. - -```html -{#if visible} -
    - flies in, fades out -
    -{/if} -``` - > By default intro transitions will not play on first render. You can modify this behaviour by setting `intro: true` when you [create a component](docs#Client-side_component_API). ##### Transition parameters @@ -913,6 +877,50 @@ Local transitions only play when the block they belong to is created or destroye ``` +#### in:*fn*/out:*fn* + +```sv +in:fn +``` +```sv +in:fn={params} +``` +```sv +in:fn|local +``` +```sv +in:fn|local={params} +``` + +```sv +out:fn +``` +```sv +out:fn={params} +``` +```sv +out:fn|local +``` +```sv +out:fn|local={params} +``` + +--- + +Similar to `transition:`, but only applies to elements entering (`in:`) or leaving (`out:`) the DOM. + +Unlike with `transition:`, transitions applied with `in:` and `out:` are not bidirectional — an in transition will continue to 'play' alongside the out transition, rather than reversing, if the block is outroed while the transition is in progress. If an out transition is aborted, transitions will restart from scratch. + +```html +{#if visible} +
    + flies in, fades out +
    +{/if} +``` + + + #### animate: ```sv From 9754f2a817b7708623251b05282bf6442e7e5f18 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 9 Jun 2019 16:34:54 -0400 Subject: [PATCH 246/510] take code block out of blockquote --- .../04-updating-arrays-and-objects/text.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/site/content/tutorial/02-reactivity/04-updating-arrays-and-objects/text.md b/site/content/tutorial/02-reactivity/04-updating-arrays-and-objects/text.md index 9cc875bc73..b70b09f728 100644 --- a/site/content/tutorial/02-reactivity/04-updating-arrays-and-objects/text.md +++ b/site/content/tutorial/02-reactivity/04-updating-arrays-and-objects/text.md @@ -13,7 +13,7 @@ function addNumber() { } ``` -But there's a more *idiomatic* solution: +But there's a more idiomatic solution: ```js function addNumber() { @@ -23,10 +23,10 @@ function addNumber() { You can use similar patterns to replace `pop`, `shift`, `unshift` and `splice`. -> Assignments to *properties* of arrays and objects — e.g. `obj.foo += 1` or `array[i] = x` — work the same way as assignments to the values themselves. -> -> ```js -> function addNumber() { -> numbers[numbers.length] = numbers.length + 1; -> } -> ``` +Assignments to *properties* of arrays and objects — e.g. `obj.foo += 1` or `array[i] = x` — work the same way as assignments to the values themselves. + +```js +function addNumber() { + numbers[numbers.length] = numbers.length + 1; +} +``` From 1102ff642685c1f21aaf690075199e87018463ec Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 9 Jun 2019 17:34:02 -0400 Subject: [PATCH 247/510] support once modifier on component events, fail on others (#2987) * support once modifier on component events, fail on others. fixes #2654 * appease the gods of typescript --- src/compiler/compile/nodes/InlineComponent.ts | 11 +++++++++++ .../render-dom/wrappers/InlineComponent/index.ts | 4 +++- src/runtime/internal/utils.ts | 9 +++++++++ .../Button.svelte | 1 + .../_config.js | 16 ++++++++++++++++ .../main.svelte | 6 ++++++ .../errors.json | 15 +++++++++++++++ .../input.svelte | 6 ++++++ 8 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/component-event-handler-modifier-once/Button.svelte create mode 100644 test/runtime/samples/component-event-handler-modifier-once/_config.js create mode 100644 test/runtime/samples/component-event-handler-modifier-once/main.svelte create mode 100644 test/validator/samples/component-event-modifiers-invalid/errors.json create mode 100644 test/validator/samples/component-event-modifiers-invalid/input.svelte diff --git a/src/compiler/compile/nodes/InlineComponent.ts b/src/compiler/compile/nodes/InlineComponent.ts index 2c8265ade1..6db6f1b327 100644 --- a/src/compiler/compile/nodes/InlineComponent.ts +++ b/src/compiler/compile/nodes/InlineComponent.ts @@ -100,6 +100,17 @@ export default class InlineComponent extends Node { this.scope = scope; } + this.handlers.forEach(handler => { + handler.modifiers.forEach(modifier => { + if (modifier !== 'once') { + component.error(handler, { + code: 'invalid-event-modifier', + message: `Event modifiers other than 'once' can only be used on DOM elements` + }); + } + }); + }); + this.children = map_children(component, this, this.scope, info.children); } } diff --git a/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts index d2d76b41de..696fff51c0 100644 --- a/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts @@ -363,7 +363,9 @@ export default class InlineComponentWrapper extends Wrapper { }); const munged_handlers = this.node.handlers.map(handler => { - const snippet = handler.render(block); + let snippet = handler.render(block); + if (handler.modifiers.has('once')) snippet = `@once(${snippet})`; + return `${name}.$on("${handler.name}", ${snippet});`; }); diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 7802c69b20..152c0e79b0 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -81,6 +81,15 @@ export function exclude_internal_props(props) { return result; } +export function once(fn) { + let ran = false; + return function(this: any, ...args) { + if (ran) return; + ran = true; + fn.call(this, ...args); + } +} + const is_client = typeof window !== 'undefined'; export let now: () => number = is_client diff --git a/test/runtime/samples/component-event-handler-modifier-once/Button.svelte b/test/runtime/samples/component-event-handler-modifier-once/Button.svelte new file mode 100644 index 0000000000..9b5b7a5f67 --- /dev/null +++ b/test/runtime/samples/component-event-handler-modifier-once/Button.svelte @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/runtime/samples/component-event-handler-modifier-once/_config.js b/test/runtime/samples/component-event-handler-modifier-once/_config.js new file mode 100644 index 0000000000..41daf374c8 --- /dev/null +++ b/test/runtime/samples/component-event-handler-modifier-once/_config.js @@ -0,0 +1,16 @@ +export default { + html: ` + + `, + + async test({ assert, component, target, window }) { + const button = target.querySelector('button'); + const event = new window.MouseEvent('click'); + + await button.dispatchEvent(event); + assert.equal(component.count, 1); + + await button.dispatchEvent(event); + assert.equal(component.count, 1); + } +}; diff --git a/test/runtime/samples/component-event-handler-modifier-once/main.svelte b/test/runtime/samples/component-event-handler-modifier-once/main.svelte new file mode 100644 index 0000000000..b9bca3b5eb --- /dev/null +++ b/test/runtime/samples/component-event-handler-modifier-once/main.svelte @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/test/validator/samples/component-event-modifiers-invalid/errors.json b/test/validator/samples/component-event-modifiers-invalid/errors.json new file mode 100644 index 0000000000..da608063fe --- /dev/null +++ b/test/validator/samples/component-event-modifiers-invalid/errors.json @@ -0,0 +1,15 @@ +[{ + "message": "Event modifiers other than 'once' can only be used on DOM elements", + "code": "invalid-event-modifier", + "start": { + "line": 6, + "column": 8, + "character": 93 + }, + "end": { + "line": 6, + "column": 40, + "character": 125 + }, + "pos": 93 +}] diff --git a/test/validator/samples/component-event-modifiers-invalid/input.svelte b/test/validator/samples/component-event-modifiers-invalid/input.svelte new file mode 100644 index 0000000000..8f7ce54d7a --- /dev/null +++ b/test/validator/samples/component-event-modifiers-invalid/input.svelte @@ -0,0 +1,6 @@ + + + \ No newline at end of file From a43bcfdccd19667d0d1c2d4f4c8d10a4176fca15 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 9 Jun 2019 17:34:57 -0400 Subject: [PATCH 248/510] move tsd to npm run build --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5004c27cfb..ee6d1757a5 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "coverage": "c8 report --reporter=text-lcov > coverage.lcov && c8 report --reporter=html", "codecov": "codecov", "precodecov": "npm run coverage", - "build": "rollup -c", - "prepare": "npm run build && npm run tsd", + "build": "rollup -c && npm run tsd", + "prepare": "npm run build", "dev": "rollup -cw", "pretest": "npm run build", "posttest": "agadoo internal/index.mjs", From 658290546a546c751cf4cb3b282647c75b57c13a Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 9 Jun 2019 17:35:36 -0400 Subject: [PATCH 249/510] allow empty tags - fixes #2980 (#2988) --- src/compiler/compile/render-dom/wrappers/Title.ts | 5 ++++- test/runtime/samples/head-title-empty/_config.js | 5 +++++ test/runtime/samples/head-title-empty/main.svelte | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/head-title-empty/_config.js create mode 100644 test/runtime/samples/head-title-empty/main.svelte diff --git a/src/compiler/compile/render-dom/wrappers/Title.ts b/src/compiler/compile/render-dom/wrappers/Title.ts index 75dbc44202..456a833a8f 100644 --- a/src/compiler/compile/render-dom/wrappers/Title.ts +++ b/src/compiler/compile/render-dom/wrappers/Title.ts @@ -91,7 +91,10 @@ export default class TitleWrapper extends Wrapper { ); } } else { - const value = stringify((this.node.children[0] as Text).data); + const value = this.node.children.length > 0 + ? stringify((this.node.children[0] as Text).data) + : '""'; + block.builders.hydrate.add_line(`document.title = ${value};`); } } diff --git a/test/runtime/samples/head-title-empty/_config.js b/test/runtime/samples/head-title-empty/_config.js new file mode 100644 index 0000000000..497855156c --- /dev/null +++ b/test/runtime/samples/head-title-empty/_config.js @@ -0,0 +1,5 @@ +export default { + test({ assert, window }) { + assert.equal(window.document.title, ''); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/head-title-empty/main.svelte b/test/runtime/samples/head-title-empty/main.svelte new file mode 100644 index 0000000000..3f81715df5 --- /dev/null +++ b/test/runtime/samples/head-title-empty/main.svelte @@ -0,0 +1,3 @@ +<svelte:head> + <title> + \ No newline at end of file From 820cce8523c34ec576bbe6e81958598f3007761b Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 9 Jun 2019 18:01:10 -0400 Subject: [PATCH 250/510] -> v3.5.0 --- CHANGELOG.md | 13 +++++++++++++ package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 766a1634e4..d82740b998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Svelte changelog +## 3.5.0 + +* Update package folder structure ([#2887](https://github.com/sveltejs/svelte/pull/2887)) +* Support `once` modifier on component events ([#2654](https://github.com/sveltejs/svelte/issues/2654)) +* Allow empty `` tags ([#2980](https://github.com/sveltejs/svelte/issues/2980)) +* Render textarea binding values inside element ([#2975](https://github.com/sveltejs/svelte/pull/2975)) +* Fix delayed animation glitch ([#2871](https://github.com/sveltejs/svelte/issues/2871)) +* Solve diamond dependencies problem with stores ([#2660](https://github.com/sveltejs/svelte/issues/2660)) +* Fix missing outros inside each blocks ([#2689](https://github.com/sveltejs/svelte/issues/2689)) +* Support animations without transitions ([#2908](https://github.com/sveltejs/svelte/issues/2908)) +* Add missing transition events ([#2912](https://github.com/sveltejs/svelte/pull/2912)) + + ## 3.4.4 * Publish type declaration files ([#2874](https://github.com/sveltejs/svelte/issues/2874)) diff --git a/package.json b/package.json index ee6d1757a5..2b1e920869 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.4.4", + "version": "3.5.0", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From 05c5132e007f723df9c052000485a1672cac7771 Mon Sep 17 00:00:00 2001 From: Conduitry <git@chor.date> Date: Sun, 9 Jun 2019 18:28:12 -0400 Subject: [PATCH 251/510] site: actually support new package structure in REPL --- site/package-lock.json | 6 +++--- site/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index b4cbd4f13a..7b2f8929a4 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1362,9 +1362,9 @@ } }, "@sveltejs/svelte-repl": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.1.5.tgz", - "integrity": "sha512-gk7Ny/i19g3njob9lGGV5JzDed8eAaFphHidxquFGW5QgMCScEu+YgweBo+tRkRE0sJObFzMz3MjudH5o+KdIw==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.1.6.tgz", + "integrity": "sha512-3BH30SlzdSQzs1qiLr+kNXw1u81e31RiBtYXJ5YMq0d64VBXKNbP6TYOLQuCN5Ibe86wnPhJUHyIesMWIjyS6w==", "dev": true, "requires": { "codemirror": "^5.45.0", diff --git a/site/package.json b/site/package.json index 3f7172b8a8..6689a926f6 100644 --- a/site/package.json +++ b/site/package.json @@ -39,7 +39,7 @@ "@babel/runtime": "^7.4.4", "@sindresorhus/slugify": "^0.9.1", "@sveltejs/site-kit": "^1.0.4", - "@sveltejs/svelte-repl": "^0.1.5", + "@sveltejs/svelte-repl": "^0.1.6", "degit": "^2.1.3", "dotenv": "^8.0.0", "eslint-plugin-svelte3": "^1.0.0", From 68b1aeff9d854266ab1f45968b384afa888e1221 Mon Sep 17 00:00:00 2001 From: mrkishi <mauriciokishi@gmail.com> Date: Sun, 9 Jun 2019 15:36:56 -0300 Subject: [PATCH 252/510] replicate travis' configuration onto appveyor's --- appveyor.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 249f61abf4..23a3ac3505 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,12 +9,13 @@ init: environment: matrix: - # node.js + - nodejs_version: 8 - nodejs_version: 10 + - nodejs_version: 12 install: - - ps: Install-Product node $env:nodejs_version - - npm install + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) + - npm ci || npm install build: off From d3634d32c13c1ee8c3b0c1e8510591e6381d1bed Mon Sep 17 00:00:00 2001 From: Richard Harris <richard.a.harris@gmail.com> Date: Sun, 9 Jun 2019 19:33:48 -0400 Subject: [PATCH 253/510] dont even know how to summarise this --- scripts/create-stubs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create-stubs.js b/scripts/create-stubs.js index 191b86cbfd..e69e3f5e20 100644 --- a/scripts/create-stubs.js +++ b/scripts/create-stubs.js @@ -4,7 +4,7 @@ fs.readdirSync('src/runtime') .filter(dir => fs.statSync(`src/runtime/${dir}`).isDirectory()) .forEach(dir => { fs.writeFileSync(`${dir}/package.json`, JSON.stringify({ - main: './index.js', + main: './index', module: './index.mjs' }, null, ' ')); From 8c42cf62579fb218af7662d010d4adcfeff12fcd Mon Sep 17 00:00:00 2001 From: Richard Harris <richard.a.harris@gmail.com> Date: Sun, 9 Jun 2019 19:51:57 -0400 Subject: [PATCH 254/510] -> v3.5.1 --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d82740b998..c1adaf0b76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## 3.5.1 + +* Accommodate webpack idiosyncracies + ## 3.5.0 * Update package folder structure ([#2887](https://github.com/sveltejs/svelte/pull/2887)) diff --git a/package.json b/package.json index 2b1e920869..48f2c41d85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.5.0", + "version": "3.5.1", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From 2046780a4880545541ca06d85b8bf6e0b023b014 Mon Sep 17 00:00:00 2001 From: Rich Harris <richard.a.harris@gmail.com> Date: Sun, 9 Jun 2019 20:36:53 -0400 Subject: [PATCH 255/510] =?UTF-8?q?Delete=20gitattributes=20=E2=80=94=20Gi?= =?UTF-8?q?tHub=20now=20syntax=20highlights=20Svelte=20files=20automatical?= =?UTF-8?q?ly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index eb49e78156..0000000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.svelte linguist-language=HTML From e3de705cb821de586e5f78fabc4b09692e846276 Mon Sep 17 00:00:00 2001 From: Richard Harris <richard.a.harris@gmail.com> Date: Sun, 9 Jun 2019 23:31:20 -0400 Subject: [PATCH 256/510] initialise text/html bindings if necessary --- src/compiler/compile/nodes/Element.ts | 4 +- .../render-dom/wrappers/Element/Binding.ts | 28 +++++-------- .../render-dom/wrappers/Element/index.ts | 20 ++++++---- .../compile/render-ssr/handlers/Element.ts | 24 +++++++---- .../_config.js | 40 +++++++++++++++++++ .../main.svelte | 8 ++++ .../_config.js | 6 +-- .../main.svelte | 2 +- .../_config.js | 34 ++++++++++++++++ .../main.svelte | 8 ++++ .../_config.js | 0 .../main.svelte | 2 +- 12 files changed, 138 insertions(+), 38 deletions(-) create mode 100644 test/runtime/samples/binding-contenteditable-html-initial/_config.js create mode 100644 test/runtime/samples/binding-contenteditable-html-initial/main.svelte rename test/runtime/samples/{contenteditable-html => binding-contenteditable-html}/_config.js (89%) rename test/runtime/samples/{contenteditable-html => binding-contenteditable-html}/main.svelte (62%) create mode 100644 test/runtime/samples/binding-contenteditable-text-initial/_config.js create mode 100644 test/runtime/samples/binding-contenteditable-text-initial/main.svelte rename test/runtime/samples/{contenteditable-text => binding-contenteditable-text}/_config.js (100%) rename test/runtime/samples/{contenteditable-text => binding-contenteditable-text}/main.svelte (66%) diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index c37ea5020a..3e883200a7 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -610,7 +610,7 @@ export default class Element extends Node { } else if ( name === 'text' || name === 'html' - ){ + ) { const contenteditable = this.attributes.find( (attribute: Attribute) => attribute.name === 'contenteditable' ); @@ -626,7 +626,7 @@ export default class Element extends Node { message: `'contenteditable' attribute cannot be dynamic if element uses two-way binding` }); } - } else if (name !== 'this') { + } else if (name !== 'this') { component.error(binding, { code: `invalid-binding`, message: `'${binding.name}' is not a valid binding` diff --git a/src/compiler/compile/render-dom/wrappers/Element/Binding.ts b/src/compiler/compile/render-dom/wrappers/Element/Binding.ts index 22f1f682e4..7de661e3d1 100644 --- a/src/compiler/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compiler/compile/render-dom/wrappers/Element/Binding.ts @@ -133,6 +133,14 @@ export default class BindingWrapper { break; } + case 'text': + update_conditions.push(`${this.snippet} !== ${parent.var}.textContent`); + break; + + case 'html': + update_conditions.push(`${this.snippet} !== ${parent.var}.innerHTML`); + break; + case 'currentTime': case 'playbackRate': case 'volume': @@ -162,7 +170,9 @@ export default class BindingWrapper { ); } - if (!/(currentTime|paused)/.test(this.node.name)) { + if (this.node.name === 'html' || this.node.name === 'text') { + block.builders.mount.add_block(`if (${this.snippet} !== void 0) ${update_dom}`); + } else if (!/(currentTime|paused)/.test(this.node.name)) { block.builders.mount.add_block(update_dom); } } @@ -198,14 +208,6 @@ function get_dom_updater( return `${element.var}.checked = ${condition};`; } - if (binding.node.name === 'text') { - return `if (${binding.snippet} !== ${element.var}.textContent) ${element.var}.textContent = ${binding.snippet};`; - } - - if (binding.node.name === 'html') { - return `if (${binding.snippet} !== ${element.var}.innerHTML) ${element.var}.innerHTML = ${binding.snippet};`; - } - if (binding.node.name === 'text') { return `${element.var}.textContent = ${binding.snippet};`; } @@ -334,14 +336,6 @@ function get_value_from_dom( return `this.innerHTML`; } - if (name === 'text') { - return `this.textContent`; - } - - if (name === 'html') { - return `this.innerHTML`; - } - // everything else return `this.${name}`; } diff --git a/src/compiler/compile/render-dom/wrappers/Element/index.ts b/src/compiler/compile/render-dom/wrappers/Element/index.ts index c63ebf1693..527a101f6a 100644 --- a/src/compiler/compile/render-dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render-dom/wrappers/Element/index.ts @@ -33,12 +33,6 @@ const events = [ (name === 'text' || name === 'html') && node.attributes.some(attribute => attribute.name === 'contenteditable') }, - { - event_names: ['change'], - filter: (node: Element, name: string) => - (name === 'text' || name === 'html') && - node.attributes.some(attribute => attribute.name === 'contenteditable') - }, { event_names: ['change'], filter: (node: Element, _name: string) => @@ -514,7 +508,19 @@ export default class ElementWrapper extends Wrapper { .map(binding => `${binding.snippet} === void 0`) .join(' || '); - if (this.node.name === 'select' || group.bindings.find(binding => binding.node.name === 'indeterminate' || binding.is_readonly_media_attribute())) { + const should_initialise = ( + this.node.name === 'select' || + group.bindings.find(binding => { + return ( + binding.node.name === 'indeterminate' || + binding.node.name === 'text' || + binding.node.name === 'html' || + binding.is_readonly_media_attribute() + ); + }) + ); + + if (should_initialise) { const callback = has_local_function ? handler : `() => ${callee}.call(${this.var})`; block.builders.hydrate.add_line( `if (${some_initial_state_is_undefined}) @add_render_callback(${callback});` diff --git a/src/compiler/compile/render-ssr/handlers/Element.ts b/src/compiler/compile/render-ssr/handlers/Element.ts index 681e0d4c7b..fb9b935f9a 100644 --- a/src/compiler/compile/render-ssr/handlers/Element.ts +++ b/src/compiler/compile/render-ssr/handlers/Element.ts @@ -53,7 +53,11 @@ export default function(node: Element, renderer: Renderer, options: RenderOption slot_scopes: Map<any, any>; }) { let opening_tag = `<${node.name}`; - let node_contents; // awkward special case + + // awkward special case + let node_contents; + let value; + const contenteditable = ( node.name !== 'textarea' && node.name !== 'input' && @@ -151,16 +155,16 @@ export default function(node: Element, renderer: Renderer, options: RenderOption if (name === 'group') { // TODO server-render group bindings } else if (contenteditable && (name === 'text' || name === 'html')) { - const snippet = snip(expression) + node_contents = snip(expression); if (name == 'text') { - node_contents = '${@escape(' + snippet + ')}' + value = '@escape($$value)'; } else { // Do not escape HTML content - node_contents = '${' + snippet + '}' + value = '$$value'; } } else if (binding.name === 'value' && node.name === 'textarea') { const snippet = snip(expression); - node_contents='${(' + snippet + ') || ""}'; + node_contents = '${(' + snippet + ') || ""}'; } else { const snippet = snip(expression); opening_tag += ' ${(v => v ? ("' + name + '" + (v === true ? "" : "=" + JSON.stringify(v))) : "")(' + snippet + ')}'; @@ -175,8 +179,14 @@ export default function(node: Element, renderer: Renderer, options: RenderOption renderer.append(opening_tag); - if ((node.name === 'textarea' || contenteditable) && node_contents !== undefined) { - renderer.append(node_contents); + if (node_contents !== undefined) { + if (contenteditable) { + renderer.append('${($$value => $$value === void 0 ? `'); + renderer.render(node.children, options); + renderer.append('` : ' + value + ')(' + node_contents + ')}'); + } else { + renderer.append(node_contents); + } } else { renderer.render(node.children, options); } diff --git a/test/runtime/samples/binding-contenteditable-html-initial/_config.js b/test/runtime/samples/binding-contenteditable-html-initial/_config.js new file mode 100644 index 0000000000..0b1f656a54 --- /dev/null +++ b/test/runtime/samples/binding-contenteditable-html-initial/_config.js @@ -0,0 +1,40 @@ +export default { + html: ` + <editor><b>world</b></editor> + <p>hello <b>world</b></p> + `, + + ssrHtml: ` + <editor contenteditable="true"><b>world</b></editor> + <p>hello undefined</p> + `, + + async test({ assert, component, target, window }) { + assert.equal(component.name, '<b>world</b>'); + + const el = target.querySelector('editor'); + + el.innerHTML = 'every<span>body</span>'; + + // No updates to data yet + assert.htmlEqual(target.innerHTML, ` + <editor>every<span>body</span></editor> + <p>hello <b>world</b></p> + `); + + // Handle user input + const event = new window.Event('input'); + await el.dispatchEvent(event); + assert.htmlEqual(target.innerHTML, ` + <editor>every<span>body</span></editor> + <p>hello every<span>body</span></p> + `); + + component.name = 'good<span>bye</span>'; + assert.equal(el.innerHTML, 'good<span>bye</span>'); + assert.htmlEqual(target.innerHTML, ` + <editor>good<span>bye</span></editor> + <p>hello good<span>bye</span></p> + `); + }, +}; diff --git a/test/runtime/samples/binding-contenteditable-html-initial/main.svelte b/test/runtime/samples/binding-contenteditable-html-initial/main.svelte new file mode 100644 index 0000000000..1c05a0950d --- /dev/null +++ b/test/runtime/samples/binding-contenteditable-html-initial/main.svelte @@ -0,0 +1,8 @@ +<script> + export let name; +</script> + +<editor contenteditable="true" bind:html={name}> + <b>world</b> +</editor> +<p>hello {@html name}</p> \ No newline at end of file diff --git a/test/runtime/samples/contenteditable-html/_config.js b/test/runtime/samples/binding-contenteditable-html/_config.js similarity index 89% rename from test/runtime/samples/contenteditable-html/_config.js rename to test/runtime/samples/binding-contenteditable-html/_config.js index cd2a822655..013fa30f39 100644 --- a/test/runtime/samples/contenteditable-html/_config.js +++ b/test/runtime/samples/binding-contenteditable-html/_config.js @@ -19,14 +19,14 @@ export default { el.innerHTML = 'every<span>body</span>'; - // No updates to data yet + // No updates to data yet assert.htmlEqual(target.innerHTML, ` <editor>every<span>body</span></editor> <p>hello <b>world</b></p> `); - // Handle user input - const event = new window.Event('input'); + // Handle user input + const event = new window.Event('input'); await el.dispatchEvent(event); assert.htmlEqual(target.innerHTML, ` <editor>every<span>body</span></editor> diff --git a/test/runtime/samples/contenteditable-html/main.svelte b/test/runtime/samples/binding-contenteditable-html/main.svelte similarity index 62% rename from test/runtime/samples/contenteditable-html/main.svelte rename to test/runtime/samples/binding-contenteditable-html/main.svelte index 53b4e81c88..09195ed558 100644 --- a/test/runtime/samples/contenteditable-html/main.svelte +++ b/test/runtime/samples/binding-contenteditable-html/main.svelte @@ -1,5 +1,5 @@ <script> - export let name; + export let name; </script> <editor contenteditable="true" bind:html={name}></editor> diff --git a/test/runtime/samples/binding-contenteditable-text-initial/_config.js b/test/runtime/samples/binding-contenteditable-text-initial/_config.js new file mode 100644 index 0000000000..7345687d29 --- /dev/null +++ b/test/runtime/samples/binding-contenteditable-text-initial/_config.js @@ -0,0 +1,34 @@ +export default { + html: ` + <editor><b>world</b></editor> + <p>hello world</p> + `, + + ssrHtml: ` + <editor contenteditable="true"><b>world</b></editor> + <p>hello undefined</p> + `, + + async test({ assert, component, target, window }) { + assert.equal(component.name, 'world'); + + const el = target.querySelector('editor'); + + const event = new window.Event('input'); + + el.textContent = 'everybody'; + await el.dispatchEvent(event); + + assert.htmlEqual(target.innerHTML, ` + <editor>everybody</editor> + <p>hello everybody</p> + `); + + component.name = 'goodbye'; + assert.equal(el.textContent, 'goodbye'); + assert.htmlEqual(target.innerHTML, ` + <editor>goodbye</editor> + <p>hello goodbye</p> + `); + }, +}; diff --git a/test/runtime/samples/binding-contenteditable-text-initial/main.svelte b/test/runtime/samples/binding-contenteditable-text-initial/main.svelte new file mode 100644 index 0000000000..633d268f43 --- /dev/null +++ b/test/runtime/samples/binding-contenteditable-text-initial/main.svelte @@ -0,0 +1,8 @@ +<script> + export let name; +</script> + +<editor contenteditable="true" bind:text={name}> + <b>world</b> +</editor> +<p>hello {name}</p> \ No newline at end of file diff --git a/test/runtime/samples/contenteditable-text/_config.js b/test/runtime/samples/binding-contenteditable-text/_config.js similarity index 100% rename from test/runtime/samples/contenteditable-text/_config.js rename to test/runtime/samples/binding-contenteditable-text/_config.js diff --git a/test/runtime/samples/contenteditable-text/main.svelte b/test/runtime/samples/binding-contenteditable-text/main.svelte similarity index 66% rename from test/runtime/samples/contenteditable-text/main.svelte rename to test/runtime/samples/binding-contenteditable-text/main.svelte index a71d9f0c5b..c47f5ee477 100644 --- a/test/runtime/samples/contenteditable-text/main.svelte +++ b/test/runtime/samples/binding-contenteditable-text/main.svelte @@ -1,5 +1,5 @@ <script> - export let name; + export let name; </script> <editor contenteditable="true" bind:text={name}></editor> From 4f626c45a9f520414d395543b2104b645f3688d0 Mon Sep 17 00:00:00 2001 From: Richard Harris <richard.a.harris@gmail.com> Date: Sun, 9 Jun 2019 23:35:09 -0400 Subject: [PATCH 257/510] tidy up, prevent collisions --- src/compiler/compile/render-ssr/handlers/Element.ts | 11 +++-------- src/runtime/internal/ssr.ts | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/compiler/compile/render-ssr/handlers/Element.ts b/src/compiler/compile/render-ssr/handlers/Element.ts index fb9b935f9a..4029a7f579 100644 --- a/src/compiler/compile/render-ssr/handlers/Element.ts +++ b/src/compiler/compile/render-ssr/handlers/Element.ts @@ -156,23 +156,18 @@ export default function(node: Element, renderer: Renderer, options: RenderOption // TODO server-render group bindings } else if (contenteditable && (name === 'text' || name === 'html')) { node_contents = snip(expression); - if (name == 'text') { - value = '@escape($$value)'; - } else { - // Do not escape HTML content - value = '$$value'; - } + value = name === 'text' ? '@escape($$value)' : '$$value'; } else if (binding.name === 'value' && node.name === 'textarea') { const snippet = snip(expression); node_contents = '${(' + snippet + ') || ""}'; } else { const snippet = snip(expression); - opening_tag += ' ${(v => v ? ("' + name + '" + (v === true ? "" : "=" + JSON.stringify(v))) : "")(' + snippet + ')}'; + opening_tag += ' ${($$value => $$value ? ("' + name + '" + ($$value === true ? "" : "=" + JSON.stringify($$value))) : "")(' + snippet + ')}'; } }); if (add_class_attribute) { - opening_tag += `\${((v) => v ? ' class="' + v + '"' : '')([${class_expression}].join(' ').trim())}`; + opening_tag += `\${(($$value) => $$value ? ' class="' + $$value + '"' : '')([${class_expression}].join(' ').trim())}`; } opening_tag += '>'; diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts index c80b4d9f45..f88f704779 100644 --- a/src/runtime/internal/ssr.ts +++ b/src/runtime/internal/ssr.ts @@ -118,4 +118,4 @@ export function get_store_value<T>(store: Readable<T>): T | undefined { let value; store.subscribe(_ => value = _)(); return value; -} +} \ No newline at end of file From b589289b557e441f337647d00fcd239367804ed7 Mon Sep 17 00:00:00 2001 From: Richard Harris <richard.a.harris@gmail.com> Date: Sun, 9 Jun 2019 23:50:04 -0400 Subject: [PATCH 258/510] use helpers --- src/compiler/compile/render-ssr/handlers/Element.ts | 4 ++-- src/runtime/internal/ssr.ts | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/compiler/compile/render-ssr/handlers/Element.ts b/src/compiler/compile/render-ssr/handlers/Element.ts index 4029a7f579..0c2181a605 100644 --- a/src/compiler/compile/render-ssr/handlers/Element.ts +++ b/src/compiler/compile/render-ssr/handlers/Element.ts @@ -162,12 +162,12 @@ export default function(node: Element, renderer: Renderer, options: RenderOption node_contents = '${(' + snippet + ') || ""}'; } else { const snippet = snip(expression); - opening_tag += ' ${($$value => $$value ? ("' + name + '" + ($$value === true ? "" : "=" + JSON.stringify($$value))) : "")(' + snippet + ')}'; + opening_tag += '${@add_attribute("' + name + '", ' + snippet + ')}'; } }); if (add_class_attribute) { - opening_tag += `\${(($$value) => $$value ? ' class="' + $$value + '"' : '')([${class_expression}].join(' ').trim())}`; + opening_tag += `\${@add_classes([${class_expression}].join(' ').trim())}`; } opening_tag += '>'; diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts index f88f704779..91d6e452fe 100644 --- a/src/runtime/internal/ssr.ts +++ b/src/runtime/internal/ssr.ts @@ -118,4 +118,13 @@ export function get_store_value<T>(store: Readable<T>): T | undefined { let value; store.subscribe(_ => value = _)(); return value; +} + +export function add_attribute(name, value) { + if (!value) return ''; + return ` ${name}${value === true ? '' : `=${JSON.stringify(value)}`}`; +} + +export function add_classes(classes) { + return classes ? ` class="${classes}"` : ``; } \ No newline at end of file From 181f60d4f80a8b894a150caad0efd4162d10ed0a Mon Sep 17 00:00:00 2001 From: Ilya Semenov <semenov@inetss.com> Date: Mon, 10 Jun 2019 17:53:10 +0700 Subject: [PATCH 259/510] Improve file name to component name conversion, fix #2843 --- src/compiler/compile/index.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/compiler/compile/index.ts b/src/compiler/compile/index.ts index 3f4a3eeb32..896f235c61 100644 --- a/src/compiler/compile/index.ts +++ b/src/compiler/compile/index.ts @@ -60,17 +60,25 @@ function get_name(filename: string) { // eslint-disable-next-line no-useless-escape const parts = filename.split(/[\/\\]/); - if (parts.length > 1 && /^index\.\w+/.test(parts[parts.length - 1])) { - parts.pop(); + if (parts.length > 1) { + const index_match = parts[parts.length - 1].match(/^index(\.\w+)/); + if (index_match) { + parts.pop(); + parts[parts.length - 1] += index_match[1]; + } } const base = parts.pop() - .replace(/\..+/, "") + .replace(/\.[^.]+$/, "") .replace(/[^a-zA-Z_$0-9]+/g, '_') .replace(/^_/, '') .replace(/_$/, '') .replace(/^(\d)/, '_$1'); + if (!base) { + throw new Error(`Could not derive component name from file ${filename}`); + } + return base[0].toUpperCase() + base.slice(1); } From 632a30ffe0b321b02060bfc5bb86d018fa778211 Mon Sep 17 00:00:00 2001 From: Conduitry <git@chor.date> Date: Mon, 10 Jun 2019 07:05:24 -0400 Subject: [PATCH 260/510] site: bump deps --- site/package-lock.json | 24 ++++++++++++------------ site/package.json | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 7b2f8929a4..34edfd33d9 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1362,9 +1362,9 @@ } }, "@sveltejs/svelte-repl": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.1.6.tgz", - "integrity": "sha512-3BH30SlzdSQzs1qiLr+kNXw1u81e31RiBtYXJ5YMq0d64VBXKNbP6TYOLQuCN5Ibe86wnPhJUHyIesMWIjyS6w==", + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.1.7.tgz", + "integrity": "sha512-/023rff9mUtF+RqRbYUbMCwAMcvxkWc97Q8i+77G3LUVQSR44TR84lvdsnCHJwj1C+RhF/Npncd2GJSskRmgbQ==", "dev": true, "requires": { "codemirror": "^5.45.0", @@ -4204,9 +4204,9 @@ } }, "sapper": { - "version": "0.27.1", - "resolved": "https://registry.npmjs.org/sapper/-/sapper-0.27.1.tgz", - "integrity": "sha512-RH0K1uQ3zJ1IXvowxr2SuboGXV69q22KaPMhhoM5VNDv9fsUlVHtluZE8WTcGxckiO2L1xFfgM7v/aINkSZpcw==", + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/sapper/-/sapper-0.27.3.tgz", + "integrity": "sha512-JOSrQEw5bD3770edZ+gwdZxS/69sySl+0KuJyMiBQKRnb85cb55w/fBYg2SMhKDa/BlaXg14aL19OiBRpXGZLQ==", "dev": true, "requires": { "html-minifier": "^4.0.0", @@ -4671,9 +4671,9 @@ } }, "svelte": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.3.0.tgz", - "integrity": "sha512-iJYkIJDvAak1kizEYnE4b4eJ17D25fU0adW7GjDgO0klbjcAFlqtWEGFJa9kpJOlUtNLilcF09k4Y9TDmK/vjg==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.5.1.tgz", + "integrity": "sha512-iMnuyteFGQ8Yl68G/DHTHY1sLwoAMya1eS0ZOHIm/dqn2etR8WEe8hUAoluLryde4Cft4gvMhtHV3NhE60nBmQ==", "dev": true }, "tar": { @@ -4802,9 +4802,9 @@ } }, "uglify-js": { - "version": "3.5.14", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.14.tgz", - "integrity": "sha512-dgyjIw8KFK6AyVl5vm2tEqPewv5TKGEiiVFLI1LbF+oHua/Njd8tZk3lIbF1AWU1rNdEg7scaceADb4zqCcWXg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", + "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", "dev": true, "requires": { "commander": "~2.20.0", diff --git a/site/package.json b/site/package.json index 6689a926f6..c4ca323fea 100644 --- a/site/package.json +++ b/site/package.json @@ -39,7 +39,7 @@ "@babel/runtime": "^7.4.4", "@sindresorhus/slugify": "^0.9.1", "@sveltejs/site-kit": "^1.0.4", - "@sveltejs/svelte-repl": "^0.1.6", + "@sveltejs/svelte-repl": "^0.1.7", "degit": "^2.1.3", "dotenv": "^8.0.0", "eslint-plugin-svelte3": "^1.0.0", @@ -57,9 +57,9 @@ "rollup-plugin-replace": "^2.2.0", "rollup-plugin-svelte": "^5.0.3", "rollup-plugin-terser": "^4.0.4", - "sapper": "^0.27.1", + "sapper": "^0.27.3", "shelljs": "^0.8.3", - "svelte": "^3.0.0" + "svelte": "^3.5.1" }, "engines": { "node": ">=10.0.0" From 7e7d495d493513f7a1749c46e30efb4eb1924904 Mon Sep 17 00:00:00 2001 From: Conduitry <git@chor.date> Date: Mon, 10 Jun 2019 07:29:47 -0400 Subject: [PATCH 261/510] remove unneeded svelte-repl dep --- package-lock.json | 24 +----------------------- package.json | 1 - 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index f1e8bf1d32..f65fcc07e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.4.4", + "version": "3.5.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -30,16 +30,6 @@ "integrity": "sha512-UdVB1rSL7H8TS8674fH02p5lRbhfIqQ18YKLxLKEnHFztHUH6bhMqjebMxgSTmWVrs5raS5JSLJIKKHFT4WfPg==", "dev": true }, - "@sveltejs/svelte-repl": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.0.5.tgz", - "integrity": "sha512-SKSX4xkqwH0XcUHQozwTNm3OCqatk66CXYZnqOW9Jf4E1B6opyQUb9f96KwAxh7ghZMbeePRv51oOWsw6n0Yww==", - "dev": true, - "requires": { - "codemirror": "^5.45.0", - "yootils": "0.0.15" - } - }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -650,12 +640,6 @@ "urlgrey": "^0.4.4" } }, - "codemirror": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.45.0.tgz", - "integrity": "sha512-c19j644usCE8gQaXa0jqn2B/HN9MnB2u6qPIrrhrMkB+QAP42y8G4QnTwuwbVSoUS1jEl7JU9HZMGhCDL0nsAw==", - "dev": true - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -4750,12 +4734,6 @@ "resolved": "https://registry.npmjs.org/yn/-/yn-3.0.0.tgz", "integrity": "sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q==", "dev": true - }, - "yootils": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/yootils/-/yootils-0.0.15.tgz", - "integrity": "sha512-GvGLuJ7XHJPGEUQ52vh8fh+vPjfikuGcu7yBswfrsNsHqnAoytOVuSb69eM0j8wQIjMz0U3kY3YsfwMhJgfG9w==", - "dev": true } } } diff --git a/package.json b/package.json index 48f2c41d85..7106e60d69 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ }, "homepage": "https://github.com/sveltejs/svelte#README", "devDependencies": { - "@sveltejs/svelte-repl": "0.0.5", "@types/mocha": "^5.2.0", "@types/node": "^10.5.5", "@typescript-eslint/eslint-plugin": "^1.9.0", From 32107d81029089100901f92565a125cff7ab0e44 Mon Sep 17 00:00:00 2001 From: Conduitry <git@chor.date> Date: Mon, 10 Jun 2019 16:28:15 -0400 Subject: [PATCH 262/510] site: add FAQ link to nav --- site/src/routes/_layout.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/src/routes/_layout.svelte b/site/src/routes/_layout.svelte index 18c1d2a8b7..4adbb9b0dc 100644 --- a/site/src/routes/_layout.svelte +++ b/site/src/routes/_layout.svelte @@ -21,6 +21,7 @@ <NavItem segment="examples">Examples</NavItem> <NavItem segment="repl">REPL</NavItem> <NavItem segment="blog">Blog</NavItem> + <NavItem segment="faq">FAQ</NavItem> <NavItem external="https://sapper.svelte.dev">Sapper</NavItem> @@ -46,4 +47,4 @@ padding: var(--nav-h) 0 0 0; overflow-x: hidden; } -</style> \ No newline at end of file +</style> From 52b5e05ead9a1265129677be69bd9a3b4a8ba601 Mon Sep 17 00:00:00 2001 From: Jacob Wright <jacwright@gmail.com> Date: Mon, 10 Jun 2019 15:44:50 -0600 Subject: [PATCH 263/510] Fix 7 GUIs crud example for delete when filtered This example could delete the incorrect person when a filter was applied. Just an example, but the behavior was confusing when I played with it, so I thought it worth fixing. --- site/content/examples/19-7guis/05-7guis-crud/App.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/content/examples/19-7guis/05-7guis-crud/App.svelte b/site/content/examples/19-7guis/05-7guis-crud/App.svelte index a0d6ef7f3e..f55aeb0d83 100644 --- a/site/content/examples/19-7guis/05-7guis-crud/App.svelte +++ b/site/content/examples/19-7guis/05-7guis-crud/App.svelte @@ -43,10 +43,12 @@ } function remove() { - people = [...people.slice(0, i), ...people.slice(i + 1)]; + // Remove selected person from the source array (people), not the filtered array + const index = people.indexOf(selected); + people = [...people.slice(0, index), ...people.slice(index + 1)]; first = last = ''; - i = Math.min(i, people.length - 1); + i = Math.min(i, filteredPeople.length - 2); } function reset_inputs(person) { From 2ac599357144f015e19ed373e04deb81225f37cd Mon Sep 17 00:00:00 2001 From: Conduitry <git@chor.date> Date: Wed, 5 Jun 2019 19:21:16 -0400 Subject: [PATCH 264/510] import globals from helpers (#2612) (#2947) --- src/compiler/compile/render-dom/index.ts | 12 ++++++------ .../compile/render-dom/wrappers/AwaitBlock.ts | 4 ++-- .../compile/render-dom/wrappers/EachBlock.ts | 4 ++-- .../compile/render-ssr/handlers/InlineComponent.ts | 2 +- src/runtime/internal/globals.ts | 5 +++++ src/runtime/internal/index.ts | 1 + src/runtime/internal/utils.ts | 2 +- test/js/samples/debug-empty/expected.js | 3 +++ test/js/samples/debug-foo-bar-baz-things/expected.js | 3 +++ test/js/samples/debug-foo/expected.js | 3 +++ test/js/samples/debug-hoisted/expected.js | 1 + test/js/samples/deconflict-builtins/expected.js | 1 + .../dev-warning-missing-data-computed/expected.js | 3 +++ test/js/samples/each-block-array-literal/expected.js | 1 + test/js/samples/each-block-changed-check/expected.js | 1 + .../js/samples/each-block-keyed-animated/expected.js | 2 ++ test/js/samples/each-block-keyed/expected.js | 2 ++ test/runtime/index.js | 1 + 18 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 src/runtime/internal/globals.ts diff --git a/src/compiler/compile/render-dom/index.ts b/src/compiler/compile/render-dom/index.ts index 46aa705bfb..a9941b838f 100644 --- a/src/compiler/compile/render-dom/index.ts +++ b/src/compiler/compile/render-dom/index.ts @@ -57,7 +57,7 @@ export default function dom( if (options.dev && !options.hydratable) { block.builders.claim.add_line( - 'throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");' + 'throw new @Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");' ); } @@ -106,7 +106,7 @@ export default function dom( } else if (component.compile_options.dev) { body.push(deindent` get ${x.export_name}() { - throw new Error("<${component.tag}>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"); + throw new @Error("<${component.tag}>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"); } `); } @@ -122,14 +122,14 @@ export default function dom( } else if (component.compile_options.dev) { body.push(deindent` set ${x.export_name}(value) { - throw new Error("<${component.tag}>: Cannot set read-only property '${x.export_name}'"); + throw new @Error("<${component.tag}>: Cannot set read-only property '${x.export_name}'"); } `); } } else if (component.compile_options.dev) { body.push(deindent` set ${x.export_name}(value) { - throw new Error("<${component.tag}>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"); + throw new @Error("<${component.tag}>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"); } `); } @@ -145,7 +145,7 @@ export default function dom( const props = ${options.customElement ? `this.attributes` : `options.props || {}`}; ${expected.map(prop => deindent` if (ctx.${prop.name} === undefined && !('${prop.export_name}' in props)) { - console.warn("<${component.tag}> was created without expected prop '${prop.export_name}'"); + @console.warn("<${component.tag}> was created without expected prop '${prop.export_name}'"); }`)} `; } @@ -402,7 +402,7 @@ export default function dom( if (component.compile_options.dev && !component.var_lookup.has('$$props') && writable_props.length) { unknown_props_check = deindent` const writable_props = [${writable_props.map(prop => `'${prop.export_name}'`).join(', ')}]; - Object.keys($$props).forEach(key => { + @Object.keys($$props).forEach(key => { if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(\`<${component.tag}> was created with unknown prop '\${key}'\`); }); `; diff --git a/src/compiler/compile/render-dom/wrappers/AwaitBlock.ts b/src/compiler/compile/render-dom/wrappers/AwaitBlock.ts index c7af29a073..73ca3fe4f5 100644 --- a/src/compiler/compile/render-dom/wrappers/AwaitBlock.ts +++ b/src/compiler/compile/render-dom/wrappers/AwaitBlock.ts @@ -142,7 +142,7 @@ export default class AwaitBlockWrapper extends Wrapper { this.catch.block.name && `catch: ${this.catch.block.name}`, this.then.block.name && `value: '${this.node.value}'`, this.catch.block.name && `error: '${this.node.error}'`, - this.pending.block.has_outro_method && `blocks: Array(3)` + this.pending.block.has_outro_method && `blocks: [,,,]` ].filter(Boolean); block.builders.init.add_block(deindent` @@ -230,4 +230,4 @@ export default class AwaitBlockWrapper extends Wrapper { branch.fragment.render(branch.block, null, 'nodes'); }); } -} \ No newline at end of file +} diff --git a/src/compiler/compile/render-dom/wrappers/EachBlock.ts b/src/compiler/compile/render-dom/wrappers/EachBlock.ts index a1a875a12f..dddf415557 100644 --- a/src/compiler/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compiler/compile/render-dom/wrappers/EachBlock.ts @@ -190,7 +190,7 @@ export default class EachBlockWrapper extends Wrapper { renderer.blocks.push(deindent` function ${this.vars.get_each_context}(ctx, list, i) { - const child_ctx = Object.create(ctx); + const child_ctx = @Object.create(ctx); ${this.context_props} return child_ctx; } @@ -296,7 +296,7 @@ export default class EachBlockWrapper extends Wrapper { const lookup = block.get_unique_name(`${this.var}_lookup`); block.add_variable(iterations, '[]'); - block.add_variable(lookup, `new Map()`); + block.add_variable(lookup, `new @Map()`); if (this.fragment.nodes[0].is_dom_node()) { this.block.first = this.fragment.nodes[0].var; diff --git a/src/compiler/compile/render-ssr/handlers/InlineComponent.ts b/src/compiler/compile/render-ssr/handlers/InlineComponent.ts index 94fdcfd434..2f407df523 100644 --- a/src/compiler/compile/render-ssr/handlers/InlineComponent.ts +++ b/src/compiler/compile/render-ssr/handlers/InlineComponent.ts @@ -52,7 +52,7 @@ export default function(node: InlineComponent, renderer: Renderer, options: Rend let props; if (uses_spread) { - props = `Object.assign(${ + props = `@Object.assign(${ node.attributes .map(attribute => { if (attribute.is_spread) { diff --git a/src/runtime/internal/globals.ts b/src/runtime/internal/globals.ts new file mode 100644 index 0000000000..91a8e4a16d --- /dev/null +++ b/src/runtime/internal/globals.ts @@ -0,0 +1,5 @@ +import { is_client } from './utils'; + +const { console, Error, Map, Object } = (is_client ? window : global) as { console, Error, Map, Object }; + +export { console, Error, Map, Object }; diff --git a/src/runtime/internal/index.ts b/src/runtime/internal/index.ts index 6487f04525..b5ef3e398e 100644 --- a/src/runtime/internal/index.ts +++ b/src/runtime/internal/index.ts @@ -1,6 +1,7 @@ export * from './animations'; export * from './await-block'; export * from './dom'; +export * from './globals'; export * from './keyed-each'; export * from './lifecycle'; export * from './loop'; diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 152c0e79b0..5766ac26a5 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -90,7 +90,7 @@ export function once(fn) { } } -const is_client = typeof window !== 'undefined'; +export const is_client = typeof window !== 'undefined'; export let now: () => number = is_client ? () => window.performance.now() diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 6f07993590..2e4f9feb13 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -1,8 +1,11 @@ /* generated by Svelte vX.Y.Z */ import { + Error, + Object, SvelteComponentDev, add_location, append, + console, detach, element, init, 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 eea35d5ba7..c083ea29c3 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -1,8 +1,11 @@ /* generated by Svelte vX.Y.Z */ import { + Error, + Object, SvelteComponentDev, add_location, append, + console, destroy_each, detach, element, diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 5b931d9464..46096466c1 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -1,8 +1,11 @@ /* generated by Svelte vX.Y.Z */ import { + Error, + Object, SvelteComponentDev, add_location, append, + console, destroy_each, detach, element, diff --git a/test/js/samples/debug-hoisted/expected.js b/test/js/samples/debug-hoisted/expected.js index 51d8bf63a3..7f1b7535f3 100644 --- a/test/js/samples/debug-hoisted/expected.js +++ b/test/js/samples/debug-hoisted/expected.js @@ -1,5 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { + Error, SvelteComponentDev, init, noop, diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 3294778aa3..85f3c31597 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -1,5 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { + Object, SvelteComponent, append, destroy_each, 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 5c4b2ece1b..d61f8f3de3 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -1,8 +1,11 @@ /* generated by Svelte vX.Y.Z */ import { + Error, + Object, SvelteComponentDev, add_location, append, + console, detach, element, init, diff --git a/test/js/samples/each-block-array-literal/expected.js b/test/js/samples/each-block-array-literal/expected.js index 455cb2f25f..934c5cfe92 100644 --- a/test/js/samples/each-block-array-literal/expected.js +++ b/test/js/samples/each-block-array-literal/expected.js @@ -1,5 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { + Object, SvelteComponent, append, destroy_each, diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index 951565bae4..4ed8756b9a 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -1,5 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { + Object, SvelteComponent, append, destroy_each, diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index ec28e60d5f..9e777f25ee 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -1,5 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { + Map, + Object, SvelteComponent, append, create_animation, diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index efb58ebf6a..7ac66a09a7 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -1,5 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { + Map, + Object, SvelteComponent, append, destroy_block, diff --git a/test/runtime/index.js b/test/runtime/index.js index 77879edc1f..900f3087fc 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -125,6 +125,7 @@ describe("runtime", () => { // Put things we need on window for testing window.SvelteComponent = SvelteComponent; + window.Error = global.Error; const target = window.document.querySelector("main"); From f60ae53d764c6d30a7827d19bc2406796a33fab0 Mon Sep 17 00:00:00 2001 From: mrkishi <mauriciokishi@gmail.com> Date: Thu, 6 Jun 2019 10:29:09 -0300 Subject: [PATCH 265/510] deconflict more globals --- src/compiler/compile/Component.ts | 25 ++++++----- src/compiler/compile/render-dom/Block.ts | 2 +- src/compiler/compile/render-dom/index.ts | 10 +++-- .../compile/render-dom/wrappers/Body.ts | 4 +- .../compile/render-dom/wrappers/DebugTag.ts | 4 +- .../render-dom/wrappers/Element/Binding.ts | 2 +- .../render-dom/wrappers/Element/index.ts | 6 +-- .../compile/render-dom/wrappers/Head.ts | 2 +- .../compile/render-dom/wrappers/IfBlock.ts | 2 +- .../render-dom/wrappers/RawMustacheTag.ts | 2 +- .../compile/render-dom/wrappers/Title.ts | 6 +-- .../compile/render-dom/wrappers/Window.ts | 38 ++++++++--------- .../compile/render-ssr/handlers/Element.ts | 2 +- src/runtime/internal/animations.ts | 2 +- src/runtime/internal/dom.ts | 2 + src/runtime/internal/globals.ts | 42 +++++++++++++++++-- src/runtime/internal/style_manager.ts | 1 + src/runtime/internal/utils.ts | 2 + test/helpers.js | 18 +++++--- test/js/samples/bind-online/expected.js | 4 +- .../expected.js | 1 + test/js/samples/css-media-query/expected.js | 1 + .../css-shadow-dom-keyframes/expected.js | 1 + test/js/samples/debug-hoisted/expected.js | 1 + .../js/samples/head-no-whitespace/expected.js | 1 + test/js/samples/media-bindings/expected.js | 2 + test/js/samples/title/expected.js | 1 + .../samples/window-binding-scroll/expected.js | 5 ++- test/runtime/index.js | 10 +---- .../samples/deconflict-globals/_config.js | 14 +++++++ .../samples/deconflict-globals/main.svelte | 20 +++++++++ test/test.js | 4 ++ 32 files changed, 165 insertions(+), 72 deletions(-) create mode 100644 test/runtime/samples/deconflict-globals/_config.js create mode 100644 test/runtime/samples/deconflict-globals/main.svelte diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 89c1e6b4f6..2ad2e2e428 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -101,7 +101,7 @@ export default class Component { reactive_declaration_nodes: Set<Node> = new Set(); has_reactive_assignments = false; injected_reactive_declaration_vars: Set<string> = new Set(); - helpers: Set<string> = new Set(); + helpers: Map<string, string> = new Map(); indirect_dependencies: Map<string, Set<string>> = new Map(); @@ -233,8 +233,9 @@ export default class Component { } helper(name: string) { - this.helpers.add(name); - return this.alias(name); + const alias = this.alias(name) + this.helpers.set(name, alias); + return alias; } generate(result: string) { @@ -251,23 +252,21 @@ export default class Component { .replace(/__svelte:self__/g, this.name) .replace(compile_options.generate === 'ssr' ? /(@+|#+)(\w*(?:-\w*)?)/g : /(@+)(\w*(?:-\w*)?)/g, (_match: string, sigil: string, name: string) => { if (sigil === '@') { - if (internal_exports.has(name)) { - if (compile_options.dev && internal_exports.has(`${name}Dev`)) name = `${name}Dev`; - this.helpers.add(name); + if (!internal_exports.has(name)) { + throw new Error(`compiler error: this shouldn't happen! generated code is trying to use inexistent internal '${name}'`); + } + + if (compile_options.dev && internal_exports.has(`${name}Dev`)) { + name = `${name}Dev`; } - return this.alias(name); + return this.helper(name); } return sigil.slice(1) + name; }); - const imported_helpers = Array.from(this.helpers) - .sort() - .map(name => { - const alias = this.alias(name); - return { name, alias }; - }); + const imported_helpers = Array.from(this.helpers, ([name, alias]) => ({ name, alias })); const module = create_module( result, diff --git a/src/compiler/compile/render-dom/Block.ts b/src/compiler/compile/render-dom/Block.ts index 0c585c5bf0..15e079ceb9 100644 --- a/src/compiler/compile/render-dom/Block.ts +++ b/src/compiler/compile/render-dom/Block.ts @@ -164,7 +164,7 @@ export default class Block { if (parent_node) { this.builders.mount.add_line(`@append(${parent_node}, ${name});`); - if (parent_node === 'document.head' && !no_detach) this.builders.destroy.add_line(`@detach(${name});`); + if (parent_node === '@document.head' && !no_detach) this.builders.destroy.add_line(`@detach(${name});`); } else { this.builders.mount.add_line(`@insert(#target, ${name}, anchor);`); if (!no_detach) this.builders.destroy.add_conditional('detaching', `@detach(${name});`); diff --git a/src/compiler/compile/render-dom/index.ts b/src/compiler/compile/render-dom/index.ts index a9941b838f..1ba53e7691 100644 --- a/src/compiler/compile/render-dom/index.ts +++ b/src/compiler/compile/render-dom/index.ts @@ -36,13 +36,15 @@ export default function dom( `${css.code}\n/*# sourceMappingURL=${css.map.toUrl()} */` : css.code, { only_escape_at_symbol: true }); + const add_css = component.get_unique_name('add_css'); + if (styles && component.compile_options.css !== false && !options.customElement) { builder.add_block(deindent` - function @add_css() { + function ${add_css}() { var style = @element("style"); style.id = '${component.stylesheet.id}-style'; style.textContent = ${styles}; - @append(document.head, style); + @append(@document.head, style); } `); } @@ -481,7 +483,7 @@ export default function dom( if (component.tag != null) { builder.add_block(deindent` - customElements.define("${component.tag}", ${name}); + @customElements.define("${component.tag}", ${name}); `); } } else { @@ -491,7 +493,7 @@ export default function dom( class ${name} extends @${superclass} { constructor(options) { super(${options.dev && `options`}); - ${should_add_css && `if (!document.getElementById("${component.stylesheet.id}-style")) @add_css();`} + ${should_add_css && `if (!@document.getElementById("${component.stylesheet.id}-style")) ${add_css}();`} @init(this, options, ${definition}, create_fragment, ${not_equal}, ${prop_names}); ${dev_props_check} diff --git a/src/compiler/compile/render-dom/wrappers/Body.ts b/src/compiler/compile/render-dom/wrappers/Body.ts index 04e677a090..feb28ef8f6 100644 --- a/src/compiler/compile/render-dom/wrappers/Body.ts +++ b/src/compiler/compile/render-dom/wrappers/Body.ts @@ -11,11 +11,11 @@ export default class BodyWrapper extends Wrapper { const snippet = handler.render(block); block.builders.init.add_block(deindent` - document.body.addEventListener("${handler.name}", ${snippet}); + @document.body.addEventListener("${handler.name}", ${snippet}); `); block.builders.destroy.add_block(deindent` - document.body.removeEventListener("${handler.name}", ${snippet}); + @document.body.removeEventListener("${handler.name}", ${snippet}); `); }); } diff --git a/src/compiler/compile/render-dom/wrappers/DebugTag.ts b/src/compiler/compile/render-dom/wrappers/DebugTag.ts index 713113921d..a600e26297 100644 --- a/src/compiler/compile/render-dom/wrappers/DebugTag.ts +++ b/src/compiler/compile/render-dom/wrappers/DebugTag.ts @@ -62,7 +62,7 @@ export default class DebugTagWrapper extends Wrapper { block.builders.update.add_block(deindent` if (${condition}) { const { ${ctx_identifiers} } = ctx; - console.${log}({ ${logged_identifiers} }); + @console.${log}({ ${logged_identifiers} }); debugger; } `); @@ -70,7 +70,7 @@ export default class DebugTagWrapper extends Wrapper { block.builders.create.add_block(deindent` { const { ${ctx_identifiers} } = ctx; - console.${log}({ ${logged_identifiers} }); + @console.${log}({ ${logged_identifiers} }); debugger; } `); diff --git a/src/compiler/compile/render-dom/wrappers/Element/Binding.ts b/src/compiler/compile/render-dom/wrappers/Element/Binding.ts index 15ceabb356..dd31278774 100644 --- a/src/compiler/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compiler/compile/render-dom/wrappers/Element/Binding.ts @@ -136,7 +136,7 @@ export default class BindingWrapper { case 'currentTime': case 'playbackRate': case 'volume': - update_conditions.push(`!isNaN(${this.snippet})`); + update_conditions.push(`!@isNaN(${this.snippet})`); break; case 'paused': diff --git a/src/compiler/compile/render-dom/wrappers/Element/index.ts b/src/compiler/compile/render-dom/wrappers/Element/index.ts index 2f7452e8c6..3602ad301d 100644 --- a/src/compiler/compile/render-dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render-dom/wrappers/Element/index.ts @@ -270,7 +270,7 @@ export default class ElementWrapper extends Wrapper { `@append(${parent_node}, ${node});` ); - if (parent_node === 'document.head') { + if (parent_node === '@document.head') { block.builders.destroy.add_line(`@detach(${node});`); } } else { @@ -379,7 +379,7 @@ export default class ElementWrapper extends Wrapper { } if (namespace) { - return `document.createElementNS("${namespace}", "${name}")`; + return `@document.createElementNS("${namespace}", "${name}")`; } return `@element("${name}")`; @@ -465,7 +465,7 @@ export default class ElementWrapper extends Wrapper { block.builders.init.add_block(deindent` function ${handler}() { ${animation_frame && deindent` - cancelAnimationFrame(${animation_frame}); + @cancelAnimationFrame(${animation_frame}); if (!${this.var}.paused) ${animation_frame} = @raf(${handler});`} ${needs_lock && `${lock} = true;`} ctx.${handler}.call(${this.var}${contextual_dependencies.size > 0 ? ', ctx' : ''}); diff --git a/src/compiler/compile/render-dom/wrappers/Head.ts b/src/compiler/compile/render-dom/wrappers/Head.ts index d942a69dc2..794506f1be 100644 --- a/src/compiler/compile/render-dom/wrappers/Head.ts +++ b/src/compiler/compile/render-dom/wrappers/Head.ts @@ -30,6 +30,6 @@ export default class HeadWrapper extends Wrapper { } render(block: Block, _parent_node: string, _parent_nodes: string) { - this.fragment.render(block, 'document.head', 'nodes'); + this.fragment.render(block, '@document.head', 'nodes'); } } diff --git a/src/compiler/compile/render-dom/wrappers/IfBlock.ts b/src/compiler/compile/render-dom/wrappers/IfBlock.ts index 46f17653a1..3634091b99 100644 --- a/src/compiler/compile/render-dom/wrappers/IfBlock.ts +++ b/src/compiler/compile/render-dom/wrappers/IfBlock.ts @@ -154,7 +154,7 @@ export default class IfBlockWrapper extends Wrapper { const vars = { name, anchor, if_name, has_else, has_transitions }; - const detaching = (parent_node && parent_node !== 'document.head') ? '' : 'detaching'; + const detaching = (parent_node && parent_node !== '@document.head') ? '' : 'detaching'; if (this.node.else) { if (has_outros) { diff --git a/src/compiler/compile/render-dom/wrappers/RawMustacheTag.ts b/src/compiler/compile/render-dom/wrappers/RawMustacheTag.ts index 15a7d41861..3f09b134f8 100644 --- a/src/compiler/compile/render-dom/wrappers/RawMustacheTag.ts +++ b/src/compiler/compile/render-dom/wrappers/RawMustacheTag.ts @@ -22,7 +22,7 @@ export default class RawMustacheTagWrapper extends Tag { render(block: Block, parent_node: string, parent_nodes: string) { const name = this.var; - const in_head = parent_node === 'document.head'; + const in_head = parent_node === '@document.head'; const needs_anchors = !parent_node || in_head; // if in head always needs anchors diff --git a/src/compiler/compile/render-dom/wrappers/Title.ts b/src/compiler/compile/render-dom/wrappers/Title.ts index 456a833a8f..c7f702916c 100644 --- a/src/compiler/compile/render-dom/wrappers/Title.ts +++ b/src/compiler/compile/render-dom/wrappers/Title.ts @@ -68,9 +68,9 @@ export default class TitleWrapper extends Wrapper { const init = this.node.should_cache ? `${last} = ${value}` : value; block.builders.init.add_line( - `document.title = ${init};` + `@document.title = ${init};` ); - const updater = `document.title = ${this.node.should_cache ? last : value};`; + const updater = `@document.title = ${this.node.should_cache ? last : value};`; if (all_dependencies.size) { const dependencies = Array.from(all_dependencies); @@ -95,7 +95,7 @@ export default class TitleWrapper extends Wrapper { ? stringify((this.node.children[0] as Text).data) : '""'; - block.builders.hydrate.add_line(`document.title = ${value};`); + block.builders.hydrate.add_line(`@document.title = ${value};`); } } } diff --git a/src/compiler/compile/render-dom/wrappers/Window.ts b/src/compiler/compile/render-dom/wrappers/Window.ts index 585864664a..c267b806c9 100644 --- a/src/compiler/compile/render-dom/wrappers/Window.ts +++ b/src/compiler/compile/render-dom/wrappers/Window.ts @@ -44,8 +44,8 @@ export default class WindowWrapper extends Wrapper { const events = {}; const bindings: Record<string, string> = {}; - add_actions(component, block, 'window', this.node.actions); - add_event_handlers(block, 'window', this.node.handlers); + add_actions(component, block, '@window', this.node.actions); + add_event_handlers(block, '@window', this.node.handlers); this.node.bindings.forEach(binding => { // in dev mode, throw if read-only values are written to @@ -92,29 +92,29 @@ export default class WindowWrapper extends Wrapper { renderer.meta_bindings.add_block(deindent` if (${condition}) { - window.scrollTo(${x || 'window.pageXOffset'}, ${y || 'window.pageYOffset'}); + @window.scrollTo(${x || 'window.pageXOffset'}, ${y || 'window.pageYOffset'}); } - ${x && `${x} = window.pageXOffset;`} - ${y && `${y} = window.pageYOffset;`} + ${x && `${x} = @window.pageXOffset;`} + ${y && `${y} = @window.pageYOffset;`} `); block.event_listeners.push(deindent` - @listen(window, "${event}", () => { + @listen(@window, "${event}", () => { ${scrolling} = true; - clearTimeout(${scrolling_timeout}); - ${scrolling_timeout} = setTimeout(${clear_scrolling}, 100); + @clearTimeout(${scrolling_timeout}); + ${scrolling_timeout} = @setTimeout(${clear_scrolling}, 100); ctx.${handler_name}(); }) `); } else { props.forEach(prop => { renderer.meta_bindings.add_line( - `this._state.${prop.name} = window.${prop.value};` + `this._state.${prop.name} = @window.${prop.value};` ); }); block.event_listeners.push(deindent` - @listen(window, "${event}", ctx.${handler_name}) + @listen(@window, "${event}", ctx.${handler_name}) `); } @@ -126,7 +126,7 @@ export default class WindowWrapper extends Wrapper { component.partly_hoisted.push(deindent` function ${handler_name}() { - ${props.map(prop => `${prop.name} = window.${prop.value}; $$invalidate('${prop.name}', ${prop.name});`)} + ${props.map(prop => `${prop.name} = @window.${prop.value}; $$invalidate('${prop.name}', ${prop.name});`)} } `); @@ -146,13 +146,13 @@ export default class WindowWrapper extends Wrapper { ).join(' || ') } && !${scrolling}) { ${scrolling} = true; - clearTimeout(${scrolling_timeout}); - window.scrollTo(${ - bindings.scrollX ? `ctx.${bindings.scrollX}` : `window.pageXOffset` + @clearTimeout(${scrolling_timeout}); + @window.scrollTo(${ + bindings.scrollX ? `ctx.${bindings.scrollX}` : `@window.pageXOffset` }, ${ - bindings.scrollY ? `ctx.${bindings.scrollY}` : `window.pageYOffset` + bindings.scrollY ? `ctx.${bindings.scrollY}` : `@window.pageYOffset` }); - ${scrolling_timeout} = setTimeout(${clear_scrolling}, 100); + ${scrolling_timeout} = @setTimeout(${clear_scrolling}, 100); } `); } @@ -170,7 +170,7 @@ export default class WindowWrapper extends Wrapper { component.partly_hoisted.push(deindent` function ${handler_name}() { - ${name} = navigator.onLine; $$invalidate('${name}', ${name}); + ${name} = @navigator.onLine; $$invalidate('${name}', ${name}); } `); @@ -179,8 +179,8 @@ export default class WindowWrapper extends Wrapper { `); block.event_listeners.push( - `@listen(window, "online", ctx.${handler_name})`, - `@listen(window, "offline", ctx.${handler_name})` + `@listen(@window, "online", ctx.${handler_name})`, + `@listen(@window, "offline", ctx.${handler_name})` ); component.has_reactive_assignments = true; diff --git a/src/compiler/compile/render-ssr/handlers/Element.ts b/src/compiler/compile/render-ssr/handlers/Element.ts index 681e0d4c7b..637b76aad5 100644 --- a/src/compiler/compile/render-ssr/handlers/Element.ts +++ b/src/compiler/compile/render-ssr/handlers/Element.ts @@ -163,7 +163,7 @@ export default function(node: Element, renderer: Renderer, options: RenderOption node_contents='${(' + snippet + ') || ""}'; } else { const snippet = snip(expression); - opening_tag += ' ${(v => v ? ("' + name + '" + (v === true ? "" : "=" + JSON.stringify(v))) : "")(' + snippet + ')}'; + opening_tag += ' ${(v => v ? ("' + name + '" + (v === true ? "" : "=" + @JSON.stringify(v))) : "")(' + snippet + ')}'; } }); diff --git a/src/runtime/internal/animations.ts b/src/runtime/internal/animations.ts index 77c86aff0e..0997e9ae23 100644 --- a/src/runtime/internal/animations.ts +++ b/src/runtime/internal/animations.ts @@ -2,7 +2,7 @@ import { identity as linear, noop, now } from './utils'; import { loop } from './loop'; import { create_rule, delete_rule } from './style_manager'; import { AnimationConfig } from '../animate'; - +import { getComputedStyle } from './globals'; //todo: documentation says it is DOMRect, but in IE it would be ClientRect type PositionRect = DOMRect|ClientRect; diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index f65d07117c..c1e16de447 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -1,3 +1,5 @@ +import { document, getComputedStyle, navigator } from './globals'; + export function append(target: Node, node: Node) { target.appendChild(node); } diff --git a/src/runtime/internal/globals.ts b/src/runtime/internal/globals.ts index 91a8e4a16d..789290388e 100644 --- a/src/runtime/internal/globals.ts +++ b/src/runtime/internal/globals.ts @@ -1,5 +1,41 @@ -import { is_client } from './utils'; +const { + // ecmascript + Error, + JSON, + Map, + Object, + console, + isNaN, -const { console, Error, Map, Object } = (is_client ? window : global) as { console, Error, Map, Object }; + // dom + cancelAnimationFrame, + clearTimeout, + customElements, + document, + getComputedStyle, + navigator, + requestAnimationFrame, + setTimeout: export_setTimeout, // TODO: remove when upgrading typescript, bug + window: export_window, +} = (window || global) as unknown as typeof globalThis; -export { console, Error, Map, Object }; +export { + // ecmascript + Error, + JSON, + Map, + Object, + console, + isNaN, + + // dom + cancelAnimationFrame, + clearTimeout, + customElements, + document, + getComputedStyle, + navigator, + requestAnimationFrame, + export_setTimeout as setTimeout, + export_window as window, +}; diff --git a/src/runtime/internal/style_manager.ts b/src/runtime/internal/style_manager.ts index 2721200627..db8c0e9d17 100644 --- a/src/runtime/internal/style_manager.ts +++ b/src/runtime/internal/style_manager.ts @@ -1,5 +1,6 @@ import { element } from './dom'; import { raf } from './utils'; +import { document } from './globals'; let stylesheet; let active = 0; diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 5766ac26a5..8624c2246a 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -1,3 +1,5 @@ +import { requestAnimationFrame } from './globals'; + export function noop() {} export const identity = x => x; diff --git a/test/helpers.js b/test/helpers.js index e07d7c9b06..2e6878f8a5 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -28,7 +28,7 @@ export function exists(path) { export function tryToLoadJson(file) { try { - return JSON.parse(fs.readFileSync(file)); + return JSON.parse(fs.readFileSync(file, 'utf-8')); } catch (err) { if (err.code !== 'ENOENT') throw err; return null; @@ -44,14 +44,20 @@ export function tryToReadFile(file) { } } -export const virtualConsole = new jsdom.VirtualConsole(); -const { window } = new jsdom.JSDOM('<main></main>', {virtualConsole}); +const virtualConsole = new jsdom.VirtualConsole(); +virtualConsole.sendTo(console); + +global.window = new jsdom.JSDOM('<main></main>', {virtualConsole}).window; global.document = window.document; -global.getComputedStyle = window.getComputedStyle; -global.navigator = {userAgent: 'fake'}; + +// add missing ecmascript globals to window +for (const key of Object.getOwnPropertyNames(global)) { + window[key] = window[key] || global[key]; +} export function env() { window._svelteTransitionManager = null; + window.document.title = ''; window.document.body.innerHTML = '<main></main>'; return window; @@ -120,7 +126,7 @@ export function normalizeHtml(window, html) { .replace(/<!--.*?-->/g, '') .replace(/>[\s\r\n]+</g, '><') .trim(); - cleanChildren(node, ''); + cleanChildren(node); return node.innerHTML.replace(/<\/?noscript\/?>/g, ''); } catch (err) { throw new Error(`Failed to normalize HTML:\n${html}`); diff --git a/test/js/samples/bind-online/expected.js b/test/js/samples/bind-online/expected.js index 0c9faa3ef6..9c3fdb7385 100644 --- a/test/js/samples/bind-online/expected.js +++ b/test/js/samples/bind-online/expected.js @@ -4,9 +4,11 @@ import { add_render_callback, init, listen, + navigator, noop, run_all, - safe_not_equal + safe_not_equal, + window } from "svelte/internal"; function create_fragment(ctx) { diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index 12164d0579..ed01b6430f 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -3,6 +3,7 @@ import { SvelteComponent, append, detach, + document, element, init, insert, diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index d4be134376..8a99d70e8e 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -3,6 +3,7 @@ import { SvelteComponent, append, detach, + document, element, init, insert, diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index 9f70b8ec66..3be52803d7 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -1,6 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteElement, + customElements, detach, element, init, diff --git a/test/js/samples/debug-hoisted/expected.js b/test/js/samples/debug-hoisted/expected.js index 7f1b7535f3..799f0d4b32 100644 --- a/test/js/samples/debug-hoisted/expected.js +++ b/test/js/samples/debug-hoisted/expected.js @@ -2,6 +2,7 @@ import { Error, SvelteComponentDev, + console, init, noop, safe_not_equal diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index b95177bba7..859891e689 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -3,6 +3,7 @@ import { SvelteComponent, append, detach, + document, element, init, noop, diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index f45f9ce8db..ec30a98161 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -2,10 +2,12 @@ import { SvelteComponent, add_render_callback, + cancelAnimationFrame, detach, element, init, insert, + isNaN, listen, noop, raf, diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js index 884f39e246..2e551ae426 100644 --- a/test/js/samples/title/expected.js +++ b/test/js/samples/title/expected.js @@ -1,6 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, + document, init, noop, safe_not_equal diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 18f5210bea..1e63973518 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -3,6 +3,7 @@ import { SvelteComponent, add_render_callback, append, + clearTimeout, detach, element, init, @@ -10,8 +11,10 @@ import { listen, noop, safe_not_equal, + setTimeout, set_data, - text + text, + window } from "svelte/internal"; function create_fragment(ctx) { diff --git a/test/runtime/index.js b/test/runtime/index.js index 900f3087fc..87be528a61 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -3,7 +3,7 @@ import * as path from "path"; import * as fs from "fs"; import { rollup } from 'rollup'; import * as virtual from 'rollup-plugin-virtual'; -import { clear_loops, set_now, set_raf } from "../../internal"; +import { clear_loops, flush, set_now, set_raf } from "../../internal"; import { showOutput, @@ -20,7 +20,6 @@ let compileOptions = null; let compile = null; const sveltePath = process.cwd().split('\\').join('/'); -const internal = `${sveltePath}/internal`; describe("runtime", () => { before(() => { @@ -47,8 +46,6 @@ describe("runtime", () => { function runTest(dir, hydrate) { if (dir[0] === ".") return; - const { flush } = require(internal); - const config = loadConfig(`./runtime/samples/${dir}/_config.js`); if (hydrate && config.skip_if_hydrate) return; @@ -66,7 +63,6 @@ describe("runtime", () => { compile = (config.preserveIdentifiers ? svelte : svelte$).compile; const cwd = path.resolve(`test/runtime/samples/${dir}`); - global.document.title = ''; compileOptions = config.compileOptions || {}; compileOptions.sveltePath = sveltePath; @@ -119,13 +115,10 @@ describe("runtime", () => { throw err; } - global.window = window; - if (config.before_test) config.before_test(); // Put things we need on window for testing window.SvelteComponent = SvelteComponent; - window.Error = global.Error; const target = window.document.querySelector("main"); @@ -222,6 +215,7 @@ describe("runtime", () => { 'main.js': js.code }), { + name: 'svelte-packages', resolveId: (importee, importer) => { if (importee.startsWith('svelte/')) { return importee.replace('svelte', process.cwd()) + '/index.mjs'; diff --git a/test/runtime/samples/deconflict-globals/_config.js b/test/runtime/samples/deconflict-globals/_config.js new file mode 100644 index 0000000000..c29f022a37 --- /dev/null +++ b/test/runtime/samples/deconflict-globals/_config.js @@ -0,0 +1,14 @@ +export default { + preserveIdentifiers: true, + compileOptions: { + name: 'window' + }, + + html: ` + <p>I hereby declare Svelte the bestest framework.</p> + <p>nintendo sixty four</p> + <p>Woops.</p> + <p>42</p> + <p>false</p> + ` +}; diff --git a/test/runtime/samples/deconflict-globals/main.svelte b/test/runtime/samples/deconflict-globals/main.svelte new file mode 100644 index 0000000000..d1928ea533 --- /dev/null +++ b/test/runtime/samples/deconflict-globals/main.svelte @@ -0,0 +1,20 @@ +<script> + const document = 'I hereby declare Svelte the bestest framework.'; + const console = 'nintendo sixty four'; + const Error = 'Woops.'; + const Object = 42; + const Map = false; + + const everyone = [document, console, Error, Object, Map]; +</script> + +<svelte:head> + <title>Cute test + + + + + +{#each everyone as someone (someone)} +

    {someone}

    +{/each} diff --git a/test/test.js b/test/test.js index 7759941dbb..cb89b3e9d1 100644 --- a/test/test.js +++ b/test/test.js @@ -2,6 +2,10 @@ const glob = require("tiny-glob/sync.js"); require("./setup"); +// bind internal to jsdom +require("./helpers"); +require("../internal"); + glob("*/index.{js,ts}", { cwd: "test" }).forEach((file) => { require("./" + file); }); From 788cf97a93343b7f80985ba4e31dd67312786d8f Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 9 Jun 2019 11:27:03 -0400 Subject: [PATCH 266/510] prevent compiled output blowing up in Node if window is not defined --- src/runtime/internal/globals.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/runtime/internal/globals.ts b/src/runtime/internal/globals.ts index 789290388e..314f17dfeb 100644 --- a/src/runtime/internal/globals.ts +++ b/src/runtime/internal/globals.ts @@ -1,3 +1,5 @@ +const win = typeof window !== 'undefined' ? window : global; + const { // ecmascript Error, @@ -15,9 +17,8 @@ const { getComputedStyle, navigator, requestAnimationFrame, - setTimeout: export_setTimeout, // TODO: remove when upgrading typescript, bug - window: export_window, -} = (window || global) as unknown as typeof globalThis; + setTimeout: export_setTimeout // TODO: remove when upgrading typescript, bug +} = win as unknown as typeof globalThis; export { // ecmascript @@ -37,5 +38,5 @@ export { navigator, requestAnimationFrame, export_setTimeout as setTimeout, - export_window as window, + win as window, }; From cd4c2f2075bbf720f630cfa74b29b65997b27a27 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Wed, 12 Jun 2019 21:09:42 -0400 Subject: [PATCH 267/510] use `@_` sigil for globals --- src/compiler/compile/Component.ts | 16 +++++++ src/compiler/compile/create_module.ts | 15 ++++++- src/compiler/compile/render-dom/Block.ts | 2 +- src/compiler/compile/render-dom/index.ts | 18 ++++---- .../compile/render-dom/wrappers/Body.ts | 4 +- .../compile/render-dom/wrappers/DebugTag.ts | 4 +- .../compile/render-dom/wrappers/EachBlock.ts | 4 +- .../render-dom/wrappers/Element/Binding.ts | 2 +- .../render-dom/wrappers/Element/index.ts | 6 +-- .../compile/render-dom/wrappers/Head.ts | 2 +- .../compile/render-dom/wrappers/IfBlock.ts | 2 +- .../render-dom/wrappers/RawMustacheTag.ts | 2 +- .../compile/render-dom/wrappers/Title.ts | 6 +-- .../compile/render-dom/wrappers/Window.ts | 38 ++++++++-------- .../compile/render-ssr/handlers/Element.ts | 2 +- .../render-ssr/handlers/InlineComponent.ts | 2 +- src/runtime/internal/animations.ts | 2 +- src/runtime/internal/dom.ts | 2 - src/runtime/internal/globals.ts | 43 +------------------ src/runtime/internal/style_manager.ts | 1 - src/runtime/internal/utils.ts | 2 - 21 files changed, 78 insertions(+), 97 deletions(-) diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 2ad2e2e428..c4924697f8 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -102,6 +102,7 @@ export default class Component { has_reactive_assignments = false; injected_reactive_declaration_vars: Set = new Set(); helpers: Map = new Map(); + globals: Map = new Map(); indirect_dependencies: Map> = new Map(); @@ -238,6 +239,12 @@ export default class Component { return alias; } + global(name: string) { + const alias = this.alias(name); + this.globals.set(name, alias); + return alias; + } + generate(result: string) { let js = null; let css = null; @@ -252,6 +259,10 @@ export default class Component { .replace(/__svelte:self__/g, this.name) .replace(compile_options.generate === 'ssr' ? /(@+|#+)(\w*(?:-\w*)?)/g : /(@+)(\w*(?:-\w*)?)/g, (_match: string, sigil: string, name: string) => { if (sigil === '@') { + if (name[0] === '_') { + return this.global(name.slice(1)); + } + if (!internal_exports.has(name)) { throw new Error(`compiler error: this shouldn't happen! generated code is trying to use inexistent internal '${name}'`); } @@ -266,6 +277,10 @@ export default class Component { return sigil.slice(1) + name; }); + const referenced_globals = Array.from(this.globals, ([name, alias]) => name !== alias && ({ name, alias })).filter(Boolean); + if (referenced_globals.length) { + this.helper('globals'); + } const imported_helpers = Array.from(this.helpers, ([name, alias]) => ({ name, alias })); const module = create_module( @@ -275,6 +290,7 @@ export default class Component { banner, compile_options.sveltePath, imported_helpers, + referenced_globals, this.imports, this.vars.filter(variable => variable.module && variable.export_name).map(variable => ({ name: variable.name, diff --git a/src/compiler/compile/create_module.ts b/src/compiler/compile/create_module.ts index 54b891d4ac..79cb33549c 100644 --- a/src/compiler/compile/create_module.ts +++ b/src/compiler/compile/create_module.ts @@ -17,6 +17,7 @@ export default function create_module( banner: string, sveltePath = 'svelte', helpers: Array<{ name: string; alias: string }>, + globals: Array<{ name: string; alias: string }>, imports: Node[], module_exports: Export[], source: string @@ -24,10 +25,10 @@ export default function create_module( const internal_path = `${sveltePath}/internal`; if (format === 'esm') { - return esm(code, name, banner, sveltePath, internal_path, helpers, imports, module_exports, source); + return esm(code, name, banner, sveltePath, internal_path, helpers, globals, imports, module_exports, source); } - if (format === 'cjs') return cjs(code, name, banner, sveltePath, internal_path, helpers, imports, module_exports); + if (format === 'cjs') return cjs(code, name, banner, sveltePath, internal_path, helpers, globals, imports, module_exports); throw new Error(`options.format is invalid (must be ${list(Object.keys(wrappers))})`); } @@ -45,6 +46,7 @@ function esm( sveltePath: string, internal_path: string, helpers: Array<{ name: string; alias: string }>, + globals: Array<{ name: string; alias: string }>, imports: Node[], module_exports: Export[], source: string @@ -52,6 +54,9 @@ function esm( const internal_imports = helpers.length > 0 && ( `import ${stringify_props(helpers.map(h => h.name === h.alias ? h.name : `${h.name} as ${h.alias}`).sort())} from ${JSON.stringify(internal_path)};` ); + const internal_globals = globals.length > 0 && ( + `const ${stringify_props(globals.map(g => `${g.name}: ${g.alias}`).sort())} = ${helpers.find(({ name }) => name === 'globals').alias};` + ); const user_imports = imports.length > 0 && ( imports @@ -70,6 +75,7 @@ function esm( return deindent` ${banner} ${internal_imports} + ${internal_globals} ${user_imports} ${code} @@ -85,6 +91,7 @@ function cjs( sveltePath: string, internal_path: string, helpers: Array<{ name: string; alias: string }>, + globals: Array<{ name: string; alias: string }>, imports: Node[], module_exports: Export[] ) { @@ -93,6 +100,9 @@ function cjs( const internal_imports = helpers.length > 0 && ( `const ${stringify_props(declarations)} = require(${JSON.stringify(internal_path)});\n` ); + const internal_globals = globals.length > 0 && ( + `const ${stringify_props(globals.map(g => `${g.name}: ${g.alias}`).sort())} = ${helpers.find(({ name }) => name === 'globals').alias};` + ); const requires = imports.map(node => { let lhs; @@ -127,6 +137,7 @@ function cjs( "use strict"; ${internal_imports} + ${internal_globals} ${requires} ${code} diff --git a/src/compiler/compile/render-dom/Block.ts b/src/compiler/compile/render-dom/Block.ts index 15e079ceb9..d7986e167b 100644 --- a/src/compiler/compile/render-dom/Block.ts +++ b/src/compiler/compile/render-dom/Block.ts @@ -164,7 +164,7 @@ export default class Block { if (parent_node) { this.builders.mount.add_line(`@append(${parent_node}, ${name});`); - if (parent_node === '@document.head' && !no_detach) this.builders.destroy.add_line(`@detach(${name});`); + if (parent_node === '@_document.head' && !no_detach) this.builders.destroy.add_line(`@detach(${name});`); } else { this.builders.mount.add_line(`@insert(#target, ${name}, anchor);`); if (!no_detach) this.builders.destroy.add_conditional('detaching', `@detach(${name});`); diff --git a/src/compiler/compile/render-dom/index.ts b/src/compiler/compile/render-dom/index.ts index 1ba53e7691..3dec1a81b3 100644 --- a/src/compiler/compile/render-dom/index.ts +++ b/src/compiler/compile/render-dom/index.ts @@ -44,7 +44,7 @@ export default function dom( var style = @element("style"); style.id = '${component.stylesheet.id}-style'; style.textContent = ${styles}; - @append(@document.head, style); + @append(@_document.head, style); } `); } @@ -59,7 +59,7 @@ export default function dom( if (options.dev && !options.hydratable) { block.builders.claim.add_line( - 'throw new @Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");' + 'throw new @_Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");' ); } @@ -108,7 +108,7 @@ export default function dom( } else if (component.compile_options.dev) { body.push(deindent` get ${x.export_name}() { - throw new @Error("<${component.tag}>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + throw new @_Error("<${component.tag}>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); } `); } @@ -124,14 +124,14 @@ export default function dom( } else if (component.compile_options.dev) { body.push(deindent` set ${x.export_name}(value) { - throw new @Error("<${component.tag}>: Cannot set read-only property '${x.export_name}'"); + throw new @_Error("<${component.tag}>: Cannot set read-only property '${x.export_name}'"); } `); } } else if (component.compile_options.dev) { body.push(deindent` set ${x.export_name}(value) { - throw new @Error("<${component.tag}>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + throw new @_Error("<${component.tag}>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); } `); } @@ -147,7 +147,7 @@ export default function dom( const props = ${options.customElement ? `this.attributes` : `options.props || {}`}; ${expected.map(prop => deindent` if (ctx.${prop.name} === undefined && !('${prop.export_name}' in props)) { - @console.warn("<${component.tag}> was created without expected prop '${prop.export_name}'"); + @_console.warn("<${component.tag}> was created without expected prop '${prop.export_name}'"); }`)} `; } @@ -404,7 +404,7 @@ export default function dom( if (component.compile_options.dev && !component.var_lookup.has('$$props') && writable_props.length) { unknown_props_check = deindent` const writable_props = [${writable_props.map(prop => `'${prop.export_name}'`).join(', ')}]; - @Object.keys($$props).forEach(key => { + @_Object.keys($$props).forEach(key => { if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(\`<${component.tag}> was created with unknown prop '\${key}'\`); }); `; @@ -483,7 +483,7 @@ export default function dom( if (component.tag != null) { builder.add_block(deindent` - @customElements.define("${component.tag}", ${name}); + @_customElements.define("${component.tag}", ${name}); `); } } else { @@ -493,7 +493,7 @@ export default function dom( class ${name} extends @${superclass} { constructor(options) { super(${options.dev && `options`}); - ${should_add_css && `if (!@document.getElementById("${component.stylesheet.id}-style")) ${add_css}();`} + ${should_add_css && `if (!@_document.getElementById("${component.stylesheet.id}-style")) ${add_css}();`} @init(this, options, ${definition}, create_fragment, ${not_equal}, ${prop_names}); ${dev_props_check} diff --git a/src/compiler/compile/render-dom/wrappers/Body.ts b/src/compiler/compile/render-dom/wrappers/Body.ts index feb28ef8f6..623625ce6d 100644 --- a/src/compiler/compile/render-dom/wrappers/Body.ts +++ b/src/compiler/compile/render-dom/wrappers/Body.ts @@ -11,11 +11,11 @@ export default class BodyWrapper extends Wrapper { const snippet = handler.render(block); block.builders.init.add_block(deindent` - @document.body.addEventListener("${handler.name}", ${snippet}); + @_document.body.addEventListener("${handler.name}", ${snippet}); `); block.builders.destroy.add_block(deindent` - @document.body.removeEventListener("${handler.name}", ${snippet}); + @_document.body.removeEventListener("${handler.name}", ${snippet}); `); }); } diff --git a/src/compiler/compile/render-dom/wrappers/DebugTag.ts b/src/compiler/compile/render-dom/wrappers/DebugTag.ts index a600e26297..6705b51cc5 100644 --- a/src/compiler/compile/render-dom/wrappers/DebugTag.ts +++ b/src/compiler/compile/render-dom/wrappers/DebugTag.ts @@ -62,7 +62,7 @@ export default class DebugTagWrapper extends Wrapper { block.builders.update.add_block(deindent` if (${condition}) { const { ${ctx_identifiers} } = ctx; - @console.${log}({ ${logged_identifiers} }); + @_console.${log}({ ${logged_identifiers} }); debugger; } `); @@ -70,7 +70,7 @@ export default class DebugTagWrapper extends Wrapper { block.builders.create.add_block(deindent` { const { ${ctx_identifiers} } = ctx; - @console.${log}({ ${logged_identifiers} }); + @_console.${log}({ ${logged_identifiers} }); debugger; } `); diff --git a/src/compiler/compile/render-dom/wrappers/EachBlock.ts b/src/compiler/compile/render-dom/wrappers/EachBlock.ts index dddf415557..3ce2a342a3 100644 --- a/src/compiler/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compiler/compile/render-dom/wrappers/EachBlock.ts @@ -190,7 +190,7 @@ export default class EachBlockWrapper extends Wrapper { renderer.blocks.push(deindent` function ${this.vars.get_each_context}(ctx, list, i) { - const child_ctx = @Object.create(ctx); + const child_ctx = @_Object.create(ctx); ${this.context_props} return child_ctx; } @@ -296,7 +296,7 @@ export default class EachBlockWrapper extends Wrapper { const lookup = block.get_unique_name(`${this.var}_lookup`); block.add_variable(iterations, '[]'); - block.add_variable(lookup, `new @Map()`); + block.add_variable(lookup, `new @_Map()`); if (this.fragment.nodes[0].is_dom_node()) { this.block.first = this.fragment.nodes[0].var; diff --git a/src/compiler/compile/render-dom/wrappers/Element/Binding.ts b/src/compiler/compile/render-dom/wrappers/Element/Binding.ts index dd31278774..5b1fe6dee1 100644 --- a/src/compiler/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compiler/compile/render-dom/wrappers/Element/Binding.ts @@ -136,7 +136,7 @@ export default class BindingWrapper { case 'currentTime': case 'playbackRate': case 'volume': - update_conditions.push(`!@isNaN(${this.snippet})`); + update_conditions.push(`!@_isNaN(${this.snippet})`); break; case 'paused': diff --git a/src/compiler/compile/render-dom/wrappers/Element/index.ts b/src/compiler/compile/render-dom/wrappers/Element/index.ts index 3602ad301d..1b19281461 100644 --- a/src/compiler/compile/render-dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render-dom/wrappers/Element/index.ts @@ -270,7 +270,7 @@ export default class ElementWrapper extends Wrapper { `@append(${parent_node}, ${node});` ); - if (parent_node === '@document.head') { + if (parent_node === '@_document.head') { block.builders.destroy.add_line(`@detach(${node});`); } } else { @@ -379,7 +379,7 @@ export default class ElementWrapper extends Wrapper { } if (namespace) { - return `@document.createElementNS("${namespace}", "${name}")`; + return `@_document.createElementNS("${namespace}", "${name}")`; } return `@element("${name}")`; @@ -465,7 +465,7 @@ export default class ElementWrapper extends Wrapper { block.builders.init.add_block(deindent` function ${handler}() { ${animation_frame && deindent` - @cancelAnimationFrame(${animation_frame}); + @_cancelAnimationFrame(${animation_frame}); if (!${this.var}.paused) ${animation_frame} = @raf(${handler});`} ${needs_lock && `${lock} = true;`} ctx.${handler}.call(${this.var}${contextual_dependencies.size > 0 ? ', ctx' : ''}); diff --git a/src/compiler/compile/render-dom/wrappers/Head.ts b/src/compiler/compile/render-dom/wrappers/Head.ts index 794506f1be..a5226e7efa 100644 --- a/src/compiler/compile/render-dom/wrappers/Head.ts +++ b/src/compiler/compile/render-dom/wrappers/Head.ts @@ -30,6 +30,6 @@ export default class HeadWrapper extends Wrapper { } render(block: Block, _parent_node: string, _parent_nodes: string) { - this.fragment.render(block, '@document.head', 'nodes'); + this.fragment.render(block, '@_document.head', 'nodes'); } } diff --git a/src/compiler/compile/render-dom/wrappers/IfBlock.ts b/src/compiler/compile/render-dom/wrappers/IfBlock.ts index 3634091b99..bce4743488 100644 --- a/src/compiler/compile/render-dom/wrappers/IfBlock.ts +++ b/src/compiler/compile/render-dom/wrappers/IfBlock.ts @@ -154,7 +154,7 @@ export default class IfBlockWrapper extends Wrapper { const vars = { name, anchor, if_name, has_else, has_transitions }; - const detaching = (parent_node && parent_node !== '@document.head') ? '' : 'detaching'; + const detaching = (parent_node && parent_node !== '@_document.head') ? '' : 'detaching'; if (this.node.else) { if (has_outros) { diff --git a/src/compiler/compile/render-dom/wrappers/RawMustacheTag.ts b/src/compiler/compile/render-dom/wrappers/RawMustacheTag.ts index 3f09b134f8..f85c48935e 100644 --- a/src/compiler/compile/render-dom/wrappers/RawMustacheTag.ts +++ b/src/compiler/compile/render-dom/wrappers/RawMustacheTag.ts @@ -22,7 +22,7 @@ export default class RawMustacheTagWrapper extends Tag { render(block: Block, parent_node: string, parent_nodes: string) { const name = this.var; - const in_head = parent_node === '@document.head'; + const in_head = parent_node === '@_document.head'; const needs_anchors = !parent_node || in_head; // if in head always needs anchors diff --git a/src/compiler/compile/render-dom/wrappers/Title.ts b/src/compiler/compile/render-dom/wrappers/Title.ts index c7f702916c..302c9f1aa9 100644 --- a/src/compiler/compile/render-dom/wrappers/Title.ts +++ b/src/compiler/compile/render-dom/wrappers/Title.ts @@ -68,9 +68,9 @@ export default class TitleWrapper extends Wrapper { const init = this.node.should_cache ? `${last} = ${value}` : value; block.builders.init.add_line( - `@document.title = ${init};` + `@_document.title = ${init};` ); - const updater = `@document.title = ${this.node.should_cache ? last : value};`; + const updater = `@_document.title = ${this.node.should_cache ? last : value};`; if (all_dependencies.size) { const dependencies = Array.from(all_dependencies); @@ -95,7 +95,7 @@ export default class TitleWrapper extends Wrapper { ? stringify((this.node.children[0] as Text).data) : '""'; - block.builders.hydrate.add_line(`@document.title = ${value};`); + block.builders.hydrate.add_line(`@_document.title = ${value};`); } } } diff --git a/src/compiler/compile/render-dom/wrappers/Window.ts b/src/compiler/compile/render-dom/wrappers/Window.ts index c267b806c9..8c8e6c623d 100644 --- a/src/compiler/compile/render-dom/wrappers/Window.ts +++ b/src/compiler/compile/render-dom/wrappers/Window.ts @@ -44,8 +44,8 @@ export default class WindowWrapper extends Wrapper { const events = {}; const bindings: Record = {}; - add_actions(component, block, '@window', this.node.actions); - add_event_handlers(block, '@window', this.node.handlers); + add_actions(component, block, '@_window', this.node.actions); + add_event_handlers(block, '@_window', this.node.handlers); this.node.bindings.forEach(binding => { // in dev mode, throw if read-only values are written to @@ -92,29 +92,29 @@ export default class WindowWrapper extends Wrapper { renderer.meta_bindings.add_block(deindent` if (${condition}) { - @window.scrollTo(${x || 'window.pageXOffset'}, ${y || 'window.pageYOffset'}); + @_scrollTo(${x || '@_pageXOffset'}, ${y || '@pageYOffset'}); } - ${x && `${x} = @window.pageXOffset;`} - ${y && `${y} = @window.pageYOffset;`} + ${x && `${x} = @_pageXOffset;`} + ${y && `${y} = @_pageYOffset;`} `); block.event_listeners.push(deindent` - @listen(@window, "${event}", () => { + @listen(@_window, "${event}", () => { ${scrolling} = true; - @clearTimeout(${scrolling_timeout}); - ${scrolling_timeout} = @setTimeout(${clear_scrolling}, 100); + @_clearTimeout(${scrolling_timeout}); + ${scrolling_timeout} = @_setTimeout(${clear_scrolling}, 100); ctx.${handler_name}(); }) `); } else { props.forEach(prop => { renderer.meta_bindings.add_line( - `this._state.${prop.name} = @window.${prop.value};` + `this._state.${prop.name} = @_window.${prop.value};` ); }); block.event_listeners.push(deindent` - @listen(@window, "${event}", ctx.${handler_name}) + @listen(@_window, "${event}", ctx.${handler_name}) `); } @@ -126,7 +126,7 @@ export default class WindowWrapper extends Wrapper { component.partly_hoisted.push(deindent` function ${handler_name}() { - ${props.map(prop => `${prop.name} = @window.${prop.value}; $$invalidate('${prop.name}', ${prop.name});`)} + ${props.map(prop => `${prop.name} = @_window.${prop.value}; $$invalidate('${prop.name}', ${prop.name});`)} } `); @@ -146,13 +146,13 @@ export default class WindowWrapper extends Wrapper { ).join(' || ') } && !${scrolling}) { ${scrolling} = true; - @clearTimeout(${scrolling_timeout}); - @window.scrollTo(${ - bindings.scrollX ? `ctx.${bindings.scrollX}` : `@window.pageXOffset` + @_clearTimeout(${scrolling_timeout}); + @_scrollTo(${ + bindings.scrollX ? `ctx.${bindings.scrollX}` : `@_pageXOffset` }, ${ - bindings.scrollY ? `ctx.${bindings.scrollY}` : `@window.pageYOffset` + bindings.scrollY ? `ctx.${bindings.scrollY}` : `@_pageYOffset` }); - ${scrolling_timeout} = @setTimeout(${clear_scrolling}, 100); + ${scrolling_timeout} = @_setTimeout(${clear_scrolling}, 100); } `); } @@ -170,7 +170,7 @@ export default class WindowWrapper extends Wrapper { component.partly_hoisted.push(deindent` function ${handler_name}() { - ${name} = @navigator.onLine; $$invalidate('${name}', ${name}); + ${name} = @_navigator.onLine; $$invalidate('${name}', ${name}); } `); @@ -179,8 +179,8 @@ export default class WindowWrapper extends Wrapper { `); block.event_listeners.push( - `@listen(@window, "online", ctx.${handler_name})`, - `@listen(@window, "offline", ctx.${handler_name})` + `@listen(@_window, "online", ctx.${handler_name})`, + `@listen(@_window, "offline", ctx.${handler_name})` ); component.has_reactive_assignments = true; diff --git a/src/compiler/compile/render-ssr/handlers/Element.ts b/src/compiler/compile/render-ssr/handlers/Element.ts index 637b76aad5..78b95075b2 100644 --- a/src/compiler/compile/render-ssr/handlers/Element.ts +++ b/src/compiler/compile/render-ssr/handlers/Element.ts @@ -163,7 +163,7 @@ export default function(node: Element, renderer: Renderer, options: RenderOption node_contents='${(' + snippet + ') || ""}'; } else { const snippet = snip(expression); - opening_tag += ' ${(v => v ? ("' + name + '" + (v === true ? "" : "=" + @JSON.stringify(v))) : "")(' + snippet + ')}'; + opening_tag += ' ${(v => v ? ("' + name + '" + (v === true ? "" : "=" + @_JSON.stringify(v))) : "")(' + snippet + ')}'; } }); diff --git a/src/compiler/compile/render-ssr/handlers/InlineComponent.ts b/src/compiler/compile/render-ssr/handlers/InlineComponent.ts index 2f407df523..320bf5e6a0 100644 --- a/src/compiler/compile/render-ssr/handlers/InlineComponent.ts +++ b/src/compiler/compile/render-ssr/handlers/InlineComponent.ts @@ -52,7 +52,7 @@ export default function(node: InlineComponent, renderer: Renderer, options: Rend let props; if (uses_spread) { - props = `@Object.assign(${ + props = `@_Object.assign(${ node.attributes .map(attribute => { if (attribute.is_spread) { diff --git a/src/runtime/internal/animations.ts b/src/runtime/internal/animations.ts index 0997e9ae23..77c86aff0e 100644 --- a/src/runtime/internal/animations.ts +++ b/src/runtime/internal/animations.ts @@ -2,7 +2,7 @@ import { identity as linear, noop, now } from './utils'; import { loop } from './loop'; import { create_rule, delete_rule } from './style_manager'; import { AnimationConfig } from '../animate'; -import { getComputedStyle } from './globals'; + //todo: documentation says it is DOMRect, but in IE it would be ClientRect type PositionRect = DOMRect|ClientRect; diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index c1e16de447..f65d07117c 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -1,5 +1,3 @@ -import { document, getComputedStyle, navigator } from './globals'; - export function append(target: Node, node: Node) { target.appendChild(node); } diff --git a/src/runtime/internal/globals.ts b/src/runtime/internal/globals.ts index 314f17dfeb..2f189d0c0a 100644 --- a/src/runtime/internal/globals.ts +++ b/src/runtime/internal/globals.ts @@ -1,42 +1 @@ -const win = typeof window !== 'undefined' ? window : global; - -const { - // ecmascript - Error, - JSON, - Map, - Object, - console, - isNaN, - - // dom - cancelAnimationFrame, - clearTimeout, - customElements, - document, - getComputedStyle, - navigator, - requestAnimationFrame, - setTimeout: export_setTimeout // TODO: remove when upgrading typescript, bug -} = win as unknown as typeof globalThis; - -export { - // ecmascript - Error, - JSON, - Map, - Object, - console, - isNaN, - - // dom - cancelAnimationFrame, - clearTimeout, - customElements, - document, - getComputedStyle, - navigator, - requestAnimationFrame, - export_setTimeout as setTimeout, - win as window, -}; +export const globals = (typeof window !== 'undefined' ? window : global) as unknown as typeof globalThis; diff --git a/src/runtime/internal/style_manager.ts b/src/runtime/internal/style_manager.ts index db8c0e9d17..2721200627 100644 --- a/src/runtime/internal/style_manager.ts +++ b/src/runtime/internal/style_manager.ts @@ -1,6 +1,5 @@ import { element } from './dom'; import { raf } from './utils'; -import { document } from './globals'; let stylesheet; let active = 0; diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 8624c2246a..5766ac26a5 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -1,5 +1,3 @@ -import { requestAnimationFrame } from './globals'; - export function noop() {} export const identity = x => x; From e5d4162092d5a9560ed957d183759cbb1b49135a Mon Sep 17 00:00:00 2001 From: Conduitry Date: Wed, 12 Jun 2019 21:10:25 -0400 Subject: [PATCH 268/510] update tests --- test/helpers.js | 1 + test/js/samples/bind-online/expected.js | 4 +--- test/js/samples/collapses-text-around-comments/expected.js | 1 - test/js/samples/css-media-query/expected.js | 1 - test/js/samples/css-shadow-dom-keyframes/expected.js | 1 - test/js/samples/debug-empty/expected.js | 3 --- test/js/samples/debug-foo-bar-baz-things/expected.js | 3 --- test/js/samples/debug-foo/expected.js | 3 --- test/js/samples/debug-hoisted/expected.js | 2 -- test/js/samples/deconflict-builtins/expected.js | 1 - .../samples/dev-warning-missing-data-computed/expected.js | 3 --- test/js/samples/each-block-array-literal/expected.js | 1 - test/js/samples/each-block-changed-check/expected.js | 1 - test/js/samples/each-block-keyed-animated/expected.js | 2 -- test/js/samples/each-block-keyed/expected.js | 2 -- test/js/samples/head-no-whitespace/expected.js | 1 - test/js/samples/media-bindings/expected.js | 2 -- test/js/samples/title/expected.js | 1 - test/js/samples/window-binding-scroll/expected.js | 7 ++----- 19 files changed, 4 insertions(+), 36 deletions(-) diff --git a/test/helpers.js b/test/helpers.js index 2e6878f8a5..514d084698 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -49,6 +49,7 @@ virtualConsole.sendTo(console); global.window = new jsdom.JSDOM('
    ', {virtualConsole}).window; global.document = window.document; +global.requestAnimationFrame = null; // placeholder, filled in using set_raf // add missing ecmascript globals to window for (const key of Object.getOwnPropertyNames(global)) { diff --git a/test/js/samples/bind-online/expected.js b/test/js/samples/bind-online/expected.js index 9c3fdb7385..0c9faa3ef6 100644 --- a/test/js/samples/bind-online/expected.js +++ b/test/js/samples/bind-online/expected.js @@ -4,11 +4,9 @@ import { add_render_callback, init, listen, - navigator, noop, run_all, - safe_not_equal, - window + safe_not_equal } from "svelte/internal"; function create_fragment(ctx) { diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index ed01b6430f..12164d0579 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -3,7 +3,6 @@ import { SvelteComponent, append, detach, - document, element, init, insert, diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index 8a99d70e8e..d4be134376 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -3,7 +3,6 @@ import { SvelteComponent, append, detach, - document, element, init, insert, diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index 3be52803d7..9f70b8ec66 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -1,7 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { SvelteElement, - customElements, detach, element, init, diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 2e4f9feb13..6f07993590 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -1,11 +1,8 @@ /* generated by Svelte vX.Y.Z */ import { - Error, - Object, SvelteComponentDev, add_location, append, - console, detach, element, init, 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 c083ea29c3..eea35d5ba7 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -1,11 +1,8 @@ /* generated by Svelte vX.Y.Z */ import { - Error, - Object, SvelteComponentDev, add_location, append, - console, destroy_each, detach, element, diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 46096466c1..5b931d9464 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -1,11 +1,8 @@ /* generated by Svelte vX.Y.Z */ import { - Error, - Object, SvelteComponentDev, add_location, append, - console, destroy_each, detach, element, diff --git a/test/js/samples/debug-hoisted/expected.js b/test/js/samples/debug-hoisted/expected.js index 799f0d4b32..51d8bf63a3 100644 --- a/test/js/samples/debug-hoisted/expected.js +++ b/test/js/samples/debug-hoisted/expected.js @@ -1,8 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { - Error, SvelteComponentDev, - console, init, noop, safe_not_equal diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 85f3c31597..3294778aa3 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -1,6 +1,5 @@ /* generated by Svelte vX.Y.Z */ import { - Object, SvelteComponent, append, destroy_each, 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 d61f8f3de3..5c4b2ece1b 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -1,11 +1,8 @@ /* generated by Svelte vX.Y.Z */ import { - Error, - Object, SvelteComponentDev, add_location, append, - console, detach, element, init, diff --git a/test/js/samples/each-block-array-literal/expected.js b/test/js/samples/each-block-array-literal/expected.js index 934c5cfe92..455cb2f25f 100644 --- a/test/js/samples/each-block-array-literal/expected.js +++ b/test/js/samples/each-block-array-literal/expected.js @@ -1,6 +1,5 @@ /* generated by Svelte vX.Y.Z */ import { - Object, SvelteComponent, append, destroy_each, diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index 4ed8756b9a..951565bae4 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -1,6 +1,5 @@ /* generated by Svelte vX.Y.Z */ import { - Object, SvelteComponent, append, destroy_each, diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index 9e777f25ee..ec28e60d5f 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -1,7 +1,5 @@ /* generated by Svelte vX.Y.Z */ import { - Map, - Object, SvelteComponent, append, create_animation, diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index 7ac66a09a7..efb58ebf6a 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -1,7 +1,5 @@ /* generated by Svelte vX.Y.Z */ import { - Map, - Object, SvelteComponent, append, destroy_block, diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index 859891e689..b95177bba7 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -3,7 +3,6 @@ import { SvelteComponent, append, detach, - document, element, init, noop, diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index ec30a98161..f45f9ce8db 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -2,12 +2,10 @@ import { SvelteComponent, add_render_callback, - cancelAnimationFrame, detach, element, init, insert, - isNaN, listen, noop, raf, diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js index 2e551ae426..884f39e246 100644 --- a/test/js/samples/title/expected.js +++ b/test/js/samples/title/expected.js @@ -1,7 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, - document, init, noop, safe_not_equal diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 1e63973518..ed76058ee2 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -3,7 +3,6 @@ import { SvelteComponent, add_render_callback, append, - clearTimeout, detach, element, init, @@ -11,10 +10,8 @@ import { listen, noop, safe_not_equal, - setTimeout, set_data, - text, - window + text } from "svelte/internal"; function create_fragment(ctx) { @@ -45,7 +42,7 @@ function create_fragment(ctx) { if (changed.y && !scrolling) { scrolling = true; clearTimeout(scrolling_timeout); - window.scrollTo(window.pageXOffset, ctx.y); + scrollTo(pageXOffset, ctx.y); scrolling_timeout = setTimeout(clear_scrolling, 100); } From 68e1f2830e9f4a2ca19ecbdf811d02e080e354b4 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 13 Jun 2019 11:43:19 -0400 Subject: [PATCH 269/510] site: bump repl --- site/package-lock.json | 6 +++--- site/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 34edfd33d9..0d85755c33 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1362,9 +1362,9 @@ } }, "@sveltejs/svelte-repl": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.1.7.tgz", - "integrity": "sha512-/023rff9mUtF+RqRbYUbMCwAMcvxkWc97Q8i+77G3LUVQSR44TR84lvdsnCHJwj1C+RhF/Npncd2GJSskRmgbQ==", + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.1.8.tgz", + "integrity": "sha512-RSKsuiQE3DrdT7B7DNhd5DK+DkYGLT5m6Ugchxc8iN+5v/hfVTbeNb+KJtItXLpDxiYdbb0HIiQPEdy0M+HThw==", "dev": true, "requires": { "codemirror": "^5.45.0", diff --git a/site/package.json b/site/package.json index c4ca323fea..6e51a63491 100644 --- a/site/package.json +++ b/site/package.json @@ -39,7 +39,7 @@ "@babel/runtime": "^7.4.4", "@sindresorhus/slugify": "^0.9.1", "@sveltejs/site-kit": "^1.0.4", - "@sveltejs/svelte-repl": "^0.1.7", + "@sveltejs/svelte-repl": "^0.1.8", "degit": "^2.1.3", "dotenv": "^8.0.0", "eslint-plugin-svelte3": "^1.0.0", From 7b4af88ec6587aab0e27cce0da01015532165484 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 13 Jun 2019 17:35:43 -0400 Subject: [PATCH 270/510] site: remove unused pkg scripts --- site/cypress/fixtures/example.json | 5 ----- site/cypress/integration/spec.js | 19 ------------------- site/cypress/plugins/index.js | 17 ----------------- site/cypress/support/commands.js | 25 ------------------------- site/cypress/support/index.js | 20 -------------------- site/package.json | 6 +----- 6 files changed, 1 insertion(+), 91 deletions(-) delete mode 100644 site/cypress/fixtures/example.json delete mode 100644 site/cypress/integration/spec.js delete mode 100644 site/cypress/plugins/index.js delete mode 100644 site/cypress/support/commands.js delete mode 100644 site/cypress/support/index.js diff --git a/site/cypress/fixtures/example.json b/site/cypress/fixtures/example.json deleted file mode 100644 index da18d9352a..0000000000 --- a/site/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} \ No newline at end of file diff --git a/site/cypress/integration/spec.js b/site/cypress/integration/spec.js deleted file mode 100644 index 9a7140ddae..0000000000 --- a/site/cypress/integration/spec.js +++ /dev/null @@ -1,19 +0,0 @@ -describe('Sapper template app', () => { - beforeEach(() => { - cy.visit('/') - }); - - it('has the correct

    ', () => { - cy.contains('h1', 'Great success!') - }); - - it('navigates to /about', () => { - cy.get('nav a').contains('about').click(); - cy.url().should('include', '/about'); - }); - - it('navigates to /blog', () => { - cy.get('nav a').contains('blog').click(); - cy.url().should('include', '/blog'); - }); -}); \ No newline at end of file diff --git a/site/cypress/plugins/index.js b/site/cypress/plugins/index.js deleted file mode 100644 index fd170fba69..0000000000 --- a/site/cypress/plugins/index.js +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -module.exports = (on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config -} diff --git a/site/cypress/support/commands.js b/site/cypress/support/commands.js deleted file mode 100644 index c1f5a772e2..0000000000 --- a/site/cypress/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add("login", (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This is will overwrite an existing command -- -// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/site/cypress/support/index.js b/site/cypress/support/index.js deleted file mode 100644 index d68db96df2..0000000000 --- a/site/cypress/support/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/site/package.json b/site/package.json index 6e51a63491..cd34daf987 100644 --- a/site/package.json +++ b/site/package.json @@ -7,13 +7,9 @@ "copy-workers": "rm -rf static/workers && cp -r node_modules/@sveltejs/svelte-repl/workers static", "migrate": "node-pg-migrate -r dotenv/config", "sapper": "npm run copy-workers && sapper build --legacy", - "update_shimport": "cp node_modules/shimport/index.js __sapper__/build/client/shimport@0.0.14.js", "update": "node scripts/update_template.js && node scripts/get-contributors.js", "start": "node __sapper__/build", - "cy:run": "cypress run", - "cy:open": "cypress open", - "test": "run-p --race dev cy:run", - "testsrc": "mocha -r esm test/**", + "test": "mocha -r esm test/**", "deploy": "make deploy" }, "dependencies": { From ac185052a5d33dbdfcda89903685e929535a2754 Mon Sep 17 00:00:00 2001 From: Jungle Date: Tue, 11 Jun 2019 18:25:32 +0500 Subject: [PATCH 271/510] fix(create-stubs): Fix import '.d.ts' --- scripts/create-stubs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/create-stubs.js b/scripts/create-stubs.js index e69e3f5e20..6b9c9e3f4b 100644 --- a/scripts/create-stubs.js +++ b/scripts/create-stubs.js @@ -8,5 +8,5 @@ fs.readdirSync('src/runtime') module: './index.mjs' }, null, ' ')); - fs.writeFileSync(`${dir}/index.d.ts`, `export * from '../types/runtime/${dir}/index.d.ts';`); - }); \ No newline at end of file + fs.writeFileSync(`${dir}/index.d.ts`, `export * from '../types/runtime/${dir}/index';`); + }); From be783c5c67a0c8c5b8a02cecca5589ff508fabfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efe=20K=C3=BC=C3=A7=C3=BCk?= Date: Sun, 16 Jun 2019 01:13:06 +0300 Subject: [PATCH 272/510] do not collapse whitespace containing nbsp (#3014) --- src/compiler/compile/nodes/Text.ts | 2 +- test/runtime/samples/nbsp-div/_config.js | 19 +++++++++++++++++++ test/runtime/samples/nbsp-div/main.svelte | 7 +++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/nbsp-div/_config.js create mode 100644 test/runtime/samples/nbsp-div/main.svelte diff --git a/src/compiler/compile/nodes/Text.ts b/src/compiler/compile/nodes/Text.ts index 7500f5ff30..a4514f56f2 100644 --- a/src/compiler/compile/nodes/Text.ts +++ b/src/compiler/compile/nodes/Text.ts @@ -12,7 +12,7 @@ export default class Text extends Node { super(component, parent, scope, info); this.data = info.data; - if (!component.component_options.preserveWhitespace && !/\S/.test(info.data)) { + if (!component.component_options.preserveWhitespace && !/[\S\u00A0]/.test(info.data)) { let node = parent; while (node) { if (node.type === 'Element' && node.name === 'pre') { diff --git a/test/runtime/samples/nbsp-div/_config.js b/test/runtime/samples/nbsp-div/_config.js new file mode 100644 index 0000000000..6026af2c90 --- /dev/null +++ b/test/runtime/samples/nbsp-div/_config.js @@ -0,0 +1,19 @@ +export default { + html: `
     hello
    +
     hello  
    +
     hello   hello
    `, + + test({ assert, component, target }) { + var divList = target.querySelectorAll('div') + assert.equal( divList[0].textContent.charCodeAt( 0 ), 160 ); + assert.equal( divList[1].textContent.charCodeAt( 0 ), 160 ); + assert.equal( divList[1].textContent.charCodeAt( 6 ), 160 ); + assert.equal( divList[1].textContent.charCodeAt( 7 ), 160 ); + assert.equal( divList[2].textContent.charCodeAt( 0 ), 160 ); + assert.equal( divList[2].textContent.charCodeAt( 6 ), 160 ); + assert.equal( divList[2].textContent.charCodeAt( 7 ), 32 );//normal space + assert.equal( divList[2].textContent.charCodeAt( 8 ), 160 ); + + + } +}; \ No newline at end of file diff --git a/test/runtime/samples/nbsp-div/main.svelte b/test/runtime/samples/nbsp-div/main.svelte new file mode 100644 index 0000000000..64557bfeb1 --- /dev/null +++ b/test/runtime/samples/nbsp-div/main.svelte @@ -0,0 +1,7 @@ + + +
     {name}
    +
     {name}  
    +
     {name}   {name}
    \ No newline at end of file From acdcaa41bfde4fc1b74dca33e48a6e4d3895667d Mon Sep 17 00:00:00 2001 From: Johan Date: Sun, 16 Jun 2019 11:14:39 +0200 Subject: [PATCH 273/510] ensure correct requestAnimationFrame context (#2933) --- src/runtime/internal/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 152c0e79b0..097a7df74b 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -87,7 +87,7 @@ export function once(fn) { if (ran) return; ran = true; fn.call(this, ...args); - } + }; } const is_client = typeof window !== 'undefined'; @@ -96,7 +96,7 @@ export let now: () => number = is_client ? () => window.performance.now() : () => Date.now(); -export let raf = is_client ? requestAnimationFrame : noop; +export let raf = cb => requestAnimationFrame(cb); // used internally for testing export function set_now(fn) { From ea74bfec554a9fba50d5d5ab803f96bd63fe83ba Mon Sep 17 00:00:00 2001 From: Mikhail Korepanov Date: Sun, 16 Jun 2019 13:37:28 +0300 Subject: [PATCH 274/510] Allow whitespace after = in attributes (#3026) --- src/compiler/parse/state/tag.ts | 1 + .../attribute-with-whitespace/input.svelte | 1 + .../attribute-with-whitespace/output.json | 39 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 test/parser/samples/attribute-with-whitespace/input.svelte create mode 100644 test/parser/samples/attribute-with-whitespace/output.json diff --git a/src/compiler/parse/state/tag.ts b/src/compiler/parse/state/tag.ts index 2fb82b4d2e..907233fdc7 100644 --- a/src/compiler/parse/state/tag.ts +++ b/src/compiler/parse/state/tag.ts @@ -385,6 +385,7 @@ function read_attribute(parser: Parser, unique_names: Set) { let value: any[] | true = true; if (parser.eat('=')) { + parser.allow_whitespace(); value = read_attribute_value(parser); end = parser.index; } else if (parser.match_regex(/["']/)) { diff --git a/test/parser/samples/attribute-with-whitespace/input.svelte b/test/parser/samples/attribute-with-whitespace/input.svelte new file mode 100644 index 0000000000..2743a89ed0 --- /dev/null +++ b/test/parser/samples/attribute-with-whitespace/input.svelte @@ -0,0 +1 @@ + diff --git a/test/parser/samples/attribute-with-whitespace/output.json b/test/parser/samples/attribute-with-whitespace/output.json new file mode 100644 index 0000000000..eab6054f2a --- /dev/null +++ b/test/parser/samples/attribute-with-whitespace/output.json @@ -0,0 +1,39 @@ +{ + "html": { + "start": 0, + "end": 38, + "type": "Fragment", + "children": [ + { + "start": 0, + "end": 38, + "type": "Element", + "name": "button", + "attributes": [ + { + "start": 8, + "end": 23, + "type": "EventHandler", + "name": "click", + "modifiers": [], + "expression": { + "type": "Identifier", + "start": 19, + "end": 22, + "name": "foo" + } + } + ], + "children": [ + { + "start": 24, + "end": 29, + "type": "Text", + "raw": "Click", + "data": "Click" + } + ] + } + ] + } +} From c24fc92d2fe6cb3cd3a391eb8713fac15ec7bb7b Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 16 Jun 2019 09:17:40 -0400 Subject: [PATCH 275/510] site: fix css-in-js blog embed --- .../99-embeds/20181225-blog-svelte-css-in-js/App.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/App.svelte b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/App.svelte index c8487abefe..ccb1ad8834 100644 --- a/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/App.svelte +++ b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/App.svelte @@ -1,6 +1,6 @@ From 87d4ac55c9f892da4d0aa7c786cabde1b35e2403 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 16 Jun 2019 09:38:55 -0400 Subject: [PATCH 276/510] site: fix css-in-js blog embed, pt II --- .../99-embeds/20181225-blog-svelte-css-in-js/styles.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/styles.js b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/styles.js index faf91b13d4..c7e10606c5 100644 --- a/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/styles.js +++ b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/styles.js @@ -1,4 +1,6 @@ -import { css } from 'emotion/dist/emotion.umd.min.js'; +import emotion from 'emotion/dist/emotion.umd.min.js'; + +const { css } = emotion; const brand = '#74D900'; @@ -30,4 +32,4 @@ export const link = css` text-decoration: none; background: ${brand}; } -`; \ No newline at end of file +`; From 52618594f439f7bf09b696dd9f1aff52dfe796e9 Mon Sep 17 00:00:00 2001 From: mrkishi Date: Fri, 7 Jun 2019 22:23:48 -0300 Subject: [PATCH 277/510] fix .gitignore'd files --- .gitignore | 1 + compiler.d.ts | 1 - rollup.config.js | 2 ++ test/server-side-rendering/samples/styles-nested/_actual.css | 2 -- test/server-side-rendering/samples/styles/_actual.css | 1 - 5 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 compiler.d.ts delete mode 100644 test/server-side-rendering/samples/styles-nested/_actual.css delete mode 100644 test/server-side-rendering/samples/styles/_actual.css diff --git a/.gitignore b/.gitignore index 4d7bbc7ac3..923dd5901e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ node_modules *.map /src/compiler/compile/internal-exports.ts +/compiler.d.ts /compiler.*js /index.*js /internal diff --git a/compiler.d.ts b/compiler.d.ts deleted file mode 100644 index e2a3820bc5..0000000000 --- a/compiler.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './types/compiler'; diff --git a/rollup.config.js b/rollup.config.js index 8907ae4e6c..f21fa0bdea 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -20,6 +20,8 @@ const ts_plugin = is_publish const external = id => id.startsWith('svelte/'); +fs.writeFileSync(`./compiler.d.ts`, `export * from './types/compiler/index';`); + export default [ /* runtime */ { diff --git a/test/server-side-rendering/samples/styles-nested/_actual.css b/test/server-side-rendering/samples/styles-nested/_actual.css deleted file mode 100644 index 775ae8a91c..0000000000 --- a/test/server-side-rendering/samples/styles-nested/_actual.css +++ /dev/null @@ -1,2 +0,0 @@ -div.svelte-bzh57p{color:red} -div.svelte-4yw8vx{color:green} \ No newline at end of file diff --git a/test/server-side-rendering/samples/styles/_actual.css b/test/server-side-rendering/samples/styles/_actual.css deleted file mode 100644 index 2025c64f84..0000000000 --- a/test/server-side-rendering/samples/styles/_actual.css +++ /dev/null @@ -1 +0,0 @@ -div.svelte-bzh57p{color:red} \ No newline at end of file From 453b9ac2da17b5a7330f65821b1123f25591157d Mon Sep 17 00:00:00 2001 From: mrkishi Date: Sun, 9 Jun 2019 17:35:44 -0300 Subject: [PATCH 278/510] fix `package.json` types field --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7106e60d69..9e2d17bd49 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "engines": { "node": ">= 8" }, - "types": "types/runtime", + "types": "types/runtime/index.d.ts", "scripts": { "test": "mocha --opts mocha.opts", "test:unit": "mocha --require sucrase/register --recursive ./**/__test__.ts", From b0604b52a3bf38e13f32a13f151956db10599176 Mon Sep 17 00:00:00 2001 From: mrkishi Date: Thu, 13 Jun 2019 03:11:52 -0300 Subject: [PATCH 279/510] split typescript projects --- package.json | 3 +- src/compiler/compile/index.ts | 2 +- src/compiler/tsconfig.json | 11 ++++++ src/runtime/internal/animations.ts | 3 +- src/runtime/internal/environment.ts | 16 +++++++++ src/runtime/internal/index.ts | 1 + src/runtime/internal/loop.ts | 2 +- src/runtime/internal/style_manager.ts | 2 +- src/runtime/internal/transitions.ts | 3 +- src/runtime/internal/utils.ts | 17 ---------- src/runtime/tsconfig.json | 15 ++++++++ test/tsconfig.json | 10 ++++++ tsconfig.json | 49 +++++++++++++-------------- 13 files changed, 84 insertions(+), 50 deletions(-) create mode 100644 src/compiler/tsconfig.json create mode 100644 src/runtime/internal/environment.ts create mode 100644 src/runtime/tsconfig.json create mode 100644 test/tsconfig.json diff --git a/package.json b/package.json index 9e2d17bd49..5cfdf383de 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,7 @@ "posttest": "agadoo internal/index.mjs", "prepublishOnly": "export PUBLISH=true && npm test && npm run create-stubs", "create-stubs": "node scripts/create-stubs.js", - "tsd": "tsc -p . --emitDeclarationOnly", - "typecheck": "tsc -p . --noEmit", + "tsd": "tsc -p src/compiler --emitDeclarationOnly && tsc -p src/runtime --emitDeclarationOnly", "lint": "eslint \"{src,test}/**/*.{ts,js}\"" }, "repository": { diff --git a/src/compiler/compile/index.ts b/src/compiler/compile/index.ts index 3f4a3eeb32..f75a4390ec 100644 --- a/src/compiler/compile/index.ts +++ b/src/compiler/compile/index.ts @@ -1,4 +1,4 @@ -import { assign } from '../../runtime/internal/index'; +import { assign } from '../../runtime/internal/utils'; import Stats from '../Stats'; import parse from '../parse/index'; import render_dom from './render-dom/index'; diff --git a/src/compiler/tsconfig.json b/src/compiler/tsconfig.json new file mode 100644 index 0000000000..c5939a0fdc --- /dev/null +++ b/src/compiler/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.json", + "include": ["."], + + "compilerOptions": { + "lib": ["es2017", "webworker"] + + // TODO: remove mocha types from the whole project + // "types": ["node", "estree"] + } +} diff --git a/src/runtime/internal/animations.ts b/src/runtime/internal/animations.ts index 77c86aff0e..6dc6a446f6 100644 --- a/src/runtime/internal/animations.ts +++ b/src/runtime/internal/animations.ts @@ -1,4 +1,5 @@ -import { identity as linear, noop, now } from './utils'; +import { identity as linear, noop } from './utils'; +import { now } from './environment'; import { loop } from './loop'; import { create_rule, delete_rule } from './style_manager'; import { AnimationConfig } from '../animate'; diff --git a/src/runtime/internal/environment.ts b/src/runtime/internal/environment.ts new file mode 100644 index 0000000000..a1d50b5521 --- /dev/null +++ b/src/runtime/internal/environment.ts @@ -0,0 +1,16 @@ +export const is_client = typeof window !== 'undefined'; + +export let now: () => number = is_client + ? () => window.performance.now() + : () => Date.now(); + +export let raf = cb => requestAnimationFrame(cb); + +// used internally for testing +export function set_now(fn) { + now = fn; +} + +export function set_raf(fn) { + raf = fn; +} diff --git a/src/runtime/internal/index.ts b/src/runtime/internal/index.ts index 6487f04525..d9d95541eb 100644 --- a/src/runtime/internal/index.ts +++ b/src/runtime/internal/index.ts @@ -1,6 +1,7 @@ export * from './animations'; export * from './await-block'; export * from './dom'; +export * from './environment'; export * from './keyed-each'; export * from './lifecycle'; export * from './loop'; diff --git a/src/runtime/internal/loop.ts b/src/runtime/internal/loop.ts index cc6161105d..c1a42aa724 100644 --- a/src/runtime/internal/loop.ts +++ b/src/runtime/internal/loop.ts @@ -1,4 +1,4 @@ -import { now, raf } from './utils'; +import { now, raf } from './environment'; export interface Task { abort(): void; promise: Promise } diff --git a/src/runtime/internal/style_manager.ts b/src/runtime/internal/style_manager.ts index 2721200627..d9264e3c08 100644 --- a/src/runtime/internal/style_manager.ts +++ b/src/runtime/internal/style_manager.ts @@ -1,5 +1,5 @@ import { element } from './dom'; -import { raf } from './utils'; +import { raf } from './environment'; let stylesheet; let active = 0; diff --git a/src/runtime/internal/transitions.ts b/src/runtime/internal/transitions.ts index 5591ca1d51..80c76ffec5 100644 --- a/src/runtime/internal/transitions.ts +++ b/src/runtime/internal/transitions.ts @@ -1,4 +1,5 @@ -import { identity as linear, is_function, noop, now, run_all } from './utils'; +import { identity as linear, is_function, noop, run_all } from './utils'; +import { now } from "./environment"; import { loop } from './loop'; import { create_rule, delete_rule } from './style_manager'; import { custom_event } from './dom'; diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 097a7df74b..08410ec33a 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -89,20 +89,3 @@ export function once(fn) { fn.call(this, ...args); }; } - -const is_client = typeof window !== 'undefined'; - -export let now: () => number = is_client - ? () => window.performance.now() - : () => Date.now(); - -export let raf = cb => requestAnimationFrame(cb); - -// used internally for testing -export function set_now(fn) { - now = fn; -} - -export function set_raf(fn) { - raf = fn; -} diff --git a/src/runtime/tsconfig.json b/src/runtime/tsconfig.json new file mode 100644 index 0000000000..f3b4691b41 --- /dev/null +++ b/src/runtime/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "include": ["."], + + "compilerOptions": { + "lib": ["es2015", "dom", "dom.iterable"], + "target": "es2015", + "types": [], + + "baseUrl": ".", + "paths": { + "svelte/*": ["*"] + } + } +} diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 0000000000..82eaf0245e --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.json", + "include": ["."], + + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "noEmit": true + } +} diff --git a/tsconfig.json b/tsconfig.json index 07bc24acaf..39476f3dd1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,33 +1,30 @@ { + "include": [], + "compilerOptions": { - "target": "es2015", - "module": "es6", + "rootDir": "src", + + // target node v8+ (https://node.green/) + // the only missing feature is Array.prototype.values + "lib": ["es2017"], + "target": "es2017", + "declaration": true, "declarationDir": "types", - "noImplicitThis": true, - "noUnusedLocals": true, - "noUnusedParameters": true, + "noEmitOnError": true, - "lib": [ - "es5", - "es6", - "dom", - "es2015" - ], - "importHelpers": true, + "noErrorTruncation": true, + + // rollup takes care of these + "module": "esnext", "moduleResolution": "node", - "baseUrl": ".", - "paths": { - "svelte/internal": ["./src/runtime/internal/index"], - "svelte/easing": ["./src/runtime/easing/index"], - "svelte/motion": ["./src/runtime/motion/index"], - "svelte/store": ["./src/runtime/store/index"] - }, - "typeRoots": [ - "node_modules/@types" - ] - }, - "include": [ - "src/**/*" - ] + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true, + + // TODO: error all the things + //"strict": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true + } } From 457cdf6acf65bed70e65840a7df7a239c7ec1ff5 Mon Sep 17 00:00:00 2001 From: mrkishi Date: Sun, 9 Jun 2019 19:50:46 -0300 Subject: [PATCH 280/510] create `package.json` stubs on build --- package.json | 3 +-- rollup.config.js | 20 +++++++++++++++----- scripts/create-stubs.js | 12 ------------ 3 files changed, 16 insertions(+), 19 deletions(-) delete mode 100644 scripts/create-stubs.js diff --git a/package.json b/package.json index 5cfdf383de..e0bbe252d4 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,7 @@ "dev": "rollup -cw", "pretest": "npm run build", "posttest": "agadoo internal/index.mjs", - "prepublishOnly": "export PUBLISH=true && npm test && npm run create-stubs", - "create-stubs": "node scripts/create-stubs.js", + "prepublishOnly": "PUBLISH=true npm test", "tsd": "tsc -p src/compiler --emitDeclarationOnly && tsc -p src/runtime --emitDeclarationOnly", "lint": "eslint \"{src,test}/**/*.{ts,js}\"" }, diff --git a/rollup.config.js b/rollup.config.js index f21fa0bdea..fb329534a2 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -61,12 +61,22 @@ export default [ external, plugins: [ ts_plugin, - dir === 'internal' && { - generateBundle(options, bundle) { - const mod = bundle['index.mjs']; - if (mod) { - fs.writeFileSync('src/compiler/compile/internal-exports.ts', `// This file is automatically generated\nexport default new Set(${JSON.stringify(mod.exports)});`); + { + writeBundle(bundle) { + if (dir === 'internal') { + const mod = bundle['index.mjs']; + if (mod) { + fs.writeFileSync('src/compiler/compile/internal-exports.ts', `// This file is automatically generated\nexport default new Set(${JSON.stringify(mod.exports)});`); + } } + + fs.writeFileSync(`${dir}/package.json`, JSON.stringify({ + main: './index', + module: './index.mjs', + types: './index.d.ts' + }, null, ' ')); + + fs.writeFileSync(`${dir}/index.d.ts`, `export * from '../types/runtime/${dir}/index';`); } } ] diff --git a/scripts/create-stubs.js b/scripts/create-stubs.js deleted file mode 100644 index 6b9c9e3f4b..0000000000 --- a/scripts/create-stubs.js +++ /dev/null @@ -1,12 +0,0 @@ -const fs = require('fs'); - -fs.readdirSync('src/runtime') - .filter(dir => fs.statSync(`src/runtime/${dir}`).isDirectory()) - .forEach(dir => { - fs.writeFileSync(`${dir}/package.json`, JSON.stringify({ - main: './index', - module: './index.mjs' - }, null, ' ')); - - fs.writeFileSync(`${dir}/index.d.ts`, `export * from '../types/runtime/${dir}/index';`); - }); From e90feb11f946948d79fa970f67d07a992838e9ea Mon Sep 17 00:00:00 2001 From: mrkishi Date: Sun, 9 Jun 2019 17:48:16 -0300 Subject: [PATCH 281/510] pin `@types/node` to v8 --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f65fcc07e5..aea08689b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,9 +49,9 @@ "dev": true }, "@types/node": { - "version": "10.12.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", - "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", + "version": "8.10.49", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.49.tgz", + "integrity": "sha512-YX30JVx0PvSmJ3Eqr74fYLGeBxD+C7vIL20ek+GGGLJeUbVYRUW3EzyAXpIRA0K8c8o0UWqR/GwEFYiFoz1T8w==", "dev": true }, "@typescript-eslint/eslint-plugin": { diff --git a/package.json b/package.json index e0bbe252d4..140b60c6c6 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "homepage": "https://github.com/sveltejs/svelte#README", "devDependencies": { "@types/mocha": "^5.2.0", - "@types/node": "^10.5.5", + "@types/node": "=8", "@typescript-eslint/eslint-plugin": "^1.9.0", "@typescript-eslint/parser": "^1.9.0", "acorn": "^6.1.1", From 07f65c0e523e327201073fa090c3b1ebc451edb9 Mon Sep 17 00:00:00 2001 From: mrkishi Date: Sun, 9 Jun 2019 19:31:44 -0300 Subject: [PATCH 282/510] remove unused `.flowconfig` --- .flowconfig | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .flowconfig diff --git a/.flowconfig b/.flowconfig deleted file mode 100644 index c1961b7a6b..0000000000 --- a/.flowconfig +++ /dev/null @@ -1,9 +0,0 @@ -[ignore] -/types/.* - -[include] - -[libs] - -[options] -strip_root=true From d4db3ed936ae92d6cfd3f1cc6e05c612267436c3 Mon Sep 17 00:00:00 2001 From: mrkishi Date: Sun, 9 Jun 2019 22:49:12 -0300 Subject: [PATCH 283/510] make eslint happy --- src/compiler/compile/nodes/Element.ts | 4 ++-- src/compiler/compile/render-ssr/handlers/Element.ts | 6 +++--- test/runtime/samples/contenteditable-html/_config.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index c37ea5020a..3e883200a7 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -610,7 +610,7 @@ export default class Element extends Node { } else if ( name === 'text' || name === 'html' - ){ + ) { const contenteditable = this.attributes.find( (attribute: Attribute) => attribute.name === 'contenteditable' ); @@ -626,7 +626,7 @@ export default class Element extends Node { message: `'contenteditable' attribute cannot be dynamic if element uses two-way binding` }); } - } else if (name !== 'this') { + } else if (name !== 'this') { component.error(binding, { code: `invalid-binding`, message: `'${binding.name}' is not a valid binding` diff --git a/src/compiler/compile/render-ssr/handlers/Element.ts b/src/compiler/compile/render-ssr/handlers/Element.ts index 681e0d4c7b..0fbb4d3410 100644 --- a/src/compiler/compile/render-ssr/handlers/Element.ts +++ b/src/compiler/compile/render-ssr/handlers/Element.ts @@ -151,12 +151,12 @@ export default function(node: Element, renderer: Renderer, options: RenderOption if (name === 'group') { // TODO server-render group bindings } else if (contenteditable && (name === 'text' || name === 'html')) { - const snippet = snip(expression) + const snippet = snip(expression); if (name == 'text') { - node_contents = '${@escape(' + snippet + ')}' + node_contents = '${@escape(' + snippet + ')}'; } else { // Do not escape HTML content - node_contents = '${' + snippet + '}' + node_contents = '${' + snippet + '}'; } } else if (binding.name === 'value' && node.name === 'textarea') { const snippet = snip(expression); diff --git a/test/runtime/samples/contenteditable-html/_config.js b/test/runtime/samples/contenteditable-html/_config.js index cd2a822655..013fa30f39 100644 --- a/test/runtime/samples/contenteditable-html/_config.js +++ b/test/runtime/samples/contenteditable-html/_config.js @@ -19,14 +19,14 @@ export default { el.innerHTML = 'everybody'; - // No updates to data yet + // No updates to data yet assert.htmlEqual(target.innerHTML, ` everybody

    hello world

    `); - // Handle user input - const event = new window.Event('input'); + // Handle user input + const event = new window.Event('input'); await el.dispatchEvent(event); assert.htmlEqual(target.innerHTML, ` everybody From 552ea4b9ed44fc587f056d0231adc6e84c2be638 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 11 Jun 2019 20:41:46 -0400 Subject: [PATCH 284/510] only set attributes via properties when truly necessary (#1434) --- .../render-dom/wrappers/Element/Attribute.ts | 179 +----------------- 1 file changed, 8 insertions(+), 171 deletions(-) diff --git a/src/compiler/compile/render-dom/wrappers/Element/Attribute.ts b/src/compiler/compile/render-dom/wrappers/Element/Attribute.ts index 669a3774e3..f55e731fdb 100644 --- a/src/compiler/compile/render-dom/wrappers/Element/Attribute.ts +++ b/src/compiler/compile/render-dom/wrappers/Element/Attribute.ts @@ -224,79 +224,20 @@ export default class AttributeWrapper { } } -// source: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes +// source: https://html.spec.whatwg.org/multipage/indices.html const attribute_lookup = { - accept: { applies_to: ['form', 'input'] }, - 'accept-charset': { property_name: 'acceptCharset', applies_to: ['form'] }, - accesskey: { property_name: 'accessKey' }, - action: { applies_to: ['form'] }, - align: { - applies_to: [ - 'applet', - 'caption', - 'col', - 'colgroup', - 'hr', - 'iframe', - 'img', - 'table', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'tr', - ], - }, allowfullscreen: { property_name: 'allowFullscreen', applies_to: ['iframe'] }, - alt: { applies_to: ['applet', 'area', 'img', 'input'] }, + allowpaymentrequest: { property_name: 'allowPaymentRequest', applies_to: ['iframe'] }, async: { applies_to: ['script'] }, - autocomplete: { applies_to: ['form', 'input'] }, autofocus: { applies_to: ['button', 'input', 'keygen', 'select', 'textarea'] }, autoplay: { applies_to: ['audio', 'video'] }, - autosave: { applies_to: ['input'] }, - bgcolor: { - property_name: 'bgColor', - applies_to: [ - 'body', - 'col', - 'colgroup', - 'marquee', - 'table', - 'tbody', - 'tfoot', - 'td', - 'th', - 'tr', - ], - }, - border: { applies_to: ['img', 'object', 'table'] }, - buffered: { applies_to: ['audio', 'video'] }, - challenge: { applies_to: ['keygen'] }, - charset: { applies_to: ['meta', 'script'] }, - checked: { applies_to: ['command', 'input'] }, - cite: { applies_to: ['blockquote', 'del', 'ins', 'q'] }, - class: { property_name: 'className' }, - code: { applies_to: ['applet'] }, - codebase: { property_name: 'codeBase', applies_to: ['applet'] }, - color: { applies_to: ['basefont', 'font', 'hr'] }, - cols: { applies_to: ['textarea'] }, - colspan: { property_name: 'colSpan', applies_to: ['td', 'th'] }, - content: { applies_to: ['meta'] }, - contenteditable: { property_name: 'contentEditable' }, - contextmenu: {}, + checked: { applies_to: ['input'] }, controls: { applies_to: ['audio', 'video'] }, - coords: { applies_to: ['area'] }, - data: { applies_to: ['object'] }, - datetime: { property_name: 'dateTime', applies_to: ['del', 'ins', 'time'] }, default: { applies_to: ['track'] }, defer: { applies_to: ['script'] }, - dir: {}, - dirname: { property_name: 'dirName', applies_to: ['input', 'textarea'] }, disabled: { applies_to: [ 'button', - 'command', 'fieldset', 'input', 'keygen', @@ -306,119 +247,21 @@ const attribute_lookup = { 'textarea', ], }, - download: { applies_to: ['a', 'area'] }, - draggable: {}, - dropzone: {}, - enctype: { applies_to: ['form'] }, - for: { property_name: 'htmlFor', applies_to: ['label', 'output'] }, - formaction: { applies_to: ['input', 'button'] }, - headers: { applies_to: ['td', 'th'] }, - height: { - applies_to: ['canvas', 'embed', 'iframe', 'img', 'input', 'object', 'video'], - }, + formnovalidate: { property_name: 'formNoValidate', applies_to: ['button', 'input'] }, hidden: {}, - high: { applies_to: ['meter'] }, - href: { applies_to: ['a', 'area', 'base', 'link'] }, - hreflang: { applies_to: ['a', 'area', 'link'] }, - 'http-equiv': { property_name: 'httpEquiv', applies_to: ['meta'] }, - icon: { applies_to: ['command'] }, - id: {}, indeterminate: { applies_to: ['input'] }, ismap: { property_name: 'isMap', applies_to: ['img'] }, - itemprop: {}, - keytype: { applies_to: ['keygen'] }, - kind: { applies_to: ['track'] }, - label: { applies_to: ['track'] }, - lang: {}, - language: { applies_to: ['script'] }, - loop: { applies_to: ['audio', 'bgsound', 'marquee', 'video'] }, - low: { applies_to: ['meter'] }, - manifest: { applies_to: ['html'] }, - max: { applies_to: ['input', 'meter', 'progress'] }, - maxlength: { property_name: 'maxLength', applies_to: ['input', 'textarea'] }, - media: { applies_to: ['a', 'area', 'link', 'source', 'style'] }, - method: { applies_to: ['form'] }, - min: { applies_to: ['input', 'meter'] }, + loop: { applies_to: ['audio', 'bgsound', 'video'] }, multiple: { applies_to: ['input', 'select'] }, muted: { applies_to: ['audio', 'video'] }, - name: { - applies_to: [ - 'button', - 'form', - 'fieldset', - 'iframe', - 'input', - 'keygen', - 'object', - 'output', - 'select', - 'textarea', - 'map', - 'meta', - 'param', - ], - }, + nomodule: { property_name: 'noModule', applies_to: ['script'] }, novalidate: { property_name: 'noValidate', applies_to: ['form'] }, - open: { applies_to: ['details'] }, - optimum: { applies_to: ['meter'] }, - pattern: { applies_to: ['input'] }, - ping: { applies_to: ['a', 'area'] }, - placeholder: { applies_to: ['input', 'textarea'] }, - poster: { applies_to: ['video'] }, - preload: { applies_to: ['audio', 'video'] }, - radiogroup: { applies_to: ['command'] }, + open: { applies_to: ['details', 'dialog'] }, + playsinline: { property_name: 'playsInline', applies_to: ['video'] }, readonly: { property_name: 'readOnly', applies_to: ['input', 'textarea'] }, - rel: { applies_to: ['a', 'area', 'link'] }, required: { applies_to: ['input', 'select', 'textarea'] }, reversed: { applies_to: ['ol'] }, - rows: { applies_to: ['textarea'] }, - rowspan: { property_name: 'rowSpan', applies_to: ['td', 'th'] }, - sandbox: { applies_to: ['iframe'] }, - scope: { applies_to: ['th'] }, - scoped: { applies_to: ['style'] }, - seamless: { applies_to: ['iframe'] }, selected: { applies_to: ['option'] }, - shape: { applies_to: ['a', 'area'] }, - size: { applies_to: ['input', 'select'] }, - sizes: { applies_to: ['link', 'img', 'source'] }, - span: { applies_to: ['col', 'colgroup'] }, - spellcheck: {}, - src: { - applies_to: [ - 'audio', - 'embed', - 'iframe', - 'img', - 'input', - 'script', - 'source', - 'track', - 'video', - ], - }, - srcdoc: { applies_to: ['iframe'] }, - srclang: { applies_to: ['track'] }, - srcset: { applies_to: ['img'] }, - start: { applies_to: ['ol'] }, - step: { applies_to: ['input'] }, - style: { property_name: 'style.cssText' }, - summary: { applies_to: ['table'] }, - tabindex: { property_name: 'tabIndex' }, - target: { applies_to: ['a', 'area', 'base', 'form'] }, - title: {}, - type: { - applies_to: [ - 'button', - 'command', - 'embed', - 'object', - 'script', - 'source', - 'style', - 'menu', - ], - }, - usemap: { property_name: 'useMap', applies_to: ['img', 'input', 'object'] }, value: { applies_to: [ 'button', @@ -432,12 +275,6 @@ const attribute_lookup = { 'textarea', ], }, - volume: { applies_to: ['audio', 'video'] }, - playbackRate: { applies_to: ['audio', 'video'] }, - width: { - applies_to: ['canvas', 'embed', 'iframe', 'img', 'input', 'object', 'video'], - }, - wrap: { applies_to: ['textarea'] }, }; Object.keys(attribute_lookup).forEach(name => { From a332b648e937d4776069489e7ca6ba9e7899d692 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 11 Jun 2019 20:42:37 -0400 Subject: [PATCH 285/510] update tests (#1434) (#2935) --- test/js/samples/action/expected.js | 3 ++- .../samples/collapses-text-around-comments/expected.js | 3 ++- test/js/samples/css-media-query/expected.js | 3 ++- test/js/samples/each-block-changed-check/expected.js | 5 +++-- test/js/samples/event-handler-no-passive/expected.js | 3 ++- test/js/samples/head-no-whitespace/expected.js | 9 +++++---- test/js/samples/inline-style-unoptimized/expected.js | 9 +++++---- test/runtime/samples/contenteditable-html/_config.js | 8 ++++---- test/runtime/samples/contenteditable-text/_config.js | 6 +++--- test/runtime/samples/set-undefined-attr/_config.js | 4 ++-- test/runtime/samples/set-undefined-attr/main.svelte | 3 ++- 11 files changed, 32 insertions(+), 24 deletions(-) diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index cbbcb0d317..ed0a0a7430 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -1,6 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, + attr, detach, element, init, @@ -16,7 +17,7 @@ function create_fragment(ctx) { c() { a = element("a"); a.textContent = "Test"; - a.href = "#"; + attr(a, "href", "#"); }, m(target, anchor) { diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index 12164d0579..09b40a1e98 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -2,6 +2,7 @@ import { SvelteComponent, append, + attr, detach, element, init, @@ -26,7 +27,7 @@ function create_fragment(ctx) { c() { p = element("p"); t = text(ctx.foo); - p.className = "svelte-1a7i8ec"; + attr(p, "class", "svelte-1a7i8ec"); }, m(target, anchor) { diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index d4be134376..82b7c5dfc8 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -2,6 +2,7 @@ import { SvelteComponent, append, + attr, detach, element, init, @@ -23,7 +24,7 @@ function create_fragment(ctx) { return { c() { div = element("div"); - div.className = "svelte-1slhpfn"; + attr(div, "class", "svelte-1slhpfn"); }, m(target, anchor) { diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index 951565bae4..b4d4577df3 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -2,6 +2,7 @@ import { SvelteComponent, append, + attr, destroy_each, detach, detach_after, @@ -39,8 +40,8 @@ function create_each_block(ctx) { t5 = text(" ago:"); t6 = space(); raw_before = element('noscript'); - span.className = "meta"; - div.className = "comment"; + attr(span, "class", "meta"); + attr(div, "class", "comment"); }, m(target, anchor) { diff --git a/test/js/samples/event-handler-no-passive/expected.js b/test/js/samples/event-handler-no-passive/expected.js index 41fcbeeb2a..e8ca72c556 100644 --- a/test/js/samples/event-handler-no-passive/expected.js +++ b/test/js/samples/event-handler-no-passive/expected.js @@ -1,6 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, + attr, detach, element, init, @@ -17,7 +18,7 @@ function create_fragment(ctx) { c() { a = element("a"); a.textContent = "this should not navigate to example.com"; - a.href = "https://example.com"; + attr(a, "href", "https://example.com"); dispose = listen(a, "touchstart", touchstart_handler); }, diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index b95177bba7..457df77dc8 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -2,6 +2,7 @@ import { SvelteComponent, append, + attr, detach, element, init, @@ -16,10 +17,10 @@ function create_fragment(ctx) { c() { meta0 = element("meta"); meta1 = element("meta"); - meta0.name = "twitter:creator"; - meta0.content = "@sveltejs"; - meta1.name = "twitter:title"; - meta1.content = "Svelte"; + attr(meta0, "name", "twitter:creator"); + attr(meta0, "content", "@sveltejs"); + attr(meta1, "name", "twitter:title"); + attr(meta1, "content", "Svelte"); }, m(target, anchor) { diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 8f3b668827..9349ade12c 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -1,6 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, + attr, detach, element, init, @@ -18,8 +19,8 @@ function create_fragment(ctx) { div0 = element("div"); t = space(); div1 = element("div"); - div0.style.cssText = ctx.style; - div1.style.cssText = div1_style_value = "" + ctx.key + ": " + ctx.value; + attr(div0, "style", ctx.style); + attr(div1, "style", div1_style_value = "" + ctx.key + ": " + ctx.value); }, m(target, anchor) { @@ -30,11 +31,11 @@ function create_fragment(ctx) { p(changed, ctx) { if (changed.style) { - div0.style.cssText = ctx.style; + attr(div0, "style", ctx.style); } if ((changed.key || changed.value) && div1_style_value !== (div1_style_value = "" + ctx.key + ": " + ctx.value)) { - div1.style.cssText = div1_style_value; + attr(div1, "style", div1_style_value); } }, diff --git a/test/runtime/samples/contenteditable-html/_config.js b/test/runtime/samples/contenteditable-html/_config.js index 013fa30f39..285512b6c9 100644 --- a/test/runtime/samples/contenteditable-html/_config.js +++ b/test/runtime/samples/contenteditable-html/_config.js @@ -4,7 +4,7 @@ export default { }, html: ` - world + world

    hello world

    `, @@ -21,7 +21,7 @@ export default { // No updates to data yet assert.htmlEqual(target.innerHTML, ` - everybody + everybody

    hello world

    `); @@ -29,14 +29,14 @@ export default { const event = new window.Event('input'); await el.dispatchEvent(event); assert.htmlEqual(target.innerHTML, ` - everybody + everybody

    hello everybody

    `); component.name = 'goodbye'; assert.equal(el.innerHTML, 'goodbye'); assert.htmlEqual(target.innerHTML, ` - goodbye + goodbye

    hello goodbye

    `); }, diff --git a/test/runtime/samples/contenteditable-text/_config.js b/test/runtime/samples/contenteditable-text/_config.js index 4935a3a9a7..059cda7cfe 100644 --- a/test/runtime/samples/contenteditable-text/_config.js +++ b/test/runtime/samples/contenteditable-text/_config.js @@ -4,7 +4,7 @@ export default { }, html: ` - world + world

    hello world

    `, @@ -23,14 +23,14 @@ export default { await el.dispatchEvent(event); assert.htmlEqual(target.innerHTML, ` - everybody + everybody

    hello everybody

    `); component.name = 'goodbye'; assert.equal(el.textContent, 'goodbye'); assert.htmlEqual(target.innerHTML, ` - goodbye + goodbye

    hello goodbye

    `); }, diff --git a/test/runtime/samples/set-undefined-attr/_config.js b/test/runtime/samples/set-undefined-attr/_config.js index e28bad8257..b23f51dfc9 100644 --- a/test/runtime/samples/set-undefined-attr/_config.js +++ b/test/runtime/samples/set-undefined-attr/_config.js @@ -1,5 +1,5 @@ export default { - html: '
    ', + html: `
    `, - ssrHtml: '
    ' + ssrHtml: `
    `, }; diff --git a/test/runtime/samples/set-undefined-attr/main.svelte b/test/runtime/samples/set-undefined-attr/main.svelte index 8191acbeff..77a1885415 100644 --- a/test/runtime/samples/set-undefined-attr/main.svelte +++ b/test/runtime/samples/set-undefined-attr/main.svelte @@ -3,10 +3,11 @@ export let foo = 1; export let bar; + export let _class; onMount(() => { foo = undefined; }); -
    +
    From d36478657ce70ac5e2884ee08a7ff9ca85ac89f9 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 16 Jun 2019 13:59:24 -0400 Subject: [PATCH 286/510] move get_name to get_name_from_filename and add unit tests --- package.json | 2 +- src/compiler/compile/index.ts | 30 ++----------------- src/compiler/compile/utils/__test__.ts | 15 ++++++++++ .../compile/utils/get_name_from_filename.ts | 26 ++++++++++++++++ 4 files changed, 44 insertions(+), 29 deletions(-) create mode 100644 src/compiler/compile/utils/get_name_from_filename.ts diff --git a/package.json b/package.json index 7106e60d69..4c9b5614be 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "types": "types/runtime", "scripts": { "test": "mocha --opts mocha.opts", - "test:unit": "mocha --require sucrase/register --recursive ./**/__test__.ts", + "test:unit": "mocha --require sucrase/register --recursive src/**/__test__.ts", "quicktest": "mocha --opts mocha.opts", "precoverage": "c8 mocha --opts mocha.coverage.opts", "coverage": "c8 report --reporter=text-lcov > coverage.lcov && c8 report --reporter=html", diff --git a/src/compiler/compile/index.ts b/src/compiler/compile/index.ts index 896f235c61..973847a1b9 100644 --- a/src/compiler/compile/index.ts +++ b/src/compiler/compile/index.ts @@ -6,6 +6,7 @@ import render_ssr from './render-ssr/index'; import { CompileOptions, Warning } from '../interfaces'; import Component from './Component'; import fuzzymatch from '../utils/fuzzymatch'; +import { get_name_from_filename } from './utils/get_name_from_filename'; const valid_options = [ 'format', @@ -55,33 +56,6 @@ function validate_options(options: CompileOptions, warnings: Warning[]) { } } -function get_name(filename: string) { - if (!filename) return null; - // eslint-disable-next-line no-useless-escape - const parts = filename.split(/[\/\\]/); - - if (parts.length > 1) { - const index_match = parts[parts.length - 1].match(/^index(\.\w+)/); - if (index_match) { - parts.pop(); - parts[parts.length - 1] += index_match[1]; - } - } - - const base = parts.pop() - .replace(/\.[^.]+$/, "") - .replace(/[^a-zA-Z_$0-9]+/g, '_') - .replace(/^_/, '') - .replace(/_$/, '') - .replace(/^(\d)/, '_$1'); - - if (!base) { - throw new Error(`Could not derive component name from file ${filename}`); - } - - return base[0].toUpperCase() + base.slice(1); -} - export default function compile(source: string, options: CompileOptions = {}) { options = assign({ generate: 'dom', dev: false }, options); @@ -98,7 +72,7 @@ export default function compile(source: string, options: CompileOptions = {}) { const component = new Component( ast, source, - options.name || get_name(options.filename) || 'Component', + options.name || get_name_from_filename(options.filename) || 'Component', options, stats, warnings diff --git a/src/compiler/compile/utils/__test__.ts b/src/compiler/compile/utils/__test__.ts index 7a8b5a6fd7..b5bc5d8ea8 100644 --- a/src/compiler/compile/utils/__test__.ts +++ b/src/compiler/compile/utils/__test__.ts @@ -1,6 +1,7 @@ import * as assert from 'assert'; import deindent from './deindent'; import CodeBuilder from './CodeBuilder'; +import get_name_from_filename from './get_name_from_filename'; describe('deindent', () => { it('deindents a simple string', () => { @@ -164,3 +165,17 @@ describe('CodeBuilder', () => { ); }); }); + +describe('get_name_from_filename', () => { + it('uses the basename', () => { + assert.equal(get_name_from_filename('path/to/Widget.svelte'), 'Widget'); + }); + + it('uses the directory name, if basename is index', () => { + assert.equal(get_name_from_filename('path/to/Widget/index.svelte'), 'Widget'); + }); + + it('handles unusual filenames', () => { + assert.equal(get_name_from_filename('path/to/[...parts].svelte'), 'Parts'); + }); +}); diff --git a/src/compiler/compile/utils/get_name_from_filename.ts b/src/compiler/compile/utils/get_name_from_filename.ts new file mode 100644 index 0000000000..19c781825c --- /dev/null +++ b/src/compiler/compile/utils/get_name_from_filename.ts @@ -0,0 +1,26 @@ +export default function get_name_from_filename(filename: string) { + if (!filename) return null; + // eslint-disable-next-line no-useless-escape + const parts = filename.split(/[\/\\]/); + + if (parts.length > 1) { + const index_match = parts[parts.length - 1].match(/^index(\.\w+)/); + if (index_match) { + parts.pop(); + parts[parts.length - 1] += index_match[1]; + } + } + + const base = parts.pop() + .replace(/\.[^.]+$/, "") + .replace(/[^a-zA-Z_$0-9]+/g, '_') + .replace(/^_/, '') + .replace(/_$/, '') + .replace(/^(\d)/, '_$1'); + + if (!base) { + throw new Error(`Could not derive component name from file ${filename}`); + } + + return base[0].toUpperCase() + base.slice(1); +} \ No newline at end of file From a012a07842c9e57070cd6f25097b6b5550fa9b27 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 16 Jun 2019 14:37:03 -0400 Subject: [PATCH 287/510] update site-kit --- site/package-lock.json | 6 +++--- site/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index b4cbd4f13a..819099a143 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1352,9 +1352,9 @@ } }, "@sveltejs/site-kit": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@sveltejs/site-kit/-/site-kit-1.0.4.tgz", - "integrity": "sha512-BaQhIL1iPhCF+iDXfy9psDvRdFzfyMPkWnoZHfVz+INpHsU2aJmRZOPl9rykXmPyiPo+AwTTNK5vjIvmtwHLPQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sveltejs/site-kit/-/site-kit-1.1.0.tgz", + "integrity": "sha512-Pe0vsIW5c3LDAY4K7mPa+S1gNAVkpVRfvfylHOPOufhdXOwU3E+YhobrF2MMLcM6FEonJv1Au/RHHSBZu8+aKg==", "dev": true, "requires": { "@sindresorhus/slugify": "^0.9.1", diff --git a/site/package.json b/site/package.json index 3f7172b8a8..01c77f62bd 100644 --- a/site/package.json +++ b/site/package.json @@ -38,7 +38,7 @@ "@babel/preset-env": "^7.4.4", "@babel/runtime": "^7.4.4", "@sindresorhus/slugify": "^0.9.1", - "@sveltejs/site-kit": "^1.0.4", + "@sveltejs/site-kit": "^1.1.0", "@sveltejs/svelte-repl": "^0.1.5", "degit": "^2.1.3", "dotenv": "^8.0.0", From 8363ba4f44417511dcf48a3ad5036fda4800184b Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 16 Jun 2019 14:40:52 -0400 Subject: [PATCH 288/510] whoops --- src/compiler/compile/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/compile/index.ts b/src/compiler/compile/index.ts index 63f9b5f610..30787f8d88 100644 --- a/src/compiler/compile/index.ts +++ b/src/compiler/compile/index.ts @@ -6,7 +6,7 @@ import render_ssr from './render-ssr/index'; import { CompileOptions, Warning } from '../interfaces'; import Component from './Component'; import fuzzymatch from '../utils/fuzzymatch'; -import { get_name_from_filename } from './utils/get_name_from_filename'; +import get_name_from_filename from './utils/get_name_from_filename'; const valid_options = [ 'format', From 59f04c93c5dda9e05f286911acddc01db1be73d7 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 18 Jun 2019 11:07:00 -0400 Subject: [PATCH 289/510] don't grab page offsets too early --- src/compiler/compile/render-dom/wrappers/Window.ts | 10 +++++----- test/js/samples/window-binding-scroll/expected.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/compile/render-dom/wrappers/Window.ts b/src/compiler/compile/render-dom/wrappers/Window.ts index 8c8e6c623d..c47f12593c 100644 --- a/src/compiler/compile/render-dom/wrappers/Window.ts +++ b/src/compiler/compile/render-dom/wrappers/Window.ts @@ -92,10 +92,10 @@ export default class WindowWrapper extends Wrapper { renderer.meta_bindings.add_block(deindent` if (${condition}) { - @_scrollTo(${x || '@_pageXOffset'}, ${y || '@pageYOffset'}); + @_scrollTo(${x || '@_window.pageXOffset'}, ${y || '@_window.pageYOffset'}); } - ${x && `${x} = @_pageXOffset;`} - ${y && `${y} = @_pageYOffset;`} + ${x && `${x} = @_window.pageXOffset;`} + ${y && `${y} = @_window.pageYOffset;`} `); block.event_listeners.push(deindent` @@ -148,9 +148,9 @@ export default class WindowWrapper extends Wrapper { ${scrolling} = true; @_clearTimeout(${scrolling_timeout}); @_scrollTo(${ - bindings.scrollX ? `ctx.${bindings.scrollX}` : `@_pageXOffset` + bindings.scrollX ? `ctx.${bindings.scrollX}` : `@_window.pageXOffset` }, ${ - bindings.scrollY ? `ctx.${bindings.scrollY}` : `@_pageYOffset` + bindings.scrollY ? `ctx.${bindings.scrollY}` : `@_window.pageYOffset` }); ${scrolling_timeout} = @_setTimeout(${clear_scrolling}, 100); } diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index ed76058ee2..fbe4596e2b 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -42,7 +42,7 @@ function create_fragment(ctx) { if (changed.y && !scrolling) { scrolling = true; clearTimeout(scrolling_timeout); - scrollTo(pageXOffset, ctx.y); + scrollTo(window.pageXOffset, ctx.y); scrolling_timeout = setTimeout(clear_scrolling, 100); } From 9bce3fc586557d51ededbf82a6d99b36fbb8fc74 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 16 Jun 2019 19:18:50 -0400 Subject: [PATCH 290/510] fix text nodes in .innerHTML-optimized output - collapse whitespace to single space when appropriate (#2745) - escape template string characters in script and style tags --- src/compiler/compile/render-dom/wrappers/Element/index.ts | 6 ++++-- test/runtime/samples/script-style-non-top-level/_config.js | 2 +- test/runtime/samples/script-style-non-top-level/main.svelte | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/compiler/compile/render-dom/wrappers/Element/index.ts b/src/compiler/compile/render-dom/wrappers/Element/index.ts index 2f7452e8c6..397ef02655 100644 --- a/src/compiler/compile/render-dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render-dom/wrappers/Element/index.ts @@ -335,6 +335,8 @@ export default class ElementWrapper extends Wrapper { function to_html(wrapper: ElementWrapper | TextWrapper) { if (wrapper.node.type === 'Text') { + if (wrapper.node.use_space) return ' '; + const parent = wrapper.node.parent as Element; const raw = parent && ( @@ -342,9 +344,9 @@ export default class ElementWrapper extends Wrapper { parent.name === 'style' ); - return raw + return (raw ? wrapper.node.data - : escape_html(wrapper.node.data) + : escape_html(wrapper.node.data)) .replace(/\\/g, '\\\\') .replace(/`/g, '\\`') .replace(/\$/g, '\\$'); diff --git a/test/runtime/samples/script-style-non-top-level/_config.js b/test/runtime/samples/script-style-non-top-level/_config.js index 1aade72239..86eddf4611 100644 --- a/test/runtime/samples/script-style-non-top-level/_config.js +++ b/test/runtime/samples/script-style-non-top-level/_config.js @@ -2,7 +2,7 @@ export default { html: `
    - +
    ` }; \ No newline at end of file diff --git a/test/runtime/samples/script-style-non-top-level/main.svelte b/test/runtime/samples/script-style-non-top-level/main.svelte index 94cf72e4bd..73b0dfcf38 100644 --- a/test/runtime/samples/script-style-non-top-level/main.svelte +++ b/test/runtime/samples/script-style-non-top-level/main.svelte @@ -1,4 +1,4 @@
    - +
    \ No newline at end of file From d9046786a1600c83d8b48a71e6ff2a5620e1f6db Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 18 Jun 2019 23:02:30 -0400 Subject: [PATCH 291/510] Track which blocks are outroing to prevent duplication * track whether block is already outroing * get tests passing * use transition_in and transition_out helpers * fix some stuff * fix non-existent dynamic component outros * another fix * another fix * argh so close * NAILED IT * remove unused code * tidy up --- .../compile/render-dom/wrappers/AwaitBlock.ts | 4 +- .../compile/render-dom/wrappers/EachBlock.ts | 41 ++---- .../compile/render-dom/wrappers/IfBlock.ts | 63 ++++----- .../wrappers/InlineComponent/index.ts | 19 ++- .../compile/render-dom/wrappers/Slot.ts | 4 +- src/runtime/internal/Component.ts | 14 +- src/runtime/internal/await-block.ts | 8 +- src/runtime/internal/keyed-each.ts | 8 +- src/runtime/internal/transitions.ts | 26 +++- .../component-static-array/expected.js | 11 +- .../component-static-immutable/expected.js | 11 +- .../component-static-immutable2/expected.js | 11 +- test/js/samples/component-static/expected.js | 11 +- test/js/samples/dynamic-import/expected.js | 11 +- .../non-imported-component/expected.js | 17 ++- test/js/samples/transition-local/expected.js | 7 +- .../transition-repeated-outro/expected.js | 129 ++++++++++++++++++ .../transition-repeated-outro/input.svelte | 11 ++ 18 files changed, 285 insertions(+), 121 deletions(-) create mode 100644 test/js/samples/transition-repeated-outro/expected.js create mode 100644 test/js/samples/transition-repeated-outro/input.svelte diff --git a/src/compiler/compile/render-dom/wrappers/AwaitBlock.ts b/src/compiler/compile/render-dom/wrappers/AwaitBlock.ts index c7af29a073..346dbe9ca0 100644 --- a/src/compiler/compile/render-dom/wrappers/AwaitBlock.ts +++ b/src/compiler/compile/render-dom/wrappers/AwaitBlock.ts @@ -177,7 +177,7 @@ export default class AwaitBlockWrapper extends Wrapper { `); if (has_transitions) { - block.builders.intro.add_line(`${info}.block.i();`); + block.builders.intro.add_line(`@transition_in(${info}.block);`); } const conditions = []; @@ -216,7 +216,7 @@ export default class AwaitBlockWrapper extends Wrapper { block.builders.outro.add_block(deindent` for (let #i = 0; #i < 3; #i += 1) { const block = ${info}.blocks[#i]; - if (block) block.o(); + @transition_out(block); } `); } diff --git a/src/compiler/compile/render-dom/wrappers/EachBlock.ts b/src/compiler/compile/render-dom/wrappers/EachBlock.ts index a1a875a12f..c26b58c356 100644 --- a/src/compiler/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compiler/compile/render-dom/wrappers/EachBlock.ts @@ -204,7 +204,7 @@ export default class EachBlockWrapper extends Wrapper { if (this.block.has_intro_method || this.block.has_outro_method) { block.builders.intro.add_block(deindent` - for (var #i = 0; #i < ${this.vars.data_length}; #i += 1) ${this.vars.iterations}[#i].i(); + for (var #i = 0; #i < ${this.vars.data_length}; #i += 1) @transition_in(${this.vars.iterations}[#i]); `); } @@ -362,7 +362,7 @@ export default class EachBlockWrapper extends Wrapper { if (this.block.has_outros) { block.builders.outro.add_block(deindent` - for (#i = 0; #i < ${view_length}; #i += 1) ${iterations}[#i].o(); + for (#i = 0; #i < ${view_length}; #i += 1) @transition_out(${iterations}[#i]); `); } @@ -425,24 +425,6 @@ export default class EachBlockWrapper extends Wrapper { all_dependencies.add(dependency); }); - const outro_block = this.block.has_outros && block.get_unique_name('outro_block'); - if (outro_block) { - block.builders.init.add_block(deindent` - function ${outro_block}(i, detaching, local) { - if (${iterations}[i]) { - if (detaching) { - @on_outro(() => { - ${iterations}[i].d(detaching); - ${iterations}[i] = null; - }); - } - - ${iterations}[i].o(local); - } - } - `); - } - const condition = Array.from(all_dependencies) .map(dependency => `changed.${dependency}`) .join(' || '); @@ -454,18 +436,18 @@ export default class EachBlockWrapper extends Wrapper { ? deindent` if (${iterations}[#i]) { ${iterations}[#i].p(changed, child_ctx); - ${has_transitions && `${iterations}[#i].i(1);`} + ${has_transitions && `@transition_in(${this.vars.iterations}[#i], 1);`} } else { ${iterations}[#i] = ${create_each_block}(child_ctx); ${iterations}[#i].c(); - ${has_transitions && `${iterations}[#i].i(1);`} + ${has_transitions && `@transition_in(${this.vars.iterations}[#i], 1);`} ${iterations}[#i].m(${update_mount_node}, ${anchor}); } ` : deindent` ${iterations}[#i] = ${create_each_block}(child_ctx); ${iterations}[#i].c(); - ${has_transitions && `${iterations}[#i].i(1);`} + ${has_transitions && `@transition_in(${this.vars.iterations}[#i], 1);`} ${iterations}[#i].m(${update_mount_node}, ${anchor}); `; @@ -474,9 +456,16 @@ export default class EachBlockWrapper extends Wrapper { let remove_old_blocks; if (this.block.has_outros) { + const out = block.get_unique_name('out'); + + block.builders.init.add_block(deindent` + const ${out} = i => @transition_out(${iterations}[i], 1, () => { + ${iterations}[i] = null; + }); + `); remove_old_blocks = deindent` @group_outros(); - for (; #i < ${view_length}; #i += 1) ${outro_block}(#i, 1, 1); + for (; #i < ${view_length}; #i += 1) ${out}(#i); @check_outros(); `; } else { @@ -507,10 +496,10 @@ export default class EachBlockWrapper extends Wrapper { `); } - if (outro_block) { + if (this.block.has_outros) { block.builders.outro.add_block(deindent` ${iterations} = ${iterations}.filter(Boolean); - for (let #i = 0; #i < ${view_length}; #i += 1) ${outro_block}(#i, 0, 0);` + for (let #i = 0; #i < ${view_length}; #i += 1) @transition_out(${iterations}[#i]);` ); } diff --git a/src/compiler/compile/render-dom/wrappers/IfBlock.ts b/src/compiler/compile/render-dom/wrappers/IfBlock.ts index 46f17653a1..aa0a7aef99 100644 --- a/src/compiler/compile/render-dom/wrappers/IfBlock.ts +++ b/src/compiler/compile/render-dom/wrappers/IfBlock.ts @@ -160,7 +160,7 @@ export default class IfBlockWrapper extends Wrapper { if (has_outros) { this.render_compound_with_outros(block, parent_node, parent_nodes, dynamic, vars, detaching); - block.builders.outro.add_line(`if (${name}) ${name}.o();`); + block.builders.outro.add_line(`@transition_out(${name});`); } else { this.render_compound(block, parent_node, parent_nodes, dynamic, vars, detaching); } @@ -168,7 +168,7 @@ export default class IfBlockWrapper extends Wrapper { this.render_simple(block, parent_node, parent_nodes, dynamic, vars, detaching); if (has_outros) { - block.builders.outro.add_line(`if (${name}) ${name}.o();`); + block.builders.outro.add_line(`@transition_out(${name});`); } } @@ -181,7 +181,7 @@ export default class IfBlockWrapper extends Wrapper { } if (has_intros || has_outros) { - block.builders.intro.add_line(`if (${name}) ${name}.i();`); + block.builders.intro.add_line(`@transition_in(${name});`); } if (needs_anchor) { @@ -238,7 +238,7 @@ export default class IfBlockWrapper extends Wrapper { ${name} = ${current_block_type_and}${current_block_type}(ctx); if (${name}) { ${name}.c(); - ${has_transitions && `${name}.i(1);`} + ${has_transitions && `@transition_in(${name}, 1);`} ${name}.m(${update_mount_node}, ${anchor}); } `; @@ -326,11 +326,9 @@ export default class IfBlockWrapper extends Wrapper { const destroy_old_block = deindent` @group_outros(); - @on_outro(() => { - ${if_blocks}[${previous_block_index}].d(1); + @transition_out(${if_blocks}[${previous_block_index}], 1, () => { ${if_blocks}[${previous_block_index}] = null; }); - ${name}.o(1); @check_outros(); `; @@ -340,7 +338,7 @@ export default class IfBlockWrapper extends Wrapper { ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](ctx); ${name}.c(); } - ${has_transitions && `${name}.i(1);`} + ${has_transitions && `@transition_in(${name}, 1);`} ${name}.m(${update_mount_node}, ${anchor}); `; @@ -414,11 +412,11 @@ export default class IfBlockWrapper extends Wrapper { ? deindent` if (${name}) { ${name}.p(changed, ctx); - ${has_transitions && `${name}.i(1);`} + ${has_transitions && `@transition_in(${name}, 1);`} } else { ${name} = ${branch.block.name}(ctx); ${name}.c(); - ${has_transitions && `${name}.i(1);`} + ${has_transitions && `@transition_in(${name}, 1);`} ${name}.m(${update_mount_node}, ${anchor}); } ` @@ -426,38 +424,37 @@ export default class IfBlockWrapper extends Wrapper { if (!${name}) { ${name} = ${branch.block.name}(ctx); ${name}.c(); - ${has_transitions && `${name}.i(1);`} + ${has_transitions && `@transition_in(${name}, 1);`} ${name}.m(${update_mount_node}, ${anchor}); ${has_transitions && `} else { - ${name}.i(1);`} + @transition_in(${name}, 1);`} } `; // no `p()` here — we don't want to update outroing nodes, // as that will typically result in glitching - const exit = branch.block.has_outro_method - ? deindent` - @group_outros(); - @on_outro(() => { + if (branch.block.has_outro_method) { + block.builders.update.add_block(deindent` + if (${branch.condition}) { + ${enter} + } else if (${name}) { + @group_outros(); + @transition_out(${name}, 1, () => { + ${name} = null; + }); + @check_outros(); + } + `); + } else { + block.builders.update.add_block(deindent` + if (${branch.condition}) { + ${enter} + } else if (${name}) { ${name}.d(1); ${name} = null; - }); - - ${name}.o(1); - @check_outros(); - ` - : deindent` - ${name}.d(1); - ${name} = null; - `; - - block.builders.update.add_block(deindent` - if (${branch.condition}) { - ${enter} - } else if (${name}) { - ${exit} - } - `); + } + `); + } block.builders.destroy.add_line(`${if_name}${name}.d(${detaching});`); } diff --git a/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts index 696fff51c0..8d5c751add 100644 --- a/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts @@ -423,10 +423,9 @@ export default class InlineComponentWrapper extends Wrapper { if (${name}) { @group_outros(); const old_component = ${name}; - @on_outro(() => { - old_component.$destroy(); + @transition_out(old_component.$$.fragment, 1, () => { + @destroy_component(old_component); }); - old_component.$$.fragment.o(1); @check_outros(); } @@ -437,7 +436,7 @@ export default class InlineComponentWrapper extends Wrapper { ${munged_handlers} ${name}.$$.fragment.c(); - ${name}.$$.fragment.i(1); + @transition_in(${name}.$$.fragment, 1); @mount_component(${name}, ${update_mount_node}, ${anchor}); } else { ${name} = null; @@ -446,7 +445,7 @@ export default class InlineComponentWrapper extends Wrapper { `); block.builders.intro.add_block(deindent` - if (${name}) ${name}.$$.fragment.i(#local); + @transition_in(${name}.$$.fragment, #local); `); if (updates.length) { @@ -458,10 +457,10 @@ export default class InlineComponentWrapper extends Wrapper { } block.builders.outro.add_line( - `if (${name}) ${name}.$$.fragment.o(#local);` + `if (${name}) @transition_out(${name}.$$.fragment, #local);` ); - block.builders.destroy.add_line(`if (${name}) ${name}.$destroy(${parent_node ? '' : 'detaching'});`); + block.builders.destroy.add_line(`if (${name}) @destroy_component(${name}, ${parent_node ? '' : 'detaching'});`); } else { const expression = this.node.name === 'svelte:self' ? '__svelte:self__' // TODO conflict-proof this @@ -490,7 +489,7 @@ export default class InlineComponentWrapper extends Wrapper { ); block.builders.intro.add_block(deindent` - ${name}.$$.fragment.i(#local); + @transition_in(${name}.$$.fragment, #local); `); if (updates.length) { @@ -501,11 +500,11 @@ export default class InlineComponentWrapper extends Wrapper { } block.builders.destroy.add_block(deindent` - ${name}.$destroy(${parent_node ? '' : 'detaching'}); + @destroy_component(${name}, ${parent_node ? '' : 'detaching'}); `); block.builders.outro.add_line( - `${name}.$$.fragment.o(#local);` + `@transition_out(${name}.$$.fragment, #local);` ); } } diff --git a/src/compiler/compile/render-dom/wrappers/Slot.ts b/src/compiler/compile/render-dom/wrappers/Slot.ts index 5347b87de4..3376a797b8 100644 --- a/src/compiler/compile/render-dom/wrappers/Slot.ts +++ b/src/compiler/compile/render-dom/wrappers/Slot.ts @@ -142,11 +142,11 @@ export default class SlotWrapper extends Wrapper { `); block.builders.intro.add_line( - `if (${slot} && ${slot}.i) ${slot}.i(#local);` + `@transition_in(${slot}, #local);` ); block.builders.outro.add_line( - `if (${slot} && ${slot}.o) ${slot}.o(#local);` + `@transition_out(${slot}, #local);` ); let update_conditions = [...this.dependencies].map(name => `changed.${name}`).join(' || '); diff --git a/src/runtime/internal/Component.ts b/src/runtime/internal/Component.ts index 7624d5c829..753d1c8a98 100644 --- a/src/runtime/internal/Component.ts +++ b/src/runtime/internal/Component.ts @@ -2,6 +2,7 @@ import { add_render_callback, flush, schedule_update, dirty_components } from '. import { current_component, set_current_component } from './lifecycle'; import { blank_object, is_function, run, run_all, noop } from './utils'; import { children } from './dom'; +import { transition_in } from './transitions'; // eslint-disable-next-line @typescript-eslint/class-name-casing interface T$$ { @@ -49,10 +50,11 @@ export function mount_component(component, target, anchor) { after_render.forEach(add_render_callback); } -function destroy(component, detaching) { - if (component.$$) { +export function destroy_component(component, detaching) { + if (component.$$.fragment) { run_all(component.$$.on_destroy); - component.$$.fragment.d(detaching); + + if (detaching) component.$$.fragment.d(1); // TODO null out other refs, including component.$$ (but need to // preserve final state?) @@ -123,7 +125,7 @@ export function init(component, options, instance, create_fragment, not_equal, p $$.fragment!.c(); } - if (options.intro && component.$$.fragment.i) component.$$.fragment.i(); + if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } @@ -153,7 +155,7 @@ if (typeof HTMLElement !== 'undefined') { } $destroy() { - destroy(this, true); + destroy_component(this, 1); this.$destroy = noop; } @@ -178,7 +180,7 @@ export class SvelteComponent { $$: T$$; $destroy() { - destroy(this, true); + destroy_component(this, 1); this.$destroy = noop; } diff --git a/src/runtime/internal/await-block.ts b/src/runtime/internal/await-block.ts index 9527b000ca..a3313497ff 100644 --- a/src/runtime/internal/await-block.ts +++ b/src/runtime/internal/await-block.ts @@ -1,5 +1,5 @@ import { assign, is_promise } from './utils'; -import { check_outros, group_outros, on_outro } from './transitions'; +import { check_outros, group_outros, transition_in, transition_out } from './transitions'; import { flush } from '../internal/scheduler'; export function handle_promise(promise, info) { @@ -18,11 +18,9 @@ export function handle_promise(promise, info) { info.blocks.forEach((block, i) => { if (i !== index && block) { group_outros(); - on_outro(() => { - block.d(1); + transition_out(block, 1, () => { info.blocks[i] = null; }); - block.o(1); check_outros(); } }); @@ -31,7 +29,7 @@ export function handle_promise(promise, info) { } block.c(); - if (block.i) block.i(1); + transition_in(block, 1); block.m(info.mount(), info.anchor); flush(); diff --git a/src/runtime/internal/keyed-each.ts b/src/runtime/internal/keyed-each.ts index f13c858897..33a5f4d1a6 100644 --- a/src/runtime/internal/keyed-each.ts +++ b/src/runtime/internal/keyed-each.ts @@ -1,4 +1,4 @@ -import { on_outro } from './transitions'; +import { transition_in, transition_out } from './transitions'; export function destroy_block(block, lookup) { block.d(1); @@ -6,11 +6,9 @@ export function destroy_block(block, lookup) { } export function outro_and_destroy_block(block, lookup) { - on_outro(() => { + transition_out(block, 1, () => { destroy_block(block, lookup); }); - - block.o(1); } export function fix_and_destroy_block(block, lookup) { @@ -57,7 +55,7 @@ export function update_keyed_each(old_blocks, changed, get_key, dynamic, ctx, li const did_move = new Set(); function insert(block) { - if (block.i) block.i(1); + transition_in(block, 1); block.m(node, next); lookup.set(block.key, block); next = block.first; diff --git a/src/runtime/internal/transitions.ts b/src/runtime/internal/transitions.ts index 80c76ffec5..bbb24ba9ee 100644 --- a/src/runtime/internal/transitions.ts +++ b/src/runtime/internal/transitions.ts @@ -23,6 +23,7 @@ function dispatch(node: Element, direction: boolean, kind: 'start' | 'end') { node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`)); } +const outroing = new Set(); let outros; export function group_outros() { @@ -38,9 +39,30 @@ export function check_outros() { } } -export function on_outro(callback) { - outros.callbacks.push(callback); +export function transition_in(block, local?: 0 | 1) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } } + +export function transition_out(block, local: 0 | 1, callback) { + if (block && block.o) { + if (outroing.has(block)) return; + outroing.add(block); + + outros.callbacks.push(() => { + outroing.delete(block); + if (callback) { + block.d(1); + callback(); + } + }); + + block.o(local); + } +} + type TransitionFn = (node: Element, params: any) => TransitionConfig; export function create_in_transition(node: Element & ElementCSSInlineStyle, fn: TransitionFn, params: any) { diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js index 875c741076..6997f431dd 100644 --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -1,10 +1,13 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, + destroy_component, init, mount_component, noop, - safe_not_equal + safe_not_equal, + transition_in, + transition_out } from "svelte/internal"; function create_fragment(ctx) { @@ -26,18 +29,18 @@ function create_fragment(ctx) { i(local) { if (current) return; - nested.$$.fragment.i(local); + transition_in(nested.$$.fragment, local); current = true; }, o(local) { - nested.$$.fragment.o(local); + transition_out(nested.$$.fragment, local); current = false; }, d(detaching) { - nested.$destroy(detaching); + destroy_component(nested, detaching); } }; } diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js index 6612a7f1b6..4b33d537ca 100644 --- a/test/js/samples/component-static-immutable/expected.js +++ b/test/js/samples/component-static-immutable/expected.js @@ -1,10 +1,13 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, + destroy_component, init, mount_component, noop, - not_equal + not_equal, + transition_in, + transition_out } from "svelte/internal"; function create_fragment(ctx) { @@ -26,18 +29,18 @@ function create_fragment(ctx) { i(local) { if (current) return; - nested.$$.fragment.i(local); + transition_in(nested.$$.fragment, local); current = true; }, o(local) { - nested.$$.fragment.o(local); + transition_out(nested.$$.fragment, local); current = false; }, d(detaching) { - nested.$destroy(detaching); + destroy_component(nested, detaching); } }; } diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js index 6612a7f1b6..4b33d537ca 100644 --- a/test/js/samples/component-static-immutable2/expected.js +++ b/test/js/samples/component-static-immutable2/expected.js @@ -1,10 +1,13 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, + destroy_component, init, mount_component, noop, - not_equal + not_equal, + transition_in, + transition_out } from "svelte/internal"; function create_fragment(ctx) { @@ -26,18 +29,18 @@ function create_fragment(ctx) { i(local) { if (current) return; - nested.$$.fragment.i(local); + transition_in(nested.$$.fragment, local); current = true; }, o(local) { - nested.$$.fragment.o(local); + transition_out(nested.$$.fragment, local); current = false; }, d(detaching) { - nested.$destroy(detaching); + destroy_component(nested, detaching); } }; } diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js index 12ebeb28b7..5a031a32a4 100644 --- a/test/js/samples/component-static/expected.js +++ b/test/js/samples/component-static/expected.js @@ -1,10 +1,13 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, + destroy_component, init, mount_component, noop, - safe_not_equal + safe_not_equal, + transition_in, + transition_out } from "svelte/internal"; function create_fragment(ctx) { @@ -26,18 +29,18 @@ function create_fragment(ctx) { i(local) { if (current) return; - nested.$$.fragment.i(local); + transition_in(nested.$$.fragment, local); current = true; }, o(local) { - nested.$$.fragment.o(local); + transition_out(nested.$$.fragment, local); current = false; }, d(detaching) { - nested.$destroy(detaching); + destroy_component(nested, detaching); } }; } diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index 2d51bcf60d..9a6a67bcd9 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -1,10 +1,13 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, + destroy_component, init, mount_component, noop, - safe_not_equal + safe_not_equal, + transition_in, + transition_out } from "svelte/internal"; import LazyLoad from "./LazyLoad.svelte"; @@ -27,18 +30,18 @@ function create_fragment(ctx) { i(local) { if (current) return; - lazyload.$$.fragment.i(local); + transition_in(lazyload.$$.fragment, local); current = true; }, o(local) { - lazyload.$$.fragment.o(local); + transition_out(lazyload.$$.fragment, local); current = false; }, d(detaching) { - lazyload.$destroy(detaching); + destroy_component(lazyload, detaching); } }; } diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index 20ac461c76..42a21aa496 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -1,13 +1,16 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent, + destroy_component, detach, init, insert, mount_component, noop, safe_not_equal, - space + space, + transition_in, + transition_out } from "svelte/internal"; import Imported from "Imported.svelte"; @@ -36,27 +39,27 @@ function create_fragment(ctx) { i(local) { if (current) return; - imported.$$.fragment.i(local); + transition_in(imported.$$.fragment, local); - nonimported.$$.fragment.i(local); + transition_in(nonimported.$$.fragment, local); current = true; }, o(local) { - imported.$$.fragment.o(local); - nonimported.$$.fragment.o(local); + transition_out(imported.$$.fragment, local); + transition_out(nonimported.$$.fragment, local); current = false; }, d(detaching) { - imported.$destroy(detaching); + destroy_component(imported, detaching); if (detaching) { detach(t); } - nonimported.$destroy(detaching); + destroy_component(nonimported, detaching); } }; } diff --git a/test/js/samples/transition-local/expected.js b/test/js/samples/transition-local/expected.js index 2df99a4c87..53bce5f5d0 100644 --- a/test/js/samples/transition-local/expected.js +++ b/test/js/samples/transition-local/expected.js @@ -9,7 +9,8 @@ import { init, insert, noop, - safe_not_equal + safe_not_equal, + transition_in } from "svelte/internal"; // (8:0) {#if x} @@ -34,10 +35,10 @@ function create_if_block(ctx) { if (!if_block) { if_block = create_if_block_1(ctx); if_block.c(); - if_block.i(1); + transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); } else { - if_block.i(1); + transition_in(if_block, 1); } } else if (if_block) { if_block.d(1); diff --git a/test/js/samples/transition-repeated-outro/expected.js b/test/js/samples/transition-repeated-outro/expected.js new file mode 100644 index 0000000000..959bd47201 --- /dev/null +++ b/test/js/samples/transition-repeated-outro/expected.js @@ -0,0 +1,129 @@ +/* generated by Svelte vX.Y.Z */ +import { + SvelteComponent, + check_outros, + create_out_transition, + detach, + element, + empty, + group_outros, + init, + insert, + safe_not_equal, + transition_in, + transition_out +} from "svelte/internal"; +import { fade } from "svelte/transition"; + +// (7:0) {#if num < 5} +function create_if_block(ctx) { + var div, div_outro, current; + + return { + c() { + div = element("div"); + div.innerHTML = `

    wheeee

    `; + }, + + m(target, anchor) { + insert(target, div, anchor); + current = true; + }, + + i(local) { + if (current) return; + if (div_outro) div_outro.end(1); + + current = true; + }, + + o(local) { + div_outro = create_out_transition(div, fade, {}); + + current = false; + }, + + d(detaching) { + if (detaching) { + detach(div); + if (div_outro) div_outro.end(); + } + } + }; +} + +function create_fragment(ctx) { + var if_block_anchor, current; + + var if_block = (ctx.num < 5) && create_if_block(ctx); + + return { + c() { + if (if_block) if_block.c(); + if_block_anchor = empty(); + }, + + m(target, anchor) { + if (if_block) if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + + p(changed, ctx) { + if (ctx.num < 5) { + if (!if_block) { + if_block = create_if_block(ctx); + if_block.c(); + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } else { + transition_in(if_block, 1); + } + } else if (if_block) { + group_outros(); + transition_out(if_block, 1, () => { + if_block = null; + }); + check_outros(); + } + }, + + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + + o(local) { + transition_out(if_block); + current = false; + }, + + d(detaching) { + if (if_block) if_block.d(detaching); + + if (detaching) { + detach(if_block_anchor); + } + } + }; +} + +function instance($$self, $$props, $$invalidate) { + let { num = 1 } = $$props; + + $$self.$set = $$props => { + if ('num' in $$props) $$invalidate('num', num = $$props.num); + }; + + return { num }; +} + +class Component extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal, ["num"]); + } +} + +export default Component; \ No newline at end of file diff --git a/test/js/samples/transition-repeated-outro/input.svelte b/test/js/samples/transition-repeated-outro/input.svelte new file mode 100644 index 0000000000..d5114846b8 --- /dev/null +++ b/test/js/samples/transition-repeated-outro/input.svelte @@ -0,0 +1,11 @@ + + +{#if num < 5} +
    +

    wheeee

    +
    +{/if} \ No newline at end of file From 1f1ce3ebd7b7082cc4e7a0b4b1c03424d8cf3595 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 18 Jun 2019 23:18:32 -0400 Subject: [PATCH 292/510] -> v3.5.2 --- CHANGELOG.md | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1adaf0b76..0d9c81487e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Svelte changelog +## 3.5.2 + +* Prevent duplicated outros causing errors ([#3001](https://github.com/sveltejs/svelte/issues/3001)) +* Fix automatic name generation ([#2843](https://github.com/sveltejs/svelte/issues/2843)) +* Fix .d.ts stubs ([#3009](https://github.com/sveltejs/svelte/pull/3009)) +* Don't strip non-breaking spaces ([#3014](https://github.com/sveltejs/svelte/issues/3014)) +* Fix `requestAnimationFrame` context ([#2933](https://github.com/sveltejs/svelte/issues/2933)) +* Allow space before attribute value ([#3026](https://github.com/sveltejs/svelte/issues/3026)) +* Remove null/undefined attributes ([#1434](https://github.com/sveltejs/svelte/issues/1434)) +* Fix whitespace in static markup ([#3030](https://github.com/sveltejs/svelte/pull/3030)) + ## 3.5.1 * Accommodate webpack idiosyncracies diff --git a/package.json b/package.json index 37bd6f75e7..8f248473c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.5.1", + "version": "3.5.2", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From f9054bc4396b4d1cb13e10cfe52abf5b22f0f96d Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 18 Jun 2019 23:20:59 -0400 Subject: [PATCH 293/510] update svelte --- site/package-lock.json | 6 +++--- site/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 6d6f96eb21..9d4c8c9c8c 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -4671,9 +4671,9 @@ } }, "svelte": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.5.1.tgz", - "integrity": "sha512-iMnuyteFGQ8Yl68G/DHTHY1sLwoAMya1eS0ZOHIm/dqn2etR8WEe8hUAoluLryde4Cft4gvMhtHV3NhE60nBmQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.5.2.tgz", + "integrity": "sha512-tDLd2ghONtUQeepa6LkcWEf9KkxuTQmfM4LwhWx1SH4Xzg38Kc0u051of34mWEfm3gG5h4dtk7Wuu2Aw7c60Yw==", "dev": true }, "tar": { diff --git a/site/package.json b/site/package.json index 28c5004189..9bace481ae 100644 --- a/site/package.json +++ b/site/package.json @@ -55,7 +55,7 @@ "rollup-plugin-terser": "^4.0.4", "sapper": "^0.27.3", "shelljs": "^0.8.3", - "svelte": "^3.5.1" + "svelte": "^3.5.2" }, "engines": { "node": ">=10.0.0" From 7b5f17676445555f4e7bea40e704681b9cfb5846 Mon Sep 17 00:00:00 2001 From: Bryan Terce Date: Wed, 19 Jun 2019 16:42:33 -0700 Subject: [PATCH 294/510] Fix each blocks not unmounting components correctly (#3056) * Prevent outro from invoking detach multiple times * Add tests for unmounting entries in an each block * Remove redundant function for removing from lookup --- src/runtime/internal/keyed-each.ts | 2 +- .../each-block-keyed-shift/Nested.svelte | 5 ++++ .../samples/each-block-keyed-shift/_config.js | 27 +++++++++++++++++++ .../each-block-keyed-shift/main.svelte | 9 +++++++ 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/each-block-keyed-shift/Nested.svelte create mode 100644 test/runtime/samples/each-block-keyed-shift/_config.js create mode 100644 test/runtime/samples/each-block-keyed-shift/main.svelte diff --git a/src/runtime/internal/keyed-each.ts b/src/runtime/internal/keyed-each.ts index 33a5f4d1a6..e18ae61770 100644 --- a/src/runtime/internal/keyed-each.ts +++ b/src/runtime/internal/keyed-each.ts @@ -7,7 +7,7 @@ export function destroy_block(block, lookup) { export function outro_and_destroy_block(block, lookup) { transition_out(block, 1, () => { - destroy_block(block, lookup); + lookup.delete(block.key); }); } diff --git a/test/runtime/samples/each-block-keyed-shift/Nested.svelte b/test/runtime/samples/each-block-keyed-shift/Nested.svelte new file mode 100644 index 0000000000..82df711742 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-shift/Nested.svelte @@ -0,0 +1,5 @@ + + +

    {title}

    \ No newline at end of file diff --git a/test/runtime/samples/each-block-keyed-shift/_config.js b/test/runtime/samples/each-block-keyed-shift/_config.js new file mode 100644 index 0000000000..44ca8447f0 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-shift/_config.js @@ -0,0 +1,27 @@ +export default { + props: { + titles: [{ name: 'a', }, { name: 'b' }, { name: 'c' }] + }, + + html: ` +

    a

    +

    b

    +

    c

    + `, + + test({ assert, component, target }) { + component.titles = [{ name: 'b' }, { name: 'c' }]; + + assert.htmlEqual(target.innerHTML, ` +

    b

    +

    c

    + `); + + component.titles = [{ name: 'c' }]; + + assert.htmlEqual(target.innerHTML, ` +

    c

    + `); + + } +}; diff --git a/test/runtime/samples/each-block-keyed-shift/main.svelte b/test/runtime/samples/each-block-keyed-shift/main.svelte new file mode 100644 index 0000000000..b8954e17fd --- /dev/null +++ b/test/runtime/samples/each-block-keyed-shift/main.svelte @@ -0,0 +1,9 @@ + + +{#each titles as title (title.name)} + +{/each} \ No newline at end of file From 7de5d6c07aa6fb582860b57ca40626cff2741d0c Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Wed, 19 Jun 2019 19:44:03 -0400 Subject: [PATCH 295/510] -> v3.5.3 --- CHANGELOG.md | 4 ++++ package-lock.json | 16 ++++++++-------- package.json | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d9c81487e..94d7326eea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## 3.5.3 + +* Don't double-destroy keyed each blocks with outros ([#3055](https://github.com/sveltejs/svelte/issues/3055)) + ## 3.5.2 * Prevent duplicated outros causing errors ([#3001](https://github.com/sveltejs/svelte/issues/3001)) diff --git a/package-lock.json b/package-lock.json index aea08689b1..8a28bf9997 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.5.1", + "version": "3.5.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -253,7 +253,7 @@ }, "array-equal": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, @@ -676,7 +676,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -1876,7 +1876,7 @@ }, "is-builtin-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { @@ -2357,7 +2357,7 @@ }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, @@ -2384,7 +2384,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -2790,7 +2790,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -3527,7 +3527,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { diff --git a/package.json b/package.json index 8f248473c3..9047af529e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.5.2", + "version": "3.5.3", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From 5d51d50613537c525c74ed37a7edb4363459380c Mon Sep 17 00:00:00 2001 From: igoradamenko Date: Fri, 21 Jun 2019 19:30:30 +0300 Subject: [PATCH 296/510] site: reuse `layers` variable in window bindings tutorial --- .../04-svelte-window-bindings/app-a/App.svelte | 2 +- .../04-svelte-window-bindings/app-b/App.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-a/App.svelte b/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-a/App.svelte index fc6725e894..04b4de5cf2 100644 --- a/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-a/App.svelte +++ b/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-a/App.svelte @@ -7,7 +7,7 @@
    - {#each [0, 1, 2, 3, 4, 5, 6, 7, 8] as layer} + {#each layers as layer} - {#each [0, 1, 2, 3, 4, 5, 6, 7, 8] as layer} + {#each layers as layer} Date: Fri, 21 Jun 2019 10:46:50 -0700 Subject: [PATCH 297/510] preserve whitespace at each block boundaries (#713) --- .../compile/render-dom/wrappers/Fragment.ts | 9 ++++++++- .../fragment-trailing-whitespace/_config.js | 16 ++++++++++++++++ .../fragment-trailing-whitespace/main.svelte | 11 +++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/fragment-trailing-whitespace/_config.js create mode 100644 test/runtime/samples/fragment-trailing-whitespace/main.svelte diff --git a/src/compiler/compile/render-dom/wrappers/Fragment.ts b/src/compiler/compile/render-dom/wrappers/Fragment.ts index f2e2ab7a7a..bd20c9107f 100644 --- a/src/compiler/compile/render-dom/wrappers/Fragment.ts +++ b/src/compiler/compile/render-dom/wrappers/Fragment.ts @@ -42,6 +42,13 @@ function link(next: Wrapper, prev: Wrapper) { if (next) next.prev = prev; } +function trimmable_at(child: INode, next_sibling: Wrapper): boolean { + // Whitespace is trimmable if one of the following is true: + // The child and its sibling share a common nearest each block (not at an each block boundary) + // The next sibling's previous node is an each block + return (next_sibling.node.find_nearest(/EachBlock/) === child.find_nearest(/EachBlock/)) || next_sibling.node.prev.type === 'EachBlock'; +} + export default class FragmentWrapper { nodes: Wrapper[]; @@ -85,7 +92,7 @@ export default class FragmentWrapper { if (this.nodes.length === 0) { const should_trim = ( // @ts-ignore todo: probably error, should it be next_sibling.node.data? - next_sibling ? (next_sibling.node.type === 'Text' && /^\s/.test(next_sibling.data)) : !child.has_ancestor('EachBlock') + next_sibling ? (next_sibling.node.type === 'Text' && /^\s/.test(next_sibling.data) && trimmable_at(child, next_sibling)) : !child.has_ancestor('EachBlock') ); if (should_trim) { diff --git a/test/runtime/samples/fragment-trailing-whitespace/_config.js b/test/runtime/samples/fragment-trailing-whitespace/_config.js new file mode 100644 index 0000000000..2251d6dae8 --- /dev/null +++ b/test/runtime/samples/fragment-trailing-whitespace/_config.js @@ -0,0 +1,16 @@ +const message = "the quick brown fox jumps over the lazy dog"; +const expected = [...message].map(c => `${c + " "}`).join(""); + +export default { + props: { + message + }, + + async test({ assert, target }) { + const firstSpanList = target.children[0]; + assert.equal(firstSpanList.innerHTML, expected); + + const secondSpanList = target.children[1]; + assert.equal(secondSpanList.innerHTML, expected); + } +}; diff --git a/test/runtime/samples/fragment-trailing-whitespace/main.svelte b/test/runtime/samples/fragment-trailing-whitespace/main.svelte new file mode 100644 index 0000000000..f36f2694a6 --- /dev/null +++ b/test/runtime/samples/fragment-trailing-whitespace/main.svelte @@ -0,0 +1,11 @@ + + +
    + {#each message as char} + {char} + {/each} +
    + +
    {#each message as char}{char} {/each}
    \ No newline at end of file From b424a88a5f8221817218d53ef1e9f41500606279 Mon Sep 17 00:00:00 2001 From: mrkishi Date: Fri, 21 Jun 2019 17:24:03 -0300 Subject: [PATCH 298/510] replace ninja globals --- src/compiler/compile/render-dom/index.ts | 2 +- src/compiler/compile/render-dom/wrappers/EachBlock.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/compile/render-dom/index.ts b/src/compiler/compile/render-dom/index.ts index 3dec1a81b3..17b6fd86f2 100644 --- a/src/compiler/compile/render-dom/index.ts +++ b/src/compiler/compile/render-dom/index.ts @@ -405,7 +405,7 @@ export default function dom( unknown_props_check = deindent` const writable_props = [${writable_props.map(prop => `'${prop.export_name}'`).join(', ')}]; @_Object.keys($$props).forEach(key => { - if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(\`<${component.tag}> was created with unknown prop '\${key}'\`); + if (!writable_props.includes(key) && !key.startsWith('$$')) @_console.warn(\`<${component.tag}> was created with unknown prop '\${key}'\`); }); `; } diff --git a/src/compiler/compile/render-dom/wrappers/EachBlock.ts b/src/compiler/compile/render-dom/wrappers/EachBlock.ts index 3ce2a342a3..a117a717c5 100644 --- a/src/compiler/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compiler/compile/render-dom/wrappers/EachBlock.ts @@ -509,7 +509,7 @@ export default class EachBlockWrapper extends Wrapper { if (outro_block) { block.builders.outro.add_block(deindent` - ${iterations} = ${iterations}.filter(Boolean); + ${iterations} = ${iterations}.filter(@_Boolean); for (let #i = 0; #i < ${view_length}; #i += 1) ${outro_block}(#i, 0, 0);` ); } From b6ff88e23c03a3d13ceb6b24579953a94fd99fe4 Mon Sep 17 00:00:00 2001 From: benib Date: Sat, 22 Jun 2019 17:21:38 +0200 Subject: [PATCH 299/510] =?UTF-8?q?Add=20Neue=20Z=C3=BCrcher=20Zeitung=20l?= =?UTF-8?q?ogo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/src/routes/_components/WhosUsingSvelte.svelte | 1 + site/static/organisations/nzz.svg | 1 + 2 files changed, 2 insertions(+) create mode 100644 site/static/organisations/nzz.svg diff --git a/site/src/routes/_components/WhosUsingSvelte.svelte b/site/src/routes/_components/WhosUsingSvelte.svelte index 98a2696f64..918c07b1bf 100644 --- a/site/src/routes/_components/WhosUsingSvelte.svelte +++ b/site/src/routes/_components/WhosUsingSvelte.svelte @@ -52,6 +52,7 @@
    itslearning logo Mustlab logo Nesta logo + Neue Zürcher Zeitung logo The New York Times logo Open State Foundation logo Razorpay logo diff --git a/site/static/organisations/nzz.svg b/site/static/organisations/nzz.svg new file mode 100644 index 0000000000..70f9486263 --- /dev/null +++ b/site/static/organisations/nzz.svg @@ -0,0 +1 @@ + \ No newline at end of file From a7dd227336bee09f2aa365ad2fe00e4b5c405c6a Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Sat, 22 Jun 2019 17:42:00 +0100 Subject: [PATCH 300/510] Docs: document rest in array/object destructuring in each blocks (#2676) --- site/content/docs/02-template-syntax.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index a6e17f8bc2..aabcf1f2f3 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -188,12 +188,20 @@ If a *key* expression is provided — which must uniquely identify each list ite --- -You can freely use destructuring patterns in each blocks. +You can freely use destructuring and rest patterns in each blocks. ```html {#each items as { id, name, qty }, i (id)}
  • {i + 1}: {name} x {qty}
  • {/each} + +{#each objects as { id, ...rest }} +
  • {id}
  • +{/each} + +{#each items as [id, ...rest]} +
  • {id}
  • +{/each} ``` --- From 0b836872cf50f25eb643cf24e57a85cf6db31cbe Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Thu, 20 Jun 2019 16:28:03 +0100 Subject: [PATCH 301/510] Use consistent tag closing for elements Fixes #3061 --- site/content/docs/02-template-syntax.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index aabcf1f2f3..682012d88b 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -1249,7 +1249,7 @@ It cannot appear at the top level of your markup; it must be inside an if or eac ### `` ```sv - + ``` --- @@ -1326,7 +1326,7 @@ As with ``, this element allows you to add listeners to events on ### `` ```sv - +... ``` --- @@ -1343,7 +1343,7 @@ This element makes it possible to insert elements into `document.head`. During s ### `` ```sv - + ``` --- @@ -1359,4 +1359,4 @@ The `` element provides a place to specify per-component compile ```html -``` \ No newline at end of file +``` From 01676aac4698b4fb590aa37ea8bbb952f5282d93 Mon Sep 17 00:00:00 2001 From: Bryan Terce Date: Sun, 23 Jun 2019 05:26:00 -0700 Subject: [PATCH 302/510] Fix dynamic `bind:this` on components (#2333) --- .../render-dom/wrappers/InlineComponent/index.ts | 6 ++++-- src/compiler/compile/utils/flatten_reference.ts | 14 ++++++++------ .../binding-this-component-computed-key/Foo.svelte | 1 + .../binding-this-component-computed-key/_config.js | 8 ++++++++ .../main.svelte | 9 +++++++++ .../Foo.svelte | 1 + .../_config.js | 12 ++++++++++++ .../main.svelte | 11 +++++++++++ .../binding-this-component-each-block/Foo.svelte | 1 + .../binding-this-component-each-block/_config.js | 12 ++++++++++++ .../binding-this-component-each-block/main.svelte | 11 +++++++++++ 11 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 test/runtime/samples/binding-this-component-computed-key/Foo.svelte create mode 100644 test/runtime/samples/binding-this-component-computed-key/_config.js create mode 100644 test/runtime/samples/binding-this-component-computed-key/main.svelte create mode 100644 test/runtime/samples/binding-this-component-each-block-value/Foo.svelte create mode 100644 test/runtime/samples/binding-this-component-each-block-value/_config.js create mode 100644 test/runtime/samples/binding-this-component-each-block-value/main.svelte create mode 100644 test/runtime/samples/binding-this-component-each-block/Foo.svelte create mode 100644 test/runtime/samples/binding-this-component-each-block/_config.js create mode 100644 test/runtime/samples/binding-this-component-each-block/main.svelte diff --git a/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts index 8d5c751add..46b3df4c31 100644 --- a/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render-dom/wrappers/InlineComponent/index.ts @@ -276,15 +276,17 @@ export default class InlineComponentWrapper extends Wrapper { lhs = component.source.slice(binding.expression.node.start, binding.expression.node.end).trim(); } + const contextual_dependencies = [...binding.expression.contextual_dependencies]; + component.partly_hoisted.push(deindent` - function ${fn}($$component) { + function ${fn}(${['$$component', ...contextual_dependencies].join(', ')}) { ${lhs} = $$component; ${object && component.invalidate(object)} } `); block.builders.destroy.add_line(`ctx.${fn}(null);`); - return `@add_binding_callback(() => ctx.${fn}(${this.var}));`; + return `@add_binding_callback(() => ctx.${fn}(${[this.var, ...contextual_dependencies.map(name => `ctx.${name}`)].join(', ')}));`; } const name = component.get_unique_name(`${this.var}_${binding.name}_binding`); diff --git a/src/compiler/compile/utils/flatten_reference.ts b/src/compiler/compile/utils/flatten_reference.ts index e7d66d01ca..460cd2f1e9 100644 --- a/src/compiler/compile/utils/flatten_reference.ts +++ b/src/compiler/compile/utils/flatten_reference.ts @@ -7,10 +7,11 @@ export default function flatten_reference(node: Node) { const prop_end = node.end; while (node.type === 'MemberExpression') { - if (node.computed) return null; - nodes.unshift(node.property); - parts.unshift(node.property.name); + + if (!node.computed) { + parts.unshift(node.property.name); + } node = node.object; } @@ -20,10 +21,11 @@ export default function flatten_reference(node: Node) { ? node.name : node.type === 'ThisExpression' ? 'this' : null; - if (!name) return null; - - parts.unshift(name); nodes.unshift(node); + if (!node.computed) { + parts.unshift(name); + } + return { name, nodes, parts, keypath: `${name}[✂${prop_start}-${prop_end}✂]` }; } diff --git a/test/runtime/samples/binding-this-component-computed-key/Foo.svelte b/test/runtime/samples/binding-this-component-computed-key/Foo.svelte new file mode 100644 index 0000000000..066a48b65e --- /dev/null +++ b/test/runtime/samples/binding-this-component-computed-key/Foo.svelte @@ -0,0 +1 @@ +
    foo
    \ No newline at end of file diff --git a/test/runtime/samples/binding-this-component-computed-key/_config.js b/test/runtime/samples/binding-this-component-computed-key/_config.js new file mode 100644 index 0000000000..415d2e641c --- /dev/null +++ b/test/runtime/samples/binding-this-component-computed-key/_config.js @@ -0,0 +1,8 @@ +export default { + skip_if_ssr: true, + + html: ` +
    foo
    +
    has foo: true
    + ` +}; diff --git a/test/runtime/samples/binding-this-component-computed-key/main.svelte b/test/runtime/samples/binding-this-component-computed-key/main.svelte new file mode 100644 index 0000000000..af450ea1fe --- /dev/null +++ b/test/runtime/samples/binding-this-component-computed-key/main.svelte @@ -0,0 +1,9 @@ + + + +
    + has foo: {!!foo.computed} +
    diff --git a/test/runtime/samples/binding-this-component-each-block-value/Foo.svelte b/test/runtime/samples/binding-this-component-each-block-value/Foo.svelte new file mode 100644 index 0000000000..066a48b65e --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block-value/Foo.svelte @@ -0,0 +1 @@ +
    foo
    \ No newline at end of file diff --git a/test/runtime/samples/binding-this-component-each-block-value/_config.js b/test/runtime/samples/binding-this-component-each-block-value/_config.js new file mode 100644 index 0000000000..2b5df8c595 --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block-value/_config.js @@ -0,0 +1,12 @@ +export default { + skip_if_ssr: true, + + html: ` +
    foo
    +
    first has foo: true
    +
    foo
    +
    second has foo: true
    +
    foo
    +
    third has foo: true
    + ` +}; diff --git a/test/runtime/samples/binding-this-component-each-block-value/main.svelte b/test/runtime/samples/binding-this-component-each-block-value/main.svelte new file mode 100644 index 0000000000..5093eecd3f --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block-value/main.svelte @@ -0,0 +1,11 @@ + + +{#each ["first", "second", "third"] as value} + +
    + {value} has foo: {!!foo[value]} +
    +{/each} diff --git a/test/runtime/samples/binding-this-component-each-block/Foo.svelte b/test/runtime/samples/binding-this-component-each-block/Foo.svelte new file mode 100644 index 0000000000..066a48b65e --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block/Foo.svelte @@ -0,0 +1 @@ +
    foo
    \ No newline at end of file diff --git a/test/runtime/samples/binding-this-component-each-block/_config.js b/test/runtime/samples/binding-this-component-each-block/_config.js new file mode 100644 index 0000000000..358c5b5afc --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block/_config.js @@ -0,0 +1,12 @@ +export default { + skip_if_ssr: true, + + html: ` +
    foo
    +
    0 has foo: true
    +
    foo
    +
    1 has foo: true
    +
    foo
    +
    2 has foo: true
    + ` +}; diff --git a/test/runtime/samples/binding-this-component-each-block/main.svelte b/test/runtime/samples/binding-this-component-each-block/main.svelte new file mode 100644 index 0000000000..49d1d76172 --- /dev/null +++ b/test/runtime/samples/binding-this-component-each-block/main.svelte @@ -0,0 +1,11 @@ + + +{#each Array(3) as _, i} + +
    + {i} has foo: {!!foo[i]} +
    +{/each} From 60914b86fdffedd2f87434a0a3f280851fbfe2d6 Mon Sep 17 00:00:00 2001 From: Bryan Terce Date: Sun, 23 Jun 2019 05:34:36 -0700 Subject: [PATCH 303/510] Fix binding to values in a component when it uses `$$props` (#2725) --- src/compiler/compile/render-dom/index.ts | 2 +- .../samples/binding-using-props/TextInput.svelte | 6 ++++++ .../runtime/samples/binding-using-props/_config.js | 14 ++++++++++++++ .../samples/binding-using-props/main.svelte | 7 +++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/binding-using-props/TextInput.svelte create mode 100644 test/runtime/samples/binding-using-props/_config.js create mode 100644 test/runtime/samples/binding-using-props/main.svelte diff --git a/src/compiler/compile/render-dom/index.ts b/src/compiler/compile/render-dom/index.ts index 46aa705bfb..9a49bc0c35 100644 --- a/src/compiler/compile/render-dom/index.ts +++ b/src/compiler/compile/render-dom/index.ts @@ -80,7 +80,7 @@ export default function dom( ${$$props} => { ${uses_props && component.invalidate('$$props', `$$props = @assign(@assign({}, $$props), $$new_props)`)} ${writable_props.map(prop => - `if ('${prop.export_name}' in $$props) ${component.invalidate(prop.name, `${prop.name} = $$props.${prop.export_name}`)};` + `if ('${prop.export_name}' in ${$$props}) ${component.invalidate(prop.name, `${prop.name} = ${$$props}.${prop.export_name}`)};` )} ${component.slots.size > 0 && `if ('$$scope' in ${$$props}) ${component.invalidate('$$scope', `$$scope = ${$$props}.$$scope`)};`} diff --git a/test/runtime/samples/binding-using-props/TextInput.svelte b/test/runtime/samples/binding-using-props/TextInput.svelte new file mode 100644 index 0000000000..da9e7e4a0e --- /dev/null +++ b/test/runtime/samples/binding-using-props/TextInput.svelte @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/binding-using-props/_config.js b/test/runtime/samples/binding-using-props/_config.js new file mode 100644 index 0000000000..dcb34c4357 --- /dev/null +++ b/test/runtime/samples/binding-using-props/_config.js @@ -0,0 +1,14 @@ +export default { + async test({ assert, target, window }) { + const input = target.querySelector('input'); + + const event = new window.Event('input'); + input.value = 'changed'; + await input.dispatchEvent(event); + + assert.htmlEqual(target.innerHTML, ` + +

    changed

    + `); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/binding-using-props/main.svelte b/test/runtime/samples/binding-using-props/main.svelte new file mode 100644 index 0000000000..543bd28d49 --- /dev/null +++ b/test/runtime/samples/binding-using-props/main.svelte @@ -0,0 +1,7 @@ + + + +

    {actualValue}

    \ No newline at end of file From c9e3762638c0cd858b72cbb096b8b228c2e26b8e Mon Sep 17 00:00:00 2001 From: Thomas Ghysels Date: Sun, 23 Jun 2019 14:41:56 +0200 Subject: [PATCH 304/510] Fix parsing ambiguous HTML entities (#3071) Fixes sveltejs/sapper#759 --- src/compiler/parse/utils/html.ts | 2 +- test/parser/samples/attribute-escaped/input.svelte | 2 +- test/parser/samples/attribute-escaped/output.json | 12 ++++++------ test/runtime/samples/html-entities/_config.js | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/compiler/parse/utils/html.ts b/src/compiler/parse/utils/html.ts index b49989eacd..13ff553a3f 100644 --- a/src/compiler/parse/utils/html.ts +++ b/src/compiler/parse/utils/html.ts @@ -36,7 +36,7 @@ const windows_1252 = [ ]; const entity_pattern = new RegExp( - `&(#?(?:x[\\w\\d]+|\\d+|${Object.keys(entities).join('|')}));?`, + `&(#?(?:x[\\w\\d]+|\\d+|${Object.keys(entities).join('|')}))(?:;|\\b)`, 'g' ); diff --git a/test/parser/samples/attribute-escaped/input.svelte b/test/parser/samples/attribute-escaped/input.svelte index 82186dcee4..4c9cd5ff68 100644 --- a/test/parser/samples/attribute-escaped/input.svelte +++ b/test/parser/samples/attribute-escaped/input.svelte @@ -1 +1 @@ -
    +
    diff --git a/test/parser/samples/attribute-escaped/output.json b/test/parser/samples/attribute-escaped/output.json index e60a8c2531..a8498bd574 100644 --- a/test/parser/samples/attribute-escaped/output.json +++ b/test/parser/samples/attribute-escaped/output.json @@ -1,27 +1,27 @@ { "html": { "start": 0, - "end": 41, + "end": 83, "type": "Fragment", "children": [ { "start": 0, - "end": 41, + "end": 83, "type": "Element", "name": "div", "attributes": [ { "start": 5, - "end": 34, + "end": 76, "type": "Attribute", "name": "data-foo", "value": [ { "start": 15, - "end": 33, + "end": 75, "type": "Text", - "raw": ""quoted"", - "data": "\"quoted\"" + "raw": "semi:"space:" letter:"e number:"1 end:"", + "data": "semi:\"space:\" letter:"e number:"1 end:\"" } ] } diff --git a/test/runtime/samples/html-entities/_config.js b/test/runtime/samples/html-entities/_config.js index 1591f31a53..c8c2de8403 100644 --- a/test/runtime/samples/html-entities/_config.js +++ b/test/runtime/samples/html-entities/_config.js @@ -9,6 +9,6 @@ export default { A - ¬anentity; + &notanentity; ` }; \ No newline at end of file From 886fb66b41c6cf2413a7d713070d1a4941ba239b Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 23 Jun 2019 08:48:04 -0400 Subject: [PATCH 305/510] -> v3.5.4 --- CHANGELOG.md | 7 +++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94d7326eea..2849115008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Svelte changelog +## 3.5.4 + +* Preserve whitespace at the boundaries of `{#each}` blocks ([#713](https://github.com/sveltejs/svelte/issues/713)) +* Fix dynamic `bind:this` on components ([#2333](https://github.com/sveltejs/svelte/issues/2333)) +* Fix binding to values in a component when it uses `$$props` ([#2725](https://github.com/sveltejs/svelte/issues/2725)) +* Fix parsing ambiguous HTML entities ([#3071](https://github.com/sveltejs/svelte/pull/3071)) + ## 3.5.3 * Don't double-destroy keyed each blocks with outros ([#3055](https://github.com/sveltejs/svelte/issues/3055)) diff --git a/package-lock.json b/package-lock.json index 8a28bf9997..0aef0fa227 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.5.3", + "version": "3.5.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9047af529e..96a1dd8f99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.5.3", + "version": "3.5.4", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From 9bf8fd3747a3983887f8321f4bc1bafa121df183 Mon Sep 17 00:00:00 2001 From: Jan C Date: Sun, 23 Jun 2019 19:48:21 +0200 Subject: [PATCH 306/510] Update site README for local REPL (#3078) * Update site README for local REPL * Change the local install instructions to be able to use the local repl out of the box This avoids potential confusion in setting the website up for local use. * Add sections for Testing and Building * Add a note that the local REPL will only work for the development page * Update README.md --- site/README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/site/README.md b/site/README.md index 59380feffc..259e956003 100644 --- a/site/README.md +++ b/site/README.md @@ -4,7 +4,10 @@ Set up the project: ```bash git clone https://github.com/sveltejs/svelte.git -cd svelte/site +cd svelte +npm ci +PUBLISH=1 npm run build +cd site npm ci npm run update ``` @@ -17,7 +20,7 @@ By default, the REPL will fetch the most recent version of Svelte from https://u To produce the proper browser-compatible UMD build of the compiler, you will need to run `npm run build` (or `npm run dev`) in the root of this repository with the `PUBLISH` environment variable set to any non-empty string. -Then visit the REPL at [localhost:3000/repl?version=local](http://localhost:3000/repl?version=local). +Then visit the REPL at [localhost:3000/repl?version=local](http://localhost:3000/repl?version=local). Please note that the local REPL only works with `npm run dev` and not when building the site for production usage. ## REPL GitHub integration @@ -32,6 +35,13 @@ In order for the REPL's GitHub integration to work properly when running locally GITHUB_CLIENT_SECRET=[your app's Client Secret] BASEURL=http://localhost:3000 ``` +## Building the site + +To build the website, run `npm run sapper`. The output can be found in `__sapper__/build`. + +## Testing + +Tests can be run using `npm run test`. ## Translating the API docs From 8ed9ac8dbccbe47d64e0bb963fb7f3c43380775e Mon Sep 17 00:00:00 2001 From: Lwazi Dlamini Date: Sun, 23 Jun 2019 19:59:24 +0200 Subject: [PATCH 307/510] Added Nonkosi Telecoms Logo --- site/static/organisations/nonkosi.svg | 428 ++++++++++++++++++++++++++ 1 file changed, 428 insertions(+) create mode 100644 site/static/organisations/nonkosi.svg diff --git a/site/static/organisations/nonkosi.svg b/site/static/organisations/nonkosi.svg new file mode 100644 index 0000000000..c9e32c133c --- /dev/null +++ b/site/static/organisations/nonkosi.svg @@ -0,0 +1,428 @@ + + + + +Created by potrace 1.15, written by Peter Selinger 2001-2017 + + + + + + + + + + + + + + + + + + + + + + From 7aee021522e7a68434aa1491247ca02b78c348ac Mon Sep 17 00:00:00 2001 From: Lwazi Dlamini Date: Sun, 23 Jun 2019 20:01:21 +0200 Subject: [PATCH 308/510] Updated organizations link list --- site/src/routes/_components/WhosUsingSvelte.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/site/src/routes/_components/WhosUsingSvelte.svelte b/site/src/routes/_components/WhosUsingSvelte.svelte index 98a2696f64..a855639c40 100644 --- a/site/src/routes/_components/WhosUsingSvelte.svelte +++ b/site/src/routes/_components/WhosUsingSvelte.svelte @@ -52,6 +52,7 @@ itslearning logo Mustlab logo Nesta logo + Nonkosi Telecoms logo The New York Times logo Open State Foundation logo Razorpay logo From dddc69ec7f0e5b6bcac991275fdeda4ed873b210 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 24 Jun 2019 11:40:41 -0400 Subject: [PATCH 309/510] update tests --- .../binding-contenteditable-html-initial/_config.js | 8 ++++---- .../samples/binding-contenteditable-html/_config.js | 5 ----- .../binding-contenteditable-text-initial/_config.js | 6 +++--- .../samples/binding-contenteditable-text/_config.js | 5 ----- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/test/runtime/samples/binding-contenteditable-html-initial/_config.js b/test/runtime/samples/binding-contenteditable-html-initial/_config.js index 0b1f656a54..9eac2c9b17 100644 --- a/test/runtime/samples/binding-contenteditable-html-initial/_config.js +++ b/test/runtime/samples/binding-contenteditable-html-initial/_config.js @@ -1,6 +1,6 @@ export default { html: ` - world + world

    hello world

    `, @@ -18,7 +18,7 @@ export default { // No updates to data yet assert.htmlEqual(target.innerHTML, ` - everybody + everybody

    hello world

    `); @@ -26,14 +26,14 @@ export default { const event = new window.Event('input'); await el.dispatchEvent(event); assert.htmlEqual(target.innerHTML, ` - everybody + everybody

    hello everybody

    `); component.name = 'goodbye'; assert.equal(el.innerHTML, 'goodbye'); assert.htmlEqual(target.innerHTML, ` - goodbye + goodbye

    hello goodbye

    `); }, diff --git a/test/runtime/samples/binding-contenteditable-html/_config.js b/test/runtime/samples/binding-contenteditable-html/_config.js index 285512b6c9..ceb6a75c70 100644 --- a/test/runtime/samples/binding-contenteditable-html/_config.js +++ b/test/runtime/samples/binding-contenteditable-html/_config.js @@ -8,11 +8,6 @@ export default {

    hello world

    `, - ssrHtml: ` - world -

    hello world

    - `, - async test({ assert, component, target, window }) { const el = target.querySelector('editor'); assert.equal(el.innerHTML, 'world'); diff --git a/test/runtime/samples/binding-contenteditable-text-initial/_config.js b/test/runtime/samples/binding-contenteditable-text-initial/_config.js index 7345687d29..4899f30f12 100644 --- a/test/runtime/samples/binding-contenteditable-text-initial/_config.js +++ b/test/runtime/samples/binding-contenteditable-text-initial/_config.js @@ -1,6 +1,6 @@ export default { html: ` - world + world

    hello world

    `, @@ -20,14 +20,14 @@ export default { await el.dispatchEvent(event); assert.htmlEqual(target.innerHTML, ` - everybody + everybody

    hello everybody

    `); component.name = 'goodbye'; assert.equal(el.textContent, 'goodbye'); assert.htmlEqual(target.innerHTML, ` - goodbye + goodbye

    hello goodbye

    `); }, diff --git a/test/runtime/samples/binding-contenteditable-text/_config.js b/test/runtime/samples/binding-contenteditable-text/_config.js index 059cda7cfe..9f8645724d 100644 --- a/test/runtime/samples/binding-contenteditable-text/_config.js +++ b/test/runtime/samples/binding-contenteditable-text/_config.js @@ -8,11 +8,6 @@ export default {

    hello world

    `, - ssrHtml: ` - world -

    hello world

    - `, - async test({ assert, component, target, window }) { const el = target.querySelector('editor'); assert.equal(el.textContent, 'world'); From 86c5086c54481f7572765b73c4a3fe93c79c08d5 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 24 Jun 2019 13:00:16 -0400 Subject: [PATCH 310/510] add some docs, rename to textContent and innerHTML --- site/content/docs/02-template-syntax.md | 8 +++++++ src/compiler/compile/nodes/Element.ts | 6 ++--- .../render-dom/wrappers/Element/Binding.ts | 22 +++---------------- .../render-dom/wrappers/Element/index.ts | 6 ++--- .../compile/render-ssr/handlers/Element.ts | 4 ++-- .../main.svelte | 2 +- .../binding-contenteditable-html/main.svelte | 2 +- .../main.svelte | 2 +- .../binding-contenteditable-text/main.svelte | 2 +- .../contenteditable-dynamic/input.svelte | 2 +- .../contenteditable-missing/errors.json | 2 +- .../contenteditable-missing/input.svelte | 2 +- 12 files changed, 26 insertions(+), 34 deletions(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 682012d88b..ceaa19a398 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -510,6 +510,14 @@ When the value of an `

    diff --git a/site/static/organisations/healthtree.png b/site/static/organisations/healthtree.png new file mode 100644 index 0000000000000000000000000000000000000000..9db4720408f226186b3f10dddaa8b437623dfa0f GIT binary patch literal 2851 zcmV+;3*7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k8>vVqPiFvG|g?4P3%MzI1v~Y<94X6Ut&(2HS38EXxpHxaG34l^? zrJn^5@}(J}O|K$PC`>mhOTeehJT=fFpcG-#)+aSzyJr}vwA?Gb(m{YybbqS4j0HdX zUl^ej5?Nnrl;0Gx1m>xFF0~pBv%zH$93b+QE(}2kU6^fFntd2fp z+nQH4_*8KX=xdUmsEW&S!Jyei^FcQv5G8@E?1M$nF2g^-cf)002ovPDHLkV1geK BdA|Sv literal 0 HcmV?d00001 From f2d25828d544d61d4f094db2571f4cf6690c432e Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 9 Jul 2019 11:09:47 -0400 Subject: [PATCH 403/510] -> v3.6.6 --- CHANGELOG.md | 4 ++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f81ad1a0cb..e63574650f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## 3.6.6 + +* Prevent dynamic components being detached twice ([#3113](https://github.com/sveltejs/svelte/issues/3113), [#2086](https://github.com/sveltejs/svelte/issues/2086)) + ## 3.6.5 * Handle RxJS-style observables with `get` ([#3153](https://github.com/sveltejs/svelte/issues/3153)) diff --git a/package-lock.json b/package-lock.json index 0b4d23a98b..9135e1f140 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.6.5", + "version": "3.6.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 74f14a8b51..27f788658a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.6.5", + "version": "3.6.6", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From 85e25a957ddb3b6100db4d1d9e63ee2b745e86d1 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 9 Jul 2019 12:20:13 -0400 Subject: [PATCH 404/510] add test from gh-2086 --- .../head-detached-in-dynamic-component/A.svelte | 5 +++++ .../head-detached-in-dynamic-component/B.svelte | 5 +++++ .../head-detached-in-dynamic-component/_config.js | 15 +++++++++++++++ .../main.svelte | 8 ++++++++ 4 files changed, 33 insertions(+) create mode 100644 test/runtime/samples/head-detached-in-dynamic-component/A.svelte create mode 100644 test/runtime/samples/head-detached-in-dynamic-component/B.svelte create mode 100644 test/runtime/samples/head-detached-in-dynamic-component/_config.js create mode 100644 test/runtime/samples/head-detached-in-dynamic-component/main.svelte diff --git a/test/runtime/samples/head-detached-in-dynamic-component/A.svelte b/test/runtime/samples/head-detached-in-dynamic-component/A.svelte new file mode 100644 index 0000000000..f05488e3e4 --- /dev/null +++ b/test/runtime/samples/head-detached-in-dynamic-component/A.svelte @@ -0,0 +1,5 @@ + + + + +A \ No newline at end of file diff --git a/test/runtime/samples/head-detached-in-dynamic-component/B.svelte b/test/runtime/samples/head-detached-in-dynamic-component/B.svelte new file mode 100644 index 0000000000..943b307cc3 --- /dev/null +++ b/test/runtime/samples/head-detached-in-dynamic-component/B.svelte @@ -0,0 +1,5 @@ + + + + +B \ No newline at end of file diff --git a/test/runtime/samples/head-detached-in-dynamic-component/_config.js b/test/runtime/samples/head-detached-in-dynamic-component/_config.js new file mode 100644 index 0000000000..e18589e10e --- /dev/null +++ b/test/runtime/samples/head-detached-in-dynamic-component/_config.js @@ -0,0 +1,15 @@ +export default { + html: ` + A + `, + + test({ assert, component, window }) { + component.x = false; + + const meta = window.document.querySelectorAll('meta'); + + assert.equal(meta.length, 1); + assert.equal(meta[0].name, 'description'); + assert.equal(meta[0].content, 'B'); + } +}; diff --git a/test/runtime/samples/head-detached-in-dynamic-component/main.svelte b/test/runtime/samples/head-detached-in-dynamic-component/main.svelte new file mode 100644 index 0000000000..e4acd7737a --- /dev/null +++ b/test/runtime/samples/head-detached-in-dynamic-component/main.svelte @@ -0,0 +1,8 @@ + + + \ No newline at end of file From 65b28ed0f5df4bcdbf7eb0a6d8cae4518600b284 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 9 Jul 2019 12:31:38 -0400 Subject: [PATCH 405/510] new failing test for #2086 --- .../samples/each-block-keyed-nested/Child.svelte | 5 +++++ .../samples/each-block-keyed-nested/_config.js | 16 ++++++++++++++++ .../samples/each-block-keyed-nested/main.svelte | 16 ++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 test/runtime/samples/each-block-keyed-nested/Child.svelte create mode 100644 test/runtime/samples/each-block-keyed-nested/_config.js create mode 100644 test/runtime/samples/each-block-keyed-nested/main.svelte diff --git a/test/runtime/samples/each-block-keyed-nested/Child.svelte b/test/runtime/samples/each-block-keyed-nested/Child.svelte new file mode 100644 index 0000000000..e7ed726850 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-nested/Child.svelte @@ -0,0 +1,5 @@ + + +{id} \ No newline at end of file diff --git a/test/runtime/samples/each-block-keyed-nested/_config.js b/test/runtime/samples/each-block-keyed-nested/_config.js new file mode 100644 index 0000000000..b45716be4f --- /dev/null +++ b/test/runtime/samples/each-block-keyed-nested/_config.js @@ -0,0 +1,16 @@ +export default { + html: ` + 1 + `, + + test({ assert, component, target }) { + component.desks = [ + { + id: 1, + teams: [{ id: 2 }] + } + ]; + + assert.htmlEqual(target.innerHTML, '2'); + } +}; diff --git a/test/runtime/samples/each-block-keyed-nested/main.svelte b/test/runtime/samples/each-block-keyed-nested/main.svelte new file mode 100644 index 0000000000..86f665a5e7 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-nested/main.svelte @@ -0,0 +1,16 @@ + + +{#each desks as desk (desk.id)} + {#each desk.teams as team (team.id)} + + {/each} +{/each} \ No newline at end of file From bec64427a51b65a6987ed74f02a0de87dab33acc Mon Sep 17 00:00:00 2001 From: Tibi Craciun Date: Tue, 9 Jul 2019 20:21:04 +0300 Subject: [PATCH 406/510] fixed #3199 --- src/compiler/compile/render_dom/wrappers/Element/Binding.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/compile/render_dom/wrappers/Element/Binding.ts b/src/compiler/compile/render_dom/wrappers/Element/Binding.ts index b8057ae6d7..b1d7b52b66 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/Binding.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Binding.ts @@ -109,7 +109,8 @@ export default class BindingWrapper { if (parent.node.name === 'input') { const type = parent.node.get_static_attribute_value('type'); - if (type === null || type === "" || type === "text") { + if (type === null || type === "" || type === "text" + || type === "email" || type === "password") { update_conditions.push(`(${parent.var}.${this.node.name} !== ${this.snippet})`); } } From 2f08e34b41317619f9bc7bf6bc2418123fb06829 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 9 Jul 2019 14:04:13 -0400 Subject: [PATCH 407/510] prevent outro groups getting muddled up - fixes #2086 --- src/runtime/internal/transitions.ts | 22 ++++++++++--------- .../each-block-keyed-nested/_config.js | 4 ++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/runtime/internal/transitions.ts b/src/runtime/internal/transitions.ts index 91f243b4d6..e3a0b44fc4 100644 --- a/src/runtime/internal/transitions.ts +++ b/src/runtime/internal/transitions.ts @@ -28,15 +28,17 @@ let outros; export function group_outros() { outros = { - remaining: 0, - callbacks: [] + r: 0, // remaining outros + c: [], // callbacks + p: outros // parent group }; } export function check_outros() { - if (!outros.remaining) { - run_all(outros.callbacks); + if (!outros.r) { + run_all(outros.c); } + outros = outros.p; } export function transition_in(block, local?: 0 | 1) { @@ -51,7 +53,7 @@ export function transition_out(block, local: 0 | 1, detach: 0 | 1, callback) { if (outroing.has(block)) return; outroing.add(block); - outros.callbacks.push(() => { + outros.c.push(() => { outroing.delete(block); if (callback) { if (detach) block.d(1); @@ -153,7 +155,7 @@ export function create_out_transition(node: Element & ElementCSSInlineStyle, fn: const group = outros; - group.remaining += 1; + group.r += 1; function go() { const { @@ -178,10 +180,10 @@ export function create_out_transition(node: Element & ElementCSSInlineStyle, fn: dispatch(node, false, 'end'); - if (!--group.remaining) { + if (!--group.r) { // this will result in `end()` being called, // so we don't need to clean up here - run_all(group.callbacks); + run_all(group.c); } return false; @@ -266,7 +268,7 @@ export function create_bidirectional_transition(node: Element & ElementCSSInline if (!b) { // @ts-ignore todo: improve typings program.group = outros; - outros.remaining += 1; + outros.r += 1; } if (running_program) { @@ -309,7 +311,7 @@ export function create_bidirectional_transition(node: Element & ElementCSSInline clear_animation(); } else { // outro — needs to be coordinated - if (!--running_program.group.remaining) run_all(running_program.group.callbacks); + if (!--running_program.group.r) run_all(running_program.group.c); } } diff --git a/test/runtime/samples/each-block-keyed-nested/_config.js b/test/runtime/samples/each-block-keyed-nested/_config.js index b45716be4f..3440874a8c 100644 --- a/test/runtime/samples/each-block-keyed-nested/_config.js +++ b/test/runtime/samples/each-block-keyed-nested/_config.js @@ -7,10 +7,10 @@ export default { component.desks = [ { id: 1, - teams: [{ id: 2 }] + teams: [] } ]; - assert.htmlEqual(target.innerHTML, '2'); + assert.htmlEqual(target.innerHTML, ''); } }; From 1cfaacb02a60bd63b57960f81e35afbe292f6dc0 Mon Sep 17 00:00:00 2001 From: Dale Date: Tue, 9 Jul 2019 20:23:48 +0100 Subject: [PATCH 408/510] make resize listener object element unfocusable --- src/runtime/internal/dom.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index f65d07117c..452347dc29 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -223,6 +223,7 @@ export function add_resize_listener(element, fn) { const object = document.createElement('object'); object.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;'); object.type = 'text/html'; + object.tabIndex = -1; let win; From a57dfb6b2b31c6e1f49ab5f7747acda6d0bab442 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Wed, 10 Jul 2019 08:35:01 -0400 Subject: [PATCH 409/510] -> v3.6.7 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e63574650f..9e8aee7f45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Svelte changelog +## 3.6.7 + +* Prevent corruption of outro callbacks with nested keyed each blocks ([#3209](https://github.com/sveltejs/svelte/pull/3209)) +* Prevent cursor jumping in bound input in Safari ([#3199](https://github.com/sveltejs/svelte/issues/3199)) +* Make resize listener object unfocusable ([#3206](https://github.com/sveltejs/svelte/issues/3206)) + ## 3.6.6 * Prevent dynamic components being detached twice ([#3113](https://github.com/sveltejs/svelte/issues/3113), [#2086](https://github.com/sveltejs/svelte/issues/2086)) diff --git a/package.json b/package.json index 27f788658a..6ee90af401 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.6.6", + "version": "3.6.7", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From a56c6990ad60e7897b44b6ca1108efe42779422b Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Wed, 10 Jul 2019 08:42:23 -0400 Subject: [PATCH 410/510] lint --- src/compiler/compile/render_dom/wrappers/Element/Binding.ts | 3 +-- src/compiler/compile/render_dom/wrappers/Fragment.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/Element/Binding.ts b/src/compiler/compile/render_dom/wrappers/Element/Binding.ts index b1d7b52b66..1ea65830ef 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/Binding.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Binding.ts @@ -109,8 +109,7 @@ export default class BindingWrapper { if (parent.node.name === 'input') { const type = parent.node.get_static_attribute_value('type'); - if (type === null || type === "" || type === "text" - || type === "email" || type === "password") { + if (type === null || type === "" || type === "text" || type === "email" || type === "password") { update_conditions.push(`(${parent.var}.${this.node.name} !== ${this.snippet})`); } } diff --git a/src/compiler/compile/render_dom/wrappers/Fragment.ts b/src/compiler/compile/render_dom/wrappers/Fragment.ts index 2eadf3e915..d81bd6bcc9 100644 --- a/src/compiler/compile/render_dom/wrappers/Fragment.ts +++ b/src/compiler/compile/render_dom/wrappers/Fragment.ts @@ -17,7 +17,6 @@ import { INode } from '../../nodes/interfaces'; import Renderer from '../Renderer'; import Block from '../Block'; import { trim_start, trim_end } from '../../../utils/trim'; -import TextWrapper from './Text'; const wrappers = { AwaitBlock, @@ -103,7 +102,7 @@ export default class FragmentWrapper { // glue text nodes (which could e.g. be separated by comments) together if (last_child && last_child.node.type === 'Text') { - (last_child as TextWrapper).data = data + (last_child as TextWrapper).data; + (last_child as Text).data = data + (last_child as Text).data; continue; } From 2b79a2269d57ba8b63a8422937e3e016a03c43bb Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Wed, 10 Jul 2019 08:50:02 -0400 Subject: [PATCH 411/510] update site deps --- site/package-lock.json | 514 +++++++++++++++++++++++++---------------- site/package.json | 50 ++-- 2 files changed, 335 insertions(+), 229 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 9852fb9aa0..42a737dbe0 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -14,18 +14,18 @@ } }, "@babel/core": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.4.tgz", - "integrity": "sha512-lQgGX3FPRgbz2SKmhMtYgJvVzGZrmjaF4apZ2bLwofAKiSjxU0drPh4S/VasyYXwaTs+A1gvQ45BN8SQJzHsQQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.4.tgz", + "integrity": "sha512-+DaeBEpYq6b2+ZmHx3tHspC+ZRflrvLqwfv8E3hNr5LVQoyBnL8RPKSBCg+rK2W2My9PWlujBiqd0ZPsR9Q6zQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.4", - "@babel/helpers": "^7.4.4", - "@babel/parser": "^7.4.4", + "@babel/generator": "^7.5.0", + "@babel/helpers": "^7.5.4", + "@babel/parser": "^7.5.0", "@babel/template": "^7.4.4", - "@babel/traverse": "^7.4.4", - "@babel/types": "^7.4.4", + "@babel/traverse": "^7.5.0", + "@babel/types": "^7.5.0", "convert-source-map": "^1.1.0", "debug": "^4.1.0", "json5": "^2.1.0", @@ -36,12 +36,12 @@ } }, "@babel/generator": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", - "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.0.tgz", + "integrity": "sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA==", "dev": true, "requires": { - "@babel/types": "^7.4.4", + "@babel/types": "^7.5.0", "jsesc": "^2.5.1", "lodash": "^4.17.11", "source-map": "^0.5.0", @@ -241,20 +241,20 @@ } }, "@babel/helpers": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz", - "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.4.tgz", + "integrity": "sha512-6LJ6xwUEJP51w0sIgKyfvFMJvIb9mWAfohJp0+m6eHJigkFdcH8duZ1sfhn0ltJRzwUIT/yqqhdSfRpCpL7oow==", "dev": true, "requires": { "@babel/template": "^7.4.4", - "@babel/traverse": "^7.4.4", - "@babel/types": "^7.4.4" + "@babel/traverse": "^7.5.0", + "@babel/types": "^7.5.0" } }, "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", "dev": true, "requires": { "chalk": "^2.0.0", @@ -263,9 +263,9 @@ } }, "@babel/parser": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.4.tgz", - "integrity": "sha512-5pCS4mOsL+ANsFZGdvNLybx4wtqAZJ0MJjMHxvzI3bvIsz6sQvzW8XX92EYIkiPtIvcfG3Aj+Ir5VNyjnZhP7w==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.0.tgz", + "integrity": "sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -279,6 +279,16 @@ "@babel/plugin-syntax-async-generators": "^7.2.0" } }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz", + "integrity": "sha512-x/iMjggsKTFHYC6g11PL7Qy58IK8H5zqfm9e6hu4z1iH2IRyAp9u9dL80zA6R76yFovETFLKz2VJIC2iIPBuFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.2.0" + } + }, "@babel/plugin-proposal-json-strings": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", @@ -290,9 +300,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz", - "integrity": "sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.4.tgz", + "integrity": "sha512-KCx0z3y7y8ipZUMAEEJOyNi11lMb/FOPUjjB113tfowgw0c16EGYos7worCKBcUAh2oG+OBnoUhsnTSoLpV9uA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -375,9 +385,9 @@ } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz", - "integrity": "sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz", + "integrity": "sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -430,9 +440,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz", - "integrity": "sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.5.0.tgz", + "integrity": "sha512-YbYgbd3TryYYLGyC7ZR+Tq8H/+bCmwoaxHfJHupom5ECstzbRLTch6gOQbhEY9Z4hiCNHEURgq06ykFv9JZ/QQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" @@ -450,9 +460,9 @@ } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz", - "integrity": "sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz", + "integrity": "sha512-igcziksHizyQPlX9gfSjHkE2wmoCH3evvD2qR5w29/Dk0SMKE/eOI7f1HhBdNhR/zxJDqrgpoDTq5YSLH/XMsQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" @@ -506,34 +516,37 @@ } }, "@babel/plugin-transform-modules-amd": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz", - "integrity": "sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz", + "integrity": "sha512-n20UsQMKnWrltocZZm24cRURxQnWIvsABPJlw/fvoy9c6AgHZzoelAIzajDHAQrDpuKFFPPcFGd7ChsYuIUMpg==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.0.0", + "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz", - "integrity": "sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.5.0.tgz", + "integrity": "sha512-xmHq0B+ytyrWJvQTc5OWAC4ii6Dhr0s22STOoydokG51JjWhyYo5mRPXoi+ZmtHQhZZwuXNN+GG5jy5UZZJxIQ==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.4.4", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0" + "@babel/helper-simple-access": "^7.1.0", + "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz", - "integrity": "sha512-MSiModfILQc3/oqnG7NrP1jHaSPryO6tA2kOMmAQApz5dayPxWiHqmq4sWH2xF5LcQK56LlbKByCd8Aah/OIkQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.5.0.tgz", + "integrity": "sha512-Q2m56tyoQWmuNGxEtUyeEkm6qJYFqs4c+XyXH5RAuYxObRNz9Zgj/1g2GMnjYp2EUyEy7YTrxliGCXzecl/vJg==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.4.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.0.0", + "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-umd": { @@ -547,12 +560,12 @@ } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.4.tgz", - "integrity": "sha512-Ki+Y9nXBlKfhD+LXaRS7v95TtTGYRAf9Y1rTDiE75zf8YQz4GDaWRXosMfJBXxnk88mGFjWdCRIeqDbon7spYA==", + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.5.tgz", + "integrity": "sha512-z7+2IsWafTBbjNsOxU/Iv5CvTJlr5w4+HGu1HovKYTtgJ362f7kBcQglkfmlspKKZ3bgrbSGvLfNx++ZJgCWsg==", "dev": true, "requires": { - "regexp-tree": "^0.1.0" + "regexp-tree": "^0.1.6" } }, "@babel/plugin-transform-new-target": { @@ -595,12 +608,12 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.4.tgz", - "integrity": "sha512-Zz3w+pX1SI0KMIiqshFZkwnVGUhDZzpX2vtPzfJBKQQq8WsP/Xy9DNdELWivxcKOCX/Pywge4SiEaPaLtoDT4g==", + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz", + "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==", "dev": true, "requires": { - "regenerator-transform": "^0.13.4" + "regenerator-transform": "^0.14.0" } }, "@babel/plugin-transform-reserved-words": { @@ -613,9 +626,9 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.4.tgz", - "integrity": "sha512-aMVojEjPszvau3NRg+TIH14ynZLvPewH4xhlCW1w6A3rkxTS1m4uwzRclYR9oS+rl/dr+kT+pzbfHuAWP/lc7Q==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.5.0.tgz", + "integrity": "sha512-LmPIZOAgTLl+86gR9KjLXex6P/lRz1fWEjTz6V6QZMmKie51ja3tvzdwORqhHc4RWR8TcZ5pClpRWs0mlaA2ng==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -701,46 +714,48 @@ } }, "@babel/preset-env": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.4.4.tgz", - "integrity": "sha512-FU1H+ACWqZZqfw1x2G1tgtSSYSfxJLkpaUQL37CenULFARDo+h4xJoVHzRoHbK+85ViLciuI7ME4WTIhFRBBlw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.5.4.tgz", + "integrity": "sha512-hFnFnouyRNiH1rL8YkX1ANCNAUVC8Djwdqfev8i1415tnAG+7hlA5zhZ0Q/3Q5gkop4HioIPbCEWAalqcbxRoQ==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-async-generator-functions": "^7.2.0", + "@babel/plugin-proposal-dynamic-import": "^7.5.0", "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.4.4", + "@babel/plugin-proposal-object-rest-spread": "^7.5.4", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-syntax-json-strings": "^7.2.0", "@babel/plugin-syntax-object-rest-spread": "^7.2.0", "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.4.4", + "@babel/plugin-transform-async-to-generator": "^7.5.0", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", "@babel/plugin-transform-block-scoping": "^7.4.4", "@babel/plugin-transform-classes": "^7.4.4", "@babel/plugin-transform-computed-properties": "^7.2.0", - "@babel/plugin-transform-destructuring": "^7.4.4", + "@babel/plugin-transform-destructuring": "^7.5.0", "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/plugin-transform-duplicate-keys": "^7.2.0", + "@babel/plugin-transform-duplicate-keys": "^7.5.0", "@babel/plugin-transform-exponentiation-operator": "^7.2.0", "@babel/plugin-transform-for-of": "^7.4.4", "@babel/plugin-transform-function-name": "^7.4.4", "@babel/plugin-transform-literals": "^7.2.0", "@babel/plugin-transform-member-expression-literals": "^7.2.0", - "@babel/plugin-transform-modules-amd": "^7.2.0", - "@babel/plugin-transform-modules-commonjs": "^7.4.4", - "@babel/plugin-transform-modules-systemjs": "^7.4.4", + "@babel/plugin-transform-modules-amd": "^7.5.0", + "@babel/plugin-transform-modules-commonjs": "^7.5.0", + "@babel/plugin-transform-modules-systemjs": "^7.5.0", "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.4", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.5", "@babel/plugin-transform-new-target": "^7.4.4", "@babel/plugin-transform-object-super": "^7.2.0", "@babel/plugin-transform-parameters": "^7.4.4", "@babel/plugin-transform-property-literals": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.4.4", + "@babel/plugin-transform-regenerator": "^7.4.5", "@babel/plugin-transform-reserved-words": "^7.2.0", "@babel/plugin-transform-shorthand-properties": "^7.2.0", "@babel/plugin-transform-spread": "^7.2.0", @@ -748,18 +763,18 @@ "@babel/plugin-transform-template-literals": "^7.4.4", "@babel/plugin-transform-typeof-symbol": "^7.2.0", "@babel/plugin-transform-unicode-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "browserslist": "^4.5.2", - "core-js-compat": "^3.0.0", + "@babel/types": "^7.5.0", + "browserslist": "^4.6.0", + "core-js-compat": "^3.1.1", "invariant": "^2.2.2", "js-levenshtein": "^1.1.3", "semver": "^5.5.0" } }, "@babel/runtime": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.4.tgz", - "integrity": "sha512-w0+uT71b6Yi7i5SE0co4NioIpSYS6lLiXvCzWzGSKvpK5vdQtCbICHMj+gbAKAOtxiV6HsVh/MBdaF9EQ6faSg==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.4.tgz", + "integrity": "sha512-Na84uwyImZZc3FKf4aUF1tysApzwf3p2yuFBIyBfbzT5glzKTdvYI4KVW4kcgjrzoGUjC7w3YyCHcJKaRxsr2Q==", "dev": true, "requires": { "regenerator-runtime": "^0.13.2" @@ -777,26 +792,26 @@ } }, "@babel/traverse": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.4.tgz", - "integrity": "sha512-Gw6qqkw/e6AGzlyj9KnkabJX7VcubqPtkUQVAwkc0wUMldr3A/hezNB3Rc5eIvId95iSGkGIOe5hh1kMKf951A==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.0.tgz", + "integrity": "sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.4", + "@babel/generator": "^7.5.0", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.4.4", - "@babel/types": "^7.4.4", + "@babel/parser": "^7.5.0", + "@babel/types": "^7.5.0", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.11" } }, "@babel/types": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", - "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.0.tgz", + "integrity": "sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -1352,9 +1367,9 @@ } }, "@sveltejs/site-kit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@sveltejs/site-kit/-/site-kit-1.1.0.tgz", - "integrity": "sha512-Pe0vsIW5c3LDAY4K7mPa+S1gNAVkpVRfvfylHOPOufhdXOwU3E+YhobrF2MMLcM6FEonJv1Au/RHHSBZu8+aKg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@sveltejs/site-kit/-/site-kit-1.1.1.tgz", + "integrity": "sha512-EYQKhrdbRWeaPteTN1YZ4oW0xBbUzQ2D+XPdIfEvwDvgxAka9KZP5BCiENrXFf7Z9lxe2HW6MDlrT2sMwoS8+g==", "dev": true, "requires": { "@sindresorhus/slugify": "^0.9.1", @@ -1371,6 +1386,14 @@ "estree-walker": "^0.6.0", "sourcemap-codec": "^1.4.4", "yootils": "0.0.15" + }, + "dependencies": { + "yootils": { + "version": "0.0.15", + "resolved": "https://registry.npmjs.org/yootils/-/yootils-0.0.15.tgz", + "integrity": "sha512-GvGLuJ7XHJPGEUQ52vh8fh+vPjfikuGcu7yBswfrsNsHqnAoytOVuSb69eM0j8wQIjMz0U3kY3YsfwMhJgfG9w==", + "dev": true + } } }, "@types/estree": { @@ -1380,9 +1403,9 @@ "dev": true }, "@types/node": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz", - "integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==", + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.2.tgz", + "integrity": "sha512-gojym4tX0FWeV2gsW4Xmzo5wxGjXGm550oVUII7f7G5o4BV6c7DBdiG1RRQd+y1bvqRyYtPfMK85UM95vsapqQ==", "dev": true }, "@types/pg": { @@ -1414,9 +1437,9 @@ } }, "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", + "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==", "dev": true }, "ansi-colors": { @@ -1509,6 +1532,15 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", + "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1628,14 +1660,14 @@ "dev": true }, "browserslist": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.0.tgz", - "integrity": "sha512-Jk0YFwXBuMOOol8n6FhgkDzn3mY9PYLYGk29zybF05SbRTsMgPqmTNeQQhOghCxq5oFqAXE3u4sYddr4C0uRhg==", + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.4.tgz", + "integrity": "sha512-ErJT8qGfRt/VWHSr1HeqZzz50DvxHtr1fVL1m5wf20aGrG8e1ce8fpZ2EjZEfs09DDZYSvtRaDlMpWslBf8Low==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000967", - "electron-to-chromium": "^1.3.133", - "node-releases": "^1.1.19" + "caniuse-lite": "^1.0.30000981", + "electron-to-chromium": "^1.3.188", + "node-releases": "^1.1.25" } }, "buffer": { @@ -1710,9 +1742,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000967", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000967.tgz", - "integrity": "sha512-rUBIbap+VJfxTzrM4akJ00lkvVb5/n5v3EGXfWzSH5zT8aJmGzjA8HWhJ4U6kCpzxozUSnB+yvAYDRPY6mRpgQ==", + "version": "1.0.30000983", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000983.tgz", + "integrity": "sha512-/llD1bZ6qwNkt41AsvjsmwNOoA4ZB+8iqmf5LVyeSXuBODT/hAMFNVOh84NdUzoiYiSKqo5vQ3ZzeYHSi/olDQ==", "dev": true }, "chalk": { @@ -1886,36 +1918,29 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, - "core-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.1.tgz", - "integrity": "sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==", - "dev": true - }, "core-js-compat": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.0.1.tgz", - "integrity": "sha512-2pC3e+Ht/1/gD7Sim/sqzvRplMiRnFQVlPpDVaHtY9l7zZP7knamr3VRD6NyGfHd84MrDC0tAM9ulNxYMW0T3g==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.1.4.tgz", + "integrity": "sha512-Z5zbO9f1d0YrJdoaQhphVAnKPimX92D6z8lCGphH89MNRxlL1prI9ExJPqVwP0/kgkQCv8c4GJGT8X16yUncOg==", "dev": true, "requires": { - "browserslist": "^4.5.4", - "core-js": "3.0.1", - "core-js-pure": "3.0.1", - "semver": "^6.0.0" + "browserslist": "^4.6.2", + "core-js-pure": "3.1.4", + "semver": "^6.1.1" }, "dependencies": { "semver": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", - "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", "dev": true } } }, "core-js-pure": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.0.1.tgz", - "integrity": "sha512-mSxeQ6IghKW3MoyF4cz19GJ1cMm7761ON+WObSyLfTu/Jn3x7w4NwNFnrZxgl4MTSvYYepVLNuRtlB4loMwJ5g==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.1.4.tgz", + "integrity": "sha512-uJ4Z7iPNwiu1foygbcZYJsJs1jiXrTTCvxfLDXNhI/I+NHbSIEyr548y4fcsCEyWY0XgfAG/qqaunJ1SThHenA==", "dev": true }, "core-util-is": { @@ -2028,9 +2053,9 @@ "optional": true }, "devalue": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-1.1.0.tgz", - "integrity": "sha512-mKj+DaZuxevfmjI78VdlkBr+NDmwaDAKQz0t5RDSmhwBn6m5z82KDnVRKVFeUvlMOmI1fzkAUx4USdqGGhas6g==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-2.0.0.tgz", + "integrity": "sha512-6H2FBD5DPnQS75UWJtQjoVeKZlmXoa765UgYS5RQnx6Ay9LUhUld0w1/D6cYdrY+wnu6XQNlpEBfnJUZK0YyPQ==" }, "diff": { "version": "3.5.0", @@ -2064,9 +2089,9 @@ } }, "electron-to-chromium": { - "version": "1.3.134", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.134.tgz", - "integrity": "sha512-C3uK2SrtWg/gSWaluLHWSHjyebVZCe4ZC0NVgTAoTq8tCR9FareRK5T7R7AS/nPZShtlEcjVMX1kQ8wi4nU68w==", + "version": "1.3.188", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.188.tgz", + "integrity": "sha512-tEQcughYIMj8WDMc59EGEtNxdGgwal/oLLTDw+NEqJRJwGflQvH3aiyiexrWeZOETP4/ko78PVr6gwNhdozvuQ==", "dev": true }, "emoji-regex": { @@ -2125,9 +2150,9 @@ "dev": true }, "esm": { - "version": "3.2.22", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.22.tgz", - "integrity": "sha512-z8YG7U44L82j1XrdEJcqZOLUnjxco8pO453gKOlaMD1/md1n/5QrscAmYG+oKUspsmDLuBFZrpbxI6aQ67yRxA==", + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", "dev": true }, "esprima": { @@ -2774,6 +2799,15 @@ "isobject": "^3.0.1" } }, + "is-reference": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.3.tgz", + "integrity": "sha512-W1iHHv/oyBb2pPxkBxtaewxa1BC58Pn5J0hogyCdefwUIvb6R+TGbAcIa4qPNYLqLhb3EnOgUf2MQkkF76BcKw==", + "dev": true, + "requires": { + "@types/estree": "0.0.39" + } + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -3121,9 +3155,9 @@ } }, "marked": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.2.tgz", - "integrity": "sha512-LqxwVH3P/rqKX4EKGz7+c2G9r98WeM/SW34ybhgNGhUQNKtf1GmmSkJ6cDGJ/t6tiyae49qRkpyTw2B9HOrgUA==" + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==" }, "mem": { "version": "4.3.0", @@ -3391,15 +3425,15 @@ } }, "node-fetch": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.5.0.tgz", - "integrity": "sha512-YuZKluhWGJwCcUu4RlZstdAxr8bFfOVHakc1mplwHkk8J+tqM1Y5yraYvIUpeX8aY7+crCwiELJq7Vl0o0LWXw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", "dev": true }, "node-pg-migrate": { - "version": "3.20.0", - "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-3.20.0.tgz", - "integrity": "sha512-7crNxFNueGgLVYw74FIi0MFowbXlVVpK2ZVM0RvJkhlA0da0Gt+pLmQYFkAuCl2cdfcvK72yUEvtXiw0Uei5CQ==", + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-3.21.1.tgz", + "integrity": "sha512-gTd8NquEcJjhkT96iwnch6DyAdZ9bhi+avdAvV4kPw/ya7T4OijUoSNVJzCodCG2kIjv+fjssnZHC/LzEQdewg==", "dev": true, "requires": { "@types/pg": "^7.4.0", @@ -3411,9 +3445,9 @@ } }, "node-releases": { - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.19.tgz", - "integrity": "sha512-SH/B4WwovHbulIALsQllAVwqZZD1kPmKCqrhGfR29dXjLAVZMHvBjD3S6nL9D/J9QkmZ1R92/0wCMDKXUUvyyA==", + "version": "1.1.25", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.25.tgz", + "integrity": "sha512-fI5BXuk83lKEoZDdH3gRhtsNgh05/wZacuXkgbiYkceE7+QIMXOg98n9ZV7mz27B+kFHnqHcUpscZZlGRSmTpQ==", "dev": true, "requires": { "semver": "^5.3.0" @@ -3863,9 +3897,9 @@ "dev": true }, "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, "pump": { @@ -3935,9 +3969,9 @@ "dev": true }, "regenerator-transform": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.4.tgz", - "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.0.tgz", + "integrity": "sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w==", "dev": true, "requires": { "private": "^0.1.6" @@ -3954,9 +3988,9 @@ } }, "regexp-tree": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.6.tgz", - "integrity": "sha512-LFrA98Dw/heXqDojz7qKFdygZmFoiVlvE1Zp7Cq2cvF+ZA+03Gmhy0k0PQlsC1jvHPiTUSs+pDHEuSWv6+6D7w==", + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.11.tgz", + "integrity": "sha512-7/l/DgapVVDzZobwMCCgMlqiqyLFJ0cduo/j+3BcDJIB+yJdsYCfKuI3l/04NV+H/rfNRdPIDbXNZHM9XvQatg==", "dev": true }, "regexparam": { @@ -4068,44 +4102,71 @@ } }, "rollup": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.11.3.tgz", - "integrity": "sha512-81MR7alHcFKxgWzGfG7jSdv+JQxSOIOD/Fa3iNUmpzbd7p+V19e1l9uffqT8/7YAHgGOzmoPGN3Fx3L2ptOf5g==", + "version": "1.16.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.16.7.tgz", + "integrity": "sha512-P3GVcbVSLLjHWFLKGerYRe3Q/yggRXmTZFx/4WZf4wzGwO6hAg5jyMAFMQKc0dts8rFID4BQngfoz6yQbI7iMQ==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "^11.13.9", + "@types/node": "^12.0.10", "acorn": "^6.1.1" - }, - "dependencies": { - "@types/node": { - "version": "11.13.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.10.tgz", - "integrity": "sha512-leUNzbFTMX94TWaIKz8N15Chu55F9QSH+INKayQr5xpkasBQBRF3qQXfo3/dOnMU/dEIit+Y/SU8HyOjq++GwA==", - "dev": true - } } }, "rollup-plugin-babel": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.2.tgz", - "integrity": "sha512-KfnizE258L/4enADKX61ozfwGHoqYauvoofghFJBhFnpH9Sb9dNPpWg8QHOaAfVASUYV8w0mCx430i9z0LJoJg==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.3.tgz", + "integrity": "sha512-tKzWOCmIJD/6aKNz0H1GMM+lW1q9KyFubbWzGiOG540zxPPifnEAHTZwjo0g991Y+DyOZcLqBgqOdqazYE5fkw==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", - "rollup-pluginutils": "^2.3.0" + "rollup-pluginutils": "^2.8.1" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "rollup-pluginutils": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", + "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + } } }, "rollup-plugin-commonjs": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.3.4.tgz", - "integrity": "sha512-DTZOvRoiVIHHLFBCL4pFxOaJt8pagxsVldEXBOn6wl3/V21wVaj17HFfyzTsQUuou3sZL3lEJZVWKPFblJfI6w==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.0.1.tgz", + "integrity": "sha512-x0PcCVdEc4J8igv1qe2vttz8JKAKcTs3wfIA3L8xEty3VzxgORLrzZrNWaVMc+pBC4U3aDOb9BnWLAQ8J11vkA==", "dev": true, "requires": { - "estree-walker": "^0.6.0", + "estree-walker": "^0.6.1", + "is-reference": "^1.1.2", "magic-string": "^0.25.2", - "resolve": "^1.10.0", - "rollup-pluginutils": "^2.6.0" + "resolve": "^1.11.0", + "rollup-pluginutils": "^2.8.1" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "rollup-pluginutils": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", + "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + } } }, "rollup-plugin-json": { @@ -4118,15 +4179,42 @@ } }, "rollup-plugin-node-resolve": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.2.4.tgz", - "integrity": "sha512-t/64I6l7fZ9BxqD3XlX4ZeO6+5RLKyfpwE2CiPNUKa+GocPlQhf/C208ou8y3AwtNsc6bjSk/8/6y/YAyxCIvw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz", + "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==", "dev": true, "requires": { "@types/resolve": "0.0.8", "builtin-modules": "^3.1.0", "is-module": "^1.0.0", - "resolve": "^1.10.0" + "resolve": "^1.11.1", + "rollup-pluginutils": "^2.8.1" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "resolve": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", + "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "rollup-pluginutils": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", + "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + } } }, "rollup-plugin-replace": { @@ -4140,9 +4228,9 @@ } }, "rollup-plugin-svelte": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.0.3.tgz", - "integrity": "sha512-3W/jbtBcsxohKQMI1Po2ZsUHRGUy3vEtgXLHvBin1+ms3wl2eomSyYBV7pwrkh6tWok9BVzdxGQgd7IqibG+Ew==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.1.0.tgz", + "integrity": "sha512-4MRZG29dAWDpoxEs5uIHzDnYafQEOLaKIJAuDYUtFIzEm1F1IGSTlFyjd8/qk4wltlHdu6V7YfZY53+CKryhMg==", "dev": true, "requires": { "require-relative": "^0.8.7", @@ -4151,15 +4239,33 @@ } }, "rollup-plugin-terser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-4.0.4.tgz", - "integrity": "sha512-wPANT5XKVJJ8RDUN0+wIr7UPd0lIXBo4UdJ59VmlPCtlFsE20AM+14pe+tk7YunCsWEiuzkDBY3QIkSCjtrPXg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.1.1.tgz", + "integrity": "sha512-McIMCDEY8EU6Y839C09UopeRR56wXHGdvKKjlfiZG/GrP6wvZQ62u2ko/Xh1MNH2M9WDL+obAAHySljIZYCuPQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "jest-worker": "^24.0.0", - "serialize-javascript": "^1.6.1", - "terser": "^3.14.1" + "jest-worker": "^24.6.0", + "rollup-pluginutils": "^2.8.1", + "serialize-javascript": "^1.7.0", + "terser": "^4.1.0" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "rollup-pluginutils": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", + "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + } } }, "rollup-pluginutils": { @@ -4198,9 +4304,9 @@ } }, "sapper": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/sapper/-/sapper-0.27.3.tgz", - "integrity": "sha512-JOSrQEw5bD3770edZ+gwdZxS/69sySl+0KuJyMiBQKRnb85cb55w/fBYg2SMhKDa/BlaXg14aL19OiBRpXGZLQ==", + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/sapper/-/sapper-0.27.4.tgz", + "integrity": "sha512-BYdiJSiyVguu2FZBbl87mn8KhSu+C8JRl7FurclXbMgpiMW7Yt74HPCcu/hXOubvvZw0kVTnzBlAGJCXZmldnA==", "dev": true, "requires": { "html-minifier": "^4.0.0", @@ -4301,9 +4407,9 @@ } }, "shimport": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shimport/-/shimport-1.0.0.tgz", - "integrity": "sha512-XKd+39voZT1rFR1ct+pr8sFSYAW6IvM3LeF87FrgcGHc/uSZ4GfOZVA42LE5LXFOpTWgmDC5sS8DNDtiV4Vd4Q==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/shimport/-/shimport-1.0.1.tgz", + "integrity": "sha512-Imf4gH+8WQmT1GvxS/x79qpmfnE6m50hyN1ucatX+7oMCgmaF8obZWCPIzSUe6+P+YmXM46lkP2pxiV2/lt9Og==", "dev": true }, "signal-exit": { @@ -4665,9 +4771,9 @@ } }, "svelte": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.5.2.tgz", - "integrity": "sha512-tDLd2ghONtUQeepa6LkcWEf9KkxuTQmfM4LwhWx1SH4Xzg38Kc0u051of34mWEfm3gG5h4dtk7Wuu2Aw7c60Yw==", + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.6.7.tgz", + "integrity": "sha512-9HzhPxWNLi+ZBhxL3HJ8jwwu+u+XfHtVF3uEJ2m8/JOdnaTC9D2qiEwOncgI7z/pN+VumgKQtZoHtvYCW6fHqg==", "dev": true }, "tar": { @@ -4686,14 +4792,14 @@ } }, "terser": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", - "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.1.2.tgz", + "integrity": "sha512-jvNoEQSPXJdssFwqPSgWjsOrb+ELoE+ILpHPKXC83tIxOlh2U75F1KuB2luLD/3a6/7K3Vw5pDn+hvu0C4AzSw==", "dev": true, "requires": { - "commander": "^2.19.0", + "commander": "^2.20.0", "source-map": "~0.6.1", - "source-map-support": "~0.5.10" + "source-map-support": "~0.5.12" }, "dependencies": { "source-map": { @@ -5200,9 +5306,9 @@ } }, "yootils": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/yootils/-/yootils-0.0.15.tgz", - "integrity": "sha512-GvGLuJ7XHJPGEUQ52vh8fh+vPjfikuGcu7yBswfrsNsHqnAoytOVuSb69eM0j8wQIjMz0U3kY3YsfwMhJgfG9w==" + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/yootils/-/yootils-0.0.16.tgz", + "integrity": "sha512-aIVecm5ucOzwhtKbl0zkfg0ZSOUR9c2da0k8cIc9umjjzkvVCWUUX/UHZ1CLPsv4wmJLqt0aWeLB7p9n9JDwYQ==" } } } diff --git a/site/package.json b/site/package.json index f1987b8293..b3953ae7de 100644 --- a/site/package.json +++ b/site/package.json @@ -15,46 +15,46 @@ "dependencies": { "@polka/redirect": "^1.0.0-next.0", "@polka/send": "^1.0.0-next.2", - "devalue": "^1.1.0", + "devalue": "^2.0.0", "do-not-zip": "^1.0.0", "golden-fleece": "^1.0.9", - "httpie": "^1.1.1", + "httpie": "^1.1.2", "jsonwebtoken": "^8.5.1", - "marked": "^0.6.1", - "pg": "^7.10.0", + "marked": "^0.7.0", + "pg": "^7.11.0", "polka": "^1.0.0-next.2", - "prismjs": "^1.15.0", - "sirv": "^0.4.0", - "yootils": "0.0.15" + "prismjs": "^1.16.0", + "sirv": "^0.4.2", + "yootils": "0.0.16" }, "devDependencies": { - "@babel/core": "^7.4.4", + "@babel/core": "^7.5.4", "@babel/plugin-syntax-dynamic-import": "^7.2.0", - "@babel/plugin-transform-runtime": "^7.4.4", - "@babel/preset-env": "^7.4.4", - "@babel/runtime": "^7.4.4", + "@babel/plugin-transform-runtime": "^7.5.0", + "@babel/preset-env": "^7.5.4", + "@babel/runtime": "^7.5.4", "@sindresorhus/slugify": "^0.9.1", - "@sveltejs/site-kit": "^1.1.0", + "@sveltejs/site-kit": "^1.1.1", "@sveltejs/svelte-repl": "^0.1.8", "degit": "^2.1.3", "dotenv": "^8.0.0", - "esm": "^3.2.22", - "jimp": "^0.6.0", - "mocha": "^6.1.3", - "node-fetch": "^2.3.0", - "node-pg-migrate": "^3.18.1", + "esm": "^3.2.25", + "jimp": "^0.6.4", + "mocha": "^6.1.4", + "node-fetch": "^2.6.0", + "node-pg-migrate": "^3.21.1", "npm-run-all": "^4.1.5", - "rollup": "^1.11.3", - "rollup-plugin-babel": "^4.3.2", - "rollup-plugin-commonjs": "^9.3.4", + "rollup": "^1.16.7", + "rollup-plugin-babel": "^4.3.3", + "rollup-plugin-commonjs": "^10.0.1", "rollup-plugin-json": "^4.0.0", - "rollup-plugin-node-resolve": "^4.2.3", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-replace": "^2.2.0", - "rollup-plugin-svelte": "^5.0.3", - "rollup-plugin-terser": "^4.0.4", - "sapper": "^0.27.3", + "rollup-plugin-svelte": "^5.1.0", + "rollup-plugin-terser": "^5.1.1", + "sapper": "^0.27.4", "shelljs": "^0.8.3", - "svelte": "^3.5.2" + "svelte": "^3.6.7" }, "engines": { "node": ">=10.0.0" From 7a024f0517bc7b3c3c9b4617d8f5a177bf2992df Mon Sep 17 00:00:00 2001 From: julian-kuroiwa Date: Wed, 10 Jul 2019 12:02:46 -0300 Subject: [PATCH 412/510] Comigo logo Comigo logo as a company that is using Svelte. --- site/src/routes/_components/WhosUsingSvelte.svelte | 1 + site/static/organisations/comigo.svg | 1 + 2 files changed, 2 insertions(+) create mode 100644 site/static/organisations/comigo.svg diff --git a/site/src/routes/_components/WhosUsingSvelte.svelte b/site/src/routes/_components/WhosUsingSvelte.svelte index d2f910eade..caa7ea41a2 100644 --- a/site/src/routes/_components/WhosUsingSvelte.svelte +++ b/site/src/routes/_components/WhosUsingSvelte.svelte @@ -47,6 +47,7 @@
    Beyonk logo Chess.com logo + Comigo logo Datawrapper logo DBNomics logo From-Now-On logo diff --git a/site/static/organisations/comigo.svg b/site/static/organisations/comigo.svg new file mode 100644 index 0000000000..7fa04a455a --- /dev/null +++ b/site/static/organisations/comigo.svg @@ -0,0 +1 @@ +Logotipo da Comigo Saúde From 3406ceb16a8cfbc7fa1da18d3be6b186a5937ae1 Mon Sep 17 00:00:00 2001 From: voldemortensen Date: Wed, 10 Jul 2019 15:40:37 -0600 Subject: [PATCH 413/510] Add GoDaddy and Sucuri logos --- .../routes/_components/WhosUsingSvelte.svelte | 2 ++ site/static/organisations/godaddy.png | Bin 0 -> 21074 bytes site/static/organisations/sucuri.png | Bin 0 -> 4553 bytes 3 files changed, 2 insertions(+) create mode 100644 site/static/organisations/godaddy.png create mode 100644 site/static/organisations/sucuri.png diff --git a/site/src/routes/_components/WhosUsingSvelte.svelte b/site/src/routes/_components/WhosUsingSvelte.svelte index d2f910eade..3292b56ba4 100644 --- a/site/src/routes/_components/WhosUsingSvelte.svelte +++ b/site/src/routes/_components/WhosUsingSvelte.svelte @@ -50,6 +50,7 @@ Datawrapper logo DBNomics logo From-Now-On logo + GoDaddy logo itslearning logo Mustlab logo Nesta logo @@ -61,6 +62,7 @@ Socialist Party logo Stone Payments logo Strix Cloud logoStrix Cloud + Sucuri logo Thunderdome logo Tokopedia logo HealthTree logo diff --git a/site/static/organisations/godaddy.png b/site/static/organisations/godaddy.png new file mode 100644 index 0000000000000000000000000000000000000000..233c9650808be26bedb37003b53f30cf17130df0 GIT binary patch literal 21074 zcmYJa1yEgG&o+#^OK~{3YoWMHad$25?oM%cD{e)L%fV@JDehj}3I})jPap30``I&0 zXS&x;vQ}1dhB^i=N~AQFnWaX5P%xwSt}Pa9FYCHSfGwdlU{J|##qkQu#5(OF)43BI^CL270ds|z z9F#o=EMoYZ_^N24Qy&YjS=W%)wYnQ52C|~h@47gVGXaLJ0u6neDP2ZJu5Z{~g|P7M z2r)kG+`Q(6j-5yy-`ue|%3ZVkCngxkuxG}wDM2al3e?>?wY&D?4>q?=nc^jW$m}jy z*tCRAladNk^(b{j@xgyzlaa_ZT%5@MCdaf*$$c0&_M11Z#?TD?&amX>&aGQ!P|G4! zYijKM-BuWmsm&NsufHQB=bLBjTcLTmTehRql_+*SeAk;od8tK#lfq*o*KelUK`?3b zhvx6g^vQ+%v?LEeg?7Vek7qmQo%@qVfkT4`Q6mE8bi`zkBgZuRSy9n+6!LvM$HiC^4 zm*CfL>fMuw3?QPY=O)`$m%Lxh@*qc&GkQx&gCp%L)VwRDYKe#r4uNhbW8WD5`X|Q$ zgm=k5DO@-@4Zw%MOgMPA;Q8n!8~(B?|E3*c@`p?Am~Snx#d+&bhtdgto9Jfqpug}l zx^d{c_%E2We&ng9k9wJ^t6{h>qUJ5X?B#p3RW}PbhQ6rwiTe=zmf;*{qs!_hIl0IQ zR)PB8vLM*d%P)zAq#F@p1Q?n@W(+ZLH8g(-_Z{)&{Fl-DtTxcF&}+jn6#@z5qrGsY z5Z`5eFs4F>BRHY#Bc)V(_~}JO|3+CqmjP5K*x=&=tGK}KrP1%?A5l8jOZWeql{TNG z1^H|WUUQgjMUivr-~o{!%JyRBbYq%Z6S?(FE+zS!&FEt+*1L=!SOC$t*WviJ(JoAw z;dzTo>qFk~&p2e_f?u7w8Ny&A9g8-cU)$U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`hP!9AUlFaq|1C%uE~DXO0NJa$H11jY~_+u7hje_V=s!vikzJRm5tdrs?*|!z?*P zBNRZFPFJ^cp#U|DN-EMyAG$z*d4GRPFBM{jZUr*__J{oTCNmO4h33kw92G5$3LxIRW(yJxBEi*5)CHwAGq)BT7yX8_&y(7 z%qjWc=?dhg$~D&Qh)m3TrsJ%`$2;;IDZL1Af|d^{V6I|Fb&&`86K_hk@g>5GR4h01 zXN7o#R1(GCCag~wAG?1bmJhU>k?Y91q+4rd z2p_)qw4Na1K-nUchvu^FPRJ09I=n=jS+krQLG!rKe9Rx!rJQtn%>#0{T}j|xzSyg6 z=vOMa;Y@uY|3$S){n|1>bH7W??{p1g?5;kLba{-e{DL_1-{_PA-C8>QIG$;6X3MOd zvJP7pEvNa&JxZE;iDOQ{*?nConAVP|?a+hg`v(jng|Qp{echz+Be6aI zXmicM)@7fgw4)Cu$C?gyo1+ru{@6{Mn3ca@*m=7~rxf9K1!5q|#UCY1bKJHS0*aY8 z1~&0%`mX72+68^>x3qo*Q^p2K#1^pjN2at}gN1)9N(MTvRI*5F_^{nJ-1zJ1zYun6 ziw^{q3I5m(`oC){1-$2e%JMwfoIT|wON+fA$;CX8a(Cwb6<^wXpEwKbR|HE{ukz@i z4zhq(oL!yPxCg~17J4`fw>iv9MBD$Z@+B}?4J=>{KHsCXU?EyY;D$X#(xc<4fHGxC zEc<^YuAhecgG8aEf7Dt3yNYT&uP^R&AEVcF#i$U{KzoKzDq5z=TTX2hZGT$m2`6;I zvz`R~s_H0zmhk2&n?fed zFMdKvA6TcJV`lVC^6*LT6|`uXleUzU-WsIji;LgqOws&7A)D@^dcRt@6@2LpmAC5L Y31UYSrmkn)PX3c$U&k1ZyLLC^e+0GemjD0& literal 0 HcmV?d00001 diff --git a/site/static/organisations/sucuri.png b/site/static/organisations/sucuri.png new file mode 100644 index 0000000000000000000000000000000000000000..d219d6fce8a10425fe11b9026f00af83c40d1128 GIT binary patch literal 4553 zcmZu!2TW7_+wEYMVi{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CH 414/510] fix global keyframes with no elements --- src/compiler/compile/css/Stylesheet.ts | 5 +++++ .../samples/global-keyframes-with-no-elements/expected.css | 1 + .../samples/global-keyframes-with-no-elements/input.svelte | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100644 test/css/samples/global-keyframes-with-no-elements/expected.css create mode 100644 test/css/samples/global-keyframes-with-no-elements/input.svelte diff --git a/src/compiler/compile/css/Stylesheet.ts b/src/compiler/compile/css/Stylesheet.ts index 49f11bc1f2..d448cda58e 100644 --- a/src/compiler/compile/css/Stylesheet.ts +++ b/src/compiler/compile/css/Stylesheet.ts @@ -217,6 +217,11 @@ class Atrule { if (type === 'Identifier') { if (name.startsWith('-global-')) { code.remove(start, start + 8); + this.children.forEach((rule: Rule) => { + rule.selectors.forEach(selector => { + selector.used = true; + }); + }); } else { code.overwrite(start, end, keyframes.get(name)); } diff --git a/test/css/samples/global-keyframes-with-no-elements/expected.css b/test/css/samples/global-keyframes-with-no-elements/expected.css new file mode 100644 index 0000000000..50a57ac471 --- /dev/null +++ b/test/css/samples/global-keyframes-with-no-elements/expected.css @@ -0,0 +1 @@ +@keyframes why{0%{color:red}100%{color:blue}} \ No newline at end of file diff --git a/test/css/samples/global-keyframes-with-no-elements/input.svelte b/test/css/samples/global-keyframes-with-no-elements/input.svelte new file mode 100644 index 0000000000..09499df7ee --- /dev/null +++ b/test/css/samples/global-keyframes-with-no-elements/input.svelte @@ -0,0 +1,6 @@ + \ No newline at end of file From e7ecb60132a44e1ead6f13b97a1b76f842fbab94 Mon Sep 17 00:00:00 2001 From: Bart Pype Date: Fri, 12 Jul 2019 14:06:46 +0200 Subject: [PATCH 415/510] Added Webdesq & Deck logo to 'Who is using Svelte' section --- site/src/routes/_components/WhosUsingSvelte.svelte | 2 ++ site/static/organisations/deck.svg | 1 + site/static/organisations/webdesq.svg | 1 + 3 files changed, 4 insertions(+) create mode 100644 site/static/organisations/deck.svg create mode 100644 site/static/organisations/webdesq.svg diff --git a/site/src/routes/_components/WhosUsingSvelte.svelte b/site/src/routes/_components/WhosUsingSvelte.svelte index d2f910eade..af125f82bc 100644 --- a/site/src/routes/_components/WhosUsingSvelte.svelte +++ b/site/src/routes/_components/WhosUsingSvelte.svelte @@ -49,6 +49,7 @@ Chess.com logo Datawrapper logo DBNomics logo + Deck logo From-Now-On logo itslearning logo Mustlab logo @@ -63,6 +64,7 @@ Strix Cloud logoStrix Cloud Thunderdome logo Tokopedia logo + Webdesq logo HealthTree logo + your company?

    diff --git a/site/static/organisations/deck.svg b/site/static/organisations/deck.svg new file mode 100644 index 0000000000..21291ddfe9 --- /dev/null +++ b/site/static/organisations/deck.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/static/organisations/webdesq.svg b/site/static/organisations/webdesq.svg new file mode 100644 index 0000000000..004bf8d506 --- /dev/null +++ b/site/static/organisations/webdesq.svg @@ -0,0 +1 @@ + \ No newline at end of file From 2664260527a7b3d947cf1c443a31d1eb53246fab Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 13 Jul 2019 06:35:57 -0400 Subject: [PATCH 416/510] use Node 8 types --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9135e1f140..bcde04de20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.6.6", + "version": "3.6.7", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -61,9 +61,9 @@ "dev": true }, "@types/node": { - "version": "12.0.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.12.tgz", - "integrity": "sha512-Uy0PN4R5vgBUXFoJrKryf5aTk3kJ8Rv3PdlHjl6UaX+Cqp1QE0yPQ68MPXGrZOfG7gZVNDIJZYyot0B9ubXUrQ==", + "version": "8.10.50", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.50.tgz", + "integrity": "sha512-+ZbcUwJdaBgOZpwXeT0v+gHC/jQbEfzoc9s4d0rN0JIKeQbuTrT+A2n1aQY6LpZjrLXJT7avVUqiCecCJeeZxA==", "dev": true }, "@types/resolve": { diff --git a/package.json b/package.json index 6ee90af401..8241c5eb7d 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "homepage": "https://github.com/sveltejs/svelte#README", "devDependencies": { "@types/mocha": "^5.2.7", - "@types/node": "=12", + "@types/node": "=8", "@typescript-eslint/eslint-plugin": "^1.11.0", "@typescript-eslint/parser": "^1.11.0", "acorn": "^6.2.0", From 70aa69949652183622e0b96637caf4d80e704b26 Mon Sep 17 00:00:00 2001 From: Umang Galaiya Date: Sun, 14 Jul 2019 20:49:18 +0530 Subject: [PATCH 417/510] [Test] Add test for class with spread attributes --- .../samples/class-with-spread/_config.js | 21 +++++++++++++++++++ .../samples/class-with-spread/main.svelte | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 test/runtime/samples/class-with-spread/_config.js create mode 100644 test/runtime/samples/class-with-spread/main.svelte diff --git a/test/runtime/samples/class-with-spread/_config.js b/test/runtime/samples/class-with-spread/_config.js new file mode 100644 index 0000000000..d5233a5849 --- /dev/null +++ b/test/runtime/samples/class-with-spread/_config.js @@ -0,0 +1,21 @@ +export default { + props: { + myClass: 'one two', + attributes: { + role: 'button' + } + }, + + html: `
    `, + + test({ assert, component, target, window }) { + component.myClass = 'one'; + component.attributes = { + 'aria-label': 'Test' + }; + + assert.htmlEqual(target.innerHTML, ` +
    + `); + } +}; diff --git a/test/runtime/samples/class-with-spread/main.svelte b/test/runtime/samples/class-with-spread/main.svelte new file mode 100644 index 0000000000..54d8088581 --- /dev/null +++ b/test/runtime/samples/class-with-spread/main.svelte @@ -0,0 +1,6 @@ + + +
    From 17247d8bb4e9680ac90347099c4a5a01c67d489b Mon Sep 17 00:00:00 2001 From: Umang Galaiya Date: Sun, 14 Jul 2019 20:49:27 +0530 Subject: [PATCH 418/510] [Test] Add test for class directive with spread attributes --- .../_config.js | 21 +++++++++++++++++++ .../main.svelte | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js create mode 100644 test/runtime/samples/class-with-dynamic-attribute-and-spread/main.svelte diff --git a/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js b/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js new file mode 100644 index 0000000000..58ccc76497 --- /dev/null +++ b/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js @@ -0,0 +1,21 @@ +export default { + props: { + myClass: 'one two', + attributes: { + role: 'button' + } + }, + + html: `
    `, + + test({ assert, component, target, window }) { + component.myClass = 'one'; + component.attributes = { + 'aria-label': 'Test' + }; + + assert.htmlEqual(target.innerHTML, ` +
    + `); + } +}; diff --git a/test/runtime/samples/class-with-dynamic-attribute-and-spread/main.svelte b/test/runtime/samples/class-with-dynamic-attribute-and-spread/main.svelte new file mode 100644 index 0000000000..95825c777b --- /dev/null +++ b/test/runtime/samples/class-with-dynamic-attribute-and-spread/main.svelte @@ -0,0 +1,6 @@ + + +
    From 59ea5654a7df7cbca47459730347050f78759558 Mon Sep 17 00:00:00 2001 From: Umang Galaiya Date: Sun, 14 Jul 2019 20:49:50 +0530 Subject: [PATCH 419/510] [Element][DOM] Set class dependencies before returning --- .../compile/render_dom/wrappers/Element/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/Element/index.ts b/src/compiler/compile/render_dom/wrappers/Element/index.ts index 9b14d1cd6c..9d3f60ac7e 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/index.ts @@ -548,6 +548,13 @@ export default class ElementWrapper extends Wrapper { } add_attributes(block: Block) { + // Get all the class dependencies first + this.attributes.forEach((attribute) => { + if (attribute.node.name === 'class' && attribute.node.is_dynamic) { + this.class_dependencies.push(...attribute.node.dependencies); + } + }); + // @ts-ignore todo: if (this.node.attributes.find(attr => attr.type === 'Spread')) { this.add_spread_attributes(block); @@ -555,9 +562,6 @@ export default class ElementWrapper extends Wrapper { } this.attributes.forEach((attribute) => { - if (attribute.node.name === 'class' && attribute.node.is_dynamic) { - this.class_dependencies.push(...attribute.node.dependencies); - } attribute.render(block); }); } From f369d8f0a7a5cd0cc0b8f990057d5e149e113c68 Mon Sep 17 00:00:00 2001 From: Umang Galaiya Date: Sun, 14 Jul 2019 20:50:05 +0530 Subject: [PATCH 420/510] [Element][SSR] Set class expression if spread is used --- src/compiler/compile/render_ssr/handlers/Element.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/compile/render_ssr/handlers/Element.ts b/src/compiler/compile/render_ssr/handlers/Element.ts index 27cf858f1f..0cd101df72 100644 --- a/src/compiler/compile/render_ssr/handlers/Element.ts +++ b/src/compiler/compile/render_ssr/handlers/Element.ts @@ -109,6 +109,9 @@ export default function(node: Element, renderer: Renderer, options: RenderOption ) { // a boolean attribute with one non-Text chunk args.push(`{ ${quote_name_if_necessary(attribute.name)}: ${snip(attribute.chunks[0])} }`); + } else if (attribute.name === 'class' && class_expression) { + // Add class expression + args.push(`{ ${quote_name_if_necessary(attribute.name)}: [\`${stringify_attribute(attribute, true)}\`, \`\${${class_expression}}\`].join(' ').trim() }`); } else { args.push(`{ ${quote_name_if_necessary(attribute.name)}: \`${stringify_attribute(attribute, true)}\` }`); } From 1909bb43d9aecf7cf8bc7ddfc188bdf6defac457 Mon Sep 17 00:00:00 2001 From: David Mosher Date: Mon, 15 Jul 2019 19:18:18 -0400 Subject: [PATCH 421/510] bugfix: exempt the :root selector from prefix - the change in #1705 introduced a small bug for users who were relying on assigning global CSS variables via the :root selector - this change adds a small exemption to avoid prefixing :root with the random prefix that svelte adds --- src/compiler/compile/css/Selector.ts | 4 +++- test/css/samples/css-vars/expected.css | 2 +- test/css/samples/css-vars/input.svelte | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/compiler/compile/css/Selector.ts b/src/compiler/compile/css/Selector.ts index 005e5320fd..ef54f789fc 100644 --- a/src/compiler/compile/css/Selector.ts +++ b/src/compiler/compile/css/Selector.ts @@ -62,7 +62,9 @@ export default class Selector { while (i--) { const selector = block.selectors[i]; if (selector.type === 'PseudoElementSelector' || selector.type === 'PseudoClassSelector') { - if (i === 0) code.prependRight(selector.start, attr); + if (selector.name !== 'root') { + if (i === 0) code.prependRight(selector.start, attr); + } continue; } diff --git a/test/css/samples/css-vars/expected.css b/test/css/samples/css-vars/expected.css index ccb7a3ec48..c2bd56375b 100644 --- a/test/css/samples/css-vars/expected.css +++ b/test/css/samples/css-vars/expected.css @@ -1 +1 @@ -div.svelte-xyz{--test:10} \ No newline at end of file +:root{--root-test:20}div.svelte-xyz{--test:10} \ No newline at end of file diff --git a/test/css/samples/css-vars/input.svelte b/test/css/samples/css-vars/input.svelte index dafa7d09e4..7aa48617a4 100644 --- a/test/css/samples/css-vars/input.svelte +++ b/test/css/samples/css-vars/input.svelte @@ -1,7 +1,10 @@
    \ No newline at end of file + From 35f81b279ff523cff9c841bb2fe9c5c1dea3b03f Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 18 Jul 2019 11:20:46 -0400 Subject: [PATCH 422/510] site: document store contract (#3261) --- site/content/docs/01-component-format.md | 24 +++++++++++++++++ site/content/docs/03-run-time.md | 34 +----------------------- 2 files changed, 25 insertions(+), 33 deletions(-) diff --git a/site/content/docs/01-component-format.md b/site/content/docs/01-component-format.md index 33b4e6bf26..3d349af51d 100644 --- a/site/content/docs/01-component-format.md +++ b/site/content/docs/01-component-format.md @@ -147,8 +147,29 @@ If a statement consists entirely of an assignment to an undeclared variable, Sve --- +A *store* is any object that allows reactive access to a value via a simple *store contract*. + +The [`svelte/store` module](docs#svelte_store) contains minimal store implementations which fulfil this contract. You can use these as the basis for your own stores, or you can implement your stores from scratch. + +A store must contain a `.subscribe` method, which must accept as its argument a subscription function. This subscription function must be immediately and synchronously called with the store's current value upon calling `.subscribe`. All of a store's active subscription functions must later be synchronously called whenever the store's value changes. The `.subscribe` method must also return an unsubscription function. Calling an unsubscription function must stop its subscription, and its corresponding subscription function must not be called again by the store. + +A store may optionally contain a `.set` method, which must accept as its argument a new value for the store, and which synchronously calls all of the store's active subscription functions. Such a store is called a *writable store*. + +```js +const unsubscribe = store.subscribe(value => { + console.log(value); +}); // logs `value` + +// later... +unsubscribe(); +``` + +--- + Any time you have a reference to a store, you can access its value inside a component by prefixing it with the `$` character. This causes Svelte to declare the prefixed variable, and set up a store subscription that will be unsubscribed when appropriate. +Assignments to `$`-prefixed variables require that the variable be a writable store, and will result in a call to the store's `.set` method. + Note that the store must be declared at the top level of the component — not inside an `if` block or a function, for example. Local variables (that do not represent store values) must *not* have a `$` prefix. @@ -162,6 +183,9 @@ Local variables (that do not represent store values) must *not* have a `$` prefi count.set(1); console.log($count); // logs 1 + + $count = 2; + console.log($count); // logs 2 ``` diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 3552552767..8d34c60f42 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -212,39 +212,7 @@ Events dispatched from child components can be listened to in their parent. Any ### `svelte/store` -The `svelte/store` module exports functions for creating [stores](tutorial/writable-stores). - ---- - -To be considered a store, an object must have a `subscribe` method that returns an `unsubscribe` function. - -```js -const unsubscribe = store.subscribe(value => { - console.log(value); -}); // logs `value` - -// later... -unsubscribe(); -``` - ---- - -Stores have special significance inside Svelte components. Their values can be read by prefixing the store's name with the `$` character, which causes Svelte to set up subscriptions and unsubscriptions automatically during the component's lifecycle. - -```html - - - -``` +The `svelte/store` module exports functions for creating [stores](docs#4_Prefix_stores_with_$_to_access_their_values). #### `writable` From 03849825bb5afea1436f4ee8be47edffd51b7950 Mon Sep 17 00:00:00 2001 From: Antony Jones Date: Fri, 19 Jul 2019 19:27:57 +0100 Subject: [PATCH 423/510] update issue templates to new format and add more detail (#3238) --- .github/ISSUE_TEMPLATE.md | 35 +++++++------ .github/ISSUE_TEMPLATE/bug_report.md | 52 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 23 +++++++++ .github/ISSUE_TEMPLATE/questions-and-help.md | 12 +++++ .github/PULL_REQUEST_TEMPLATE.md | 13 ++--- 5 files changed, 114 insertions(+), 21 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/questions-and-help.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index e7bd60d3f4..6871094f5c 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,21 +1,26 @@ - +Thanks for being part of Svelte! +------- diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000..f5369e9991 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,52 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: 'Bug' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Logs** +Please include browser console and server logs around the time this bug occurred. + +**To Reproduce** +To help us help you, if you've found a bug please consider the following: + +* If you can demonstrate the bug using https://svelte.dev/repl, please do. +* If that's not possible, we recommend creating a small repo that illustrates the problem. +* Reproductions should be small, self-contained, correct examples – http://sscce.org. + +Occasionally, this won't be possible, and that's fine – we still appreciate you raising the issue. But please understand that Svelte is run by unpaid volunteers in their free time, and issues that follow these instructions will get fixed faster. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Stacktraces** +If you have a stack trace to include, we recommend putting inside a `
    ` block for the sake of the thread's readability: + +
    + Stack trace + + Stack trace goes here... +
    + +**Information about your Svelte project:** +- Your browser and the version: (e.x. Chrome 52.1, Firefox 48.0, IE 10) + +- Your operating system: (e.x. OS X 10, Ubuntu Linux 19.10, Windows XP, etc) + +- Svelte version (Please check you can reproduce the issue with the latest release!) + +- Whether your project uses Webpack or Rollup + +**Severity** +How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Svelte entirely? + +Note: the more honest and specific you are here the more we will take you seriously. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000000..e533c21c96 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,23 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: 'New Feature' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. For example: I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**How important is this feature to you?** +Note: the more honest and specific you are here the more we will take you seriously. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/questions-and-help.md b/.github/ISSUE_TEMPLATE/questions-and-help.md new file mode 100644 index 0000000000..a6e0dc6e19 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/questions-and-help.md @@ -0,0 +1,12 @@ +--- +name: Questions and help +about: If you think you need help with something related to Svelte +title: '' +labels: 'Question' +assignees: '' + +--- + +This issue tracker is intended to collect bug reports and feature requests. + +For help with installation, information on how features work, or questions about specific features of Svelte, please come and join us in the [Svelte Discord](https://svelte.dev/chat), or ask your question on [Stack Overflow](https://stackoverflow.com/questions/tagged/svelte). Any issues open for help requests will be closed to keep from clogging up the issue tracker. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d2882acf4a..1e77e0337a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,8 @@ - + +### Before submitting the PR, please make sure you do the following +- [ ] It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases features are absent for a reason. +- [ ] This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them. +- [ ] Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. (Remember to `npm run lint`!) +### Tests +- [ ] Run the tests tests with `npm test` or `yarn test`) From b3b830d21aea398375d3e04093fc5ee92fde3b64 Mon Sep 17 00:00:00 2001 From: Philipp_Lypniakov Date: Sat, 20 Jul 2019 00:41:42 +0300 Subject: [PATCH 424/510] Update text.md Added a suggestion for a user to add the preventDefault modifier so they could press any key uninterrupted by the default behavior of a key or key combination. --- .../tutorial/16-special-elements/03-svelte-window/text.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/site/content/tutorial/16-special-elements/03-svelte-window/text.md b/site/content/tutorial/16-special-elements/03-svelte-window/text.md index 2715da7260..9be7afd66f 100644 --- a/site/content/tutorial/16-special-elements/03-svelte-window/text.md +++ b/site/content/tutorial/16-special-elements/03-svelte-window/text.md @@ -8,4 +8,9 @@ On line 33, add the `keydown` listener: ```html -``` \ No newline at end of file +``` +Don't forget to add `preventDefault` modifier if you want to press any other key, e.g. after you have pressed `Tab` or `Ctrl + D`: + +```html + +``` From b6e875ba03f33df0277851a391a0747b0086a669 Mon Sep 17 00:00:00 2001 From: Ivo Lukacovic Date: Sat, 20 Jul 2019 21:29:47 +0200 Subject: [PATCH 425/510] avoid trailing comma in destroy_component() call (#3255) --- .../compile/render_dom/wrappers/InlineComponent/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts index 5eef585e11..c85f47cd54 100644 --- a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts @@ -425,7 +425,7 @@ export default class InlineComponentWrapper extends Wrapper { `if (${name}) @transition_out(${name}.$$.fragment, #local);` ); - block.builders.destroy.add_line(`if (${name}) @destroy_component(${name}, ${parent_node ? '' : 'detaching'});`); + block.builders.destroy.add_line(`if (${name}) @destroy_component(${name}${parent_node ? '' : ', detaching'});`); } else { const expression = this.node.name === 'svelte:self' ? '__svelte:self__' // TODO conflict-proof this @@ -465,7 +465,7 @@ export default class InlineComponentWrapper extends Wrapper { } block.builders.destroy.add_block(deindent` - @destroy_component(${name}, ${parent_node ? '' : 'detaching'}); + @destroy_component(${name}${parent_node ? '' : ', detaching'}); `); block.builders.outro.add_line( From 0a3818fb9bb34f094ddb023fdcd6a9de4ace7312 Mon Sep 17 00:00:00 2001 From: craigglennie Date: Sun, 21 Jul 2019 07:49:30 +1200 Subject: [PATCH 426/510] Don't use shorthand binding in textarea example (#3256) --- .../examples/05-bindings/04-textarea-inputs/App.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/content/examples/05-bindings/04-textarea-inputs/App.svelte b/site/content/examples/05-bindings/04-textarea-inputs/App.svelte index be338bf47f..5a9e18f79d 100644 --- a/site/content/examples/05-bindings/04-textarea-inputs/App.svelte +++ b/site/content/examples/05-bindings/04-textarea-inputs/App.svelte @@ -1,12 +1,12 @@ - + -{@html marked(value)} \ No newline at end of file +{@html marked(text)} \ No newline at end of file From d56e0d50806a176fb17ee420622c9551694ffb90 Mon Sep 17 00:00:00 2001 From: Rohan Faiyaz Khan Date: Mon, 22 Jul 2019 01:01:44 +0600 Subject: [PATCH 427/510] Update 03-run-time.md Added descriptors for set and update methods of the return object of writable in svelte/store. --- site/content/docs/03-run-time.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 8d34c60f42..5d73bfdbcb 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -225,7 +225,13 @@ store = writable(value: any, (set: (value: any) => void) => () => void) --- -Creates a store with additional `set` and `update` methods. +Function that creates a store which has values that can be set from 'outside' components. It gets created as an object with additional `set` and `update` methods. + +`set` is a method that takes one argument which is the value to be set. The store value gets set to the value of the argument if the store value is not already equal to it. + +`update` is a method that takes one argument which is a callback. The callback takes the existing store value as its argument and returns the new value to be set to the store. + +If a function is passed as the second argument to the `writable` function, it will be called when the number of subscribers goes from zero to one (but not from one to two, etc). That function will be passed a `set` function which changes the value of the store. It must return a `stop` function that is called when the subscriber count goes from one to zero. ```js import { writable } from 'svelte/store'; @@ -243,7 +249,6 @@ count.update(n => n + 1); // logs '2' --- -If a function is passed as the second argument, it will be called when the number of subscribers goes from zero to one (but not from one to two, etc). That function will be passed a `set` function which changes the value of the store. It must return a `stop` function that is called when the subscriber count goes from one to zero. ```js import { writable } from 'svelte/store'; From 01b4ce29551c9308453a520df415fe63beccc423 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 23 Jul 2019 08:30:30 -0400 Subject: [PATCH 428/510] use SVG godaddy logo instead --- site/src/routes/_components/WhosUsingSvelte.svelte | 2 +- site/static/organisations/godaddy.svg | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 site/static/organisations/godaddy.svg diff --git a/site/src/routes/_components/WhosUsingSvelte.svelte b/site/src/routes/_components/WhosUsingSvelte.svelte index 90cb64b521..8aab007132 100644 --- a/site/src/routes/_components/WhosUsingSvelte.svelte +++ b/site/src/routes/_components/WhosUsingSvelte.svelte @@ -52,7 +52,7 @@ DBNomics logo Deck logo From-Now-On logo - GoDaddy logo + GoDaddy logo itslearning logo Mustlab logo Nesta logo diff --git a/site/static/organisations/godaddy.svg b/site/static/organisations/godaddy.svg new file mode 100644 index 0000000000..e753ceed7b --- /dev/null +++ b/site/static/organisations/godaddy.svg @@ -0,0 +1 @@ + \ No newline at end of file From 0e2cf9e55550558685678881c14d0d71df8fdc79 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 23 Jul 2019 08:30:49 -0400 Subject: [PATCH 429/510] compress logos --- site/static/organisations/comigo.svg | 2 +- site/static/organisations/datawrapper.svg | 2 +- site/static/organisations/dbnomics.jpg | Bin 8937 -> 8796 bytes site/static/organisations/godaddy.png | Bin 21074 -> 0 bytes site/static/organisations/healthtree.png | Bin 2851 -> 1484 bytes site/static/organisations/nesta.svg | 2 +- site/static/organisations/nonkosi.svg | 2 +- .../organisations/open-state-foundation.svg | 2 +- site/static/organisations/razorpay.svg | 2 +- site/static/organisations/socialist-party.svg | 2 +- site/static/organisations/stone.svg | 2 +- site/static/organisations/sucuri.png | Bin 4553 -> 4268 bytes site/static/organisations/thunderdome.svg | 155 +----------------- site/static/organisations/tokopedia.png | Bin 3937 -> 3928 bytes site/static/organisations/webdesq.svg | 2 +- 15 files changed, 10 insertions(+), 163 deletions(-) delete mode 100644 site/static/organisations/godaddy.png diff --git a/site/static/organisations/comigo.svg b/site/static/organisations/comigo.svg index 7fa04a455a..44622a5195 100644 --- a/site/static/organisations/comigo.svg +++ b/site/static/organisations/comigo.svg @@ -1 +1 @@ -Logotipo da Comigo Saúde + \ No newline at end of file diff --git a/site/static/organisations/datawrapper.svg b/site/static/organisations/datawrapper.svg index b623876e01..f614df0eee 100644 --- a/site/static/organisations/datawrapper.svg +++ b/site/static/organisations/datawrapper.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/site/static/organisations/dbnomics.jpg b/site/static/organisations/dbnomics.jpg index 9eb3228b3cbfea3b462b81bdf07926ec031bfa33..3d5991f8692443954ecbe8a86b969c9d65845a3d 100644 GIT binary patch literal 8796 zcmbVxbx>SO^ybXq&S1ekxDFEB-2#JaaCi4$!EJDNx8M>83GVI?NN^`;(7^KEzTejF zzuR4PZ`G-~b^H6y>90?p^RoQ%3xKU4BQFC00s#Qv>jb>40VDx%|7Rfle~p)302mn{ z1O&nXzyKf^00IME`T=AB00;yJ{O4Ey4J2d$B0K^L5Cr$K3PAqfb}Z8BQ7%&@H6V`9 zN*$!7uxX)jebTY{(v0FWX~2Pi=fzRFgmAi4O1)Tj#??Ww_no?~<{DPj*hUb?DkX+@ z@WqD%r*d*%Dpk!R_;fIY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_hk@g>5GR4h01 zXN7o#R1(GCCag~wAG?1bmJhU>k?Y91q+4rd z2p_)qw4Na1K-nUchvu^FPRJ09I=n=jS+krQLG!rKe9Rx!rJQtn%>#0{T}j|xzSyg6 z=vOMa;Y@uY|3$S){n|1>bH7W??{p1g?5;kLba{-e{DL_1-{_PA-C8>QIG$;6X3MOd zvJP7pEvNa&JxZE;iDOQ{*?nConAVP|?a+hg`v(jng|Qp{echz+Be6aI zXmicM)@7fgw4)Cu$C?gyo1+ru{@6{Mn3ca@*m=7~rxf9K1!5q|#UCY1bKJHS0*aY8 z1~&0%`mX72+68^>x3qo*Q^p2K#1^pjN2at}gN1)9N(MTvRI*5F_^{nJ-1zJ1zYun6 ziw^{q3I5m(`oC){1-$2e%JMwfoIT|wON+fA$;CX8a(Cwb6<^wXpEwKbR|HE{ukz@i z4zhq(oL!yPxCg~17J4`fw>iv9MBD$Z@+B}?4J=>{KHsCXU?EyY;D$X#(xc<4fHGxC zEc<^YuAhecgG8aEf7Dt3yNYT&uP^R&AEVcF#i$U{KzoKzDq5z=TTX2hZGT$m2`6;I zvz`R~s_H0zmhk2&n?fed zFMdKvA6TcJV`lVC^6*LT6|`uXleUzU-WsIji;LgqOws&7A)D@^dcRt@6@2LpmAC5L Y31UYSrmkn)PX3c$U&k1ZyLLC^e+0GemjD0& diff --git a/site/static/organisations/healthtree.png b/site/static/organisations/healthtree.png index 9db4720408f226186b3f10dddaa8b437623dfa0f..ec3f219d1c8209c5a1c6e571bf3d22b82bcf7dbb 100644 GIT binary patch delta 1477 zcmV;$1v>hp7R(Ef8Gi!+007&uGw=Wa0uWG4R7L;)|6tOApX9Ue`|>ZuS`WKGFvMF= z&2!K4*&n}6U($fD=)XV6W^dMwf7_W5yFtJ0%=-TOuj#*e+LW;A!2ACE(DK@cZ*6!cx5K%9-P?l;NtP<+bws^nbhT$sfQ?=J@MC$!CDu znvdV6P|b90){BhaqzAb=T+w|y$YV*&Zj0Ze0Jk+D!A|u2_S^O1xa-Ct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r}vwA?Gb(m{YybbqS4j0HdX zUl^ej5?Nnrl;0Gx1m>xFF0~pBv%zH$93b+QE(}2kU6^fFntd2fp z+nQH4_*8KX=xdUmsEW&S!Jyei^FcQv5G8@E?1M$nF2g^-cf)002ovPDHLkV1geK BdA|Sv diff --git a/site/static/organisations/nesta.svg b/site/static/organisations/nesta.svg index 331bcdb765..72f53e07b0 100644 --- a/site/static/organisations/nesta.svg +++ b/site/static/organisations/nesta.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/site/static/organisations/nonkosi.svg b/site/static/organisations/nonkosi.svg index 8904cdae9d..8639c0ce38 100644 --- a/site/static/organisations/nonkosi.svg +++ b/site/static/organisations/nonkosi.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/site/static/organisations/open-state-foundation.svg b/site/static/organisations/open-state-foundation.svg index 8e27e20d21..f8c010e7e2 100644 --- a/site/static/organisations/open-state-foundation.svg +++ b/site/static/organisations/open-state-foundation.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/site/static/organisations/razorpay.svg b/site/static/organisations/razorpay.svg index 003a1bfc3d..829adb319e 100644 --- a/site/static/organisations/razorpay.svg +++ b/site/static/organisations/razorpay.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/site/static/organisations/socialist-party.svg b/site/static/organisations/socialist-party.svg index 6fc8348b0b..9dde31a5c0 100644 --- a/site/static/organisations/socialist-party.svg +++ b/site/static/organisations/socialist-party.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/site/static/organisations/stone.svg b/site/static/organisations/stone.svg index 920626ba49..0401dbb292 100644 --- a/site/static/organisations/stone.svg +++ b/site/static/organisations/stone.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/site/static/organisations/sucuri.png b/site/static/organisations/sucuri.png index d219d6fce8a10425fe11b9026f00af83c40d1128..a30b161139587e96b0dd9e21ff4475ac0920f8ca 100644 G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(TopF^l=V+i32ST^9y8&g(WBCpvQ|cV&1sH%_oR$SBL<1=^Ij>6*IFq3F*c^C#9_ zp`wF6Y^k%$gTx>A3g~}5*$jF}HpG}bp{cajin6i{sD&EV7-FQ@4lode3x!xyQ}b$K j-0Fq-#Yvi=P3?_68$lDX^}EM^`5=cxY!v$NpN diff --git a/site/static/organisations/thunderdome.svg b/site/static/organisations/thunderdome.svg index c8cbdaf039..0a5d8ee055 100644 --- a/site/static/organisations/thunderdome.svg +++ b/site/static/organisations/thunderdome.svg @@ -1,154 +1 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/site/static/organisations/tokopedia.png b/site/static/organisations/tokopedia.png index 2c8b9c09ce6d729dae5f10372c722f8e584e1eae..16fef7fe63b4c01ef4c3476c5a4ffebc8f8e6246 100644 GIT binary patch delta 3097 zcmV+!4CeFU9@rj`gaWllk%m($NJ6zpLbgdlv`JOeRYbZ>LbgdlwMjy@NGhsTMZ8Bv zwoF2`NkO+rLb;Oz0azYC#7;uEM?z)nQEOGm>_lk);08A!)aOwd$J(NsyuP)pBKNX1Y|$x%3L6_ArH1MGh)Nklcgv&N-~t_9iy(dmSeSWwO1YtJR~xGsow>^Ek)f(I2H-x9a}tR`s1K{GfPbzL<}W zxH%Gl^8+7+0HkmZ{9nZ*z3_k9QE)enu|t)%0z7yU>&AXo9ygW?*er)n+$=~AyT0@0 zjfTU4w6E6PaK9WsG|SrwU-eIK7Ni5Y;hfYq$U^DZ$m-!Y%q925PY%O&W61MS=H@}V z@T;(2hs?&5s~NEeZj>@^&{cUA_!~nGk22y-gzREK4#6<7Jp3L6e6N4bUbV2Rkj?Xa z@<7ui5i1oS^cjThd}6UzavHKc&;rFZvQBme>j^qx2H_?O++0Va^qnBM)% z;{%J=0KCv_oS%Po(u{UX04~YE1FOo;o}KfLOkj)w$)j?8<$&d8o&Zd2_xSOr@_U;z zwGBD_bU{Huk^D6HloZ@?SH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g b/site/static/organisations/webdesq.svg index 004bf8d506..c9f0012de0 100644 --- a/site/static/organisations/webdesq.svg +++ b/site/static/organisations/webdesq.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From 2761da640ae28a3b0c0afb2aae5b54a59d538045 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 23 Jul 2019 09:54:41 -0400 Subject: [PATCH 430/510] -> v3.6.8 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e8aee7f45..969ea61c28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Svelte changelog +## 3.6.8 + +* Preserve global keyframes that don't match local elements ([#3228](https://github.com/sveltejs/svelte/issues/3228)) +* Fix spread/`class:` combination ([#3242](https://github.com/sveltejs/svelte/pull/3242)) +* Never scope `:root` selector ([#3250](https://github.com/sveltejs/svelte/pull/3250)) +* Prevent trailing commas in function arguments ([#3255](https://github.com/sveltejs/svelte/pull/3260)) + ## 3.6.7 * Prevent corruption of outro callbacks with nested keyed each blocks ([#3209](https://github.com/sveltejs/svelte/pull/3209)) diff --git a/package.json b/package.json index 8241c5eb7d..3c00451be2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.6.7", + "version": "3.6.8", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From bbeafbafab0e10e4f88f898890d97f5e508f5609 Mon Sep 17 00:00:00 2001 From: Brian Takita Date: Thu, 11 Jul 2019 01:16:43 -0400 Subject: [PATCH 431/510] fixes https://github.com/sveltejs/svelte/issues/3191 Derived store reruns subscribers if it's value has not changed when synced. All invalidators of subscribers are run on a derived store when invalidated. See https://github.com/sveltejs/svelte/pull/2955 --- src/runtime/store/index.ts | 19 +++++++++++++------ test/js/samples/bind-open/expected.js | 2 +- test/store/index.ts | 24 ++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index c85163003f..c5bbb052cf 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -67,16 +67,15 @@ export function writable(value: T, start: StartStopNotifier = noop): Writa function set(new_value: T): void { if (safe_not_equal(value, new_value)) { value = new_value; - if (!stop) { - return; // not ready + if (stop) { // store is ready + subscribers.forEach((s) => s[1]()); + subscribers.forEach((s) => s[0](value)); } - subscribers.forEach((s) => s[1]()); - subscribers.forEach((s) => s[0](value)); } } function update(fn: Updater): void { - set(fn(value)); + return set(fn(value)); } function subscribe(run: Subscriber, invalidate: Invalidator = noop): Unsubscriber { @@ -129,7 +128,9 @@ export function derived( const auto = fn.length < 2; + const subscribers: Array> = []; const invalidators: Array> = []; + let value: T = initial_value; const store = readable(initial_value, (set) => { let inited = false; @@ -146,6 +147,11 @@ export function derived( const result = fn(single ? values[0] : values, set); if (auto) { set(result as T); + const dirty = safe_not_equal(value, result); + value = result as T; + if (!dirty) { + subscribers.forEach(s => s(value)); + } } else { cleanup = is_function(result) ? result as Unsubscriber : noop; } @@ -176,6 +182,7 @@ export function derived( return { subscribe(run: Subscriber, invalidate: Invalidator = noop): Unsubscriber { + subscribers.push(run); invalidators.push(invalidate); const unsubscribe = store.subscribe(run, invalidate); @@ -189,4 +196,4 @@ export function derived( }; } }; -} \ No newline at end of file +} diff --git a/test/js/samples/bind-open/expected.js b/test/js/samples/bind-open/expected.js index 7f739aec8b..7c73c8ddac 100644 --- a/test/js/samples/bind-open/expected.js +++ b/test/js/samples/bind-open/expected.js @@ -66,4 +66,4 @@ class Component extends SvelteComponent { } } -export default Component; \ No newline at end of file +export default Component; diff --git a/test/store/index.ts b/test/store/index.ts index 6f5ef6abdd..a39fab86e6 100644 --- a/test/store/index.ts +++ b/test/store/index.ts @@ -233,6 +233,30 @@ describe('store', () => { unsubscribe(); }); + it('derived dependency does not update and shared ancestor updates', () => { + const root = writable({ a: 0, b:0 }); + const values = []; + + const a = derived(root, $root => { + return 'a' + $root.a; + }); + + const b = derived([a, root], ([$a, $root]) => { + return 'b' + $root.b + $a; + }); + + const unsubscribe = b.subscribe(v => { + values.push(v); + }); + + assert.deepEqual(values, ['b0a0']); + + root.set({ a: 0, b: 1 }); + assert.deepEqual(values, ['b0a0', 'b1a0']); + + unsubscribe(); + }); + it('is updated with safe_not_equal logic', () => { const arr = [0]; From 46c9dbe4482ef189157cb59c0fe6dfe081812d96 Mon Sep 17 00:00:00 2001 From: Brian Takita Date: Thu, 11 Jul 2019 03:14:29 -0400 Subject: [PATCH 432/510] Breadth first calling of subscribers in store dependency tree. Optimize performance by using subscriber_queue. --- src/runtime/store/index.ts | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index c5bbb052cf..25c37945c6 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -44,6 +44,8 @@ export interface Writable extends Readable { /** Pair of subscriber and invalidator. */ type SubscribeInvalidateTuple = [Subscriber, Invalidator]; +const subscriber_queue = []; + /** * Creates a `Readable` store that allows reading by subscription. * @param value initial value @@ -69,7 +71,15 @@ export function writable(value: T, start: StartStopNotifier = noop): Writa value = new_value; if (stop) { // store is ready subscribers.forEach((s) => s[1]()); - subscribers.forEach((s) => s[0](value)); + const run_queue = !subscriber_queue.length; + subscribers.forEach(s => subscriber_queue.push(s, value)); + if (run_queue) { + let s; + while (s = subscriber_queue.shift()) { + const val = subscriber_queue.shift(); + s[0](val); + } + } } } } @@ -128,10 +138,6 @@ export function derived( const auto = fn.length < 2; - const subscribers: Array> = []; - const invalidators: Array> = []; - let value: T = initial_value; - const store = readable(initial_value, (set) => { let inited = false; const values: StoresValues = [] as StoresValues; @@ -147,11 +153,6 @@ export function derived( const result = fn(single ? values[0] : values, set); if (auto) { set(result as T); - const dirty = safe_not_equal(value, result); - value = result as T; - if (!dirty) { - subscribers.forEach(s => s(value)); - } } else { cleanup = is_function(result) ? result as Unsubscriber : noop; } @@ -166,7 +167,6 @@ export function derived( } }, () => { - run_all(invalidators); pending |= (1 << i); }), ); @@ -182,18 +182,7 @@ export function derived( return { subscribe(run: Subscriber, invalidate: Invalidator = noop): Unsubscriber { - subscribers.push(run); - invalidators.push(invalidate); - - const unsubscribe = store.subscribe(run, invalidate); - - return () => { - const index = invalidators.indexOf(invalidate); - if (index !== -1) { - invalidators.splice(index, 1); - } - unsubscribe(); - }; + return store.subscribe(run, invalidate); } }; } From 2b0a4e7237dc1e1317c00adeacbdf75ee3d259c3 Mon Sep 17 00:00:00 2001 From: Brian Takita Date: Thu, 11 Jul 2019 03:30:35 -0400 Subject: [PATCH 433/510] remove unnecessary return --- src/runtime/store/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index 25c37945c6..98761b847f 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -85,7 +85,7 @@ export function writable(value: T, start: StartStopNotifier = noop): Writa } function update(fn: Updater): void { - return set(fn(value)); + set(fn(value)); } function subscribe(run: Subscriber, invalidate: Invalidator = noop): Unsubscriber { From 419e40d3be1fceced7015ea59708015c8d70108d Mon Sep 17 00:00:00 2001 From: Brian Takita Date: Thu, 11 Jul 2019 03:42:54 -0400 Subject: [PATCH 434/510] Optimization: Single for loop instead of 2 forEach loops --- src/runtime/store/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index 98761b847f..7f94351437 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -70,9 +70,12 @@ export function writable(value: T, start: StartStopNotifier = noop): Writa if (safe_not_equal(value, new_value)) { value = new_value; if (stop) { // store is ready - subscribers.forEach((s) => s[1]()); const run_queue = !subscriber_queue.length; - subscribers.forEach(s => subscriber_queue.push(s, value)); + for (let i = 0; i < subscribers.length; i++) { + const s = subscribers[i]; + s[1](); + subscriber_queue.push(s, value); + } if (run_queue) { let s; while (s = subscriber_queue.shift()) { From 8851d79533cb68b4fd2c05f9d51140ec041b7f5e Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 24 Jul 2019 08:49:04 -0400 Subject: [PATCH 435/510] put second argument section back with its code sample --- site/content/docs/03-run-time.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 5d73bfdbcb..0c279874b9 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -231,8 +231,6 @@ Function that creates a store which has values that can be set from 'outside' co `update` is a method that takes one argument which is a callback. The callback takes the existing store value as its argument and returns the new value to be set to the store. -If a function is passed as the second argument to the `writable` function, it will be called when the number of subscribers goes from zero to one (but not from one to two, etc). That function will be passed a `set` function which changes the value of the store. It must return a `stop` function that is called when the subscriber count goes from one to zero. - ```js import { writable } from 'svelte/store'; @@ -249,6 +247,7 @@ count.update(n => n + 1); // logs '2' --- +If a function is passed as the second argument to the `writable` function, it will be called when the number of subscribers goes from zero to one (but not from one to two, etc). That function will be passed a `set` function which changes the value of the store. It must return a `stop` function that is called when the subscriber count goes from one to zero. ```js import { writable } from 'svelte/store'; From 695ace3665f1bc7655d40fe6cc02e56215b5a464 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 24 Jul 2019 08:50:15 -0400 Subject: [PATCH 436/510] Update 03-run-time.md --- site/content/docs/03-run-time.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 0c279874b9..6d5777aacd 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -247,7 +247,7 @@ count.update(n => n + 1); // logs '2' --- -If a function is passed as the second argument to the `writable` function, it will be called when the number of subscribers goes from zero to one (but not from one to two, etc). That function will be passed a `set` function which changes the value of the store. It must return a `stop` function that is called when the subscriber count goes from one to zero. +If a function is passed as the second argument, it will be called when the number of subscribers goes from zero to one (but not from one to two, etc). That function will be passed a `set` function which changes the value of the store. It must return a `stop` function that is called when the subscriber count goes from one to zero. ```js import { writable } from 'svelte/store'; From 729fc4e891160e1398874efb16baed4e66b70d6b Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Thu, 25 Jul 2019 20:37:50 -0400 Subject: [PATCH 437/510] link directly to event modifier tutorial --- .../tutorial/16-special-elements/03-svelte-window/text.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/site/content/tutorial/16-special-elements/03-svelte-window/text.md b/site/content/tutorial/16-special-elements/03-svelte-window/text.md index 9be7afd66f..b581b3ada4 100644 --- a/site/content/tutorial/16-special-elements/03-svelte-window/text.md +++ b/site/content/tutorial/16-special-elements/03-svelte-window/text.md @@ -9,8 +9,5 @@ On line 33, add the `keydown` listener: ```html ``` -Don't forget to add `preventDefault` modifier if you want to press any other key, e.g. after you have pressed `Tab` or `Ctrl + D`: -```html - -``` +> As with DOM elements, you can add [event modifiers](tutorial/event-modifiers) like `preventDefault`. From 95b2a72007c47b0225ec06decdc62296b80b131e Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 26 Jul 2019 08:38:35 -0400 Subject: [PATCH 438/510] return readable store directly form derived, avoid .shift() --- src/runtime/store/index.ts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index 7f94351437..6863730e4e 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -71,17 +71,16 @@ export function writable(value: T, start: StartStopNotifier = noop): Writa value = new_value; if (stop) { // store is ready const run_queue = !subscriber_queue.length; - for (let i = 0; i < subscribers.length; i++) { + for (let i = 0; i < subscribers.length; i += 1) { const s = subscribers[i]; s[1](); subscriber_queue.push(s, value); } if (run_queue) { - let s; - while (s = subscriber_queue.shift()) { - const val = subscriber_queue.shift(); - s[0](val); + for (let i = 0; i < subscriber_queue.length; i += 2) { + subscriber_queue[i][0](subscriber_queue[i + 1]); } + subscriber_queue.length = 0; } } } @@ -141,7 +140,7 @@ export function derived( const auto = fn.length < 2; - const store = readable(initial_value, (set) => { + return readable(initial_value, (set) => { let inited = false; const values: StoresValues = [] as StoresValues; @@ -182,10 +181,4 @@ export function derived( cleanup(); }; }); - - return { - subscribe(run: Subscriber, invalidate: Invalidator = noop): Unsubscriber { - return store.subscribe(run, invalidate); - } - }; } From 17beaa0a5dab49bca0af2daee1c570f061bde0b4 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 26 Jul 2019 09:11:20 -0400 Subject: [PATCH 439/510] -> v3.6.9 --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 969ea61c28..553e83c735 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## 3.6.9 + +* Always update derived stores with a derived input whose value does not change ([#3191](https://github.com/sveltejs/svelte/issues/3191)) + ## 3.6.8 * Preserve global keyframes that don't match local elements ([#3228](https://github.com/sveltejs/svelte/issues/3228)) diff --git a/package.json b/package.json index 3c00451be2..1f40d17821 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.6.8", + "version": "3.6.9", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From c6cd2d43bba3cea957010de0bbb2700cc44fcd1f Mon Sep 17 00:00:00 2001 From: Noah Kaufman Date: Fri, 26 Jul 2019 14:44:42 -0400 Subject: [PATCH 440/510] clicking on 'keyed each block' link did nothing before, now it takes you to the each blocks section like it's supposed to --- site/content/docs/02-template-syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index f8c79bca47..7ad57bbdb4 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -982,7 +982,7 @@ DOMRect { --- -An animation is triggered when the contents of a [keyed each block](docs#Each_blocks) are re-ordered. Animations do not run when an element is removed, only when the each block's data is reordered. Animate directives must be on an element that is an *immediate* child of a keyed each block. +An animation is triggered when the contents of a [keyed each block](docs#each) are re-ordered. Animations do not run when an element is removed, only when the each block's data is reordered. Animate directives must be on an element that is an *immediate* child of a keyed each block. Animations can be used with Svelte's [built-in animation functions](docs#svelte_animate) or [custom animation functions](docs#Custom_animation_functions). From efcd294731cf1f67d7acddc31116b87fc6faa4cb Mon Sep 17 00:00:00 2001 From: pngwn Date: Fri, 26 Jul 2019 20:22:24 +0100 Subject: [PATCH 441/510] Site: Document svelte/easing (#3292) --- site/content/docs/03-run-time.md | 18 +- .../examples/11-easing/00-easing/App.svelte | 106 ++++++++++ .../11-easing/00-easing/Controls.svelte | 186 ++++++++++++++++++ .../examples/11-easing/00-easing/Grid.svelte | 62 ++++++ .../examples/11-easing/00-easing/eases.js | 43 ++++ .../examples/11-easing/00-easing/meta.json | 3 + site/content/examples/11-easing/meta.json | 3 + .../{11-svg => 12-svg}/01-clock/App.svelte | 0 .../{11-svg => 12-svg}/01-clock/meta.json | 0 .../02-bar-chart/App.svelte | 0 .../{11-svg => 12-svg}/02-bar-chart/meta.json | 0 .../03-area-chart/App.svelte | 0 .../{11-svg => 12-svg}/03-area-chart/data.js | 0 .../03-area-chart/meta.json | 0 .../04-scatterplot/App.svelte | 0 .../04-scatterplot/Scatterplot.svelte | 0 .../{11-svg => 12-svg}/04-scatterplot/data.js | 0 .../04-scatterplot/meta.json | 0 .../05-svg-transitions/App.svelte | 0 .../05-svg-transitions/custom-transitions.js | 0 .../05-svg-transitions/meta.json | 0 .../05-svg-transitions/shape.js | 0 .../examples/{11-svg => 12-svg}/meta.json | 0 .../00-actions/App.svelte | 0 .../00-actions/meta.json | 0 .../00-actions/pannable.js | 0 .../App.svelte | 0 .../01-adding-parameters-to-actions/meta.json | 0 .../{12-actions => 13-actions}/meta.json | 0 .../00-classes/App.svelte | 0 .../00-classes/meta.json | 0 .../01-class-shorthand/App.svelte | 0 .../01-class-shorthand/meta.json | 0 .../{13-classes => 14-classes}/meta.json | 0 .../00-slots/App.svelte | 0 .../00-slots/Box.svelte | 0 .../00-slots/meta.json | 0 .../01-slot-fallbacks/App.svelte | 0 .../01-slot-fallbacks/Box.svelte | 0 .../01-slot-fallbacks/meta.json | 0 .../02-named-slots/App.svelte | 0 .../02-named-slots/ContactCard.svelte | 0 .../02-named-slots/meta.json | 0 .../03-slot-props/App.svelte | 0 .../03-slot-props/Hoverable.svelte | 0 .../03-slot-props/meta.json | 0 .../04-modal/App.svelte | 0 .../04-modal/Modal.svelte | 0 .../04-modal/meta.json | 0 .../meta.json | 0 .../00-context-api/App.svelte | 0 .../00-context-api/Map.svelte | 0 .../00-context-api/MapMarker.svelte | 0 .../00-context-api/mapbox.js | 0 .../00-context-api/meta.json | 0 .../{15-context => 16-context}/meta.json | 0 .../00-svelte-self/App.svelte | 0 .../00-svelte-self/File.svelte | 0 .../00-svelte-self/Folder.svelte | 0 .../00-svelte-self/meta.json | 0 .../01-svelte-component/App.svelte | 0 .../01-svelte-component/BlueThing.svelte | 0 .../01-svelte-component/GreenThing.svelte | 0 .../01-svelte-component/RedThing.svelte | 0 .../01-svelte-component/meta.json | 0 .../02-svelte-window/App.svelte | 0 .../02-svelte-window/meta.json | 0 .../03-svelte-window-bindings/App.svelte | 0 .../03-svelte-window-bindings/meta.json | 0 .../04-svelte-body/App.svelte | 0 .../04-svelte-body/meta.json | 0 .../05-svelte-head/App.svelte | 0 .../05-svelte-head/meta.json | 0 .../meta.json | 0 .../01-module-exports/App.svelte | 0 .../01-module-exports/AudioPlayer.svelte | 0 .../01-module-exports/meta.json | 0 .../meta.json | 0 .../00-debug/App.svelte | 0 .../00-debug/meta.json | 0 .../{18-debugging => 19-debugging}/meta.json | 0 .../01-7guis-counter/App.svelte | 0 .../01-7guis-counter/meta.json | 0 .../02-7guis-temperature/App.svelte | 0 .../02-7guis-temperature/meta.json | 0 .../03-7guis-flight-booker/App.svelte | 0 .../03-7guis-flight-booker/meta.json | 0 .../04-7guis-timer/App.svelte | 0 .../04-7guis-timer/meta.json | 0 .../05-7guis-crud/App.svelte | 0 .../05-7guis-crud/meta.json | 0 .../06-7guis-circles/App.svelte | 0 .../06-7guis-circles/meta.json | 0 .../examples/{19-7guis => 20-7guis}/meta.json | 0 .../01-hacker-news/App.svelte | 0 .../01-hacker-news/Comment.svelte | 0 .../01-hacker-news/Item.svelte | 0 .../01-hacker-news/List.svelte | 0 .../01-hacker-news/Summary.svelte | 0 .../01-hacker-news/meta.json | 0 .../02-immutable-data/App.svelte | 0 .../02-immutable-data/ImmutableTodo.svelte | 0 .../02-immutable-data/MutableTodo.svelte | 0 .../02-immutable-data/flash.js | 0 .../02-immutable-data/meta.json | 0 .../meta.json | 0 site/static/examples/thumbnails/easing.jpg | Bin 0 -> 4461 bytes 107 files changed, 420 insertions(+), 1 deletion(-) create mode 100644 site/content/examples/11-easing/00-easing/App.svelte create mode 100644 site/content/examples/11-easing/00-easing/Controls.svelte create mode 100644 site/content/examples/11-easing/00-easing/Grid.svelte create mode 100644 site/content/examples/11-easing/00-easing/eases.js create mode 100644 site/content/examples/11-easing/00-easing/meta.json create mode 100644 site/content/examples/11-easing/meta.json rename site/content/examples/{11-svg => 12-svg}/01-clock/App.svelte (100%) rename site/content/examples/{11-svg => 12-svg}/01-clock/meta.json (100%) rename site/content/examples/{11-svg => 12-svg}/02-bar-chart/App.svelte (100%) rename site/content/examples/{11-svg => 12-svg}/02-bar-chart/meta.json (100%) rename site/content/examples/{11-svg => 12-svg}/03-area-chart/App.svelte (100%) rename site/content/examples/{11-svg => 12-svg}/03-area-chart/data.js (100%) rename site/content/examples/{11-svg => 12-svg}/03-area-chart/meta.json (100%) rename site/content/examples/{11-svg => 12-svg}/04-scatterplot/App.svelte (100%) rename site/content/examples/{11-svg => 12-svg}/04-scatterplot/Scatterplot.svelte (100%) rename site/content/examples/{11-svg => 12-svg}/04-scatterplot/data.js (100%) rename site/content/examples/{11-svg => 12-svg}/04-scatterplot/meta.json (100%) rename site/content/examples/{11-svg => 12-svg}/05-svg-transitions/App.svelte (100%) rename site/content/examples/{11-svg => 12-svg}/05-svg-transitions/custom-transitions.js (100%) rename site/content/examples/{11-svg => 12-svg}/05-svg-transitions/meta.json (100%) rename site/content/examples/{11-svg => 12-svg}/05-svg-transitions/shape.js (100%) rename site/content/examples/{11-svg => 12-svg}/meta.json (100%) rename site/content/examples/{12-actions => 13-actions}/00-actions/App.svelte (100%) rename site/content/examples/{12-actions => 13-actions}/00-actions/meta.json (100%) rename site/content/examples/{12-actions => 13-actions}/00-actions/pannable.js (100%) rename site/content/examples/{12-actions => 13-actions}/01-adding-parameters-to-actions/App.svelte (100%) rename site/content/examples/{12-actions => 13-actions}/01-adding-parameters-to-actions/meta.json (100%) rename site/content/examples/{12-actions => 13-actions}/meta.json (100%) rename site/content/examples/{13-classes => 14-classes}/00-classes/App.svelte (100%) rename site/content/examples/{13-classes => 14-classes}/00-classes/meta.json (100%) rename site/content/examples/{13-classes => 14-classes}/01-class-shorthand/App.svelte (100%) rename site/content/examples/{13-classes => 14-classes}/01-class-shorthand/meta.json (100%) rename site/content/examples/{13-classes => 14-classes}/meta.json (100%) rename site/content/examples/{14-composition => 15-composition}/00-slots/App.svelte (100%) rename site/content/examples/{14-composition => 15-composition}/00-slots/Box.svelte (100%) rename site/content/examples/{14-composition => 15-composition}/00-slots/meta.json (100%) rename site/content/examples/{14-composition => 15-composition}/01-slot-fallbacks/App.svelte (100%) rename site/content/examples/{14-composition => 15-composition}/01-slot-fallbacks/Box.svelte (100%) rename site/content/examples/{14-composition => 15-composition}/01-slot-fallbacks/meta.json (100%) rename site/content/examples/{14-composition => 15-composition}/02-named-slots/App.svelte (100%) rename site/content/examples/{14-composition => 15-composition}/02-named-slots/ContactCard.svelte (100%) rename site/content/examples/{14-composition => 15-composition}/02-named-slots/meta.json (100%) rename site/content/examples/{14-composition => 15-composition}/03-slot-props/App.svelte (100%) rename site/content/examples/{14-composition => 15-composition}/03-slot-props/Hoverable.svelte (100%) rename site/content/examples/{14-composition => 15-composition}/03-slot-props/meta.json (100%) rename site/content/examples/{14-composition => 15-composition}/04-modal/App.svelte (100%) rename site/content/examples/{14-composition => 15-composition}/04-modal/Modal.svelte (100%) rename site/content/examples/{14-composition => 15-composition}/04-modal/meta.json (100%) rename site/content/examples/{14-composition => 15-composition}/meta.json (100%) rename site/content/examples/{15-context => 16-context}/00-context-api/App.svelte (100%) rename site/content/examples/{15-context => 16-context}/00-context-api/Map.svelte (100%) rename site/content/examples/{15-context => 16-context}/00-context-api/MapMarker.svelte (100%) rename site/content/examples/{15-context => 16-context}/00-context-api/mapbox.js (100%) rename site/content/examples/{15-context => 16-context}/00-context-api/meta.json (100%) rename site/content/examples/{15-context => 16-context}/meta.json (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/00-svelte-self/App.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/00-svelte-self/File.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/00-svelte-self/Folder.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/00-svelte-self/meta.json (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/01-svelte-component/App.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/01-svelte-component/BlueThing.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/01-svelte-component/GreenThing.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/01-svelte-component/RedThing.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/01-svelte-component/meta.json (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/02-svelte-window/App.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/02-svelte-window/meta.json (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/03-svelte-window-bindings/App.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/03-svelte-window-bindings/meta.json (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/04-svelte-body/App.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/04-svelte-body/meta.json (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/05-svelte-head/App.svelte (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/05-svelte-head/meta.json (100%) rename site/content/examples/{16-special-elements => 17-special-elements}/meta.json (100%) rename site/content/examples/{17-module-context => 18-module-context}/01-module-exports/App.svelte (100%) rename site/content/examples/{17-module-context => 18-module-context}/01-module-exports/AudioPlayer.svelte (100%) rename site/content/examples/{17-module-context => 18-module-context}/01-module-exports/meta.json (100%) rename site/content/examples/{17-module-context => 18-module-context}/meta.json (100%) rename site/content/examples/{18-debugging => 19-debugging}/00-debug/App.svelte (100%) rename site/content/examples/{18-debugging => 19-debugging}/00-debug/meta.json (100%) rename site/content/examples/{18-debugging => 19-debugging}/meta.json (100%) rename site/content/examples/{19-7guis => 20-7guis}/01-7guis-counter/App.svelte (100%) rename site/content/examples/{19-7guis => 20-7guis}/01-7guis-counter/meta.json (100%) rename site/content/examples/{19-7guis => 20-7guis}/02-7guis-temperature/App.svelte (100%) rename site/content/examples/{19-7guis => 20-7guis}/02-7guis-temperature/meta.json (100%) rename site/content/examples/{19-7guis => 20-7guis}/03-7guis-flight-booker/App.svelte (100%) rename site/content/examples/{19-7guis => 20-7guis}/03-7guis-flight-booker/meta.json (100%) rename site/content/examples/{19-7guis => 20-7guis}/04-7guis-timer/App.svelte (100%) rename site/content/examples/{19-7guis => 20-7guis}/04-7guis-timer/meta.json (100%) rename site/content/examples/{19-7guis => 20-7guis}/05-7guis-crud/App.svelte (100%) rename site/content/examples/{19-7guis => 20-7guis}/05-7guis-crud/meta.json (100%) rename site/content/examples/{19-7guis => 20-7guis}/06-7guis-circles/App.svelte (100%) rename site/content/examples/{19-7guis => 20-7guis}/06-7guis-circles/meta.json (100%) rename site/content/examples/{19-7guis => 20-7guis}/meta.json (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/01-hacker-news/App.svelte (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/01-hacker-news/Comment.svelte (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/01-hacker-news/Item.svelte (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/01-hacker-news/List.svelte (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/01-hacker-news/Summary.svelte (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/01-hacker-news/meta.json (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/02-immutable-data/App.svelte (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/02-immutable-data/ImmutableTodo.svelte (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/02-immutable-data/MutableTodo.svelte (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/02-immutable-data/flash.js (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/02-immutable-data/meta.json (100%) rename site/content/examples/{20-miscellaneous => 21-miscellaneous}/meta.json (100%) create mode 100644 site/static/examples/thumbnails/easing.jpg diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 6d5777aacd..dfd734b3c9 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -740,7 +740,23 @@ You can see a full example on the [animations tutorial](tutorial/animate) ### `svelte/easing` -* TODO could have nice little interactive widgets showing the different functions, maybe +Easing functions specificy the rate of change over time and are useful when working with Svelte's built-in transitions and animations as well as the tweened and spring utilities. `svelte/easing` contains 31 named exports, a `linear` ease and 3 variants of 10 different easing functions: `in`, `out` and `inOut`. + +You can explore the various eases using the [ease visualiser](examples#easing) in the [examples section](examples). + + +| ease | in | out | inOut | +| --- | --- | --- | --- | +| **back** | `backIn` | `backOut` | `backInOut` | +| **bounce** | `bounceIn` | `bounceOut` | `bounceInOut` | +| **circ** | `circIn` | `circOut` | `circInOut` | +| **cubic** | `cubicIn` | `cubicOut` | `cubicInOut` | +| **elastic** | `elasticIn` | `elasticOut` | `elasticInOut` | +| **expo** | `expoIn` | `expoOut` | `expoInOut` | +| **quad** | `quadIn` | `quadOut` | `quadInOut` | +| **quart** | `quartIn` | `quartOut` | `quartInOut` | +| **quint** | `quintIn` | `quintOut` | `quintInOut` | +| **sine** | `sineIn` | `sineOut` | `sineInOut` | ### `svelte/register` diff --git a/site/content/examples/11-easing/00-easing/App.svelte b/site/content/examples/11-easing/00-easing/App.svelte new file mode 100644 index 0000000000..c33e73518e --- /dev/null +++ b/site/content/examples/11-easing/00-easing/App.svelte @@ -0,0 +1,106 @@ + + + + +
    + + + + + + + + + + + + + + +
    \ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/Controls.svelte b/site/content/examples/11-easing/00-easing/Controls.svelte new file mode 100644 index 0000000000..66a297323f --- /dev/null +++ b/site/content/examples/11-easing/00-easing/Controls.svelte @@ -0,0 +1,186 @@ + + + + +
    +
    +

    Ease

    + {#if mobile} + + {:else} +
      + {#each [...eases] as [name]} +
    • current_ease = name} + > + {name} +
    • + {/each} +
    + {/if} +

    Type

    + {#if mobile } + + {:else} +
      + {#each types as [name, type]} +
    • current_type = type} + > + {name} +
    • + {/each} +
    + {/if} +
    +

    + Duration +

    +
    + + + + + + +
    +
    \ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/Grid.svelte b/site/content/examples/11-easing/00-easing/Grid.svelte new file mode 100644 index 0000000000..e704f46cf7 --- /dev/null +++ b/site/content/examples/11-easing/00-easing/Grid.svelte @@ -0,0 +1,62 @@ + + + + + + + + +{#each { length: 8 } as _, i} + {#if i < 6} + + {/if} + +{/each} + + + + \ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/eases.js b/site/content/examples/11-easing/00-easing/eases.js new file mode 100644 index 0000000000..a24246005a --- /dev/null +++ b/site/content/examples/11-easing/00-easing/eases.js @@ -0,0 +1,43 @@ +import * as eases from 'svelte/easing'; + +const processed_eases = {}; + +for (const ease in eases) { + if (ease === "linear") { + processed_eases.linear = eases.linear; + } else { + const name = ease.replace(/In$|InOut$|Out$/, ''); + const type = ease.match(/In$|InOut$|Out$/)[0]; + + if (!(name in processed_eases)) processed_eases[name] = {}; + processed_eases[name][type] = {}; + processed_eases[name][type].fn = eases[ease]; + + let shape = 'M0 1000'; + for (let i = 1; i <= 1000; i++) { + shape = `${shape} L${(i / 1000) * 1000} ${1000 - eases[ease](i / 1000) * 1000} `; + processed_eases[name][type].shape = shape; + } + } +} + +const sorted_eases = new Map([ + ['sine', processed_eases.sine], + ['quad', processed_eases.quad], + ['cubic', processed_eases.cubic], + ['quart', processed_eases.quart], + ['quint', processed_eases.quint], + ['expo', processed_eases.expo], + ['circ', processed_eases.circ], + ['back', processed_eases.back], + ['elastic', processed_eases.elastic], + ['bounce', processed_eases.bounce], +]); + +export const types = [ + ['Ease In', 'In'], + ['Ease Out', 'Out'], + ['Ease In Out', 'InOut'] +]; + +export { sorted_eases as eases }; \ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/meta.json b/site/content/examples/11-easing/00-easing/meta.json new file mode 100644 index 0000000000..59ad604b26 --- /dev/null +++ b/site/content/examples/11-easing/00-easing/meta.json @@ -0,0 +1,3 @@ +{ + "title": "Ease Visualiser" +} \ No newline at end of file diff --git a/site/content/examples/11-easing/meta.json b/site/content/examples/11-easing/meta.json new file mode 100644 index 0000000000..78341a522d --- /dev/null +++ b/site/content/examples/11-easing/meta.json @@ -0,0 +1,3 @@ +{ + "title": "Easing" +} \ No newline at end of file diff --git a/site/content/examples/11-svg/01-clock/App.svelte b/site/content/examples/12-svg/01-clock/App.svelte similarity index 100% rename from site/content/examples/11-svg/01-clock/App.svelte rename to site/content/examples/12-svg/01-clock/App.svelte diff --git a/site/content/examples/11-svg/01-clock/meta.json b/site/content/examples/12-svg/01-clock/meta.json similarity index 100% rename from site/content/examples/11-svg/01-clock/meta.json rename to site/content/examples/12-svg/01-clock/meta.json diff --git a/site/content/examples/11-svg/02-bar-chart/App.svelte b/site/content/examples/12-svg/02-bar-chart/App.svelte similarity index 100% rename from site/content/examples/11-svg/02-bar-chart/App.svelte rename to site/content/examples/12-svg/02-bar-chart/App.svelte diff --git a/site/content/examples/11-svg/02-bar-chart/meta.json b/site/content/examples/12-svg/02-bar-chart/meta.json similarity index 100% rename from site/content/examples/11-svg/02-bar-chart/meta.json rename to site/content/examples/12-svg/02-bar-chart/meta.json diff --git a/site/content/examples/11-svg/03-area-chart/App.svelte b/site/content/examples/12-svg/03-area-chart/App.svelte similarity index 100% rename from site/content/examples/11-svg/03-area-chart/App.svelte rename to site/content/examples/12-svg/03-area-chart/App.svelte diff --git a/site/content/examples/11-svg/03-area-chart/data.js b/site/content/examples/12-svg/03-area-chart/data.js similarity index 100% rename from site/content/examples/11-svg/03-area-chart/data.js rename to site/content/examples/12-svg/03-area-chart/data.js diff --git a/site/content/examples/11-svg/03-area-chart/meta.json b/site/content/examples/12-svg/03-area-chart/meta.json similarity index 100% rename from site/content/examples/11-svg/03-area-chart/meta.json rename to site/content/examples/12-svg/03-area-chart/meta.json diff --git a/site/content/examples/11-svg/04-scatterplot/App.svelte b/site/content/examples/12-svg/04-scatterplot/App.svelte similarity index 100% rename from site/content/examples/11-svg/04-scatterplot/App.svelte rename to site/content/examples/12-svg/04-scatterplot/App.svelte diff --git a/site/content/examples/11-svg/04-scatterplot/Scatterplot.svelte b/site/content/examples/12-svg/04-scatterplot/Scatterplot.svelte similarity index 100% rename from site/content/examples/11-svg/04-scatterplot/Scatterplot.svelte rename to site/content/examples/12-svg/04-scatterplot/Scatterplot.svelte diff --git a/site/content/examples/11-svg/04-scatterplot/data.js b/site/content/examples/12-svg/04-scatterplot/data.js similarity index 100% rename from site/content/examples/11-svg/04-scatterplot/data.js rename to site/content/examples/12-svg/04-scatterplot/data.js diff --git a/site/content/examples/11-svg/04-scatterplot/meta.json b/site/content/examples/12-svg/04-scatterplot/meta.json similarity index 100% rename from site/content/examples/11-svg/04-scatterplot/meta.json rename to site/content/examples/12-svg/04-scatterplot/meta.json diff --git a/site/content/examples/11-svg/05-svg-transitions/App.svelte b/site/content/examples/12-svg/05-svg-transitions/App.svelte similarity index 100% rename from site/content/examples/11-svg/05-svg-transitions/App.svelte rename to site/content/examples/12-svg/05-svg-transitions/App.svelte diff --git a/site/content/examples/11-svg/05-svg-transitions/custom-transitions.js b/site/content/examples/12-svg/05-svg-transitions/custom-transitions.js similarity index 100% rename from site/content/examples/11-svg/05-svg-transitions/custom-transitions.js rename to site/content/examples/12-svg/05-svg-transitions/custom-transitions.js diff --git a/site/content/examples/11-svg/05-svg-transitions/meta.json b/site/content/examples/12-svg/05-svg-transitions/meta.json similarity index 100% rename from site/content/examples/11-svg/05-svg-transitions/meta.json rename to site/content/examples/12-svg/05-svg-transitions/meta.json diff --git a/site/content/examples/11-svg/05-svg-transitions/shape.js b/site/content/examples/12-svg/05-svg-transitions/shape.js similarity index 100% rename from site/content/examples/11-svg/05-svg-transitions/shape.js rename to site/content/examples/12-svg/05-svg-transitions/shape.js diff --git a/site/content/examples/11-svg/meta.json b/site/content/examples/12-svg/meta.json similarity index 100% rename from site/content/examples/11-svg/meta.json rename to site/content/examples/12-svg/meta.json diff --git a/site/content/examples/12-actions/00-actions/App.svelte b/site/content/examples/13-actions/00-actions/App.svelte similarity index 100% rename from site/content/examples/12-actions/00-actions/App.svelte rename to site/content/examples/13-actions/00-actions/App.svelte diff --git a/site/content/examples/12-actions/00-actions/meta.json b/site/content/examples/13-actions/00-actions/meta.json similarity index 100% rename from site/content/examples/12-actions/00-actions/meta.json rename to site/content/examples/13-actions/00-actions/meta.json diff --git a/site/content/examples/12-actions/00-actions/pannable.js b/site/content/examples/13-actions/00-actions/pannable.js similarity index 100% rename from site/content/examples/12-actions/00-actions/pannable.js rename to site/content/examples/13-actions/00-actions/pannable.js diff --git a/site/content/examples/12-actions/01-adding-parameters-to-actions/App.svelte b/site/content/examples/13-actions/01-adding-parameters-to-actions/App.svelte similarity index 100% rename from site/content/examples/12-actions/01-adding-parameters-to-actions/App.svelte rename to site/content/examples/13-actions/01-adding-parameters-to-actions/App.svelte diff --git a/site/content/examples/12-actions/01-adding-parameters-to-actions/meta.json b/site/content/examples/13-actions/01-adding-parameters-to-actions/meta.json similarity index 100% rename from site/content/examples/12-actions/01-adding-parameters-to-actions/meta.json rename to site/content/examples/13-actions/01-adding-parameters-to-actions/meta.json diff --git a/site/content/examples/12-actions/meta.json b/site/content/examples/13-actions/meta.json similarity index 100% rename from site/content/examples/12-actions/meta.json rename to site/content/examples/13-actions/meta.json diff --git a/site/content/examples/13-classes/00-classes/App.svelte b/site/content/examples/14-classes/00-classes/App.svelte similarity index 100% rename from site/content/examples/13-classes/00-classes/App.svelte rename to site/content/examples/14-classes/00-classes/App.svelte diff --git a/site/content/examples/13-classes/00-classes/meta.json b/site/content/examples/14-classes/00-classes/meta.json similarity index 100% rename from site/content/examples/13-classes/00-classes/meta.json rename to site/content/examples/14-classes/00-classes/meta.json diff --git a/site/content/examples/13-classes/01-class-shorthand/App.svelte b/site/content/examples/14-classes/01-class-shorthand/App.svelte similarity index 100% rename from site/content/examples/13-classes/01-class-shorthand/App.svelte rename to site/content/examples/14-classes/01-class-shorthand/App.svelte diff --git a/site/content/examples/13-classes/01-class-shorthand/meta.json b/site/content/examples/14-classes/01-class-shorthand/meta.json similarity index 100% rename from site/content/examples/13-classes/01-class-shorthand/meta.json rename to site/content/examples/14-classes/01-class-shorthand/meta.json diff --git a/site/content/examples/13-classes/meta.json b/site/content/examples/14-classes/meta.json similarity index 100% rename from site/content/examples/13-classes/meta.json rename to site/content/examples/14-classes/meta.json diff --git a/site/content/examples/14-composition/00-slots/App.svelte b/site/content/examples/15-composition/00-slots/App.svelte similarity index 100% rename from site/content/examples/14-composition/00-slots/App.svelte rename to site/content/examples/15-composition/00-slots/App.svelte diff --git a/site/content/examples/14-composition/00-slots/Box.svelte b/site/content/examples/15-composition/00-slots/Box.svelte similarity index 100% rename from site/content/examples/14-composition/00-slots/Box.svelte rename to site/content/examples/15-composition/00-slots/Box.svelte diff --git a/site/content/examples/14-composition/00-slots/meta.json b/site/content/examples/15-composition/00-slots/meta.json similarity index 100% rename from site/content/examples/14-composition/00-slots/meta.json rename to site/content/examples/15-composition/00-slots/meta.json diff --git a/site/content/examples/14-composition/01-slot-fallbacks/App.svelte b/site/content/examples/15-composition/01-slot-fallbacks/App.svelte similarity index 100% rename from site/content/examples/14-composition/01-slot-fallbacks/App.svelte rename to site/content/examples/15-composition/01-slot-fallbacks/App.svelte diff --git a/site/content/examples/14-composition/01-slot-fallbacks/Box.svelte b/site/content/examples/15-composition/01-slot-fallbacks/Box.svelte similarity index 100% rename from site/content/examples/14-composition/01-slot-fallbacks/Box.svelte rename to site/content/examples/15-composition/01-slot-fallbacks/Box.svelte diff --git a/site/content/examples/14-composition/01-slot-fallbacks/meta.json b/site/content/examples/15-composition/01-slot-fallbacks/meta.json similarity index 100% rename from site/content/examples/14-composition/01-slot-fallbacks/meta.json rename to site/content/examples/15-composition/01-slot-fallbacks/meta.json diff --git a/site/content/examples/14-composition/02-named-slots/App.svelte b/site/content/examples/15-composition/02-named-slots/App.svelte similarity index 100% rename from site/content/examples/14-composition/02-named-slots/App.svelte rename to site/content/examples/15-composition/02-named-slots/App.svelte diff --git a/site/content/examples/14-composition/02-named-slots/ContactCard.svelte b/site/content/examples/15-composition/02-named-slots/ContactCard.svelte similarity index 100% rename from site/content/examples/14-composition/02-named-slots/ContactCard.svelte rename to site/content/examples/15-composition/02-named-slots/ContactCard.svelte diff --git a/site/content/examples/14-composition/02-named-slots/meta.json b/site/content/examples/15-composition/02-named-slots/meta.json similarity index 100% rename from site/content/examples/14-composition/02-named-slots/meta.json rename to site/content/examples/15-composition/02-named-slots/meta.json diff --git a/site/content/examples/14-composition/03-slot-props/App.svelte b/site/content/examples/15-composition/03-slot-props/App.svelte similarity index 100% rename from site/content/examples/14-composition/03-slot-props/App.svelte rename to site/content/examples/15-composition/03-slot-props/App.svelte diff --git a/site/content/examples/14-composition/03-slot-props/Hoverable.svelte b/site/content/examples/15-composition/03-slot-props/Hoverable.svelte similarity index 100% rename from site/content/examples/14-composition/03-slot-props/Hoverable.svelte rename to site/content/examples/15-composition/03-slot-props/Hoverable.svelte diff --git a/site/content/examples/14-composition/03-slot-props/meta.json b/site/content/examples/15-composition/03-slot-props/meta.json similarity index 100% rename from site/content/examples/14-composition/03-slot-props/meta.json rename to site/content/examples/15-composition/03-slot-props/meta.json diff --git a/site/content/examples/14-composition/04-modal/App.svelte b/site/content/examples/15-composition/04-modal/App.svelte similarity index 100% rename from site/content/examples/14-composition/04-modal/App.svelte rename to site/content/examples/15-composition/04-modal/App.svelte diff --git a/site/content/examples/14-composition/04-modal/Modal.svelte b/site/content/examples/15-composition/04-modal/Modal.svelte similarity index 100% rename from site/content/examples/14-composition/04-modal/Modal.svelte rename to site/content/examples/15-composition/04-modal/Modal.svelte diff --git a/site/content/examples/14-composition/04-modal/meta.json b/site/content/examples/15-composition/04-modal/meta.json similarity index 100% rename from site/content/examples/14-composition/04-modal/meta.json rename to site/content/examples/15-composition/04-modal/meta.json diff --git a/site/content/examples/14-composition/meta.json b/site/content/examples/15-composition/meta.json similarity index 100% rename from site/content/examples/14-composition/meta.json rename to site/content/examples/15-composition/meta.json diff --git a/site/content/examples/15-context/00-context-api/App.svelte b/site/content/examples/16-context/00-context-api/App.svelte similarity index 100% rename from site/content/examples/15-context/00-context-api/App.svelte rename to site/content/examples/16-context/00-context-api/App.svelte diff --git a/site/content/examples/15-context/00-context-api/Map.svelte b/site/content/examples/16-context/00-context-api/Map.svelte similarity index 100% rename from site/content/examples/15-context/00-context-api/Map.svelte rename to site/content/examples/16-context/00-context-api/Map.svelte diff --git a/site/content/examples/15-context/00-context-api/MapMarker.svelte b/site/content/examples/16-context/00-context-api/MapMarker.svelte similarity index 100% rename from site/content/examples/15-context/00-context-api/MapMarker.svelte rename to site/content/examples/16-context/00-context-api/MapMarker.svelte diff --git a/site/content/examples/15-context/00-context-api/mapbox.js b/site/content/examples/16-context/00-context-api/mapbox.js similarity index 100% rename from site/content/examples/15-context/00-context-api/mapbox.js rename to site/content/examples/16-context/00-context-api/mapbox.js diff --git a/site/content/examples/15-context/00-context-api/meta.json b/site/content/examples/16-context/00-context-api/meta.json similarity index 100% rename from site/content/examples/15-context/00-context-api/meta.json rename to site/content/examples/16-context/00-context-api/meta.json diff --git a/site/content/examples/15-context/meta.json b/site/content/examples/16-context/meta.json similarity index 100% rename from site/content/examples/15-context/meta.json rename to site/content/examples/16-context/meta.json diff --git a/site/content/examples/16-special-elements/00-svelte-self/App.svelte b/site/content/examples/17-special-elements/00-svelte-self/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/00-svelte-self/App.svelte rename to site/content/examples/17-special-elements/00-svelte-self/App.svelte diff --git a/site/content/examples/16-special-elements/00-svelte-self/File.svelte b/site/content/examples/17-special-elements/00-svelte-self/File.svelte similarity index 100% rename from site/content/examples/16-special-elements/00-svelte-self/File.svelte rename to site/content/examples/17-special-elements/00-svelte-self/File.svelte diff --git a/site/content/examples/16-special-elements/00-svelte-self/Folder.svelte b/site/content/examples/17-special-elements/00-svelte-self/Folder.svelte similarity index 100% rename from site/content/examples/16-special-elements/00-svelte-self/Folder.svelte rename to site/content/examples/17-special-elements/00-svelte-self/Folder.svelte diff --git a/site/content/examples/16-special-elements/00-svelte-self/meta.json b/site/content/examples/17-special-elements/00-svelte-self/meta.json similarity index 100% rename from site/content/examples/16-special-elements/00-svelte-self/meta.json rename to site/content/examples/17-special-elements/00-svelte-self/meta.json diff --git a/site/content/examples/16-special-elements/01-svelte-component/App.svelte b/site/content/examples/17-special-elements/01-svelte-component/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/01-svelte-component/App.svelte rename to site/content/examples/17-special-elements/01-svelte-component/App.svelte diff --git a/site/content/examples/16-special-elements/01-svelte-component/BlueThing.svelte b/site/content/examples/17-special-elements/01-svelte-component/BlueThing.svelte similarity index 100% rename from site/content/examples/16-special-elements/01-svelte-component/BlueThing.svelte rename to site/content/examples/17-special-elements/01-svelte-component/BlueThing.svelte diff --git a/site/content/examples/16-special-elements/01-svelte-component/GreenThing.svelte b/site/content/examples/17-special-elements/01-svelte-component/GreenThing.svelte similarity index 100% rename from site/content/examples/16-special-elements/01-svelte-component/GreenThing.svelte rename to site/content/examples/17-special-elements/01-svelte-component/GreenThing.svelte diff --git a/site/content/examples/16-special-elements/01-svelte-component/RedThing.svelte b/site/content/examples/17-special-elements/01-svelte-component/RedThing.svelte similarity index 100% rename from site/content/examples/16-special-elements/01-svelte-component/RedThing.svelte rename to site/content/examples/17-special-elements/01-svelte-component/RedThing.svelte diff --git a/site/content/examples/16-special-elements/01-svelte-component/meta.json b/site/content/examples/17-special-elements/01-svelte-component/meta.json similarity index 100% rename from site/content/examples/16-special-elements/01-svelte-component/meta.json rename to site/content/examples/17-special-elements/01-svelte-component/meta.json diff --git a/site/content/examples/16-special-elements/02-svelte-window/App.svelte b/site/content/examples/17-special-elements/02-svelte-window/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/02-svelte-window/App.svelte rename to site/content/examples/17-special-elements/02-svelte-window/App.svelte diff --git a/site/content/examples/16-special-elements/02-svelte-window/meta.json b/site/content/examples/17-special-elements/02-svelte-window/meta.json similarity index 100% rename from site/content/examples/16-special-elements/02-svelte-window/meta.json rename to site/content/examples/17-special-elements/02-svelte-window/meta.json diff --git a/site/content/examples/16-special-elements/03-svelte-window-bindings/App.svelte b/site/content/examples/17-special-elements/03-svelte-window-bindings/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/03-svelte-window-bindings/App.svelte rename to site/content/examples/17-special-elements/03-svelte-window-bindings/App.svelte diff --git a/site/content/examples/16-special-elements/03-svelte-window-bindings/meta.json b/site/content/examples/17-special-elements/03-svelte-window-bindings/meta.json similarity index 100% rename from site/content/examples/16-special-elements/03-svelte-window-bindings/meta.json rename to site/content/examples/17-special-elements/03-svelte-window-bindings/meta.json diff --git a/site/content/examples/16-special-elements/04-svelte-body/App.svelte b/site/content/examples/17-special-elements/04-svelte-body/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/04-svelte-body/App.svelte rename to site/content/examples/17-special-elements/04-svelte-body/App.svelte diff --git a/site/content/examples/16-special-elements/04-svelte-body/meta.json b/site/content/examples/17-special-elements/04-svelte-body/meta.json similarity index 100% rename from site/content/examples/16-special-elements/04-svelte-body/meta.json rename to site/content/examples/17-special-elements/04-svelte-body/meta.json diff --git a/site/content/examples/16-special-elements/05-svelte-head/App.svelte b/site/content/examples/17-special-elements/05-svelte-head/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/05-svelte-head/App.svelte rename to site/content/examples/17-special-elements/05-svelte-head/App.svelte diff --git a/site/content/examples/16-special-elements/05-svelte-head/meta.json b/site/content/examples/17-special-elements/05-svelte-head/meta.json similarity index 100% rename from site/content/examples/16-special-elements/05-svelte-head/meta.json rename to site/content/examples/17-special-elements/05-svelte-head/meta.json diff --git a/site/content/examples/16-special-elements/meta.json b/site/content/examples/17-special-elements/meta.json similarity index 100% rename from site/content/examples/16-special-elements/meta.json rename to site/content/examples/17-special-elements/meta.json diff --git a/site/content/examples/17-module-context/01-module-exports/App.svelte b/site/content/examples/18-module-context/01-module-exports/App.svelte similarity index 100% rename from site/content/examples/17-module-context/01-module-exports/App.svelte rename to site/content/examples/18-module-context/01-module-exports/App.svelte diff --git a/site/content/examples/17-module-context/01-module-exports/AudioPlayer.svelte b/site/content/examples/18-module-context/01-module-exports/AudioPlayer.svelte similarity index 100% rename from site/content/examples/17-module-context/01-module-exports/AudioPlayer.svelte rename to site/content/examples/18-module-context/01-module-exports/AudioPlayer.svelte diff --git a/site/content/examples/17-module-context/01-module-exports/meta.json b/site/content/examples/18-module-context/01-module-exports/meta.json similarity index 100% rename from site/content/examples/17-module-context/01-module-exports/meta.json rename to site/content/examples/18-module-context/01-module-exports/meta.json diff --git a/site/content/examples/17-module-context/meta.json b/site/content/examples/18-module-context/meta.json similarity index 100% rename from site/content/examples/17-module-context/meta.json rename to site/content/examples/18-module-context/meta.json diff --git a/site/content/examples/18-debugging/00-debug/App.svelte b/site/content/examples/19-debugging/00-debug/App.svelte similarity index 100% rename from site/content/examples/18-debugging/00-debug/App.svelte rename to site/content/examples/19-debugging/00-debug/App.svelte diff --git a/site/content/examples/18-debugging/00-debug/meta.json b/site/content/examples/19-debugging/00-debug/meta.json similarity index 100% rename from site/content/examples/18-debugging/00-debug/meta.json rename to site/content/examples/19-debugging/00-debug/meta.json diff --git a/site/content/examples/18-debugging/meta.json b/site/content/examples/19-debugging/meta.json similarity index 100% rename from site/content/examples/18-debugging/meta.json rename to site/content/examples/19-debugging/meta.json diff --git a/site/content/examples/19-7guis/01-7guis-counter/App.svelte b/site/content/examples/20-7guis/01-7guis-counter/App.svelte similarity index 100% rename from site/content/examples/19-7guis/01-7guis-counter/App.svelte rename to site/content/examples/20-7guis/01-7guis-counter/App.svelte diff --git a/site/content/examples/19-7guis/01-7guis-counter/meta.json b/site/content/examples/20-7guis/01-7guis-counter/meta.json similarity index 100% rename from site/content/examples/19-7guis/01-7guis-counter/meta.json rename to site/content/examples/20-7guis/01-7guis-counter/meta.json diff --git a/site/content/examples/19-7guis/02-7guis-temperature/App.svelte b/site/content/examples/20-7guis/02-7guis-temperature/App.svelte similarity index 100% rename from site/content/examples/19-7guis/02-7guis-temperature/App.svelte rename to site/content/examples/20-7guis/02-7guis-temperature/App.svelte diff --git a/site/content/examples/19-7guis/02-7guis-temperature/meta.json b/site/content/examples/20-7guis/02-7guis-temperature/meta.json similarity index 100% rename from site/content/examples/19-7guis/02-7guis-temperature/meta.json rename to site/content/examples/20-7guis/02-7guis-temperature/meta.json diff --git a/site/content/examples/19-7guis/03-7guis-flight-booker/App.svelte b/site/content/examples/20-7guis/03-7guis-flight-booker/App.svelte similarity index 100% rename from site/content/examples/19-7guis/03-7guis-flight-booker/App.svelte rename to site/content/examples/20-7guis/03-7guis-flight-booker/App.svelte diff --git a/site/content/examples/19-7guis/03-7guis-flight-booker/meta.json b/site/content/examples/20-7guis/03-7guis-flight-booker/meta.json similarity index 100% rename from site/content/examples/19-7guis/03-7guis-flight-booker/meta.json rename to site/content/examples/20-7guis/03-7guis-flight-booker/meta.json diff --git a/site/content/examples/19-7guis/04-7guis-timer/App.svelte b/site/content/examples/20-7guis/04-7guis-timer/App.svelte similarity index 100% rename from site/content/examples/19-7guis/04-7guis-timer/App.svelte rename to site/content/examples/20-7guis/04-7guis-timer/App.svelte diff --git a/site/content/examples/19-7guis/04-7guis-timer/meta.json b/site/content/examples/20-7guis/04-7guis-timer/meta.json similarity index 100% rename from site/content/examples/19-7guis/04-7guis-timer/meta.json rename to site/content/examples/20-7guis/04-7guis-timer/meta.json diff --git a/site/content/examples/19-7guis/05-7guis-crud/App.svelte b/site/content/examples/20-7guis/05-7guis-crud/App.svelte similarity index 100% rename from site/content/examples/19-7guis/05-7guis-crud/App.svelte rename to site/content/examples/20-7guis/05-7guis-crud/App.svelte diff --git a/site/content/examples/19-7guis/05-7guis-crud/meta.json b/site/content/examples/20-7guis/05-7guis-crud/meta.json similarity index 100% rename from site/content/examples/19-7guis/05-7guis-crud/meta.json rename to site/content/examples/20-7guis/05-7guis-crud/meta.json diff --git a/site/content/examples/19-7guis/06-7guis-circles/App.svelte b/site/content/examples/20-7guis/06-7guis-circles/App.svelte similarity index 100% rename from site/content/examples/19-7guis/06-7guis-circles/App.svelte rename to site/content/examples/20-7guis/06-7guis-circles/App.svelte diff --git a/site/content/examples/19-7guis/06-7guis-circles/meta.json b/site/content/examples/20-7guis/06-7guis-circles/meta.json similarity index 100% rename from site/content/examples/19-7guis/06-7guis-circles/meta.json rename to site/content/examples/20-7guis/06-7guis-circles/meta.json diff --git a/site/content/examples/19-7guis/meta.json b/site/content/examples/20-7guis/meta.json similarity index 100% rename from site/content/examples/19-7guis/meta.json rename to site/content/examples/20-7guis/meta.json diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/App.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/App.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/App.svelte rename to site/content/examples/21-miscellaneous/01-hacker-news/App.svelte diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/Comment.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/Comment.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/Comment.svelte rename to site/content/examples/21-miscellaneous/01-hacker-news/Comment.svelte diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/Item.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/Item.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/Item.svelte rename to site/content/examples/21-miscellaneous/01-hacker-news/Item.svelte diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/List.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/List.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/List.svelte rename to site/content/examples/21-miscellaneous/01-hacker-news/List.svelte diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/Summary.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/Summary.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/Summary.svelte rename to site/content/examples/21-miscellaneous/01-hacker-news/Summary.svelte diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/meta.json b/site/content/examples/21-miscellaneous/01-hacker-news/meta.json similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/meta.json rename to site/content/examples/21-miscellaneous/01-hacker-news/meta.json diff --git a/site/content/examples/20-miscellaneous/02-immutable-data/App.svelte b/site/content/examples/21-miscellaneous/02-immutable-data/App.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/02-immutable-data/App.svelte rename to site/content/examples/21-miscellaneous/02-immutable-data/App.svelte diff --git a/site/content/examples/20-miscellaneous/02-immutable-data/ImmutableTodo.svelte b/site/content/examples/21-miscellaneous/02-immutable-data/ImmutableTodo.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/02-immutable-data/ImmutableTodo.svelte rename to site/content/examples/21-miscellaneous/02-immutable-data/ImmutableTodo.svelte diff --git a/site/content/examples/20-miscellaneous/02-immutable-data/MutableTodo.svelte b/site/content/examples/21-miscellaneous/02-immutable-data/MutableTodo.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/02-immutable-data/MutableTodo.svelte rename to site/content/examples/21-miscellaneous/02-immutable-data/MutableTodo.svelte diff --git a/site/content/examples/20-miscellaneous/02-immutable-data/flash.js b/site/content/examples/21-miscellaneous/02-immutable-data/flash.js similarity index 100% rename from site/content/examples/20-miscellaneous/02-immutable-data/flash.js rename to site/content/examples/21-miscellaneous/02-immutable-data/flash.js diff --git a/site/content/examples/20-miscellaneous/02-immutable-data/meta.json b/site/content/examples/21-miscellaneous/02-immutable-data/meta.json similarity index 100% rename from site/content/examples/20-miscellaneous/02-immutable-data/meta.json rename to site/content/examples/21-miscellaneous/02-immutable-data/meta.json diff --git a/site/content/examples/20-miscellaneous/meta.json b/site/content/examples/21-miscellaneous/meta.json similarity index 100% rename from site/content/examples/20-miscellaneous/meta.json rename to site/content/examples/21-miscellaneous/meta.json diff --git a/site/static/examples/thumbnails/easing.jpg b/site/static/examples/thumbnails/easing.jpg new file mode 100644 index 0000000000000000000000000000000000000000..11c4871c2a9a9788bad3707654a255711f7f5fbb GIT binary patch literal 4461 zcmb7H2|SeR_kU+G3}VJCvS%(bvW{#m7>1B##**bCSrV19wJDTJ426bFwv3|9WXoDe zrYuE5q_Rw8D=k_i%l{qees2AK-TV7LGoSZ)&hnh+d(NEq%ySld7Y6~9mAR!k0D%Ai z1pEMt&j3>Z4ukQ&a2T8q4(CG%@*}{p0x2jUD7pfL5?vuGg2t@GqQ%6;L_~4YIB^LH zDJdxwRz^-nQf{TBlqAmx1kT5Y;6n)W^9xI&MbVP~@3Ghbpap9}S3#IW^CVt`mXM_!ZCQ7b0g$rK zN5k=eW;=K&7$1d6Fg8tga!&8PK&}yLqBeQ9z<>I-QOLN#v33!k(|PHtur|4b@I4mu z1r-M)d7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t_2PK>C5=Olo6|^_qM=kk znUJ2W172@_6f)P7m|Y1>Qbx5>;Mtw%=*JgzEU~lzGs%GJjJ@3nuk4|wCILzoicsJM zZT-82M!U#p3fKA^seHKdoIG{phS-y;MDc+A+ zY7Obhv?-4|s%IrCf-O7M&yBouh#TRoe$gh0>*JHU)=_v1nQC&yq@W!y+jzTJHMzPr zZEP|*b3E}$@ztw^YseuAjuGefbcwT7Hnvtw2=#~@9c^$hG)LtWxzG)lc{tgTXP@{c zgk$)CVqW zxc_WiP;}?%se!1^LOnm5Fy|@#rR~p>E6Dv$$Bwh4uhAbmPvdhKn?ADps}JHQ~S71C>W|Gg&Trs!fUXn11XZS9t z(3Z%TsmjfBj(Mx!+b863tVmHfkPP`*g}380Pi4C1&6zh!$Hdpk?2r%5eey4hJ(lw0 zBZtG=vp3buuZ*lf>G^rQH#r0EH|$N1gxA*g!Xuj>O_GJOM9NTA|JwpM(H8q>SEOG4 e;|1dCIjB+Tdx4cHhVuiGzlF_n)G%uC>Hh%(f6O5O literal 0 HcmV?d00001 From e82d5d44c163ec24bb1f555be8196704de29a588 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 26 Jul 2019 15:45:23 -0400 Subject: [PATCH 442/510] site: deploy with --platform managed --- site/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/Makefile b/site/Makefile index c8d8b236a6..4c432dc6c9 100644 --- a/site/Makefile +++ b/site/Makefile @@ -19,4 +19,4 @@ docker: deploy: sapper docker @echo "\n~> deploying $(SERVICE) to Cloud Run servers" - @gcloud beta run deploy $(SERVICE) --allow-unauthenticated --region us-central1 --image $(IMAGE) --memory=512Mi + @gcloud beta run deploy $(SERVICE) --allow-unauthenticated --platform managed --region us-central1 --image $(IMAGE) --memory=512Mi From b33d600d4eef17b83bdf77cb51ee0309502cdfd8 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 26 Jul 2019 18:34:19 -0400 Subject: [PATCH 443/510] reuse unchanged spread levels - fixes #3289 --- .../wrappers/InlineComponent/index.ts | 4 ++-- .../samples/spread-reuse-levels/Nested.svelte | 21 +++++++++++++++++++ .../samples/spread-reuse-levels/_config.js | 20 ++++++++++++++++++ .../samples/spread-reuse-levels/main.svelte | 8 +++++++ 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 test/runtime/samples/spread-reuse-levels/Nested.svelte create mode 100644 test/runtime/samples/spread-reuse-levels/_config.js create mode 100644 test/runtime/samples/spread-reuse-levels/main.svelte diff --git a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts index c85f47cd54..c63879c06f 100644 --- a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts @@ -185,7 +185,7 @@ export default class InlineComponentWrapper extends Wrapper { add_to_set(all_dependencies, attr.dependencies); }); - this.node.attributes.forEach(attr => { + this.node.attributes.forEach((attr, i) => { const { name, dependencies } = attr; const condition = dependencies.size > 0 && (dependencies.size !== all_dependencies.size) @@ -201,7 +201,7 @@ export default class InlineComponentWrapper extends Wrapper { const obj = `{ ${quote_name_if_necessary(name)}: ${attr.get_value(block)} }`; initial_props.push(obj); - changes.push(condition ? `${condition} && ${obj}` : obj); + changes.push(condition ? `${condition} && ${obj}` : `${levels}[${i}]`); } }); diff --git a/test/runtime/samples/spread-reuse-levels/Nested.svelte b/test/runtime/samples/spread-reuse-levels/Nested.svelte new file mode 100644 index 0000000000..800d6cd602 --- /dev/null +++ b/test/runtime/samples/spread-reuse-levels/Nested.svelte @@ -0,0 +1,21 @@ + + +
    {JSON.stringify({ a, b, c })}
    +
    {JSON.stringify(changed)}
    \ No newline at end of file diff --git a/test/runtime/samples/spread-reuse-levels/_config.js b/test/runtime/samples/spread-reuse-levels/_config.js new file mode 100644 index 0000000000..5acd36bdf8 --- /dev/null +++ b/test/runtime/samples/spread-reuse-levels/_config.js @@ -0,0 +1,20 @@ +export default { + html: ` +
    {"a":1,"b":[1],"c":42}
    +
    {"a":false,"b":false,"c":false}
    + `, + + ssrHtml: ` +
    {"a":1,"b":[1],"c":42}
    +
    {}
    + `, + + test({ assert, component, target }) { + component.a = 2; + + assert.htmlEqual(target.innerHTML, ` +
    {"a":2,"b":[1],"c":42}
    +
    {"a":true,"b":false,"c":false}
    + `); + } +}; diff --git a/test/runtime/samples/spread-reuse-levels/main.svelte b/test/runtime/samples/spread-reuse-levels/main.svelte new file mode 100644 index 0000000000..a22ecfc1bb --- /dev/null +++ b/test/runtime/samples/spread-reuse-levels/main.svelte @@ -0,0 +1,8 @@ + + + \ No newline at end of file From b3ef4e64beb7de62eeb16fb40281c50a0aa21dea Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 26 Jul 2019 18:49:12 -0400 Subject: [PATCH 444/510] always update reactive declarations with $$props - fixes #3286 --- src/compiler/compile/render_dom/index.ts | 10 ++----- .../samples/props-reactive-b/_config.js | 30 +++++++++++++++++++ .../samples/props-reactive-b/main.svelte | 8 +++++ 3 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 test/runtime/samples/props-reactive-b/_config.js create mode 100644 test/runtime/samples/props-reactive-b/main.svelte diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts index 9fdaa0cbaa..c6eb1f1bb8 100644 --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -359,15 +359,11 @@ export default function dom( component.reactive_declarations .forEach(d => { - let uses_props; + const dependencies = Array.from(d.dependencies); + const uses_props = !!dependencies.find(n => n === '$$props'); - const condition = Array.from(d.dependencies) + const condition = !uses_props && dependencies .filter(n => { - if (n === '$$props') { - uses_props = true; - return false; - } - const variable = component.var_lookup.get(n); return variable && (variable.writable || variable.mutated); }) diff --git a/test/runtime/samples/props-reactive-b/_config.js b/test/runtime/samples/props-reactive-b/_config.js new file mode 100644 index 0000000000..43eaee23aa --- /dev/null +++ b/test/runtime/samples/props-reactive-b/_config.js @@ -0,0 +1,30 @@ +export default { + props: { + a: 1, + b: 2 + }, + + html: ` +

    a: 1

    +

    b: 2

    +

    c: 3

    + `, + + async test({ assert, component, target }) { + await component.$set({ a: 4 }); + + assert.htmlEqual(target.innerHTML, ` +

    a: 4

    +

    b: 2

    +

    c: 6

    + `); + + await component.$set({ b: 5 }); + + assert.htmlEqual(target.innerHTML, ` +

    a: 4

    +

    b: 5

    +

    c: 9

    + `); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/props-reactive-b/main.svelte b/test/runtime/samples/props-reactive-b/main.svelte new file mode 100644 index 0000000000..45d6fc0cad --- /dev/null +++ b/test/runtime/samples/props-reactive-b/main.svelte @@ -0,0 +1,8 @@ + + +

    a: {a}

    +

    b: {$$props.b}

    +

    c: {c}

    \ No newline at end of file From fcfad5ae6bc0d715ac2e5938351bc792442fc238 Mon Sep 17 00:00:00 2001 From: pngwn Date: Sat, 27 Jul 2019 02:01:46 +0100 Subject: [PATCH 445/510] Document that context is not reactive. (#3296) --- site/content/docs/03-run-time.md | 2 ++ site/content/tutorial/15-context/01-context-api/text.md | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index dfd734b3c9..b5bd966625 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -156,6 +156,8 @@ Like lifecycle functions, this must be called during component initialisation. ``` +> Context is not inherently reactive. If you need reactive values in context then you can pass a store into context, which *will* be reactive. + #### `getContext` ```js diff --git a/site/content/tutorial/15-context/01-context-api/text.md b/site/content/tutorial/15-context/01-context-api/text.md index 3d095dd679..ef146772c5 100644 --- a/site/content/tutorial/15-context/01-context-api/text.md +++ b/site/content/tutorial/15-context/01-context-api/text.md @@ -44,4 +44,6 @@ In `mapbox.js` you'll see this line: const key = {}; ``` -We can use anything as a key — we could do `setContext('mapbox', ...)` for example. The downside of using a string is that different component libraries might accidentally use the same one; using an object literal means the keys are guaranteed not to conflict in any circumstance, even when you have multiple different contexts operating across many component layers. \ No newline at end of file +We can use anything as a key — we could do `setContext('mapbox', ...)` for example. The downside of using a string is that different component libraries might accidentally use the same one; using an object literal means the keys are guaranteed not to conflict in any circumstance, even when you have multiple different contexts operating across many component layers. + +> Remember that context is not inherently reactive. If you need context values to be reactive then you can pass a store into context, which *will* be reactive. From f65ce85748ffb85f034f1dd001f953979e97faa0 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 27 Jul 2019 06:50:23 -0400 Subject: [PATCH 446/510] site: fix animate directive section heading --- site/content/docs/02-template-syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 7ad57bbdb4..3d396f2f24 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -947,7 +947,7 @@ Unlike with `transition:`, transitions applied with `in:` and `out:` are not bid -#### animate: +#### animate:*fn* ```sv animate:name From 2328d5e6e8f8f1863a0573636b6ce328279235f1 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 28 Jul 2019 13:13:21 -0400 Subject: [PATCH 447/510] use `change` event for `bind:files` (#3226) --- src/compiler/compile/render_dom/wrappers/Element/index.ts | 4 ++-- test/js/samples/input-files/expected.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/Element/index.ts b/src/compiler/compile/render_dom/wrappers/Element/index.ts index 9d3f60ac7e..7c0fd62892 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/index.ts @@ -26,7 +26,7 @@ const events = [ event_names: ['input'], filter: (node: Element, _name: string) => node.name === 'textarea' || - node.name === 'input' && !/radio|checkbox|range/.test(node.get_static_attribute_value('type') as string) + node.name === 'input' && !/radio|checkbox|range|file/.test(node.get_static_attribute_value('type') as string) }, { event_names: ['input'], @@ -38,7 +38,7 @@ const events = [ event_names: ['change'], filter: (node: Element, _name: string) => node.name === 'select' || - node.name === 'input' && /radio|checkbox/.test(node.get_static_attribute_value('type') as string) + node.name === 'input' && /radio|checkbox|file/.test(node.get_static_attribute_value('type') as string) }, { event_names: ['change', 'input'], diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js index ed11518df2..d4442d57ee 100644 --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -19,7 +19,7 @@ function create_fragment(ctx) { input = element("input"); attr(input, "type", "file"); input.multiple = true; - dispose = listen(input, "input", ctx.input_input_handler); + dispose = listen(input, "change", ctx.input_change_handler); }, m(target, anchor) { @@ -43,7 +43,7 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { files } = $$props; - function input_input_handler() { + function input_change_handler() { files = this.files; $$invalidate('files', files); } @@ -52,7 +52,7 @@ function instance($$self, $$props, $$invalidate) { if ('files' in $$props) $$invalidate('files', files = $$props.files); }; - return { files, input_input_handler }; + return { files, input_change_handler }; } class Component extends SvelteComponent { From b99ee7d5d177f4fb42b5821d63993248833ee48a Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 28 Jul 2019 22:59:24 -0400 Subject: [PATCH 448/510] site: remove unused files --- site/static/curl.js | 22 -------- site/static/repl-runner.js | 105 ------------------------------------- 2 files changed, 127 deletions(-) delete mode 100644 site/static/curl.js delete mode 100644 site/static/repl-runner.js diff --git a/site/static/curl.js b/site/static/curl.js deleted file mode 100644 index b0ddc51a71..0000000000 --- a/site/static/curl.js +++ /dev/null @@ -1,22 +0,0 @@ -/* version: 0.8.13 */ -(function(){/* - MIT License (c) copyright 2010-2013 B Cavalier & J Hann */ - (function(m){function U(){}function u(a,b){return 0==aa.call(a).indexOf("[object "+b)}function I(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function V(a,b){var d,c,e,f;d=1;c=a;"."==c.charAt(0)&&(e=!0,c=c.replace(ba,function(a,b,c,e){c&&d++;return e||""}));if(e){e=b.split("/");f=e.length-d;if(0>f)return a;e.splice(f,d);return e.concat(c||[]).join("/")}return c}function J(a){var b=a.indexOf("!");return{h:a.substr(b+1),f:0<=b&&a.substr(0,b)}}function P(){}function v(a,b){P.prototype= - a||Q;var d=new P;P.prototype=Q;for(var c in b)d[c]=b[c];return d}function K(){function a(a,b,d){c.push([a,b,d])}function b(a,b){for(var d,e=0;d=c[e++];)(d=d[a])&&d(b)}var d,c,e;d=this;c=[];e=function(d,g){a=d?function(a){a&&a(g)}:function(a,b){b&&b(g)};e=U;b(d?0:1,g);b=U;c=k};this.then=function(b,c,e){a(b,c,e);return d};this.resolve=function(a){d.va=a;e(!0,a)};this.reject=function(a){d.ua=a;e(!1,a)};this.D=function(a){b(2,a)}}function L(a){return a instanceof K||a instanceof B}function w(a,b,d,c){L(a)? - a.then(b,d,c):b(a)}function C(a,b,d){var c;return function(){0<=--a&&b&&(c=b.apply(k,arguments));0==a&&d&&d(c);return c}}function A(){var a,b;D="";a=[].slice.call(arguments);u(a[0],"Object")&&(b=a.shift(),b=M(b));return new B(a[0],a[1],a[2],b)}function M(a,b,d){var c;D="";if(a&&(h.V(a),x=h.a(a),"preloads"in a&&(c=new B(a.preloads,k,d,E,!0),h.m(function(){E=c})),a=a.main))return new B(a,b,d)}function B(a,b,d,c,e){var f;f=h.j(x,k,[].concat(a),e);this.then=this.then=a=function(a,b){w(f,function(b){a&& - a.apply(k,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(a,b,c){return new B(a,b,c,f)};this.config=M;(b||d)&&a(b,d);h.m(function(){w(e||E,function(){w(c,function(){h.w(f)},d)})})}function W(a){var b,d;b=a.id;b==k&&(F!==k?F={L:"Multiple anonymous defines encountered"}:(b=h.ha())||(F=a));if(b!=k){d=l[b];b in l||(d=h.i(b,x),d=h.I(d.a,b),l[b]=d);if(!L(d))throw Error("duplicate define: "+b);d.ja=!1;h.J(d,a)}}function R(){var a=h.ea(arguments);W(a)}var D,x,y,G,z=m.document,S= - z&&(z.head||z.getElementsByTagName("head")[0]),ca=S&&S.getElementsByTagName("base")[0]||null,X={},Y={},N={},da="addEventListener"in m?{}:{loaded:1,complete:1},Q={},aa=Q.toString,k,l={},O={},E=!1,F,Z=/^\/|^[^:]+:\/\/|^[A-Za-z]:[\\/]/,ba=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,ea=/\/\*[\s\S]*?\*\/|\/\/.*?[\n\r]/g,fa=/require\s*\(\s*(["'])(.*?[^\\])\1\s*\)|[^\\]?(["'])/g,ga=/\s*,\s*/,T,h;h={o:function(a,b,d){var c;a=V(a,b);if("."==a.charAt(0))return a;c=J(a);a=(b=c.f)||c.h;a in d.c&&(a=d.c[a].R||a);b&&(0> - b.indexOf("/")&&!(b in d.c)&&(a=I(d.T)+"/"+b),a=a+"!"+c.h);return a},j:function(a,b,d,c){function e(b,c){var d,f;d=h.o(b,g.id,a);if(!c)return d;f=J(d);if(!f.f)return d;d=l[f.f];f.h="normalize"in d?d.normalize(f.h,e,g.a)||"":e(f.h);return f.f+"!"+f.h}function f(b,d,f){var p;p=d&&function(a){d.apply(k,a)};if(u(b,"String")){if(p)throw Error("require(id, callback) not allowed");f=e(b,!0);b=l[f];if(!(f in l))throw Error("Module not resolved: "+f);return(f=L(b)&&b.b)||b}w(h.w(h.j(a,g.id,b,c)),p,f)}var g; - g=new K;g.id=b||"";g.ia=c;g.K=d;g.a=a;g.F=f;f.toUrl=function(b){return h.i(e(b,!0),a).url};g.o=e;return g},I:function(a,b,d){var c,e,f;c=h.j(a,b,k,d);e=c.resolve;f=C(1,function(a){c.v=a;try{return h.Z(c)}catch(b){c.reject(b)}});c.resolve=function(a){w(d||E,function(){e(l[c.id]=O[c.url]=f(a))})};c.M=function(a){w(d||E,function(){c.b&&(f(a),c.D(Y))})};return c},Y:function(a,b,d,c){return h.j(a,d,k,c)},ga:function(a){return a.F},N:function(a){return a.b||(a.b={})},fa:function(a){var b=a.A;b||(b=a.A= - {id:a.id,uri:h.O(a),exports:h.N(a),config:function(){return a.a}},b.b=b.exports);return b},O:function(a){return a.url||(a.url=h.H(a.F.toUrl(a.id),a.a))},V:function(a){var b,d,c,e,f;b="curl";d="define";c=e=m;if(a&&(f=a.overwriteApi||a.sa,b=a.apiName||a.la||b,c=a.apiContext||a.ka||c,d=a.defineName||a.na||d,e=a.defineContext||a.ma||e,y&&u(y,"Function")&&(m.curl=y),y=null,G&&u(G,"Function")&&(m.define=G),G=null,!f)){if(c[b]&&c[b]!=A)throw Error(b+" already exists");if(e[d]&&e[d]!=R)throw Error(d+" already exists"); - }c[b]=A;e[d]=R},a:function(a){function b(a,b){var d,c,g,n,q;for(q in a){g=a[q];u(g,"String")&&(g={path:a[q]});g.name=g.name||q;n=e;c=J(I(g.name));d=c.h;if(c=c.f)n=f[c],n||(n=f[c]=v(e),n.c=v(e.c),n.g=[]),delete a[q];c=g;var l=b,H=void 0;c.path=I(c.path||c.location||"");l&&(H=c.main||"./main","."==H.charAt(0)||(H="./"+H),c.R=V(H,c.name+"/"));c.a=c.config;c.a&&(c.a=v(e,c.a));c.W=d.split("/").length;d?(n.c[d]=c,n.g.push(d)):n.s=h.U(g.path,e)}}function d(a){var b=a.c;a.S=new RegExp("^("+a.g.sort(function(a, - c){return b[c].W-b[a].W}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.g}var c,e,f,g;"baseUrl"in a&&(a.s=a.baseUrl);"main"in a&&(a.R=a.main);"preloads"in a&&(a.ta=a.preloads);"pluginPath"in a&&(a.T=a.pluginPath);if("dontAddFileExt"in a||a.l)a.l=new RegExp(a.dontAddFileExt||a.l);c=x;e=v(c,a);e.c=v(c.c);f=a.plugins||{};e.plugins=v(c.plugins);e.C=v(c.C,a.C);e.B=v(c.B,a.B);e.g=[];b(a.packages,!0);b(a.paths,!1);for(g in f)a=h.o(g+"!","",e),e.plugins[a.substr(0,a.length-1)]=f[g];f=e.plugins; - for(g in f)if(f[g]=v(e,f[g]),a=f[g].g)f[g].g=a.concat(e.g),d(f[g]);for(g in c.c)e.c.hasOwnProperty(g)||e.g.push(g);d(e);return e},i:function(a,b){var d,c,e,f;d=b.c;e=Z.test(a)?a:a.replace(b.S,function(a){c=d[a]||{};f=c.a;return c.path||""});return{a:f||x,url:h.U(e,b)}},U:function(a,b){var d=b.s;return d&&!Z.test(a)?I(d)+"/"+a:a},H:function(a,b){return a+((b||x).l.test(a)?"":".js")},P:function(a,b,d){var c=z.createElement("script");c.onload=c.onreadystatechange=function(d){d=d||m.event;if("load"== - d.type||da[c.readyState])delete N[a.id],c.onload=c.onreadystatechange=c.onerror="",b()};c.onerror=function(){d(Error("Syntax or http error: "+a.url))};c.type=a.pa||"text/javascript";c.charset="utf-8";c.async=!a.ra;c.src=a.url;N[a.id]=c;S.insertBefore(c,ca);return c},$:function(a){var b=[],d;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(ea,"").replace(fa,function(a,e,f,g){g?d=d==g?k:d:d||b.push(f);return""});return b},ea:function(a){var b,d,c,e,f,g;f=a.length;c=a[f-1];e=u(c,"Function")? - c.length:-1;2==f?u(a[0],"Array")?d=a[0]:b=a[0]:3==f&&(b=a[0],d=a[1]);!d&&0 { - curl([`https://bundle.run/${id}`]).then(module => { - import_cache[id] = module; - fulfil(module); - }, err => { - console.error(err.stack); - reject(new Error(`Error loading ${id} from bundle.run`)); - }); - }); - } - - function fetch_imports(imports, progress_func) { - const missing_imports = imports.filter(x => !import_cache[x]); - let pending_imports = missing_imports.length; - - if (missing_imports.length) { - const promise = Promise.all( - missing_imports.map(id => fetch_import(id).then(() => { - pending_imports -= 1; - if (progress_func) progress_func(pending_imports); - })) - ); - - return promise; - } else { - return Promise.resolve(); - } - } - - function handle_message(ev) { - const { action, cmd_id } = ev.data; - const send_message = (payload) => parent.postMessage( { ...payload }, ev.origin); - const send_reply = (payload) => send_message({ ...payload, cmd_id }); - const send_ok = () => send_reply({ action: 'cmd_ok' }); - const send_error = (message, stack) => send_reply({ action: 'cmd_error', message, stack }); - - if (action === 'eval') { - try { - const { script } = ev.data.args; - eval(script); - send_ok(); - } catch (e) { - send_error(e.message, e.stack); - } - } - - if (action === 'catch_clicks') { - try { - const top_origin = ev.origin; - document.body.addEventListener('click', event => { - if (event.which !== 1) return; - if (event.metaKey || event.ctrlKey || event.shiftKey) return; - if (event.defaultPrevented) return; - - // ensure target is a link - let el = event.target; - while (el && el.nodeName !== 'A') el = el.parentNode; - if (!el || el.nodeName !== 'A') return; - - if (el.hasAttribute('download') || el.getAttribute('rel') === 'external' || el.target) return; - - event.preventDefault(); - - if (el.href.startsWith(top_origin)) { - const url = new URL(el.href); - if (url.hash[0] === '#') { - window.location.hash = url.hash; - return; - } - } - - window.open(el.href, '_blank'); - }); - send_ok(); - } catch (e) { - send_error(e.message, e.stack); - } - } - - if (action === 'fetch_imports') { - const { imports, import_map } = ev.data.args; - fetch_imports(imports, (remaining) => { - send_message({action: 'fetch_progress', args: { remaining }}); - }) - .then(() => { - imports.forEach(x => { - const module = import_cache[x]; - const name = import_map.get(x); - window[name] = module; - }); - send_ok(); - }) - .catch(e => { - send_error(e.message, e.stack); - }); - } - } - - window.addEventListener('message', handle_message, false); -})(); From ea7f61542be8565296df3f07a66f6d5c37d8314f Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 30 Jul 2019 04:52:49 -0400 Subject: [PATCH 449/510] site: update deps --- site/package-lock.json | 1851 +++++++--------------------------------- site/package.json | 25 +- 2 files changed, 330 insertions(+), 1546 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 42a737dbe0..373c0505cb 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -14,38 +14,73 @@ } }, "@babel/core": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.4.tgz", - "integrity": "sha512-+DaeBEpYq6b2+ZmHx3tHspC+ZRflrvLqwfv8E3hNr5LVQoyBnL8RPKSBCg+rK2W2My9PWlujBiqd0ZPsR9Q6zQ==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.5.tgz", + "integrity": "sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.5.0", - "@babel/helpers": "^7.5.4", - "@babel/parser": "^7.5.0", + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.5.5", + "@babel/helpers": "^7.5.5", + "@babel/parser": "^7.5.5", "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.0", - "@babel/types": "^7.5.0", + "@babel/traverse": "^7.5.5", + "@babel/types": "^7.5.5", "convert-source-map": "^1.1.0", "debug": "^4.1.0", "json5": "^2.1.0", - "lodash": "^4.17.11", + "lodash": "^4.17.13", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/types": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/generator": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.0.tgz", - "integrity": "sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", + "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", "dev": true, "requires": { - "@babel/types": "^7.5.0", + "@babel/types": "^7.5.5", "jsesc": "^2.5.1", - "lodash": "^4.17.11", + "lodash": "^4.17.13", "source-map": "^0.5.0", "trim-right": "^1.0.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-annotate-as-pure": { @@ -79,14 +114,27 @@ } }, "@babel/helper-define-map": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz", - "integrity": "sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz", + "integrity": "sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg==", "dev": true, "requires": { "@babel/helper-function-name": "^7.1.0", - "@babel/types": "^7.4.4", - "lodash": "^4.17.11" + "@babel/types": "^7.5.5", + "lodash": "^4.17.13" + }, + "dependencies": { + "@babel/types": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-explode-assignable-expression": { @@ -129,12 +177,25 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz", - "integrity": "sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz", + "integrity": "sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.5.5" + }, + "dependencies": { + "@babel/types": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-module-imports": { @@ -147,17 +208,30 @@ } }, "@babel/helper-module-transforms": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz", - "integrity": "sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz", + "integrity": "sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/helper-simple-access": "^7.1.0", "@babel/helper-split-export-declaration": "^7.4.4", "@babel/template": "^7.4.4", - "@babel/types": "^7.4.4", - "lodash": "^4.17.11" + "@babel/types": "^7.5.5", + "lodash": "^4.17.13" + }, + "dependencies": { + "@babel/types": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-optimise-call-expression": { @@ -176,12 +250,12 @@ "dev": true }, "@babel/helper-regex": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz", - "integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz", + "integrity": "sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw==", "dev": true, "requires": { - "lodash": "^4.17.11" + "lodash": "^4.17.13" } }, "@babel/helper-remap-async-to-generator": { @@ -198,15 +272,28 @@ } }, "@babel/helper-replace-supers": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz", - "integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz", + "integrity": "sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.0.0", + "@babel/helper-member-expression-to-functions": "^7.5.5", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.4.4", - "@babel/types": "^7.4.4" + "@babel/traverse": "^7.5.5", + "@babel/types": "^7.5.5" + }, + "dependencies": { + "@babel/types": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-simple-access": { @@ -241,14 +328,27 @@ } }, "@babel/helpers": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.4.tgz", - "integrity": "sha512-6LJ6xwUEJP51w0sIgKyfvFMJvIb9mWAfohJp0+m6eHJigkFdcH8duZ1sfhn0ltJRzwUIT/yqqhdSfRpCpL7oow==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.5.tgz", + "integrity": "sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g==", "dev": true, "requires": { "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.0", - "@babel/types": "^7.5.0" + "@babel/traverse": "^7.5.5", + "@babel/types": "^7.5.5" + }, + "dependencies": { + "@babel/types": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/highlight": { @@ -263,9 +363,9 @@ } }, "@babel/parser": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.0.tgz", - "integrity": "sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz", + "integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -300,9 +400,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.4.tgz", - "integrity": "sha512-KCx0z3y7y8ipZUMAEEJOyNi11lMb/FOPUjjB113tfowgw0c16EGYos7worCKBcUAh2oG+OBnoUhsnTSoLpV9uA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz", + "integrity": "sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -405,27 +505,27 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz", - "integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.5.5.tgz", + "integrity": "sha512-82A3CLRRdYubkG85lKwhZB0WZoHxLGsJdux/cOVaJCJpvYFl1LVzAIFyRsa7CvXqW8rBM4Zf3Bfn8PHt5DP0Sg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "lodash": "^4.17.11" + "lodash": "^4.17.13" } }, "@babel/plugin-transform-classes": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz", - "integrity": "sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz", + "integrity": "sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-define-map": "^7.4.4", + "@babel/helper-define-map": "^7.5.5", "@babel/helper-function-name": "^7.1.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.4.4", + "@babel/helper-replace-supers": "^7.5.5", "@babel/helper-split-export-declaration": "^7.4.4", "globals": "^11.1.0" } @@ -578,13 +678,13 @@ } }, "@babel/plugin-transform-object-super": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz", - "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz", + "integrity": "sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0" + "@babel/helper-replace-supers": "^7.5.5" } }, "@babel/plugin-transform-parameters": { @@ -626,9 +726,9 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.5.0.tgz", - "integrity": "sha512-LmPIZOAgTLl+86gR9KjLXex6P/lRz1fWEjTz6V6QZMmKie51ja3tvzdwORqhHc4RWR8TcZ5pClpRWs0mlaA2ng==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.5.5.tgz", + "integrity": "sha512-6Xmeidsun5rkwnGfMOp6/z9nSzWpHFNVr2Jx7kwoq4mVatQfQx5S56drBgEHF+XQbKOdIaOiMIINvp/kAwMN+w==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -703,20 +803,12 @@ "requires": { "core-js": "^2.6.5", "regenerator-runtime": "^0.13.2" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@babel/preset-env": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.5.4.tgz", - "integrity": "sha512-hFnFnouyRNiH1rL8YkX1ANCNAUVC8Djwdqfev8i1415tnAG+7hlA5zhZ0Q/3Q5gkop4HioIPbCEWAalqcbxRoQ==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.5.5.tgz", + "integrity": "sha512-GMZQka/+INwsMz1A5UEql8tG015h5j/qjptpKY2gJ7giy8ohzU710YciJB5rcKsWGWHiW3RUnHib0E5/m3Tp3A==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -724,7 +816,7 @@ "@babel/plugin-proposal-async-generator-functions": "^7.2.0", "@babel/plugin-proposal-dynamic-import": "^7.5.0", "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.5.4", + "@babel/plugin-proposal-object-rest-spread": "^7.5.5", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", "@babel/plugin-syntax-async-generators": "^7.2.0", @@ -735,8 +827,8 @@ "@babel/plugin-transform-arrow-functions": "^7.2.0", "@babel/plugin-transform-async-to-generator": "^7.5.0", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.4.4", - "@babel/plugin-transform-classes": "^7.4.4", + "@babel/plugin-transform-block-scoping": "^7.5.5", + "@babel/plugin-transform-classes": "^7.5.5", "@babel/plugin-transform-computed-properties": "^7.2.0", "@babel/plugin-transform-destructuring": "^7.5.0", "@babel/plugin-transform-dotall-regex": "^7.4.4", @@ -752,7 +844,7 @@ "@babel/plugin-transform-modules-umd": "^7.2.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.5", "@babel/plugin-transform-new-target": "^7.4.4", - "@babel/plugin-transform-object-super": "^7.2.0", + "@babel/plugin-transform-object-super": "^7.5.5", "@babel/plugin-transform-parameters": "^7.4.4", "@babel/plugin-transform-property-literals": "^7.2.0", "@babel/plugin-transform-regenerator": "^7.4.5", @@ -763,18 +855,31 @@ "@babel/plugin-transform-template-literals": "^7.4.4", "@babel/plugin-transform-typeof-symbol": "^7.2.0", "@babel/plugin-transform-unicode-regex": "^7.4.4", - "@babel/types": "^7.5.0", + "@babel/types": "^7.5.5", "browserslist": "^4.6.0", "core-js-compat": "^3.1.1", "invariant": "^2.2.2", "js-levenshtein": "^1.1.3", "semver": "^5.5.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/runtime": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.4.tgz", - "integrity": "sha512-Na84uwyImZZc3FKf4aUF1tysApzwf3p2yuFBIyBfbzT5glzKTdvYI4KVW4kcgjrzoGUjC7w3YyCHcJKaRxsr2Q==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.5.tgz", + "integrity": "sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ==", "dev": true, "requires": { "regenerator-runtime": "^0.13.2" @@ -792,20 +897,42 @@ } }, "@babel/traverse": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.0.tgz", - "integrity": "sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.5.tgz", + "integrity": "sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.5.0", + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.5.5", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.5.0", - "@babel/types": "^7.5.0", + "@babel/parser": "^7.5.5", + "@babel/types": "^7.5.5", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.11" + "lodash": "^4.17.13" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/types": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/types": { @@ -828,14 +955,6 @@ "@jimp/utils": "^0.6.4", "bmp-js": "^0.1.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/core": { @@ -855,14 +974,6 @@ "phin": "^2.9.1", "pixelmatch": "^4.0.2", "tinycolor2": "^1.4.1" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/custom": { @@ -873,14 +984,6 @@ "requires": { "@jimp/core": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/gif": { @@ -892,14 +995,6 @@ "@jimp/utils": "^0.6.4", "core-js": "^2.5.7", "omggif": "^1.0.9" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/jpeg": { @@ -911,14 +1006,6 @@ "@jimp/utils": "^0.6.4", "core-js": "^2.5.7", "jpeg-js": "^0.3.4" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-blit": { @@ -929,14 +1016,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-blur": { @@ -947,14 +1026,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-color": { @@ -966,14 +1037,6 @@ "@jimp/utils": "^0.6.4", "core-js": "^2.5.7", "tinycolor2": "^1.4.1" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-contain": { @@ -984,14 +1047,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-cover": { @@ -1002,14 +1057,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-crop": { @@ -1020,14 +1067,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-displace": { @@ -1038,14 +1077,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-dither": { @@ -1056,14 +1087,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-flip": { @@ -1074,14 +1097,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-gaussian": { @@ -1092,14 +1107,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-invert": { @@ -1110,14 +1117,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-mask": { @@ -1128,14 +1127,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-normalize": { @@ -1146,14 +1137,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-print": { @@ -1165,14 +1148,6 @@ "@jimp/utils": "^0.6.4", "core-js": "^2.5.7", "load-bmfont": "^1.4.0" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-resize": { @@ -1183,14 +1158,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-rotate": { @@ -1201,14 +1168,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-scale": { @@ -1219,14 +1178,6 @@ "requires": { "@jimp/utils": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugins": { @@ -1254,14 +1205,6 @@ "@jimp/plugin-scale": "^0.6.4", "core-js": "^2.5.7", "timm": "^1.6.1" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/png": { @@ -1273,14 +1216,6 @@ "@jimp/utils": "^0.6.4", "core-js": "^2.5.7", "pngjs": "^3.3.3" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/tiff": { @@ -1291,14 +1226,6 @@ "requires": { "core-js": "^2.5.7", "utif": "^2.0.1" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/types": { @@ -1314,14 +1241,6 @@ "@jimp/tiff": "^0.6.4", "core-js": "^2.5.7", "timm": "^1.6.1" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/utils": { @@ -1331,14 +1250,6 @@ "dev": true, "requires": { "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@polka/redirect": { @@ -1437,9 +1348,9 @@ } }, "acorn": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", - "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", + "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==", "dev": true }, "ansi-colors": { @@ -1478,24 +1389,6 @@ "sprintf-js": "~1.0.2" } }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, "array-filter": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", @@ -1514,24 +1407,6 @@ "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", "dev": true }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, "babel-plugin-dynamic-import-node": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", @@ -1547,61 +1422,6 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "base64-js": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", @@ -1624,35 +1444,6 @@ "concat-map": "0.0.1" } }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -1660,13 +1451,13 @@ "dev": true }, "browserslist": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.4.tgz", - "integrity": "sha512-ErJT8qGfRt/VWHSr1HeqZzz50DvxHtr1fVL1m5wf20aGrG8e1ce8fpZ2EjZEfs09DDZYSvtRaDlMpWslBf8Low==", + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.6.tgz", + "integrity": "sha512-D2Nk3W9JL9Fp/gIcWei8LrERCS+eXu9AM5cfXA8WEZ84lFks+ARnZ0q/R69m2SV3Wjma83QDDPxsNKXUwdIsyA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000981", - "electron-to-chromium": "^1.3.188", + "caniuse-lite": "^1.0.30000984", + "electron-to-chromium": "^1.3.191", "node-releases": "^1.1.25" } }, @@ -1708,23 +1499,6 @@ "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", "dev": true }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, "camel-case": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", @@ -1742,9 +1516,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000983", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000983.tgz", - "integrity": "sha512-/llD1bZ6qwNkt41AsvjsmwNOoA4ZB+8iqmf5LVyeSXuBODT/hAMFNVOh84NdUzoiYiSKqo5vQ3ZzeYHSi/olDQ==", + "version": "1.0.30000986", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000986.tgz", + "integrity": "sha512-pM+LnkoAX0+QnIH3tpW5EnkmfpEoqOD8FAcoBvsl3Xh6DXkgctiCxeCbXphP/k3XJtJzm+zOAJbi6U6IVkpWZQ==", "dev": true }, "chalk": { @@ -1764,36 +1538,13 @@ "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "dev": true }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "clean-css": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", + "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", - "dev": true, - "requires": { - "source-map": "~0.6.0" + "source-map": "~0.6.0" }, "dependencies": { "source-map": { @@ -1838,16 +1589,6 @@ "integrity": "sha512-kV49Fr+NGFHFc/Imsx6g180hSlkGhuHxTSDDmDHOuyln0MQYFLixDY4+bFkBVeCEiepYfDimAF/e++9jPJk4QA==", "dev": true }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -1869,12 +1610,6 @@ "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", "dev": true }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1912,10 +1647,10 @@ "safe-buffer": "~5.1.1" } }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "core-js": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", "dev": true }, "core-js-compat": { @@ -1930,9 +1665,9 @@ }, "dependencies": { "semver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", - "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } @@ -1977,12 +1712,6 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1992,47 +1721,6 @@ "object-keys": "^1.0.12" } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "degit": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/degit/-/degit-2.1.3.tgz", @@ -2089,9 +1777,9 @@ } }, "electron-to-chromium": { - "version": "1.3.188", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.188.tgz", - "integrity": "sha512-tEQcughYIMj8WDMc59EGEtNxdGgwal/oLLTDw+NEqJRJwGflQvH3aiyiexrWeZOETP4/ko78PVr6gwNhdozvuQ==", + "version": "1.3.203", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.203.tgz", + "integrity": "sha512-Z1FjJKEBhYrCNmnususVk8khiBabVI/bSJB/295V4ghVt4MFmtbP+mXgRZLQZinEBI469U6FtiGgpXnlLs6qiQ==", "dev": true }, "emoji-regex": { @@ -2194,171 +1882,12 @@ "integrity": "sha1-WKnS1ywCwfbwKg70qRZicrd2CSI=", "dev": true }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "file-type": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-9.0.0.tgz", "integrity": "sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw==", "dev": true }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -2386,21 +1915,6 @@ "is-callable": "^1.1.3" } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, "fs-minipass": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.6.tgz", @@ -2437,12 +1951,6 @@ "pump": "^3.0.0" } }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -2476,7 +1984,8 @@ "golden-fleece": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/golden-fleece/-/golden-fleece-1.0.9.tgz", - "integrity": "sha512-YSwLaGMOgSBx9roJlNLL12c+FRiw7VECphinc6mGucphc/ZxTHgdEz6gmJqH6NOzYEd/yr64hwjom5pZ+tJVpg==" + "integrity": "sha512-YSwLaGMOgSBx9roJlNLL12c+FRiw7VECphinc6mGucphc/ZxTHgdEz6gmJqH6NOzYEd/yr64hwjom5pZ+tJVpg==", + "dev": true }, "good-listener": { "version": "1.2.2", @@ -2520,44 +2029,6 @@ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", "dev": true }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -2645,32 +2116,6 @@ "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -2689,63 +2134,12 @@ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", "dev": true }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "is-date-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", "dev": true }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -2764,41 +2158,6 @@ "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, "is-reference": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.3.tgz", @@ -2832,12 +2191,6 @@ "has-symbols": "^1.0.0" } }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2850,12 +2203,6 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, "jest-worker": { "version": "24.6.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.6.0.tgz", @@ -2888,14 +2235,6 @@ "@jimp/plugins": "^0.6.4", "@jimp/types": "^0.6.4", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "jpeg-js": { @@ -2989,12 +2328,6 @@ "safe-buffer": "^5.0.1" } }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, "lcid": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", @@ -3051,9 +2384,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "lodash.deburr": { @@ -3139,21 +2472,6 @@ "p-defer": "^1.0.0" } }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, "marked": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", @@ -3185,27 +2503,6 @@ "readable-stream": "^2.0.1" } }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, "mime": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.3.tgz", @@ -3260,27 +2557,6 @@ "minipass": "^2.2.1" } }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -3299,9 +2575,9 @@ } }, "mocha": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.1.4.tgz", - "integrity": "sha512-PN8CIy4RXsIoxoFJzS4QNnCH4psUCPWc4/rPrst/ecSJJbLBkubMiyGCP2Kj/9YnWbotFqAoeXyXMucj7gwCFg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", + "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -3380,25 +2656,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -3445,9 +2702,9 @@ } }, "node-releases": { - "version": "1.1.25", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.25.tgz", - "integrity": "sha512-fI5BXuk83lKEoZDdH3gRhtsNgh05/wZacuXkgbiYkceE7+QIMXOg98n9ZV7mz27B+kFHnqHcUpscZZlGRSmTpQ==", + "version": "1.1.26", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.26.tgz", + "integrity": "sha512-fZPsuhhUHMTlfkhDLGtfY80DSJTjOcx+qD1j5pqPkuhUHVS7xHZIg9EE4DHK8O3f0zTxXHX5VIkDG8pu98/wfQ==", "dev": true, "requires": { "semver": "^5.3.0" @@ -3497,58 +2754,12 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, "object.assign": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", @@ -3571,15 +2782,6 @@ "es-abstract": "^1.5.1" } }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, "omggif": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.9.tgz", @@ -3710,12 +2912,6 @@ "json-parse-better-errors": "^1.0.1" } }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -3750,9 +2946,9 @@ } }, "pg": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/pg/-/pg-7.11.0.tgz", - "integrity": "sha512-YO4V7vCmEMGoF390LJaFaohWNKaA2ayoQOEZmiHVcAUF+YsRThpf/TaKCgSvsSE7cDm37Q/Cy3Gz41xiX/XjTw==", + "version": "7.12.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-7.12.0.tgz", + "integrity": "sha512-q54Ic0oBXfDZMwheP8ALeUX32TUXvF7SNgAlZjyhkDuFCJkQCgcLBz0Be5uOrAj3ljSok/CI9lRbYzEko0z1Zw==", "requires": { "buffer-writer": "2.0.0", "packet-reader": "1.0.0", @@ -3781,9 +2977,9 @@ "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" }, "pg-pool": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-2.0.6.tgz", - "integrity": "sha512-hod2zYQxM8Gt482q+qONGTYcg/qVcV32VHVPtktbBJs0us3Dj7xibISw0BAAXVMCzt8A/jhfJvpZaxUlqtqs0g==" + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-2.0.7.tgz", + "integrity": "sha512-UiJyO5B9zZpu32GSlP0tXy8J2NsJ9EFGFfz5v6PSbdz/1hBLX1rNiiy5+mAm5iJJYwfCv4A0EBcQLGWwjbpzZw==" }, "pg-types": { "version": "2.0.1", @@ -3839,20 +3035,14 @@ "dev": true }, "polka": { - "version": "1.0.0-next.3", - "resolved": "https://registry.npmjs.org/polka/-/polka-1.0.0-next.3.tgz", - "integrity": "sha512-VmCsJK2uAqyjtV8e6ujEhgehibh+lvgdlrIgkTGsL+EKrCS/+BmGq57NV7yvkeGKI4XhsCw/J1YSeejmNfhbig==", + "version": "1.0.0-next.4", + "resolved": "https://registry.npmjs.org/polka/-/polka-1.0.0-next.4.tgz", + "integrity": "sha512-14UAMEVp6UjRepYIjJ/KZcFD0wD4TpDqBGmdgeg5SmhmBHBFR2LdTTXxx/y7GPa4537ZcK28Nsld+hynBE/qDw==", "requires": { "@polka/url": "^1.0.0-next.3", "trouter": "^3.0.2" } }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, "postgres-array": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", @@ -3877,9 +3067,9 @@ } }, "prismjs": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.16.0.tgz", - "integrity": "sha512-OA4MKxjFZHSvZcisLGe14THYsug/nF6O1f0pAJc0KN0wTyAcLqmsbE+lTGKSpyh+9pEW57+k6pg2AfYR+coyHA==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.17.1.tgz", + "integrity": "sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q==", "requires": { "clipboard": "^2.0.0" } @@ -3969,24 +3159,14 @@ "dev": true }, "regenerator-transform": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.0.tgz", - "integrity": "sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", + "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==", "dev": true, "requires": { "private": "^0.1.6" } }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, "regexp-tree": { "version": "0.1.11", "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.11.tgz", @@ -3994,9 +3174,9 @@ "dev": true }, "regexparam": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/regexparam/-/regexparam-1.2.1.tgz", - "integrity": "sha512-L/xx/JNXFvejDD9b4FukSh2wCyYUpxSTnLkMpcZc/ygnmaF6ETnphh+FDKZS8XBGmu2e3GoZ1why9qkTYqr1ag==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexparam/-/regexparam-1.3.0.tgz", + "integrity": "sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g==" }, "regexpu-core": { "version": "4.5.4", @@ -4041,18 +3221,6 @@ "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", "dev": true }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4080,18 +3248,6 @@ "path-parse": "^1.0.6" } }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -4102,14 +3258,14 @@ } }, "rollup": { - "version": "1.16.7", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.16.7.tgz", - "integrity": "sha512-P3GVcbVSLLjHWFLKGerYRe3Q/yggRXmTZFx/4WZf4wzGwO6hAg5jyMAFMQKc0dts8rFID4BQngfoz6yQbI7iMQ==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.17.0.tgz", + "integrity": "sha512-k/j1m0NIsI4SYgCJR4MWPstGJOWfJyd6gycKoMhyoKPVXxm+L49XtbUwZyFsrSU2YXsOkM4u1ll9CS/ZgJBUpw==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "^12.0.10", - "acorn": "^6.1.1" + "@types/node": "^12.6.2", + "acorn": "^6.2.0" } }, "rollup-plugin-babel": { @@ -4123,19 +3279,8 @@ }, "dependencies": { "estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - }, - "rollup-pluginutils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", - "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", - "dev": true, - "requires": { - "estree-walker": "^0.6.1" - } + "version": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==" } } }, @@ -4157,15 +3302,6 @@ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", "dev": true - }, - "rollup-pluginutils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", - "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", - "dev": true, - "requires": { - "estree-walker": "^0.6.1" - } } } }, @@ -4192,10 +3328,8 @@ }, "dependencies": { "estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true + "version": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==" }, "resolve": { "version": "1.11.1", @@ -4205,15 +3339,6 @@ "requires": { "path-parse": "^1.0.6" } - }, - "rollup-pluginutils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", - "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", - "dev": true, - "requires": { - "estree-walker": "^0.6.1" - } } } }, @@ -4252,30 +3377,26 @@ }, "dependencies": { "estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - }, - "rollup-pluginutils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", - "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", - "dev": true, - "requires": { - "estree-walker": "^0.6.1" - } + "version": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==" } } }, "rollup-pluginutils": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.7.0.tgz", - "integrity": "sha512-FoP6L1YnMYTAR06Dpq5LE3jJtMwPE6H4VEOqFU23yoziZnqNRSiWcVy6YgEY5PdQB4G7278+8c4TvB0JKS1csA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", + "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", "dev": true, "requires": { - "estree-walker": "^0.6.0", - "micromatch": "^3.1.10" + "estree-walker": "^0.6.1" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + } } }, "safe-buffer": { @@ -4283,15 +3404,6 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, "sander": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/sander/-/sander-0.6.0.tgz", @@ -4304,16 +3416,24 @@ } }, "sapper": { - "version": "0.27.4", - "resolved": "https://registry.npmjs.org/sapper/-/sapper-0.27.4.tgz", - "integrity": "sha512-BYdiJSiyVguu2FZBbl87mn8KhSu+C8JRl7FurclXbMgpiMW7Yt74HPCcu/hXOubvvZw0kVTnzBlAGJCXZmldnA==", + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/sapper/-/sapper-0.27.8.tgz", + "integrity": "sha512-78K+56yu9nGOEU0B0XjBvNchRuPEv4aHbAKK4D874S4aoapMAkHCT0bHtPK12S3P7JPxvvT8GzHaq/8NetMmbg==", "dev": true, "requires": { "html-minifier": "^4.0.0", "http-link-header": "^1.0.2", - "shimport": "^1.0.0", - "sourcemap-codec": "^1.4.4", + "shimport": "^1.0.1", + "sourcemap-codec": "^1.4.6", "string-hash": "^1.1.3" + }, + "dependencies": { + "sourcemap-codec": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", + "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==", + "dev": true + } } }, "sax": { @@ -4345,29 +3465,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -4434,153 +3531,12 @@ } } }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "source-map-support": { "version": "0.5.12", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", @@ -4599,12 +3555,6 @@ } } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, "sourcemap-codec": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", @@ -4651,42 +3601,12 @@ "through": "2" } }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, "string-hash": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", @@ -4771,9 +3691,9 @@ } }, "svelte": { - "version": "3.6.7", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.6.7.tgz", - "integrity": "sha512-9HzhPxWNLi+ZBhxL3HJ8jwwu+u+XfHtVF3uEJ2m8/JOdnaTC9D2qiEwOncgI7z/pN+VumgKQtZoHtvYCW6fHqg==", + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.6.9.tgz", + "integrity": "sha512-k72cp0LYzennT7xgnQU0jB2HJEZ/fQamZbrHJO6JlvsNX+z6a1YJaLrtN4qQ1yfozUkeGw1TOvDxo8a5grOZMg==", "dev": true }, "tar": { @@ -4839,54 +3759,6 @@ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", @@ -4894,11 +3766,11 @@ "dev": true }, "trouter": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/trouter/-/trouter-3.0.2.tgz", - "integrity": "sha512-wzUcM3oKmF8Fx5pd+3IxZj5LBugqW+hSQHm6cTHkpiZHL8w6YeZSzo3LPw0UdhlwaGPms3OxT7N4GEOIRTw+jw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/trouter/-/trouter-3.1.0.tgz", + "integrity": "sha512-3Swwu638QQWOefHLss9cdyLi5/9BKYmXZEXpH0KOFfB9YZwUAwHbDAcoYxaHfqAeFvbi/LqAK7rGkhCr1v1BJA==", "requires": { - "regexparam": "^1.2.0" + "regexparam": "^1.3.0" } }, "uglify-js": { @@ -4947,99 +3819,12 @@ "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", "dev": true }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", "dev": true }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, "utif": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/utif/-/utif-2.0.1.tgz", diff --git a/site/package.json b/site/package.json index b3953ae7de..0b949f5da7 100644 --- a/site/package.json +++ b/site/package.json @@ -14,25 +14,24 @@ }, "dependencies": { "@polka/redirect": "^1.0.0-next.0", - "@polka/send": "^1.0.0-next.2", + "@polka/send": "^1.0.0-next.3", "devalue": "^2.0.0", "do-not-zip": "^1.0.0", - "golden-fleece": "^1.0.9", "httpie": "^1.1.2", "jsonwebtoken": "^8.5.1", "marked": "^0.7.0", - "pg": "^7.11.0", - "polka": "^1.0.0-next.2", - "prismjs": "^1.16.0", + "pg": "^7.12.0", + "polka": "^1.0.0-next.4", + "prismjs": "^1.17.1", "sirv": "^0.4.2", "yootils": "0.0.16" }, "devDependencies": { - "@babel/core": "^7.5.4", + "@babel/core": "^7.5.5", "@babel/plugin-syntax-dynamic-import": "^7.2.0", - "@babel/plugin-transform-runtime": "^7.5.0", - "@babel/preset-env": "^7.5.4", - "@babel/runtime": "^7.5.4", + "@babel/plugin-transform-runtime": "^7.5.5", + "@babel/preset-env": "^7.5.5", + "@babel/runtime": "^7.5.5", "@sindresorhus/slugify": "^0.9.1", "@sveltejs/site-kit": "^1.1.1", "@sveltejs/svelte-repl": "^0.1.8", @@ -40,11 +39,11 @@ "dotenv": "^8.0.0", "esm": "^3.2.25", "jimp": "^0.6.4", - "mocha": "^6.1.4", + "mocha": "^6.2.0", "node-fetch": "^2.6.0", "node-pg-migrate": "^3.21.1", "npm-run-all": "^4.1.5", - "rollup": "^1.16.7", + "rollup": "^1.17.0", "rollup-plugin-babel": "^4.3.3", "rollup-plugin-commonjs": "^10.0.1", "rollup-plugin-json": "^4.0.0", @@ -52,9 +51,9 @@ "rollup-plugin-replace": "^2.2.0", "rollup-plugin-svelte": "^5.1.0", "rollup-plugin-terser": "^5.1.1", - "sapper": "^0.27.4", + "sapper": "^0.27.8", "shelljs": "^0.8.3", - "svelte": "^3.6.7" + "svelte": "^3.6.9" }, "engines": { "node": ">=10.0.0" From 0fe04561b27e509bd0fa992dc3f70ab3caf2746a Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 30 Jul 2019 14:32:53 -0400 Subject: [PATCH 450/510] quote props if necessary in SSR mode - fixes #3312 --- .../compile/render_ssr/handlers/InlineComponent.ts | 4 ++-- test/runtime/samples/prop-quoted/Nested.svelte | 1 + test/runtime/samples/prop-quoted/_config.js | 12 ++++++++++++ test/runtime/samples/prop-quoted/main.svelte | 7 +++++++ 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 test/runtime/samples/prop-quoted/Nested.svelte create mode 100644 test/runtime/samples/prop-quoted/_config.js create mode 100644 test/runtime/samples/prop-quoted/main.svelte diff --git a/src/compiler/compile/render_ssr/handlers/InlineComponent.ts b/src/compiler/compile/render_ssr/handlers/InlineComponent.ts index 320bf5e6a0..74d990a3d8 100644 --- a/src/compiler/compile/render_ssr/handlers/InlineComponent.ts +++ b/src/compiler/compile/render_ssr/handlers/InlineComponent.ts @@ -58,7 +58,7 @@ export default function(node: InlineComponent, renderer: Renderer, options: Rend if (attribute.is_spread) { return snip(attribute.expression); } else { - return `{ ${attribute.name}: ${get_attribute_value(attribute)} }`; + return `{ ${quote_name_if_necessary(attribute.name)}: ${get_attribute_value(attribute)} }`; } }) .concat(binding_props.map(p => `{ ${p} }`)) @@ -67,7 +67,7 @@ export default function(node: InlineComponent, renderer: Renderer, options: Rend } else { props = stringify_props( node.attributes - .map(attribute => `${attribute.name}: ${get_attribute_value(attribute)}`) + .map(attribute => `${quote_name_if_necessary(attribute.name)}: ${get_attribute_value(attribute)}`) .concat(binding_props) ); } diff --git a/test/runtime/samples/prop-quoted/Nested.svelte b/test/runtime/samples/prop-quoted/Nested.svelte new file mode 100644 index 0000000000..681f7126b2 --- /dev/null +++ b/test/runtime/samples/prop-quoted/Nested.svelte @@ -0,0 +1 @@ +{$$props['x-y-z']} \ No newline at end of file diff --git a/test/runtime/samples/prop-quoted/_config.js b/test/runtime/samples/prop-quoted/_config.js new file mode 100644 index 0000000000..d982bc87cc --- /dev/null +++ b/test/runtime/samples/prop-quoted/_config.js @@ -0,0 +1,12 @@ +export default { + props: { + foo: 1 + }, + + html: `1`, + + async test({ assert, component, target }) { + component.foo = 2; + assert.htmlEqual(target.innerHTML, `2`); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/prop-quoted/main.svelte b/test/runtime/samples/prop-quoted/main.svelte new file mode 100644 index 0000000000..0249017762 --- /dev/null +++ b/test/runtime/samples/prop-quoted/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file From 981f30d3e9848994f4eac6666fc4a30701c0be09 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 30 Jul 2019 14:52:23 -0400 Subject: [PATCH 451/510] -> v3.6.10 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 553e83c735..55795f3c88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Svelte changelog +## 3.6.10 + +* Use `change` event for file inputs ([#3226](https://github.com/sveltejs/svelte/issues/3226)) +* Always fire reactive declarations with `$$props` ([#3286](https://github.com/sveltejs/svelte/issues/3286)) +* More conservative spread prop updates ([#3289](https://github.com/sveltejs/svelte/issues/3289)) +* Quote props if necessary in SSR mode ([#3312](https://github.com/sveltejs/svelte/issues/3312)) + ## 3.6.9 * Always update derived stores with a derived input whose value does not change ([#3191](https://github.com/sveltejs/svelte/issues/3191)) diff --git a/package.json b/package.json index 1f40d17821..93cf1f49ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.6.9", + "version": "3.6.10", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From cf5dd8ff7554e69e21f3acc0d033ce05f3ed1be0 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 30 Jul 2019 17:12:17 -0400 Subject: [PATCH 452/510] support RxJS Observables in reassigned stores (#3304) --- src/compiler/compile/render_dom/index.ts | 8 ++++---- src/runtime/internal/ssr.ts | 13 ------------- src/runtime/internal/utils.ts | 15 +++++++++++---- src/runtime/store/index.ts | 11 +++++++++-- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts index c6eb1f1bb8..52006e4d8a 100644 --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -267,9 +267,9 @@ export default function dom( return `$$subscribe_${name}()`; } - const subscribe = component.helper('subscribe'); + const component_subscribe = component.helper('component_subscribe'); - let insert = `${subscribe}($$self, ${name}, $${callback})`; + let insert = `${component_subscribe}($$self, ${name}, $${callback})`; if (component.compile_options.dev) { const validate_store = component.helper('validate_store'); insert = `${validate_store}(${name}, '${name}'); ${insert}`; @@ -343,7 +343,7 @@ export default function dom( }) .map(({ name }) => deindent` ${component.compile_options.dev && `@validate_store(${name.slice(1)}, '${name.slice(1)}');`} - @subscribe($$self, ${name.slice(1)}, $$value => { ${name} = $$value; $$invalidate('${name}', ${name}); }); + @component_subscribe($$self, ${name.slice(1)}, $$value => { ${name} = $$value; $$invalidate('${name}', ${name}); }); `); const resubscribable_reactive_store_unsubscribers = reactive_stores @@ -390,7 +390,7 @@ export default function dom( const store = component.var_lookup.get(name); if (store && store.reassigned) { - return `${$name}, $$unsubscribe_${name} = @noop, $$subscribe_${name} = () => { $$unsubscribe_${name}(); $$unsubscribe_${name} = ${name}.subscribe($$value => { ${$name} = $$value; $$invalidate('${$name}', ${$name}); }) }`; + return `${$name}, $$unsubscribe_${name} = @noop, $$subscribe_${name} = () => { $$unsubscribe_${name}(); $$unsubscribe_${name} = @subscribe(${name}, $$value => { ${$name} = $$value; $$invalidate('${$name}', ${$name}); }) }`; } return $name; diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts index 1ae1ae1d12..d84efc7314 100644 --- a/src/runtime/internal/ssr.ts +++ b/src/runtime/internal/ssr.ts @@ -1,6 +1,5 @@ import { set_current_component, current_component } from './lifecycle'; import { run_all, blank_object } from './utils'; -import { Readable } from 'svelte/store'; export const invalid_attribute_name_character = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u; // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 @@ -121,18 +120,6 @@ export function create_ssr_component(fn) { }; } -/** - * Get the current value from a store by subscribing and immediately unsubscribing. - * @param store readable - */ -export function get_store_value(store: Readable): T | undefined { - let value; - const unsubscribe: any = store.subscribe(_ => value = _); - if (unsubscribe.unsubscribe) unsubscribe.unsubscribe(); - else unsubscribe(); - return value; -} - export function add_attribute(name, value) { if (!value) return ''; return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(value) : `"${value}"`}`}`; diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 08410ec33a..41a2ee890b 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -48,12 +48,19 @@ export function validate_store(store, name) { } } -export function subscribe(component, store, callback) { +export function subscribe(store, callback) { const unsub = store.subscribe(callback); + return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; +} + +export function get_store_value(store) { + let value; + subscribe(store, _ => value = _)(); + return value; +} - component.$$.on_destroy.push(unsub.unsubscribe - ? () => unsub.unsubscribe() - : unsub); +export function component_subscribe(component, store, callback) { + component.$$.on_destroy.push(subscribe(store, callback)); } export function create_slot(definition, ctx, fn) { diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index 6863730e4e..6df7be6cf6 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -1,5 +1,4 @@ -import { run_all, noop, safe_not_equal, is_function } from 'svelte/internal'; -export { get_store_value as get } from 'svelte/internal'; +import { run_all, noop, safe_not_equal, is_function, get_store_value } from 'svelte/internal'; /** Callback to inform of a value updates. */ type Subscriber = (value: T) => void; @@ -182,3 +181,11 @@ export function derived( }; }); } + +/** + * Get the current value from a store by subscribing and immediately unsubscribing. + * @param store readable + */ +export const get = get_store_value as { + (store: Readable): (T | undefined); +}; From 60af0d778197688338078348481802e2327e487b Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 30 Jul 2019 17:20:13 -0400 Subject: [PATCH 453/510] add test --- .../samples/store-resubscribe-observable/_config.js | 3 +++ .../samples/store-resubscribe-observable/main.svelte | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/runtime/samples/store-resubscribe-observable/_config.js create mode 100644 test/runtime/samples/store-resubscribe-observable/main.svelte diff --git a/test/runtime/samples/store-resubscribe-observable/_config.js b/test/runtime/samples/store-resubscribe-observable/_config.js new file mode 100644 index 0000000000..d043bbcd87 --- /dev/null +++ b/test/runtime/samples/store-resubscribe-observable/_config.js @@ -0,0 +1,3 @@ +export default { + html: `42`, +}; diff --git a/test/runtime/samples/store-resubscribe-observable/main.svelte b/test/runtime/samples/store-resubscribe-observable/main.svelte new file mode 100644 index 0000000000..4ea2112b11 --- /dev/null +++ b/test/runtime/samples/store-resubscribe-observable/main.svelte @@ -0,0 +1,11 @@ + + +{$foo} From d2ac3d880b7c8bbc92bf959e2d83b73c4768c1f8 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Tue, 30 Jul 2019 17:42:15 -0700 Subject: [PATCH 454/510] Missing globals --- src/compiler/utils/names.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/utils/names.ts b/src/compiler/utils/names.ts index c5a67a651b..8d9150bc18 100644 --- a/src/compiler/utils/names.ts +++ b/src/compiler/utils/names.ts @@ -15,15 +15,18 @@ export const globals = new Set([ 'encodeURIComponent', 'Error', 'EvalError', + 'history', 'Infinity', 'InternalError', 'Intl', 'isFinite', 'isNaN', 'JSON', + 'localStorage', 'Map', 'Math', 'NaN', + 'navigator', 'Number', 'Object', 'parseFloat', @@ -34,6 +37,7 @@ export const globals = new Set([ 'RangeError', 'ReferenceError', 'RegExp', + 'sessionStorage', 'Set', 'String', 'SyntaxError', From 9b5bbb556d0b8add11ccc571fff3ae4e3f0266b8 Mon Sep 17 00:00:00 2001 From: bre30kra69cs Date: Wed, 31 Jul 2019 15:14:18 +0300 Subject: [PATCH 455/510] fix Literally undefined class #3283 --- .../render_dom/wrappers/Element/Attribute.ts | 13 +++++-- .../attribute-null-classname/_config.js | 32 +++++++++++++++ .../attribute-null-classname/main.svelte | 11 ++++++ .../attribute-null-classnames/_config.js | 39 +++++++++++++++++++ .../attribute-null-classnames/main.svelte | 12 ++++++ 5 files changed, 104 insertions(+), 3 deletions(-) create mode 100644 test/runtime/samples/attribute-null-classname/_config.js create mode 100644 test/runtime/samples/attribute-null-classname/main.svelte create mode 100644 test/runtime/samples/attribute-null-classnames/_config.js create mode 100644 test/runtime/samples/attribute-null-classnames/main.svelte diff --git a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts index f55e731fdb..aff06e4150 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts @@ -91,9 +91,16 @@ export default class AttributeWrapper { if (chunk.type === 'Text') { return stringify(chunk.data); } else { - return chunk.get_precedence() <= 13 - ? `(${chunk.render()})` - : chunk.render(); + const renderedChunk = chunk.render(); + if (this.node.name === 'class') { + return chunk.get_precedence() <= 13 + ? `(${renderedChunk})` + : `(${renderedChunk} || '')`; + } else { + return chunk.get_precedence() <= 13 + ? `(${renderedChunk})` + : renderedChunk; + } } }) .join(' + '); diff --git a/test/runtime/samples/attribute-null-classname/_config.js b/test/runtime/samples/attribute-null-classname/_config.js new file mode 100644 index 0000000000..856bd8bcd0 --- /dev/null +++ b/test/runtime/samples/attribute-null-classname/_config.js @@ -0,0 +1,32 @@ +export default { + skip_if_ssr: true, + + props: { + testName: "testClassName" + }, + + html: `
    `, + + test({ assert, component, target }) { + const div = target.querySelector('div'); + assert.equal(div.className, 'testClassName svelte-x1o6ra'); + + component.testName = null; + assert.equal(div.className, ' svelte-x1o6ra'); + + component.testName = undefined; + assert.equal(div.className, ' svelte-x1o6ra'); + + component.testName = undefined + ''; + assert.equal(div.className, 'undefined svelte-x1o6ra'); + + component.testName = null + ''; + assert.equal(div.className, 'null svelte-x1o6ra'); + + component.testName = 1; + assert.equal(div.className, '1 svelte-x1o6ra'); + + component.testName = ''; + assert.equal(div.className, ' svelte-x1o6ra'); + } +}; diff --git a/test/runtime/samples/attribute-null-classname/main.svelte b/test/runtime/samples/attribute-null-classname/main.svelte new file mode 100644 index 0000000000..013647952d --- /dev/null +++ b/test/runtime/samples/attribute-null-classname/main.svelte @@ -0,0 +1,11 @@ + + + + +
    diff --git a/test/runtime/samples/attribute-null-classnames/_config.js b/test/runtime/samples/attribute-null-classnames/_config.js new file mode 100644 index 0000000000..6eca569250 --- /dev/null +++ b/test/runtime/samples/attribute-null-classnames/_config.js @@ -0,0 +1,39 @@ +export default { + skip_if_ssr: true, + + props: { + testName1: "test1", + testName2: "test2", + }, + + html: `
    `, + + test({ assert, component, target }) { + const div = target.querySelector('div'); + assert.equal(div.className, 'test1test2 svelte-x1o6ra'); + + component.testName1 = null; + component.testName2 = null; + assert.equal(div.className, '0 svelte-x1o6ra'); + + component.testName1 = null; + component.testName2 = "test"; + assert.equal(div.className, 'nulltest svelte-x1o6ra'); + + component.testName1 = undefined; + component.testName2 = "test"; + assert.equal(div.className, 'undefinedtest svelte-x1o6ra'); + + component.testName1 = undefined; + component.testName2 = undefined; + assert.equal(div.className, 'NaN svelte-x1o6ra'); + + component.testName1 = null; + component.testName2 = 1; + assert.equal(div.className, '1 svelte-x1o6ra'); + + component.testName1 = undefined; + component.testName2 = 1; + assert.equal(div.className, 'NaN svelte-x1o6ra'); + } +}; diff --git a/test/runtime/samples/attribute-null-classnames/main.svelte b/test/runtime/samples/attribute-null-classnames/main.svelte new file mode 100644 index 0000000000..06098fd50b --- /dev/null +++ b/test/runtime/samples/attribute-null-classnames/main.svelte @@ -0,0 +1,12 @@ + + + + +
    From ccf2ad819a8cfd0b86d02e4991695b5369ef28e6 Mon Sep 17 00:00:00 2001 From: bre30kra69cs Date: Thu, 1 Aug 2019 15:46:53 +0300 Subject: [PATCH 456/510] optimize class name runtime calc & add tests & ref --- .../render_dom/wrappers/Element/Attribute.ts | 63 +++++++++++++------ src/runtime/internal/utils.ts | 4 ++ .../samples/attribute-false/_config.js | 5 ++ .../samples/attribute-false/main.svelte | 1 + .../_config.js | 44 +++++++++++++ .../main.svelte | 5 ++ .../_config.js | 12 ++++ .../main.svelte | 0 .../_config.js | 47 ++++++++++++++ .../main.svelte | 6 ++ .../_config.js | 8 +++ .../main.svelte | 0 .../_config.js | 44 +++++++++++++ .../main.svelte | 9 +++ .../_config.js | 44 +++++++++++++ .../main.svelte | 15 +++++ .../_config.js | 47 ++++++++++++++ .../main.svelte | 11 ++++ .../_config.js | 47 ++++++++++++++ .../main.svelte | 17 +++++ .../runtime/samples/attribute-null/_config.js | 5 ++ .../samples/attribute-null/main.svelte | 1 + .../samples/attribute-undefined/_config.js | 5 ++ .../samples/attribute-undefined/main.svelte | 1 + 24 files changed, 421 insertions(+), 20 deletions(-) create mode 100644 test/runtime/samples/attribute-false/_config.js create mode 100644 test/runtime/samples/attribute-false/main.svelte create mode 100644 test/runtime/samples/attribute-null-classname-no-style/_config.js create mode 100644 test/runtime/samples/attribute-null-classname-no-style/main.svelte rename test/runtime/samples/{attribute-null-classname => attribute-null-classname-with-style}/_config.js (70%) rename test/runtime/samples/{attribute-null-classname => attribute-null-classname-with-style}/main.svelte (100%) create mode 100644 test/runtime/samples/attribute-null-classnames-no-style/_config.js create mode 100644 test/runtime/samples/attribute-null-classnames-no-style/main.svelte rename test/runtime/samples/{attribute-null-classnames => attribute-null-classnames-with-style}/_config.js (81%) rename test/runtime/samples/{attribute-null-classnames => attribute-null-classnames-with-style}/main.svelte (100%) create mode 100644 test/runtime/samples/attribute-null-func-classname-no-style/_config.js create mode 100644 test/runtime/samples/attribute-null-func-classname-no-style/main.svelte create mode 100644 test/runtime/samples/attribute-null-func-classname-with-style/_config.js create mode 100644 test/runtime/samples/attribute-null-func-classname-with-style/main.svelte create mode 100644 test/runtime/samples/attribute-null-func-classnames-no-style/_config.js create mode 100644 test/runtime/samples/attribute-null-func-classnames-no-style/main.svelte create mode 100644 test/runtime/samples/attribute-null-func-classnames-with-style/_config.js create mode 100644 test/runtime/samples/attribute-null-func-classnames-with-style/main.svelte create mode 100644 test/runtime/samples/attribute-null/_config.js create mode 100644 test/runtime/samples/attribute-null/main.svelte create mode 100644 test/runtime/samples/attribute-undefined/_config.js create mode 100644 test/runtime/samples/attribute-undefined/main.svelte diff --git a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts index aff06e4150..7c174acb46 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts @@ -5,6 +5,7 @@ import ElementWrapper from './index'; import { stringify } from '../../../utils/stringify'; import deindent from '../../../utils/deindent'; import Expression from '../../../nodes/shared/Expression'; +import Text from '../../../nodes/Text'; export default class AttributeWrapper { node: Attribute; @@ -84,26 +85,13 @@ export default class AttributeWrapper { value = (this.node.chunks[0] as Expression).render(block); } else { // '{foo} {bar}' — treat as string concatenation - value = - (this.node.chunks[0].type === 'Text' ? '' : `"" + `) + - this.node.chunks - .map((chunk) => { - if (chunk.type === 'Text') { - return stringify(chunk.data); - } else { - const renderedChunk = chunk.render(); - if (this.node.name === 'class') { - return chunk.get_precedence() <= 13 - ? `(${renderedChunk})` - : `(${renderedChunk} || '')`; - } else { - return chunk.get_precedence() <= 13 - ? `(${renderedChunk})` - : renderedChunk; - } - } - }) - .join(' + '); + const attrPrefix = this.node.chunks[0].type === 'Text' ? '' : `"" + `; + + const attrText = this.node.name === 'class' + ? this.get_class_name_text() + : this.get_attr_text(); + + value = `${attrPrefix}${attrText}`; } const is_select_value_attribute = @@ -217,6 +205,41 @@ export default class AttributeWrapper { } } + get_class_name_text() { + const isStyled = this.node.chunks + .filter((chunk) => chunk.type === 'Text') + .some((chunk: Text) => !chunk.start && !chunk.end); + + const classNameStringArray = this.render_attr(); + + + if (!isStyled || classNameStringArray.length !== 2) { + return classNameStringArray.join(' + '); + } + + const targetToken = 0; + return classNameStringArray + .map((token, index) => index === targetToken ? `@class_name_resolver(${token})` : token) + .join(' + '); + } + + get_attr_text() { + return this.render_attr().join(' + '); + } + + render_attr() { + return this.node.chunks.map((chunk) => { + if (chunk.type === 'Text') { + return stringify(chunk.data); + } + + const renderedChunk = chunk.render(); + return chunk.get_precedence() <= 13 + ? `(${renderedChunk})` + : renderedChunk; + }); + } + stringify() { if (this.node.is_true) return ''; diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 08410ec33a..1aec30ef2f 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -89,3 +89,7 @@ export function once(fn) { fn.call(this, ...args); }; } + +export function class_name_resolver(nextClassName) { + return nextClassName == undefined ? '' : nextClassName; +} \ No newline at end of file diff --git a/test/runtime/samples/attribute-false/_config.js b/test/runtime/samples/attribute-false/_config.js new file mode 100644 index 0000000000..0f37392806 --- /dev/null +++ b/test/runtime/samples/attribute-false/_config.js @@ -0,0 +1,5 @@ +export default { + skip_if_ssr: true, + + html: `
    `, +}; diff --git a/test/runtime/samples/attribute-false/main.svelte b/test/runtime/samples/attribute-false/main.svelte new file mode 100644 index 0000000000..ca78020a39 --- /dev/null +++ b/test/runtime/samples/attribute-false/main.svelte @@ -0,0 +1 @@ +
    diff --git a/test/runtime/samples/attribute-null-classname-no-style/_config.js b/test/runtime/samples/attribute-null-classname-no-style/_config.js new file mode 100644 index 0000000000..e2098430e4 --- /dev/null +++ b/test/runtime/samples/attribute-null-classname-no-style/_config.js @@ -0,0 +1,44 @@ +export default { + skip_if_ssr: true, + + props: { + testName: "testClassName" + }, + + html: `
    `, + + test({ assert, component, target }) { + const div = target.querySelector('div'); + assert.equal(div.className, 'testClassName'); + + component.testName = null; + assert.equal(div.className, ''); + + component.testName = undefined; + assert.equal(div.className, ''); + + component.testName = undefined + ''; + assert.equal(div.className, 'undefined'); + + component.testName = null + ''; + assert.equal(div.className, 'null'); + + component.testName = 1; + assert.equal(div.className, '1'); + + component.testName = 0; + assert.equal(div.className, '0'); + + component.testName = false; + assert.equal(div.className, 'false'); + + component.testName = true; + assert.equal(div.className, 'true'); + + component.testName = {}; + assert.equal(div.className, '[object Object]'); + + component.testName = ''; + assert.equal(div.className, ''); + } +}; diff --git a/test/runtime/samples/attribute-null-classname-no-style/main.svelte b/test/runtime/samples/attribute-null-classname-no-style/main.svelte new file mode 100644 index 0000000000..8dfcd7af54 --- /dev/null +++ b/test/runtime/samples/attribute-null-classname-no-style/main.svelte @@ -0,0 +1,5 @@ + + +
    diff --git a/test/runtime/samples/attribute-null-classname/_config.js b/test/runtime/samples/attribute-null-classname-with-style/_config.js similarity index 70% rename from test/runtime/samples/attribute-null-classname/_config.js rename to test/runtime/samples/attribute-null-classname-with-style/_config.js index 856bd8bcd0..635dd058ca 100644 --- a/test/runtime/samples/attribute-null-classname/_config.js +++ b/test/runtime/samples/attribute-null-classname-with-style/_config.js @@ -26,6 +26,18 @@ export default { component.testName = 1; assert.equal(div.className, '1 svelte-x1o6ra'); + component.testName = 0; + assert.equal(div.className, '0 svelte-x1o6ra'); + + component.testName = false; + assert.equal(div.className, 'false svelte-x1o6ra'); + + component.testName = true; + assert.equal(div.className, 'true svelte-x1o6ra'); + + component.testName = {}; + assert.equal(div.className, '[object Object] svelte-x1o6ra'); + component.testName = ''; assert.equal(div.className, ' svelte-x1o6ra'); } diff --git a/test/runtime/samples/attribute-null-classname/main.svelte b/test/runtime/samples/attribute-null-classname-with-style/main.svelte similarity index 100% rename from test/runtime/samples/attribute-null-classname/main.svelte rename to test/runtime/samples/attribute-null-classname-with-style/main.svelte diff --git a/test/runtime/samples/attribute-null-classnames-no-style/_config.js b/test/runtime/samples/attribute-null-classnames-no-style/_config.js new file mode 100644 index 0000000000..6a734efff5 --- /dev/null +++ b/test/runtime/samples/attribute-null-classnames-no-style/_config.js @@ -0,0 +1,47 @@ +export default { + skip_if_ssr: true, + + props: { + testName1: "test1", + testName2: "test2", + }, + + html: `
    `, + + test({ assert, component, target }) { + const div = target.querySelector('div'); + assert.equal(div.className, 'test1test2'); + + component.testName1 = null; + component.testName2 = null; + assert.equal(div.className, '0'); + + component.testName1 = null; + component.testName2 = "test"; + assert.equal(div.className, 'nulltest'); + + component.testName1 = undefined; + component.testName2 = "test"; + assert.equal(div.className, 'undefinedtest'); + + component.testName1 = undefined; + component.testName2 = undefined; + assert.equal(div.className, 'NaN'); + + component.testName1 = null; + component.testName2 = 1; + assert.equal(div.className, '1'); + + component.testName1 = undefined; + component.testName2 = 1; + assert.equal(div.className, 'NaN'); + + component.testName1 = null; + component.testName2 = 0; + assert.equal(div.className, '0'); + + component.testName1 = undefined; + component.testName2 = 0; + assert.equal(div.className, 'NaN'); + } +}; diff --git a/test/runtime/samples/attribute-null-classnames-no-style/main.svelte b/test/runtime/samples/attribute-null-classnames-no-style/main.svelte new file mode 100644 index 0000000000..f8cf7d803e --- /dev/null +++ b/test/runtime/samples/attribute-null-classnames-no-style/main.svelte @@ -0,0 +1,6 @@ + + +
    diff --git a/test/runtime/samples/attribute-null-classnames/_config.js b/test/runtime/samples/attribute-null-classnames-with-style/_config.js similarity index 81% rename from test/runtime/samples/attribute-null-classnames/_config.js rename to test/runtime/samples/attribute-null-classnames-with-style/_config.js index 6eca569250..22f7a4d7e2 100644 --- a/test/runtime/samples/attribute-null-classnames/_config.js +++ b/test/runtime/samples/attribute-null-classnames-with-style/_config.js @@ -35,5 +35,13 @@ export default { component.testName1 = undefined; component.testName2 = 1; assert.equal(div.className, 'NaN svelte-x1o6ra'); + + component.testName1 = null; + component.testName2 = 0; + assert.equal(div.className, '0 svelte-x1o6ra'); + + component.testName1 = undefined; + component.testName2 = 0; + assert.equal(div.className, 'NaN svelte-x1o6ra'); } }; diff --git a/test/runtime/samples/attribute-null-classnames/main.svelte b/test/runtime/samples/attribute-null-classnames-with-style/main.svelte similarity index 100% rename from test/runtime/samples/attribute-null-classnames/main.svelte rename to test/runtime/samples/attribute-null-classnames-with-style/main.svelte diff --git a/test/runtime/samples/attribute-null-func-classname-no-style/_config.js b/test/runtime/samples/attribute-null-func-classname-no-style/_config.js new file mode 100644 index 0000000000..e2098430e4 --- /dev/null +++ b/test/runtime/samples/attribute-null-func-classname-no-style/_config.js @@ -0,0 +1,44 @@ +export default { + skip_if_ssr: true, + + props: { + testName: "testClassName" + }, + + html: `
    `, + + test({ assert, component, target }) { + const div = target.querySelector('div'); + assert.equal(div.className, 'testClassName'); + + component.testName = null; + assert.equal(div.className, ''); + + component.testName = undefined; + assert.equal(div.className, ''); + + component.testName = undefined + ''; + assert.equal(div.className, 'undefined'); + + component.testName = null + ''; + assert.equal(div.className, 'null'); + + component.testName = 1; + assert.equal(div.className, '1'); + + component.testName = 0; + assert.equal(div.className, '0'); + + component.testName = false; + assert.equal(div.className, 'false'); + + component.testName = true; + assert.equal(div.className, 'true'); + + component.testName = {}; + assert.equal(div.className, '[object Object]'); + + component.testName = ''; + assert.equal(div.className, ''); + } +}; diff --git a/test/runtime/samples/attribute-null-func-classname-no-style/main.svelte b/test/runtime/samples/attribute-null-func-classname-no-style/main.svelte new file mode 100644 index 0000000000..e2754cd421 --- /dev/null +++ b/test/runtime/samples/attribute-null-func-classname-no-style/main.svelte @@ -0,0 +1,9 @@ + + +
    diff --git a/test/runtime/samples/attribute-null-func-classname-with-style/_config.js b/test/runtime/samples/attribute-null-func-classname-with-style/_config.js new file mode 100644 index 0000000000..635dd058ca --- /dev/null +++ b/test/runtime/samples/attribute-null-func-classname-with-style/_config.js @@ -0,0 +1,44 @@ +export default { + skip_if_ssr: true, + + props: { + testName: "testClassName" + }, + + html: `
    `, + + test({ assert, component, target }) { + const div = target.querySelector('div'); + assert.equal(div.className, 'testClassName svelte-x1o6ra'); + + component.testName = null; + assert.equal(div.className, ' svelte-x1o6ra'); + + component.testName = undefined; + assert.equal(div.className, ' svelte-x1o6ra'); + + component.testName = undefined + ''; + assert.equal(div.className, 'undefined svelte-x1o6ra'); + + component.testName = null + ''; + assert.equal(div.className, 'null svelte-x1o6ra'); + + component.testName = 1; + assert.equal(div.className, '1 svelte-x1o6ra'); + + component.testName = 0; + assert.equal(div.className, '0 svelte-x1o6ra'); + + component.testName = false; + assert.equal(div.className, 'false svelte-x1o6ra'); + + component.testName = true; + assert.equal(div.className, 'true svelte-x1o6ra'); + + component.testName = {}; + assert.equal(div.className, '[object Object] svelte-x1o6ra'); + + component.testName = ''; + assert.equal(div.className, ' svelte-x1o6ra'); + } +}; diff --git a/test/runtime/samples/attribute-null-func-classname-with-style/main.svelte b/test/runtime/samples/attribute-null-func-classname-with-style/main.svelte new file mode 100644 index 0000000000..bcb858ab8d --- /dev/null +++ b/test/runtime/samples/attribute-null-func-classname-with-style/main.svelte @@ -0,0 +1,15 @@ + + + + +
    diff --git a/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js b/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js new file mode 100644 index 0000000000..6a734efff5 --- /dev/null +++ b/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js @@ -0,0 +1,47 @@ +export default { + skip_if_ssr: true, + + props: { + testName1: "test1", + testName2: "test2", + }, + + html: `
    `, + + test({ assert, component, target }) { + const div = target.querySelector('div'); + assert.equal(div.className, 'test1test2'); + + component.testName1 = null; + component.testName2 = null; + assert.equal(div.className, '0'); + + component.testName1 = null; + component.testName2 = "test"; + assert.equal(div.className, 'nulltest'); + + component.testName1 = undefined; + component.testName2 = "test"; + assert.equal(div.className, 'undefinedtest'); + + component.testName1 = undefined; + component.testName2 = undefined; + assert.equal(div.className, 'NaN'); + + component.testName1 = null; + component.testName2 = 1; + assert.equal(div.className, '1'); + + component.testName1 = undefined; + component.testName2 = 1; + assert.equal(div.className, 'NaN'); + + component.testName1 = null; + component.testName2 = 0; + assert.equal(div.className, '0'); + + component.testName1 = undefined; + component.testName2 = 0; + assert.equal(div.className, 'NaN'); + } +}; diff --git a/test/runtime/samples/attribute-null-func-classnames-no-style/main.svelte b/test/runtime/samples/attribute-null-func-classnames-no-style/main.svelte new file mode 100644 index 0000000000..e1cdf51412 --- /dev/null +++ b/test/runtime/samples/attribute-null-func-classnames-no-style/main.svelte @@ -0,0 +1,11 @@ + + +
    diff --git a/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js b/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js new file mode 100644 index 0000000000..22f7a4d7e2 --- /dev/null +++ b/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js @@ -0,0 +1,47 @@ +export default { + skip_if_ssr: true, + + props: { + testName1: "test1", + testName2: "test2", + }, + + html: `
    `, + + test({ assert, component, target }) { + const div = target.querySelector('div'); + assert.equal(div.className, 'test1test2 svelte-x1o6ra'); + + component.testName1 = null; + component.testName2 = null; + assert.equal(div.className, '0 svelte-x1o6ra'); + + component.testName1 = null; + component.testName2 = "test"; + assert.equal(div.className, 'nulltest svelte-x1o6ra'); + + component.testName1 = undefined; + component.testName2 = "test"; + assert.equal(div.className, 'undefinedtest svelte-x1o6ra'); + + component.testName1 = undefined; + component.testName2 = undefined; + assert.equal(div.className, 'NaN svelte-x1o6ra'); + + component.testName1 = null; + component.testName2 = 1; + assert.equal(div.className, '1 svelte-x1o6ra'); + + component.testName1 = undefined; + component.testName2 = 1; + assert.equal(div.className, 'NaN svelte-x1o6ra'); + + component.testName1 = null; + component.testName2 = 0; + assert.equal(div.className, '0 svelte-x1o6ra'); + + component.testName1 = undefined; + component.testName2 = 0; + assert.equal(div.className, 'NaN svelte-x1o6ra'); + } +}; diff --git a/test/runtime/samples/attribute-null-func-classnames-with-style/main.svelte b/test/runtime/samples/attribute-null-func-classnames-with-style/main.svelte new file mode 100644 index 0000000000..af43778365 --- /dev/null +++ b/test/runtime/samples/attribute-null-func-classnames-with-style/main.svelte @@ -0,0 +1,17 @@ + + + + +
    diff --git a/test/runtime/samples/attribute-null/_config.js b/test/runtime/samples/attribute-null/_config.js new file mode 100644 index 0000000000..938d525cf6 --- /dev/null +++ b/test/runtime/samples/attribute-null/_config.js @@ -0,0 +1,5 @@ +export default { + skip_if_ssr: true, + + html: `
    `, +}; diff --git a/test/runtime/samples/attribute-null/main.svelte b/test/runtime/samples/attribute-null/main.svelte new file mode 100644 index 0000000000..9b7f48eda3 --- /dev/null +++ b/test/runtime/samples/attribute-null/main.svelte @@ -0,0 +1 @@ +
    diff --git a/test/runtime/samples/attribute-undefined/_config.js b/test/runtime/samples/attribute-undefined/_config.js new file mode 100644 index 0000000000..938d525cf6 --- /dev/null +++ b/test/runtime/samples/attribute-undefined/_config.js @@ -0,0 +1,5 @@ +export default { + skip_if_ssr: true, + + html: `
    `, +}; diff --git a/test/runtime/samples/attribute-undefined/main.svelte b/test/runtime/samples/attribute-undefined/main.svelte new file mode 100644 index 0000000000..5108aa873f --- /dev/null +++ b/test/runtime/samples/attribute-undefined/main.svelte @@ -0,0 +1 @@ +
    From 42717e893b91c6d398e2a405841a1bb1b35aa1f2 Mon Sep 17 00:00:00 2001 From: bre30kra69cs Date: Thu, 1 Aug 2019 15:58:50 +0300 Subject: [PATCH 457/510] ref spaces --- src/compiler/compile/render_dom/wrappers/Element/Attribute.ts | 1 - src/runtime/internal/utils.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts index 7c174acb46..eb242e994b 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts @@ -212,7 +212,6 @@ export default class AttributeWrapper { const classNameStringArray = this.render_attr(); - if (!isStyled || classNameStringArray.length !== 2) { return classNameStringArray.join(' + '); } diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 1aec30ef2f..3cef77e7be 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -92,4 +92,4 @@ export function once(fn) { export function class_name_resolver(nextClassName) { return nextClassName == undefined ? '' : nextClassName; -} \ No newline at end of file +} From c36318dd02347e306d554c564eb544271cc5b281 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 2 Aug 2019 07:49:03 -0400 Subject: [PATCH 458/510] failing test for #3285 --- test/runtime/samples/each-block-keyed-html/_config.js | 10 ++++++++++ test/runtime/samples/each-block-keyed-html/main.svelte | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/runtime/samples/each-block-keyed-html/_config.js create mode 100644 test/runtime/samples/each-block-keyed-html/main.svelte diff --git a/test/runtime/samples/each-block-keyed-html/_config.js b/test/runtime/samples/each-block-keyed-html/_config.js new file mode 100644 index 0000000000..536e54543e --- /dev/null +++ b/test/runtime/samples/each-block-keyed-html/_config.js @@ -0,0 +1,10 @@ +export default { + html: ` + JohnJill + `, + + test({ assert, component, target }) { + component.names = component.names.reverse(); + assert.htmlEqual(target.innerHTML, `JillJohn`); + } +}; diff --git a/test/runtime/samples/each-block-keyed-html/main.svelte b/test/runtime/samples/each-block-keyed-html/main.svelte new file mode 100644 index 0000000000..97c5f8c898 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-html/main.svelte @@ -0,0 +1,8 @@ + + +{#each names as name (name)} + {@html name} +{/each} + From 6d962c5d95578e655f82a105e42290aa33e21ee9 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 2 Aug 2019 09:11:02 -0400 Subject: [PATCH 459/510] make code style more consistent --- src/compiler/compile/nodes/Element.ts | 12 ++++-- src/compiler/compile/nodes/Text.ts | 2 + .../render_dom/wrappers/Element/Attribute.ts | 37 +++++++------------ src/runtime/internal/utils.ts | 4 +- 4 files changed, 26 insertions(+), 29 deletions(-) diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index a3030f52a5..c5f7852750 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -702,16 +702,20 @@ export default class Element extends Node { return this.name === 'audio' || this.name === 'video'; } - add_css_class(class_name = this.component.stylesheet.id) { + add_css_class() { + const { id } = this.component.stylesheet; + const class_attribute = this.attributes.find(a => a.name === 'class'); + if (class_attribute && !class_attribute.is_true) { if (class_attribute.chunks.length === 1 && class_attribute.chunks[0].type === 'Text') { - (class_attribute.chunks[0] as Text).data += ` ${class_name}`; + (class_attribute.chunks[0] as Text).data += ` ${id}`; } else { (class_attribute.chunks as Node[]).push( new Text(this.component, this, this.scope, { type: 'Text', - data: ` ${class_name}` + data: ` ${id}`, + synthetic: true }) ); } @@ -720,7 +724,7 @@ export default class Element extends Node { new Attribute(this.component, this, this.scope, { type: 'Attribute', name: 'class', - value: [{ type: 'Text', data: class_name }] + value: [{ type: 'Text', data: id, synthetic: true }] }) ); } diff --git a/src/compiler/compile/nodes/Text.ts b/src/compiler/compile/nodes/Text.ts index eff3efe06e..bfd28a5073 100644 --- a/src/compiler/compile/nodes/Text.ts +++ b/src/compiler/compile/nodes/Text.ts @@ -6,9 +6,11 @@ import { INode } from './interfaces'; export default class Text extends Node { type: 'Text'; data: string; + synthetic: boolean; constructor(component: Component, parent: INode, scope: TemplateScope, info: any) { super(component, parent, scope, info); this.data = info.data; + this.synthetic = info.synthetic || false; } } diff --git a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts index eb242e994b..f83b1f2acf 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts @@ -85,13 +85,13 @@ export default class AttributeWrapper { value = (this.node.chunks[0] as Expression).render(block); } else { // '{foo} {bar}' — treat as string concatenation - const attrPrefix = this.node.chunks[0].type === 'Text' ? '' : `"" + `; + const prefix = this.node.chunks[0].type === 'Text' ? '' : `"" + `; - const attrText = this.node.name === 'class' + const text = this.node.name === 'class' ? this.get_class_name_text() - : this.get_attr_text(); + : this.render_chunks().join(' + '); - value = `${attrPrefix}${attrText}`; + value = `${prefix}${text}`; } const is_select_value_attribute = @@ -206,36 +206,27 @@ export default class AttributeWrapper { } get_class_name_text() { - const isStyled = this.node.chunks - .filter((chunk) => chunk.type === 'Text') - .some((chunk: Text) => !chunk.start && !chunk.end); + const scoped_css = this.node.chunks.some((chunk: Text) => chunk.synthetic); + const rendered = this.render_chunks(); - const classNameStringArray = this.render_attr(); - - if (!isStyled || classNameStringArray.length !== 2) { - return classNameStringArray.join(' + '); + if (scoped_css && rendered.length === 2) { + // we have a situation like class={possiblyUndefined} + rendered[0] = `@null_to_empty(${rendered[0]})`; } - const targetToken = 0; - return classNameStringArray - .map((token, index) => index === targetToken ? `@class_name_resolver(${token})` : token) - .join(' + '); - } - - get_attr_text() { - return this.render_attr().join(' + '); + return rendered.join(' + '); } - render_attr() { + render_chunks() { return this.node.chunks.map((chunk) => { if (chunk.type === 'Text') { return stringify(chunk.data); } - const renderedChunk = chunk.render(); + const rendered = chunk.render(); return chunk.get_precedence() <= 13 - ? `(${renderedChunk})` - : renderedChunk; + ? `(${rendered})` + : rendered; }); } diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 3cef77e7be..47ada924ae 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -90,6 +90,6 @@ export function once(fn) { }; } -export function class_name_resolver(nextClassName) { - return nextClassName == undefined ? '' : nextClassName; +export function null_to_empty(value) { + return value == null ? '' : value; } From 886961b927da0f72eaee6a45a37cc3d1d16ade18 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 2 Aug 2019 09:11:22 -0400 Subject: [PATCH 460/510] remove unused code --- .../render_dom/wrappers/Element/index.ts | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/Element/index.ts b/src/compiler/compile/render_dom/wrappers/Element/index.ts index 9d3f60ac7e..b769eb7931 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/index.ts @@ -816,29 +816,4 @@ export default class ElementWrapper extends Wrapper { } }); } - - // todo: looks to be dead code copypasted from Element.add_css_class in src/compile/nodes/Element.ts - // add_css_class(class_name = this.component.stylesheet.id) { - // const class_attribute = this.attributes.find(a => a.name === 'class'); - // if (class_attribute && !class_attribute.is_true) { - // if (class_attribute.chunks.length === 1 && class_attribute.chunks[0].type === 'Text') { - // (class_attribute.chunks[0] as Text).data += ` ${class_name}`; - // } else { - // (class_attribute.chunks as Node[]).push( - // new Text(this.component, this, this.scope, { - // type: 'Text', - // data: ` ${class_name}` - // }) - // ); - // } - // } else { - // this.attributes.push( - // new Attribute(this.component, this, this.scope, { - // type: 'Attribute', - // name: 'class', - // value: [{ type: 'Text', data: class_name }] - // }) - // ); - // } - // } } From c53563b2073058205c6221a6ac7e57cdfaf66c8e Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 2 Aug 2019 09:33:20 -0400 Subject: [PATCH 461/510] failing SSR test, plus some adjacent changes --- src/compiler/compile/render_ssr/handlers/Element.ts | 3 +-- src/runtime/internal/ssr.ts | 2 +- test/runtime/samples/attribute-false/_config.js | 2 -- .../attribute-null-classname-no-style/_config.js | 2 -- .../attribute-null-classname-with-style/_config.js | 12 ++++-------- .../attribute-null-classnames-no-style/_config.js | 2 -- .../attribute-null-classnames-with-style/_config.js | 2 -- .../_config.js | 2 -- .../_config.js | 2 -- .../_config.js | 2 -- .../_config.js | 2 -- test/runtime/samples/attribute-null/_config.js | 2 -- test/runtime/samples/attribute-undefined/_config.js | 2 -- 13 files changed, 6 insertions(+), 31 deletions(-) diff --git a/src/compiler/compile/render_ssr/handlers/Element.ts b/src/compiler/compile/render_ssr/handlers/Element.ts index 0cd101df72..8b64361c4f 100644 --- a/src/compiler/compile/render_ssr/handlers/Element.ts +++ b/src/compiler/compile/render_ssr/handlers/Element.ts @@ -140,8 +140,7 @@ export default function(node: Element, renderer: Renderer, options: RenderOption } else if (attribute.chunks.length === 1 && attribute.chunks[0].type !== 'Text') { const { name } = attribute; const snippet = snip(attribute.chunks[0]); - - opening_tag += '${(v => v == null ? "" : ` ' + name + '="${@escape(' + snippet + ')}"`)(' + snippet + ')}'; + opening_tag += '${@add_attribute("' + name + '", ' + snippet + ')}'; } else { opening_tag += ` ${attribute.name}="${stringify_attribute(attribute, true)}"`; } diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts index 1ae1ae1d12..4bc06f4351 100644 --- a/src/runtime/internal/ssr.ts +++ b/src/runtime/internal/ssr.ts @@ -134,7 +134,7 @@ export function get_store_value(store: Readable): T | undefined { } export function add_attribute(name, value) { - if (!value) return ''; + if (value == null) return ''; return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(value) : `"${value}"`}`}`; } diff --git a/test/runtime/samples/attribute-false/_config.js b/test/runtime/samples/attribute-false/_config.js index 0f37392806..9fd08a2a48 100644 --- a/test/runtime/samples/attribute-false/_config.js +++ b/test/runtime/samples/attribute-false/_config.js @@ -1,5 +1,3 @@ export default { - skip_if_ssr: true, - html: `
    `, }; diff --git a/test/runtime/samples/attribute-null-classname-no-style/_config.js b/test/runtime/samples/attribute-null-classname-no-style/_config.js index e2098430e4..4a78b680ef 100644 --- a/test/runtime/samples/attribute-null-classname-no-style/_config.js +++ b/test/runtime/samples/attribute-null-classname-no-style/_config.js @@ -1,6 +1,4 @@ export default { - skip_if_ssr: true, - props: { testName: "testClassName" }, diff --git a/test/runtime/samples/attribute-null-classname-with-style/_config.js b/test/runtime/samples/attribute-null-classname-with-style/_config.js index 635dd058ca..3ebc593b5d 100644 --- a/test/runtime/samples/attribute-null-classname-with-style/_config.js +++ b/test/runtime/samples/attribute-null-classname-with-style/_config.js @@ -1,15 +1,8 @@ export default { - skip_if_ssr: true, - - props: { - testName: "testClassName" - }, - - html: `
    `, + html: `
    `, test({ assert, component, target }) { const div = target.querySelector('div'); - assert.equal(div.className, 'testClassName svelte-x1o6ra'); component.testName = null; assert.equal(div.className, ' svelte-x1o6ra'); @@ -40,5 +33,8 @@ export default { component.testName = ''; assert.equal(div.className, ' svelte-x1o6ra'); + + component.testName = 'testClassName'; + assert.equal(div.className, 'testClassName svelte-x1o6ra'); } }; diff --git a/test/runtime/samples/attribute-null-classnames-no-style/_config.js b/test/runtime/samples/attribute-null-classnames-no-style/_config.js index 6a734efff5..917cf565c0 100644 --- a/test/runtime/samples/attribute-null-classnames-no-style/_config.js +++ b/test/runtime/samples/attribute-null-classnames-no-style/_config.js @@ -1,6 +1,4 @@ export default { - skip_if_ssr: true, - props: { testName1: "test1", testName2: "test2", diff --git a/test/runtime/samples/attribute-null-classnames-with-style/_config.js b/test/runtime/samples/attribute-null-classnames-with-style/_config.js index 22f7a4d7e2..5762f628fb 100644 --- a/test/runtime/samples/attribute-null-classnames-with-style/_config.js +++ b/test/runtime/samples/attribute-null-classnames-with-style/_config.js @@ -1,6 +1,4 @@ export default { - skip_if_ssr: true, - props: { testName1: "test1", testName2: "test2", diff --git a/test/runtime/samples/attribute-null-func-classname-no-style/_config.js b/test/runtime/samples/attribute-null-func-classname-no-style/_config.js index e2098430e4..4a78b680ef 100644 --- a/test/runtime/samples/attribute-null-func-classname-no-style/_config.js +++ b/test/runtime/samples/attribute-null-func-classname-no-style/_config.js @@ -1,6 +1,4 @@ export default { - skip_if_ssr: true, - props: { testName: "testClassName" }, diff --git a/test/runtime/samples/attribute-null-func-classname-with-style/_config.js b/test/runtime/samples/attribute-null-func-classname-with-style/_config.js index 635dd058ca..1ed43d05b9 100644 --- a/test/runtime/samples/attribute-null-func-classname-with-style/_config.js +++ b/test/runtime/samples/attribute-null-func-classname-with-style/_config.js @@ -1,6 +1,4 @@ export default { - skip_if_ssr: true, - props: { testName: "testClassName" }, diff --git a/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js b/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js index 6a734efff5..917cf565c0 100644 --- a/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js +++ b/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js @@ -1,6 +1,4 @@ export default { - skip_if_ssr: true, - props: { testName1: "test1", testName2: "test2", diff --git a/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js b/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js index 22f7a4d7e2..5762f628fb 100644 --- a/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js +++ b/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js @@ -1,6 +1,4 @@ export default { - skip_if_ssr: true, - props: { testName1: "test1", testName2: "test2", diff --git a/test/runtime/samples/attribute-null/_config.js b/test/runtime/samples/attribute-null/_config.js index 938d525cf6..ae2f0a8af6 100644 --- a/test/runtime/samples/attribute-null/_config.js +++ b/test/runtime/samples/attribute-null/_config.js @@ -1,5 +1,3 @@ export default { - skip_if_ssr: true, - html: `
    `, }; diff --git a/test/runtime/samples/attribute-undefined/_config.js b/test/runtime/samples/attribute-undefined/_config.js index 938d525cf6..ae2f0a8af6 100644 --- a/test/runtime/samples/attribute-undefined/_config.js +++ b/test/runtime/samples/attribute-undefined/_config.js @@ -1,5 +1,3 @@ export default { - skip_if_ssr: true, - html: `
    `, }; From 276eb8e553422a2377832876fd48bb3526236691 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 2 Aug 2019 12:24:07 -0400 Subject: [PATCH 462/510] fix erroneous a11y warning with input type='image' (#3331) --- src/compiler/compile/nodes/Element.ts | 11 ++++++----- test/validator/samples/a11y-alt-text/input.svelte | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index a3030f52a5..999b4df8e1 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -451,11 +451,12 @@ export default class Element extends Node { if (this.name === 'input') { const type = attribute_map.get('type'); if (type && type.get_static_value() === 'image') { - should_have_attribute( - this, - ['alt', 'aria-label', 'aria-labelledby'], - 'input type="image"' - ); + const required_attributes = ['alt', 'aria-label', 'aria-labelledby']; + const has_attribute = required_attributes.some(name => attribute_map.has(name)); + + if (!has_attribute) { + should_have_attribute(this, required_attributes, 'input type="image"'); + } } } } diff --git a/test/validator/samples/a11y-alt-text/input.svelte b/test/validator/samples/a11y-alt-text/input.svelte index f17638af76..1c3b5ac5ce 100644 --- a/test/validator/samples/a11y-alt-text/input.svelte +++ b/test/validator/samples/a11y-alt-text/input.svelte @@ -6,4 +6,6 @@ - \ No newline at end of file + + + From bfa0bc98b7b37ec693585b424e86a49f22e149a3 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 2 Aug 2019 16:47:26 -0400 Subject: [PATCH 463/510] preserve async/generator-ness of hoisted function expressions (#3179) --- src/compiler/compile/nodes/shared/Expression.ts | 2 +- test/runtime/samples/event-handler-async/_config.js | 5 +++++ test/runtime/samples/event-handler-async/main.svelte | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/event-handler-async/_config.js create mode 100644 test/runtime/samples/event-handler-async/main.svelte diff --git a/src/compiler/compile/nodes/shared/Expression.ts b/src/compiler/compile/nodes/shared/Expression.ts index 3702800c7b..938cd8433f 100644 --- a/src/compiler/compile/nodes/shared/Expression.ts +++ b/src/compiler/compile/nodes/shared/Expression.ts @@ -363,7 +363,7 @@ export default class Expression { } const fn = deindent` - function ${name}(${args.join(', ')}) ${body} + ${node.async && 'async '}function${node.generator && '*'} ${name}(${args.join(', ')}) ${body} `; if (dependencies.size === 0 && contextual_dependencies.size === 0) { diff --git a/test/runtime/samples/event-handler-async/_config.js b/test/runtime/samples/event-handler-async/_config.js new file mode 100644 index 0000000000..fab4d998b6 --- /dev/null +++ b/test/runtime/samples/event-handler-async/_config.js @@ -0,0 +1,5 @@ +export default { + html: ` + + `, +}; diff --git a/test/runtime/samples/event-handler-async/main.svelte b/test/runtime/samples/event-handler-async/main.svelte new file mode 100644 index 0000000000..b22a6af92e --- /dev/null +++ b/test/runtime/samples/event-handler-async/main.svelte @@ -0,0 +1 @@ + From b44a876ff4807c5d7876b28bc8dc9aeb119f8e6e Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 2 Aug 2019 18:40:48 -0400 Subject: [PATCH 464/510] make raf a noop on server (#3324) --- src/runtime/internal/environment.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/internal/environment.ts b/src/runtime/internal/environment.ts index a1d50b5521..7123399180 100644 --- a/src/runtime/internal/environment.ts +++ b/src/runtime/internal/environment.ts @@ -1,10 +1,12 @@ +import { noop } from './utils'; + export const is_client = typeof window !== 'undefined'; export let now: () => number = is_client ? () => window.performance.now() : () => Date.now(); -export let raf = cb => requestAnimationFrame(cb); +export let raf = is_client ? cb => requestAnimationFrame(cb) : noop; // used internally for testing export function set_now(fn) { From 45a54c1aa4ef7221bff85dcbf14592f3afdbb3ce Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 2 Aug 2019 19:31:04 -0400 Subject: [PATCH 465/510] use bindings when matching attribute selector against element (#3281) --- src/compiler/compile/css/Selector.ts | 2 ++ test/css/samples/attribute-selector-bind/expected.css | 1 + test/css/samples/attribute-selector-bind/input.svelte | 11 +++++++++++ 3 files changed, 14 insertions(+) create mode 100644 test/css/samples/attribute-selector-bind/expected.css create mode 100644 test/css/samples/attribute-selector-bind/input.svelte diff --git a/src/compiler/compile/css/Selector.ts b/src/compiler/compile/css/Selector.ts index ef54f789fc..0d4ea82bb5 100644 --- a/src/compiler/compile/css/Selector.ts +++ b/src/compiler/compile/css/Selector.ts @@ -219,6 +219,8 @@ function attribute_matches(node: Node, name: string, expected_value: string, ope const spread = node.attributes.find(attr => attr.type === 'Spread'); if (spread) return true; + if (node.bindings.some((binding: Node) => binding.name === name)) return true; + const attr = node.attributes.find((attr: Node) => attr.name === name); if (!attr) return false; if (attr.is_true) return operator === null; diff --git a/test/css/samples/attribute-selector-bind/expected.css b/test/css/samples/attribute-selector-bind/expected.css new file mode 100644 index 0000000000..20543c5c8e --- /dev/null +++ b/test/css/samples/attribute-selector-bind/expected.css @@ -0,0 +1 @@ +details[open].svelte-xyz{color:red} \ No newline at end of file diff --git a/test/css/samples/attribute-selector-bind/input.svelte b/test/css/samples/attribute-selector-bind/input.svelte new file mode 100644 index 0000000000..eb1d03e762 --- /dev/null +++ b/test/css/samples/attribute-selector-bind/input.svelte @@ -0,0 +1,11 @@ + + +
    Hello
    + + From c04def9081a89baf920e2e619beaa8e2e9539cb9 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 3 Aug 2019 00:30:38 -0400 Subject: [PATCH 466/510] don't warn when using each index in key (#3274) --- src/compiler/compile/nodes/EachBlock.ts | 10 +++++----- test/validator/samples/undefined-value/input.svelte | 10 +++++----- test/validator/samples/undefined-value/warnings.json | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/compiler/compile/nodes/EachBlock.ts b/src/compiler/compile/nodes/EachBlock.ts index adaa46b8db..225f3b441e 100644 --- a/src/compiler/compile/nodes/EachBlock.ts +++ b/src/compiler/compile/nodes/EachBlock.ts @@ -83,16 +83,16 @@ export default class EachBlock extends AbstractBlock { this.scope.add(context.key.name, this.expression.dependencies, this); }); - this.key = info.key - ? new Expression(component, this, this.scope, info.key) - : null; - if (this.index) { // index can only change if this is a keyed each block - const dependencies = this.key ? this.expression.dependencies : new Set([]); + const dependencies = info.key ? this.expression.dependencies : new Set([]); this.scope.add(this.index, dependencies, this); } + this.key = info.key + ? new Expression(component, this, this.scope, info.key) + : null; + this.has_animation = false; this.children = map_children(component, this, this.scope, info.children); diff --git a/test/validator/samples/undefined-value/input.svelte b/test/validator/samples/undefined-value/input.svelte index 03dda2c44f..0dec9632a7 100644 --- a/test/validator/samples/undefined-value/input.svelte +++ b/test/validator/samples/undefined-value/input.svelte @@ -1,6 +1,6 @@ - -

    {potato}

    -

    {Math.max(1, 2)}

    \ No newline at end of file +

    {Math.max(1, 2)}

    + +{#each window.something as foo, i (foo.x + i)} + hello +{/each} diff --git a/test/validator/samples/undefined-value/warnings.json b/test/validator/samples/undefined-value/warnings.json index c1813e6ab0..790f83acfd 100644 --- a/test/validator/samples/undefined-value/warnings.json +++ b/test/validator/samples/undefined-value/warnings.json @@ -1,15 +1,15 @@ [{ "code": "missing-declaration", - "message": "'potato' is not defined", - "pos": 67, + "message": "'potato' is not defined. Consider adding a - -
    -
    \ No newline at end of file diff --git a/test/js/samples/dont-use-dataset-in-svg/expected.js b/test/js/samples/dont-use-dataset-in-svg/expected.js deleted file mode 100644 index 0862d1bbc6..0000000000 --- a/test/js/samples/dont-use-dataset-in-svg/expected.js +++ /dev/null @@ -1,66 +0,0 @@ -/* generated by Svelte vX.Y.Z */ -import { - SvelteComponent, - append, - attr, - detach, - init, - insert, - noop, - safe_not_equal, - svg_element -} from "svelte/internal"; - -function create_fragment(ctx) { - var svg, g0, g1; - - return { - c() { - svg = svg_element("svg"); - g0 = svg_element("g"); - g1 = svg_element("g"); - attr(g0, "data-foo", "bar"); - attr(g1, "data-foo", ctx.bar); - }, - - m(target, anchor) { - insert(target, svg, anchor); - append(svg, g0); - append(svg, g1); - }, - - p(changed, ctx) { - if (changed.bar) { - attr(g1, "data-foo", ctx.bar); - } - }, - - i: noop, - o: noop, - - d(detaching) { - if (detaching) { - detach(svg); - } - } - }; -} - -function instance($$self, $$props, $$invalidate) { - let { bar } = $$props; - - $$self.$set = $$props => { - if ('bar' in $$props) $$invalidate('bar', bar = $$props.bar); - }; - - return { bar }; -} - -class Component extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance, create_fragment, safe_not_equal, ["bar"]); - } -} - -export default Component; \ No newline at end of file diff --git a/test/js/samples/dont-use-dataset-in-svg/input.svelte b/test/js/samples/dont-use-dataset-in-svg/input.svelte deleted file mode 100644 index 969377de33..0000000000 --- a/test/js/samples/dont-use-dataset-in-svg/input.svelte +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - \ No newline at end of file From 016158b692108f6b6b3d02d34e1e1870bc214ec7 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 3 Aug 2019 17:01:21 -0400 Subject: [PATCH 482/510] more robust handling of html tags - fixes #3285 --- .../render_dom/wrappers/RawMustacheTag.ts | 103 +++++------------- .../compile/render_dom/wrappers/shared/Tag.ts | 2 +- src/runtime/internal/dom.ts | 36 ++++++ .../each-block-changed-check/expected.js | 12 +- test/runtime/samples/raw-mustaches/_config.js | 8 +- 5 files changed, 72 insertions(+), 89 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts b/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts index f85c48935e..8b99861a2f 100644 --- a/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts +++ b/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts @@ -2,7 +2,6 @@ import Renderer from '../Renderer'; import Block from '../Block'; import Tag from './shared/Tag'; import Wrapper from './shared/Wrapper'; -import deindent from '../../utils/deindent'; import MustacheTag from '../../nodes/MustacheTag'; import RawMustacheTag from '../../nodes/RawMustacheTag'; @@ -19,95 +18,47 @@ export default class RawMustacheTagWrapper extends Tag { this.cannot_use_innerhtml(); } - render(block: Block, parent_node: string, parent_nodes: string) { - const name = this.var; - + render(block: Block, parent_node: string, _parent_nodes: string) { const in_head = parent_node === '@_document.head'; - const needs_anchors = !parent_node || in_head; - - // if in head always needs anchors - if (in_head) { - this.prev = null; - this.next = null; - } - // TODO use is_dom_node instead of type === 'Element'? - const needs_anchor_before = this.prev ? this.prev.node.type !== 'Element' : needs_anchors; - const needs_anchor_after = this.next ? this.next.node.type !== 'Element' : needs_anchors; + const can_use_innerhtml = !in_head && parent_node && !this.prev && !this.next; - const anchor_before = needs_anchor_before - ? block.get_unique_name(`${name}_before`) - : (this.prev && this.prev.var) || 'null'; + if (can_use_innerhtml) { + const insert = content => `${parent_node}.innerHTML = ${content};`; - const anchor_after = needs_anchor_after - ? block.get_unique_name(`${name}_after`) - : (this.next && this.next.var) || 'null'; - - let detach: string; - let insert: (content: string) => string; - let use_innerhtml = false; + const { init } = this.rename_this_method( + block, + content => insert(content) + ); - if (anchor_before === 'null' && anchor_after === 'null') { - use_innerhtml = true; - detach = `${parent_node}.innerHTML = '';`; - insert = content => `${parent_node}.innerHTML = ${content};`; - } else if (anchor_before === 'null') { - detach = `@detach_before(${anchor_after});`; - insert = content => `${anchor_after}.insertAdjacentHTML("beforebegin", ${content});`; - } else if (anchor_after === 'null') { - detach = `@detach_after(${anchor_before});`; - insert = content => `${anchor_before}.insertAdjacentHTML("afterend", ${content});`; - } else { - detach = `@detach_between(${anchor_before}, ${anchor_after});`; - insert = content => `${anchor_before}.insertAdjacentHTML("afterend", ${content});`; + block.builders.mount.add_line(insert(init)); } - const { init } = this.rename_this_method( - block, - content => deindent` - ${!use_innerhtml && detach} - ${insert(content)} - ` - ); + else { + const needs_anchor = in_head || (this.next && !this.next.is_dom_node()); - // we would have used comments here, but the `insertAdjacentHTML` api only - // exists for `Element`s. - if (needs_anchor_before) { - block.add_element( - anchor_before, - `@element('noscript')`, - parent_nodes && `@element('noscript')`, - parent_node, - true - ); - } + const html_tag = block.get_unique_name('html_tag'); + const html_anchor = needs_anchor && block.get_unique_name('html_anchor'); + + block.add_variable(html_tag); - function add_anchor_after() { - block.add_element( - anchor_after, - `@element('noscript')`, - parent_nodes && `@element('noscript')`, - parent_node + const { init } = this.rename_this_method( + block, + content => `${html_tag}.p(${content});` ); - } - if (needs_anchor_after && anchor_before === 'null') { - // anchor_after needs to be in the DOM before we - // insert the HTML... - add_anchor_after(); - } + const anchor = in_head ? 'null' : needs_anchor ? html_anchor : this.next ? this.next.var : 'null'; - block.builders.mount.add_line(insert(init)); + block.builders.hydrate.add_line(`${html_tag} = new @HtmlTag(${init}, ${anchor});`); + block.builders.mount.add_line(`${html_tag}.m(${parent_node || '#target'}, anchor);`); - if (needs_anchors) { - block.builders.destroy.add_conditional('detaching', needs_anchor_before - ? `${detach}\n@detach(${anchor_before});` - : detach); - } + if (needs_anchor) { + block.add_element(html_anchor, '@empty()', '@empty()', parent_node); + } - if (needs_anchor_after && anchor_before !== 'null') { - // ...otherwise it should go afterwards - add_anchor_after(); + if (!parent_node || in_head) { + block.builders.destroy.add_conditional('detaching', `${html_tag}.d();`); + } } } } diff --git a/src/compiler/compile/render_dom/wrappers/shared/Tag.ts b/src/compiler/compile/render_dom/wrappers/shared/Tag.ts index 27e5f1f03f..89567cbc30 100644 --- a/src/compiler/compile/render_dom/wrappers/shared/Tag.ts +++ b/src/compiler/compile/render_dom/wrappers/shared/Tag.ts @@ -34,7 +34,7 @@ export default class Tag extends Wrapper { const update_cached_value = `${value} !== (${value} = ${snippet})`; - const condition =this.node.should_cache + const condition = this.node.should_cache ? `(${changed_check}) && ${update_cached_value}` : changed_check; diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index 452347dc29..a6c41a63c7 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -257,3 +257,39 @@ export function custom_event(type: string, detail?: T) { e.initCustomEvent(type, false, false, detail); return e; } + +export class HtmlTag { + e: HTMLElement; + n: ChildNode[]; + t: HTMLElement; + a: HTMLElement; + + constructor(html: string, anchor: HTMLElement = null) { + this.e = element('div'); + this.a = anchor; + this.u(html); + } + + m(target: HTMLElement, anchor: HTMLElement) { + for (let i = 0; i < this.n.length; i += 1) { + insert(target, this.n[i], anchor); + } + + this.t = target; + } + + u(html: string) { + this.e.innerHTML = html; + this.n = Array.from(this.e.childNodes); + } + + p(html: string) { + this.d(); + this.u(html); + this.m(this.t, this.a); + } + + d() { + this.n.forEach(detach); + } +} \ No newline at end of file diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index b4d4577df3..6c72bcfae6 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -1,11 +1,11 @@ /* generated by Svelte vX.Y.Z */ import { + HtmlTag, SvelteComponent, append, attr, destroy_each, detach, - detach_after, element, init, insert, @@ -25,7 +25,7 @@ function get_each_context(ctx, list, i) { // (8:0) {#each comments as comment, i} function create_each_block(ctx) { - var div, strong, t0, t1, span, t2_value = ctx.comment.author, t2, t3, t4_value = ctx.elapsed(ctx.comment.time, ctx.time), t4, t5, t6, raw_value = ctx.comment.html, raw_before; + var div, strong, t0, t1, span, t2_value = ctx.comment.author, t2, t3, t4_value = ctx.elapsed(ctx.comment.time, ctx.time), t4, t5, t6, html_tag, raw_value = ctx.comment.html; return { c() { @@ -39,8 +39,8 @@ function create_each_block(ctx) { t4 = text(t4_value); t5 = text(" ago:"); t6 = space(); - raw_before = element('noscript'); attr(span, "class", "meta"); + html_tag = new HtmlTag(raw_value, null); attr(div, "class", "comment"); }, @@ -55,8 +55,7 @@ function create_each_block(ctx) { append(span, t4); append(span, t5); append(div, t6); - append(div, raw_before); - raw_before.insertAdjacentHTML("afterend", raw_value); + html_tag.m(div, anchor); }, p(changed, ctx) { @@ -69,8 +68,7 @@ function create_each_block(ctx) { } if ((changed.comments) && raw_value !== (raw_value = ctx.comment.html)) { - detach_after(raw_before); - raw_before.insertAdjacentHTML("afterend", raw_value); + html_tag.p(raw_value); } }, diff --git a/test/runtime/samples/raw-mustaches/_config.js b/test/runtime/samples/raw-mustaches/_config.js index c81e2c5cd0..cc9999aa34 100644 --- a/test/runtime/samples/raw-mustaches/_config.js +++ b/test/runtime/samples/raw-mustaches/_config.js @@ -1,5 +1,3 @@ -const ns = ''; - export default { skip_if_ssr: true, @@ -7,13 +5,13 @@ export default { raw: 'raw html!!!\\o/' }, - html: `before${ns}raw html!!!\\o/${ns}after`, + html: `beforeraw html!!!\\o/after`, test({ assert, component, target }) { component.raw = ''; - assert.equal(target.innerHTML, `before${ns}${ns}after`); + assert.equal(target.innerHTML, `beforeafter`); component.raw = 'how about unclosed elements?'; - assert.equal(target.innerHTML, `before${ns}how about unclosed elements?${ns}after`); + assert.equal(target.innerHTML, `beforehow about unclosed elements?after`); component.$destroy(); assert.equal(target.innerHTML, ''); } From 4d0256874e08580c2ffb2ae0b74f305e4da434e8 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 3 Aug 2019 17:03:09 -0400 Subject: [PATCH 483/510] remove unused helpers --- src/runtime/internal/dom.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index a6c41a63c7..b5123ba48d 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -10,24 +10,6 @@ export function detach(node: Node) { node.parentNode.removeChild(node); } -export function detach_between(before: Node, after: Node) { - while (before.nextSibling && before.nextSibling !== after) { - before.parentNode.removeChild(before.nextSibling); - } -} - -export function detach_before(after: Node) { - while (after.previousSibling) { - after.parentNode.removeChild(after.previousSibling); - } -} - -export function detach_after(before: Node) { - while (before.nextSibling) { - before.parentNode.removeChild(before.nextSibling); - } -} - export function destroy_each(iterations, detaching) { for (let i = 0; i < iterations.length; i += 1) { if (iterations[i]) iterations[i].d(detaching); From 03e6338920ba906d8473026a5ef7a1d624d496bc Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 3 Aug 2019 17:12:20 -0400 Subject: [PATCH 484/510] add test for #3326 --- test/runtime/samples/raw-mustache-before-element/_config.js | 3 +++ test/runtime/samples/raw-mustache-before-element/main.svelte | 1 + 2 files changed, 4 insertions(+) create mode 100644 test/runtime/samples/raw-mustache-before-element/_config.js create mode 100644 test/runtime/samples/raw-mustache-before-element/main.svelte diff --git a/test/runtime/samples/raw-mustache-before-element/_config.js b/test/runtime/samples/raw-mustache-before-element/_config.js new file mode 100644 index 0000000000..61288cbb52 --- /dev/null +++ b/test/runtime/samples/raw-mustache-before-element/_config.js @@ -0,0 +1,3 @@ +export default { + html: `

    xbaz

    ` +}; diff --git a/test/runtime/samples/raw-mustache-before-element/main.svelte b/test/runtime/samples/raw-mustache-before-element/main.svelte new file mode 100644 index 0000000000..69c1d0107d --- /dev/null +++ b/test/runtime/samples/raw-mustache-before-element/main.svelte @@ -0,0 +1 @@ +

    {@html 'x'}baz

    \ No newline at end of file From 4c8f3a296c91504d9a3f7f8d5da7b8555a46091a Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 3 Aug 2019 21:19:40 -0400 Subject: [PATCH 485/510] throw error if $ is referenced as global - fixes #3272 --- src/compiler/compile/Component.ts | 15 ++++++++++++++- .../samples/dollar-global-in-markup/errors.json | 15 +++++++++++++++ .../samples/dollar-global-in-markup/input.svelte | 1 + .../samples/dollar-global-in-script/errors.json | 15 +++++++++++++++ .../samples/dollar-global-in-script/input.svelte | 3 +++ 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 test/validator/samples/dollar-global-in-markup/errors.json create mode 100644 test/validator/samples/dollar-global-in-markup/input.svelte create mode 100644 test/validator/samples/dollar-global-in-script/errors.json create mode 100644 test/validator/samples/dollar-global-in-script/input.svelte diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 5b08b795ce..2ce2852d7e 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -662,7 +662,7 @@ export default class Component { this.node_for_declaration.set(name, node); }); - globals.forEach((_node, name) => { + globals.forEach((node, name) => { if (this.var_lookup.has(name)) return; if (this.injected_reactive_declaration_vars.has(name)) { @@ -679,6 +679,13 @@ export default class Component { injected: true }); } else if (name[0] === '$') { + if (name === '$') { + this.error(node, { + code: 'illegal-global', + message: 'The $ sign is an illegal variable name' + }); + } + this.add_var({ name, injected: true, @@ -1239,6 +1246,12 @@ export default class Component { this.has_reactive_assignments = true; // TODO does this belong here? if (name[0] === '$') return; // $$props + if (name === '') { + this.error(node, { + code: 'illegal-global', + message: 'The $ sign is an illegal variable name' + }); + } } if (this.var_lookup.has(name) && !this.var_lookup.get(name).global) return; diff --git a/test/validator/samples/dollar-global-in-markup/errors.json b/test/validator/samples/dollar-global-in-markup/errors.json new file mode 100644 index 0000000000..6447844f5c --- /dev/null +++ b/test/validator/samples/dollar-global-in-markup/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "illegal-global", + "message": "The $ sign is an illegal variable name", + "pos": 1, + "start": { + "line": 1, + "column": 1, + "character": 1 + }, + "end": { + "line": 1, + "column": 2, + "character": 2 + } +}] \ No newline at end of file diff --git a/test/validator/samples/dollar-global-in-markup/input.svelte b/test/validator/samples/dollar-global-in-markup/input.svelte new file mode 100644 index 0000000000..f6b2dceee5 --- /dev/null +++ b/test/validator/samples/dollar-global-in-markup/input.svelte @@ -0,0 +1 @@ +{$} \ No newline at end of file diff --git a/test/validator/samples/dollar-global-in-script/errors.json b/test/validator/samples/dollar-global-in-script/errors.json new file mode 100644 index 0000000000..a9fe6bb5d8 --- /dev/null +++ b/test/validator/samples/dollar-global-in-script/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "illegal-global", + "message": "The $ sign is an illegal variable name", + "pos": 10, + "start": { + "line": 2, + "column": 1, + "character": 10 + }, + "end": { + "line": 2, + "column": 2, + "character": 11 + } +}] \ No newline at end of file diff --git a/test/validator/samples/dollar-global-in-script/input.svelte b/test/validator/samples/dollar-global-in-script/input.svelte new file mode 100644 index 0000000000..a06da03657 --- /dev/null +++ b/test/validator/samples/dollar-global-in-script/input.svelte @@ -0,0 +1,3 @@ + \ No newline at end of file From 46cd6ff3707925071955ffc931671b630edf733c Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 4 Aug 2019 09:22:14 -0400 Subject: [PATCH 486/510] disallow global references to $$-prefixed vars --- src/compiler/compile/Component.ts | 18 ++++++++++-------- .../dollar-dollar-global-in-markup/errors.json | 15 +++++++++++++++ .../input.svelte | 1 + .../dollar-dollar-global-in-script/errors.json | 15 +++++++++++++++ .../input.svelte | 3 +++ .../dollar-global-in-markup/errors.json | 2 +- .../dollar-global-in-script/errors.json | 2 +- 7 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 test/validator/samples/dollar-dollar-global-in-markup/errors.json create mode 100644 test/validator/samples/dollar-dollar-global-in-markup/input.svelte create mode 100644 test/validator/samples/dollar-dollar-global-in-script/errors.json create mode 100644 test/validator/samples/dollar-dollar-global-in-script/input.svelte diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 2ce2852d7e..709db1447d 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -679,10 +679,10 @@ export default class Component { injected: true }); } else if (name[0] === '$') { - if (name === '$') { + if (name === '$' || name[1] === '$') { this.error(node, { code: 'illegal-global', - message: 'The $ sign is an illegal variable name' + message: `${name} is an illegal variable name` }); } @@ -1242,16 +1242,18 @@ export default class Component { warn_if_undefined(name: string, node, template_scope: TemplateScope) { if (name[0] === '$') { - name = name.slice(1); - this.has_reactive_assignments = true; // TODO does this belong here? - - if (name[0] === '$') return; // $$props - if (name === '') { + if (name === '$' || name[1] === '$' && name !== '$$props') { this.error(node, { code: 'illegal-global', - message: 'The $ sign is an illegal variable name' + message: `${name} is an illegal variable name` }); } + + this.has_reactive_assignments = true; // TODO does this belong here? + + if (name === '$$props') return; + + name = name.slice(1); } if (this.var_lookup.has(name) && !this.var_lookup.get(name).global) return; diff --git a/test/validator/samples/dollar-dollar-global-in-markup/errors.json b/test/validator/samples/dollar-dollar-global-in-markup/errors.json new file mode 100644 index 0000000000..4730c5152e --- /dev/null +++ b/test/validator/samples/dollar-dollar-global-in-markup/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "illegal-global", + "message": "$$billsyall is an illegal variable name", + "pos": 1, + "start": { + "line": 1, + "column": 1, + "character": 1 + }, + "end": { + "line": 1, + "column": 12, + "character": 12 + } +}] \ No newline at end of file diff --git a/test/validator/samples/dollar-dollar-global-in-markup/input.svelte b/test/validator/samples/dollar-dollar-global-in-markup/input.svelte new file mode 100644 index 0000000000..d197237056 --- /dev/null +++ b/test/validator/samples/dollar-dollar-global-in-markup/input.svelte @@ -0,0 +1 @@ +{$$billsyall} \ No newline at end of file diff --git a/test/validator/samples/dollar-dollar-global-in-script/errors.json b/test/validator/samples/dollar-dollar-global-in-script/errors.json new file mode 100644 index 0000000000..5c923e35f7 --- /dev/null +++ b/test/validator/samples/dollar-dollar-global-in-script/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "illegal-global", + "message": "$$billsyall is an illegal variable name", + "pos": 10, + "start": { + "line": 2, + "column": 1, + "character": 10 + }, + "end": { + "line": 2, + "column": 12, + "character": 21 + } +}] \ No newline at end of file diff --git a/test/validator/samples/dollar-dollar-global-in-script/input.svelte b/test/validator/samples/dollar-dollar-global-in-script/input.svelte new file mode 100644 index 0000000000..9f7fc06a7d --- /dev/null +++ b/test/validator/samples/dollar-dollar-global-in-script/input.svelte @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/validator/samples/dollar-global-in-markup/errors.json b/test/validator/samples/dollar-global-in-markup/errors.json index 6447844f5c..6cdf67e872 100644 --- a/test/validator/samples/dollar-global-in-markup/errors.json +++ b/test/validator/samples/dollar-global-in-markup/errors.json @@ -1,6 +1,6 @@ [{ "code": "illegal-global", - "message": "The $ sign is an illegal variable name", + "message": "$ is an illegal variable name", "pos": 1, "start": { "line": 1, diff --git a/test/validator/samples/dollar-global-in-script/errors.json b/test/validator/samples/dollar-global-in-script/errors.json index a9fe6bb5d8..2a6bd7ce7a 100644 --- a/test/validator/samples/dollar-global-in-script/errors.json +++ b/test/validator/samples/dollar-global-in-script/errors.json @@ -1,6 +1,6 @@ [{ "code": "illegal-global", - "message": "The $ sign is an illegal variable name", + "message": "$ is an illegal variable name", "pos": 10, "start": { "line": 2, From 0c9ed461961cbf195669fe17f7df4e07d7fb02c7 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 4 Aug 2019 09:48:20 -0400 Subject: [PATCH 487/510] correctly set mount anchor for HTML tags - fixes #2711 --- .../compile/render_dom/wrappers/RawMustacheTag.ts | 6 +++--- src/runtime/internal/dom.ts | 2 +- .../samples/each-block-changed-check/expected.js | 2 +- .../samples/each-block-keyed-html-b/_config.js | 14 ++++++++++++++ .../samples/each-block-keyed-html-b/main.svelte | 11 +++++++++++ 5 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 test/runtime/samples/each-block-keyed-html-b/_config.js create mode 100644 test/runtime/samples/each-block-keyed-html-b/main.svelte diff --git a/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts b/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts index 8b99861a2f..66610c7985 100644 --- a/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts +++ b/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts @@ -47,10 +47,10 @@ export default class RawMustacheTagWrapper extends Tag { content => `${html_tag}.p(${content});` ); - const anchor = in_head ? 'null' : needs_anchor ? html_anchor : this.next ? this.next.var : 'null'; + const update_anchor = in_head ? 'null' : needs_anchor ? html_anchor : this.next ? this.next.var : 'null'; - block.builders.hydrate.add_line(`${html_tag} = new @HtmlTag(${init}, ${anchor});`); - block.builders.mount.add_line(`${html_tag}.m(${parent_node || '#target'}, anchor);`); + block.builders.hydrate.add_line(`${html_tag} = new @HtmlTag(${init}, ${update_anchor});`); + block.builders.mount.add_line(`${html_tag}.m(${parent_node || '#target'}${parent_node ? '' : ', anchor'});`); if (needs_anchor) { block.add_element(html_anchor, '@empty()', '@empty()', parent_node); diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index b5123ba48d..6faf3d9c60 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -252,7 +252,7 @@ export class HtmlTag { this.u(html); } - m(target: HTMLElement, anchor: HTMLElement) { + m(target: HTMLElement, anchor: HTMLElement = null) { for (let i = 0; i < this.n.length; i += 1) { insert(target, this.n[i], anchor); } diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index 6c72bcfae6..f6c9d52dc4 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -55,7 +55,7 @@ function create_each_block(ctx) { append(span, t4); append(span, t5); append(div, t6); - html_tag.m(div, anchor); + html_tag.m(div); }, p(changed, ctx) { diff --git a/test/runtime/samples/each-block-keyed-html-b/_config.js b/test/runtime/samples/each-block-keyed-html-b/_config.js new file mode 100644 index 0000000000..6343a31769 --- /dev/null +++ b/test/runtime/samples/each-block-keyed-html-b/_config.js @@ -0,0 +1,14 @@ +export default { + html: ` +
    hello John
    +
    hello Jill
    + `, + + test({ assert, component, target }) { + component.names = component.names.reverse(); + assert.htmlEqual(target.innerHTML, ` +
    hello Jill
    +
    hello John
    + `); + } +}; diff --git a/test/runtime/samples/each-block-keyed-html-b/main.svelte b/test/runtime/samples/each-block-keyed-html-b/main.svelte new file mode 100644 index 0000000000..02955577fc --- /dev/null +++ b/test/runtime/samples/each-block-keyed-html-b/main.svelte @@ -0,0 +1,11 @@ + + +{#each names as name (name)} +
    + hello + {@html name} +
    +{/each} + From a3ab409be55f9bfe18fa6990a2340f4bff4dbbc1 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 4 Aug 2019 10:06:14 -0400 Subject: [PATCH 488/510] update #1844 test for v3 --- test/helpers.js | 3 ++- .../Nested.html | 3 --- .../Nested.svelte | 7 +++++++ .../main.html | 13 ------------- .../main.svelte | 7 +++++++ 5 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.html create mode 100644 test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.svelte delete mode 100644 test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.html create mode 100644 test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.svelte diff --git a/test/helpers.js b/test/helpers.js index 514d084698..e0c4c980ee 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -49,6 +49,8 @@ virtualConsole.sendTo(console); global.window = new jsdom.JSDOM('
    ', {virtualConsole}).window; global.document = window.document; +global.navigator = window.navigator; +global.getComputedStyle = window.getComputedStyle; global.requestAnimationFrame = null; // placeholder, filled in using set_raf // add missing ecmascript globals to window @@ -57,7 +59,6 @@ for (const key of Object.getOwnPropertyNames(global)) { } export function env() { - window._svelteTransitionManager = null; window.document.title = ''; window.document.body.innerHTML = '
    '; diff --git a/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.html b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.html deleted file mode 100644 index 6ddd61d4d1..0000000000 --- a/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - -

    diff --git a/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.svelte b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.svelte new file mode 100644 index 0000000000..68c17cbbe7 --- /dev/null +++ b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/Nested.svelte @@ -0,0 +1,7 @@ + + +

    + +

    diff --git a/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.html b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.html deleted file mode 100644 index 3f5fad9363..0000000000 --- a/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.html +++ /dev/null @@ -1,13 +0,0 @@ - - Hello - - - diff --git a/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.svelte b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.svelte new file mode 100644 index 0000000000..760c9e0356 --- /dev/null +++ b/test/runtime/samples/component-slot-binding-dimensions-destroys-cleanly/main.svelte @@ -0,0 +1,7 @@ + + + + Hello + From e3e3ad9be07aae3052077557ea6446e03ef1db34 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 4 Aug 2019 10:58:43 -0400 Subject: [PATCH 489/510] disable validation with magic comments --- src/compiler/compile/Component.ts | 18 +++++++++++ src/compiler/compile/nodes/Comment.ts | 6 ++++ .../compile/nodes/shared/map_children.ts | 11 +++++++ .../samples/ignore-warning/input.svelte | 7 ++++ .../samples/ignore-warning/warnings.json | 32 +++++++++++++++++++ .../ignore-warnings-cumulative/input.svelte | 17 ++++++++++ .../ignore-warnings-cumulative/warnings.json | 17 ++++++++++ .../ignore-warnings-newline/input.svelte | 8 +++++ .../ignore-warnings-newline/warnings.json | 17 ++++++++++ .../ignore-warnings-stacked/input.svelte | 8 +++++ .../ignore-warnings-stacked/warnings.json | 17 ++++++++++ .../samples/ignore-warnings/input.svelte | 7 ++++ .../samples/ignore-warnings/warnings.json | 17 ++++++++++ 13 files changed, 182 insertions(+) create mode 100644 test/validator/samples/ignore-warning/input.svelte create mode 100644 test/validator/samples/ignore-warning/warnings.json create mode 100644 test/validator/samples/ignore-warnings-cumulative/input.svelte create mode 100644 test/validator/samples/ignore-warnings-cumulative/warnings.json create mode 100644 test/validator/samples/ignore-warnings-newline/input.svelte create mode 100644 test/validator/samples/ignore-warnings-newline/warnings.json create mode 100644 test/validator/samples/ignore-warnings-stacked/input.svelte create mode 100644 test/validator/samples/ignore-warnings-stacked/warnings.json create mode 100644 test/validator/samples/ignore-warnings/input.svelte create mode 100644 test/validator/samples/ignore-warnings/warnings.json diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 5b08b795ce..28e8535c63 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -23,6 +23,7 @@ import get_object from './utils/get_object'; import unwrap_parens from './utils/unwrap_parens'; import Slot from './nodes/Slot'; import { Node as ESTreeNode } from 'estree'; +import add_to_set from './utils/add_to_set'; interface ComponentOptions { namespace?: string; @@ -70,6 +71,8 @@ function remove_node(code: MagicString, start: number, end: number, body: Node, export default class Component { stats: Stats; warnings: Warning[]; + ignores: Set; + ignore_stack: Set[] = []; ast: Ast; source: string; @@ -442,6 +445,10 @@ export default class Component { message: string; } ) { + if (this.ignores && this.ignores.has(warning.code)) { + return; + } + if (!this.locator) { this.locator = getLocator(this.source, { offsetLine: 1 }); } @@ -1253,6 +1260,17 @@ export default class Component { message }); } + + push_ignores(ignores) { + this.ignores = new Set(this.ignores || []); + add_to_set(this.ignores, ignores); + this.ignore_stack.push(this.ignores); + } + + pop_ignores() { + this.ignore_stack.pop(); + this.ignores = this.ignore_stack[this.ignore_stack.length - 1]; + } } function process_component_options(component: Component, nodes) { diff --git a/src/compiler/compile/nodes/Comment.ts b/src/compiler/compile/nodes/Comment.ts index 97a28f25a1..161150bd25 100644 --- a/src/compiler/compile/nodes/Comment.ts +++ b/src/compiler/compile/nodes/Comment.ts @@ -1,11 +1,17 @@ import Node from './shared/Node'; +const pattern = /^\s*svelte-ignore\s+([\s\S]+)\s*$/m; + export default class Comment extends Node { type: 'Comment'; data: string; + ignores: string[]; constructor(component, parent, scope, info) { super(component, parent, scope, info); this.data = info.data; + + const match = pattern.exec(this.data); + this.ignores = match ? match[1].split(/[^\S]/).map(x => x.trim()).filter(Boolean) : []; } } \ No newline at end of file diff --git a/src/compiler/compile/nodes/shared/map_children.ts b/src/compiler/compile/nodes/shared/map_children.ts index 71d764a889..4072b176e5 100644 --- a/src/compiler/compile/nodes/shared/map_children.ts +++ b/src/compiler/compile/nodes/shared/map_children.ts @@ -42,9 +42,20 @@ function get_constructor(type) { export default function map_children(component, parent, scope, children: Node[]) { let last = null; + let ignores = []; + return children.map(child => { const constructor = get_constructor(child.type); + + const use_ignores = child.type !== 'Text' && child.type !== 'Comment' && ignores.length; + + if (use_ignores) component.push_ignores(ignores); const node = new constructor(component, parent, scope, child); + if (use_ignores) component.pop_ignores(), ignores = []; + + if (node.type === 'Comment' && node.ignores.length) { + ignores.push(...node.ignores); + } if (last) last.next = node; node.prev = last; diff --git a/test/validator/samples/ignore-warning/input.svelte b/test/validator/samples/ignore-warning/input.svelte new file mode 100644 index 0000000000..c4e7556d74 --- /dev/null +++ b/test/validator/samples/ignore-warning/input.svelte @@ -0,0 +1,7 @@ + +
    + + but this is still discouraged +
    + + \ No newline at end of file diff --git a/test/validator/samples/ignore-warning/warnings.json b/test/validator/samples/ignore-warning/warnings.json new file mode 100644 index 0000000000..6123fafae8 --- /dev/null +++ b/test/validator/samples/ignore-warning/warnings.json @@ -0,0 +1,32 @@ +[ + { + "code": "a11y-distracting-elements", + "end": { + "character": 131, + "column": 49, + "line": 4 + }, + "message": "A11y: Avoid elements", + "pos": 83, + "start": { + "character": 83, + "column": 1, + "line": 4 + } + }, + { + "code": "a11y-missing-attribute", + "end": { + "character": 162, + "column": 22, + "line": 7 + }, + "message": "A11y: element should have an alt attribute", + "pos": 140, + "start": { + "character": 140, + "column": 0, + "line": 7 + } + } +] \ No newline at end of file diff --git a/test/validator/samples/ignore-warnings-cumulative/input.svelte b/test/validator/samples/ignore-warnings-cumulative/input.svelte new file mode 100644 index 0000000000..2843a890ce --- /dev/null +++ b/test/validator/samples/ignore-warnings-cumulative/input.svelte @@ -0,0 +1,17 @@ + +
    +
    + + +
    potato
    +
    +
    + + +
    + + +
    potato
    +
    +
    +
    \ No newline at end of file diff --git a/test/validator/samples/ignore-warnings-cumulative/warnings.json b/test/validator/samples/ignore-warnings-cumulative/warnings.json new file mode 100644 index 0000000000..3ab413824d --- /dev/null +++ b/test/validator/samples/ignore-warnings-cumulative/warnings.json @@ -0,0 +1,17 @@ +[ + { + "code": "a11y-distracting-elements", + "end": { + "character": 161, + "column": 12, + "line": 7 + }, + "message": "A11y: Avoid elements", + "pos": 104, + "start": { + "character": 104, + "column": 2, + "line": 5 + } + } +] \ No newline at end of file diff --git a/test/validator/samples/ignore-warnings-newline/input.svelte b/test/validator/samples/ignore-warnings-newline/input.svelte new file mode 100644 index 0000000000..c75a91c630 --- /dev/null +++ b/test/validator/samples/ignore-warnings-newline/input.svelte @@ -0,0 +1,8 @@ + +
    + + but this is still discouraged +
    + + \ No newline at end of file diff --git a/test/validator/samples/ignore-warnings-newline/warnings.json b/test/validator/samples/ignore-warnings-newline/warnings.json new file mode 100644 index 0000000000..8247468444 --- /dev/null +++ b/test/validator/samples/ignore-warnings-newline/warnings.json @@ -0,0 +1,17 @@ +[ + { + "code": "a11y-missing-attribute", + "end": { + "character": 207, + "column": 22, + "line": 8 + }, + "message": "A11y: element should have an alt attribute", + "pos": 185, + "start": { + "character": 185, + "column": 0, + "line": 8 + } + } +] \ No newline at end of file diff --git a/test/validator/samples/ignore-warnings-stacked/input.svelte b/test/validator/samples/ignore-warnings-stacked/input.svelte new file mode 100644 index 0000000000..c6edb7240a --- /dev/null +++ b/test/validator/samples/ignore-warnings-stacked/input.svelte @@ -0,0 +1,8 @@ + + +
    + + but this is still discouraged +
    + + \ No newline at end of file diff --git a/test/validator/samples/ignore-warnings-stacked/warnings.json b/test/validator/samples/ignore-warnings-stacked/warnings.json new file mode 100644 index 0000000000..dd647d7cb2 --- /dev/null +++ b/test/validator/samples/ignore-warnings-stacked/warnings.json @@ -0,0 +1,17 @@ +[ + { + "code": "a11y-missing-attribute", + "end": { + "character": 211, + "column": 22, + "line": 8 + }, + "message": "A11y: element should have an alt attribute", + "pos": 189, + "start": { + "character": 189, + "column": 0, + "line": 8 + } + } +] \ No newline at end of file diff --git a/test/validator/samples/ignore-warnings/input.svelte b/test/validator/samples/ignore-warnings/input.svelte new file mode 100644 index 0000000000..5fd7229f9a --- /dev/null +++ b/test/validator/samples/ignore-warnings/input.svelte @@ -0,0 +1,7 @@ + +
    + + but this is still discouraged +
    + + \ No newline at end of file diff --git a/test/validator/samples/ignore-warnings/warnings.json b/test/validator/samples/ignore-warnings/warnings.json new file mode 100644 index 0000000000..576dfe76f4 --- /dev/null +++ b/test/validator/samples/ignore-warnings/warnings.json @@ -0,0 +1,17 @@ +[ + { + "code": "a11y-missing-attribute", + "end": { + "character": 188, + "column": 22, + "line": 7 + }, + "message": "A11y: element should have an alt attribute", + "pos": 166, + "start": { + "character": 166, + "column": 0, + "line": 7 + } + } +] \ No newline at end of file From 8170d4f455a0ce036ef0ce633d90b4548285da20 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 4 Aug 2019 12:16:06 -0400 Subject: [PATCH 490/510] add docs --- site/content/docs/02-template-syntax.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 3d396f2f24..ae07c90993 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -111,6 +111,27 @@ Text can also contain JavaScript expressions: ``` +### Comments + +--- + +You can use HTML comments inside components. + +```html + +

    Hello world

    +``` + +--- + +Comments beginning with `svelte-ignore` disable warnings for the next block of markup. Usually these are accessibility warnings; make sure that you're disabling them for a good reason. + +```html + + +``` + + ### {#if ...} ```sv From 5f492b7fa6b116ab4ef6a0c8d56be2f3d1fd8dea Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 4 Aug 2019 12:19:38 -0400 Subject: [PATCH 491/510] Rename main.html to main.svelte --- .../samples/each-block-keyed-recursive/{main.html => main.svelte} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/runtime/samples/each-block-keyed-recursive/{main.html => main.svelte} (100%) diff --git a/test/runtime/samples/each-block-keyed-recursive/main.html b/test/runtime/samples/each-block-keyed-recursive/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-recursive/main.html rename to test/runtime/samples/each-block-keyed-recursive/main.svelte From 4a2bb526aed37a87566a6e652968ce5e96ef9dea Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 4 Aug 2019 12:34:26 -0400 Subject: [PATCH 492/510] oops --- src/runtime/internal/transitions.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/runtime/internal/transitions.ts b/src/runtime/internal/transitions.ts index 8e001c0aeb..951a6abbbf 100644 --- a/src/runtime/internal/transitions.ts +++ b/src/runtime/internal/transitions.ts @@ -65,15 +65,11 @@ export function transition_out(block, local: 0 | 1, detach: 0 | 1, callback) { } } -<<<<<<< HEAD:src/internal/transitions.js const null_transition = { duration: 0 }; -export function create_in_transition(node, fn, params) { -======= type TransitionFn = (node: Element, params: any) => TransitionConfig; export function create_in_transition(node: Element & ElementCSSInlineStyle, fn: TransitionFn, params: any) { ->>>>>>> master:src/runtime/internal/transitions.ts let config = fn(node, params); let running = false; let animation_name; From 60467f674c855b6c3b9c7e122256e7077724e7ef Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 4 Aug 2019 17:50:49 -0400 Subject: [PATCH 493/510] appease typescript --- src/runtime/internal/transitions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/internal/transitions.ts b/src/runtime/internal/transitions.ts index 951a6abbbf..9df4dd29b9 100644 --- a/src/runtime/internal/transitions.ts +++ b/src/runtime/internal/transitions.ts @@ -87,7 +87,7 @@ export function create_in_transition(node: Element & ElementCSSInlineStyle, fn: easing = linear, tick = noop, css - } = config || null_transition; + } = config || (null_transition as TransitionConfig); if (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++); tick(0, 1); @@ -166,7 +166,7 @@ export function create_out_transition(node: Element & ElementCSSInlineStyle, fn: easing = linear, tick = noop, css - } = config || null_transition; + } = config || (null_transition as TransitionConfig); if (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css); @@ -260,7 +260,7 @@ export function create_bidirectional_transition(node: Element & ElementCSSInline easing = linear, tick = noop, css - } = config || null_transition; + } = config || (null_transition as TransitionConfig); const program = { start: now() + delay, From c069aba49a0e9d9ee23012e121c785b5d572b123 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 4 Aug 2019 18:24:24 -0400 Subject: [PATCH 494/510] tidy types --- src/runtime/internal/transitions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/internal/transitions.ts b/src/runtime/internal/transitions.ts index 9df4dd29b9..ed23d3c1dd 100644 --- a/src/runtime/internal/transitions.ts +++ b/src/runtime/internal/transitions.ts @@ -65,7 +65,7 @@ export function transition_out(block, local: 0 | 1, detach: 0 | 1, callback) { } } -const null_transition = { duration: 0 }; +const null_transition: TransitionConfig = { duration: 0 }; type TransitionFn = (node: Element, params: any) => TransitionConfig; @@ -87,7 +87,7 @@ export function create_in_transition(node: Element & ElementCSSInlineStyle, fn: easing = linear, tick = noop, css - } = config || (null_transition as TransitionConfig); + } = config || null_transition; if (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++); tick(0, 1); @@ -166,7 +166,7 @@ export function create_out_transition(node: Element & ElementCSSInlineStyle, fn: easing = linear, tick = noop, css - } = config || (null_transition as TransitionConfig); + } = config || null_transition; if (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css); @@ -260,7 +260,7 @@ export function create_bidirectional_transition(node: Element & ElementCSSInline easing = linear, tick = noop, css - } = config || (null_transition as TransitionConfig); + } = config || null_transition; const program = { start: now() + delay, From 9addc5f07719d07a2e86d1e99d77b4ce24db0e81 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 4 Aug 2019 20:46:26 -0400 Subject: [PATCH 495/510] -> v3.7.0 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b58bd9645e..7c54df1c6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Svelte changelog +## 3.7.0 + +* Disable warnings via `svelte-ignore` comments ([#3351](https://github.com/sveltejs/svelte/pull/3351)) +* Throw if `$` or `$$...` is referenced as global ([#3272](https://github.com/sveltejs/svelte/issues/3272)) +* Remount HTML tags correctly ([#3329](https://github.com/sveltejs/svelte/pull/3329)) +* Treat data attributes like other attributes ([#3337](https://github.com/sveltejs/svelte/issues/3337)) + ## 3.6.11 * Handle reassigned RxJS observables ([#3304](https://github.com/sveltejs/svelte/issues/3304)) diff --git a/package.json b/package.json index 9ee2d85e9a..fac069aca5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.6.11", + "version": "3.7.0", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From 5266b537390282ddb20994595cd70ff9e938b372 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 4 Aug 2019 20:48:21 -0400 Subject: [PATCH 496/510] lint --- src/compiler/compile/Component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 5aeff019bd..355ad0c423 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -72,7 +72,7 @@ export default class Component { stats: Stats; warnings: Warning[]; ignores: Set; - ignore_stack: Set[] = []; + ignore_stack: Array> = []; ast: Ast; source: string; From eda4f90cdee476c67bda985d97e5ce6c4dd08774 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Mon, 5 Aug 2019 08:35:36 -0400 Subject: [PATCH 497/510] failing test for #3354 --- .../runtime/samples/component-slot-let-f/A.svelte | 9 +++++++++ .../runtime/samples/component-slot-let-f/B.svelte | 5 +++++ .../samples/component-slot-let-f/_config.js | 15 +++++++++++++++ .../samples/component-slot-let-f/main.svelte | 8 ++++++++ 4 files changed, 37 insertions(+) create mode 100644 test/runtime/samples/component-slot-let-f/A.svelte create mode 100644 test/runtime/samples/component-slot-let-f/B.svelte create mode 100644 test/runtime/samples/component-slot-let-f/_config.js create mode 100644 test/runtime/samples/component-slot-let-f/main.svelte diff --git a/test/runtime/samples/component-slot-let-f/A.svelte b/test/runtime/samples/component-slot-let-f/A.svelte new file mode 100644 index 0000000000..79428b13ec --- /dev/null +++ b/test/runtime/samples/component-slot-let-f/A.svelte @@ -0,0 +1,9 @@ + + + + {reflected} + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-f/B.svelte b/test/runtime/samples/component-slot-let-f/B.svelte new file mode 100644 index 0000000000..7a8dc596ba --- /dev/null +++ b/test/runtime/samples/component-slot-let-f/B.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-f/_config.js b/test/runtime/samples/component-slot-let-f/_config.js new file mode 100644 index 0000000000..74de38be02 --- /dev/null +++ b/test/runtime/samples/component-slot-let-f/_config.js @@ -0,0 +1,15 @@ +export default { + html: ` + 1 + 1 + `, + + async test({ assert, target, component }) { + component.x = 2; + + assert.htmlEqual(target.innerHTML, ` + 2 + 2 + `); + } +}; diff --git a/test/runtime/samples/component-slot-let-f/main.svelte b/test/runtime/samples/component-slot-let-f/main.svelte new file mode 100644 index 0000000000..71362d9b4e --- /dev/null +++ b/test/runtime/samples/component-slot-let-f/main.svelte @@ -0,0 +1,8 @@ + + + + {reflected} + \ No newline at end of file From b9f5e7f24940d72fd55509d7b19810a15e5ba2cd Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Mon, 5 Aug 2019 09:14:08 -0400 Subject: [PATCH 498/510] lil bit of housekeeping --- src/compiler/compile/render_dom/wrappers/Slot.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/Slot.ts b/src/compiler/compile/render_dom/wrappers/Slot.ts index 4dd23277fb..e072f5e4d0 100644 --- a/src/compiler/compile/render_dom/wrappers/Slot.ts +++ b/src/compiler/compile/render_dom/wrappers/Slot.ts @@ -105,7 +105,7 @@ export default class SlotWrapper extends Wrapper { } const slot = block.get_unique_name(`${sanitize(slot_name)}_slot`); - const slot_definition = block.get_unique_name(`${sanitize(slot_name)}_slot`); + const slot_definition = block.get_unique_name(`${sanitize(slot_name)}_slot_template`); block.builders.init.add_block(deindent` const ${slot_definition} = ctx.$$slots${quote_prop_if_necessary(slot_name)}; @@ -171,7 +171,10 @@ export default class SlotWrapper extends Wrapper { block.builders.update.add_block(deindent` if (${slot} && ${slot}.p && ${update_conditions}) { - ${slot}.p(@get_slot_changes(${slot_definition}, ctx, changed, ${get_slot_changes}), @get_slot_context(${slot_definition}, ctx, ${get_slot_context})); + ${slot}.p( + @get_slot_changes(${slot_definition}, ctx, changed, ${get_slot_changes}), + @get_slot_context(${slot_definition}, ctx, ${get_slot_context}) + ); } `); From bbbc7d25c57f0f3960e9dd5acb6b997559f2ed85 Mon Sep 17 00:00:00 2001 From: Daniel Berner Date: Mon, 5 Aug 2019 19:26:08 -0400 Subject: [PATCH 499/510] Fix typo --- site/content/tutorial/06-bindings/01-text-inputs/text.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/tutorial/06-bindings/01-text-inputs/text.md b/site/content/tutorial/06-bindings/01-text-inputs/text.md index 7bcbc96fa6..7bfe4bb86c 100644 --- a/site/content/tutorial/06-bindings/01-text-inputs/text.md +++ b/site/content/tutorial/06-bindings/01-text-inputs/text.md @@ -4,7 +4,7 @@ title: Text inputs As a general rule, data flow in Svelte is *top down* — a parent component can set props on a child component, and a component can set attributes on an element, but not the other way around. -Sometimes it's useful to break that rule. Take the case of the `` element in this component — we *could* add an `on:input` event handler that set the value of `name` to `event.target.value`, but it's a bit... boilerplatey. It gets even worse with other form elements, as we'll see. +Sometimes it's useful to break that rule. Take the case of the `` element in this component — we *could* add an `on:input` event handler that sets the value of `name` to `event.target.value`, but it's a bit... boilerplatey. It gets even worse with other form elements, as we'll see. Instead, we can use the `bind:value` directive: From 4b0ec650e9861fbc42b5ead940fc7dbdc4113e2d Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 6 Aug 2019 08:47:00 -0400 Subject: [PATCH 500/510] assume let variables are dynamic in slots - fixes #3354 --- src/compiler/compile/render_dom/wrappers/Slot.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/compile/render_dom/wrappers/Slot.ts b/src/compiler/compile/render_dom/wrappers/Slot.ts index e072f5e4d0..3585d27358 100644 --- a/src/compiler/compile/render_dom/wrappers/Slot.ts +++ b/src/compiler/compile/render_dom/wrappers/Slot.ts @@ -84,6 +84,7 @@ export default class SlotWrapper extends Wrapper { }); const dynamic_dependencies = Array.from(attribute.dependencies).filter(name => { + if (this.node.scope.is_let(name)) return true; const variable = renderer.component.var_lookup.get(name); return is_dynamic(variable); }); @@ -162,6 +163,7 @@ export default class SlotWrapper extends Wrapper { const dynamic_dependencies = Array.from(this.dependencies).filter(name => { if (name === '$$scope') return true; + if (this.node.scope.is_let(name)) return true; const variable = renderer.component.var_lookup.get(name); return is_dynamic(variable); }); From 2ef004e324c31585522c025b4026100960a1c0bc Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 6 Aug 2019 08:59:54 -0400 Subject: [PATCH 501/510] -> v3.7.1 --- CHANGELOG.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c54df1c6a..98353e8102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Svelte changelog +## 3.7.1 + +* Assume `let` variables are dynamic for slots ([#3354](https://github.com/sveltejs/svelte/issues/3354)) +* Allow transition functions to return nothing ([#2246](https://github.com/sveltejs/svelte/pull/2246)) + ## 3.7.0 * Disable warnings via `svelte-ignore` comments ([#3351](https://github.com/sveltejs/svelte/pull/3351)) diff --git a/package.json b/package.json index fac069aca5..857c2fc6a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.7.0", + "version": "3.7.1", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From 7342d484f15073141ab607b2154437884a95d0c4 Mon Sep 17 00:00:00 2001 From: Samuel Elgozi Date: Thu, 8 Aug 2019 01:57:47 +0300 Subject: [PATCH 502/510] feat: #3372 added a new `self` event modifier --- src/compiler/compile/nodes/Element.ts | 3 ++- .../render_dom/wrappers/shared/add_event_handlers.ts | 1 + src/runtime/internal/dom.ts | 8 ++++++++ .../validator/samples/event-modifiers-invalid/errors.json | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index 80b5c6df00..62bc620590 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -63,7 +63,8 @@ const valid_modifiers = new Set([ 'stopPropagation', 'capture', 'once', - 'passive' + 'passive', + 'self' ]); const passive_events = new Set([ diff --git a/src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts b/src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts index 6b7e62d212..06c679d984 100644 --- a/src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts +++ b/src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts @@ -10,6 +10,7 @@ export default function add_event_handlers( let snippet = handler.render(block); if (handler.modifiers.has('preventDefault')) snippet = `@prevent_default(${snippet})`; if (handler.modifiers.has('stopPropagation')) snippet = `@stop_propagation(${snippet})`; + if (handler.modifiers.has('self')) snippet = `@self(${snippet}, ${target})`; const opts = ['passive', 'once', 'capture'].filter(mod => handler.modifiers.has(mod)); diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index 6faf3d9c60..f8c2e7bfcd 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -73,6 +73,14 @@ export function stop_propagation(fn) { }; } +export function self(fn, el) { + return function(event) { + if(event.target !== el) return; + // @ts-ignore + return fn.call(this, event); + }; +} + export function attr(node: Element, attribute: string, value?: string) { if (value == null) node.removeAttribute(attribute); else node.setAttribute(attribute, value); diff --git a/test/validator/samples/event-modifiers-invalid/errors.json b/test/validator/samples/event-modifiers-invalid/errors.json index 0aac0e5327..8be2ca7348 100644 --- a/test/validator/samples/event-modifiers-invalid/errors.json +++ b/test/validator/samples/event-modifiers-invalid/errors.json @@ -1,5 +1,5 @@ [{ - "message": "Valid event modifiers are preventDefault, stopPropagation, capture, once or passive", + "message": "Valid event modifiers are preventDefault, stopPropagation, capture, once, passive or self", "code": "invalid-event-modifier", "start": { "line": 1, From b6679eba7a5a64ac24cfd2d1da2eb4b6ab08dd59 Mon Sep 17 00:00:00 2001 From: Samuel Elgozi Date: Thu, 8 Aug 2019 10:49:28 +0300 Subject: [PATCH 503/510] added `self` modifier explanation to the docs --- site/content/tutorial/05-events/03-event-modifiers/text.md | 1 + 1 file changed, 1 insertion(+) diff --git a/site/content/tutorial/05-events/03-event-modifiers/text.md b/site/content/tutorial/05-events/03-event-modifiers/text.md index 73386dd096..41154cafcd 100644 --- a/site/content/tutorial/05-events/03-event-modifiers/text.md +++ b/site/content/tutorial/05-events/03-event-modifiers/text.md @@ -23,5 +23,6 @@ The full list of modifiers: * `passive` — improves scrolling performance on touch/wheel events (Svelte will add it automatically where it's safe to do so) * `capture` — fires the handler during the *capture* phase instead of the *bubbling* phase ([MDN docs](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture)) * `once` — remove the handler after the first time it runs +* `self` — only trigger handler if event.target is the element itself You can chain modifiers together, e.g. `on:click|once|capture={...}`. From 61ad408760eb7ec2d3ea1aa0f89146ec180cbc58 Mon Sep 17 00:00:00 2001 From: Samuel Elgozi Date: Thu, 8 Aug 2019 11:23:31 +0300 Subject: [PATCH 504/510] Tests addedt for `self` modifier --- .../event-handler-modifier-self/_config.js | 16 ++++++++++++++++ .../event-handler-modifier-self/main.svelte | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 test/runtime/samples/event-handler-modifier-self/_config.js create mode 100644 test/runtime/samples/event-handler-modifier-self/main.svelte diff --git a/test/runtime/samples/event-handler-modifier-self/_config.js b/test/runtime/samples/event-handler-modifier-self/_config.js new file mode 100644 index 0000000000..6d7d29e482 --- /dev/null +++ b/test/runtime/samples/event-handler-modifier-self/_config.js @@ -0,0 +1,16 @@ +export default { + html: ` +
    + +
    + `, + + async test({ assert, component, target, window }) { + const button = target.querySelector('button'); + const event = new window.MouseEvent('click'); + + await button.dispatchEvent(event); + + assert.ok(!component.inner_clicked); + }, +}; diff --git a/test/runtime/samples/event-handler-modifier-self/main.svelte b/test/runtime/samples/event-handler-modifier-self/main.svelte new file mode 100644 index 0000000000..1becf44a9e --- /dev/null +++ b/test/runtime/samples/event-handler-modifier-self/main.svelte @@ -0,0 +1,11 @@ + + +
    + +
    From 5b77b744ce2c24ee135717fcbeb46559e3579ff5 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 8 Aug 2019 12:14:15 -0400 Subject: [PATCH 505/510] generate valid code when spreading literal into props (#3185) --- .../compile/render_dom/wrappers/InlineComponent/index.ts | 4 ++-- .../runtime/samples/spread-component-literal/Widget.svelte | 5 +++++ test/runtime/samples/spread-component-literal/_config.js | 5 +++++ test/runtime/samples/spread-component-literal/main.svelte | 7 +++++++ 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 test/runtime/samples/spread-component-literal/Widget.svelte create mode 100644 test/runtime/samples/spread-component-literal/_config.js create mode 100644 test/runtime/samples/spread-component-literal/main.svelte diff --git a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts index c63879c06f..fb3a4186db 100644 --- a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts @@ -220,9 +220,9 @@ export default class InlineComponentWrapper extends Wrapper { const conditions = Array.from(all_dependencies).map(dep => `changed.${dep}`).join(' || '); updates.push(deindent` - var ${name_changes} = ${all_dependencies.size === 1 ? `${conditions}` : `(${conditions})`} ? @get_spread_update(${levels}, [ + var ${name_changes} = ${conditions ? `(${conditions}) ? @get_spread_update(${levels}, [ ${changes.join(',\n')} - ]) : {}; + ]) : {}` : '{}'}; `); } else { this.node.attributes diff --git a/test/runtime/samples/spread-component-literal/Widget.svelte b/test/runtime/samples/spread-component-literal/Widget.svelte new file mode 100644 index 0000000000..e00796baf3 --- /dev/null +++ b/test/runtime/samples/spread-component-literal/Widget.svelte @@ -0,0 +1,5 @@ + + +

    foo: {foo}

    diff --git a/test/runtime/samples/spread-component-literal/_config.js b/test/runtime/samples/spread-component-literal/_config.js new file mode 100644 index 0000000000..d1613218d5 --- /dev/null +++ b/test/runtime/samples/spread-component-literal/_config.js @@ -0,0 +1,5 @@ +export default { + html: ` +

    foo: bar

    + ` +}; diff --git a/test/runtime/samples/spread-component-literal/main.svelte b/test/runtime/samples/spread-component-literal/main.svelte new file mode 100644 index 0000000000..13fdf99b69 --- /dev/null +++ b/test/runtime/samples/spread-component-literal/main.svelte @@ -0,0 +1,7 @@ + + +
    + +
    From 73a21b855afb688becfcee95202f53f064d73eda Mon Sep 17 00:00:00 2001 From: vages Date: Sat, 10 Aug 2019 16:18:03 +0000 Subject: [PATCH 506/510] Document $$props This was explained in the tutorial, but I could not find any documentation on it in the docs. --- site/content/docs/02-template-syntax.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index ae07c90993..aaa052df3b 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -94,6 +94,12 @@ An element or component can have multiple spread attributes, interspersed with r ``` +*`$$props`* references all props that are passed to a component – including ones that are not declared with `export`. It is useful in rare cases, but not generally recommended, as it is difficult for Svelte to optimise. + +```html + +``` + ### Text expressions From 83497a15f18bff4cac3a3c1457e23393ad004a91 Mon Sep 17 00:00:00 2001 From: Alexandr Orel <4aorel@mail.ru> Date: Sun, 11 Aug 2019 12:01:22 +0300 Subject: [PATCH 507/510] Fix travis test coverage --- .gitignore | 2 +- mocha.coverage.opts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 590bd1d88e..1de9283c03 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ node_modules /animate /scratch/ /coverage/ -/coverage.lcov/ +/coverage.lcov /test/sourcemaps/samples/*/output.js /test/sourcemaps/samples/*/output.js.map /test/sourcemaps/samples/*/output.css diff --git a/mocha.coverage.opts b/mocha.coverage.opts index 5bf853ae30..cfec67a99a 100644 --- a/mocha.coverage.opts +++ b/mocha.coverage.opts @@ -1,4 +1,3 @@ ---compilers ts-node/register --require source-map-support/register --full-trace --recursive From c1a367980673278b1c9fc0c16ca80facc5fa9f05 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 11 Aug 2019 10:22:29 -0400 Subject: [PATCH 508/510] remove ts-node - no typescript inside test/ --- package-lock.json | 41 +------------------------------ package.json | 1 - test/store/{index.ts => index.js} | 0 test/test.js | 12 ++++----- 4 files changed, 7 insertions(+), 47 deletions(-) rename test/store/{index.ts => index.js} (100%) diff --git a/package-lock.json b/package-lock.json index 2f432d9702..d40b1ac572 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.6.10", + "version": "3.7.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -236,12 +236,6 @@ "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", "dev": true }, - "arg": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", - "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", - "dev": true - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -2034,12 +2028,6 @@ } } }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -3443,27 +3431,6 @@ "punycode": "^2.1.0" } }, - "ts-node": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz", - "integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==", - "dev": true, - "requires": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.6", - "yn": "^3.0.0" - }, - "dependencies": { - "diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", - "dev": true - } - } - }, "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", @@ -3961,12 +3928,6 @@ "requires": { "fd-slicer": "~1.0.1" } - }, - "yn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz", - "integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==", - "dev": true } } } diff --git a/package.json b/package.json index 857c2fc6a4..80788fc572 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,6 @@ "source-map": "^0.6.1", "source-map-support": "^0.5.12", "tiny-glob": "^0.2.6", - "ts-node": "^8.3.0", "tslib": "^1.10.0", "typescript": "^3.5.2" }, diff --git a/test/store/index.ts b/test/store/index.js similarity index 100% rename from test/store/index.ts rename to test/store/index.js diff --git a/test/test.js b/test/test.js index cb89b3e9d1..f18c01c149 100644 --- a/test/test.js +++ b/test/test.js @@ -1,11 +1,11 @@ -const glob = require("tiny-glob/sync.js"); +const glob = require('tiny-glob/sync.js'); -require("./setup"); +require('./setup'); // bind internal to jsdom -require("./helpers"); -require("../internal"); +require('./helpers'); +require('../internal'); -glob("*/index.{js,ts}", { cwd: "test" }).forEach((file) => { - require("./" + file); +glob('*/index.js', { cwd: 'test' }).forEach((file) => { + require('./' + file); }); From ad790d36b4ac1714fe161d8fa51364f6399a8d94 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 11 Aug 2019 10:24:20 -0400 Subject: [PATCH 509/510] add separator --- site/content/docs/02-template-syntax.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index aaa052df3b..600634ab11 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -94,6 +94,8 @@ An element or component can have multiple spread attributes, interspersed with r ``` +--- + *`$$props`* references all props that are passed to a component – including ones that are not declared with `export`. It is useful in rare cases, but not generally recommended, as it is difficult for Svelte to optimise. ```html From d9206fb3cc920d342ba9bf177f16ce578c39b122 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 11 Aug 2019 10:46:00 -0400 Subject: [PATCH 510/510] simplify self function, use this instead of el --- .../compile/render_dom/wrappers/shared/add_event_handlers.ts | 2 +- src/runtime/internal/dom.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts b/src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts index 06c679d984..312b10013f 100644 --- a/src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts +++ b/src/compiler/compile/render_dom/wrappers/shared/add_event_handlers.ts @@ -10,7 +10,7 @@ export default function add_event_handlers( let snippet = handler.render(block); if (handler.modifiers.has('preventDefault')) snippet = `@prevent_default(${snippet})`; if (handler.modifiers.has('stopPropagation')) snippet = `@stop_propagation(${snippet})`; - if (handler.modifiers.has('self')) snippet = `@self(${snippet}, ${target})`; + if (handler.modifiers.has('self')) snippet = `@self(${snippet})`; const opts = ['passive', 'once', 'capture'].filter(mod => handler.modifiers.has(mod)); diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index f8c2e7bfcd..25c804ff34 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -73,11 +73,10 @@ export function stop_propagation(fn) { }; } -export function self(fn, el) { +export function self(fn) { return function(event) { - if(event.target !== el) return; // @ts-ignore - return fn.call(this, event); + if (event.target === this) fn.call(this, event); }; }