From 8427bde679133a2b1556cb24d4cb73a0fb5efb1c Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 3 Jan 2019 13:20:56 -0500 Subject: [PATCH 001/125] preserve attributes during preprocess (#1873) --- src/preprocess/index.ts | 2 +- test/preprocess/index.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/preprocess/index.ts b/src/preprocess/index.ts index 5abde887dc..5537b30ea1 100644 --- a/src/preprocess/index.ts +++ b/src/preprocess/index.ts @@ -60,7 +60,7 @@ export default async function preprocess( attributes: parseAttributes(attributes), filename: options.filename, })); - return processed ? `<${type}>${processed.code}` : match; + return processed ? `<${type}${attributes}>${processed.code}` : match; } ); } diff --git a/test/preprocess/index.js b/test/preprocess/index.js index 14b483ce51..10661efd39 100644 --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -151,6 +151,10 @@ describe('preprocess', () => { `; + const expected = ` + + `; + return svelte.preprocess(source, { style: ({ attributes }) => { assert.deepEqual(attributes, { @@ -158,7 +162,10 @@ describe('preprocess', () => { 'data-foo': 'bar', bool: true }); + return { code: 'PROCESSED' }; } + }).then(processed => { + assert.equal(processed.toString(), expected); }); }); From 90a9061684bea5907dd2f62d2e6e25f593ae8d80 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 3 Jan 2019 15:11:15 -0500 Subject: [PATCH 002/125] use tagged versions of eslint-plugin-svelte3 --- site/package-lock.json | 4 ++-- site/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 20e0cc283c..da38790d5a 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1463,8 +1463,8 @@ "dev": true }, "eslint-plugin-svelte3": { - "version": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#d4da8a7d98f2efa70266313ab798cd4d400ca86c", - "from": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git", + "version": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#6c9cc7b733663f8b9c68817ddd50d6bf4f5052c3", + "from": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#semver:*", "dev": true }, "estree-walker": { diff --git a/site/package.json b/site/package.json index 623f059d4c..7ecd42b767 100644 --- a/site/package.json +++ b/site/package.json @@ -40,7 +40,7 @@ "@babel/runtime": "^7.0.0", "chokidar": "^2.0.4", "degit": "^2.1.3", - "eslint-plugin-svelte3": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git", + "eslint-plugin-svelte3": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#semver:*", "now": "^12.1.14", "npm-run-all": "^4.1.5", "rollup": "^0.68.0", From e0af4e742dc26daaf5ecfb1c36c90956d91d6545 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 3 Jan 2019 17:52:10 -0500 Subject: [PATCH 003/125] bump site eslint ecma version --- site/.eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/.eslintrc.json b/site/.eslintrc.json index cb0d06a2ec..0032aca092 100644 --- a/site/.eslintrc.json +++ b/site/.eslintrc.json @@ -35,7 +35,7 @@ ], "plugins": ["svelte3"], "parserOptions": { - "ecmaVersion": 6, + "ecmaVersion": 8, "sourceType": "module" }, "settings": { From 77df0b7c45bf64619e59d0a115d73b5880007047 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 3 Jan 2019 18:10:06 -0500 Subject: [PATCH 004/125] update and tidy REPL examples --- site/content/examples/7guis-crud/App.html | 4 +- .../examples/7guis-flight-booker/App.html | 4 +- site/content/examples/await-block/App.html | 14 ++-- site/content/examples/bar-chart/App.html | 3 +- .../examples/binding-media-elements/App.html | 18 ++--- site/content/examples/line-chart/App.html | 8 +- .../examples/scatterplot/Scatterplot.html | 81 ++++++++----------- .../examples/transitions-custom/App.html | 2 +- .../examples/transitions-fade/App.html | 4 +- .../content/examples/transitions-fly/App.html | 4 +- .../examples/transitions-in-out/App.html | 4 +- 11 files changed, 62 insertions(+), 84 deletions(-) diff --git a/site/content/examples/7guis-crud/App.html b/site/content/examples/7guis-crud/App.html index 82ce893aac..bf68cb2b8d 100644 --- a/site/content/examples/7guis-crud/App.html +++ b/site/content/examples/7guis-crud/App.html @@ -1,8 +1,6 @@ @@ -21,4 +19,4 @@ {:catch error}

well that's odd

{/await} -{/if} \ No newline at end of file +{/if} diff --git a/site/content/examples/bar-chart/App.html b/site/content/examples/bar-chart/App.html index 0098454e91..82af1834a8 100644 --- a/site/content/examples/bar-chart/App.html +++ b/site/content/examples/bar-chart/App.html @@ -1,5 +1,4 @@ - + {#each yTicks as tick} - - + + {tick} {/each} @@ -65,8 +50,8 @@ {#each xTicks as tick} - - + + {tick} {/each} @@ -74,7 +59,7 @@ {#each points as point} - + {/each} @@ -108,4 +93,4 @@ .y-axis text { text-anchor: end; } - \ No newline at end of file + diff --git a/site/content/examples/transitions-custom/App.html b/site/content/examples/transitions-custom/App.html index fcf221f0ae..bee159e4c5 100644 --- a/site/content/examples/transitions-custom/App.html +++ b/site/content/examples/transitions-custom/App.html @@ -2,7 +2,7 @@ import * as eases from 'svelte/easing'; import { fade } from 'svelte/transition'; - export let visible; + let visible; const wheee = (node, params) => { return { diff --git a/site/content/examples/transitions-fade/App.html b/site/content/examples/transitions-fade/App.html index b7fc840d9c..528d495361 100644 --- a/site/content/examples/transitions-fade/App.html +++ b/site/content/examples/transitions-fade/App.html @@ -1,11 +1,11 @@

fades in and out

-{/if} \ No newline at end of file +{/if} diff --git a/site/content/examples/transitions-fly/App.html b/site/content/examples/transitions-fly/App.html index dc63d6d003..43e4a1dd2d 100644 --- a/site/content/examples/transitions-fly/App.html +++ b/site/content/examples/transitions-fly/App.html @@ -1,11 +1,11 @@ visible {#if visible}

flies 200 pixels up, slowly

-{/if} \ No newline at end of file +{/if} diff --git a/site/content/examples/transitions-in-out/App.html b/site/content/examples/transitions-in-out/App.html index bf91453870..7b995bc04d 100644 --- a/site/content/examples/transitions-in-out/App.html +++ b/site/content/examples/transitions-in-out/App.html @@ -1,11 +1,11 @@ visible {#if visible}

flies up, fades out

-{/if} \ No newline at end of file +{/if} From cf6b6d4dbf1141c8e273b93888e3cfa1819e5a94 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 4 Jan 2019 09:04:19 -0500 Subject: [PATCH 005/125] upgrade Acorn - fixes #1949 --- package-lock.json | 27 ++++++++++++++++----------- package.json | 6 +++--- src/parse/acorn.ts | 15 +++++++++++++++ src/parse/read/expression.ts | 10 ++-------- src/parse/read/script.ts | 13 ++----------- 5 files changed, 38 insertions(+), 33 deletions(-) create mode 100644 src/parse/acorn.ts diff --git a/package-lock.json b/package-lock.json index ce46cbb8b8..9d6d48ac1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha13", + "version": "3.0.0-alpha16", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -217,19 +217,16 @@ "dev": true }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz", + "integrity": "sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==", "dev": true }, "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", + "dev": true }, "acorn-globals": { "version": "4.3.0", @@ -2934,6 +2931,14 @@ "whatwg-url": "^6.4.1", "ws": "^5.2.0", "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + } } }, "jsesc": { diff --git a/package.json b/package.json index d4766ee63b..4de67b4346 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha15", + "version": "3.0.0-alpha16", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index.js", @@ -55,8 +55,8 @@ "devDependencies": { "@types/mocha": "^5.2.0", "@types/node": "^10.5.5", - "acorn": "^5.4.1", - "acorn-dynamic-import": "^3.0.0", + "acorn": "^6.0.5", + "acorn-dynamic-import": "^4.0.0", "agadoo": "^1.0.1", "codecov": "^3.0.0", "css-tree": "1.0.0-alpha22", diff --git a/src/parse/acorn.ts b/src/parse/acorn.ts new file mode 100644 index 0000000000..2f0cd2ec20 --- /dev/null +++ b/src/parse/acorn.ts @@ -0,0 +1,15 @@ +import * as acorn from 'acorn'; +import dynamicImport from 'acorn-dynamic-import'; + +const Parser = acorn.Parser.extend(dynamicImport); + +export const parse = (source: string, options: any) => Parser.parse(source, { + sourceType: 'module', + ecmaVersion: 9, + preserveParens: true +}); + +export const parseExpressionAt = (source: string, index: number, options: any) => Parser.parseExpressionAt(source, index, { + ecmaVersion: 9, + preserveParens: true +}); \ No newline at end of file diff --git a/src/parse/read/expression.ts b/src/parse/read/expression.ts index 0c7ee2ac31..3bfad75e6a 100644 --- a/src/parse/read/expression.ts +++ b/src/parse/read/expression.ts @@ -1,4 +1,4 @@ -import { parseExpressionAt } from 'acorn'; +import { parseExpressionAt } from '../acorn'; import { Parser } from '../index'; const literals = new Map([['true', true], ['false', false], ['null', null]]); @@ -31,13 +31,7 @@ export default function readExpression(parser: Parser) { parser.index = start; try { - const node = parseExpressionAt(parser.template, parser.index, { - ecmaVersion: 9, - preserveParens: true, - plugins: { - dynamicImport: true - } - }); + const node = parseExpressionAt(parser.template, parser.index); parser.index = node.end; return node; diff --git a/src/parse/read/script.ts b/src/parse/read/script.ts index b6d6cd53a8..11337db513 100644 --- a/src/parse/read/script.ts +++ b/src/parse/read/script.ts @@ -1,13 +1,10 @@ -import * as acorn from 'acorn'; -import injectDynamicImport from 'acorn-dynamic-import/src/inject'; +import * as acorn from '../acorn'; import repeat from '../../utils/repeat'; import { Parser } from '../index'; import { Node } from '../../interfaces'; const scriptClosingTag = ''; -injectDynamicImport(acorn); - export default function readScript(parser: Parser, start: number, attributes: Node[]) { const scriptStart = parser.index; const scriptEnd = parser.template.indexOf(scriptClosingTag, scriptStart); @@ -24,13 +21,7 @@ export default function readScript(parser: Parser, start: number, attributes: No let ast; try { - ast = acorn.parse(source, { - ecmaVersion: 9, - sourceType: 'module', - plugins: { - dynamicImport: true - } - }); + ast = acorn.parse(source); } catch (err) { parser.acornError(err); } From 423e4e6cbcb49531766b81acef4b180bb6b85427 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 4 Jan 2019 13:48:55 -0500 Subject: [PATCH 006/125] deconflict with implicit props - fixes #1957 --- src/compile/Component.ts | 1 + test/js/samples/deconflict-builtins/expected.js | 4 ++-- test/js/samples/select-dynamic-value/expected.js | 6 +++--- .../samples/event-handler-deconflicted/_config.js | 11 +++++++++++ .../samples/event-handler-deconflicted/main.html | 1 + 5 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 test/runtime/samples/event-handler-deconflicted/_config.js create mode 100644 test/runtime/samples/event-handler-deconflicted/main.html diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 541814a1ff..c9c985339f 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -170,6 +170,7 @@ export default class Component { const props = [...this.template_references]; this.declarations.push(...props); addToSet(this.writable_declarations, this.template_references); + addToSet(this.userVars, this.template_references); this.props = props.map(name => ({ name, diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 3f73d83574..fe2a247d3d 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createComment, createElement as createElement_1, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); @@ -13,7 +13,7 @@ function create_each_block($$, ctx) { return { c() { - span = createElement("span"); + span = createElement_1("span"); text = createText(text_value); }, diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js index 6788f18fd0..cce868ee40 100644 --- a/test/js/samples/select-dynamic-value/expected.js +++ b/test/js/samples/select-dynamic-value/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var select, option0, option1, select_value_value, current; + var select, option0, option1, select_value_value, current_1; return { c() { @@ -32,7 +32,7 @@ function create_fragment($$, ctx) { } } - current = true; + current_1 = true; }, p(changed, ctx) { @@ -49,7 +49,7 @@ function create_fragment($$, ctx) { }, i(target, anchor) { - if (current) return; + if (current_1) return; this.m(target, anchor); }, diff --git a/test/runtime/samples/event-handler-deconflicted/_config.js b/test/runtime/samples/event-handler-deconflicted/_config.js new file mode 100644 index 0000000000..69151997a0 --- /dev/null +++ b/test/runtime/samples/event-handler-deconflicted/_config.js @@ -0,0 +1,11 @@ +export default { + preserveIdentifiers: true, + + props: { + click_handler: 'x' + }, + + html: ` + + ` +}; diff --git a/test/runtime/samples/event-handler-deconflicted/main.html b/test/runtime/samples/event-handler-deconflicted/main.html new file mode 100644 index 0000000000..38c923794e --- /dev/null +++ b/test/runtime/samples/event-handler-deconflicted/main.html @@ -0,0 +1 @@ + \ No newline at end of file From f0b6be13554d058ad2da72977660f010e4ee4f0b Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 4 Jan 2019 14:03:01 -0500 Subject: [PATCH 007/125] fix #1960 typo --- src/parse/state/tag.ts | 2 +- test/runtime/samples/prop-not-action/Nested.html | 1 + test/runtime/samples/prop-not-action/_config.js | 9 +++++++++ test/runtime/samples/prop-not-action/main.html | 6 ++++++ 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/prop-not-action/Nested.html create mode 100644 test/runtime/samples/prop-not-action/_config.js create mode 100644 test/runtime/samples/prop-not-action/main.html diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts index 43e685017b..2dffd9f2b7 100644 --- a/src/parse/state/tag.ts +++ b/src/parse/state/tag.ts @@ -379,7 +379,7 @@ function readAttribute(parser: Parser, uniqueNames: Set) { parser.allowWhitespace(); const colon_index = name.indexOf(':'); - const type = colon_index !== 1 && get_directive_type(name.slice(0, colon_index)); + const type = colon_index !== -1 && get_directive_type(name.slice(0, colon_index)); let value: any[] | true = true; if (parser.eat('=')) { diff --git a/test/runtime/samples/prop-not-action/Nested.html b/test/runtime/samples/prop-not-action/Nested.html new file mode 100644 index 0000000000..b1029d2ad5 --- /dev/null +++ b/test/runtime/samples/prop-not-action/Nested.html @@ -0,0 +1 @@ +

Hello {user.name}!

\ No newline at end of file diff --git a/test/runtime/samples/prop-not-action/_config.js b/test/runtime/samples/prop-not-action/_config.js new file mode 100644 index 0000000000..17ab47b584 --- /dev/null +++ b/test/runtime/samples/prop-not-action/_config.js @@ -0,0 +1,9 @@ +export default { + props: { + currentUser: { name: 'world' } + }, + + html: ` +

Hello world!

+ ` +}; \ No newline at end of file diff --git a/test/runtime/samples/prop-not-action/main.html b/test/runtime/samples/prop-not-action/main.html new file mode 100644 index 0000000000..c0ddd01e79 --- /dev/null +++ b/test/runtime/samples/prop-not-action/main.html @@ -0,0 +1,6 @@ + + + \ No newline at end of file From 58b3ea63cc7273e9581c73eaed9ead753633875b Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 4 Jan 2019 20:35:58 -0500 Subject: [PATCH 008/125] fix malformed code in window binding event handlers (#1963) --- src/compile/render-dom/wrappers/Window.ts | 4 ++-- .../samples/window-binding-multiple-handlers/_config.js | 3 +++ .../samples/window-binding-multiple-handlers/main.html | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 test/runtime/samples/window-binding-multiple-handlers/_config.js create mode 100644 test/runtime/samples/window-binding-multiple-handlers/main.html diff --git a/src/compile/render-dom/wrappers/Window.ts b/src/compile/render-dom/wrappers/Window.ts index beacaaf254..7bf41cdc0b 100644 --- a/src/compile/render-dom/wrappers/Window.ts +++ b/src/compile/render-dom/wrappers/Window.ts @@ -114,7 +114,7 @@ export default class WindowWrapper extends Wrapper { }); block.event_listeners.push(deindent` - @addListener(window, "${event}", ctx.${handler_name}); + @addListener(window, "${event}", ctx.${handler_name}) `); } @@ -179,4 +179,4 @@ export default class WindowWrapper extends Wrapper { `); } } -} \ No newline at end of file +} diff --git a/test/runtime/samples/window-binding-multiple-handlers/_config.js b/test/runtime/samples/window-binding-multiple-handlers/_config.js new file mode 100644 index 0000000000..2f7c6be562 --- /dev/null +++ b/test/runtime/samples/window-binding-multiple-handlers/_config.js @@ -0,0 +1,3 @@ +export default { + html: '' +}; diff --git a/test/runtime/samples/window-binding-multiple-handlers/main.html b/test/runtime/samples/window-binding-multiple-handlers/main.html new file mode 100644 index 0000000000..8b28d53a9f --- /dev/null +++ b/test/runtime/samples/window-binding-multiple-handlers/main.html @@ -0,0 +1,2 @@ + + From 2eb881dcb695b30cdb8ef37b69c1194d93ce32af Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 4 Jan 2019 22:02:12 -0500 Subject: [PATCH 009/125] prevent invalid svelte: tags - fixes #1948 --- src/parse/state/tag.ts | 34 ++++++++++++++----- .../error-svelte-selfdestructive/error.json | 10 ++++++ .../error-svelte-selfdestructive/input.html | 3 ++ 3 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 test/parser/samples/error-svelte-selfdestructive/error.json create mode 100644 test/parser/samples/error-svelte-selfdestructive/input.html diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts index 43e685017b..5465f6f3e1 100644 --- a/src/parse/state/tag.ts +++ b/src/parse/state/tag.ts @@ -5,16 +5,20 @@ import { decodeCharacterReferences } from '../utils/html'; import isVoidElementName from '../../utils/isVoidElementName'; import { Parser } from '../index'; import { Node } from '../../interfaces'; +import fuzzymatch from '../../utils/fuzzymatch'; +import list from '../../utils/list'; const validTagName = /^\!?[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/; const metaTags = new Map([ - ['svelte:document', 'Document'], - ['svelte:window', 'Window'], + ['svelte:head', 'Head'], ['svelte:meta', 'Meta'], - ['svelte:head', 'Head'] + ['svelte:window', 'Window'], + ['svelte:document', 'Document'] ]); +const valid_meta_tags = [...metaTags.keys(), 'svelte:self', 'svelte:component']; + const specials = new Map([ [ 'script', @@ -32,8 +36,8 @@ const specials = new Map([ ], ]); -const SELF = 'svelte:self'; -const COMPONENT = 'svelte:component'; +const SELF = /^svelte:self[\s\/>]/; +const COMPONENT = /^svelte:component[\s\/>]/; // based on http://developers.whatwg.org/syntax.html#syntax-tag-omission const disallowedContents = new Map([ @@ -278,7 +282,7 @@ export default function tag(parser: Parser) { function readTagName(parser: Parser) { const start = parser.index; - if (parser.eat(SELF)) { + if (parser.read(SELF)) { // check we're inside a block, otherwise this // will cause infinite recursion let i = parser.stack.length; @@ -295,19 +299,31 @@ function readTagName(parser: Parser) { if (!legal) { parser.error({ code: `invalid-self-placement`, - message: `<${SELF}> components can only exist inside if-blocks or each-blocks` + message: ` components can only exist inside if-blocks or each-blocks` }, start); } - return SELF; + return 'svelte:self'; } - if (parser.eat(COMPONENT)) return COMPONENT; + if (parser.read(COMPONENT)) return 'svelte:component'; const name = parser.readUntil(/(\s|\/|>)/); if (metaTags.has(name)) return name; + if (name.startsWith('svelte:')) { + const match = fuzzymatch(name.slice(7), valid_meta_tags); + + let message = `Valid tag names are ${list(valid_meta_tags)}`; + if (match) message += ` (did you mean '${match}'?)`; + + parser.error({ + code: 'invalid-tag-name', + message + }, start); + } + if (!validTagName.test(name)) { parser.error({ code: `invalid-tag-name`, diff --git a/test/parser/samples/error-svelte-selfdestructive/error.json b/test/parser/samples/error-svelte-selfdestructive/error.json new file mode 100644 index 0000000000..1b4dc7fdec --- /dev/null +++ b/test/parser/samples/error-svelte-selfdestructive/error.json @@ -0,0 +1,10 @@ +{ + "code": "invalid-tag-name", + "message": "Valid tag names are svelte:head, svelte:meta, svelte:window, svelte:document, svelte:self or svelte:component", + "pos": 10, + "start": { + "character": 10, + "line": 2, + "column": 2 + } +} \ No newline at end of file diff --git a/test/parser/samples/error-svelte-selfdestructive/input.html b/test/parser/samples/error-svelte-selfdestructive/input.html new file mode 100644 index 0000000000..6bf1e83aa4 --- /dev/null +++ b/test/parser/samples/error-svelte-selfdestructive/input.html @@ -0,0 +1,3 @@ +{#if x} + +{/if} \ No newline at end of file From 0bdf4a45363a1410db0b85eedc4eef6b5d40fa9b Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 4 Jan 2019 22:09:21 -0500 Subject: [PATCH 010/125] oops --- src/parse/state/tag.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts index 1ed7b3d1e8..64108057ce 100644 --- a/src/parse/state/tag.ts +++ b/src/parse/state/tag.ts @@ -283,6 +283,8 @@ function readTagName(parser: Parser) { const start = parser.index; if (parser.read(SELF)) { + parser.index -= 1; + // check we're inside a block, otherwise this // will cause infinite recursion let i = parser.stack.length; @@ -306,7 +308,10 @@ function readTagName(parser: Parser) { return 'svelte:self'; } - if (parser.read(COMPONENT)) return 'svelte:component'; + if (parser.read(COMPONENT)) { + parser.index -= 1; + return 'svelte:component'; + } const name = parser.readUntil(/(\s|\/|>)/); From 0e59e8d4cb000f449f4600687a6b4b899107fb21 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 4 Jan 2019 22:30:59 -0500 Subject: [PATCH 011/125] fix dynamic component event code generation - fixes #1945 --- src/compile/render-dom/wrappers/InlineComponent/index.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/compile/render-dom/wrappers/InlineComponent/index.ts b/src/compile/render-dom/wrappers/InlineComponent/index.ts index f156ded8d5..c48e99b343 100644 --- a/src/compile/render-dom/wrappers/InlineComponent/index.ts +++ b/src/compile/render-dom/wrappers/InlineComponent/index.ts @@ -304,9 +304,7 @@ export default class InlineComponentWrapper extends Wrapper { }); const munged_handlers = this.node.handlers.map(handler => { - // TODO return declarations from handler.render()? const snippet = handler.render(block); - return `${name}.$on("${handler.name}", ${snippet});`; }); @@ -378,10 +376,6 @@ export default class InlineComponentWrapper extends Wrapper { ${this.fragment && this.fragment.nodes.map(child => child.remount(name))} ${name}.$$.fragment.c(); @mount_component(${name}, ${updateMountNode}, ${anchor}); - - ${this.node.handlers.map(handler => deindent` - ${name}.$on("${handler.name}", ${handler.var}); - `)} } else { ${name} = null; } From e682d5ca5488a20ff8c55bdb4fc4f0bdb81afa4f Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 4 Jan 2019 22:32:32 -0500 Subject: [PATCH 012/125] nicer --- src/parse/state/tag.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts index 64108057ce..d2cc9cc9ba 100644 --- a/src/parse/state/tag.ts +++ b/src/parse/state/tag.ts @@ -36,8 +36,8 @@ const specials = new Map([ ], ]); -const SELF = /^svelte:self[\s\/>]/; -const COMPONENT = /^svelte:component[\s\/>]/; +const SELF = /^svelte:self(?=[\s\/>])/; +const COMPONENT = /^svelte:component(?=[\s\/>])/; // based on http://developers.whatwg.org/syntax.html#syntax-tag-omission const disallowedContents = new Map([ @@ -283,8 +283,6 @@ function readTagName(parser: Parser) { const start = parser.index; if (parser.read(SELF)) { - parser.index -= 1; - // check we're inside a block, otherwise this // will cause infinite recursion let i = parser.stack.length; @@ -308,10 +306,7 @@ function readTagName(parser: Parser) { return 'svelte:self'; } - if (parser.read(COMPONENT)) { - parser.index -= 1; - return 'svelte:component'; - } + if (parser.read(COMPONENT)) return 'svelte:component'; const name = parser.readUntil(/(\s|\/|>)/); From fc5d929e761123e0eb2c8a715d10bffdb7d0d0a8 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 4 Jan 2019 22:57:40 -0500 Subject: [PATCH 013/125] set parent correctly for children of await blocks - should fix #1939 --- src/compile/render-dom/wrappers/AwaitBlock.ts | 2 +- .../samples/await-containing-if/_config.js | 35 +++++++++++++++++++ .../samples/await-containing-if/main.html | 11 ++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/await-containing-if/_config.js create mode 100644 test/runtime/samples/await-containing-if/main.html diff --git a/src/compile/render-dom/wrappers/AwaitBlock.ts b/src/compile/render-dom/wrappers/AwaitBlock.ts index ca1fdcc64e..cbc03f8ce9 100644 --- a/src/compile/render-dom/wrappers/AwaitBlock.ts +++ b/src/compile/render-dom/wrappers/AwaitBlock.ts @@ -80,7 +80,7 @@ export default class AwaitBlockWrapper extends Wrapper { status, renderer, block, - parent, + this, child, stripWhitespace, nextSibling diff --git a/test/runtime/samples/await-containing-if/_config.js b/test/runtime/samples/await-containing-if/_config.js new file mode 100644 index 0000000000..9e24e4f614 --- /dev/null +++ b/test/runtime/samples/await-containing-if/_config.js @@ -0,0 +1,35 @@ +let fulfil; + +let thePromise = new Promise(f => { + fulfil = f; +}); + +export default { + props: { + thePromise, + show: true + }, + + html: ` +

loading...

+ `, + + test({ assert, component, target }) { + fulfil(42); + + return thePromise + .then(() => { + assert.htmlEqual(target.innerHTML, ` +

the value is 42

+ `); + + component.show = false; + assert.htmlEqual(target.innerHTML, `
`); + + component.show = true; + assert.htmlEqual(target.innerHTML, ` +

the value is 42

+ `); + }); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/await-containing-if/main.html b/test/runtime/samples/await-containing-if/main.html new file mode 100644 index 0000000000..cab07e6499 --- /dev/null +++ b/test/runtime/samples/await-containing-if/main.html @@ -0,0 +1,11 @@ +
+ {#await thePromise} +

loading...

+ {:then theValue} + {#if show} +

the value is {theValue}

+ {/if} + {:catch theError} +

oh no! {theError.message}

+ {/await} +
\ No newline at end of file From e97953baec50156c21a50e972e70645eddd705b8 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 5 Jan 2019 12:22:19 -0500 Subject: [PATCH 014/125] better handling of bare attribute names in DOM mode (#1852) - compile unknown bare attribute names to setting the attribute to "" - correctly stringify as bare attribute name in .innerHTML'd markup --- src/compile/render-dom/wrappers/Element/Attribute.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compile/render-dom/wrappers/Element/Attribute.ts b/src/compile/render-dom/wrappers/Element/Attribute.ts index 769eeb8d53..bec0fa35a4 100644 --- a/src/compile/render-dom/wrappers/Element/Attribute.ts +++ b/src/compile/render-dom/wrappers/Element/Attribute.ts @@ -187,7 +187,7 @@ export default class AttributeWrapper { ? `${element.var}.${propertyName} = ${value};` : isDataSet ? `${element.var}.dataset.${camelCaseName} = ${value};` - : `${method}(${element.var}, "${name}", ${value});` + : `${method}(${element.var}, "${name}", ${value === true ? '""' : value});` ); block.builders.hydrate.addLine(statement); @@ -207,9 +207,9 @@ export default class AttributeWrapper { } stringify() { - const value = this.node.chunks; + if (this.node.isTrue) return ''; - if (value === true) return ''; + const value = this.node.chunks; if (value.length === 0) return `=""`; return `="${value.map(chunk => { From f8d69e296fd18ff170ed9245f26588ffbbb060d4 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 5 Jan 2019 14:12:42 -0500 Subject: [PATCH 015/125] replace with (#1846) --- src/compile/nodes/{Document.ts => Body.ts} | 4 ++-- src/compile/nodes/shared/mapChildren.ts | 6 +++--- .../render-dom/wrappers/{Document.ts => Body.ts} | 12 ++++++------ src/compile/render-dom/wrappers/Fragment.ts | 6 +++--- src/compile/render-ssr/Renderer.ts | 4 ++-- src/parse/state/tag.ts | 6 +++--- .../samples/error-svelte-selfdestructive/error.json | 4 ++-- test/runtime/samples/document-event/_config.js | 8 ++++---- test/runtime/samples/document-event/main.html | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) rename src/compile/nodes/{Document.ts => Body.ts} (87%) rename src/compile/render-dom/wrappers/{Document.ts => Body.ts} (60%) diff --git a/src/compile/nodes/Document.ts b/src/compile/nodes/Body.ts similarity index 87% rename from src/compile/nodes/Document.ts rename to src/compile/nodes/Body.ts index 48e985291c..74c63b1f57 100644 --- a/src/compile/nodes/Document.ts +++ b/src/compile/nodes/Body.ts @@ -1,8 +1,8 @@ import Node from './shared/Node'; import EventHandler from './EventHandler'; -export default class Document extends Node { - type: 'Document'; +export default class Body extends Node { + type: 'Body'; handlers: EventHandler[]; constructor(component, parent, scope, info) { diff --git a/src/compile/nodes/shared/mapChildren.ts b/src/compile/nodes/shared/mapChildren.ts index 775f72dc16..21df3e2918 100644 --- a/src/compile/nodes/shared/mapChildren.ts +++ b/src/compile/nodes/shared/mapChildren.ts @@ -1,6 +1,6 @@ import AwaitBlock from '../AwaitBlock'; +import Body from '../Body'; import Comment from '../Comment'; -import Document from '../Document'; import EachBlock from '../EachBlock'; import Element from '../Element'; import Head from '../Head'; @@ -19,8 +19,8 @@ import Node from './Node'; function getConstructor(type): typeof Node { switch (type) { case 'AwaitBlock': return AwaitBlock; + case 'Body': return Body; case 'Comment': return Comment; - case 'Document': return Document; case 'EachBlock': return EachBlock; case 'Element': return Element; case 'Head': return Head; @@ -50,4 +50,4 @@ export default function mapChildren(component, parent, scope, children: any[]) { return node; }); -} \ No newline at end of file +} diff --git a/src/compile/render-dom/wrappers/Document.ts b/src/compile/render-dom/wrappers/Body.ts similarity index 60% rename from src/compile/render-dom/wrappers/Document.ts rename to src/compile/render-dom/wrappers/Body.ts index a87a486f6c..678c790053 100644 --- a/src/compile/render-dom/wrappers/Document.ts +++ b/src/compile/render-dom/wrappers/Body.ts @@ -1,22 +1,22 @@ import Block from '../Block'; import Wrapper from './shared/Wrapper'; import deindent from '../../../utils/deindent'; -import Document from '../../nodes/Document'; +import Body from '../../nodes/Body'; -export default class DocumentWrapper extends Wrapper { - node: Document; +export default class BodyWrapper extends Wrapper { + node: Body; render(block: Block, parentNode: string, parentNodes: string) { this.node.handlers.forEach(handler => { const snippet = handler.render(block); block.builders.init.addBlock(deindent` - document.addEventListener("${handler.name}", ${snippet}); + document.body.addEventListener("${handler.name}", ${snippet}); `); block.builders.destroy.addBlock(deindent` - document.removeEventListener("${handler.name}", ${snippet}); + document.body.removeEventListener("${handler.name}", ${snippet}); `); }); } -} \ No newline at end of file +} diff --git a/src/compile/render-dom/wrappers/Fragment.ts b/src/compile/render-dom/wrappers/Fragment.ts index 56c7e2d6f0..aad4c74c80 100644 --- a/src/compile/render-dom/wrappers/Fragment.ts +++ b/src/compile/render-dom/wrappers/Fragment.ts @@ -1,7 +1,7 @@ import Wrapper from './shared/Wrapper'; import AwaitBlock from './AwaitBlock'; +import Body from './Body'; import DebugTag from './DebugTag'; -import Document from './Document'; import EachBlock from './EachBlock'; import Element from './Element'; import Head from './Head'; @@ -21,8 +21,8 @@ import Block from '../Block'; const wrappers = { AwaitBlock, + Body, Comment: null, - Document, DebugTag, EachBlock, Element, @@ -140,4 +140,4 @@ export default class FragmentWrapper { this.nodes[i].render(block, parentNode, parentNodes); } } -} \ No newline at end of file +} diff --git a/src/compile/render-ssr/Renderer.ts b/src/compile/render-ssr/Renderer.ts index 9e98979e26..ad7d44459e 100644 --- a/src/compile/render-ssr/Renderer.ts +++ b/src/compile/render-ssr/Renderer.ts @@ -19,9 +19,9 @@ function noop(){} const handlers: Record = { AwaitBlock, + Body: noop, Comment, DebugTag, - Document: noop, EachBlock, Element, Head, @@ -64,4 +64,4 @@ export default class Renderer { handler(node, this, options); }); } -} \ No newline at end of file +} diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts index d2cc9cc9ba..6e53ab03e0 100644 --- a/src/parse/state/tag.ts +++ b/src/parse/state/tag.ts @@ -14,7 +14,7 @@ const metaTags = new Map([ ['svelte:head', 'Head'], ['svelte:meta', 'Meta'], ['svelte:window', 'Window'], - ['svelte:document', 'Document'] + ['svelte:body', 'Body'] ]); const valid_meta_tags = [...metaTags.keys(), 'svelte:self', 'svelte:component']; @@ -101,7 +101,7 @@ export default function tag(parser: Parser) { const slug = metaTags.get(name).toLowerCase(); if (isClosingTag) { if ( - (name === 'svelte:window' || name === 'svelte:document') && + (name === 'svelte:window' || name === 'svelte:body') && parser.current().children.length ) { parser.error({ @@ -540,4 +540,4 @@ function readSequence(parser: Parser, done: () => boolean) { code: `unexpected-eof`, message: `Unexpected end of input` }); -} \ No newline at end of file +} diff --git a/test/parser/samples/error-svelte-selfdestructive/error.json b/test/parser/samples/error-svelte-selfdestructive/error.json index 1b4dc7fdec..bdef619538 100644 --- a/test/parser/samples/error-svelte-selfdestructive/error.json +++ b/test/parser/samples/error-svelte-selfdestructive/error.json @@ -1,10 +1,10 @@ { "code": "invalid-tag-name", - "message": "Valid tag names are svelte:head, svelte:meta, svelte:window, svelte:document, svelte:self or svelte:component", + "message": "Valid tag names are svelte:head, svelte:meta, svelte:window, svelte:body, svelte:self or svelte:component", "pos": 10, "start": { "character": 10, "line": 2, "column": 2 } -} \ No newline at end of file +} diff --git a/test/runtime/samples/document-event/_config.js b/test/runtime/samples/document-event/_config.js index 98e619af0f..f5e4b46f4f 100644 --- a/test/runtime/samples/document-event/_config.js +++ b/test/runtime/samples/document-event/_config.js @@ -1,13 +1,13 @@ export default { - test({ assert, component, target, window }) { + test({ assert, component, window }) { assert.deepEqual(component.events, []); const event1 = new window.Event('mouseenter'); - window.document.dispatchEvent(event1); + window.document.body.dispatchEvent(event1); assert.deepEqual(component.events, ['enter']); const event2 = new window.Event('mouseleave'); - window.document.dispatchEvent(event2); + window.document.body.dispatchEvent(event2); assert.deepEqual(component.events, ['enter', 'leave']); }, -}; \ No newline at end of file +}; diff --git a/test/runtime/samples/document-event/main.html b/test/runtime/samples/document-event/main.html index 6e7ab3a47c..078ae1ee02 100644 --- a/test/runtime/samples/document-event/main.html +++ b/test/runtime/samples/document-event/main.html @@ -6,4 +6,4 @@ } - \ No newline at end of file + From a035676ef054094f189dd7dd7721d80adf6124cd Mon Sep 17 00:00:00 2001 From: Conduitry Date: Wed, 9 Jan 2019 11:09:48 -0500 Subject: [PATCH 016/125] guide: update docs for --- site/content/guide/06-special-components.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/site/content/guide/06-special-components.md b/site/content/guide/06-special-components.md index 47c31c3733..56ee2b4964 100644 --- a/site/content/guide/06-special-components.md +++ b/site/content/guide/06-special-components.md @@ -114,11 +114,9 @@ You can also bind to certain values — so far `innerWidth`, `outerWidth`, `inne ``` -### `` +### `` -TODO REPLACE THIS WITH svelte:body - -The `` tag, just like ``, gives you a convenient way to declaratively add event listeners to the `document` object. This is useful for listening to events that don't fire on `window`, such as `mouseenter` and `mouseleave`. +The `` tag, just like ``, gives you a convenient way to declaratively add event listeners to the `document.body` object. This is useful for listening to events that don't fire on `window`, such as `mouseenter` and `mouseleave`. ### `` From 7bc461f6ee538e583ac409e65f7ed2d2cd54739c Mon Sep 17 00:00:00 2001 From: Conduitry Date: Wed, 9 Jan 2019 11:29:25 -0500 Subject: [PATCH 017/125] site: update readme and tidy package.json --- site/README.md | 83 +++++++++++++---------------------------------- site/package.json | 10 +++--- 2 files changed, 27 insertions(+), 66 deletions(-) diff --git a/site/README.md b/site/README.md index eb3c7013ce..591e3f0cfb 100644 --- a/site/README.md +++ b/site/README.md @@ -1,75 +1,36 @@ -# sapper-template-rollup +## Running locally -A version of the default [Sapper](https://github.com/sveltejs/sapper) template that uses Rollup instead of webpack. To clone it and get started: +Set up the project: ```bash -npx degit sveltejs/sapper-template#rollup my-app -cd my-app -npm install # or yarn! -npm run dev +git clone https://github.com/sveltejs/svelte.git +cd svelte/site +npm ci +npm run update ``` -Open up [localhost:3000](http://localhost:3000) and start clicking around. - -Consult [sapper.svelte.technology](https://sapper.svelte.technology) for help getting started. - -*[Click here for the webpack version of this template](https://github.com/sveltejs/sapper-template)* - -## Structure - -Sapper expects to find three directories in the root of your project — `app`, `assets` and `routes`. - - -### app - -The [app](app) directory contains the entry points for your app — `client.js`, `server.js` and (optionally) a `service-worker.js` — along with a `template.html` file. +Start the server with `npm run dev`, and navigate to [localhost:3000](http://localhost:3000). +## Using a local copy of Svelte -### assets +By default, the REPL will fetch the most recent version of Svelte from https://unpkg.com/svelte. If you need to test a local version of Svelte, you can do so by linking it and navigating to [localhost:3000/repl?version=local](http://localhost:3000/repl?version=local): -The [assets](assets) directory contains any static assets that should be available. These are served using [sirv](https://github.com/lukeed/sirv). - -In your [service-worker.js](app/service-worker.js) file, you can import these as `assets` from the generated manifest... +```bash +cd /path/to/svelte +npm link +npm run dev # rebuild Svelte on changes -```js -import { assets } from './manifest/service-worker.js'; +cd /path/to/svelte/site +npm link svelte +npm run dev ``` -...so that you can cache them (though you can choose not to, for example if you don't want to cache very large files). - - -### routes - -This is the heart of your Sapper app. There are two kinds of routes — *pages*, and *server routes*. - -**Pages** are Svelte components written in `.html` files. When a user first visits the application, they will be served a server-rendered version of the route in question, plus some JavaScript that 'hydrates' the page and initialises a client-side router. From that point forward, navigating to other pages is handled entirely on the client for a fast, app-like feel. (Sapper will preload and cache the code for these subsequent pages, so that navigation is instantaneous.) +## REPL GitHub integration -**Server routes** are modules written in `.js` files, that export functions corresponding to HTTP methods. Each function receives Express `request` and `response` objects as arguments, plus a `next` function. This is useful for creating a JSON API, for example. +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: -There are three simple rules for naming the files that define your routes: - -* A file called `routes/about.html` corresponds to the `/about` route. A file called `routes/blog/[slug].html` corresponds to the `/blog/:slug` route, in which case `params.slug` is available to the route -* The file `routes/index.html` (or `routes/index.js`) corresponds to the root of your app. `routes/about/index.html` is treated the same as `routes/about.html`. -* Files and directories with a leading underscore do *not* create routes. This allows you to colocate helper modules and components with the routes that depend on them — for example you could have a file called `routes/_helpers/datetime.js` and it would *not* create a `/_helpers/datetime` route - - -## Rollup config - -Sapper uses Rollup to provide code-splitting and dynamic imports, as well as compiling your Svelte components. As long as you don't do anything daft, you can edit the configuration files to add whatever plugins you'd like. - - -## Production mode and deployment - -To start a production version of your app, run `npm run build && npm start`. - -You can deploy your application to any environment that supports Node 8 or above. As an example, to deploy to [Now](https://zeit.co/now), run these commands: - -```bash -npm install -g now -now ``` - - -## Bugs and feedback - -Sapper is in early development, and may have the odd rough edge here and there. Please be vocal over on the [Sapper issue tracker](https://github.com/sveltejs/sapper/issues). +GITHUB_CLIENT_ID=[your app's client id] +GITHUB_CLIENT_SECRET=[your app's client secret] +BASEURL=http://localhost:3000 +``` diff --git a/site/package.json b/site/package.json index 7ecd42b767..2e633b774c 100644 --- a/site/package.json +++ b/site/package.json @@ -1,17 +1,17 @@ { - "name": "TODO", - "description": "TODO", - "version": "0.0.1", + "name": "svelte.technology", + "version": "1.0.0", + "description": "Docs and examples for Svelte", "scripts": { "dev": "sapper dev", "sapper": "sapper build --legacy", - "update_template": "sh ./scripts/update_template.sh", + "update": "sh scripts/update_template.sh && node scripts/get-contributors.js", "start": "node __sapper__/build", "cy:run": "cypress run", "cy:open": "cypress open", "test": "run-p --race dev cy:run", "deploy": "npm run stage && now alias", - "prestage": "npm run update_template && node scripts/get-contributors.js && npm run sapper", + "prestage": "npm run update && npm run sapper", "stage": "now" }, "dependencies": { From 3a7b9adc7f7e50bda86839f17f7052648e20bc66 Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Tue, 8 Jan 2019 23:51:45 -0500 Subject: [PATCH 018/125] pull contextual deps through for member exprs in this bindings - fixes #1916 --- .../render-dom/wrappers/Element/Binding.ts | 8 ++- .../render-dom/wrappers/Element/index.ts | 21 +++++-- .../binding-this-with-context/_config.js | 59 +++++++++++++++++++ .../binding-this-with-context/main.html | 28 +++++++++ 4 files changed, 109 insertions(+), 7 deletions(-) create mode 100644 test/runtime/samples/binding-this-with-context/_config.js create mode 100644 test/runtime/samples/binding-this-with-context/main.html diff --git a/src/compile/render-dom/wrappers/Element/Binding.ts b/src/compile/render-dom/wrappers/Element/Binding.ts index 3877d6fa04..8b34682f8c 100644 --- a/src/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compile/render-dom/wrappers/Element/Binding.ts @@ -24,7 +24,8 @@ export default class BindingWrapper { handler: { usesContext: boolean; mutation: string; - contextual_dependencies: Set + contextual_dependencies: Set, + snippet?: string }; snippet: string; initialUpdate: string; @@ -238,9 +239,10 @@ function getEventHandler( if (binding.node.expression.node.type === 'MemberExpression') { return { - usesContext: false, + usesContext: binding.node.expression.usesContext, mutation: `${snippet} = ${value};`, - contextual_dependencies: new Set() + contextual_dependencies: binding.node.expression.contextual_dependencies, + snippet }; } diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts index abfef21bcc..f9e89cb142 100644 --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -493,15 +493,28 @@ export default class ElementWrapper extends Wrapper { const { handler, object } = this_binding; + const args = []; + for (const arg of handler.contextual_dependencies) { + args.push(arg); + block.addVariable(arg, `ctx.${arg}`); + } + renderer.component.partly_hoisted.push(deindent` - function ${name}($$node) { - ${handler.mutation} + function ${name}(${['$$node', 'check'].concat(args).join(', ')}) { + ${handler.snippet ? `if ($$node || (!$$node && ${handler.snippet} === check)) ` : ''}${handler.mutation} $$invalidate('${object}', ${object}); } `); - block.builders.mount.addLine(`@add_binding_callback(() => ctx.${name}(${this.var}));`); - block.builders.destroy.addLine(`ctx.${name}(null);`); + block.builders.mount.addLine(`@add_binding_callback(() => ctx.${name}(${[this.var, 'null'].concat(args).join(', ')}));`); + block.builders.destroy.addLine(`ctx.${name}(${['null', this.var].concat(args).join(', ')});`); + block.builders.update.addLine(deindent` + if (changed.items) { + ctx.${name}(${['null', this.var].concat(args).join(', ')}); + ${args.map(a => `${a} = ctx.${a}`).join(', ')}; + ctx.${name}(${[this.var, 'null'].concat(args).join(', ')}); + }` + ); } } diff --git a/test/runtime/samples/binding-this-with-context/_config.js b/test/runtime/samples/binding-this-with-context/_config.js new file mode 100644 index 0000000000..33ef091b33 --- /dev/null +++ b/test/runtime/samples/binding-this-with-context/_config.js @@ -0,0 +1,59 @@ +export default { + html: `
foo
bar
baz
+ foobarbaz +
  • foo

  • bar

  • baz

+



`, + + test({ assert, component, target }) { + let elems = target.querySelectorAll('div'); + assert.equal(component.divs.length, 3, 'three divs are registered (unkeyed array)'); + component.divs.forEach((e, i) => { + assert.equal(e, elems[i], `div ${i} is correct (unkeyed array)`); + }); + + elems = target.querySelectorAll('span'); + assert.equal(Object.keys(component.spans).length, 3, 'three spans are registered (unkeyed object)'); + component.items.forEach((e, i) => { + assert.equal(component.spans[`-${e}${i}`], elems[i], `span -${e}${i} is correct (unkeyed object)`); + }); + + elems = target.querySelectorAll('p'); + assert.equal(component.ps.length, 3, 'three ps are registered (keyed array)'); + component.ps.forEach((e, i) => { + assert.equal(e, elems[i], `p ${i} is correct (keyed array)`); + }); + + elems = target.querySelectorAll('hr'); + assert.equal(Object.keys(component.hrs).length, 3, 'three hrs are registered (keyed object)'); + component.items.forEach((e, i) => { + assert.equal(component.hrs[e], elems[i], `hr ${e} is correct (keyed object)`); + }); + + component.items = ['foo', 'baz']; + assert.equal(component.divs.length, 3, 'the divs array is still 3 long'); + assert.equal(component.divs[2], null, 'the last div is unregistered'); + assert.equal(component.ps[2], null, 'the last p is unregistered'); + assert.equal(component.spans['-bar1'], null, 'the bar span is unregisterd'); + assert.equal(component.hrs.bar, null, 'the bar hr is unregisterd'); + + elems = target.querySelectorAll('div'); + component.divs.forEach((e, i) => { + assert.equal(e, elems[i], `div ${i} is still correct`); + }); + + elems = target.querySelectorAll('span'); + component.items.forEach((e, i) => { + assert.equal(component.spans[`-${e}${i}`], elems[i], `span -${e}${i} is still correct`); + }); + + elems = target.querySelectorAll('p'); + component.ps.forEach((e, i) => { + assert.equal(e, elems[i], `p ${i} is still correct`); + }); + + elems = target.querySelectorAll('hr'); + component.items.forEach((e, i) => { + assert.equal(component.hrs[e], elems[i], `hr ${e} is still correct`); + }); + } +}; diff --git a/test/runtime/samples/binding-this-with-context/main.html b/test/runtime/samples/binding-this-with-context/main.html new file mode 100644 index 0000000000..673800188c --- /dev/null +++ b/test/runtime/samples/binding-this-with-context/main.html @@ -0,0 +1,28 @@ + + +{#each items as item, j} +
{item}
+{/each} + +{#each Object.entries(items) as [ key, val ] } + {val} +{/each} + +
    + {#each items as thing, j (thing)} +
  • {thing}

  • + {/each} +
+ +
    + {#each items as sure, j (sure)} +

  • + {/each} +
\ No newline at end of file From 2b1be6f8ae03dc9f86ac2277e5783c637379e1cb Mon Sep 17 00:00:00 2001 From: David Pershouse Date: Thu, 10 Jan 2019 17:07:42 +1000 Subject: [PATCH 019/125] convert update_template.sh to js for windows support --- site/package.json | 3 ++- site/scripts/update_template.js | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 site/scripts/update_template.js diff --git a/site/package.json b/site/package.json index 2e633b774c..b9390f3c39 100644 --- a/site/package.json +++ b/site/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "sapper dev", "sapper": "sapper build --legacy", - "update": "sh scripts/update_template.sh && node scripts/get-contributors.js", + "update": "node scripts/update_template.js && node scripts/get-contributors.js", "start": "node __sapper__/build", "cy:run": "cypress run", "cy:open": "cypress open", @@ -29,6 +29,7 @@ "passport-github": "^1.1.0", "prismjs": "^1.15.0", "session-file-store": "^1.2.0", + "shelljs": "^0.8.3", "sirv": "^0.2.0", "yootils": "0.0.14" }, diff --git a/site/scripts/update_template.js b/site/scripts/update_template.js new file mode 100644 index 0000000000..23e2333bab --- /dev/null +++ b/site/scripts/update_template.js @@ -0,0 +1,26 @@ +const sh = require('shelljs'); +const fs = require('fs') + +sh.cd(__dirname+'/../') + +// fetch svelte app +sh.rm('-rf','scripts/svelte-app') +sh.exec('npx degit sveltejs/template scripts/svelte-app') + +// update repl-viewer.css based on template +sh.cp('scripts/svelte-app/public/global.css', 'static/repl-viewer.css') + +// remove src (will be recreated client-side) and node_modules +sh.rm('-rf', 'scripts/svelte-app/src') +sh.rm('-rf', 'scripts/svelte-app/node_modules') + +// build svelte-app.json +const appPath = 'scripts/svelte-app' +let files = [] + +for (const path of sh.find(appPath).filter(p => fs.lstatSync(p).isFile()) ) { + files.push({ path: path.slice(appPath.length + 1), data: fs.readFileSync(path).toString() }); +} + +fs.writeFileSync('static/svelte-app.json', JSON.stringify(files)); + From 5ff3e7f52a65c66df1ce2c41eac9114c1fb4bbcb Mon Sep 17 00:00:00 2001 From: David Pershouse Date: Thu, 10 Jan 2019 17:07:58 +1000 Subject: [PATCH 020/125] remove redundant bash based update script --- site/scripts/update_template.sh | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100755 site/scripts/update_template.sh diff --git a/site/scripts/update_template.sh b/site/scripts/update_template.sh deleted file mode 100755 index 59ab3cb0cd..0000000000 --- a/site/scripts/update_template.sh +++ /dev/null @@ -1,15 +0,0 @@ -cd `dirname $0`/.. - -# fetch svelte-app -rm -rf scripts/svelte-app -node_modules/.bin/degit sveltejs/template scripts/svelte-app - -# update repl-viewer.css based on template -cp scripts/svelte-app/public/global.css static/repl-viewer.css - -# remove src (will be recreated client-side) and node_modules -rm -rf scripts/svelte-app/src -rm -rf scripts/svelte-app/node_modules - -# build svelte-app.json -node scripts/build-svelte-app-json.js `find scripts/svelte-app -type f` From 9b7d0152bc8b5d33a14bf67ea1d8bc3a8e1bde08 Mon Sep 17 00:00:00 2001 From: David Pershouse Date: Thu, 10 Jan 2019 17:39:10 +1000 Subject: [PATCH 021/125] handle markdown on windows machines --- site/src/utils/_process_markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/utils/_process_markdown.js b/site/src/utils/_process_markdown.js index a79d759cbb..f760018a3b 100644 --- a/site/src/utils/_process_markdown.js +++ b/site/src/utils/_process_markdown.js @@ -1,5 +1,5 @@ export default function process_markdown(markdown) { - const match = /---\n([\s\S]+?)\n---/.exec(markdown); + const match = /---\r?\n([\s\S]+?)\r?\n---/.exec(markdown); const frontMatter = match[1]; const content = markdown.slice(match[0].length); From 2c537e7cb43dea55de2f47d2e031c9d98a9b7e69 Mon Sep 17 00:00:00 2001 From: David Pershouse Date: Fri, 11 Jan 2019 13:19:00 +1000 Subject: [PATCH 022/125] POC for postmessage Repl --- .../repl/_components/Output/Viewer.html | 260 +++++++++++------- site/static/repl-runner.js | 136 +++++++++ 2 files changed, 293 insertions(+), 103 deletions(-) create mode 100644 site/static/repl-runner.js diff --git a/site/src/routes/repl/_components/Output/Viewer.html b/site/src/routes/repl/_components/Output/Viewer.html index ef377b8b3c..9cfe5a5942 100644 --- a/site/src/routes/repl/_components/Output/Viewer.html +++ b/site/src/routes/repl/_components/Output/Viewer.html @@ -14,9 +14,14 @@ export let error; export function setProp(prop, value) { - if (component) { - component[prop] = value; - } + if (!refs.child) return; + refs.child.contentWindow.postMessage({ + action: 'set_prop', + args: { + prop: prop, + value: value + } + },'*'); } let component; @@ -81,9 +86,84 @@ onMount(() => { refs.child.addEventListener('load', () => { const iframe = refs.child; - const body = iframe.contentDocument.body; - const evalInIframe = iframe.contentWindow.eval; + let evalId = 1; + let fetchId = 1; + let fetchHandler = null; + let pendingResults = new Map(); + + const evalInIframe = function(scriptToEval) { + let id = evalId++; + let promise = new Promise((resolve,reject) => { + iframe.contentWindow.postMessage({ + action: "eval", + args: { + evalId: id, + script: scriptToEval + } + }, '*') + pendingResults.set(id, { resolve: resolve, reject: reject }); + }); + return promise; + } + + const handleReplMessage = (ev) => { + console.log("got message in parent", ev.data); + let action = ev.data.action; + if (action == "evalError") { + let { message, stack, evalId } = ev.data.args; + let e = new Error(message); + e.stack = e.stack; + let resultHandler = pendingResults.get(evalId); + if (resultHandler) { + pendingResults.delete(evalId); + resultHandler.reject(e); + } else { + console.err("error evaluating script in iframe", e); + } + } + + if (action == "evalOk") { + let { evalId } = ev.data.args; + let resultHandler = pendingResults.get(evalId); + if (resultHandler) { + pendingResults.delete(evalId); + resultHandler.resolve(); + } + } + + if (action == "prop_update") { + let { prop, value } = ev.data.args; + dispatch('binding', { prop, value }); + values_store.update(values => Object.assign({}, values, { + [prop]: value + })); + } + + if (action == "fetch_complete") { + console.log(fetchHandler, ev.data.args); + if (fetchHandler && fetchHandler.fetchId == ev.data.args.fetchId) { + fetchHandler.resolve() + fetchHandler = null; + } + } + if (action == "fetch_error") { + if (fetchHandler && fetchHandler.fetchId == ev.data.args.fetchId) { + fetchHandler.reject(new Error(ev.data.args.message)); + fetchHandler = null; + } + } + if (action == "fetch_progress") { + if (fetchHandler && fetchHandler.fetchId == ev.data.args.fetchId) { + pendingImports = ev.data.args.remaining; + } + } + } + + window.addEventListener("message", handleReplMessage, false); + + // iframe.contentWindow.eval; + /* TODO // intercept links, so that we can use #hashes inside the iframe body.addEventListener('click', event => { if (event.which !== 1) return; @@ -109,6 +189,7 @@ window.open(el.href, '_blank'); }); + */ let promise = null; let updating = false; @@ -121,11 +202,14 @@ const imports = []; const missingImports = bundle.imports.filter(x => !importCache[x]); + const removeStyles = () => { - const styles = iframe.contentDocument.querySelectorAll('style.svelte'); - let i = styles.length; - while (i--) styles[i].parentNode.removeChild(styles[i]); + evalInIframe(` + const styles = document.querySelectorAll('style.svelte'); + let i = styles.length; + while (i--) styles[i].parentNode.removeChild(styles[i]); + `) }; const ready = () => { @@ -137,14 +221,7 @@ toDestroy.$destroy(); toDestroy = null; } - - bundle.imports.forEach(x => { - const module = importCache[x]; - const name = bundle.importMap.get(x); - - iframe.contentWindow[name] = module; - }); - + if (ssr) { // this only gets generated if component uses lifecycle hooks pending = true; createHtml(); @@ -155,54 +232,45 @@ }; const createHtml = () => { - try { - evalInIframe(`${ssr.code} - var rendered = SvelteComponent.render(${JSON.stringify($values_store)}); - - if (rendered.css.code) { - var style = document.createElement('style'); - style.className = 'svelte'; - style.textContent = rendered.css.code; - document.head.appendChild(style); - } - - document.body.innerHTML = rendered.html; - `) - } catch (e) { - const loc = getLocationFromStack(e.stack, ssr.map); - if (loc) { - e.filename = loc.source; - e.loc = { line: loc.line, column: loc.column }; + + evalInIframe(`${ssr.code} + var rendered = SvelteComponent.render(${JSON.stringify($values_store)}); + + if (rendered.css.code) { + var style = document.createElement('style'); + style.className = 'svelte'; + style.textContent = rendered.css.code; + document.head.appendChild(style); } - error = e; - } - }; + document.body.innerHTML = rendered.html; + `).catch( e => { + + const loc = getLocationFromStack(e.stack, ssr.map); + if (loc) { + e.filename = loc.source; + e.loc = { line: loc.line, column: loc.column }; + } + error = e; + }); + }; + const createComponent = () => { // remove leftover styles from SSR renderer if (ssr) removeStyles(); - try { - evalInIframe(`${dom.code} - document.body.innerHTML = ''; - window.location.hash = ''; - window._svelteTransitionManager = null; - - var component = new SvelteComponent({ - target: document.body, - props: ${JSON.stringify($values_store)} - });`); - - component = window.app = window.component = iframe.contentWindow.component; - - // component.on('state', ({ current }) => { - // if (updating) return; - // updating = true; - // this.fire('data', { current }); - // updating = false; - // }); - } catch (e) { + evalInIframe(`${dom.code} + document.body.innerHTML = ''; + window.location.hash = ''; + window._svelteTransitionManager = null; + + window.component = new SvelteComponent({ + target: document.body, + props: ${JSON.stringify($values_store)} + });`) + .catch(e=> { + // TODO show in UI component = null; @@ -213,35 +281,31 @@ } error = e; - } + }); }; - - pendingImports = missingImports.length; - - if (missingImports.length) { - let cancelled = false; - - promise = Promise.all( - missingImports.map(id => fetchImport(id, iframe.contentWindow.curl).then(module => { - pendingImports -= 1; - return module; - })) - ); - promise.cancel = () => cancelled = true; - - promise - .then(() => { - if (cancelled) return; - ready(); - }) - .catch(e => { - if (cancelled) return; - error = e; - }); - } else { + + + new Promise((resolve, reject)=> { + fetchHandler = { + fetchId: fetchId++, + resolve: resolve, + reject: reject + } + iframe.contentWindow.postMessage({ + action: "fetch_imports", + args: { + bundle: bundle, + fetchId: fetchHandler.fetchId + } + }, '*'); + }) + .then(() => { ready(); - } - + }) + .catch(e => { + error = e; + }); + run = () => { pending = false; @@ -252,7 +316,7 @@ bundle_handler = bundle => { if (!bundle) return; // TODO can this ever happen? - if (promise) promise.cancel(); + if (fetchHandler) fetchHandler = null; toDestroy = component; component = null; @@ -261,23 +325,12 @@ }; props_handler = props => { - if (!component) { - // TODO can this happen? - console.error(`no component to bind to`); - return; - } - - props.forEach(prop => { - // TODO should there be a public API for binding? - // e.g. `component.$watch(prop, handler)`? - // (answer: probably) - component.$$.bound[prop] = value => { - dispatch('binding', { prop, value }); - values_store.update(values => Object.assign({}, values, { - [prop]: value - })); - }; - }); + iframe.contentWindow.postMessage({ + action:"bind_props", + args: { + props: [...props] + } + },'*') }; }); }); @@ -346,7 +399,7 @@
- diff --git a/site/static/repl-runner.js b/site/static/repl-runner.js new file mode 100644 index 0000000000..d346ad1fc5 --- /dev/null +++ b/site/static/repl-runner.js @@ -0,0 +1,136 @@ + + + +const importCache = {}; + + + +function fetchImport(id) { + return new Promise((fulfil, reject) => { + curl([`https://bundle.run/${id}`]).then(module => { + importCache[id] = module; + fulfil(module); + }, err => { + console.error(err.stack); + reject(new Error(`Error loading ${id} from bundle.run`)); + }); + }); +} + +function fetchImports(bundle, progressFunc) { + const missingImports = bundle.imports.filter(x => !importCache[x]); + let pendingImports = missingImports.length; + + if (missingImports.length) { + let promise = Promise.all( + missingImports.map(id => fetchImport(id).then(() => { + pendingImports -= 1; + if (progressFunc) progressFunc(pendingImports); + })) + ); + + return promise + } else { + return P.resolve(); + } +} + + + +function handleMessage(ev) { + if (ev.data.action == "eval") { + let { script, evalId } = ev.data.args; + try { + eval(script); + parent.postMessage({ + action: "evalOk", + args: { + evalId: evalId + } + }, ev.origin); + } catch (e) { + parent.postMessage({ + action: "evalError", + args: { + evalId: evalId, + stack: e.stack, + message: e.message + } + }, ev.origin); + } + } + + if (ev.data.action == "bind_props") { + let { props } = ev.data.args + + if (!window.component) { + // TODO can this happen? + console.error(`no component to bind to`); + return; + } + + props.forEach(prop => { + // TODO should there be a public API for binding? + // e.g. `component.$watch(prop, handler)`? + // (answer: probably) + window.component.$$.bound[prop] = value => { + parent.postMessage({ + action: "propUpdate", + args: { + prop: prop, + value: value + } + }, ev.origin); + }; + }); + } + + if (ev.data.action == "set_prop") { + if (!window.component) { + return; + } + let { prop, value } = ev.data.args; + component[prop] = value; + } + + if (ev.data.action == "fetch_imports") { + let { bundle, fetchId } = ev.data.args; + fetchImports(bundle, (remaining) => { + parent.postMessage({ + action: "fetch_progress", + args: { + fetchId: fetchId, + remaining: remaining + } + }, ev.origin); + }) + .then(() => { + bundle.imports.forEach(x=> { + const module = importCache[x]; + const name = bundle.importMap.get(x); + window[name] = module; + }); + + parent.postMessage({ + action: "fetch_complete", + args: { + fetchId: fetchId + } + }, ev.origin); + }) + .catch(e => { + parent.postMessage({ + action: "fetch_error", + args: { + fetchId: fetchId, + message: e.message + } + }, ev.origin); + }) + } +} + +window.addEventListener("message", handleMessage, false) + +console.log("repl-runner initialized"); + From 6c89975396ed2fcedee1053711e5c819203d9ba2 Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Fri, 11 Jan 2019 01:14:00 -0500 Subject: [PATCH 023/125] gather event listeners for slot default elements and render in a condition - fixes #1977 --- src/compile/render-dom/Block.ts | 50 ++++++++++--------- src/compile/render-dom/wrappers/Slot.ts | 4 ++ .../Nested.html | 7 +++ .../_config.js | 3 ++ .../main.html | 7 +++ 5 files changed, 48 insertions(+), 23 deletions(-) create mode 100644 test/runtime/samples/component-slot-used-with-default-event/Nested.html create mode 100644 test/runtime/samples/component-slot-used-with-default-event/_config.js create mode 100644 test/runtime/samples/component-slot-used-with-default-event/main.html diff --git a/src/compile/render-dom/Block.ts b/src/compile/render-dom/Block.ts index bee2072ef1..a7b53161a4 100644 --- a/src/compile/render-dom/Block.ts +++ b/src/compile/render-dom/Block.ts @@ -234,29 +234,7 @@ export default class Block { this.builders.mount.addLine(`${this.autofocus}.focus();`); } - if (this.event_listeners.length > 0) { - this.addVariable('#dispose'); - - if (this.event_listeners.length === 1) { - this.builders.hydrate.addLine( - `#dispose = ${this.event_listeners[0]};` - ); - - this.builders.destroy.addLine( - `#dispose();` - ) - } else { - this.builders.hydrate.addBlock(deindent` - #dispose = [ - ${this.event_listeners.join(',\n')} - ]; - `); - - this.builders.destroy.addLine( - `@run_all(#dispose);` - ); - } - } + this.renderListeners(); const properties = new CodeBuilder(); @@ -403,6 +381,32 @@ export default class Block { }); } + renderListeners(chunk: string = '') { + if (this.event_listeners.length > 0) { + this.addVariable(`#dispose${chunk}`); + + if (this.event_listeners.length === 1) { + this.builders.hydrate.addLine( + `#dispose${chunk} = ${this.event_listeners[0]};` + ); + + this.builders.destroy.addLine( + `#dispose${chunk}();` + ) + } else { + this.builders.hydrate.addBlock(deindent` + #dispose${chunk} = [ + ${this.event_listeners.join(',\n')} + ]; + `); + + this.builders.destroy.addLine( + `@run_all(#dispose${chunk});` + ); + } + } + } + toString() { const localKey = this.key && this.getUniqueName('key'); diff --git a/src/compile/render-dom/wrappers/Slot.ts b/src/compile/render-dom/wrappers/Slot.ts index 954c4c56ef..2788fc075b 100644 --- a/src/compile/render-dom/wrappers/Slot.ts +++ b/src/compile/render-dom/wrappers/Slot.ts @@ -72,7 +72,11 @@ export default class SlotWrapper extends Wrapper { block.builders.update.pushCondition(`!${content_name}`); block.builders.destroy.pushCondition(`!${content_name}`); + const listeners = block.event_listeners; + block.event_listeners = []; this.fragment.render(block, parentNode, parentNodes); + block.renderListeners(`_${content_name}`); + block.event_listeners = listeners; block.builders.create.popCondition(); block.builders.hydrate.popCondition(); diff --git a/test/runtime/samples/component-slot-used-with-default-event/Nested.html b/test/runtime/samples/component-slot-used-with-default-event/Nested.html new file mode 100644 index 0000000000..2682f7168b --- /dev/null +++ b/test/runtime/samples/component-slot-used-with-default-event/Nested.html @@ -0,0 +1,7 @@ + + +

+ +

\ No newline at end of file diff --git a/test/runtime/samples/component-slot-used-with-default-event/_config.js b/test/runtime/samples/component-slot-used-with-default-event/_config.js new file mode 100644 index 0000000000..4a174a9a05 --- /dev/null +++ b/test/runtime/samples/component-slot-used-with-default-event/_config.js @@ -0,0 +1,3 @@ +export default { + html: '

Hello

', show: true +}; diff --git a/test/runtime/samples/component-slot-used-with-default-event/main.html b/test/runtime/samples/component-slot-used-with-default-event/main.html new file mode 100644 index 0000000000..06a1f64cae --- /dev/null +++ b/test/runtime/samples/component-slot-used-with-default-event/main.html @@ -0,0 +1,7 @@ + + + + Hello + \ No newline at end of file From 1f77ee3461a4029c26397a6c00e3b65c27802b6a Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Fri, 11 Jan 2019 01:15:23 -0500 Subject: [PATCH 024/125] use statement tree for code builder instead of strings to avoid conditional interference --- src/utils/CodeBuilder.ts | 199 ++++++++++++++------------------------- 1 file changed, 71 insertions(+), 128 deletions(-) diff --git a/src/utils/CodeBuilder.ts b/src/utils/CodeBuilder.ts index 05e26b232c..79fb19d85d 100644 --- a/src/utils/CodeBuilder.ts +++ b/src/utils/CodeBuilder.ts @@ -1,168 +1,111 @@ import repeat from './repeat'; -enum ChunkType { - Line, - Block +const whitespace = /^\s+$/; + +interface Chunk { + parent?: BlockChunk; + type: 'root'|'line'|'condition'; + children?: Chunk[]; + line?: string; + block?: boolean; + condition?: string; } -interface Condition { - condition: string; - used: boolean; +interface BlockChunk extends Chunk { + type: 'root'|'condition'; + children: Chunk[]; + parent: BlockChunk; } export default class CodeBuilder { - result: string; - first: ChunkType; - last: ChunkType; - lastCondition: string; - conditionStack: Condition[]; - indent: string; + root: BlockChunk = { type: 'root', children: [], parent: null }; + last: Chunk; + current: BlockChunk; constructor(str = '') { - this.result = str; - - const initial = str - ? /\n/.test(str) ? ChunkType.Block : ChunkType.Line - : null; - this.first = initial; - this.last = initial; - - this.lastCondition = null; - this.conditionStack = []; - this.indent = ''; + this.current = this.last = this.root; + this.addLine(str); } addConditional(condition: string, body: string) { - this.reifyConditions(); - - const indent = this.indent + (condition ? '\t' : ''); - body = body.replace(/^/gm, indent); - - if (condition === this.lastCondition) { - this.result += `\n${body}`; + if (this.last.type === 'condition' && this.last.condition === condition) { + if (body && !whitespace.test(body)) this.last.children.push({ type: 'line', line: body }); } else { - if (this.lastCondition) { - this.result += `\n${this.indent}}`; - } - - const block = condition - ? `if (${condition}) {\n${body}` - : body; - - this.result += `${this.last === ChunkType.Block ? '\n\n' : '\n'}${this.indent}${block}`; - this.lastCondition = condition; + const next = this.last = { type: 'condition', condition, parent: this.current, children: [] }; + this.current.children.push(next); + if (body && !whitespace.test(body)) next.children.push({ type: 'line', line: body }); } - - this.last = ChunkType.Block; } addLine(line: string) { - this.reifyConditions(); - - if (this.lastCondition) { - this.result += `\n${this.indent}}`; - this.lastCondition = null; - } - - if (this.last === ChunkType.Block) { - this.result += `\n\n${this.indent}${line}`; - } else if (this.last === ChunkType.Line) { - this.result += `\n${this.indent}${line}`; - } else { - this.result += line; - } - - this.last = ChunkType.Line; - if (!this.first) this.first = ChunkType.Line; + if (line && !whitespace.test(line)) this.current.children.push(this.last = { type: 'line', line }); } addLineAtStart(line: string) { - this.reifyConditions(); - - if (this.first === ChunkType.Block) { - this.result = `${line}\n\n${this.indent}${this.result}`; - } else if (this.first === ChunkType.Line) { - this.result = `${line}\n${this.indent}${this.result}`; - } else { - this.result += line; - } - - this.first = ChunkType.Line; - if (!this.last) this.last = ChunkType.Line; + if (line && !whitespace.test(line)) this.root.children.unshift({ type: 'line', line }); } addBlock(block: string) { - this.reifyConditions(); - - if (this.indent) block = block.replace(/^/gm, `${this.indent}`); - - if (this.lastCondition) { - this.result += `\n${this.indent}}`; - this.lastCondition = null; - } - - if (this.result) { - this.result += `\n\n${this.indent}${block}`; - } else { - this.result += block; - } - - this.last = ChunkType.Block; - if (!this.first) this.first = ChunkType.Block; + if (block && !whitespace.test(block)) this.current.children.push(this.last = { type: 'line', line: block, block: true }); } addBlockAtStart(block: string) { - this.reifyConditions(); - - if (this.result) { - this.result = `${block}\n\n${this.indent}${this.result}`; - } else { - this.result += block; - } - - this.first = ChunkType.Block; - if (!this.last) this.last = ChunkType.Block; + if (block && !whitespace.test(block)) this.root.children.unshift({ type: 'line', line: block, block: true }); } - isEmpty() { - return this.result === ''; - } + isEmpty() { return !findLine(this.root); } pushCondition(condition: string) { - this.conditionStack.push({ condition, used: false }); + if (this.last.type === 'condition' && this.last.condition === condition) { + this.current = this.last as BlockChunk; + } else { + const next = this.last = { type: 'condition', condition, parent: this.current, children: [] }; + this.current.children.push(next); + this.current = next; + } } popCondition() { - const { used } = this.conditionStack.pop(); + if (!this.current.parent) throw new Error(`Popping a condition that maybe wasn't pushed.`); + this.current = this.current.parent; + } - this.indent = repeat('\t', this.conditionStack.length); - if (used) this.addLine('}'); + toString() { + return chunkToString(this.root); } +} - reifyConditions() { - for (let i = 0; i < this.conditionStack.length; i += 1) { - const condition = this.conditionStack[i]; - if (!condition.used) { - const line = `if (${condition.condition}) {`; - - if (this.last === ChunkType.Block) { - this.result += `\n\n${this.indent}${line}`; - } else if (this.last === ChunkType.Line) { - this.result += `\n${this.indent}${line}`; - } else { - this.result += line; - } - - this.last = ChunkType.Line; - if (!this.first) this.first = ChunkType.Line; - - this.indent = repeat('\t', this.conditionStack.length); - condition.used = true; - } - } +function findLine(chunk: BlockChunk) { + for (const c of chunk.children) { + if (c.type === 'line' || findLine(c as BlockChunk)) return true; } + return false; +} - toString() { - return this.result.trim() + (this.lastCondition ? `\n}` : ``); +function chunkToString(chunk: Chunk, level: number = 0, lastBlock?: boolean, first?: boolean): string { + if (chunk.type === 'line') { + return `${lastBlock || (!first && chunk.block) ? '\n' : ''}${chunk.line.replace(/^/gm, repeat('\t', level))}`; + } else if (chunk.type === 'condition') { + let t = false; + const lines = chunk.children.map((c, i) => { + const str = chunkToString(c, level + 1, t, i === 0); + t = c.type !== 'line' || c.block; + return str; + }).filter(l => !!l); + + if (!lines.length) return ''; + + return `${lastBlock || (!first) ? '\n' : ''}${repeat('\t', level)}if (${chunk.condition}) {\n${lines.join('\n')}\n${repeat('\t', level)}}`; + } else if (chunk.type === 'root') { + let t = false; + const lines = chunk.children.map((c, i) => { + const str = chunkToString(c, 0, t, i === 0); + t = c.type !== 'line' || c.block; + return str; + }).filter(l => !!l); + + if (!lines.length) return ''; + + return lines.join('\n'); } } From 057298a79fe629d15da8acaba087d8416103ed33 Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Fri, 11 Jan 2019 01:18:12 -0500 Subject: [PATCH 025/125] fix newline-before-block diffs caused by code builder adjustments --- test/js/samples/if-block-no-update/expected.js | 1 + test/js/samples/if-block-simple/expected.js | 1 + test/js/samples/use-elements-as-anchors/expected.js | 2 ++ 3 files changed, 4 insertions(+) diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index cc01e9791a..3079c3fe6a 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -86,6 +86,7 @@ function create_fragment($$, ctx) { d(detach) { if_block.d(detach); + if (detach) { detachNode(if_block_anchor); } diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index 054ee7219b..b7faca7f19 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -62,6 +62,7 @@ function create_fragment($$, ctx) { d(detach) { if (if_block) if_block.d(detach); + if (detach) { detachNode(if_block_anchor); } diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index e6610407e4..aaead7e6f8 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -237,11 +237,13 @@ function create_fragment($$, ctx) { if (if_block1) if_block1.d(); if (if_block2) if_block2.d(); if (if_block3) if_block3.d(); + if (detach) { detachNode(text7); } if (if_block4) if_block4.d(detach); + if (detach) { detachNode(if_block4_anchor); } From 5eafdd446f265900bfd7f13087a6e5804e0b5dc8 Mon Sep 17 00:00:00 2001 From: David Pershouse Date: Sat, 12 Jan 2019 01:46:33 +1000 Subject: [PATCH 026/125] abstract repl interaction code --- .../repl/_components/Output/Viewer.html | 244 +++++------------- site/src/routes/repl/_utils/replProxy.js | 87 +++++++ site/static/repl-runner.js | 107 ++++---- 3 files changed, 201 insertions(+), 237 deletions(-) create mode 100644 site/src/routes/repl/_utils/replProxy.js diff --git a/site/src/routes/repl/_components/Output/Viewer.html b/site/src/routes/repl/_components/Output/Viewer.html index 9cfe5a5942..e62e0d695b 100644 --- a/site/src/routes/repl/_components/Output/Viewer.html +++ b/site/src/routes/repl/_components/Output/Viewer.html @@ -1,6 +1,7 @@ + +

Hello {name}!

\ No newline at end of file From 0ea384004626bab8c86104a9a907460b72aa7c7f Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 13 Jan 2019 14:19:01 -0500 Subject: [PATCH 028/125] Overhaul transitions - fixes #1906 --- src/compile/render-dom/Block.ts | 21 +- src/compile/render-dom/wrappers/AwaitBlock.ts | 11 +- src/compile/render-dom/wrappers/EachBlock.ts | 103 +++--- .../render-dom/wrappers/Element/index.ts | 53 +-- src/compile/render-dom/wrappers/IfBlock.ts | 106 +++--- .../wrappers/InlineComponent/index.ts | 15 +- src/internal/Component.js | 6 +- src/internal/animations.js | 13 +- src/internal/await-block.js | 3 +- src/internal/keyed-each.js | 11 +- src/internal/style_manager.js | 27 +- src/internal/transitions.js | 305 +++++++++++++----- src/internal/utils.js | 7 - .../action-custom-event-handler/expected.js | 14 +- test/js/samples/action/expected.js | 14 +- test/js/samples/bind-width-height/expected.js | 14 +- .../expected.js | 13 +- .../component-static-array/expected.js | 13 +- .../component-static-immutable/expected.js | 13 +- .../component-static-immutable2/expected.js | 13 +- test/js/samples/component-static/expected.js | 13 +- .../samples/computed-collapsed-if/expected.js | 6 +- test/js/samples/css-media-query/expected.js | 14 +- .../css-shadow-dom-keyframes/expected.js | 14 +- test/js/samples/debug-empty/expected.js | 13 +- .../debug-foo-bar-baz-things/expected.js | 13 +- test/js/samples/debug-foo/expected.js | 13 +- .../samples/deconflict-builtins/expected.js | 13 +- .../js/samples/deconflict-globals/expected.js | 6 +- .../expected.js | 13 +- test/js/samples/do-use-dataset/expected.js | 13 +- .../dont-use-dataset-in-legacy/expected.js | 13 +- .../dont-use-dataset-in-svg/expected.js | 13 +- test/js/samples/dynamic-import/expected.js | 13 +- .../each-block-changed-check/expected.js | 13 +- .../each-block-keyed-animated/expected.js | 27 +- test/js/samples/each-block-keyed/expected.js | 23 +- .../event-handler-no-passive/expected.js | 14 +- test/js/samples/event-modifiers/expected.js | 14 +- .../js/samples/head-no-whitespace/expected.js | 14 +- test/js/samples/hoisted-const/expected.js | 14 +- .../js/samples/if-block-no-update/expected.js | 19 +- test/js/samples/if-block-simple/expected.js | 13 +- .../expected.js | 13 +- .../inline-style-optimized-url/expected.js | 13 +- .../inline-style-optimized/expected.js | 13 +- .../inline-style-unoptimized/expected.js | 13 +- test/js/samples/input-files/expected.js | 14 +- test/js/samples/input-range/expected.js | 14 +- .../input-without-blowback-guard/expected.js | 14 +- .../expected.js | 13 +- .../expected.js | 13 +- .../expected.js | 13 +- .../expected.js | 13 +- test/js/samples/legacy-input-type/expected.js | 14 +- test/js/samples/media-bindings/expected.js | 14 +- .../non-imported-component/expected.js | 19 +- .../samples/select-dynamic-value/expected.js | 14 +- test/js/samples/setup-method/expected.js | 6 +- test/js/samples/svg-title/expected.js | 14 +- test/js/samples/title/expected.js | 6 +- .../use-elements-as-anchors/expected.js | 13 +- .../samples/window-binding-scroll/expected.js | 13 +- test/runtime/index.js | 1 - .../_config.js | 2 +- .../samples/transition-css-delay/_config.js | 10 - .../samples/transition-css-delay/main.html | 17 - .../transition-css-duration/_config.js | 2 + .../transition-css-in-out-in/_config.js | 20 ++ .../transition-css-in-out-in/main.html | 25 ++ .../_config.js | 2 +- .../transition-js-aborted-outro/_config.js | 2 +- .../transition-js-await-block/_config.js | 2 +- .../_config.js | 2 +- .../_config.js | 4 +- .../_config.js | 2 +- .../_config.js | 2 +- 77 files changed, 678 insertions(+), 770 deletions(-) delete mode 100644 test/runtime/samples/transition-css-delay/_config.js delete mode 100644 test/runtime/samples/transition-css-delay/main.html create mode 100644 test/runtime/samples/transition-css-in-out-in/_config.js create mode 100644 test/runtime/samples/transition-css-in-out-in/main.html diff --git a/src/compile/render-dom/Block.ts b/src/compile/render-dom/Block.ts index bee2072ef1..5fdd725a98 100644 --- a/src/compile/render-dom/Block.ts +++ b/src/compile/render-dom/Block.ts @@ -218,11 +218,11 @@ export default class Block { getContents(localKey?: string) { const { dev } = this.renderer.options; - if (this.hasIntroMethod || this.hasOutroMethod) { + if (this.hasOutros) { this.addVariable('#current'); - if (!this.builders.mount.isEmpty()) { - this.builders.mount.addLine(`#current = true;`); + if (!this.builders.intro.isEmpty()) { + this.builders.intro.addLine(`#current = true;`); } if (!this.builders.outro.isEmpty()) { @@ -347,27 +347,22 @@ export default class Block { } if (this.hasIntroMethod || this.hasOutroMethod) { - if (this.builders.mount.isEmpty()) { + if (this.builders.intro.isEmpty()) { properties.addLine(`i: @noop,`); } else { properties.addBlock(deindent` - ${dev ? 'i: function intro' : 'i'}(#target, anchor) { - if (#current) return; + ${dev ? 'i: function intro' : 'i'}() { + ${this.hasOutros && `if (#current) return;`} ${this.builders.intro} - this.m(#target, anchor); }, `); } if (this.builders.outro.isEmpty()) { - properties.addLine(`o: @run,`); + properties.addLine(`o: @noop,`); } else { properties.addBlock(deindent` - ${dev ? 'o: function outro' : 'o'}(#outrocallback) { - if (!#current) return; - - ${this.outros > 1 && `#outrocallback = @callAfter(#outrocallback, ${this.outros});`} - + ${dev ? 'o: function outro' : 'o'}() { ${this.builders.outro} }, `); diff --git a/src/compile/render-dom/wrappers/AwaitBlock.ts b/src/compile/render-dom/wrappers/AwaitBlock.ts index ca1fdcc64e..b987dd7fa9 100644 --- a/src/compile/render-dom/wrappers/AwaitBlock.ts +++ b/src/compile/render-dom/wrappers/AwaitBlock.ts @@ -172,11 +172,15 @@ export default class AwaitBlockWrapper extends Wrapper { const hasTransitions = this.pending.block.hasIntroMethod || this.pending.block.hasOutroMethod; block.builders.mount.addBlock(deindent` - ${info}.block.${hasTransitions ? 'i' : 'm'}(${initialMountNode}, ${info}.anchor = ${anchorNode}); + ${info}.block.m(${initialMountNode}, ${info}.anchor = ${anchorNode}); ${info}.mount = () => ${updateMountNode}; ${info}.anchor = ${anchor}; `); + if (hasTransitions) { + block.builders.intro.addLine(`${info}.block.i();`); + } + const conditions = []; if (this.node.expression.dependencies.size > 0) { conditions.push( @@ -208,13 +212,10 @@ export default class AwaitBlockWrapper extends Wrapper { } if (this.pending.block.hasOutroMethod) { - const countdown = block.getUniqueName('countdown'); block.builders.outro.addBlock(deindent` - const ${countdown} = @callAfter(#outrocallback, 3); for (let #i = 0; #i < 3; #i += 1) { const block = ${info}.blocks[#i]; - if (block) block.o(${countdown}); - else ${countdown}(); + if (block) block.o(); } `); } diff --git a/src/compile/render-dom/wrappers/EachBlock.ts b/src/compile/render-dom/wrappers/EachBlock.ts index 4f56a4c6c9..c713ea5f19 100644 --- a/src/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compile/render-dom/wrappers/EachBlock.ts @@ -60,7 +60,6 @@ export default class EachBlockWrapper extends Wrapper { get_each_context: string; iterations: string; length: string; - mountOrIntro: string; } contextProps: string[]; @@ -102,7 +101,6 @@ export default class EachBlockWrapper extends Wrapper { let c = this.node.start + 2; while (renderer.component.source[c] !== 'e') c += 1; renderer.component.code.overwrite(c, c + 4, 'length'); - const length = `[✂${c}-${c+4}✂]`; this.vars = { create_each_block: this.block.name, @@ -112,8 +110,7 @@ export default class EachBlockWrapper extends Wrapper { length: `[✂${c}-${c+4}✂]`, // filled out later - anchor: null, - mountOrIntro: null + anchor: null }; node.contexts.forEach(prop => { @@ -173,8 +170,6 @@ export default class EachBlockWrapper extends Wrapper { ? block.getUniqueName(`${this.var}_anchor`) : (this.next && this.next.var) || 'null'; - this.vars.mountOrIntro = (this.block.hasIntroMethod || this.block.hasOutroMethod) ? 'i' : 'm'; - this.contextProps = this.node.contexts.map(prop => `child_ctx.${prop.key.name} = list[i]${prop.tail};`); if (this.hasBinding) this.contextProps.push(`child_ctx.${this.vars.each_block_value} = list;`); @@ -198,6 +193,12 @@ export default class EachBlockWrapper extends Wrapper { this.renderUnkeyed(block, parentNode, parentNodes, snippet); } + if (this.block.hasIntroMethod || this.block.hasOutroMethod) { + block.builders.intro.addBlock(deindent` + for (var #i = 0; #i < ${this.vars.each_block_value}.${this.vars.length}; #i += 1) ${this.vars.iterations}[#i].i(); + `); + } + if (needsAnchor) { block.addElement( this.vars.anchor, @@ -209,7 +210,6 @@ export default class EachBlockWrapper extends Wrapper { if (this.else) { const each_block_else = component.getUniqueName(`${this.var}_else`); - const mountOrIntro = (this.else.block.hasIntroMethod || this.else.block.hasOutroMethod) ? 'i' : 'm'; block.builders.init.addLine(`var ${each_block_else} = null;`); @@ -223,7 +223,7 @@ export default class EachBlockWrapper extends Wrapper { block.builders.mount.addBlock(deindent` if (${each_block_else}) { - ${each_block_else}.${mountOrIntro}(${parentNode || '#target'}, null); + ${each_block_else}.m(${parentNode || '#target'}, null); } `); @@ -236,7 +236,7 @@ export default class EachBlockWrapper extends Wrapper { } else if (!${this.vars.each_block_value}.${this.vars.length}) { ${each_block_else} = ${this.else.block.name}($$, ctx); ${each_block_else}.c(); - ${each_block_else}.${mountOrIntro}(${initialMountNode}, ${this.vars.anchor}); + ${each_block_else}.m(${initialMountNode}, ${this.vars.anchor}); } else if (${each_block_else}) { ${each_block_else}.d(1); ${each_block_else} = null; @@ -252,7 +252,7 @@ export default class EachBlockWrapper extends Wrapper { } else if (!${each_block_else}) { ${each_block_else} = ${this.else.block.name}($$, ctx); ${each_block_else}.c(); - ${each_block_else}.${mountOrIntro}(${initialMountNode}, ${this.vars.anchor}); + ${each_block_else}.m(${initialMountNode}, ${this.vars.anchor}); } `); } @@ -279,14 +279,13 @@ export default class EachBlockWrapper extends Wrapper { create_each_block, length, anchor, - mountOrIntro, + iterations } = this.vars; const get_key = block.getUniqueName('get_key'); - const blocks = block.getUniqueName(`${this.var}_blocks`); const lookup = block.getUniqueName(`${this.var}_lookup`); - block.addVariable(blocks, '[]'); + block.addVariable(iterations, '[]'); block.addVariable(lookup, `@blankObject()`); if (this.fragment.nodes[0].isDomNode()) { @@ -307,7 +306,7 @@ export default class EachBlockWrapper extends Wrapper { for (var #i = 0; #i < ${this.vars.each_block_value}.${length}; #i += 1) { let child_ctx = ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i); let key = ${get_key}(child_ctx); - ${blocks}[#i] = ${lookup}[key] = ${create_each_block}($$, key, child_ctx); + ${iterations}[#i] = ${lookup}[key] = ${create_each_block}($$, key, child_ctx); } `); @@ -316,17 +315,17 @@ export default class EachBlockWrapper extends Wrapper { const anchorNode = parentNode ? 'null' : 'anchor'; block.builders.create.addBlock(deindent` - for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].c(); + for (#i = 0; #i < ${iterations}.length; #i += 1) ${iterations}[#i].c(); `); if (parentNodes && this.renderer.options.hydratable) { block.builders.claim.addBlock(deindent` - for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].l(${parentNodes}); + for (#i = 0; #i < ${iterations}.length; #i += 1) ${iterations}[#i].l(${parentNodes}); `); } block.builders.mount.addBlock(deindent` - for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].${mountOrIntro}(${initialMountNode}, ${anchorNode}); + for (#i = 0; #i < ${iterations}.length; #i += 1) ${iterations}[#i].m(${initialMountNode}, ${anchorNode}); `); const dynamic = this.block.hasUpdateMethod; @@ -342,21 +341,20 @@ export default class EachBlockWrapper extends Wrapper { const ${this.vars.each_block_value} = ${snippet}; ${this.block.hasOutros && `@group_outros();`} - ${this.node.hasAnimation && `for (let #i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].r();`} - ${blocks} = @updateKeyedEach(${blocks}, $$, changed, ${get_key}, ${dynamic ? '1' : '0'}, ctx, ${this.vars.each_block_value}, ${lookup}, ${updateMountNode}, ${destroy}, ${create_each_block}, "${mountOrIntro}", ${anchor}, ${this.vars.get_each_context}); - ${this.node.hasAnimation && `for (let #i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].a();`} + ${this.node.hasAnimation && `for (let #i = 0; #i < ${iterations}.length; #i += 1) ${iterations}[#i].r();`} + ${iterations} = @updateKeyedEach(${iterations}, $$, changed, ${get_key}, ${dynamic ? '1' : '0'}, ctx, ${this.vars.each_block_value}, ${lookup}, ${updateMountNode}, ${destroy}, ${create_each_block}, ${anchor}, ${this.vars.get_each_context}); + ${this.node.hasAnimation && `for (let #i = 0; #i < ${iterations}.length; #i += 1) ${iterations}[#i].a();`} + ${this.block.hasOutros && `@check_outros();`} `); if (this.block.hasOutros) { - const countdown = block.getUniqueName('countdown'); block.builders.outro.addBlock(deindent` - const ${countdown} = @callAfter(#outrocallback, ${blocks}.length); - for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].o(${countdown}); + for (#i = 0; #i < ${iterations}.length; #i += 1) ${iterations}[#i].o(); `); } block.builders.destroy.addBlock(deindent` - for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].d(${parentNode ? '' : 'detach'}); + for (#i = 0; #i < ${iterations}.length; #i += 1) ${iterations}[#i].d(${parentNode ? '' : 'detach'}); `); } @@ -370,8 +368,7 @@ export default class EachBlockWrapper extends Wrapper { create_each_block, length, iterations, - anchor, - mountOrIntro, + anchor } = this.vars; block.builders.init.addBlock(deindent` @@ -402,7 +399,7 @@ export default class EachBlockWrapper extends Wrapper { block.builders.mount.addBlock(deindent` for (var #i = 0; #i < ${iterations}.length; #i += 1) { - ${iterations}[#i].${mountOrIntro}(${initialMountNode}, ${anchorNode}); + ${iterations}[#i].m(${initialMountNode}, ${anchorNode}); } `); @@ -415,15 +412,16 @@ export default class EachBlockWrapper extends Wrapper { const outroBlock = this.block.hasOutros && block.getUniqueName('outroBlock') if (outroBlock) { block.builders.init.addBlock(deindent` - function ${outroBlock}(i, detach, fn) { + function ${outroBlock}(i, detach) { if (${iterations}[i]) { - ${iterations}[i].o(() => { - if (detach) { + if (detach) { + @on_outro(() => { ${iterations}[i].d(detach); ${iterations}[i] = null; - } - if (fn) fn(); - }); + }); + } + + ${iterations}[i].o(); } } `); @@ -433,31 +431,25 @@ export default class EachBlockWrapper extends Wrapper { .map(dependency => `changed.${dependency}`) .join(' || '); + const has_transitions = !!(this.block.hasIntroMethod || this.block.hasOutroMethod); + if (condition !== '') { const forLoopBody = this.block.hasUpdateMethod - ? (this.block.hasIntros || this.block.hasOutros) - ? deindent` - if (${iterations}[#i]) { - ${iterations}[#i].p(changed, child_ctx); - } else { - ${iterations}[#i] = ${create_each_block}($$, child_ctx); - ${iterations}[#i].c(); - } - ${iterations}[#i].i(${updateMountNode}, ${anchor}); - ` - : deindent` - if (${iterations}[#i]) { - ${iterations}[#i].p(changed, child_ctx); - } else { - ${iterations}[#i] = ${create_each_block}($$, child_ctx); - ${iterations}[#i].c(); - ${iterations}[#i].m(${updateMountNode}, ${anchor}); - } - ` + ? deindent` + if (${iterations}[#i]) { + ${iterations}[#i].p(changed, child_ctx); + } else { + ${iterations}[#i] = ${create_each_block}($$, child_ctx); + ${iterations}[#i].c(); + ${iterations}[#i].m(${updateMountNode}, ${anchor}); + } + ${has_transitions && `${iterations}[#i].i();`} + ` : deindent` ${iterations}[#i] = ${create_each_block}($$, child_ctx); ${iterations}[#i].c(); - ${iterations}[#i].${mountOrIntro}(${updateMountNode}, ${anchor}); + ${iterations}[#i].m(${updateMountNode}, ${anchor}); + ${has_transitions && `${iterations}[#i].i();`} `; const start = this.block.hasUpdateMethod ? '0' : `${iterations}.length`; @@ -468,6 +460,7 @@ export default class EachBlockWrapper extends Wrapper { destroy = deindent` @group_outros(); for (; #i < ${iterations}.length; #i += 1) ${outroBlock}(#i, 1); + @check_outros(); `; } else { destroy = deindent` @@ -498,11 +491,9 @@ export default class EachBlockWrapper extends Wrapper { } if (outroBlock) { - const countdown = block.getUniqueName('countdown'); block.builders.outro.addBlock(deindent` ${iterations} = ${iterations}.filter(Boolean); - const ${countdown} = @callAfter(#outrocallback, ${iterations}.length); - for (let #i = 0; #i < ${iterations}.length; #i += 1) ${outroBlock}(#i, 0, ${countdown});` + for (let #i = 0; #i < ${iterations}.length; #i += 1) ${outroBlock}(#i, 0);` ); } diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts index abfef21bcc..be8d355fa4 100644 --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -582,6 +582,7 @@ export default class ElementWrapper extends Wrapper { const { component } = this.renderer; if (intro === outro) { + // bidirectional transition const name = block.getUniqueName(`${this.var}_transition`); const snippet = intro.expression ? intro.expression.render(block) @@ -591,25 +592,22 @@ export default class ElementWrapper extends Wrapper { const fn = component.qualify(intro.name); - block.builders.intro.addConditional(`@intros.enabled`, deindent` - if (${name}) ${name}.invalidate(); - + block.builders.intro.addBlock(deindent` @add_render_callback(() => { - if (!${name}) ${name} = @create_transition(${this.var}, ${fn}, ${snippet}, true); + if (!${name}) ${name} = @create_bidirectional_transition(${this.var}, ${fn}, ${snippet}, true); ${name}.run(1); }); `); block.builders.outro.addBlock(deindent` - if (!${name}) ${name} = @create_transition(${this.var}, ${fn}, ${snippet}, false); - ${name}.run(0, () => { - #outrocallback(); - ${name} = null; - }); + if (!${name}) ${name} = @create_bidirectional_transition(${this.var}, ${fn}, ${snippet}, false); + ${name}.run(0); `); - block.builders.destroy.addConditional('detach', `if (${name}) ${name}.abort();`); - } else { + block.builders.destroy.addConditional('detach', `if (${name}) ${name}.end();`); + } + + else { const introName = intro && block.getUniqueName(`${this.var}_intro`); const outroName = outro && block.getUniqueName(`${this.var}_outro`); @@ -619,21 +617,27 @@ export default class ElementWrapper extends Wrapper { ? intro.expression.render(block) : '{}'; - const fn = component.qualify(intro.name); // TODO add built-in transitions? + const fn = component.qualify(intro.name); if (outro) { block.builders.intro.addBlock(deindent` - if (${introName}) ${introName}.abort(1); - if (${outroName}) ${outroName}.abort(1); + @add_render_callback(() => { + if (!${introName}) ${introName} = @create_in_transition(${this.var}, ${fn}, ${snippet}); + ${introName}.start(); + }); `); - } - block.builders.intro.addConditional(`@intros.enabled`, deindent` - @add_render_callback(() => { - ${introName} = @create_transition(${this.var}, ${fn}, ${snippet}, true); - ${introName}.run(1); - }); - `); + block.builders.outro.addLine(`if (${introName}) ${introName}.invalidate()`); + } else { + block.builders.intro.addBlock(deindent` + if (!${introName}) { + @add_render_callback(() => { + ${introName} = @create_in_transition(${this.var}, ${fn}, ${snippet}); + ${introName}.start(); + }); + } + `); + } } if (outro) { @@ -645,17 +649,16 @@ export default class ElementWrapper extends Wrapper { const fn = component.qualify(outro.name); block.builders.intro.addBlock(deindent` - if (${outroName}) ${outroName}.abort(1); + if (${outroName}) ${outroName}.end(1); `); // TODO hide elements that have outro'd (unless they belong to a still-outroing // group) prior to their removal from the DOM block.builders.outro.addBlock(deindent` - ${outroName} = @create_transition(${this.var}, ${fn}, ${snippet}, false); - ${outroName}.run(0, #outrocallback); + ${outroName} = @create_out_transition(${this.var}, ${fn}, ${snippet}); `); - block.builders.destroy.addConditional('detach', `if (${outroName}) ${outroName}.abort();`); + block.builders.destroy.addConditional('detach', `if (${outroName}) ${outroName}.end();`); } } } diff --git a/src/compile/render-dom/wrappers/IfBlock.ts b/src/compile/render-dom/wrappers/IfBlock.ts index 9ed1acddf3..ab4c697881 100644 --- a/src/compile/render-dom/wrappers/IfBlock.ts +++ b/src/compile/render-dom/wrappers/IfBlock.ts @@ -153,18 +153,17 @@ export default class IfBlockWrapper extends Wrapper { const if_name = hasElse ? '' : `if (${name}) `; const dynamic = this.branches[0].block.hasUpdateMethod; // can use [0] as proxy for all, since they necessarily have the same value + const hasIntros = this.branches[0].block.hasIntroMethod; const hasOutros = this.branches[0].block.hasOutroMethod; + const has_transitions = hasIntros || hasOutros; - const vars = { name, anchor, if_name, hasElse }; + const vars = { name, anchor, if_name, hasElse, has_transitions }; if (this.node.else) { if (hasOutros) { this.renderCompoundWithOutros(block, parentNode, parentNodes, dynamic, vars); - block.builders.outro.addBlock(deindent` - if (${name}) ${name}.o(#outrocallback); - else #outrocallback(); - `); + block.builders.outro.addLine(`if (${name}) ${name}.o();`); } else { this.renderCompound(block, parentNode, parentNodes, dynamic, vars); } @@ -172,10 +171,7 @@ export default class IfBlockWrapper extends Wrapper { this.renderSimple(block, parentNode, parentNodes, dynamic, vars); if (hasOutros) { - block.builders.outro.addBlock(deindent` - if (${name}) ${name}.o(#outrocallback); - else #outrocallback(); - `); + block.builders.outro.addLine(`if (${name}) ${name}.o();`); } } @@ -187,6 +183,10 @@ export default class IfBlockWrapper extends Wrapper { ); } + if (hasIntros || hasOutros) { + block.builders.intro.addLine(`if (${name}) ${name}.i();`); + } + if (needsAnchor) { block.addElement( anchor, @@ -206,7 +206,7 @@ export default class IfBlockWrapper extends Wrapper { parentNode: string, parentNodes: string, dynamic, - { name, anchor, hasElse, if_name } + { name, anchor, hasElse, if_name, has_transitions } ) { const select_block_type = this.renderer.component.getUniqueName(`select_block_type`); const current_block_type = block.getUniqueName(`current_block_type`); @@ -225,12 +225,10 @@ export default class IfBlockWrapper extends Wrapper { var ${name} = ${current_block_type_and}${current_block_type}($$, ctx); `); - const mountOrIntro = this.branches[0].block.hasIntroMethod ? 'i' : 'm'; - const initialMountNode = parentNode || '#target'; const anchorNode = parentNode ? 'null' : 'anchor'; block.builders.mount.addLine( - `${if_name}${name}.${mountOrIntro}(${initialMountNode}, ${anchorNode});` + `${if_name}${name}.m(${initialMountNode}, ${anchorNode});` ); const updateMountNode = this.getUpdateMountNode(anchor); @@ -238,8 +236,11 @@ export default class IfBlockWrapper extends Wrapper { const changeBlock = deindent` ${if_name}${name}.d(1); ${name} = ${current_block_type_and}${current_block_type}($$, ctx); - ${if_name}${name}.c(); - ${if_name}${name}.${mountOrIntro}(${updateMountNode}, ${anchor}); + if (${name}) { + ${name}.c(); + ${name}.m(${updateMountNode}, ${anchor}); + ${has_transitions && `${name}.i();`} + } `; if (dynamic) { @@ -268,7 +269,7 @@ export default class IfBlockWrapper extends Wrapper { parentNode: string, parentNodes: string, dynamic, - { name, anchor, hasElse } + { name, anchor, hasElse, has_transitions } ) { const select_block_type = this.renderer.component.getUniqueName(`select_block_type`); const current_block_type_index = block.getUniqueName(`current_block_type_index`); @@ -311,22 +312,23 @@ export default class IfBlockWrapper extends Wrapper { `); } - const mountOrIntro = this.branches[0].block.hasIntroMethod ? 'i' : 'm'; const initialMountNode = parentNode || '#target'; const anchorNode = parentNode ? 'null' : 'anchor'; block.builders.mount.addLine( - `${if_current_block_type_index}${if_blocks}[${current_block_type_index}].${mountOrIntro}(${initialMountNode}, ${anchorNode});` + `${if_current_block_type_index}${if_blocks}[${current_block_type_index}].m(${initialMountNode}, ${anchorNode});` ); const updateMountNode = this.getUpdateMountNode(anchor); const destroyOldBlock = deindent` @group_outros(); - ${name}.o(function() { + @on_outro(() => { ${if_blocks}[${previous_block_index}].d(1); ${if_blocks}[${previous_block_index}] = null; }); + ${name}.o(); + @check_outros(); `; const createNewBlock = deindent` @@ -335,7 +337,8 @@ export default class IfBlockWrapper extends Wrapper { ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}]($$, ctx); ${name}.c(); } - ${name}.${mountOrIntro}(${updateMountNode}, ${anchor}); + ${name}.m(${updateMountNode}, ${anchor}); + ${has_transitions && `${name}.i();`} `; const changeBlock = hasElse @@ -386,7 +389,7 @@ export default class IfBlockWrapper extends Wrapper { parentNode: string, parentNodes: string, dynamic, - { name, anchor, if_name } + { name, anchor, if_name, has_transitions } ) { const branch = this.branches[0]; @@ -394,62 +397,47 @@ export default class IfBlockWrapper extends Wrapper { var ${name} = (${branch.condition}) && ${branch.block.name}($$, ctx); `); - const mountOrIntro = branch.block.hasIntroMethod ? 'i' : 'm'; const initialMountNode = parentNode || '#target'; const anchorNode = parentNode ? 'null' : 'anchor'; block.builders.mount.addLine( - `if (${name}) ${name}.${mountOrIntro}(${initialMountNode}, ${anchorNode});` + `if (${name}) ${name}.m(${initialMountNode}, ${anchorNode});` ); const updateMountNode = this.getUpdateMountNode(anchor); const enter = dynamic - ? (branch.block.hasIntroMethod || branch.block.hasOutroMethod) - ? deindent` - if (${name}) { - ${name}.p(changed, ctx); - } else { - ${name} = ${branch.block.name}($$, ctx); - if (${name}) ${name}.c(); - } - - ${name}.i(${updateMountNode}, ${anchor}); - ` - : deindent` - if (${name}) { - ${name}.p(changed, ctx); - } else { - ${name} = ${branch.block.name}($$, ctx); - ${name}.c(); - ${name}.m(${updateMountNode}, ${anchor}); - } - ` - : (branch.block.hasIntroMethod || branch.block.hasOutroMethod) - ? deindent` - if (!${name}) { - ${name} = ${branch.block.name}($$, ctx); - ${name}.c(); - } - ${name}.i(${updateMountNode}, ${anchor}); - ` - : deindent` - if (!${name}) { - ${name} = ${branch.block.name}($$, ctx); - ${name}.c(); - ${name}.m(${updateMountNode}, ${anchor}); - } - `; + ? deindent` + if (${name}) { + ${name}.p(changed, ctx); + } else { + ${name} = ${branch.block.name}($$, ctx); + ${name}.c(); + ${name}.m(${updateMountNode}, ${anchor}); + } + ${has_transitions && `${name}.i();`} + ` + : deindent` + if (!${name}) { + ${name} = ${branch.block.name}($$, ctx); + ${name}.c(); + ${name}.m(${updateMountNode}, ${anchor}); + } + ${has_transitions && `${name}.i();`} + `; // no `p()` here — we don't want to update outroing nodes, // as that will typically result in glitching const exit = branch.block.hasOutroMethod ? deindent` @group_outros(); - ${name}.o(function() { + @on_outro(() => { ${name}.d(1); ${name} = null; }); + + ${name}.o(); + @check_outros(); ` : deindent` ${name}.d(1); diff --git a/src/compile/render-dom/wrappers/InlineComponent/index.ts b/src/compile/render-dom/wrappers/InlineComponent/index.ts index f156ded8d5..435f03e3b4 100644 --- a/src/compile/render-dom/wrappers/InlineComponent/index.ts +++ b/src/compile/render-dom/wrappers/InlineComponent/index.ts @@ -364,9 +364,11 @@ export default class InlineComponentWrapper extends Wrapper { if (${name}) { @group_outros(); const old_component = ${name}; - old_component.$$.fragment.o(() => { + @on_outro(() => { old_component.$destroy(); }); + old_component.$$.fragment.o(); + @check_outros(); } if (${switch_value}) { @@ -378,6 +380,7 @@ export default class InlineComponentWrapper extends Wrapper { ${this.fragment && this.fragment.nodes.map(child => child.remount(name))} ${name}.$$.fragment.c(); @mount_component(${name}, ${updateMountNode}, ${anchor}); + ${name}.$$.fragment.i(); ${this.node.handlers.map(handler => deindent` ${name}.$on("${handler.name}", ${handler.var}); @@ -388,6 +391,10 @@ export default class InlineComponentWrapper extends Wrapper { } `); + block.builders.intro.addBlock(deindent` + if (${name}) ${name}.$$.fragment.i(); + `); + if (updates.length) { block.builders.update.addBlock(deindent` else if (${switch_value}) { @@ -426,6 +433,10 @@ export default class InlineComponentWrapper extends Wrapper { `@mount_component(${name}, ${parentNode || '#target'}, ${parentNode ? 'null' : 'anchor'});` ); + block.builders.intro.addBlock(deindent` + ${name}.$$.fragment.i(); + `); + if (updates.length) { block.builders.update.addBlock(deindent` ${updates} @@ -440,7 +451,7 @@ export default class InlineComponentWrapper extends Wrapper { } block.builders.outro.addLine( - `if (${name}) ${name}.$$.fragment.o(#outrocallback);` + `if (${name}) ${name}.$$.fragment.o();` ); } diff --git a/src/internal/Component.js b/src/internal/Component.js index a1607f0b30..8df1d7aee5 100644 --- a/src/internal/Component.js +++ b/src/internal/Component.js @@ -12,7 +12,7 @@ export function bind(component, name, callback) { export function mount_component(component, target, anchor) { const { fragment, on_mount, on_destroy, after_render } = component.$$; - fragment[fragment.i ? 'i' : 'm'](target, anchor); + fragment.m(target, anchor); // onMount happens after the initial afterUpdate. Because // afterUpdate callbacks happen in reverse order (inner first) @@ -101,8 +101,6 @@ export function init(component, options, instance, create_fragment, not_equal) { $$.fragment = create_fragment($$, $$.ctx); if (options.target) { - intros.enabled = !!options.intro; - if (options.hydrate) { $$.fragment.l(children(options.target)); } else { @@ -110,8 +108,8 @@ export function init(component, options, instance, create_fragment, not_equal) { } mount_component(component, options.target, options.anchor); + if (options.intro && component.$$.fragment.i) component.$$.fragment.i(); flush(); - intros.enabled = true; } set_current_component(previous_component); diff --git a/src/internal/animations.js b/src/internal/animations.js index ac14036724..8f65a268db 100644 --- a/src/internal/animations.js +++ b/src/internal/animations.js @@ -26,15 +26,8 @@ export function animate(node, from, fn, params) { function start() { if (css) { - if (delay) node.style.cssText = cssText; - - name = create_rule({ a: 0, b: 1, d: 1, duration }, easing, css); - - node.style.animation = (node.style.animation || '') - .split(', ') - .filter(anim => anim && !/__svelte/.test(anim)) - .concat(`${name} ${duration}ms linear 1 forwards`) - .join(', '); + if (delay) node.style.cssText = cssText; // TODO create delayed animation instead? + name = create_rule(node, 0, 1, duration, 0, easing, css); } started = true; @@ -45,7 +38,7 @@ export function animate(node, from, fn, params) { running = false; } - const { abort, promise } = loop(now => { + loop(now => { if (!started && now >= start_time) { start(); } diff --git a/src/internal/await-block.js b/src/internal/await-block.js index 9f49c13e55..3d8be35edc 100644 --- a/src/internal/await-block.js +++ b/src/internal/await-block.js @@ -29,7 +29,8 @@ export function handlePromise(promise, info) { } block.c(); - block[block.i ? 'i' : 'm'](info.mount(), info.anchor); + block.m(info.mount(), info.anchor); + if (block.i) block.i(); flush(); } diff --git a/src/internal/keyed-each.js b/src/internal/keyed-each.js index 745ead6ff2..ad5eb243d2 100644 --- a/src/internal/keyed-each.js +++ b/src/internal/keyed-each.js @@ -1,12 +1,16 @@ +import { on_outro } from './transitions.js'; + export function destroyBlock(block, lookup) { block.d(1); lookup[block.key] = null; } export function outroAndDestroyBlock(block, lookup) { - block.o(function() { + on_outro(() => { destroyBlock(block, lookup); }); + + block.o(); } export function fixAndOutroAndDestroyBlock(block, lookup) { @@ -14,7 +18,7 @@ export function fixAndOutroAndDestroyBlock(block, lookup) { outroAndDestroyBlock(block, lookup); } -export function updateKeyedEach(old_blocks, component, changed, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, intro_method, next, get_context) { +export function updateKeyedEach(old_blocks, component, changed, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { var o = old_blocks.length; var n = list.length; @@ -48,7 +52,8 @@ export function updateKeyedEach(old_blocks, component, changed, get_key, dynamic var did_move = {}; function insert(block) { - block[intro_method](node, next); + block.m(node, next); + if (block.i) block.i(); lookup[block.key] = block; next = block.first; n--; diff --git a/src/internal/style_manager.js b/src/internal/style_manager.js index e4b15ad8d5..38f0acd94e 100644 --- a/src/internal/style_manager.js +++ b/src/internal/style_manager.js @@ -13,17 +13,17 @@ function hash(str) { return hash >>> 0; } -export function create_rule({ a, b, d, duration }, ease, fn) { +export function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) { const step = 16.666 / duration; let keyframes = '{\n'; for (let p = 0; p <= 1; p += step) { - const t = a + d * ease(p); + const t = a + (b - a) * ease(p); keyframes += p * 100 + `%{${fn(t, 1 - t)}}\n`; } const rule = keyframes + `100% {${fn(b, 1 - b)}}\n}`; - const name = `__svelte_${hash(rule)}`; + const name = `__svelte_${hash(rule)}_${uid}`; if (!current_rules[name]) { if (!stylesheet) { @@ -36,21 +36,30 @@ export function create_rule({ a, b, d, duration }, ease, fn) { stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length); } + const animation = node.style.animation || ''; + node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`; + active += 1; return name; } export function delete_rule(node, name) { - node.style.animation = node.style.animation + node.style.animation = (node.style.animation || '') .split(', ') - .filter(anim => anim && anim.indexOf(name) === -1) + .filter(name + ? anim => anim.indexOf(name) < 0 // remove specific animation + : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations + ) .join(', '); - if (--active <= 0) clear_rules(); + if (!--active) clear_rules(); } export function clear_rules() { - let i = stylesheet.cssRules.length; - while (i--) stylesheet.deleteRule(i); - current_rules = {}; + requestAnimationFrame(() => { + if (active) return; + let i = stylesheet.cssRules.length; + while (i--) stylesheet.deleteRule(i); + current_rules = {}; + }); } \ No newline at end of file diff --git a/src/internal/transitions.js b/src/internal/transitions.js index 714f82c6a9..cbbdd7da9c 100644 --- a/src/internal/transitions.js +++ b/src/internal/transitions.js @@ -1,4 +1,4 @@ -import { identity as linear, noop, run } from './utils.js'; +import { identity as linear, noop, run_all } from './utils.js'; import { loop } from './loop.js'; import { create_rule, delete_rule } from './style_manager.js'; @@ -24,152 +24,281 @@ export function group_outros() { }; } -export function create_transition(node, fn, params, intro) { - let config = fn(node, params); - let cssText; +export function check_outros() { + if (!outros.remaining) { + run_all(outros.callbacks); + } +} - let ready = !intro; - let t = intro ? 0 : 1; +export function on_outro(callback) { + outros.callbacks.push(callback); +} +export function create_in_transition(node, fn, params) { + let config = fn(node, params); let running = false; - let running_program = null; - let pending_program = null; + let animation_name; + let task; + let uid = 0; + + function cleanup() { + if (animation_name) delete_rule(node, animation_name); + } + + function go() { + const { + delay = 0, + duration = 300, + easing = linear, + tick = noop, + css + } = config; - function start(program, delay, duration, easing) { - node.dispatchEvent(new window.CustomEvent(`${program.b ? 'intro' : 'outro'}start`)); + if (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++); + tick(0, 1); - program.a = t; - program.d = program.b - program.a; - program.duration = duration * Math.abs(program.b - program.a); - program.end = program.start + program.duration; + const start_time = window.performance.now() + delay; + const end_time = start_time + duration; - if (config.css) { - if (delay) node.style.cssText = cssText; + if (task) task.abort(); + running = true; - program.name = create_rule(program, easing, config.css); + task = loop(now => { + if (running) { + if (now >= end_time) { + tick(1, 0); + cleanup(); + return running = false; + } - node.style.animation = (node.style.animation || '') - .split(', ') - .filter(anim => anim && (program.d < 0 || !/__svelte/.test(anim))) - .concat(`${program.name} ${program.duration}ms linear 1 forwards`) - .join(', '); - } + if (now >= start_time) { + const t = easing((now - start_time) / duration); + tick(t, 1 - t); + } + } - running_program = program; - pending_program = null; + return running; + }); } - function done() { - const program = running_program; - running_program = null; + let started = false; - t = program.b; + return { + start() { + if (started) return; - if (config.tick) config.tick(t, 1 - t); + delete_rule(node); - node.dispatchEvent(new window.CustomEvent(`${program.b ? 'intro' : 'outro'}end`)); + if (typeof config === 'function') { + config = config(); + wait().then(go); + } else { + go(); + } + }, - if (!program.b && !program.invalidated) { - program.group.callbacks.push(() => { - program.callback(); - if (config.css) delete_rule(node, program.name); - }); + invalidate() { + started = false; + }, - if (--program.group.remaining === 0) { - program.group.callbacks.forEach(run); + end() { + if (running) { + cleanup(); + running = false; } - } else { - if (config.css) delete_rule(node, program.name); } + }; +} - running = !!pending_program; - } +export function create_out_transition(node, fn, params) { + let config = fn(node, params); + let running = true; + let animation_name; + + const group = outros; + + group.remaining += 1; - function go(b, callback) { + function go() { const { delay = 0, duration = 300, - easing = linear + easing = linear, + tick = noop, + css } = config; - const program = { - start: window.performance.now() + delay, - b, - callback - }; + if (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css); + + const start_time = window.performance.now() + delay; + const end_time = start_time + duration; + + loop(now => { + if (running) { + if (now >= end_time) { + tick(0, 1); + + if (!--group.remaining) { + // this will result in `end()` being called, + // so we don't need to clean up here + run_all(group.callbacks); + } + + return false; + } + + if (now >= start_time) { + const t = easing((now - start_time) / duration); + tick(1 - t, t); + } + } - if (!ready) { - if (config.css && delay) { - cssText = node.style.cssText; - node.style.cssText += config.css(0, 1); + return running; + }); + } + + if (typeof config === 'function') { + config = config(); + wait().then(go); + } else { + go(); + } + + return { + end(reset) { + if (reset && config.tick) { + config.tick(1, 0); } - if (config.tick) config.tick(0, 1); - ready = true; + if (running) { + if (animation_name) delete_rule(node, animation_name); + running = false; + } } + }; +} + +export function create_bidirectional_transition(node, fn, params, intro) { + let config = fn(node, params); + + let t = intro ? 0 : 1; + + let running_program = null; + let pending_program = null; + let animation_name = null; + + function clear_animation() { + if (animation_name) delete_rule(node, animation_name); + } + + function init(program, duration) { + const d = program.b - t; + duration *= Math.abs(d); + + return { + a: t, + b: program.b, + d, + duration, + start: program.start, + end: program.start + duration, + group: program.group + }; + } + + function go(b) { + const { + delay = 0, + duration = 300, + easing = linear, + tick = noop, + css + } = config; + + const program = { + start: window.performance.now() + delay, + b + }; if (!b) { program.group = outros; outros.remaining += 1; } - if (delay) { + if (running_program) { pending_program = program; } else { - start(program, delay, duration, easing); - } + // if this is an intro, and there's a delay, we need to do + // an initial tick and/or apply CSS animation immediately + if (css) { + clear_animation(); + animation_name = create_rule(node, t, b, duration, delay, easing, css); + } - if (!running) { - running = true; + if (b) tick(0, 1); - const { abort, promise } = loop(now => { - if (running_program && now >= running_program.end) { - done(); - } + running_program = init(program, duration); + node.dispatchEvent(new window.CustomEvent(`${running_program.b ? 'intro' : 'outro'}start`)); + + loop(now => { + if (pending_program && now > pending_program.start) { + running_program = init(pending_program, duration); + pending_program = null; + + node.dispatchEvent(new window.CustomEvent(`${running_program.b ? 'intro' : 'outro'}start`)); - if (pending_program && now >= pending_program.start) { - start(pending_program, delay, duration, easing); + if (css) { + clear_animation(); + animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css); + } } - if (running) { - if (running_program) { + if (running_program) { + if (now >= running_program.end) { + tick(t = running_program.b, 1 - t); + node.dispatchEvent(new window.CustomEvent(`${running_program.b ? 'intro' : 'outro'}end`)); + + if (!pending_program) { + // we're done + if (running_program.b) { + // intro — we can tidy up immediately + clear_animation(); + } else { + // outro — needs to be coordinated + if (!--running_program.group.remaining) run_all(running_program.group.callbacks); + } + } + + running_program = null; + } + + else if (now >= running_program.start) { const p = now - running_program.start; t = running_program.a + running_program.d * easing(p / running_program.duration); - if (config.tick) config.tick(t, 1 - t); + tick(t, 1 - t); } - - return true; } + + return !!(running_program || pending_program); }); } } return { - run(b, callback = noop) { + run(b) { if (typeof config === 'function') { wait().then(() => { config = config(); - go(b, callback); + go(b); }); } else { - go(b, callback); - } - }, - - abort(reset) { - if (reset && config.tick) config.tick(1, 0); - - if (running_program) { - if (config.css) delete_rule(node, running_program.name); - running_program = pending_program = null; - running = false; + go(b); } }, - invalidate() { - if (running_program) { - running_program.invalidated = true; - } + end() { + clear_animation(); + running_program = pending_program = null; } }; } \ No newline at end of file diff --git a/src/internal/utils.js b/src/internal/utils.js index 9559ce9d24..a46385190d 100644 --- a/src/internal/utils.js +++ b/src/internal/utils.js @@ -16,13 +16,6 @@ export function isPromise(value) { return value && typeof value.then === 'function'; } -export function callAfter(fn, i) { - if (i === 0) fn(); - return () => { - if (!--i) fn(); - }; -} - export function addLoc(element, file, line, column, char) { element.__svelte_meta = { loc: { file, line, column, char } diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js index e4a1329c60..0c73a79237 100644 --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var button, foo_action, current; + var button, foo_action; return { c() { @@ -13,17 +13,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, button, anchor); foo_action = foo.call(null, button, ctx.foo_function) || {}; - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index f2f66baa2b..a8fbf62344 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var a, link_action, current; + var a, link_action; return { c() { @@ -14,17 +14,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, a, anchor); link_action = link.call(null, a) || {}; - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js index 4ca71de2cf..a1b13fedc6 100644 --- a/test/js/samples/bind-width-height/expected.js +++ b/test/js/samples/bind-width-height/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var div, div_resize_listener, current; + var div, div_resize_listener; return { c() { @@ -14,17 +14,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); div_resize_listener = addResizeListener(div, ctx.div_resize_handler.bind(div)); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index 26b8dac055..ff5ce3b048 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function add_css() { var style = createElement("style"); @@ -9,7 +9,7 @@ function add_css() { } function create_fragment($$, ctx) { - var p, text, current; + var p, text; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, p, anchor); append(p, text); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js index f39cb4c328..ab3dbbc4f6 100644 --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -13,20 +13,19 @@ function create_fragment($$, ctx) { m(target, anchor) { mount_component(nested, target, anchor); - current = true; }, p: noop, - i(target, anchor) { + i() { if (current) return; - this.m(target, anchor); - }, + nested.$$.fragment.i(); - o(outrocallback) { - if (!current) return; + current = true; + }, - if (nested) nested.$$.fragment.o(outrocallback); + o() { + if (nested) nested.$$.fragment.o(); current = false; }, diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js index a33a09a093..0e8d67ccea 100644 --- a/test/js/samples/component-static-immutable/expected.js +++ b/test/js/samples/component-static-immutable/expected.js @@ -13,20 +13,19 @@ function create_fragment($$, ctx) { m(target, anchor) { mount_component(nested, target, anchor); - current = true; }, p: noop, - i(target, anchor) { + i() { if (current) return; - this.m(target, anchor); - }, + nested.$$.fragment.i(); - o(outrocallback) { - if (!current) return; + current = true; + }, - if (nested) nested.$$.fragment.o(outrocallback); + o() { + if (nested) nested.$$.fragment.o(); current = false; }, diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js index a33a09a093..0e8d67ccea 100644 --- a/test/js/samples/component-static-immutable2/expected.js +++ b/test/js/samples/component-static-immutable2/expected.js @@ -13,20 +13,19 @@ function create_fragment($$, ctx) { m(target, anchor) { mount_component(nested, target, anchor); - current = true; }, p: noop, - i(target, anchor) { + i() { if (current) return; - this.m(target, anchor); - }, + nested.$$.fragment.i(); - o(outrocallback) { - if (!current) return; + current = true; + }, - if (nested) nested.$$.fragment.o(outrocallback); + o() { + if (nested) nested.$$.fragment.o(); current = false; }, diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js index df8a0d3274..be7357c866 100644 --- a/test/js/samples/component-static/expected.js +++ b/test/js/samples/component-static/expected.js @@ -13,20 +13,19 @@ function create_fragment($$, ctx) { m(target, anchor) { mount_component(nested, target, anchor); - current = true; }, p: noop, - i(target, anchor) { + i() { if (current) return; - this.m(target, anchor); - }, + nested.$$.fragment.i(); - o(outrocallback) { - if (!current) return; + current = true; + }, - if (nested) nested.$$.fragment.o(outrocallback); + o() { + if (nested) nested.$$.fragment.o(); current = false; }, diff --git a/test/js/samples/computed-collapsed-if/expected.js b/test/js/samples/computed-collapsed-if/expected.js index 39c7f85bc8..f9411cf5f6 100644 --- a/test/js/samples/computed-collapsed-if/expected.js +++ b/test/js/samples/computed-collapsed-if/expected.js @@ -1,15 +1,13 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var current; - return { c: noop, m: noop, p: noop, i: noop, - o: run, + o: noop, d: noop }; } diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index f130945c4b..b771f17a75 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function add_css() { var style = createElement("style"); @@ -9,7 +9,7 @@ function add_css() { } function create_fragment($$, ctx) { - var div, current; + var div; return { c() { @@ -19,17 +19,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index bf56378e2d..d55e3928ca 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteElement, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteElement, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var div, current; + var div; return { c() { @@ -13,17 +13,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 16313a1a50..4ed9b00a85 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -1,10 +1,10 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; const file = undefined; function create_fragment($$, ctx) { - var h1, text0, text1, text2, text3, current; + var h1, text0, text1, text2, text3; return { c: function create() { @@ -27,7 +27,6 @@ function create_fragment($$, ctx) { append(h1, text1); append(h1, text2); insert(target, text3, anchor); - current = true; }, p: function update(changed, ctx) { @@ -38,12 +37,8 @@ function create_fragment($$, ctx) { debugger; }, - i: function intro(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d: function destroy(detach) { if (detach) { 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 7183e59e83..24089b777c 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; const file = undefined; @@ -55,7 +55,7 @@ function create_each_block($$, ctx) { } function create_fragment($$, ctx) { - var text0, p, text1, text2, current; + var text0, p, text1, text2; var each_value = ctx.things; @@ -91,7 +91,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text1); append(p, text2); - current = true; }, p: function update(changed, ctx) { @@ -121,12 +120,8 @@ function create_fragment($$, ctx) { } }, - i: function intro(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d: function destroy(detach) { destroyEach(each_blocks, detach); diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 93fbdc2f21..2c7d3ef2d2 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; const file = undefined; @@ -55,7 +55,7 @@ function create_each_block($$, ctx) { } function create_fragment($$, ctx) { - var text0, p, text1, text2, current; + var text0, p, text1, text2; var each_value = ctx.things; @@ -91,7 +91,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text1); append(p, text2); - current = true; }, p: function update(changed, ctx) { @@ -121,12 +120,8 @@ function create_fragment($$, ctx) { } }, - i: function intro(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d: function destroy(detach) { destroyEach(each_blocks, detach); diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index fe2a247d3d..d8f2db31ce 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createComment, createElement as createElement_1, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createComment, createElement as createElement_1, createText, destroyEach, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); @@ -37,7 +37,7 @@ function create_each_block($$, ctx) { } function create_fragment($$, ctx) { - var each_anchor, current; + var each_anchor; var each_value = ctx.createElement; @@ -62,7 +62,6 @@ function create_fragment($$, ctx) { } insert(target, each_anchor, anchor); - current = true; }, p(changed, ctx) { @@ -88,12 +87,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { destroyEach(each_blocks, detach); diff --git a/test/js/samples/deconflict-globals/expected.js b/test/js/samples/deconflict-globals/expected.js index eae53e6ab6..b8613b4ff9 100644 --- a/test/js/samples/deconflict-globals/expected.js +++ b/test/js/samples/deconflict-globals/expected.js @@ -1,16 +1,14 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; import { onMount } from "svelte"; function create_fragment($$, ctx) { - var current; - return { c: noop, m: noop, p: noop, i: noop, - o: run, + o: noop, d: noop }; } 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 7f52c96119..3b4c623407 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -1,10 +1,10 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; const file = undefined; function create_fragment($$, ctx) { - var p, text0_value = Math.max(0, ctx.foo), text0, text1, text2, current; + var p, text0_value = Math.max(0, ctx.foo), text0, text1, text2; return { c: function create() { @@ -24,7 +24,6 @@ function create_fragment($$, ctx) { append(p, text0); append(p, text1); append(p, text2); - current = true; }, p: function update(changed, ctx) { @@ -37,12 +36,8 @@ function create_fragment($$, ctx) { } }, - i: function intro(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d: function destroy(detach) { if (detach) { diff --git a/test/js/samples/do-use-dataset/expected.js b/test/js/samples/do-use-dataset/expected.js index 1cdc176977..343ac22999 100644 --- a/test/js/samples/do-use-dataset/expected.js +++ b/test/js/samples/do-use-dataset/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var div0, text, div1, current; + var div0, text, div1; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, div0, anchor); insert(target, text, anchor); insert(target, div1, anchor); - current = true; }, p(changed, ctx) { @@ -26,12 +25,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/dont-use-dataset-in-legacy/expected.js b/test/js/samples/dont-use-dataset-in-legacy/expected.js index 26fd86b9b6..dc787888af 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment($$, ctx) { - var div0, text, div1, current; + var div0, text, div1; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, div0, anchor); insert(target, text, anchor); insert(target, div1, anchor); - current = true; }, p(changed, ctx) { @@ -26,12 +25,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/dont-use-dataset-in-svg/expected.js b/test/js/samples/dont-use-dataset-in-svg/expected.js index 2bb5a1d36b..1a5825a63d 100644 --- a/test/js/samples/dont-use-dataset-in-svg/expected.js +++ b/test/js/samples/dont-use-dataset-in-svg/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment($$, ctx) { - var svg, g0, g1, current; + var svg, g0, g1; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, svg, anchor); append(svg, g0); append(svg, g1); - current = true; }, p(changed, ctx) { @@ -26,12 +25,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index d0e36d4936..1c6e0b873d 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -14,20 +14,19 @@ function create_fragment($$, ctx) { m(target, anchor) { mount_component(lazyload, target, anchor); - current = true; }, p: noop, - i(target, anchor) { + i() { if (current) return; - this.m(target, anchor); - }, + lazyload.$$.fragment.i(); - o(outrocallback) { - if (!current) return; + current = true; + }, - if (lazyload) lazyload.$$.fragment.o(outrocallback); + o() { + if (lazyload) lazyload.$$.fragment.o(); current = false; }, diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index cc59d354d6..9dcf4b1ad2 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, destroyEach, detachAfter, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, destroyEach, detachAfter, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); @@ -68,7 +68,7 @@ function create_each_block($$, ctx) { } function create_fragment($$, ctx) { - var text0, p, text1, current; + var text0, p, text1; var each_value = ctx.comments; @@ -97,7 +97,6 @@ function create_fragment($$, ctx) { insert(target, text0, anchor); insert(target, p, anchor); append(p, text1); - current = true; }, p(changed, ctx) { @@ -127,12 +126,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { destroyEach(each_blocks, detach); diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index 874c79c637..fbd5fa15cc 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, animate, append, blankObject, createComment, createElement, createText, detachNode, fixAndOutroAndDestroyBlock, fix_position, flush, init, insert, noop, run, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, animate, append, blankObject, createComment, createElement, createText, detachNode, fixAndOutroAndDestroyBlock, fix_position, flush, init, insert, noop, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); @@ -56,7 +56,7 @@ function create_each_block($$, key_1, ctx) { } function create_fragment($$, ctx) { - var each_blocks_1 = [], each_lookup = blankObject(), each_anchor, current; + var each_blocks = [], each_lookup = blankObject(), each_anchor; var each_value = ctx.things; @@ -65,39 +65,34 @@ function create_fragment($$, ctx) { for (var i = 0; i < each_value.length; i += 1) { let child_ctx = get_each_context(ctx, each_value, i); let key = get_key(child_ctx); - each_blocks_1[i] = each_lookup[key] = create_each_block($$, key, child_ctx); + each_blocks[i] = each_lookup[key] = create_each_block($$, key, child_ctx); } return { c() { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].c(); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); each_anchor = createComment(); }, m(target, anchor) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(target, anchor); insert(target, each_anchor, anchor); - current = true; }, p(changed, ctx) { const each_value = ctx.things; - for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].r(); - each_blocks_1 = updateKeyedEach(each_blocks_1, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, "m", each_anchor, get_each_context); - for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].a(); + for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].r(); + each_blocks = updateKeyedEach(each_blocks, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, each_anchor, get_each_context); + for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a(); }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].d(detach); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].d(detach); if (detach) { detachNode(each_anchor); diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index dc6f2c98e2..1599362932 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, destroyBlock, detachNode, flush, init, insert, run, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, destroyBlock, detachNode, flush, init, insert, noop, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); @@ -42,7 +42,7 @@ function create_each_block($$, key_1, ctx) { } function create_fragment($$, ctx) { - var each_blocks_1 = [], each_lookup = blankObject(), each_anchor, current; + var each_blocks = [], each_lookup = blankObject(), each_anchor; var each_value = ctx.things; @@ -51,37 +51,32 @@ function create_fragment($$, ctx) { for (var i = 0; i < each_value.length; i += 1) { let child_ctx = get_each_context(ctx, each_value, i); let key = get_key(child_ctx); - each_blocks_1[i] = each_lookup[key] = create_each_block($$, key, child_ctx); + each_blocks[i] = each_lookup[key] = create_each_block($$, key, child_ctx); } return { c() { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].c(); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); each_anchor = createComment(); }, m(target, anchor) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(target, anchor); insert(target, each_anchor, anchor); - current = true; }, p(changed, ctx) { const each_value = ctx.things; - each_blocks_1 = updateKeyedEach(each_blocks_1, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, "m", each_anchor, get_each_context); + each_blocks = updateKeyedEach(each_blocks, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, each_anchor, get_each_context); }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].d(detach); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].d(detach); if (detach) { detachNode(each_anchor); diff --git a/test/js/samples/event-handler-no-passive/expected.js b/test/js/samples/event-handler-no-passive/expected.js index fea5cf99e2..6a1277988f 100644 --- a/test/js/samples/event-handler-no-passive/expected.js +++ b/test/js/samples/event-handler-no-passive/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var a, current, dispose; + var a, dispose; return { c() { @@ -14,17 +14,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, a, anchor); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js index 8d334ec04a..ac0f1b3d79 100644 --- a/test/js/samples/event-modifiers/expected.js +++ b/test/js/samples/event-modifiers/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, identity, init, insert, noop, preventDefault, run, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, identity, init, insert, noop, preventDefault, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; function create_fragment($$, ctx) { - var div, button0, text1, button1, text3, button2, current, dispose; + var div, button0, text1, button1, text3, button2, dispose; return { c() { @@ -30,17 +30,11 @@ function create_fragment($$, ctx) { append(div, button1); append(div, text3); append(div, button2); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index 58bfa6ee06..f074e69745 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var meta0, meta1, current; + var meta0, meta1; return { c() { @@ -17,17 +17,11 @@ function create_fragment($$, ctx) { m(target, anchor) { append(document.head, meta0); append(document.head, meta1); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { detachNode(meta0); diff --git a/test/js/samples/hoisted-const/expected.js b/test/js/samples/hoisted-const/expected.js index aa81d991e8..cdca1aaeba 100644 --- a/test/js/samples/hoisted-const/expected.js +++ b/test/js/samples/hoisted-const/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var b, text_value = get_answer(), text, current; + var b, text_value = get_answer(), text; return { c() { @@ -13,17 +13,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, b, anchor); append(b, text); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index cc01e9791a..b8ec6c55c5 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; // (3:0) {:else} function create_else_block($$, ctx) { @@ -46,7 +46,7 @@ function create_if_block($$, ctx) { } function create_fragment($$, ctx) { - var if_block_anchor, current; + var if_block_anchor; function select_block_type(ctx) { if (ctx.foo) return create_if_block; @@ -65,24 +65,21 @@ function create_fragment($$, ctx) { m(target, anchor) { if_block.m(target, anchor); insert(target, if_block_anchor, anchor); - current = true; }, p(changed, ctx) { if (current_block_type !== (current_block_type = select_block_type(ctx))) { if_block.d(1); if_block = current_block_type($$, ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if_block.d(detach); diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index 054ee7219b..fbba18e605 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; // (1:0) {#if foo} function create_if_block($$, ctx) { @@ -24,7 +24,7 @@ function create_if_block($$, ctx) { } function create_fragment($$, ctx) { - var if_block_anchor, current; + var if_block_anchor; var if_block = (ctx.foo) && create_if_block($$, ctx); @@ -37,7 +37,6 @@ function create_fragment($$, ctx) { m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); - current = true; }, p(changed, ctx) { @@ -53,12 +52,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (if_block) if_block.d(detach); diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js index f4ac24f484..b39aaf9d26 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected.js +++ b/test/js/samples/inline-style-optimized-multiple/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; function create_fragment($$, ctx) { - var div, current; + var div; return { c() { @@ -13,7 +13,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = true; }, p(changed, ctx) { @@ -26,12 +25,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js index da4f91c1d2..49fb1d3427 100644 --- a/test/js/samples/inline-style-optimized-url/expected.js +++ b/test/js/samples/inline-style-optimized-url/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; function create_fragment($$, ctx) { - var div, current; + var div; return { c() { @@ -12,7 +12,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = true; }, p(changed, ctx) { @@ -21,12 +20,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js index 84056cfd50..bfb7c56436 100644 --- a/test/js/samples/inline-style-optimized/expected.js +++ b/test/js/samples/inline-style-optimized/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; function create_fragment($$, ctx) { - var div, current; + var div; return { c() { @@ -12,7 +12,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = true; }, p(changed, ctx) { @@ -21,12 +20,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 1f66ec8766..73dd167875 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var div0, text, div1, div1_style_value, current; + var div0, text, div1, div1_style_value; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, div0, anchor); insert(target, text, anchor); insert(target, div1, anchor); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js index baab165695..507d9fa2a3 100644 --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal, setAttribute } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment($$, ctx) { - var input, current, dispose; + var input, dispose; return { c() { @@ -14,17 +14,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, input, anchor); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js index 1d90cf146c..393a6bb39c 100644 --- a/test/js/samples/input-range/expected.js +++ b/test/js/samples/input-range/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal"; function create_fragment($$, ctx) { - var input, current, dispose; + var input, dispose; return { c() { @@ -19,20 +19,14 @@ function create_fragment($$, ctx) { insert(target, input, anchor); input.value = ctx.value; - - current = true; }, p(changed, ctx) { if (changed.value) input.value = ctx.value; }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index 3c5f57391b..a0d6065de6 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment($$, ctx) { - var input, current, dispose; + var input, dispose; return { c() { @@ -15,20 +15,14 @@ function create_fragment($$, ctx) { insert(target, input, anchor); input.checked = ctx.foo; - - current = true; }, p(changed, ctx) { if (changed.foo) input.checked = ctx.foo; }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/instrumentation-script-if-no-block/expected.js b/test/js/samples/instrumentation-script-if-no-block/expected.js index b8c0cb22e1..319ccb2637 100644 --- a/test/js/samples/instrumentation-script-if-no-block/expected.js +++ b/test/js/samples/instrumentation-script-if-no-block/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function create_fragment($$, ctx) { - var button, text1, p, text2, text3, current, dispose; + var button, text1, p, text2, text3, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/instrumentation-script-x-equals-x/expected.js b/test/js/samples/instrumentation-script-x-equals-x/expected.js index 429bf51fae..21e26a907f 100644 --- a/test/js/samples/instrumentation-script-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-script-x-equals-x/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function create_fragment($$, ctx) { - var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose; + var button, text1, p, text2, text3_value = ctx.things.length, text3, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js index 8aba31fc4d..d403b12fb1 100644 --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function create_fragment($$, ctx) { - var button, text1, p, text2, text3, current, dispose; + var button, text1, p, text2, text3, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/instrumentation-template-x-equals-x/expected.js b/test/js/samples/instrumentation-template-x-equals-x/expected.js index 6136f16432..a7496d403a 100644 --- a/test/js/samples/instrumentation-template-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-template-x-equals-x/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function create_fragment($$, ctx) { - var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose; + var button, text1, p, text2, text3_value = ctx.things.length, text3, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/legacy-input-type/expected.js b/test/js/samples/legacy-input-type/expected.js index de095d7c0a..49d3d24f2a 100644 --- a/test/js/samples/legacy-input-type/expected.js +++ b/test/js/samples/legacy-input-type/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal, setInputType } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, safe_not_equal, setInputType } from "svelte/internal"; function create_fragment($$, ctx) { - var input, current; + var input; return { c() { @@ -12,17 +12,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, input, anchor); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index 645a7d9b0f..17d87e4a9d 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal"; function create_fragment($$, ctx) { - var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, current, dispose; + var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, dispose; function audio_timeupdate_handler() { cancelAnimationFrame(audio_animationframe); @@ -34,8 +34,6 @@ function create_fragment($$, ctx) { insert(target, audio, anchor); audio.volume = ctx.volume; - - current = true; }, p(changed, ctx) { @@ -45,12 +43,8 @@ function create_fragment($$, ctx) { audio_updating = false; }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index 32a772b3b5..e80b8d0ab1 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, callAfter, createText, detachNode, identity, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createText, detachNode, identity, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; import Imported from "Imported.html"; function create_fragment($$, ctx) { @@ -20,23 +20,22 @@ function create_fragment($$, ctx) { mount_component(imported, target, anchor); insert(target, text, anchor); mount_component(nonimported, target, anchor); - current = true; }, p: noop, - i(target, anchor) { + i() { if (current) return; - this.m(target, anchor); - }, + imported.$$.fragment.i(); - o(outrocallback) { - if (!current) return; + nonimported.$$.fragment.i(); - outrocallback = callAfter(outrocallback, 2); + current = true; + }, - if (imported) imported.$$.fragment.o(outrocallback); - if (nonimported) nonimported.$$.fragment.o(outrocallback); + o() { + if (imported) imported.$$.fragment.o(); + if (nonimported) nonimported.$$.fragment.o(); current = false; }, diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js index cce868ee40..a7f49b940e 100644 --- a/test/js/samples/select-dynamic-value/expected.js +++ b/test/js/samples/select-dynamic-value/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var select, option0, option1, select_value_value, current_1; + var select, option0, option1, select_value_value; return { c() { @@ -31,8 +31,6 @@ function create_fragment($$, ctx) { break; } } - - current_1 = true; }, p(changed, ctx) { @@ -48,12 +46,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current_1) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/setup-method/expected.js b/test/js/samples/setup-method/expected.js index 257de1d245..124e632ddc 100644 --- a/test/js/samples/setup-method/expected.js +++ b/test/js/samples/setup-method/expected.js @@ -1,15 +1,13 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, identity, init, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, identity, init, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var current; - return { c: noop, m: noop, p: noop, i: noop, - o: run, + o: noop, d: noop }; } diff --git a/test/js/samples/svg-title/expected.js b/test/js/samples/svg-title/expected.js index ed67789799..3ce818c950 100644 --- a/test/js/samples/svg-title/expected.js +++ b/test/js/samples/svg-title/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var svg, title, text, current; + var svg, title, text; return { c() { @@ -15,17 +15,11 @@ function create_fragment($$, ctx) { insert(target, svg, anchor); append(svg, title); append(title, text); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js index cfac2c0ad1..390f11cbcd 100644 --- a/test/js/samples/title/expected.js +++ b/test/js/samples/title/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var title_value, current; + var title_value; document.title = title_value = "a " + ctx.custom + " title"; @@ -17,7 +17,7 @@ function create_fragment($$, ctx) { }, i: noop, - o: run, + o: noop, d: noop }; } diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index e6610407e4..50938e861d 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; // (2:1) {#if a} function create_if_block_4($$, ctx) { @@ -112,7 +112,7 @@ function create_if_block($$, ctx) { } function create_fragment($$, ctx) { - var div, text0, p0, text2, text3, text4, p1, text6, text7, if_block4_anchor, current; + var div, text0, p0, text2, text3, text4, p1, text6, text7, if_block4_anchor; var if_block0 = (ctx.a) && create_if_block_4($$, ctx); @@ -161,7 +161,6 @@ function create_fragment($$, ctx) { insert(target, text7, anchor); if (if_block4) if_block4.m(target, anchor); insert(target, if_block4_anchor, anchor); - current = true; }, p(changed, ctx) { @@ -221,12 +220,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 0fded5c925..a613882827 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function create_fragment($$, ctx) { - var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, current, dispose; + var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, dispose; add_render_callback(ctx.onwindowscroll); @@ -23,7 +23,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text0); append(p, text1); - current = true; }, p(changed, ctx) { @@ -39,12 +38,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/runtime/index.js b/test/runtime/index.js index 334426c424..8912e3dab0 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -13,7 +13,6 @@ import { setupHtmlEqual } from "../helpers.js"; -const main = path.resolve('index.js'); let svelte$; let svelte; diff --git a/test/runtime/samples/nested-transition-detach-if-false/_config.js b/test/runtime/samples/nested-transition-detach-if-false/_config.js index b76eb5cd32..d2ae78ffe3 100644 --- a/test/runtime/samples/nested-transition-detach-if-false/_config.js +++ b/test/runtime/samples/nested-transition-detach-if-false/_config.js @@ -13,7 +13,7 @@ export default { `, - test({ assert, component, target, window, raf }) { + test({ assert, component, target }) { component.folder.open = false; assert.htmlEqual(target.innerHTML, `
  • diff --git a/test/runtime/samples/transition-css-delay/_config.js b/test/runtime/samples/transition-css-delay/_config.js deleted file mode 100644 index 6e2c4a9ba4..0000000000 --- a/test/runtime/samples/transition-css-delay/_config.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - test({ assert, component, target, window, raf }) { - component.visible = true; - const div = target.querySelector('div'); - assert.strictEqual(div.style.opacity, '0'); - - raf.tick(50); - assert.strictEqual(div.style.opacity, ''); - } -}; \ No newline at end of file diff --git a/test/runtime/samples/transition-css-delay/main.html b/test/runtime/samples/transition-css-delay/main.html deleted file mode 100644 index faf89582e8..0000000000 --- a/test/runtime/samples/transition-css-delay/main.html +++ /dev/null @@ -1,17 +0,0 @@ - - -{#if visible} -
    delayed
    -{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-css-duration/_config.js b/test/runtime/samples/transition-css-duration/_config.js index ed25357681..28a78944bb 100644 --- a/test/runtime/samples/transition-css-duration/_config.js +++ b/test/runtime/samples/transition-css-duration/_config.js @@ -4,8 +4,10 @@ export default { const div = target.querySelector('div'); raf.tick(25); + component.visible = false; + raf.tick(26); assert.ok(~div.style.animation.indexOf('25ms')); }, }; diff --git a/test/runtime/samples/transition-css-in-out-in/_config.js b/test/runtime/samples/transition-css-in-out-in/_config.js new file mode 100644 index 0000000000..10719280e9 --- /dev/null +++ b/test/runtime/samples/transition-css-in-out-in/_config.js @@ -0,0 +1,20 @@ +export default { + test({ assert, component, target, window, raf }) { + component.visible = true; + const div = target.querySelector('div'); + + assert.equal(div.style.animation, `__svelte_3809512021_0 100ms linear 0ms 1 both`); + + raf.tick(50); + component.visible = false; + + // both in and out styles + assert.equal(div.style.animation, `__svelte_3809512021_0 100ms linear 0ms 1 both, __svelte_3750847757_0 100ms linear 0ms 1 both`); + + raf.tick(75); + component.visible = true; + + // reset original styles + assert.equal(div.style.animation, `__svelte_3809512021_1 100ms linear 0ms 1 both`); + }, +}; diff --git a/test/runtime/samples/transition-css-in-out-in/main.html b/test/runtime/samples/transition-css-in-out-in/main.html new file mode 100644 index 0000000000..5108452a39 --- /dev/null +++ b/test/runtime/samples/transition-css-in-out-in/main.html @@ -0,0 +1,25 @@ + + +{#if visible} +
    +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js b/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js index 75242d21af..e78862e86c 100644 --- a/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js +++ b/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js @@ -7,7 +7,7 @@ export default { ] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { const { things } = component; component.things = []; diff --git a/test/runtime/samples/transition-js-aborted-outro/_config.js b/test/runtime/samples/transition-js-aborted-outro/_config.js index 87ad32be07..d61407e1bd 100644 --- a/test/runtime/samples/transition-js-aborted-outro/_config.js +++ b/test/runtime/samples/transition-js-aborted-outro/_config.js @@ -3,7 +3,7 @@ export default { visible: true, }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = false; const span = target.querySelector('span'); diff --git a/test/runtime/samples/transition-js-await-block/_config.js b/test/runtime/samples/transition-js-await-block/_config.js index 5cddc8a95c..2e01dd7f76 100644 --- a/test/runtime/samples/transition-js-await-block/_config.js +++ b/test/runtime/samples/transition-js-await-block/_config.js @@ -13,7 +13,7 @@ export default { intro: true, - test({ assert, component, target, window, raf }) { + test({ assert, target, raf }) { let p = target.querySelector('p'); assert.equal(p.className, 'pending'); diff --git a/test/runtime/samples/transition-js-dynamic-if-block-bidi/_config.js b/test/runtime/samples/transition-js-dynamic-if-block-bidi/_config.js index 6036be6055..aa0bd9e1aa 100644 --- a/test/runtime/samples/transition-js-dynamic-if-block-bidi/_config.js +++ b/test/runtime/samples/transition-js-dynamic-if-block-bidi/_config.js @@ -3,7 +3,7 @@ export default { name: 'world' }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { global.count = 0; component.visible = true; diff --git a/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/_config.js b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/_config.js index 261731c700..04df38a09c 100644 --- a/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/_config.js +++ b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/_config.js @@ -12,9 +12,7 @@ export default {
    5
    `, - test({ assert, component, target, window, raf }) { - const divs = target.querySelectorAll('div'); - + test({ assert, component, target, raf }) { raf.tick(100); component.threshold = 4; diff --git a/test/runtime/samples/transition-js-if-else-block-intro/_config.js b/test/runtime/samples/transition-js-if-else-block-intro/_config.js index 2bf1483dac..c5eccf50e5 100644 --- a/test/runtime/samples/transition-js-if-else-block-intro/_config.js +++ b/test/runtime/samples/transition-js-if-else-block-intro/_config.js @@ -1,7 +1,7 @@ export default { intro: true, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { assert.equal(target.querySelector('div'), component.no); assert.equal(component.no.foo, 0); diff --git a/test/runtime/samples/transition-js-nested-each-delete/_config.js b/test/runtime/samples/transition-js-nested-each-delete/_config.js index c2a886db9a..041cbebc66 100644 --- a/test/runtime/samples/transition-js-nested-each-delete/_config.js +++ b/test/runtime/samples/transition-js-nested-each-delete/_config.js @@ -4,7 +4,7 @@ export default { things: ['a', 'b', 'c'] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { assert.htmlEqual(target.innerHTML, `
    a
    b
    From d033c833adee55a8623b0f1fb240e2faa3faeb84 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 13 Jan 2019 14:25:34 -0500 Subject: [PATCH 029/125] test for #1852 --- .../runtime/samples/attribute-unknown-without-value/_config.js | 3 +++ test/runtime/samples/attribute-unknown-without-value/main.html | 1 + 2 files changed, 4 insertions(+) create mode 100644 test/runtime/samples/attribute-unknown-without-value/_config.js create mode 100644 test/runtime/samples/attribute-unknown-without-value/main.html diff --git a/test/runtime/samples/attribute-unknown-without-value/_config.js b/test/runtime/samples/attribute-unknown-without-value/_config.js new file mode 100644 index 0000000000..4f7cf1cbbf --- /dev/null +++ b/test/runtime/samples/attribute-unknown-without-value/_config.js @@ -0,0 +1,3 @@ +export default { + html: '
    ' +}; \ No newline at end of file diff --git a/test/runtime/samples/attribute-unknown-without-value/main.html b/test/runtime/samples/attribute-unknown-without-value/main.html new file mode 100644 index 0000000000..0952586580 --- /dev/null +++ b/test/runtime/samples/attribute-unknown-without-value/main.html @@ -0,0 +1 @@ +
    \ No newline at end of file From 7c59539b392137947b1523171f229986bb98be55 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 13 Jan 2019 18:25:14 -0500 Subject: [PATCH 030/125] bump alpha version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4de67b4346..cdd31bca1e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha16", + "version": "3.0.0-alpha17", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index.js", From d3a7ccae4f760d61358e001911d35b4aee0c4d9f Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Sun, 13 Jan 2019 21:23:56 -0500 Subject: [PATCH 031/125] reconcile test diff --- test/js/samples/non-mutable-reference/expected.js | 14 ++++---------- .../_config.js | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/test/js/samples/non-mutable-reference/expected.js b/test/js/samples/non-mutable-reference/expected.js index 57f6f3fea1..7e83850226 100644 --- a/test/js/samples/non-mutable-reference/expected.js +++ b/test/js/samples/non-mutable-reference/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var h1, text0, text1, text2, current; + var h1, text0, text1, text2; return { c() { @@ -17,17 +17,11 @@ function create_fragment($$, ctx) { append(h1, text0); append(h1, text1); append(h1, text2); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/runtime/samples/component-slot-used-with-default-event/_config.js b/test/runtime/samples/component-slot-used-with-default-event/_config.js index 4a174a9a05..174d01f1a5 100644 --- a/test/runtime/samples/component-slot-used-with-default-event/_config.js +++ b/test/runtime/samples/component-slot-used-with-default-event/_config.js @@ -1,3 +1,3 @@ export default { - html: '

    Hello

    ', show: true + html: '

    Hello

    ' }; From dcfe85ecdbe39f71138469a5faceb1fadf8b0c8f Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 13 Jan 2019 18:44:10 -0500 Subject: [PATCH 032/125] improve preprocess tests --- test/preprocess/index.js | 231 ++---------------- test/preprocess/samples/filename/_config.js | 20 ++ test/preprocess/samples/filename/input.html | 3 + test/preprocess/samples/filename/output.html | 3 + .../samples/ignores-null/_config.js | 5 + .../samples/ignores-null/input.html | 3 + .../samples/ignores-null/output.html | 3 + test/preprocess/samples/markup/_config.js | 9 + test/preprocess/samples/markup/input.html | 1 + test/preprocess/samples/markup/output.html | 1 + .../samples/script-multiple/_config.js | 9 + .../samples/script-multiple/input.html | 9 + .../samples/script-multiple/output.html | 9 + test/preprocess/samples/script/_config.js | 9 + test/preprocess/samples/script/input.html | 3 + test/preprocess/samples/script/output.html | 3 + .../preprocess/samples/style-async/_config.js | 9 + .../preprocess/samples/style-async/input.html | 7 + .../samples/style-async/output.html | 7 + .../samples/style-attributes/_config.js | 14 ++ .../samples/style-attributes/input.html | 1 + .../samples/style-attributes/output.html | 1 + test/preprocess/samples/style/_config.js | 9 + test/preprocess/samples/style/input.html | 7 + test/preprocess/samples/style/output.html | 7 + 25 files changed, 167 insertions(+), 216 deletions(-) create mode 100644 test/preprocess/samples/filename/_config.js create mode 100644 test/preprocess/samples/filename/input.html create mode 100644 test/preprocess/samples/filename/output.html create mode 100644 test/preprocess/samples/ignores-null/_config.js create mode 100644 test/preprocess/samples/ignores-null/input.html create mode 100644 test/preprocess/samples/ignores-null/output.html create mode 100644 test/preprocess/samples/markup/_config.js create mode 100644 test/preprocess/samples/markup/input.html create mode 100644 test/preprocess/samples/markup/output.html create mode 100644 test/preprocess/samples/script-multiple/_config.js create mode 100644 test/preprocess/samples/script-multiple/input.html create mode 100644 test/preprocess/samples/script-multiple/output.html create mode 100644 test/preprocess/samples/script/_config.js create mode 100644 test/preprocess/samples/script/input.html create mode 100644 test/preprocess/samples/script/output.html create mode 100644 test/preprocess/samples/style-async/_config.js create mode 100644 test/preprocess/samples/style-async/input.html create mode 100644 test/preprocess/samples/style-async/output.html create mode 100644 test/preprocess/samples/style-attributes/_config.js create mode 100644 test/preprocess/samples/style-attributes/input.html create mode 100644 test/preprocess/samples/style-attributes/output.html create mode 100644 test/preprocess/samples/style/_config.js create mode 100644 test/preprocess/samples/style/input.html create mode 100644 test/preprocess/samples/style/output.html diff --git a/test/preprocess/index.js b/test/preprocess/index.js index 10661efd39..9d1e8b01c0 100644 --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -1,226 +1,25 @@ +import * as fs from 'fs'; import * as assert from 'assert'; -import { svelte } from '../helpers.js'; +import { loadConfig, svelte } from '../helpers.js'; -describe('preprocess', () => { - it('preprocesses entire component', () => { - const source = ` -

    Hello __NAME__!

    - `; +describe.only('preprocess', () => { + fs.readdirSync('test/preprocess/samples').forEach(dir => { + if (dir[0] === '.') return; - const expected = ` -

    Hello world!

    - `; + const config = loadConfig(`./preprocess/samples/${dir}/_config.js`); - return svelte.preprocess(source, { - markup: ({ content }) => { - return { - code: content.replace('__NAME__', 'world') - }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('preprocesses style', () => { - const source = ` -
    $brand
    - - - `; - - const expected = ` -
    $brand
    - - - `; - - return svelte.preprocess(source, { - style: ({ content }) => { - return { - code: content.replace('$brand', 'purple') - }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('preprocesses style asynchronously', () => { - const source = ` -
    $brand
    - - - `; - - const expected = ` -
    $brand
    - - - `; - - return svelte.preprocess(source, { - style: ({ content }) => { - return Promise.resolve({ - code: content.replace('$brand', 'purple') - }); - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('preprocesses script', () => { - const source = ` - - `; - - const expected = ` - - `; - - return svelte.preprocess(source, { - script: ({ content }) => { - return { - code: content.replace('__THE_ANSWER__', '42') - }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('preprocesses multiple matching tags', () => { - const source = ` - - - - `; - - const expected = ` - - - - `; - - return svelte.preprocess(source, { - script: ({ content }) => { - return { - code: content.toLowerCase() - }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('parses attributes', () => { - const source = ` - - `; - - const expected = ` - - `; - - return svelte.preprocess(source, { - style: ({ attributes }) => { - assert.deepEqual(attributes, { - type: 'text/scss', - 'data-foo': 'bar', - bool: true - }); - return { code: 'PROCESSED' }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('provides filename to processing hooks', () => { - const source = ` -

    Hello __MARKUP_FILENAME__!

    - - - `; - - const expected = ` -

    Hello file.html!

    - - - `; - - return svelte.preprocess(source, { - filename: 'file.html', - markup: ({ content, filename }) => { - return { - code: content.replace('__MARKUP_FILENAME__', filename) - }; - }, - style: ({ content, filename }) => { - return { - code: content.replace('__STYLE_FILENAME__', filename) - }; - }, - script: ({ content, filename }) => { - return { - code: content.replace('__SCRIPT_FILENAME__', filename) - }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); + if (config.solo && process.env.CI) { + throw new Error('Forgot to remove `solo: true` from test'); + } - it('ignores null/undefined returned from preprocessor', () => { - const source = ` - - `; + (config.skip ? it.skip : config.solo ? it.only : it)(dir, async () => { + const input = fs.readFileSync(`test/preprocess/samples/${dir}/input.html`, 'utf-8'); + const expected = fs.readFileSync(`test/preprocess/samples/${dir}/output.html`, 'utf-8'); - const expected = ` - - `; + const actual = await svelte.preprocess(input, config.preprocess); + fs.writeFileSync(`test/preprocess/samples/${dir}/_actual.html`, actual); - return svelte.preprocess(source, { - script: () => null - }).then(processed => { - assert.equal(processed.toString(), expected); + assert.equal(actual, expected); }); }); }); diff --git a/test/preprocess/samples/filename/_config.js b/test/preprocess/samples/filename/_config.js new file mode 100644 index 0000000000..d7a3c19770 --- /dev/null +++ b/test/preprocess/samples/filename/_config.js @@ -0,0 +1,20 @@ +export default { + preprocess: { + filename: 'file.html', + markup: ({ content, filename }) => { + return { + code: content.replace('__MARKUP_FILENAME__', filename) + }; + }, + style: ({ content, filename }) => { + return { + code: content.replace('__STYLE_FILENAME__', filename) + }; + }, + script: ({ content, filename }) => { + return { + code: content.replace('__SCRIPT_FILENAME__', filename) + }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/filename/input.html b/test/preprocess/samples/filename/input.html new file mode 100644 index 0000000000..f03a890f6e --- /dev/null +++ b/test/preprocess/samples/filename/input.html @@ -0,0 +1,3 @@ +

    Hello __MARKUP_FILENAME__!

    + + \ No newline at end of file diff --git a/test/preprocess/samples/filename/output.html b/test/preprocess/samples/filename/output.html new file mode 100644 index 0000000000..90fa180704 --- /dev/null +++ b/test/preprocess/samples/filename/output.html @@ -0,0 +1,3 @@ +

    Hello file.html!

    + + \ No newline at end of file diff --git a/test/preprocess/samples/ignores-null/_config.js b/test/preprocess/samples/ignores-null/_config.js new file mode 100644 index 0000000000..042ee89aed --- /dev/null +++ b/test/preprocess/samples/ignores-null/_config.js @@ -0,0 +1,5 @@ +export default { + preprocess: { + script: () => null + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/ignores-null/input.html b/test/preprocess/samples/ignores-null/input.html new file mode 100644 index 0000000000..b3fc25b643 --- /dev/null +++ b/test/preprocess/samples/ignores-null/input.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/ignores-null/output.html b/test/preprocess/samples/ignores-null/output.html new file mode 100644 index 0000000000..b3fc25b643 --- /dev/null +++ b/test/preprocess/samples/ignores-null/output.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/markup/_config.js b/test/preprocess/samples/markup/_config.js new file mode 100644 index 0000000000..857da608af --- /dev/null +++ b/test/preprocess/samples/markup/_config.js @@ -0,0 +1,9 @@ +export default { + preprocess: { + markup: ({ content }) => { + return { + code: content.replace('__NAME__', 'world') + }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/markup/input.html b/test/preprocess/samples/markup/input.html new file mode 100644 index 0000000000..d65a1a50a6 --- /dev/null +++ b/test/preprocess/samples/markup/input.html @@ -0,0 +1 @@ +

    Hello __NAME__!

    \ No newline at end of file diff --git a/test/preprocess/samples/markup/output.html b/test/preprocess/samples/markup/output.html new file mode 100644 index 0000000000..efe5048cbc --- /dev/null +++ b/test/preprocess/samples/markup/output.html @@ -0,0 +1 @@ +

    Hello world!

    \ No newline at end of file diff --git a/test/preprocess/samples/script-multiple/_config.js b/test/preprocess/samples/script-multiple/_config.js new file mode 100644 index 0000000000..d6656ff48e --- /dev/null +++ b/test/preprocess/samples/script-multiple/_config.js @@ -0,0 +1,9 @@ +export default { + preprocess: { + script: ({ content }) => { + return { + code: content.toLowerCase() + }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/script-multiple/input.html b/test/preprocess/samples/script-multiple/input.html new file mode 100644 index 0000000000..5a5221dc84 --- /dev/null +++ b/test/preprocess/samples/script-multiple/input.html @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/test/preprocess/samples/script-multiple/output.html b/test/preprocess/samples/script-multiple/output.html new file mode 100644 index 0000000000..64fe4c1f25 --- /dev/null +++ b/test/preprocess/samples/script-multiple/output.html @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/test/preprocess/samples/script/_config.js b/test/preprocess/samples/script/_config.js new file mode 100644 index 0000000000..8e8ac1d2f9 --- /dev/null +++ b/test/preprocess/samples/script/_config.js @@ -0,0 +1,9 @@ +export default { + preprocess: { + script: ({ content }) => { + return { + code: content.replace('__THE_ANSWER__', '42') + }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/script/input.html b/test/preprocess/samples/script/input.html new file mode 100644 index 0000000000..8236f6d9d2 --- /dev/null +++ b/test/preprocess/samples/script/input.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/script/output.html b/test/preprocess/samples/script/output.html new file mode 100644 index 0000000000..5bef15aab0 --- /dev/null +++ b/test/preprocess/samples/script/output.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/style-async/_config.js b/test/preprocess/samples/style-async/_config.js new file mode 100644 index 0000000000..a91f8f4307 --- /dev/null +++ b/test/preprocess/samples/style-async/_config.js @@ -0,0 +1,9 @@ +export default { + preprocess: { + style: ({ content }) => { + return Promise.resolve({ + code: content.replace('$brand', 'purple') + }); + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/style-async/input.html b/test/preprocess/samples/style-async/input.html new file mode 100644 index 0000000000..303ac6366a --- /dev/null +++ b/test/preprocess/samples/style-async/input.html @@ -0,0 +1,7 @@ +
    $brand
    + + \ No newline at end of file diff --git a/test/preprocess/samples/style-async/output.html b/test/preprocess/samples/style-async/output.html new file mode 100644 index 0000000000..2847cc525a --- /dev/null +++ b/test/preprocess/samples/style-async/output.html @@ -0,0 +1,7 @@ +
    $brand
    + + \ No newline at end of file diff --git a/test/preprocess/samples/style-attributes/_config.js b/test/preprocess/samples/style-attributes/_config.js new file mode 100644 index 0000000000..7a619054bd --- /dev/null +++ b/test/preprocess/samples/style-attributes/_config.js @@ -0,0 +1,14 @@ +import * as assert from 'assert'; + +export default { + preprocess: { + style: ({ attributes }) => { + assert.deepEqual(attributes, { + type: 'text/scss', + 'data-foo': 'bar', + bool: true + }); + return { code: 'PROCESSED' }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/style-attributes/input.html b/test/preprocess/samples/style-attributes/input.html new file mode 100644 index 0000000000..3a55a5a3f6 --- /dev/null +++ b/test/preprocess/samples/style-attributes/input.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/style-attributes/output.html b/test/preprocess/samples/style-attributes/output.html new file mode 100644 index 0000000000..c83defeebb --- /dev/null +++ b/test/preprocess/samples/style-attributes/output.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/style/_config.js b/test/preprocess/samples/style/_config.js new file mode 100644 index 0000000000..59040eccdd --- /dev/null +++ b/test/preprocess/samples/style/_config.js @@ -0,0 +1,9 @@ +export default { + preprocess: { + style: ({ content }) => { + return { + code: content.replace('$brand', 'purple') + }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/style/input.html b/test/preprocess/samples/style/input.html new file mode 100644 index 0000000000..303ac6366a --- /dev/null +++ b/test/preprocess/samples/style/input.html @@ -0,0 +1,7 @@ +
    $brand
    + + \ No newline at end of file diff --git a/test/preprocess/samples/style/output.html b/test/preprocess/samples/style/output.html new file mode 100644 index 0000000000..2847cc525a --- /dev/null +++ b/test/preprocess/samples/style/output.html @@ -0,0 +1,7 @@ +
    $brand
    + + \ No newline at end of file From 4936cd5ac4c020b0a3104edfbcf4445a39d8143b Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 13 Jan 2019 19:26:31 -0500 Subject: [PATCH 033/125] support multiple preprocessors, handle dependencies - fixes #1973 --- src/preprocess/index.ts | 68 +++++++++++++------ test/preprocess/index.js | 8 ++- .../samples/dependencies/_config.js | 15 ++++ .../samples/dependencies/input.html | 3 + .../samples/dependencies/output.html | 3 + .../samples/multiple-preprocessors/_config.js | 14 ++++ .../samples/multiple-preprocessors/input.html | 11 +++ .../multiple-preprocessors/output.html | 11 +++ 8 files changed, 111 insertions(+), 22 deletions(-) create mode 100644 test/preprocess/samples/dependencies/_config.js create mode 100644 test/preprocess/samples/dependencies/input.html create mode 100644 test/preprocess/samples/dependencies/output.html create mode 100644 test/preprocess/samples/multiple-preprocessors/_config.js create mode 100644 test/preprocess/samples/multiple-preprocessors/input.html create mode 100644 test/preprocess/samples/multiple-preprocessors/output.html diff --git a/src/preprocess/index.ts b/src/preprocess/index.ts index 5537b30ea1..4aaa033270 100644 --- a/src/preprocess/index.ts +++ b/src/preprocess/index.ts @@ -1,25 +1,25 @@ import { SourceMap } from 'magic-string'; import replaceAsync from '../utils/replaceAsync'; -export interface PreprocessOptions { +export interface PreprocessorGroup { markup?: (options: { content: string, filename: string - }) => { code: string, map?: SourceMap | string }; + }) => { code: string, map?: SourceMap | string, dependencies?: string[] }; style?: Preprocessor; script?: Preprocessor; - filename?: string } export type Preprocessor = (options: { content: string, attributes: Record, filename?: string -}) => { code: string, map?: SourceMap | string }; +}) => { code: string, map?: SourceMap | string, dependencies?: string[] }; interface Processed { code: string; map?: SourceMap | string; + dependencies?: string[]; } function parseAttributeValue(value: string) { @@ -39,28 +39,55 @@ function parseAttributes(str: string) { export default async function preprocess( source: string, - options: PreprocessOptions + preprocessor: PreprocessorGroup | PreprocessorGroup[], + options?: { filename?: string } ) { - if (options.markup) { - const processed: Processed = await options.markup({ + const filename = (options && options.filename) || preprocessor.filename; // legacy + const dependencies = []; + + const preprocessors = Array.isArray(preprocessor) ? preprocessor : [preprocessor]; + + const markup = preprocessors.map(p => p.markup).filter(Boolean); + const script = preprocessors.map(p => p.script).filter(Boolean); + const style = preprocessors.map(p => p.style).filter(Boolean); + + for (const fn of markup) { + const processed: Processed = await fn({ content: source, - filename: options.filename, + filename }); + if (processed && processed.dependencies) dependencies.push(...processed.dependencies); source = processed ? processed.code : source; } - if (options.style || options.script) { + + for (const fn of script) { + source = await replaceAsync( + source, + /([^]*?)<\/script>/gi, + async (match, attributes, content) => { + const processed: Processed = await fn({ + content, + attributes: parseAttributes(attributes), + filename + }); + if (processed && processed.dependencies) dependencies.push(...processed.dependencies); + return processed ? `${processed.code}` : match; + } + ); + } + + for (const fn of style) { source = await replaceAsync( source, - /<(script|style)([^]*?)>([^]*?)<\/\1>/gi, - async (match, type, attributes, content) => { - const processed: Processed = - type in options && - (await options[type]({ - content, - attributes: parseAttributes(attributes), - filename: options.filename, - })); - return processed ? `<${type}${attributes}>${processed.code}` : match; + /([^]*?)<\/style>/gi, + async (match, attributes, content) => { + const processed: Processed = await fn({ + content, + attributes: parseAttributes(attributes), + filename + }); + if (processed && processed.dependencies) dependencies.push(...processed.dependencies); + return processed ? `${processed.code}` : match; } ); } @@ -71,6 +98,9 @@ export default async function preprocess( // script { code: scriptCode, map: scriptMap }, // markup { code: markupCode, map: markupMap }, + code: source, + dependencies: [...new Set(dependencies)], + toString() { return source; } diff --git a/test/preprocess/index.js b/test/preprocess/index.js index 9d1e8b01c0..e24c96a0c4 100644 --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -16,10 +16,12 @@ describe.only('preprocess', () => { const input = fs.readFileSync(`test/preprocess/samples/${dir}/input.html`, 'utf-8'); const expected = fs.readFileSync(`test/preprocess/samples/${dir}/output.html`, 'utf-8'); - const actual = await svelte.preprocess(input, config.preprocess); - fs.writeFileSync(`test/preprocess/samples/${dir}/_actual.html`, actual); + const result = await svelte.preprocess(input, config.preprocess); + fs.writeFileSync(`test/preprocess/samples/${dir}/_actual.html`, result.code); - assert.equal(actual, expected); + assert.equal(result.code, expected); + + assert.deepEqual(result.dependencies, config.dependencies || []); }); }); }); diff --git a/test/preprocess/samples/dependencies/_config.js b/test/preprocess/samples/dependencies/_config.js new file mode 100644 index 0000000000..fa2d8b40c9 --- /dev/null +++ b/test/preprocess/samples/dependencies/_config.js @@ -0,0 +1,15 @@ +export default { + preprocess: { + style: ({ content }) => { + const dependencies = []; + const code = content.replace(/@import '(.+)';/g, (match, $1) => { + dependencies.push($1); + return '/* removed */'; + }); + + return { code, dependencies }; + } + }, + + dependencies: ['./foo.css'] +}; \ No newline at end of file diff --git a/test/preprocess/samples/dependencies/input.html b/test/preprocess/samples/dependencies/input.html new file mode 100644 index 0000000000..34a12faff6 --- /dev/null +++ b/test/preprocess/samples/dependencies/input.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/dependencies/output.html b/test/preprocess/samples/dependencies/output.html new file mode 100644 index 0000000000..d80d51a6fc --- /dev/null +++ b/test/preprocess/samples/dependencies/output.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/multiple-preprocessors/_config.js b/test/preprocess/samples/multiple-preprocessors/_config.js new file mode 100644 index 0000000000..8a57567f6b --- /dev/null +++ b/test/preprocess/samples/multiple-preprocessors/_config.js @@ -0,0 +1,14 @@ +export default { + preprocess: [ + { + markup: ({ content }) => ({ code: content.replace(/one/g, 'two') }), + script: ({ content }) => ({ code: content.replace(/three/g, 'four') }), + style: ({ content }) => ({ code: content.replace(/four/g, 'five') }) + }, + { + markup: ({ content }) => ({ code: content.replace(/two/g, 'three') }), + script: ({ content }) => ({ code: content.replace(/four/g, 'five') }), + style: ({ content }) => ({ code: content.replace(/three/g, 'four') }) + } + ] +}; \ No newline at end of file diff --git a/test/preprocess/samples/multiple-preprocessors/input.html b/test/preprocess/samples/multiple-preprocessors/input.html new file mode 100644 index 0000000000..6dbbfb47a9 --- /dev/null +++ b/test/preprocess/samples/multiple-preprocessors/input.html @@ -0,0 +1,11 @@ +

    one

    + + + + \ No newline at end of file diff --git a/test/preprocess/samples/multiple-preprocessors/output.html b/test/preprocess/samples/multiple-preprocessors/output.html new file mode 100644 index 0000000000..dd6f3e9de8 --- /dev/null +++ b/test/preprocess/samples/multiple-preprocessors/output.html @@ -0,0 +1,11 @@ +

    three

    + + + + \ No newline at end of file From b18aac97f741df5ea20324cc9d90cf5d54fe25b6 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 13 Jan 2019 19:30:21 -0500 Subject: [PATCH 034/125] reenable all tests --- test/preprocess/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/preprocess/index.js b/test/preprocess/index.js index e24c96a0c4..fddc14ec94 100644 --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -2,7 +2,7 @@ import * as fs from 'fs'; import * as assert from 'assert'; import { loadConfig, svelte } from '../helpers.js'; -describe.only('preprocess', () => { +describe('preprocess', () => { fs.readdirSync('test/preprocess/samples').forEach(dir => { if (dir[0] === '.') return; From 3359b5fb3aaecfa719128e9b1d8a17d35268204b Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 15 Jan 2019 09:32:06 -0500 Subject: [PATCH 035/125] set immutable option correctly - fixes #1968 --- src/compile/Component.ts | 53 ++++++++++++++----- src/compile/render-dom/index.ts | 2 +- .../samples/immutable-option/_config.js | 10 ++++ .../main.html | 2 + .../runtime/samples/immutable-root/_config.js | 17 ------ .../immutable-svelte-meta-false/_config.js | 10 ++++ .../immutable-svelte-meta-false/main.html | 12 +++++ .../samples/immutable-svelte-meta/_config.js | 8 +++ .../samples/immutable-svelte-meta/main.html | 12 +++++ 9 files changed, 94 insertions(+), 32 deletions(-) create mode 100644 test/runtime/samples/immutable-option/_config.js rename test/runtime/samples/{immutable-root => immutable-option}/main.html (78%) delete mode 100644 test/runtime/samples/immutable-root/_config.js create mode 100644 test/runtime/samples/immutable-svelte-meta-false/_config.js create mode 100644 test/runtime/samples/immutable-svelte-meta-false/main.html create mode 100644 test/runtime/samples/immutable-svelte-meta/_config.js create mode 100644 test/runtime/samples/immutable-svelte-meta/main.html diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 9b7dbbb381..753342ce53 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -1030,20 +1030,29 @@ export default class Component { } function process_meta(component, nodes) { - const meta: Meta = {}; + const meta: Meta = { + immutable: component.options.immutable || false + }; + const node = nodes.find(node => node.name === 'svelte:meta'); - function get_value(attribute, message) { - const { name, value } = attribute; + function get_value(attribute, code, message) { + const { value } = attribute; + const chunk = value[0]; - if (value.length > 1 || (value[0] && value[0].type !== 'Text')) { - component.error(attribute, { - code: `invalid-${name}-attribute`, - message - }); + if (!chunk) return true; + + if (value.length > 1) { + component.error(attribute, { code, message }); + } + + if (chunk.type === 'Text') return chunk.data; + + if (chunk.expression.type !== 'Literal') { + component.error(attribute, { code, message }); } - return value[0] ? value[0].data : true; + return chunk.expression.value; } if (node) { @@ -1052,8 +1061,12 @@ function process_meta(component, nodes) { const { name } = attribute; switch (name) { - case 'tag': - const tag = get_value(attribute, `'tag' must be a string literal`); + case 'tag': { + const code = 'invalid-tag-attribute'; + const message = `'tag' must be a string literal`; + const tag = get_value(attribute, code, message); + + if (typeof tag !== 'string') component.error({ code, message }); if (!/^[a-zA-Z][a-zA-Z0-9]*-[a-zA-Z0-9-]+$/.test(tag)) { component.error(attribute, { @@ -1064,9 +1077,14 @@ function process_meta(component, nodes) { meta.tag = tag; break; + } + + case 'namespace': { + const code = 'invalid-namespace-attribute'; + const message = `The 'namespace' attribute must be a string literal representing a valid namespace`; + const ns = get_value(attribute, code, message); - case 'namespace': - const ns = get_value(attribute, `The 'namespace' attribute must be a string literal representing a valid namespace`); + if (typeof ns !== 'string') component.error({ code, message }); if (validNamespaces.indexOf(ns) === -1) { const match = fuzzymatch(ns, validNamespaces); @@ -1085,9 +1103,16 @@ function process_meta(component, nodes) { meta.namespace = ns; break; + } case 'immutable': - meta.immutable = get_value(attribute, `immutable attribute must be true or false`) !== 'false'; + const code = `invalid-immutable-value`; + const message = `immutable attribute must be true or false` + const value = get_value(attribute, code, message); + + if (typeof value !== 'boolean') component.error({ code, message }); + + meta.immutable = value; break; default: diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts index 50b0a35206..b48df5396a 100644 --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -87,7 +87,7 @@ export default function dom( const body = []; - const not_equal = component.options.immutable ? `@not_equal` : `@safe_not_equal`; + const not_equal = component.meta.immutable ? `@not_equal` : `@safe_not_equal`; let dev_props_check; component.props.forEach(x => { diff --git a/test/runtime/samples/immutable-option/_config.js b/test/runtime/samples/immutable-option/_config.js new file mode 100644 index 0000000000..0aaa742fbe --- /dev/null +++ b/test/runtime/samples/immutable-option/_config.js @@ -0,0 +1,10 @@ +export default { + immutable: true, + + html: `

    Called 1 times.

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

    Called 1 times.

    `); + } +}; diff --git a/test/runtime/samples/immutable-root/main.html b/test/runtime/samples/immutable-option/main.html similarity index 78% rename from test/runtime/samples/immutable-root/main.html rename to test/runtime/samples/immutable-option/main.html index 85c31ae989..cd0cfbcc95 100644 --- a/test/runtime/samples/immutable-root/main.html +++ b/test/runtime/samples/immutable-option/main.html @@ -1,6 +1,8 @@
    diff --git a/test/runtime/samples/immutable-root/_config.js b/test/runtime/samples/immutable-root/_config.js deleted file mode 100644 index 174dbb808b..0000000000 --- a/test/runtime/samples/immutable-root/_config.js +++ /dev/null @@ -1,17 +0,0 @@ -export default { - immutable: true, - html: `

    Called 0 times.

    `, - - test({ assert, component, target, window }) { - component.$on('state', ({ changed }) => { - if (changed.foo) { - component.count = component.count + 1; - } - }); - - assert.htmlEqual(target.innerHTML, `

    Called 0 times.

    `); - - component.foo = component.foo; - assert.htmlEqual(target.innerHTML, `

    Called 0 times.

    `); - } -}; diff --git a/test/runtime/samples/immutable-svelte-meta-false/_config.js b/test/runtime/samples/immutable-svelte-meta-false/_config.js new file mode 100644 index 0000000000..933c151d6b --- /dev/null +++ b/test/runtime/samples/immutable-svelte-meta-false/_config.js @@ -0,0 +1,10 @@ +export default { + immutable: true, + + html: `

    Called 1 times.

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

    Called 2 times.

    `); + } +}; diff --git a/test/runtime/samples/immutable-svelte-meta-false/main.html b/test/runtime/samples/immutable-svelte-meta-false/main.html new file mode 100644 index 0000000000..4649dac766 --- /dev/null +++ b/test/runtime/samples/immutable-svelte-meta-false/main.html @@ -0,0 +1,12 @@ + + + + +
    +

    Called {count} times.

    +
    \ No newline at end of file diff --git a/test/runtime/samples/immutable-svelte-meta/_config.js b/test/runtime/samples/immutable-svelte-meta/_config.js new file mode 100644 index 0000000000..9bd32dbd11 --- /dev/null +++ b/test/runtime/samples/immutable-svelte-meta/_config.js @@ -0,0 +1,8 @@ +export default { + html: `

    Called 1 times.

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

    Called 1 times.

    `); + } +}; diff --git a/test/runtime/samples/immutable-svelte-meta/main.html b/test/runtime/samples/immutable-svelte-meta/main.html new file mode 100644 index 0000000000..7e7979e0f1 --- /dev/null +++ b/test/runtime/samples/immutable-svelte-meta/main.html @@ -0,0 +1,12 @@ + + + + +
    +

    Called {count} times.

    +
    \ No newline at end of file From 5b73c03271cb7f45316e9ea69f7ea6f0b169e819 Mon Sep 17 00:00:00 2001 From: Brian Hann Date: Tue, 15 Jan 2019 08:59:01 -0600 Subject: [PATCH 036/125] Syntax error on element binding example --- site/content/guide/08-bindings.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/guide/08-bindings.md b/site/content/guide/08-bindings.md index 588111baa2..92e058c5ae 100644 --- a/site/content/guide/08-bindings.md +++ b/site/content/guide/08-bindings.md @@ -36,7 +36,7 @@ Element bindings make it easy to respond to user interactions: ```html

    Hello {name}!

    - + ``` ```json @@ -158,4 +158,4 @@ export default function createRenderer(canvas, ctx) { ctx.putImageData(imageData, 0, 0); } } -``` \ No newline at end of file +``` From 4e1a87d92f363d289f934143ff95bfa6a42498f5 Mon Sep 17 00:00:00 2001 From: John Muhl Date: Tue, 15 Jan 2019 17:35:55 +0000 Subject: [PATCH 037/125] Add fallback for users without "Fira Mono" --- site/static/global.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/static/global.css b/site/static/global.css index c7c674ee84..38d1836a6c 100644 --- a/site/static/global.css +++ b/site/static/global.css @@ -109,7 +109,7 @@ body { /* --font: 'Roboto', 'sans-serif'; */ /* --font-mono: 'Overpass Mono', monospace; */ /* --font-mono: 'IBM Plex Mono'; */ - --font-mono: 'Fira Mono'; + --font-mono: 'Fira Mono', monospace; --font-ui: var(--font-mono); --font-system: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; } From df7c449bd357e16d7dc8a2478c2f2fa7f90e1a51 Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Tue, 15 Jan 2019 18:08:53 -0500 Subject: [PATCH 038/125] propagate mutation change tracking upward through deps so that adjacent scopes generate proper update code - fixes #1985 --- src/compile/nodes/shared/TemplateScope.ts | 10 ++++++---- .../_config.js | 12 ++++++++++++ .../main.html | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 test/runtime/samples/mutation-tracking-across-sibling-scopes/_config.js create mode 100644 test/runtime/samples/mutation-tracking-across-sibling-scopes/main.html diff --git a/src/compile/nodes/shared/TemplateScope.ts b/src/compile/nodes/shared/TemplateScope.ts index 45a8895505..c9b81070b8 100644 --- a/src/compile/nodes/shared/TemplateScope.ts +++ b/src/compile/nodes/shared/TemplateScope.ts @@ -1,6 +1,6 @@ export default class TemplateScope { names: Set; - dependenciesForName: Map; + dependenciesForName: Map>; mutables: Set; parent?: TemplateScope; @@ -11,7 +11,7 @@ export default class TemplateScope { this.mutables = new Set(); } - add(name, dependencies) { + add(name, dependencies: Set) { this.names.add(name); this.dependenciesForName.set(name, dependencies); return this; @@ -23,8 +23,10 @@ export default class TemplateScope { } setMutable(name: string) { - if (this.names.has(name)) this.mutables.add(name); - else if (this.parent) this.parent.setMutable(name); + if (this.names.has(name)) { + this.mutables.add(name); + if (this.parent && this.dependenciesForName.has(name)) this.dependenciesForName.get(name).forEach(dep => this.parent.setMutable(dep)); + } else if (this.parent) this.parent.setMutable(name); else this.mutables.add(name); } diff --git a/test/runtime/samples/mutation-tracking-across-sibling-scopes/_config.js b/test/runtime/samples/mutation-tracking-across-sibling-scopes/_config.js new file mode 100644 index 0000000000..038db6dbbb --- /dev/null +++ b/test/runtime/samples/mutation-tracking-across-sibling-scopes/_config.js @@ -0,0 +1,12 @@ +export default { + async test({ assert, component, target }) { + assert.htmlEqual(component.div.innerHTML, '
    +
    -
    '); + + const event = new window.Event('change'); + const input = target.querySelector('input'); + input.checked = false; + await input.dispatchEvent(event); + + assert.htmlEqual(component.div.innerHTML, '
    -
    -
    '); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/mutation-tracking-across-sibling-scopes/main.html b/test/runtime/samples/mutation-tracking-across-sibling-scopes/main.html new file mode 100644 index 0000000000..9ed06657d7 --- /dev/null +++ b/test/runtime/samples/mutation-tracking-across-sibling-scopes/main.html @@ -0,0 +1,18 @@ +{#each things as thing} +
    + +
    +{/each} + +
    + {#each things as other} +
    + {other.ok ? '+' : '-'} +
    + {/each} +
    + + \ No newline at end of file From 2368dff5f8824379297ac4e5490a69ffdbb470b9 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 15 Jan 2019 20:25:55 -0500 Subject: [PATCH 039/125] typos --- src/compile/Component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 753342ce53..ca3ed818cb 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -1066,7 +1066,7 @@ function process_meta(component, nodes) { const message = `'tag' must be a string literal`; const tag = get_value(attribute, code, message); - if (typeof tag !== 'string') component.error({ code, message }); + if (typeof tag !== 'string') component.error(attribute, { code, message }); if (!/^[a-zA-Z][a-zA-Z0-9]*-[a-zA-Z0-9-]+$/.test(tag)) { component.error(attribute, { @@ -1084,7 +1084,7 @@ function process_meta(component, nodes) { const message = `The 'namespace' attribute must be a string literal representing a valid namespace`; const ns = get_value(attribute, code, message); - if (typeof ns !== 'string') component.error({ code, message }); + if (typeof ns !== 'string') component.error(attribute, { code, message }); if (validNamespaces.indexOf(ns) === -1) { const match = fuzzymatch(ns, validNamespaces); @@ -1110,7 +1110,7 @@ function process_meta(component, nodes) { const message = `immutable attribute must be true or false` const value = get_value(attribute, code, message); - if (typeof value !== 'boolean') component.error({ code, message }); + if (typeof value !== 'boolean') component.error(attribute, { code, message }); meta.immutable = value; break; From 097507796db33e8dbfb65c320ddaa84ea3866cca Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Thu, 17 Jan 2019 09:15:06 -0500 Subject: [PATCH 040/125] expose add_render_callback as afterFlush - fixes #1976 --- index.mjs | 1 + .../samples/lifecycle-after-flush/_config.js | 20 +++++++++++++++++++ .../samples/lifecycle-after-flush/main.html | 19 ++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 test/runtime/samples/lifecycle-after-flush/_config.js create mode 100644 test/runtime/samples/lifecycle-after-flush/main.html diff --git a/index.mjs b/index.mjs index 44031c35c8..55f227749e 100644 --- a/index.mjs +++ b/index.mjs @@ -3,5 +3,6 @@ export { onDestroy, beforeUpdate, afterUpdate, + add_render_callback as afterFlush, createEventDispatcher } from './internal'; diff --git a/test/runtime/samples/lifecycle-after-flush/_config.js b/test/runtime/samples/lifecycle-after-flush/_config.js new file mode 100644 index 0000000000..222dd26286 --- /dev/null +++ b/test/runtime/samples/lifecycle-after-flush/_config.js @@ -0,0 +1,20 @@ +export default { + async test({ assert, component, target, window }) { + const button = target.querySelector('button'); + const click = new window.MouseEvent('click'); + + await button.dispatchEvent(click); + assert.deepEqual(component.snapshots, [ + 'before 0', + 'after 1' + ]); + + await button.dispatchEvent(click); + assert.deepEqual(component.snapshots, [ + 'before 0', + 'after 1', + 'before 1', + 'after 2' + ]); + } +}; diff --git a/test/runtime/samples/lifecycle-after-flush/main.html b/test/runtime/samples/lifecycle-after-flush/main.html new file mode 100644 index 0000000000..0e6b76d0f3 --- /dev/null +++ b/test/runtime/samples/lifecycle-after-flush/main.html @@ -0,0 +1,19 @@ + + + \ No newline at end of file From 4d262c4d969a2e6a08e388b523b81af8063aa1d5 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Thu, 17 Jan 2019 22:36:21 -0500 Subject: [PATCH 041/125] bump alpha version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cdd31bca1e..b174d06a5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha17", + "version": "3.0.0-alpha18", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index.js", From c2660518116122e6e6710210153551139dc2be47 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 18 Jan 2019 21:06:24 -0500 Subject: [PATCH 042/125] rename afterFlush to nextTick, schedule update if necessary --- index.mjs | 2 +- src/internal/Component.js | 5 ++-- src/internal/scheduler.js | 15 ++++++---- .../samples/lifecycle-after-flush/_config.js | 20 ------------- .../samples/lifecycle-after-flush/main.html | 19 ------------ .../samples/lifecycle-next-tick/_config.js | 30 +++++++++++++++++++ .../samples/lifecycle-next-tick/main.html | 24 +++++++++++++++ 7 files changed, 67 insertions(+), 48 deletions(-) delete mode 100644 test/runtime/samples/lifecycle-after-flush/_config.js delete mode 100644 test/runtime/samples/lifecycle-after-flush/main.html create mode 100644 test/runtime/samples/lifecycle-next-tick/_config.js create mode 100644 test/runtime/samples/lifecycle-next-tick/main.html diff --git a/index.mjs b/index.mjs index 55f227749e..1ba5890537 100644 --- a/index.mjs +++ b/index.mjs @@ -3,6 +3,6 @@ export { onDestroy, beforeUpdate, afterUpdate, - add_render_callback as afterFlush, + nextTick, createEventDispatcher } from './internal'; diff --git a/src/internal/Component.js b/src/internal/Component.js index 8df1d7aee5..4eac8d57af 100644 --- a/src/internal/Component.js +++ b/src/internal/Component.js @@ -1,4 +1,4 @@ -import { add_render_callback, flush, intros, schedule_update } from './scheduler.js'; +import { add_render_callback, flush, intros, schedule_update, dirty_components } from './scheduler.js'; import { current_component, set_current_component } from './lifecycle.js' import { is_function, run, run_all, noop } from './utils.js'; import { blankObject } from './utils.js'; @@ -46,7 +46,8 @@ function destroy(component, detach) { function make_dirty(component, key) { if (!component.$$.dirty) { - schedule_update(component); + dirty_components.push(component); + schedule_update(); component.$$.dirty = {}; } component.$$.dirty[key] = true; diff --git a/src/internal/scheduler.js b/src/internal/scheduler.js index 962c321fd6..0626db2a97 100644 --- a/src/internal/scheduler.js +++ b/src/internal/scheduler.js @@ -1,15 +1,13 @@ import { run_all } from './utils.js'; -let update_scheduled = false; +export let dirty_components = []; +export const intros = { enabled: false }; -let dirty_components = []; +let update_scheduled = false; const binding_callbacks = []; const render_callbacks = []; -export const intros = { enabled: false }; - -export function schedule_update(component) { - dirty_components.push(component); +export function schedule_update() { if (!update_scheduled) { update_scheduled = true; queue_microtask(flush); @@ -20,6 +18,11 @@ export function add_render_callback(fn) { render_callbacks.push(fn); } +export function nextTick(fn) { + add_render_callback(fn); + schedule_update(); +} + export function add_binding_callback(fn) { binding_callbacks.push(fn); } diff --git a/test/runtime/samples/lifecycle-after-flush/_config.js b/test/runtime/samples/lifecycle-after-flush/_config.js deleted file mode 100644 index 222dd26286..0000000000 --- a/test/runtime/samples/lifecycle-after-flush/_config.js +++ /dev/null @@ -1,20 +0,0 @@ -export default { - async test({ assert, component, target, window }) { - const button = target.querySelector('button'); - const click = new window.MouseEvent('click'); - - await button.dispatchEvent(click); - assert.deepEqual(component.snapshots, [ - 'before 0', - 'after 1' - ]); - - await button.dispatchEvent(click); - assert.deepEqual(component.snapshots, [ - 'before 0', - 'after 1', - 'before 1', - 'after 2' - ]); - } -}; diff --git a/test/runtime/samples/lifecycle-after-flush/main.html b/test/runtime/samples/lifecycle-after-flush/main.html deleted file mode 100644 index 0e6b76d0f3..0000000000 --- a/test/runtime/samples/lifecycle-after-flush/main.html +++ /dev/null @@ -1,19 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/lifecycle-next-tick/_config.js b/test/runtime/samples/lifecycle-next-tick/_config.js new file mode 100644 index 0000000000..35a66f7a09 --- /dev/null +++ b/test/runtime/samples/lifecycle-next-tick/_config.js @@ -0,0 +1,30 @@ +export default { + async test({ assert, component, target, window }) { + const buttons = target.querySelectorAll('button'); + const click = new window.MouseEvent('click'); + + await buttons[0].dispatchEvent(click); + assert.deepEqual(component.snapshots, [ + 'before 0', + 'after 1' + ]); + + await buttons[0].dispatchEvent(click); + assert.deepEqual(component.snapshots, [ + 'before 0', + 'after 1', + 'before 1', + 'after 2' + ]); + + await buttons[1].dispatchEvent(click); + assert.deepEqual(component.snapshots, [ + 'before 0', + 'after 1', + 'before 1', + 'after 2', + 'before 2', + 'after 2' + ]); + } +}; diff --git a/test/runtime/samples/lifecycle-next-tick/main.html b/test/runtime/samples/lifecycle-next-tick/main.html new file mode 100644 index 0000000000..f7a889d433 --- /dev/null +++ b/test/runtime/samples/lifecycle-next-tick/main.html @@ -0,0 +1,24 @@ + + + + \ No newline at end of file From 8c3f652a01d3d2dcd73794d8b25956c9a2ba41c5 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 18 Jan 2019 21:24:17 -0500 Subject: [PATCH 043/125] fix scroll bindings --- src/compile/render-dom/wrappers/Window.ts | 4 ++-- test/js/samples/window-binding-scroll/expected.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compile/render-dom/wrappers/Window.ts b/src/compile/render-dom/wrappers/Window.ts index 7bf41cdc0b..c986d3726f 100644 --- a/src/compile/render-dom/wrappers/Window.ts +++ b/src/compile/render-dom/wrappers/Window.ts @@ -146,9 +146,9 @@ export default class WindowWrapper extends Wrapper { ${scrolling} = true; clearTimeout(${scrolling_timeout}); window.scrollTo(${ - bindings.scrollX ? `current["${bindings.scrollX}"]` : `window.pageXOffset` + bindings.scrollX ? `ctx.${bindings.scrollX}` : `window.pageXOffset` }, ${ - bindings.scrollY ? `current["${bindings.scrollY}"]` : `window.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 a613882827..7a5e291866 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -29,7 +29,7 @@ function create_fragment($$, ctx) { if (changed.y && !scrolling) { scrolling = true; clearTimeout(scrolling_timeout); - window.scrollTo(window.pageXOffset, current["y"]); + window.scrollTo(window.pageXOffset, ctx.y); scrolling_timeout = setTimeout(clear_scrolling, 100); } From 81d964751738bd0e6484a71a564a467f7a5b188c Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 18 Jan 2019 21:40:08 -0500 Subject: [PATCH 044/125] hoist vars and lets - closes #1952 --- src/compile/Component.ts | 8 ++-- test/js/samples/hoisted-let/expected.js | 41 +++++++++++++++++++ test/js/samples/hoisted-let/input.html | 6 +++ .../js/samples/if-block-no-update/expected.js | 2 +- test/js/samples/if-block-simple/expected.js | 2 +- .../expected.js | 9 ++-- .../samples/non-mutable-reference/expected.js | 12 ++---- .../use-elements-as-anchors/expected.js | 2 +- 8 files changed, 63 insertions(+), 19 deletions(-) create mode 100644 test/js/samples/hoisted-let/expected.js create mode 100644 test/js/samples/hoisted-let/input.html diff --git a/src/compile/Component.ts b/src/compile/Component.ts index ca3ed818cb..b07af70a64 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -750,18 +750,18 @@ export default class Component { } hoist_instance_declarations() { - // we can safely hoist `const` declarations that are + // we can safely hoist variable declarations that are // initialised to literals, and functions that don't // reference instance variables other than other // hoistable functions. TODO others? - const { hoistable_names, hoistable_nodes, imported_declarations } = this; + const { hoistable_names, hoistable_nodes, imported_declarations, instance_scope: scope } = this; const top_level_function_declarations = new Map(); this.instance_script.content.body.forEach(node => { - if (node.kind === 'const') { // TODO or let or var, if never reassigned in + +{get_answer()} \ No newline at end of file diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index 9c1db56bd7..d8763aed51 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -83,7 +83,7 @@ function create_fragment($$, ctx) { d(detach) { if_block.d(detach); - + if (detach) { detachNode(if_block_anchor); } diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index 43c99c1d53..bd6528b11c 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -57,7 +57,7 @@ function create_fragment($$, ctx) { d(detach) { if (if_block) if_block.d(detach); - + if (detach) { detachNode(if_block_anchor); } diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js index d403b12fb1..dd1f72bc04 100644 --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -11,7 +11,7 @@ function create_fragment($$, ctx) { text1 = createText("\n\n"); p = createElement("p"); text2 = createText("x: "); - text3 = createText(ctx.x); + text3 = createText(x); dispose = addListener(button, "click", ctx.click_handler); }, @@ -25,7 +25,7 @@ function create_fragment($$, ctx) { p(changed, ctx) { if (changed.x) { - setData(text3, ctx.x); + setData(text3, x); } }, @@ -44,14 +44,15 @@ function create_fragment($$, ctx) { }; } +let x = 0; + function instance($$self, $$props, $$invalidate) { - let x = 0; function click_handler() { if (true) { x += 1; $$invalidate('x', x); } } - return { x, click_handler }; + return { click_handler }; } class SvelteComponent extends SvelteComponent_1 { diff --git a/test/js/samples/non-mutable-reference/expected.js b/test/js/samples/non-mutable-reference/expected.js index 7e83850226..b7f6dc60a9 100644 --- a/test/js/samples/non-mutable-reference/expected.js +++ b/test/js/samples/non-mutable-reference/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { var h1, text0, text1, text2; @@ -8,7 +8,7 @@ function create_fragment($$, ctx) { c() { h1 = createElement("h1"); text0 = createText("Hello "); - text1 = createText(ctx.name); + text1 = createText(name); text2 = createText("!"); }, @@ -31,16 +31,12 @@ function create_fragment($$, ctx) { }; } -function instance($$self) { - let name = 'world'; - - return { name }; -} +let name = 'world'; class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, instance, create_fragment, safe_not_equal); + init(this, options, identity, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index e42ab8a35b..eda6f1f721 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -238,7 +238,7 @@ function create_fragment($$, ctx) { } if (if_block4) if_block4.d(detach); - + if (detach) { detachNode(if_block4_anchor); } From ed9df1fff360b496dff0c8f89003f7c36a17ec95 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 19 Jan 2019 09:19:07 -0500 Subject: [PATCH 045/125] dont use identity function to reflect props --- src/compile/render-dom/index.ts | 2 +- src/internal/Component.js | 26 +++++++++------- test/js/samples/action/expected.js | 4 +-- test/js/samples/css-media-query/expected.js | 4 +-- .../css-shadow-dom-keyframes/expected.js | 4 +-- test/js/samples/dynamic-import/expected.js | 4 +-- .../event-handler-no-passive/expected.js | 4 +-- test/js/samples/event-modifiers/expected.js | 4 +-- .../js/samples/head-no-whitespace/expected.js | 4 +-- test/js/samples/hoisted-const/expected.js | 4 +-- test/js/samples/hoisted-let/expected.js | 4 +-- test/js/samples/legacy-input-type/expected.js | 4 +-- .../non-imported-component/expected.js | 4 +-- .../samples/non-mutable-reference/expected.js | 4 +-- test/js/samples/setup-method/expected.js | 4 +-- test/js/samples/svg-title/expected.js | 4 +-- .../Bar.html | 5 +++ .../Foo.html | 5 +++ .../_config.js | 31 +++++++++++++++++++ .../main.html | 15 +++++++++ .../Bar.html | 5 +++ .../Foo.html | 5 +++ .../_config.js | 31 +++++++++++++++++++ .../main.html | 11 +++++++ 24 files changed, 151 insertions(+), 41 deletions(-) create mode 100644 test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.html create mode 100644 test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.html create mode 100644 test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js create mode 100644 test/runtime/samples/component-binding-parent-supercedes-child-b/main.html create mode 100644 test/runtime/samples/component-binding-parent-supercedes-child-c/Bar.html create mode 100644 test/runtime/samples/component-binding-parent-supercedes-child-c/Foo.html create mode 100644 test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js create mode 100644 test/runtime/samples/component-binding-parent-supercedes-child-c/main.html diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts index b48df5396a..fc35e4f317 100644 --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -275,7 +275,7 @@ export default function dom( const definition = has_definition ? component.alias('instance') - : '@identity'; + : 'null'; const all_reactive_dependencies = new Set(); component.reactive_declarations.forEach(d => { diff --git a/src/internal/Component.js b/src/internal/Component.js index 4eac8d57af..894f80461b 100644 --- a/src/internal/Component.js +++ b/src/internal/Component.js @@ -59,7 +59,7 @@ export function init(component, options, instance, create_fragment, not_equal) { const $$ = component.$$ = { fragment: null, - ctx: null, + ctx: options.props || {}, // state set: noop, @@ -82,19 +82,21 @@ export function init(component, options, instance, create_fragment, not_equal) { let ready = false; - $$.ctx = instance(component, options.props || {}, (key, value) => { - if ($$.bound[key]) $$.bound[key](value); + if (instance) { + $$.ctx = instance(component, $$.ctx, (key, value) => { + if ($$.bound[key]) $$.bound[key](value); - if ($$.ctx) { - const changed = not_equal(value, $$.ctx[key]); - if (ready && changed) { - make_dirty(component, key); - } + if ($$.ctx) { + const changed = not_equal(value, $$.ctx[key]); + if (ready && changed) { + make_dirty(component, key); + } - $$.ctx[key] = value; - return changed; - } - }); + $$.ctx[key] = value; + return changed; + } + }); + } $$.update(); ready = true; diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index a8fbf62344..23f4bbe90d 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { var a, link_action; @@ -48,7 +48,7 @@ function link(node) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index b771f17a75..72944cdaa6 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; function add_css() { var style = createElement("style"); @@ -37,7 +37,7 @@ class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); if (!document.getElementById("svelte-1slhpfn-style")) add_css(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index d55e3928ca..9582707de3 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteElement, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; +import { SvelteElement, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { var div; @@ -33,7 +33,7 @@ class SvelteComponent extends SvelteElement { this.shadowRoot.innerHTML = ``; - init(this, { target: this.shadowRoot }, identity, create_fragment, safe_not_equal); + init(this, { target: this.shadowRoot }, null, create_fragment, safe_not_equal); if (options) { if (options.target) { diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index 1c6e0b873d..7b4a2fc004 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, identity, init, mount_component, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; import LazyLoad from "./LazyLoad.html"; function create_fragment($$, ctx) { @@ -43,7 +43,7 @@ function func() { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/event-handler-no-passive/expected.js b/test/js/samples/event-handler-no-passive/expected.js index 6a1277988f..83b981cc40 100644 --- a/test/js/samples/event-handler-no-passive/expected.js +++ b/test/js/samples/event-handler-no-passive/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { var a, dispose; @@ -37,7 +37,7 @@ function touchstart_handler(e) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js index ac0f1b3d79..4af2123bf8 100644 --- a/test/js/samples/event-modifiers/expected.js +++ b/test/js/samples/event-modifiers/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, identity, init, insert, noop, preventDefault, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, preventDefault, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; function create_fragment($$, ctx) { var div, button0, text1, button1, text3, button2, dispose; @@ -57,7 +57,7 @@ function handleClick() { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index f074e69745..2a356d5939 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { var meta0, meta1; @@ -33,7 +33,7 @@ function create_fragment($$, ctx) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/hoisted-const/expected.js b/test/js/samples/hoisted-const/expected.js index cdca1aaeba..1720d67cd9 100644 --- a/test/js/samples/hoisted-const/expected.js +++ b/test/js/samples/hoisted-const/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { var b, text_value = get_answer(), text; @@ -34,7 +34,7 @@ function get_answer() { return ANSWER; } class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/hoisted-let/expected.js b/test/js/samples/hoisted-let/expected.js index 86eb41f5d5..f206ffb3ba 100644 --- a/test/js/samples/hoisted-let/expected.js +++ b/test/js/samples/hoisted-let/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { var b, text_value = get_answer(), text; @@ -34,7 +34,7 @@ function get_answer() { return ANSWER; } class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/legacy-input-type/expected.js b/test/js/samples/legacy-input-type/expected.js index 49d3d24f2a..3eefd6cedb 100644 --- a/test/js/samples/legacy-input-type/expected.js +++ b/test/js/samples/legacy-input-type/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, safe_not_equal, setInputType } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, safe_not_equal, setInputType } from "svelte/internal"; function create_fragment($$, ctx) { var input; @@ -29,7 +29,7 @@ function create_fragment($$, ctx) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index e80b8d0ab1..0b91f40560 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createText, detachNode, identity, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createText, detachNode, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; import Imported from "Imported.html"; function create_fragment($$, ctx) { @@ -54,7 +54,7 @@ function create_fragment($$, ctx) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/non-mutable-reference/expected.js b/test/js/samples/non-mutable-reference/expected.js index b7f6dc60a9..747f0e1641 100644 --- a/test/js/samples/non-mutable-reference/expected.js +++ b/test/js/samples/non-mutable-reference/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { var h1, text0, text1, text2; @@ -36,7 +36,7 @@ let name = 'world'; class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/setup-method/expected.js b/test/js/samples/setup-method/expected.js index 124e632ddc..07a2dc46db 100644 --- a/test/js/samples/setup-method/expected.js +++ b/test/js/samples/setup-method/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, identity, init, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, init, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { return { @@ -21,7 +21,7 @@ function foo(bar) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } get foo() { diff --git a/test/js/samples/svg-title/expected.js b/test/js/samples/svg-title/expected.js index 3ce818c950..1db3124e9c 100644 --- a/test/js/samples/svg-title/expected.js +++ b/test/js/samples/svg-title/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { var svg, title, text; @@ -32,7 +32,7 @@ function create_fragment($$, ctx) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.html b/test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.html new file mode 100644 index 0000000000..d5ce18c8c8 --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.html @@ -0,0 +1,5 @@ + + +

    Bar: {x}

    \ No newline at end of file diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.html b/test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.html new file mode 100644 index 0000000000..9c7ae240b7 --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.html @@ -0,0 +1,5 @@ + + +

    Foo: {x}

    \ No newline at end of file diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js b/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js new file mode 100644 index 0000000000..bf6312f5ad --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js @@ -0,0 +1,31 @@ +export default { + html: ` +

    Foo: yes

    +

    x in parent: yes

    + `, + + async test({ assert, component, target, window }) { + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

    Bar: yes

    +

    x in parent: yes

    + `); + + component.a = true; + assert.equal(component.x, 'yes'); + component.x = undefined; + + assert.htmlEqual(target.innerHTML, ` +

    Foo: undefined

    +

    x in parent: undefined

    + `); + + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

    Bar: no

    +

    x in parent: no

    + `); + } +}; diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/main.html b/test/runtime/samples/component-binding-parent-supercedes-child-b/main.html new file mode 100644 index 0000000000..aaad9eb2fe --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/main.html @@ -0,0 +1,15 @@ + + +{#if a} + +{:else} + +{/if} + +

    x in parent: {x}

    \ No newline at end of file diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-c/Bar.html b/test/runtime/samples/component-binding-parent-supercedes-child-c/Bar.html new file mode 100644 index 0000000000..d5ce18c8c8 --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-c/Bar.html @@ -0,0 +1,5 @@ + + +

    Bar: {x}

    \ No newline at end of file diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-c/Foo.html b/test/runtime/samples/component-binding-parent-supercedes-child-c/Foo.html new file mode 100644 index 0000000000..9c7ae240b7 --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-c/Foo.html @@ -0,0 +1,5 @@ + + +

    Foo: {x}

    \ No newline at end of file diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js b/test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js new file mode 100644 index 0000000000..bf6312f5ad --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js @@ -0,0 +1,31 @@ +export default { + html: ` +

    Foo: yes

    +

    x in parent: yes

    + `, + + async test({ assert, component, target, window }) { + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

    Bar: yes

    +

    x in parent: yes

    + `); + + component.a = true; + assert.equal(component.x, 'yes'); + component.x = undefined; + + assert.htmlEqual(target.innerHTML, ` +

    Foo: undefined

    +

    x in parent: undefined

    + `); + + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

    Bar: no

    +

    x in parent: no

    + `); + } +}; diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-c/main.html b/test/runtime/samples/component-binding-parent-supercedes-child-c/main.html new file mode 100644 index 0000000000..ffc5bd188d --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-c/main.html @@ -0,0 +1,11 @@ + + + + +

    x in parent: {x}

    \ No newline at end of file From 3c4d8b5c2cf55315fd04f7c30667f1ff4aed9a86 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 19 Jan 2019 09:25:53 -0500 Subject: [PATCH 046/125] test that private state doesnt leak into parent --- .../component-binding-private-state/Bar.html | 5 +++ .../component-binding-private-state/Foo.html | 5 +++ .../_config.js | 31 +++++++++++++++++++ .../component-binding-private-state/main.html | 11 +++++++ 4 files changed, 52 insertions(+) create mode 100644 test/runtime/samples/component-binding-private-state/Bar.html create mode 100644 test/runtime/samples/component-binding-private-state/Foo.html create mode 100644 test/runtime/samples/component-binding-private-state/_config.js create mode 100644 test/runtime/samples/component-binding-private-state/main.html diff --git a/test/runtime/samples/component-binding-private-state/Bar.html b/test/runtime/samples/component-binding-private-state/Bar.html new file mode 100644 index 0000000000..3b5619a62d --- /dev/null +++ b/test/runtime/samples/component-binding-private-state/Bar.html @@ -0,0 +1,5 @@ + + +

    Bar: {x}

    \ No newline at end of file diff --git a/test/runtime/samples/component-binding-private-state/Foo.html b/test/runtime/samples/component-binding-private-state/Foo.html new file mode 100644 index 0000000000..1d899739d5 --- /dev/null +++ b/test/runtime/samples/component-binding-private-state/Foo.html @@ -0,0 +1,5 @@ + + +

    Foo: {x}

    \ No newline at end of file diff --git a/test/runtime/samples/component-binding-private-state/_config.js b/test/runtime/samples/component-binding-private-state/_config.js new file mode 100644 index 0000000000..bd8a25d490 --- /dev/null +++ b/test/runtime/samples/component-binding-private-state/_config.js @@ -0,0 +1,31 @@ +export default { + html: ` +

    Foo: yes

    +

    x in parent: undefined

    + `, + + async test({ assert, component, target, window }) { + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

    Bar: no

    +

    x in parent: undefined

    + `); + + component.a = true; + assert.equal(component.x, undefined); + component.x = 'maybe'; + + assert.htmlEqual(target.innerHTML, ` +

    Foo: yes

    +

    x in parent: maybe

    + `); + + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

    Bar: no

    +

    x in parent: maybe

    + `); + } +}; diff --git a/test/runtime/samples/component-binding-private-state/main.html b/test/runtime/samples/component-binding-private-state/main.html new file mode 100644 index 0000000000..ffc5bd188d --- /dev/null +++ b/test/runtime/samples/component-binding-private-state/main.html @@ -0,0 +1,11 @@ + + + + +

    x in parent: {x}

    \ No newline at end of file From b8e0cccea881583dfe282a5b765ae987ab50f35b Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 19 Jan 2019 10:16:59 -0500 Subject: [PATCH 047/125] prevent writing to reactive values - fixes #1920 --- src/compile/Component.ts | 5 ----- .../expected.js | 4 ++-- .../reactive-values-readonly/_config.js | 21 +++++++++++++++++++ .../reactive-values-readonly/main.html | 8 +++++++ 4 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 test/runtime/samples/reactive-values-readonly/_config.js create mode 100644 test/runtime/samples/reactive-values-readonly/main.html diff --git a/src/compile/Component.ts b/src/compile/Component.ts index b07af70a64..a916078898 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -881,15 +881,10 @@ export default class Component { scope = map.get(node); } - if (parent && parent.type === 'AssignmentExpression' && node === parent.left) { - return this.skip(); - } - if (node.type === 'AssignmentExpression') { assignees.add(getObject(node.left).name); } else if (node.type === 'UpdateExpression') { assignees.add(getObject(node.argument).name); - this.skip(); } else if (isReference(node, parent)) { const object = getObject(node); const { name } = object; 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 3b4c623407..4f64e95350 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -56,8 +56,8 @@ function instance($$self, $$props, $$invalidate) { if ('foo' in $$props) $$invalidate('foo', foo = $$props.foo); }; - $$self.$$.update = ($$dirty = { foo: 1 }) => { - if ($$dirty.foo) { + $$self.$$.update = ($$dirty = { bar: 1, foo: 1 }) => { + if ($$dirty.bar || $$dirty.foo) { bar = foo * 2; $$invalidate('bar', bar); } }; diff --git a/test/runtime/samples/reactive-values-readonly/_config.js b/test/runtime/samples/reactive-values-readonly/_config.js new file mode 100644 index 0000000000..bf5c9dbb67 --- /dev/null +++ b/test/runtime/samples/reactive-values-readonly/_config.js @@ -0,0 +1,21 @@ +export default { + html: ` +

    doubled: 2

    + `, + + test({ assert, component, target }) { + component.a = 2; + + assert.equal(component.doubled, 4); + assert.htmlEqual(target.innerHTML, ` +

    doubled: 4

    + `); + + component.doubled = 6; + + assert.equal(component.doubled, 4); + assert.htmlEqual(target.innerHTML, ` +

    doubled: 4

    + `); + } +}; diff --git a/test/runtime/samples/reactive-values-readonly/main.html b/test/runtime/samples/reactive-values-readonly/main.html new file mode 100644 index 0000000000..bb49c3ad94 --- /dev/null +++ b/test/runtime/samples/reactive-values-readonly/main.html @@ -0,0 +1,8 @@ + + +

    doubled: {doubled}

    \ No newline at end of file From 01ff158e52daeab388ea0bed830aa5674e8cdfbb Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 19 Jan 2019 10:50:22 -0500 Subject: [PATCH 048/125] repl: implement version=local --- site/src/routes/repl/embed.html | 12 +++++++----- site/src/routes/repl/index.html | 12 +++++++----- site/src/routes/repl/local.js | 16 ++++++++++++++++ site/static/workers/bundler.js | 10 ++++++---- site/static/workers/compiler.js | 6 +++++- 5 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 site/src/routes/repl/local.js diff --git a/site/src/routes/repl/embed.html b/site/src/routes/repl/embed.html index 94f3c766c9..a2e96a8ae3 100644 --- a/site/src/routes/repl/embed.html +++ b/site/src/routes/repl/embed.html @@ -14,11 +14,13 @@ let name = 'loading...'; onMount(() => { - fetch(`https://unpkg.com/svelte@${version}/package.json`) - .then(r => r.json()) - .then(pkg => { - version = pkg.version; - }); + if (version !== 'local') { + fetch(`https://unpkg.com/svelte@${version}/package.json`) + .then(r => r.json()) + .then(pkg => { + version = pkg.version; + }); + } if (query.gist) { fetch(`gist/${query.gist}`).then(r => r.json()).then(data => { diff --git a/site/src/routes/repl/index.html b/site/src/routes/repl/index.html index 79ba1e4277..e43eb93750 100644 --- a/site/src/routes/repl/index.html +++ b/site/src/routes/repl/index.html @@ -45,11 +45,13 @@ }); onMount(() => { - fetch(`https://unpkg.com/svelte@${version || 'alpha'}/package.json`) - .then(r => r.json()) - .then(pkg => { - version = pkg.version; - }); + if (version !== 'local') { + fetch(`https://unpkg.com/svelte@${version || 'alpha'}/package.json`) + .then(r => r.json()) + .then(pkg => { + version = pkg.version; + }); + } if (gist_id) { fetch(`gist/${gist_id}`).then(r => r.json()).then(data => { diff --git a/site/src/routes/repl/local.js b/site/src/routes/repl/local.js new file mode 100644 index 0000000000..d240136c8a --- /dev/null +++ b/site/src/routes/repl/local.js @@ -0,0 +1,16 @@ +import { createReadStream } from 'fs'; + +export function get(req, res) { + if (process.env.NODE_ENV !== 'development' || !/^[a-z.]+$/.test(req.query.file)) { + res.writeHead(403); + res.end(); + return; + } + createReadStream('../' + req.query.file) + .on('error', () => { + res.writeHead(403); + res.end(); + }) + .pipe(res); + res.writeHead(200, { 'Content-Type': 'text/javascript' }); +} diff --git a/site/static/workers/bundler.js b/site/static/workers/bundler.js index 904155131b..8d05f59d23 100644 --- a/site/static/workers/bundler.js +++ b/site/static/workers/bundler.js @@ -11,7 +11,9 @@ self.addEventListener('message', async event => { version = event.data.version; importScripts( - `https://unpkg.com/svelte@${version}/compiler.js`, + version === 'local' ? + '/repl/local?file=compiler.js' : + `https://unpkg.com/svelte@${version}/compiler.js`, `https://unpkg.com/rollup@0.68/dist/rollup.browser.js` ); fulfil(); @@ -47,7 +49,7 @@ const is_svelte_module = id => id === 'svelte' || id.startsWith('svelte/'); const cache = new Map(); function fetch_if_uncached(url) { if (!cache.has(url)) { - cache.set(url, fetch(url) + cache.set(url, fetch(url.startsWith('https://unpkg.com/svelte@local/') ? '/repl/local?file=' + url.slice(31) : url) .then(r => r.text()) .catch(err => { console.error(err); @@ -78,7 +80,7 @@ async function getBundle(mode, cache, lookup) { resolveId(importee, importer) { // v3 hack if (importee === `svelte`) return `https://unpkg.com/svelte@${version}/index.mjs`; - if (importee.startsWith(`svelte`)) return `https://unpkg.com/svelte@${version}/${importee.slice(7)}.mjs`; + if (importee.startsWith(`svelte/`)) return `https://unpkg.com/svelte@${version}/${importee.slice(7)}.mjs`; if (importer && importer.startsWith(`https://`)) { return new URL(`${importee}.mjs`, importer).href; @@ -214,4 +216,4 @@ async function bundle(components) { }) }; } -} \ No newline at end of file +} diff --git a/site/static/workers/compiler.js b/site/static/workers/compiler.js index f4dbe78b81..ffa104bb04 100644 --- a/site/static/workers/compiler.js +++ b/site/static/workers/compiler.js @@ -8,7 +8,11 @@ const ready = new Promise(f => { self.addEventListener('message', async event => { switch (event.data.type) { case 'init': - importScripts(`https://unpkg.com/svelte@${event.data.version}/compiler.js`); + importScripts( + event.data.version === 'local' ? + '/repl/local?file=compiler.js' : + `https://unpkg.com/svelte@${event.data.version}/compiler.js` + ); fulfil_ready(); break; From ca6ab95ea48b54ec0fe4f9f41f7b6ecce00381fe Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 19 Jan 2019 16:28:52 -0500 Subject: [PATCH 049/125] site: update readme with simplified version=local instructions --- site/README.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/site/README.md b/site/README.md index 591e3f0cfb..e7ecdeb2e3 100644 --- a/site/README.md +++ b/site/README.md @@ -13,17 +13,7 @@ Start the server with `npm run dev`, and navigate to [localhost:3000](http://loc ## Using a local copy of Svelte -By default, the REPL will fetch the most recent version of Svelte from https://unpkg.com/svelte. If you need to test a local version of Svelte, you can do so by linking it and navigating to [localhost:3000/repl?version=local](http://localhost:3000/repl?version=local): - -```bash -cd /path/to/svelte -npm link -npm run dev # rebuild Svelte on changes - -cd /path/to/svelte/site -npm link svelte -npm run dev -``` +By default, the REPL will fetch the most recent version of Svelte from https://unpkg.com/svelte. To use the local copy of the compiler and runtime from this repo, you can navigate to [localhost:3000/repl?version=local](http://localhost:3000/repl?version=local). ## REPL GitHub integration From 3ec5ff77eba5e5bf350a8c2f4c9cf563cfbc5b40 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 23 Jan 2019 10:31:57 -0500 Subject: [PATCH 050/125] update lockfiles --- package-lock.json | 477 ++++++++++++------------ site/package-lock.json | 806 +++++++++++++++++++++++++++++++---------- 2 files changed, 840 insertions(+), 443 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9d6d48ac1a..e6517b2fda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha16", + "version": "3.0.0-alpha18", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -205,9 +205,9 @@ "dev": true }, "@types/node": { - "version": "10.12.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.12.tgz", - "integrity": "sha512-Pr+6JRiKkfsFvmU/LK68oBRCQeEg36TyAbPhc2xpez24OOZZCuoIhWGTd39VZy6nGafSbxzGouFPTFD/rR1A0A==", + "version": "10.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", + "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", "dev": true }, "abab": { @@ -236,14 +236,6 @@ "requires": { "acorn": "^6.0.1", "acorn-walk": "^6.0.1" - }, - "dependencies": { - "acorn": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", - "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", - "dev": true - } } }, "acorn-jsx": { @@ -281,9 +273,9 @@ } }, "ajv": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", - "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz", + "integrity": "sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -294,7 +286,7 @@ }, "ansi-escapes": { "version": "3.1.0", - "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -361,7 +353,7 @@ }, "array-equal": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, @@ -604,19 +596,10 @@ } } }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "^0.2.0" - } - }, "callsites": { - "version": "0.2.0", - "resolved": "http://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", "dev": true }, "camelcase": { @@ -627,7 +610,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -642,9 +625,9 @@ "dev": true }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -786,13 +769,13 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, "compare-versions": { "version": "2.0.1", - "resolved": "http://registry.npmjs.org/compare-versions/-/compare-versions-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-2.0.1.tgz", "integrity": "sha1-Htwfk2h/2XoyXFn1XkWgfbEGrKY=", "dev": true }, @@ -822,7 +805,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -837,7 +820,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -953,9 +936,9 @@ } }, "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" @@ -1089,7 +1072,7 @@ "dependencies": { "domelementtype": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", "dev": true } @@ -1151,9 +1134,9 @@ }, "dependencies": { "@types/node": { - "version": "8.10.38", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.38.tgz", - "integrity": "sha512-EibsnbJerd0hBFaDjJStFrVbVBAtOy4dgL8zZFw0uOvPqzBAX59Ci8cgjg3+RgJIWhsB5A4c+pi+D4P9tQQh/A==", + "version": "8.10.39", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.39.tgz", + "integrity": "sha512-rE7fktr02J8ybFf6eysife+WF+L4sAHWzw09DgdCebEu+qDwMvv4zl6Bc+825ttGZP73kCKxa3dhJOoGJ8+5mA==", "dev": true } } @@ -1186,7 +1169,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -1195,6 +1178,15 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } } } }, @@ -1264,9 +1256,9 @@ } }, "eslint": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.10.0.tgz", - "integrity": "sha512-HpqzC+BHULKlnPwWae9MaVZ5AXJKpkxCVXQHrFaRw3hbDj26V/9ArYM4Rr/SQ8pi6qUPLXSSXC4RBJlyq2Z2OQ==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.12.1.tgz", + "integrity": "sha512-54NV+JkTpTu0d8+UYSA8mMKAG4XAsaOrozA9rCW7tgneg1mevcL7wIotPC+fZ0SkWwdhNqoXoxnQCTBp7UvTsg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1286,6 +1278,7 @@ "glob": "^7.1.2", "globals": "^11.7.0", "ignore": "^4.0.6", + "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "inquirer": "^6.1.0", "js-yaml": "^3.12.0", @@ -1300,7 +1293,6 @@ "pluralize": "^7.0.0", "progress": "^2.0.0", "regexpp": "^2.0.1", - "require-uncached": "^1.0.3", "semver": "^5.5.1", "strip-ansi": "^4.0.0", "strip-json-comments": "^2.0.1", @@ -1336,13 +1328,13 @@ } }, "eslint-module-utils": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", - "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.3.0.tgz", + "integrity": "sha512-lmDJgeOOjk8hObTysjqH7wyMi+nsHwwvfBykwfhjR1LNdd7C2uFJBvx4OpWYpXOw4df1yE1cDEVd1yLHitk34w==", "dev": true, "requires": { "debug": "^2.6.8", - "pkg-dir": "^1.0.0" + "pkg-dir": "^2.0.0" }, "dependencies": { "debug": { @@ -1372,21 +1364,21 @@ } }, "eslint-plugin-import": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", - "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.15.0.tgz", + "integrity": "sha512-LEHqgR+RcnpGqYW7h9WMkPb/tP+ekKxWdQDztfTtZeV43IHF+X8lXU+1HOCcR4oXD24qRgEwNSxIweD5uNKGVg==", "dev": true, "requires": { "contains-path": "^0.1.0", - "debug": "^2.6.8", + "debug": "^2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.1", - "eslint-module-utils": "^2.2.0", - "has": "^1.0.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.3", + "eslint-import-resolver-node": "^0.3.2", + "eslint-module-utils": "^2.3.0", + "has": "^1.0.3", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", "read-pkg-up": "^2.0.0", - "resolve": "^1.6.0" + "resolve": "^1.9.0" }, "dependencies": { "debug": { @@ -1400,7 +1392,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -1447,14 +1439,6 @@ "acorn": "^6.0.2", "acorn-jsx": "^5.0.0", "eslint-visitor-keys": "^1.0.0" - }, - "dependencies": { - "acorn": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", - "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", - "dev": true - } } }, "esprima": { @@ -1510,7 +1494,7 @@ }, "expand-range": { "version": "1.8.2", - "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { @@ -1665,13 +1649,12 @@ } }, "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -1729,7 +1712,7 @@ }, "fs-extra": { "version": "0.30.0", - "resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", "dev": true, "requires": { @@ -1747,9 +1730,9 @@ "dev": true }, "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", "dev": true, "optional": true, "requires": { @@ -1775,7 +1758,7 @@ "optional": true }, "are-we-there-yet": { - "version": "1.1.4", + "version": "1.1.5", "bundled": true, "dev": true, "optional": true, @@ -1799,7 +1782,7 @@ } }, "chownr": { - "version": "1.0.1", + "version": "1.1.1", "bundled": true, "dev": true, "optional": true @@ -1835,7 +1818,7 @@ } }, "deep-extend": { - "version": "0.5.1", + "version": "0.6.0", "bundled": true, "dev": true, "optional": true @@ -1884,7 +1867,7 @@ } }, "glob": { - "version": "7.1.2", + "version": "7.1.3", "bundled": true, "dev": true, "optional": true, @@ -1904,12 +1887,12 @@ "optional": true }, "iconv-lite": { - "version": "0.4.21", + "version": "0.4.24", "bundled": true, "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { @@ -1970,16 +1953,16 @@ "dev": true }, "minipass": { - "version": "2.2.4", + "version": "2.3.5", "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { - "version": "1.1.0", + "version": "1.2.1", "bundled": true, "dev": true, "optional": true, @@ -2002,7 +1985,7 @@ "optional": true }, "needle": { - "version": "2.2.0", + "version": "2.2.4", "bundled": true, "dev": true, "optional": true, @@ -2013,18 +1996,18 @@ } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.10.3", "bundled": true, "dev": true, "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", - "needle": "^2.2.0", + "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", - "rc": "^1.1.7", + "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" @@ -2041,13 +2024,13 @@ } }, "npm-bundled": { - "version": "1.0.3", + "version": "1.0.5", "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.2.0", "bundled": true, "dev": true, "optional": true, @@ -2122,12 +2105,12 @@ "optional": true }, "rc": { - "version": "1.2.7", + "version": "1.2.8", "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", + "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" @@ -2157,16 +2140,16 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.6.3", "bundled": true, "dev": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { - "version": "5.1.1", + "version": "5.1.2", "bundled": true, "dev": true }, @@ -2183,7 +2166,7 @@ "optional": true }, "semver": { - "version": "5.5.0", + "version": "5.6.0", "bundled": true, "dev": true, "optional": true @@ -2234,17 +2217,17 @@ "optional": true }, "tar": { - "version": "4.4.1", + "version": "4.4.8", "bundled": true, "dev": true, "optional": true, "requires": { - "chownr": "^1.0.1", + "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.2" } }, @@ -2255,12 +2238,12 @@ "optional": true }, "wide-align": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "dev": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -2269,7 +2252,7 @@ "dev": true }, "yallist": { - "version": "3.0.2", + "version": "3.0.3", "bundled": true, "dev": true } @@ -2348,9 +2331,9 @@ } }, "globals": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", - "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.10.0.tgz", + "integrity": "sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==", "dev": true }, "globalyzer": { @@ -2360,9 +2343,9 @@ "dev": true }, "globrex": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.1.tgz", - "integrity": "sha512-bqKcPhb+ZtrISivpu6oLmwIyINlPlzueO/BDCdfnzUeu7SYxnHTXmWP7uQI5PnQXc5yGXOscGBEGagloA2hcSw==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", "dev": true }, "graceful-fs": { @@ -2544,6 +2527,16 @@ "minimatch": "^3.0.4" } }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2620,9 +2613,9 @@ } }, "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, "invariant": { @@ -2666,7 +2659,7 @@ }, "is-builtin-module": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { @@ -2884,9 +2877,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", + "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -2943,7 +2936,7 @@ }, "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, @@ -2973,7 +2966,7 @@ }, "jsonfile": { "version": "2.4.0", - "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "dev": true, "requires": { @@ -3040,7 +3033,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -3064,14 +3057,6 @@ "requires": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } } }, "lodash": { @@ -3142,9 +3127,9 @@ } }, "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, "mdn-data": { @@ -3155,7 +3140,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -3171,9 +3156,19 @@ "trim-newlines": "^1.0.0" }, "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -3186,10 +3181,19 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -3286,7 +3290,7 @@ }, "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, @@ -3301,7 +3305,7 @@ "dependencies": { "commander": { "version": "1.0.4", - "resolved": "http://registry.npmjs.org/commander/-/commander-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-1.0.4.tgz", "integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=", "dev": true, "requires": { @@ -3333,7 +3337,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -3400,9 +3404,9 @@ } }, "mri": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.1.tgz", - "integrity": "sha1-haom09ru7t+A3FmEr5XMXKXK2fE=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", + "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==", "dev": true }, "ms": { @@ -3413,7 +3417,7 @@ }, "multiline": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz", "integrity": "sha1-abHyX/B00oKJBPJE3dBrfZbvbJM=", "dev": true, "requires": { @@ -3427,9 +3431,9 @@ "dev": true }, "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", "dev": true, "optional": true }, @@ -3597,7 +3601,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -5792,7 +5796,7 @@ }, "os-tmpdir": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, @@ -5820,13 +5824,13 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, - "pad-right": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/pad-right/-/pad-right-0.2.2.tgz", - "integrity": "sha1-b7ySQEXSRPKiokRQMGDTv8YAl3Q=", + "parent-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", + "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", "dev": true, "requires": { - "repeat-string": "^1.5.2" + "callsites": "^3.0.0" } }, "parse-glob": { @@ -5863,17 +5867,14 @@ "dev": true }, "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5918,7 +5919,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -5938,12 +5939,12 @@ } }, "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "^1.0.0" + "find-up": "^2.1.0" } }, "pluralize": { @@ -5977,14 +5978,14 @@ "dev": true }, "prettier": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.15.3.tgz", - "integrity": "sha512-gAU9AGAPMaKb3NNSUUuhhFAS7SCO4ALTN4nRIn6PJ075Qd28Yn2Ig2ahEJWdJwJmlEBTUfC7mMUSFy8MwsOCfg==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.1.tgz", + "integrity": "sha512-XXUITwIkGb3CPJ2hforHah/zTINRyie5006Jd2HKy2qz7snEJXl0KLfsJZW/wst9g6R2rFvqba3VpNYdu1hDcA==", "dev": true }, "pretty-bytes": { "version": "1.0.4", - "resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", "dev": true, "requires": { @@ -6015,9 +6016,9 @@ } }, "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", "dev": true }, "punycode": { @@ -6071,7 +6072,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -6096,23 +6097,12 @@ "requires": { "find-up": "^2.0.0", "read-pkg": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - } } }, "readable-stream": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.0.6.tgz", - "integrity": "sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", + "integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -6422,7 +6412,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -6437,7 +6427,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -6571,29 +6561,19 @@ "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", "dev": true }, - "require-uncached": { - "version": "1.0.3", - "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - } - }, "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "^1.0.6" } }, "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "resolve-url": { @@ -6619,12 +6599,12 @@ "dev": true }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "rollup": { @@ -6698,7 +6678,7 @@ }, "rollup-plugin-typescript": { "version": "0.8.1", - "resolved": "http://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-0.8.1.tgz", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-0.8.1.tgz", "integrity": "sha1-L/fuzCHPa7K0P8J+W2iJUs5xkko=", "dev": true, "requires": { @@ -6711,13 +6691,13 @@ "dependencies": { "estree-walker": { "version": "0.2.1", - "resolved": "http://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz", "integrity": "sha1-va/oCVOD2EFNXcLs9MkXO225QS4=", "dev": true }, "rollup-pluginutils": { "version": "1.5.2", - "resolved": "http://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz", "integrity": "sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg=", "dev": true, "requires": { @@ -6727,7 +6707,7 @@ }, "typescript": { "version": "1.8.10", - "resolved": "http://registry.npmjs.org/typescript/-/typescript-1.8.10.tgz", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-1.8.10.tgz", "integrity": "sha1-tHXW4N/wv1DyluXKbvn7tccyDx4=", "dev": true } @@ -6787,13 +6767,12 @@ } }, "sade": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sade/-/sade-1.4.1.tgz", - "integrity": "sha512-r2S6GwNeYFYx02w2SYUfhYI9PzxdfNWxsX1QpI3Z4rK9bu9K3FtNVg2awp54Y9iivcYqR2iWqI3nT5jEihNyBg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.4.2.tgz", + "integrity": "sha512-MTrQm+Nhl4m1mbssYDgAculC/HbShjj08QtHnA2GTpzivfU5aUp8EoHlECmrIHEaa8hZRZSp2Gygv8VMlpXEBw==", "dev": true, "requires": { - "mri": "^1.1.0", - "pad-right": "^0.2.2" + "mri": "^1.1.0" } }, "safe-buffer": { @@ -6804,7 +6783,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -6932,7 +6911,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7107,9 +7086,9 @@ } }, "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", + "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -7155,9 +7134,9 @@ } }, "spdx-license-ids": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", - "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", "dev": true }, "speedometer": { @@ -7186,7 +7165,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -7201,7 +7180,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -7233,9 +7212,9 @@ "dev": true }, "sshpk": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", - "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.0.tgz", + "integrity": "sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -7368,9 +7347,9 @@ "dev": true }, "table": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/table/-/table-5.1.1.tgz", - "integrity": "sha512-NUjapYb/qd4PeFW03HnAuOJ7OMcBkJlqeClWxeNlQ0lXGSb52oZXGzkO0/I0ARegQ2eUT1g2VDJH0eUxDRcHmw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/table/-/table-5.2.1.tgz", + "integrity": "sha512-qmhNs2GEHNqY5fd2Mo+8N1r2sw/rvTAAvBZTaTx+Y7PHLypqyrxr1MdIu0pLw6Xvl/Gi4ONu/sdceP8vvUjkyA==", "dev": true, "requires": { "ajv": "^6.6.1", @@ -7393,13 +7372,13 @@ }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { "version": "0.2.3", - "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", "dev": true, "requires": { @@ -7415,7 +7394,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -7427,7 +7406,7 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true } @@ -7563,7 +7542,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -7606,9 +7585,9 @@ "dev": true }, "typescript": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz", - "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz", + "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", "dev": true }, "union-value": { diff --git a/site/package-lock.json b/site/package-lock.json index da38790d5a..523cfeb0d8 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1,6 +1,6 @@ { - "name": "TODO", - "version": "0.0.1", + "name": "svelte.technology", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -36,9 +36,9 @@ }, "dependencies": { "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" @@ -53,12 +53,12 @@ } }, "@babel/generator": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.2.2.tgz", - "integrity": "sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.0.tgz", + "integrity": "sha512-dZTwMvTgWfhmibq4V9X+LMf6Bgl7zAodRn9PvcPdhlzFMbvUutx74dbEv7Atz3ToeEpevYEJtAwfxq/bDCzHWg==", "dev": true, "requires": { - "@babel/types": "^7.2.2", + "@babel/types": "^7.3.0", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", @@ -215,14 +215,14 @@ } }, "@babel/helper-replace-supers": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz", - "integrity": "sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz", + "integrity": "sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.1.0", + "@babel/traverse": "^7.2.3", "@babel/types": "^7.0.0" } }, @@ -258,14 +258,14 @@ } }, "@babel/helpers": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.2.0.tgz", - "integrity": "sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.3.1.tgz", + "integrity": "sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA==", "dev": true, "requires": { "@babel/template": "^7.1.2", "@babel/traverse": "^7.1.5", - "@babel/types": "^7.2.0" + "@babel/types": "^7.3.0" } }, "@babel/highlight": { @@ -280,9 +280,9 @@ } }, "@babel/parser": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.2.tgz", - "integrity": "sha512-UNTmQ5cSLDeBGBl+s7JeowkqIHgmFAGBnLDdIzFmUNSuS5JF0XBcN59jsh/vJO/YjfsBqMxhMjoFGmNExmf0FA==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.1.tgz", + "integrity": "sha512-ATz6yX/L8LEnC3dtLQnIx4ydcPxhLcoy9Vl6re00zb2w5lG6itY6Vhnr1KFRPq/FHNsgl/gh2mjNN20f9iJTTA==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -307,9 +307,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz", - "integrity": "sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.1.tgz", + "integrity": "sha512-Nmmv1+3LqxJu/V5jU9vJmxR/KIRWFk2qLHmbB56yRRRFhlaSuOVXscX3gUmhaKgUhzA3otOHVubbIEVYsZ0eZg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -554,6 +554,15 @@ "@babel/helper-plugin-utils": "^7.0.0" } }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.3.0.tgz", + "integrity": "sha512-NxIoNVhk9ZxS+9lSoAQ/LM0V2UEvARLttEHUrRDGKFaAxOYQcrkN/nLRE+BbbicCAvZPl7wMP0X60HsHE5DtQw==", + "dev": true, + "requires": { + "regexp-tree": "^0.1.0" + } + }, "@babel/plugin-transform-new-target": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz", @@ -664,19 +673,20 @@ } }, "@babel/preset-env": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.2.0.tgz", - "integrity": "sha512-haGR38j5vOGVeBatrQPr3l0xHbs14505DcM57cbJy48kgMFvvHHoYEhHuRV+7vi559yyAUAVbTWzbK/B/pzJng==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.1.tgz", + "integrity": "sha512-FHKrD6Dxf30e8xgHQO0zJZpUPfVZg+Xwgz5/RdSWCbza9QLNk4Qbp40ctRoqDxml3O8RMzB1DU55SXeDG6PqHQ==", "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.2.0", + "@babel/plugin-proposal-object-rest-spread": "^7.3.1", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", "@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", @@ -696,6 +706,7 @@ "@babel/plugin-transform-modules-commonjs": "^7.2.0", "@babel/plugin-transform-modules-systemjs": "^7.2.0", "@babel/plugin-transform-modules-umd": "^7.2.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0", "@babel/plugin-transform-new-target": "^7.0.0", "@babel/plugin-transform-object-super": "^7.2.0", "@babel/plugin-transform-parameters": "^7.2.0", @@ -713,9 +724,9 @@ } }, "@babel/runtime": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.2.0.tgz", - "integrity": "sha512-oouEibCbHMVdZSDlJBO6bZmID/zA/G/Qx3H1d3rSNPTD+L8UNKvCat7aKWSJ74zYbm5zWGh0GQN0hKj8zYFTCg==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.1.tgz", + "integrity": "sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==", "dev": true, "requires": { "regenerator-runtime": "^0.12.0" @@ -733,16 +744,16 @@ } }, "@babel/traverse": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.2.tgz", - "integrity": "sha512-E5Bn9FSwHpSkUhthw/XEuvFZxIgrqb9M8cX8j5EUQtrUG5DQUy6bFyl7G7iQ1D1Czudor+xkmp81JbLVVM0Sjg==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", + "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "@babel/generator": "^7.2.2", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.2.2", + "@babel/parser": "^7.2.3", "@babel/types": "^7.2.2", "debug": "^4.1.0", "globals": "^11.1.0", @@ -750,9 +761,9 @@ }, "dependencies": { "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" @@ -767,9 +778,9 @@ } }, "@babel/types": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.2.tgz", - "integrity": "sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.0.tgz", + "integrity": "sha512-QkFPw68QqWU1/RVPyBe8SO7lXbPfjtqAxRYQKpFpaB8yMq7X2qAqfwK5LKoQufEkSmO5NQ70O6Kc3Afk03RwXw==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -789,9 +800,9 @@ "dev": true }, "@types/node": { - "version": "10.12.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.15.tgz", - "integrity": "sha512-9kROxduaN98QghwwHmxXO2Xz3MaWf+I1sLVAA6KJDF5xix+IyXVhds0MAfdNwtcpSrzhaTsNB0/jnL86fgUhqA==", + "version": "10.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", + "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", "dev": true }, "accepts": { @@ -803,6 +814,12 @@ "negotiator": "0.6.1" } }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -848,7 +865,7 @@ }, "array-flatten": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "array-map": { @@ -895,8 +912,7 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", @@ -980,7 +996,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1016,14 +1031,14 @@ } }, "browserslist": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.3.6.tgz", - "integrity": "sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz", + "integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000921", - "electron-to-chromium": "^1.3.92", - "node-releases": "^1.1.1" + "caniuse-lite": "^1.0.30000929", + "electron-to-chromium": "^1.3.103", + "node-releases": "^1.1.3" } }, "buffer-from": { @@ -1070,16 +1085,22 @@ "upper-case": "^1.1.1" } }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, "caniuse-lite": { - "version": "1.0.30000921", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000921.tgz", - "integrity": "sha512-Bu09ciy0lMWLgpYC77I0YGuI8eFRBPPzaSOYJK1jTI64txCphYCqnWbxJYjHABYVt/TYX/p3jNjLBR87u1Bfpw==", + "version": "1.0.30000930", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000930.tgz", + "integrity": "sha512-KD+pw9DderBLB8CGqBzYyFWpnrPVOEjsjargU/CvkNyg60od3cxSPTcTeMPhxJhDbkQPWvOz5BAyBzNl/St9vg==", "dev": true }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -1154,6 +1175,17 @@ } } }, + "cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "dev": true, + "requires": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^2.1.1" + } + }, "clipboard": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", @@ -1165,10 +1197,27 @@ "tiny-emitter": "^2.0.0" } }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "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 + }, "codemirror": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.42.0.tgz", - "integrity": "sha512-pbApC8zDzItP3HRphD6kQVwS976qB5Qi0hU3MZMixLk+AyugOW1RF+8XJEjeyl5yWsHNe88tDUxzeRh5AOxPRw==" + "version": "5.43.0", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.43.0.tgz", + "integrity": "sha512-mljwQWUaWIf85I7QwTBryF2ASaIvmYAL4s5UCanCJFfKeXOKhrqdHWdHiZWAMNT+hjLTCnVx2S/SYTORIgxsgA==" }, "collection-visit": { "version": "1.0.0", @@ -1195,6 +1244,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "colors": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", + "dev": true + }, "commander": { "version": "2.17.1", "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", @@ -1232,8 +1287,7 @@ "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 + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "content-disposition": { "version": "0.5.2", @@ -1282,14 +1336,12 @@ "integrity": "sha1-naHpgOO9RPxck79as9ozeNheRms=" }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", + "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", "which": "^1.2.9" } @@ -1302,6 +1354,12 @@ "ms": "2.0.0" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "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", @@ -1408,9 +1466,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.92.tgz", - "integrity": "sha512-En051LMzMl3/asMWGZEtU808HOoVWIpmmZx1Ep8N+TT9e7z/X8RcLeBU2kLSNLGQ+5SuKELzMx+MVuTBXk6Q9w==", + "version": "1.3.106", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.106.tgz", + "integrity": "sha512-eXX45p4q9CRxG0G8D3ZBZYSdN3DnrcZfrFvt6VUr1u7aKITEtRY/xwWzJ/UZcWXa7DMqPu/pYwuZ6Nm+bl0GmA==", "dev": true }, "encodeurl": { @@ -1428,16 +1486,17 @@ } }, "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", + "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", "dev": true, "requires": { - "es-to-primitive": "^1.1.1", + "es-to-primitive": "^1.2.0", "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" } }, "es-to-primitive": { @@ -1484,6 +1543,21 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -1521,7 +1595,7 @@ }, "expand-range": { "version": "1.8.2", - "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { @@ -1740,7 +1814,7 @@ }, "finalhandler": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "requires": { "debug": "2.6.9", @@ -1752,6 +1826,15 @@ "unpipe": "~1.0.0" } }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -1808,13 +1891,12 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", "dev": true, "optional": true, "requires": { @@ -1840,7 +1922,7 @@ "optional": true }, "are-we-there-yet": { - "version": "1.1.4", + "version": "1.1.5", "bundled": true, "dev": true, "optional": true, @@ -1864,7 +1946,7 @@ } }, "chownr": { - "version": "1.0.1", + "version": "1.1.1", "bundled": true, "dev": true, "optional": true @@ -1900,7 +1982,7 @@ } }, "deep-extend": { - "version": "0.5.1", + "version": "0.6.0", "bundled": true, "dev": true, "optional": true @@ -1949,7 +2031,7 @@ } }, "glob": { - "version": "7.1.2", + "version": "7.1.3", "bundled": true, "dev": true, "optional": true, @@ -1969,12 +2051,12 @@ "optional": true }, "iconv-lite": { - "version": "0.4.21", + "version": "0.4.24", "bundled": true, "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { @@ -2035,16 +2117,16 @@ "dev": true }, "minipass": { - "version": "2.2.4", + "version": "2.3.5", "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { - "version": "1.1.0", + "version": "1.2.1", "bundled": true, "dev": true, "optional": true, @@ -2067,7 +2149,7 @@ "optional": true }, "needle": { - "version": "2.2.0", + "version": "2.2.4", "bundled": true, "dev": true, "optional": true, @@ -2078,18 +2160,18 @@ } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.10.3", "bundled": true, "dev": true, "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", - "needle": "^2.2.0", + "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", - "rc": "^1.1.7", + "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" @@ -2106,13 +2188,13 @@ } }, "npm-bundled": { - "version": "1.0.3", + "version": "1.0.5", "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.2.0", "bundled": true, "dev": true, "optional": true, @@ -2187,12 +2269,12 @@ "optional": true }, "rc": { - "version": "1.2.7", + "version": "1.2.8", "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", + "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" @@ -2222,16 +2304,16 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.6.3", "bundled": true, "dev": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { - "version": "5.1.1", + "version": "5.1.2", "bundled": true, "dev": true }, @@ -2248,7 +2330,7 @@ "optional": true }, "semver": { - "version": "5.5.0", + "version": "5.6.0", "bundled": true, "dev": true, "optional": true @@ -2299,17 +2381,17 @@ "optional": true }, "tar": { - "version": "4.4.1", + "version": "4.4.8", "bundled": true, "dev": true, "optional": true, "requires": { - "chownr": "^1.0.1", + "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.2" } }, @@ -2320,12 +2402,12 @@ "optional": true }, "wide-align": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "dev": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -2334,7 +2416,7 @@ "dev": true }, "yallist": { - "version": "3.0.2", + "version": "3.0.3", "bundled": true, "dev": true } @@ -2346,6 +2428,18 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -2356,7 +2450,6 @@ "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2424,9 +2517,9 @@ } }, "globals": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", - "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.10.0.tgz", + "integrity": "sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==", "dev": true }, "globalyzer": { @@ -2546,7 +2639,7 @@ }, "http-errors": { "version": "1.6.3", - "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "requires": { "depd": "~1.1.2", @@ -2572,7 +2665,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -2583,6 +2675,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==" + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -2592,6 +2689,12 @@ "loose-envify": "^1.0.0" } }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, "ipaddr.js": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", @@ -2599,7 +2702,7 @@ }, "is-accessor-descriptor": { "version": "0.1.6", - "resolved": "http://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { @@ -2640,7 +2743,7 @@ }, "is-builtin-module": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { @@ -2655,7 +2758,7 @@ }, "is-data-descriptor": { "version": "0.1.4", - "resolved": "http://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { @@ -2725,6 +2828,12 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "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", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, "is-glob": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", @@ -2790,6 +2899,12 @@ "has": "^1.0.1" } }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, "is-symbol": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", @@ -2824,9 +2939,9 @@ "dev": true }, "js-levenshtein": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.4.tgz", - "integrity": "sha512-PxfGzSs0ztShKrUYPIn5r0MtyAhYcCwmndozzpz8YObbPnD1jFxzlBGbRnX2mIu6Z13xN6+PTu05TQFnZFlzow==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", "dev": true }, "js-tokens": { @@ -2876,6 +2991,15 @@ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -2888,6 +3012,16 @@ "strip-bom": "^3.0.0" } }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", @@ -2915,6 +3049,16 @@ "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", "dev": true }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, "magic-string": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.1.tgz", @@ -2945,16 +3089,25 @@ "integrity": "sha512-fdZvBa7/vSQIZCi4uuwo2N3q+7jJURpMVCcbaX0S1Mg65WZ5ilXvC67MviJAsdjqqgD+CEq4RKo5AYGgINkVAA==" }, "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, "media-typer": { "version": "0.3.0", - "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -2993,9 +3146,9 @@ } }, "mime": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", - "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" }, "mime-db": { "version": "1.37.0", @@ -3010,18 +3163,23 @@ "mime-db": "~1.37.0" } }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -3033,6 +3191,14 @@ "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" + }, + "dependencies": { + "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 + } } }, "minizlib": { @@ -3067,7 +3233,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -3076,7 +3242,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } @@ -3094,9 +3260,9 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nan": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.0.tgz", - "integrity": "sha512-zT5nC0JhbljmyEf+Z456nvm7iO7XgRV2hYxoBtPpnyp+0Q4aCoP6uWNn76v/I6k2kCYNLWqWbwBWQcjsNI/bjw==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", "dev": true, "optional": true }, @@ -3145,9 +3311,9 @@ "integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==" }, "node-releases": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.1.tgz", - "integrity": "sha512-2UXrBr6gvaebo5TNF84C66qyJJ6r0kxBObgZIDX3D3/mt1ADKiHux3NJPWisq0wxvJJdkjECH+9IIKYViKj71Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.3.tgz", + "integrity": "sha512-6VrvH7z6jqqNFY200kdB6HdzkgM96Oaj9v3dqGfgp6mF+cHmU4wyQKZ2/WPDRVoR0Jz9KqbamaBN0ZhdUaysUQ==", "dev": true, "requires": { "semver": "^5.3.0" @@ -3195,8 +3361,38 @@ "read-pkg": "^3.0.0", "shell-quote": "^1.6.1", "string.prototype.padend": "^3.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } } }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "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 + }, "oauth": { "version": "0.9.15", "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", @@ -3289,11 +3485,51 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "requires": { "wrappy": "1" } }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, "param-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", @@ -3392,11 +3628,16 @@ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", "dev": true }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-key": { "version": "2.0.1", @@ -3407,8 +3648,7 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "path-to-regexp": { "version": "0.1.7", @@ -3482,6 +3722,12 @@ "ipaddr.js": "1.8.0" } }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -3540,7 +3786,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -3564,6 +3810,14 @@ "readable-stream": "^2.0.2" } }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -3613,6 +3867,17 @@ "safe-regex": "^1.1.0" } }, + "regexp-tree": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.0.tgz", + "integrity": "sha512-rHQv+tzu+0l3KS/ERabas1yK49ahNVxuH40WcPg53CzP5p8TgmmyBgHELLyJcvjhTD0e5ahSY6C76LbEVtr7cg==", + "dev": true, + "requires": { + "cli-table3": "^0.5.0", + "colors": "^1.1.2", + "yargs": "^10.0.3" + } + }, "regexpu-core": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.4.0.tgz", @@ -3644,7 +3909,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true } @@ -3674,6 +3939,18 @@ "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", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, "require-relative": { "version": "0.8.7", "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", @@ -3681,12 +3958,11 @@ "dev": true }, "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "requires": { - "path-parse": "^1.0.5" + "path-parse": "^1.0.6" } }, "resolve-url": { @@ -3707,18 +3983,18 @@ "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "rollup": { - "version": "0.68.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.68.0.tgz", - "integrity": "sha512-UbmntCf8QBlOqJnwsNWQCI0oonHOgs9y1OLoO8BHf2r8gCyRLp3JzLHXARJpsNDAS08Qm3LDjzyWma5sqnCxDQ==", + "version": "0.68.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.68.2.tgz", + "integrity": "sha512-WgjNCXYv7ZbtStIap1+tz4pd2zwz0XYN//OILwEY6dINIFLVizK1iWdu+ZtUURL/OKnp8Lv2w8FBds8YihzX7Q==", "dev": true, "requires": { "@types/estree": "0.0.39", @@ -3726,9 +4002,9 @@ } }, "rollup-plugin-babel": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.1.0.tgz", - "integrity": "sha512-4IYv/yTNyH4P/Cma1mWdqy42gc051i1mTe/6oe8F055WzJGSb2qs1mSDwZTo93wA6kMBgHBIR/OcBk7JMnL59Q==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.2.tgz", + "integrity": "sha512-KfnizE258L/4enADKX61ozfwGHoqYauvoofghFJBhFnpH9Sb9dNPpWg8QHOaAfVASUYV8w0mCx430i9z0LJoJg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -3915,7 +4191,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -3982,13 +4258,6 @@ "on-finished": "~2.3.0", "range-parser": "~1.2.0", "statuses": "~1.4.0" - }, - "dependencies": { - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" - } } }, "serve-static": { @@ -4014,6 +4283,12 @@ "write-file-atomic": "1.3.1" } }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "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", @@ -4069,12 +4344,28 @@ "jsonify": "~0.0.0" } }, + "shelljs": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", + "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, "shimport": { "version": "0.0.14", "resolved": "https://registry.npmjs.org/shimport/-/shimport-0.0.14.tgz", "integrity": "sha512-JfzpHhyZ6CYuPYUSitFNw2/IxWEABLN1chs9xDHnn4tPXXCmfIn1METCmIl8Vwvm2FZGW7b8WB4zMCKaJEhY6A==", "dev": true }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, "sirv": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/sirv/-/sirv-0.2.2.tgz", @@ -4083,6 +4374,13 @@ "@polka/url": "^0.5.0", "mime": "^2.3.1", "tiny-glob": "^0.2.0" + }, + "dependencies": { + "mime": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", + "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==" + } } }, "slide": { @@ -4217,9 +4515,9 @@ } }, "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", + "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -4273,9 +4571,9 @@ } }, "spdx-license-ids": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", - "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", "dev": true }, "split-string": { @@ -4319,6 +4617,16 @@ "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=", "dev": true }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, "string.prototype.padend": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz", @@ -4332,19 +4640,34 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" } }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -4355,9 +4678,9 @@ } }, "svelte": { - "version": "3.0.0-alpha10", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.0.0-alpha10.tgz", - "integrity": "sha512-SmEI9Heks28DeBF26GZuViYXBwkqVXiqGbpH1CZ/HowGzTDVib2peWBpwaGjKHg1nX9zicNFTRa9E2Ebb/sWoQ==", + "version": "3.0.0-alpha9", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.0.0-alpha9.tgz", + "integrity": "sha512-rOux/7RK7PEdWeZ4GhkYf+ZaTENK7Mw6Q2HcoauwuLRQO1xiwe6G63357NFZeccEWbhm0/g3h5NUaIu1DMSM1g==", "dev": true }, "tar": { @@ -4373,12 +4696,20 @@ "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", "yallist": "^3.0.2" + }, + "dependencies": { + "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 + } } }, "terser": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.11.0.tgz", - "integrity": "sha512-5iLMdhEPIq3zFWskpmbzmKwMQixKmTYwY3Ox9pjtSklBLnHiuQ0GKJLhL1HSYtyffHM3/lDIFBnb82m9D7ewwQ==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.14.1.tgz", + "integrity": "sha512-NSo3E99QDbYSMeJaEk9YW2lTg3qS9V0aKGlb+PlOrei1X02r1wSBHCNX/O+yeTRFSWPKPIGj6MqvvdqV4rnVGw==", "dev": true, "requires": { "commander": "~2.17.1", @@ -4681,11 +5012,63 @@ "isexe": "^2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": 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=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { "version": "1.3.1", @@ -4697,12 +5080,47 @@ "slide": "^1.1.5" } }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "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==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", "dev": true }, + "yargs": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.1.2.tgz", + "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.1.0" + } + }, + "yargs-parser": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", + "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + }, "yootils": { "version": "0.0.14", "resolved": "https://registry.npmjs.org/yootils/-/yootils-0.0.14.tgz", From 33131d0b704679213bfa4a47dbd521444d5f79d4 Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Fri, 25 Jan 2019 15:18:48 -0500 Subject: [PATCH 051/125] make sure a hoistable name is not also a shadowed name rendering an expression - fixes #2002 --- src/compile/nodes/shared/Expression.ts | 2 +- src/compile/nodes/shared/TemplateScope.ts | 4 ++++ test/runtime/samples/each-block-scope-shadow/_config.js | 3 +++ test/runtime/samples/each-block-scope-shadow/main.html | 8 ++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/each-block-scope-shadow/_config.js create mode 100644 test/runtime/samples/each-block-scope-shadow/main.html diff --git a/src/compile/nodes/shared/Expression.ts b/src/compile/nodes/shared/Expression.ts index 5e223cd53d..0d4dbd4960 100644 --- a/src/compile/nodes/shared/Expression.ts +++ b/src/compile/nodes/shared/Expression.ts @@ -240,7 +240,7 @@ export default class Expression { dependencies.add(name); component.template_references.add(name); } - } else if (!is_synthetic && !component.hoistable_names.has(name) && !component.imported_declarations.has(name)) { + } else if (!is_synthetic && !(component.hoistable_names.has(name) && template_scope.isTopLevel(name)) && !component.imported_declarations.has(name)) { code.prependRight(node.start, key === 'key' && parent.shorthand ? `${name}: ctx.` : 'ctx.'); diff --git a/src/compile/nodes/shared/TemplateScope.ts b/src/compile/nodes/shared/TemplateScope.ts index c9b81070b8..8d31e848e6 100644 --- a/src/compile/nodes/shared/TemplateScope.ts +++ b/src/compile/nodes/shared/TemplateScope.ts @@ -40,4 +40,8 @@ export default class TemplateScope { if (this.parent) return this.parent.containsMutable(names); else return false; } + + isTopLevel(name: string) { + return !this.parent || !this.names.has(name) && this.parent.isTopLevel(name); + } } \ No newline at end of file diff --git a/test/runtime/samples/each-block-scope-shadow/_config.js b/test/runtime/samples/each-block-scope-shadow/_config.js new file mode 100644 index 0000000000..8005bc93d5 --- /dev/null +++ b/test/runtime/samples/each-block-scope-shadow/_config.js @@ -0,0 +1,3 @@ +export default { + html: '(alpaca)(baboon)(capybara)' +}; diff --git a/test/runtime/samples/each-block-scope-shadow/main.html b/test/runtime/samples/each-block-scope-shadow/main.html new file mode 100644 index 0000000000..b6c256e14f --- /dev/null +++ b/test/runtime/samples/each-block-scope-shadow/main.html @@ -0,0 +1,8 @@ +{#each animals as animal} + ({animal}) +{/each} + + \ No newline at end of file From 4f630058fec600a9cc52983d24b17a6e57efe7ca Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Fri, 25 Jan 2019 18:56:57 -0500 Subject: [PATCH 052/125] check module scope when determining if a name is contextual - fixes #2001 --- src/compile/nodes/shared/Expression.ts | 15 ++++++++++++++- .../_config.js | 3 +++ .../module-context-with-instance-script/main.html | 9 +++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/module-context-with-instance-script/_config.js create mode 100644 test/runtime/samples/module-context-with-instance-script/main.html diff --git a/src/compile/nodes/shared/Expression.ts b/src/compile/nodes/shared/Expression.ts index 0d4dbd4960..852065d98d 100644 --- a/src/compile/nodes/shared/Expression.ts +++ b/src/compile/nodes/shared/Expression.ts @@ -240,7 +240,7 @@ export default class Expression { dependencies.add(name); component.template_references.add(name); } - } else if (!is_synthetic && !(component.hoistable_names.has(name) && template_scope.isTopLevel(name)) && !component.imported_declarations.has(name)) { + } else if (!is_synthetic && isContextual(component, template_scope, name)) { code.prependRight(node.start, key === 'key' && parent.shorthand ? `${name}: ctx.` : 'ctx.'); @@ -436,4 +436,17 @@ function get_function_name(node, parent) { } return 'func'; +} + +function isContextual(component: Component, scope: TemplateScope, name: string) { + // if it's a name below root scope, it's contextual + if (!scope.isTopLevel(name)) return true; + + // hoistables, module declarations, and imports are non-contextual + if (component.hoistable_names.has(name)) return false; + if (component.module_scope && component.module_scope.declarations.has(name)) return false; + if (component.imported_declarations.has(name)) return false; + + // assume contextual + return true; } \ No newline at end of file diff --git a/test/runtime/samples/module-context-with-instance-script/_config.js b/test/runtime/samples/module-context-with-instance-script/_config.js new file mode 100644 index 0000000000..902501fdd4 --- /dev/null +++ b/test/runtime/samples/module-context-with-instance-script/_config.js @@ -0,0 +1,3 @@ +export default { + html: `

    (42)(99)

    ` +}; \ No newline at end of file diff --git a/test/runtime/samples/module-context-with-instance-script/main.html b/test/runtime/samples/module-context-with-instance-script/main.html new file mode 100644 index 0000000000..8769beaf3e --- /dev/null +++ b/test/runtime/samples/module-context-with-instance-script/main.html @@ -0,0 +1,9 @@ + + + + +

    ({foo})({bar})

    \ No newline at end of file From 33a2b54881ca011e7a663d9a2aef0edcdeeff186 Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Sat, 26 Jan 2019 00:04:37 -0500 Subject: [PATCH 053/125] update await-block to use on_outro and check_outros - fixes #1995 --- src/internal/await-block.js | 6 ++-- .../samples/await-with-components/Widget.html | 5 ++++ .../samples/await-with-components/_config.js | 29 +++++++++++++++++++ .../samples/await-with-components/main.html | 12 ++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 test/runtime/samples/await-with-components/Widget.html create mode 100644 test/runtime/samples/await-with-components/_config.js create mode 100644 test/runtime/samples/await-with-components/main.html diff --git a/src/internal/await-block.js b/src/internal/await-block.js index 3d8be35edc..e9c25ec370 100644 --- a/src/internal/await-block.js +++ b/src/internal/await-block.js @@ -1,5 +1,5 @@ import { assign, isPromise } from './utils.js'; -import { group_outros } from './transitions.js'; +import { check_outros, group_outros, on_outro } from './transitions.js'; import { flush } from '../internal/scheduler.js'; export function handlePromise(promise, info) { @@ -18,10 +18,12 @@ export function handlePromise(promise, info) { info.blocks.forEach((block, i) => { if (i !== index && block) { group_outros(); - block.o(() => { + on_outro(() => { block.d(1); info.blocks[i] = null; }); + block.o(); + check_outros(); } }); } else { diff --git a/test/runtime/samples/await-with-components/Widget.html b/test/runtime/samples/await-with-components/Widget.html new file mode 100644 index 0000000000..ec9e3471fe --- /dev/null +++ b/test/runtime/samples/await-with-components/Widget.html @@ -0,0 +1,5 @@ +{value} + + \ No newline at end of file diff --git a/test/runtime/samples/await-with-components/_config.js b/test/runtime/samples/await-with-components/_config.js new file mode 100644 index 0000000000..ffef7441ff --- /dev/null +++ b/test/runtime/samples/await-with-components/_config.js @@ -0,0 +1,29 @@ +export default { + async test({ assert, component, target }) { + let resolve, reject; + let promise = new Promise(ok => resolve = ok); + + component.promise = promise; + assert.htmlEqual(target.innerHTML, 'Loading...'); + + resolve(42); + await promise; + assert.htmlEqual(target.innerHTML, '42'); + + promise = new Promise((ok, fail) => reject = fail); + component.promise = promise; + assert.htmlEqual(target.innerHTML, 'Loading...'); + + reject(99); + await promise.then(null, () => {}); + assert.htmlEqual(target.innerHTML, '99'); + + promise = new Promise(ok => resolve = ok); + component.promise = promise; + assert.htmlEqual(target.innerHTML, 'Loading...'); + + resolve(1); + await promise; + assert.htmlEqual(target.innerHTML, '1'); + } +}; diff --git a/test/runtime/samples/await-with-components/main.html b/test/runtime/samples/await-with-components/main.html new file mode 100644 index 0000000000..84894997e1 --- /dev/null +++ b/test/runtime/samples/await-with-components/main.html @@ -0,0 +1,12 @@ +{#await promise} + +{:then result} + +{:catch err} + +{/await} + + \ No newline at end of file From c9301dc9f797eec740588303c19e9f739614e5a3 Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Sat, 26 Jan 2019 12:40:54 -0500 Subject: [PATCH 054/125] defer hoisting until after the template is walked - fixes #2005 --- src/compile/Component.ts | 16 +++++++++++++--- .../expected.js | 9 ++++----- .../Widget.html | 5 +++++ .../_config.js | 14 ++++++++++++++ .../component-template-inline-mutation/main.html | 6 ++++++ 5 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 test/runtime/samples/component-template-inline-mutation/Widget.html create mode 100644 test/runtime/samples/component-template-inline-mutation/_config.js create mode 100644 test/runtime/samples/component-template-inline-mutation/main.html diff --git a/src/compile/Component.ts b/src/compile/Component.ts index a916078898..1ea42ade00 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -160,9 +160,12 @@ export default class Component { : this.name; this.walk_module_js(); - this.walk_instance_js(); + this.walk_instance_js_pre_template(); this.fragment = new Fragment(this, ast.html); + + this.walk_instance_js_post_template(); + if (!options.customElement) this.stylesheet.reify(); this.stylesheet.warnOnUnusedSelectors(stats); @@ -510,7 +513,7 @@ export default class Component { this.module_javascript = this.extract_javascript(script); } - walk_instance_js() { + walk_instance_js_pre_template() { const script = this.instance_script; if (!script) return; @@ -545,6 +548,12 @@ export default class Component { this.track_mutations(); this.extract_imports_and_exports(script.content, this.imports, this.props); + } + + walk_instance_js_post_template() { + const script = this.instance_script; + if (!script) return; + this.hoist_instance_declarations(); this.extract_reactive_declarations(); this.extract_reactive_store_references(); @@ -756,12 +765,13 @@ export default class Component { // hoistable functions. TODO others? const { hoistable_names, hoistable_nodes, imported_declarations, instance_scope: scope } = this; + const template_scope = this.fragment.scope; const top_level_function_declarations = new Map(); this.instance_script.content.body.forEach(node => { if (node.type === 'VariableDeclaration') { - if (node.declarations.every(d => d.init && d.init.type === 'Literal' && !this.mutable_props.has(d.id.name))) { + if (node.declarations.every(d => d.init && d.init.type === 'Literal' && !this.mutable_props.has(d.id.name) && !template_scope.containsMutable([d.id.name]))) { node.declarations.forEach(d => { hoistable_names.add(d.id.name); }); diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js index dd1f72bc04..d403b12fb1 100644 --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -11,7 +11,7 @@ function create_fragment($$, ctx) { text1 = createText("\n\n"); p = createElement("p"); text2 = createText("x: "); - text3 = createText(x); + text3 = createText(ctx.x); dispose = addListener(button, "click", ctx.click_handler); }, @@ -25,7 +25,7 @@ function create_fragment($$, ctx) { p(changed, ctx) { if (changed.x) { - setData(text3, x); + setData(text3, ctx.x); } }, @@ -44,15 +44,14 @@ function create_fragment($$, ctx) { }; } -let x = 0; - function instance($$self, $$props, $$invalidate) { + let x = 0; function click_handler() { if (true) { x += 1; $$invalidate('x', x); } } - return { click_handler }; + return { x, click_handler }; } class SvelteComponent extends SvelteComponent_1 { diff --git a/test/runtime/samples/component-template-inline-mutation/Widget.html b/test/runtime/samples/component-template-inline-mutation/Widget.html new file mode 100644 index 0000000000..f20c4bea50 --- /dev/null +++ b/test/runtime/samples/component-template-inline-mutation/Widget.html @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-template-inline-mutation/_config.js b/test/runtime/samples/component-template-inline-mutation/_config.js new file mode 100644 index 0000000000..9007d80ff5 --- /dev/null +++ b/test/runtime/samples/component-template-inline-mutation/_config.js @@ -0,0 +1,14 @@ +export default { + async test({ assert, target }) { + const btns = target.querySelectorAll('button'); + const event = new window.MouseEvent('click'); + + await btns[0].dispatchEvent(event); + await btns[0].dispatchEvent(event); + await btns[1].dispatchEvent(event); + await btns[1].dispatchEvent(event); + await btns[1].dispatchEvent(event); + + assert.equal(btns[1].innerHTML, '3'); + } +}; diff --git a/test/runtime/samples/component-template-inline-mutation/main.html b/test/runtime/samples/component-template-inline-mutation/main.html new file mode 100644 index 0000000000..f094aef743 --- /dev/null +++ b/test/runtime/samples/component-template-inline-mutation/main.html @@ -0,0 +1,6 @@ + + + + \ No newline at end of file From f1ca1cc0983ddf68c89f596776f54717c4075ede Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 26 Jan 2019 12:50:35 -0500 Subject: [PATCH 055/125] housekeeping --- .eslintrc.json | 1 - .gitignore | 1 + package-lock.json | 3399 +++++------------ package.json | 25 +- rollup.config.js | 76 +- src/compile/Component.ts | 6 +- .../render-dom/wrappers/shared/Wrapper.ts | 10 - src/internal/utils.js | 11 - src/parse/index.ts | 4 - src/utils/CodeBuilder.ts | 8 - src/utils/__test__.ts | 63 - src/utils/replaceAsync.ts | 4 +- test/custom-elements/index.js | 4 +- test/runtime/index.js | 2 +- 14 files changed, 1004 insertions(+), 2610 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index c5da7150a7..59fd92eeb6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -33,7 +33,6 @@ "plugin:import/errors", "plugin:import/warnings" ], - "plugins": ["svelte3"], "parserOptions": { "ecmaVersion": 6, "sourceType": "module" diff --git a/.gitignore b/.gitignore index a999190ceb..3a7d2ce532 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .nyc_output node_modules *.map +/src/compile/internal-exports.ts /cli/ /compiler.js /index.js diff --git a/package-lock.json b/package-lock.json index e6517b2fda..ebd7de3ed7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,62 +13,6 @@ "@babel/highlight": "^7.0.0" } }, - "@babel/generator": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.51.tgz", - "integrity": "sha1-bHV1/952HQdIXgS67cA5LG2eMPY=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51", - "jsesc": "^2.5.1", - "lodash": "^4.17.5", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.51.tgz", - "integrity": "sha1-IbSHSiJ8+Z7K/MMKkDAtpaJkBWE=", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "7.0.0-beta.51", - "@babel/template": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.51.tgz", - "integrity": "sha1-MoGy0EWvlcFyzpGyCCXYXqRnZBE=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.51.tgz", - "integrity": "sha1-imw/ZsTSZTUvwHdIT59ugKUauXg=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51" - } - }, "@babel/highlight": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", @@ -80,124 +24,24 @@ "js-tokens": "^4.0.0" } }, - "@babel/parser": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.51.tgz", - "integrity": "sha1-J87C30Cd9gr1gnDtj2qlVAnqhvY=", + "@bcoe/v8-coverage": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.1.0.tgz", + "integrity": "sha512-UdVB1rSL7H8TS8674fH02p5lRbhfIqQ18YKLxLKEnHFztHUH6bhMqjebMxgSTmWVrs5raS5JSLJIKKHFT4WfPg==", "dev": true }, - "@babel/template": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.51.tgz", - "integrity": "sha1-lgKkCuvPNXrpZ34lMu9fyBD1+/8=", - "dev": true, - "requires": { - "@babel/code-frame": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", - "lodash": "^4.17.5" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", - "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", - "dev": true, - "requires": { - "@babel/highlight": "7.0.0-beta.51" - } - }, - "@babel/highlight": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", - "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - } - } - }, - "@babel/traverse": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.51.tgz", - "integrity": "sha1-mB2vLOw0emIx06odnhgDsDqqpKg=", - "dev": true, - "requires": { - "@babel/code-frame": "7.0.0-beta.51", - "@babel/generator": "7.0.0-beta.51", - "@babel/helper-function-name": "7.0.0-beta.51", - "@babel/helper-split-export-declaration": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", - "debug": "^3.1.0", - "globals": "^11.1.0", - "invariant": "^2.2.0", - "lodash": "^4.17.5" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", - "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", - "dev": true, - "requires": { - "@babel/highlight": "7.0.0-beta.51" - } - }, - "@babel/highlight": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", - "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz", - "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.5", - "to-fast-properties": "^2.0.0" - } - }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, + "@types/is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@types/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-byTuSHMdMRaOpRBhDW3RXl/Jxv8=", + "dev": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -286,7 +130,7 @@ }, "ansi-escapes": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -305,6 +149,12 @@ "color-convert": "^1.9.0" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, "anymatch": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", @@ -315,6 +165,12 @@ "normalize-path": "^2.0.0" } }, + "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", @@ -402,6 +258,15 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", @@ -571,6 +436,72 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, + "c8": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-3.4.0.tgz", + "integrity": "sha512-LJcCHZlcWzTeRdUciC3fTq2AoIjBAZ18oHMG3StFVpKHxN+6IDUesrG6uiK3DlRm2PaDBfEOyp2N69VqQte1XA==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.1.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "furi": "^1.3.0", + "istanbul-lib-coverage": "^2.0.1", + "istanbul-lib-report": "^2.0.1", + "istanbul-reports": "^2.0.0", + "rimraf": "^2.6.2", + "test-exclude": "^5.0.0", + "uuid": "^3.3.2", + "v8-to-istanbul": "^2.0.2", + "yargs": "^12.0.5", + "yargs-parser": "^10.1.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + } + } + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -610,7 +541,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -708,6 +639,17 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, "clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", @@ -769,16 +711,10 @@ }, "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 }, - "compare-versions": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-2.0.1.tgz", - "integrity": "sha1-Htwfk2h/2XoyXFn1XkWgfbEGrKY=", - "dev": true - }, "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", @@ -805,7 +741,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -820,7 +756,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -920,19 +856,6 @@ "abab": "^2.0.0", "whatwg-mimetype": "^2.2.0", "whatwg-url": "^7.0.0" - }, - "dependencies": { - "whatwg-url": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", - "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - } } }, "debug": { @@ -1169,7 +1092,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -1190,6 +1113,15 @@ } } }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, "enqueue": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/enqueue/-/enqueue-1.0.2.tgz", @@ -1355,12 +1287,12 @@ } }, "eslint-plugin-html": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-4.0.6.tgz", - "integrity": "sha512-nj6A9oK+7BKnMm0E7dMRH3r75BfpkXtcVIb3pFC4AcDdBTNyg2NGxHXyFNT1emW4VsR7P2SZvRXXQtUR+kY08w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-5.0.0.tgz", + "integrity": "sha512-f7p/7YQdgQUFVAX3nB4dnMQbrDeTalcA01PDhuvTLk0ZadCwM4Pb+639SRuqEf1zMkIxckLY+ckCr0hVP5zl6A==", "dev": true, "requires": { - "htmlparser2": "^3.8.2" + "htmlparser2": "^3.10.0" } }, "eslint-plugin-import": { @@ -1392,7 +1324,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -1483,6 +1415,21 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, "expand-brackets": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", @@ -1494,7 +1441,7 @@ }, "expand-range": { "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { @@ -1684,6 +1631,28 @@ "for-in": "^1.0.1" } }, + "foreground-child": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + } + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1712,7 +1681,7 @@ }, "fs-extra": { "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", "dev": true, "requires": { @@ -2276,12 +2245,37 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "furi": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/furi/-/furi-1.3.0.tgz", + "integrity": "sha512-TYoXEeRLKHXNWcCBP0VH1psPktQ9G8Y0GfZwMXCvwVbhbfNx7JItKWhB5mMBYufNjqxEHq+Ivd1nLtr5vQyVoQ==", + "dev": true, + "requires": { + "@types/is-windows": "^0.2.0", + "is-windows": "^1.0.2" + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, "get-stdin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -2360,6 +2354,18 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, + "handlebars": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", + "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", + "dev": true, + "requires": { + "async": "^2.5.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2618,14 +2624,11 @@ "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true }, "is-accessor-descriptor": { "version": "0.1.6", @@ -2659,7 +2662,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": { @@ -2804,6 +2807,12 @@ "@types/estree": "0.0.39" } }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -2855,19 +2864,24 @@ "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", "dev": true }, - "istanbul-lib-instrument": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz", - "integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==", + "istanbul-lib-report": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.2.tgz", + "integrity": "sha512-rJ8uR3peeIrwAxoDEbK4dJ7cqqtxBisZKCuwkMtMv0xYzaAnsAi3AHrHPAAtNXzG/bcCgZZ3OJVqm1DTi9ap2Q==", "dev": true, "requires": { - "@babel/generator": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/template": "7.0.0-beta.51", - "@babel/traverse": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", "istanbul-lib-coverage": "^2.0.1", - "semver": "^5.5.0" + "make-dir": "^1.3.0", + "supports-color": "^5.4.0" + } + }, + "istanbul-reports": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.0.1.tgz", + "integrity": "sha512-CT0QgMBJqs6NJLF678ZHcquUAZIoBIUNzdJrRJfpkI9OnzG6MkUfHxbJC3ln981dMswC7/B1mfX3LNkhgJxsuw==", + "dev": true, + "requires": { + "handlebars": "^4.0.11" } }, "js-tokens": { @@ -2893,53 +2907,63 @@ "dev": true }, "jsdom": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", - "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-13.2.0.tgz", + "integrity": "sha512-cG1NtMWO9hWpqRNRR3dSvEQa8bFI6iLlqU2x4kwX51FQjp0qus8T9aBaAO6iGp3DeBrhdwuKxckknohkmfvsFw==", "dev": true, "requires": { "abab": "^2.0.0", - "acorn": "^5.5.3", - "acorn-globals": "^4.1.0", + "acorn": "^6.0.4", + "acorn-globals": "^4.3.0", "array-equal": "^1.0.0", - "cssom": ">= 0.3.2 < 0.4.0", - "cssstyle": "^1.0.0", - "data-urls": "^1.0.0", + "cssom": "^0.3.4", + "cssstyle": "^1.1.1", + "data-urls": "^1.1.0", "domexception": "^1.0.1", - "escodegen": "^1.9.1", + "escodegen": "^1.11.0", "html-encoding-sniffer": "^1.0.2", - "left-pad": "^1.3.0", - "nwsapi": "^2.0.7", - "parse5": "4.0.0", + "nwsapi": "^2.0.9", + "parse5": "5.1.0", "pn": "^1.1.0", - "request": "^2.87.0", + "request": "^2.88.0", "request-promise-native": "^1.0.5", - "sax": "^1.2.4", + "saxes": "^3.1.5", "symbol-tree": "^3.2.2", - "tough-cookie": "^2.3.4", + "tough-cookie": "^2.5.0", "w3c-hr-time": "^1.0.1", + "w3c-xmlserializer": "^1.0.1", "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.3", - "whatwg-mimetype": "^2.1.0", - "whatwg-url": "^6.4.1", - "ws": "^5.2.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^7.0.0", + "ws": "^6.1.2", "xml-name-validator": "^3.0.0" }, "dependencies": { - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } } } }, "jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -2966,7 +2990,7 @@ }, "jsonfile": { "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "dev": true, "requires": { @@ -3015,11 +3039,14 @@ "integrity": "sha512-P3kRv+B+Ra070ng2VKQqW4qW7gd/v3iD8sy/zOdcYRsfiD+QBokQNOps/AfP6Hr48cBhIIBFWckB9aO+IZhrWg==", "dev": true }, - "left-pad": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", - "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", - "dev": true + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } }, "levn": { "version": "0.3.0", @@ -3031,9 +3058,15 @@ "type-check": "~0.3.2" } }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, "load-json-file": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -3071,15 +3104,6 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -3090,6 +3114,16 @@ "signal-exit": "^3.0.0" } }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, "magic-string": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.1.tgz", @@ -3099,12 +3133,38 @@ "sourcemap-codec": "^1.4.1" } }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, "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", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -3138,9 +3198,20 @@ "integrity": "sha512-esDqNvsJB2q5V28+u7NdtdMg6Rmg4khQmAVSjUiX7BY/7haIv0K2yWM43hYp0or+3nvG7+UaTF1JHz31hgU1TA==", "dev": true }, + "mem": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", + "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^1.1.0" + } + }, "meow": { "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -3168,7 +3239,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -3181,7 +3252,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -3290,7 +3361,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 }, @@ -3305,7 +3376,7 @@ "dependencies": { "commander": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/commander/-/commander-1.0.4.tgz", + "resolved": "http://registry.npmjs.org/commander/-/commander-1.0.4.tgz", "integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=", "dev": true, "requires": { @@ -3337,7 +3408,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": { @@ -3417,7 +3488,7 @@ }, "multiline": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz", "integrity": "sha1-abHyX/B00oKJBPJE3dBrfZbvbJM=", "dev": true, "requires": { @@ -3430,6 +3501,17 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "nan": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", @@ -3527,6 +3609,12 @@ } } }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, "node-resolve": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/node-resolve/-/node-resolve-1.3.4.tgz", @@ -3575,2109 +3663,65 @@ "remove-trailing-separator": "^1.0.1" } }, - "nugget": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", - "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=", - "dev": true, - "requires": { - "debug": "^2.1.3", - "minimist": "^1.1.0", - "pretty-bytes": "^1.0.2", - "progress-stream": "^1.1.0", - "request": "^2.45.0", - "single-line-log": "^1.1.2", - "throttleit": "0.0.2" - }, - "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" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "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 - }, - "nwsapi": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.9.tgz", - "integrity": "sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ==", - "dev": true - }, - "nyc": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-12.0.2.tgz", - "integrity": "sha1-ikpO1pCWbBHsWH/4fuoMEsl0upk=", - "dev": true, - "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.5.1", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^2.1.0", - "istanbul-lib-report": "^1.1.3", - "istanbul-lib-source-maps": "^1.2.5", - "istanbul-reports": "^1.4.1", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.1.0", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.1", - "spawn-wrap": "^1.4.2", - "test-exclude": "^4.2.0", - "yargs": "11.1.0", - "yargs-parser": "^8.0.0" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "append-transform": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "^1.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "async": { - "version": "1.5.2", - "bundled": true, - "dev": true - }, - "atob": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "base": { - "version": "0.11.2", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "bundled": true, - "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" - } - }, - "caching-transform": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" - } - }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "class-utils": { - "version": "0.3.6", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cliui": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "bundled": true, - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-log": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "^2.0.0" - } - }, - "define-property": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "error-ex": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "fill-range": { - "version": "4.0.0", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "fragment-cache": { - "version": "0.2.1", - "bundled": true, - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "get-value": { - "version": "2.0.6", - "bundled": true, - "dev": true - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "bundled": true, - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "has-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hosted-git-info": { - "version": "2.6.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "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", - "bundled": true, - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-odd": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "bundled": true, - "dev": true - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "istanbul-lib-coverage": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-report": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - }, - "dependencies": { - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" - } - }, - "istanbul-reports": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "^4.0.3" - } - }, - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - } - } - }, - "longest": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "map-cache": { - "version": "0.2.2", - "bundled": true, - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5-hex": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "merge-source-map": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "micromatch": { - "version": "3.1.10", - "bundled": true, - "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" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "nanomatch": { - "version": "1.2.9", - "bundled": true, - "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-odd": "^2.0.0", - "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" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "parse-json": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pascalcase": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "path-type": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "bundled": true, - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "bundled": true, - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "regex-not": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "repeat-element": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true, - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "ret": { - "version": "0.1.15", - "bundled": true, - "dev": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-regex": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "set-value": { - "version": "2.0.0", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "bundled": true, - "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-url": { - "version": "0.4.0", - "bundled": true, - "dev": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "split-string": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "static-extend": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" - } - }, - "to-object-path": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "uglify-js": { - "version": "2.8.29", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "union-value": { - "version": "1.0.0", - "bundled": true, - "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", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "bundled": true, - "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", - "bundled": true, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "nugget": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", + "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=", + "dev": true, + "requires": { + "debug": "^2.1.3", + "minimist": "^1.1.0", + "pretty-bytes": "^1.0.2", + "progress-stream": "^1.1.0", + "request": "^2.45.0", + "single-line-log": "^1.1.2", + "throttleit": "0.0.2" + }, + "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": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "bundled": true, - "dev": true - } + "ms": "2.0.0" } }, - "urix": { - "version": "0.1.0", - "bundled": true, + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, - "use": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "validate-npm-package-license": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { + "ms": { "version": "2.0.0", - "bundled": true, - "dev": true - }, - "window-size": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true, - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "write-file-atomic": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, - "y18n": { - "version": "3.2.1", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true - }, - "yargs": { - "version": "11.1.0", - "bundled": true, - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "cliui": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "yargs-parser": { - "version": "9.0.2", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "yargs-parser": { - "version": "8.1.0", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - } - } } } }, + "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 + }, + "nwsapi": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.9.tgz", + "integrity": "sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ==", + "dev": true + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -5780,6 +3824,24 @@ "mimic-fn": "^1.0.0" } }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", @@ -5794,12 +3856,41 @@ "wordwrap": "~1.0.0" } }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true + }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -5855,9 +3946,9 @@ } }, "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", + "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", "dev": true }, "pascalcase": { @@ -5874,7 +3965,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 }, @@ -5919,7 +4010,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -5938,6 +4029,15 @@ "pinkie": "^2.0.0" } }, + "pirates": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.0.tgz", + "integrity": "sha512-8t5BsXy1LUIjn3WWOlOuFDuKswhQb/tkak641lvBgmPOBUQHXveORtlMCp6OdPV1dtuTaEahKA8VNz6uLfKBtA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", @@ -5977,15 +4077,9 @@ "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", "dev": true }, - "prettier": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.1.tgz", - "integrity": "sha512-XXUITwIkGb3CPJ2hforHah/zTINRyie5006Jd2HKy2qz7snEJXl0KLfsJZW/wst9g6R2rFvqba3VpNYdu1hDcA==", - "dev": true - }, "pretty-bytes": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", "dev": true, "requires": { @@ -6015,12 +4109,28 @@ "through2": "~0.2.3" } }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, "psl": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", "dev": true }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -6072,7 +4182,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -6412,7 +4522,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -6427,7 +4537,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -6555,6 +4665,18 @@ "tough-cookie": ">=2.3.3" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, "require-relative": { "version": "0.8.7", "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", @@ -6608,13 +4730,14 @@ } }, "rollup": { - "version": "0.63.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.63.5.tgz", - "integrity": "sha512-dFf8LpUNzIj3oE0vCvobX6rqOzHzLBoblyFp+3znPbjiSmSvOoK2kMKx+Fv9jYduG1rvcCfCveSgEaQHjWRF6g==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.1.2.tgz", + "integrity": "sha512-OkdMxqMl8pWoQc5D8y1cIinYQPPLV8ZkfLgCzL6SytXeNA2P7UHynEQXI9tYxuAjAMsSyvRaWnyJDLHMxq0XAg==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "*" + "@types/node": "*", + "acorn": "^6.0.5" } }, "rollup-plugin-commonjs": { @@ -6647,20 +4770,20 @@ } }, "rollup-plugin-node-resolve": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz", - "integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.0.tgz", + "integrity": "sha512-7Ni+/M5RPSUBfUaP9alwYQiIKnKeXCOHiqBpKUl9kwp3jX5ZJtgXAait1cne6pGEVUUztPD6skIKH9Kq9sNtfw==", "dev": true, "requires": { - "builtin-modules": "^2.0.0", + "builtin-modules": "^3.0.0", "is-module": "^1.0.0", - "resolve": "^1.1.6" + "resolve": "^1.8.1" }, "dependencies": { "builtin-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", - "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.0.0.tgz", + "integrity": "sha512-hMIeU4K2ilbXV6Uv93ZZ0Avg/M91RaKXucQ+4me2Do1txxBDyDZWCBa5bJSLqoNTRpXTLwEzIk1KmloenDDjhg==", "dev": true } } @@ -6676,41 +4799,24 @@ "rollup-pluginutils": "^2.0.1" } }, - "rollup-plugin-typescript": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-0.8.1.tgz", - "integrity": "sha1-L/fuzCHPa7K0P8J+W2iJUs5xkko=", + "rollup-plugin-sucrase": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-sucrase/-/rollup-plugin-sucrase-2.0.0.tgz", + "integrity": "sha512-Gyb1eoOPXuODqz5z7y2UpNrYGOBvlxFVDVWgq9n6bn2ly9MMSlWW3YwflKRUj6popOCaxHSmKo1dH0jHoR14PQ==", "dev": true, "requires": { - "compare-versions": "2.0.1", - "object-assign": "^4.0.1", - "rollup-pluginutils": "^1.3.1", - "tippex": "^2.1.1", - "typescript": "^1.8.9" - }, - "dependencies": { - "estree-walker": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz", - "integrity": "sha1-va/oCVOD2EFNXcLs9MkXO225QS4=", - "dev": true - }, - "rollup-pluginutils": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz", - "integrity": "sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg=", - "dev": true, - "requires": { - "estree-walker": "^0.2.1", - "minimatch": "^3.0.2" - } - }, - "typescript": { - "version": "1.8.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-1.8.10.tgz", - "integrity": "sha1-tHXW4N/wv1DyluXKbvn7tccyDx4=", - "dev": true - } + "rollup-pluginutils": "^2.3.0", + "sucrase": "^3.9.5" + } + }, + "rollup-plugin-typescript": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.0.tgz", + "integrity": "sha512-d2KDNMJXgaaB//dDGd/YmyMiopt1Pz965Iu3zmEoL08YqNcKRBz26uHqqc47rFGfrJV5kFqifC9IYlh6dpSCLg==", + "dev": true, + "requires": { + "resolve": "^1.8.1", + "rollup-pluginutils": "^2.3.1" } }, "rollup-plugin-virtual": { @@ -6783,7 +4889,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": { @@ -6807,11 +4913,14 @@ "rimraf": "^2.5.2" } }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true + "saxes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.6.tgz", + "integrity": "sha512-LAYs+lChg1v5uKNzPtsgTxSS5hLo8aIhSMCJt1WMpefAxm3D1RTpMwSpb6ebdL31cubiLTnhokVktBW+cv9Y9w==", + "dev": true, + "requires": { + "xmlchars": "^1.3.1" + } }, "semver": { "version": "5.6.0", @@ -6819,6 +4928,12 @@ "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "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", @@ -6911,7 +5026,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7165,7 +5280,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -7180,7 +5295,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -7289,6 +5404,12 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, "strip-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", @@ -7304,6 +5425,26 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "sucrase": { + "version": "3.9.5", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.9.5.tgz", + "integrity": "sha512-gvNjd3PJ0WAXxWUAQzCw/nlG4J5a2j7q8jN+sX8Fwe3ryIsl9UrEcWPxWoEzBPrj3Fias4U05iN84m4/IFQLdw==", + "dev": true, + "requires": { + "commander": "^2.19.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.0" + }, + "dependencies": { + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + } + } + }, "sumchecker": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-1.3.1.tgz", @@ -7358,12 +5499,145 @@ "string-width": "^2.1.1" } }, + "test-exclude": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.0.0.tgz", + "integrity": "sha512-bO3Lj5+qFa9YLfYW2ZcXMOV1pmQvw+KS/DpjqhyX6Y6UZ8zstpZJ+mA2ERkXfpOqhxsJlQiLeVXD3Smsrs6oLw==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^1.0.1" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + } + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "thenify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", + "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "throttleit": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", @@ -7372,13 +5646,13 @@ }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz", "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", "dev": true, "requires": { @@ -7394,7 +5668,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -7406,7 +5680,7 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true } @@ -7422,12 +5696,6 @@ "globrex": "^0.1.1" } }, - "tippex": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tippex/-/tippex-2.3.1.tgz", - "integrity": "sha1-ov1bcIfXy/sgyYBqbBYQjCwPr9o=", - "dev": true - }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -7437,12 +5705,6 @@ "os-tmpdir": "~1.0.2" } }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "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", @@ -7518,34 +5780,17 @@ "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, "ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", + "integrity": "sha512-MosTrinKmaAcWgO8tqMjMJB22h+sp3Rd1i4fdoWY4mhBDekOwIAKI/bzmRi7IcbCmjquccYg2gcF6NBkLgr0Tw==", "dev": true, "requires": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", + "arg": "^4.1.0", "diff": "^3.1.0", "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", "source-map-support": "^0.5.6", - "yn": "^2.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } + "yn": "^3.0.0" } }, "tslib": { @@ -7590,6 +5835,26 @@ "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", "dev": true }, + "uglify-js": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true, + "optional": true + } + } + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -7710,6 +5975,12 @@ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true }, + "v8-to-istanbul": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-2.0.2.tgz", + "integrity": "sha512-39Z8JhWATTDDHlTEbSOv/G4j4xFWJy7ESMhfCLoj6IEd6yu4DOaexdTW89GTqE29d51PyH2lSS12c2HJhlRd1A==", + "dev": true + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -7740,6 +6011,17 @@ "browser-process-hrtime": "^0.1.2" } }, + "w3c-xmlserializer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.0.1.tgz", + "integrity": "sha512-XZGI1OH/OLQr/NaJhhPmzhngwcAnZDLytsvXnRmlYeRkmbb0I7sqFFA22erq4WQR0sUu17ZSQOAV9mFwCqKRNg==", + "dev": true, + "requires": { + "domexception": "^1.0.1", + "webidl-conversions": "^4.0.2", + "xml-name-validator": "^3.0.0" + } + }, "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", @@ -7762,9 +6044,9 @@ "dev": true }, "whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", + "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", "dev": true, "requires": { "lodash.sortby": "^4.7.0", @@ -7781,12 +6063,65 @@ "isexe": "^2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": 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=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -7803,9 +6138,9 @@ } }, "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.3.tgz", + "integrity": "sha512-tbSxiT+qJI223AP4iLfQbkbxkwdFcneYinM2+x46Gx2wgvbaOMO36czfdfVUBRTHvzAMRhDd98sA5d/BuWbQdg==", "dev": true, "requires": { "async-limiter": "~1.0.0" @@ -7817,6 +6152,12 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, + "xmlchars": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-1.3.1.tgz", + "integrity": "sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw==", + "dev": true + }, "xtend": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", @@ -7826,6 +6167,116 @@ "object-keys": "~0.4.0" } }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + }, + "dependencies": { + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } + }, "yauzl": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", @@ -7836,9 +6287,9 @@ } }, "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.0.0.tgz", + "integrity": "sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q==", "dev": true } } diff --git a/package.json b/package.json index b174d06a5e..ae0780e816 100644 --- a/package.json +++ b/package.json @@ -23,18 +23,17 @@ "scripts": { "test": "mocha --opts mocha.opts", "quicktest": "mocha --opts mocha.opts", - "precoverage": "export COVERAGE=true && nyc mocha --opts mocha.coverage.opts", - "coverage": "nyc report --reporter=text-lcov > coverage.lcov", + "precoverage": "c8 mocha --opts mocha.coverage.opts", + "coverage": "c8 report --reporter=text-lcov > coverage.lcov && c8 report --reporter=html", "codecov": "codecov", "precodecov": "npm run coverage", "lint": "eslint src test/*.js", "build": "rollup -c", "prepare": "npm run build", - "dev": "rollup -c -w", + "dev": "rollup -cw", "pretest": "npm run build", "posttest": "agadoo src/internal/index.js", - "prepublishOnly": "npm run lint && npm test", - "prettier": "prettier --write \"src/**/*.ts\"" + "prepublishOnly": "export PUBLISH=true && npm run lint && npm test" }, "repository": { "type": "git", @@ -58,28 +57,28 @@ "acorn": "^6.0.5", "acorn-dynamic-import": "^4.0.0", "agadoo": "^1.0.1", + "c8": "^3.4.0", "codecov": "^3.0.0", "css-tree": "1.0.0-alpha22", "eslint": "^5.3.0", - "eslint-plugin-html": "^4.0.3", + "eslint-plugin-html": "^5.0.0", "eslint-plugin-import": "^2.11.0", "estree-walker": "^0.6.0", "is-reference": "^1.1.1", - "jsdom": "^11.8.0", + "jsdom": "^13.2.0", "kleur": "^3.0.0", "locate-character": "^2.0.5", "magic-string": "^0.25.0", "mocha": "^5.2.0", "nightmare": "^3.0.1", "node-resolve": "^1.3.3", - "nyc": "^12.0.2", - "prettier": "^1.12.1", - "rollup": "^0.63.5", + "rollup": "^1.1.2", "rollup-plugin-commonjs": "^9.1.0", "rollup-plugin-json": "^3.0.0", - "rollup-plugin-node-resolve": "^3.3.0", + "rollup-plugin-node-resolve": "^4.0.0", "rollup-plugin-replace": "^2.0.0", - "rollup-plugin-typescript": "^0.8.1", + "rollup-plugin-sucrase": "^2.0.0", + "rollup-plugin-typescript": "^1.0.0", "rollup-plugin-virtual": "^1.0.1", "rollup-watch": "^4.3.1", "sade": "^1.4.0", @@ -88,7 +87,7 @@ "source-map": "0.6", "source-map-support": "^0.5.4", "tiny-glob": "^0.2.1", - "ts-node": "^7.0.0", + "ts-node": "^8.0.2", "tslib": "^1.8.0", "typescript": "^3.0.1" }, diff --git a/rollup.config.js b/rollup.config.js index 6f15775016..a67cbb2553 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,11 +1,41 @@ +import fs from 'fs'; import replace from 'rollup-plugin-replace'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import json from 'rollup-plugin-json'; +import sucrase from 'rollup-plugin-sucrase'; import typescript from 'rollup-plugin-typescript'; import pkg from './package.json'; +const is_publish = !!process.env.PUBLISH; + export default [ + /* internal.[m]js */ + { + input: `src/internal/index.js`, + output: [ + { + file: `internal.mjs`, + format: 'esm', + paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') + }, + { + file: `internal.js`, + format: 'cjs', + paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') + } + ], + external: id => id.startsWith('svelte/'), + plugins: [{ + generateBundle(options, bundle) { + const mod = bundle['internal.mjs']; + if (mod) { + fs.writeFileSync('src/compile/internal-exports.ts', `// This file is automatically generated\nexport default new Set(${JSON.stringify(mod.exports)});`); + } + } + }] + }, + /* compiler.js */ { input: 'src/index.ts', @@ -13,21 +43,32 @@ export default [ replace({ __VERSION__: pkg.version }), - resolve(), - commonjs(), + resolve({ + extensions: ['.js', '.ts'] + }), + commonjs({ + include: ['node_modules/**'] + }), json(), - typescript({ - include: 'src/**', - exclude: 'src/internal/**', - typescript: require('typescript') - }) + is_publish + ? typescript({ + include: 'src/**', + exclude: 'src/internal/**', + typescript: require('typescript') + }) + : sucrase({ + transforms: ['typescript'] + }) ], output: { file: 'compiler.js', - format: 'umd', + format: is_publish ? 'umd' : 'cjs', name: 'svelte', - sourcemap: true - } + sourcemap: true, + }, + external: is_publish + ? [] + : id => id === 'acorn' || id === 'magic-string' || id.startsWith('css-tree') }, /* cli/*.js */ @@ -48,27 +89,26 @@ export default [ typescript({ typescript: require('typescript') }) - ], - experimentalCodeSplitting: true + ] }, - /* internal.[m]js, motion.mjs */ - ...['internal', 'motion'].map(name => ({ - input: `src/${name}/index.js`, + /* motion.mjs */ + { + input: `src/motion/index.js`, output: [ { - file: `${name}.mjs`, + file: `motion.mjs`, format: 'esm', paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') }, { - file: `${name}.js`, + file: `motion.js`, format: 'cjs', paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') } ], external: id => id.startsWith('svelte/') - })), + }, // everything else ...['index', 'store', 'easing', 'transition'].map(name => ({ diff --git a/src/compile/Component.ts b/src/compile/Component.ts index a916078898..2bdb077815 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -10,7 +10,7 @@ import { createScopes, extractNames, Scope } from '../utils/annotateWithScopes'; import Stylesheet from './css/Stylesheet'; import { test } from '../config'; import Fragment from './nodes/Fragment'; -import * as internal from '../internal/index'; +import internal_exports from './internal-exports'; import { Node, Ast, CompileOptions } from '../interfaces'; import error from '../utils/error'; import getCodeFrame from '../utils/getCodeFrame'; @@ -212,8 +212,8 @@ export default class Component { // TODO use same regex for both result = result.replace(options.generate === 'ssr' ? /(@+|#+)(\w*(?:-\w*)?)/g : /(@+)(\w*(?:-\w*)?)/g, (match: string, sigil: string, name: string) => { if (sigil === '@') { - if (name in internal) { - if (options.dev && `${name}Dev` in internal) name = `${name}Dev`; + if (internal_exports.has(name)) { + if (options.dev && internal_exports.has(`${name}Dev`)) name = `${name}Dev`; helpers.add(name); } diff --git a/src/compile/render-dom/wrappers/shared/Wrapper.ts b/src/compile/render-dom/wrappers/shared/Wrapper.ts index 3ee2bbbb9f..70780dd0d2 100644 --- a/src/compile/render-dom/wrappers/shared/Wrapper.ts +++ b/src/compile/render-dom/wrappers/shared/Wrapper.ts @@ -42,12 +42,6 @@ export default class Wrapper { if (this.parent) this.parent.cannotUseInnerHTML(); } - // TODO do we still need equivalent method on Node? - findNearest(pattern) { - if (pattern.test(this.node.type)) return this; - return this.parent && this.parent.findNearest(pattern); - } - getOrCreateAnchor(block: Block, parentNode: string, parentNodes: string) { // TODO use this in EachBlock and IfBlock — tricky because // children need to be created first @@ -82,10 +76,6 @@ export default class Wrapper { ); } - render(block: Block, parentNode: string, parentNodes: string) { - throw new Error(`render method not implemented by subclass ${this.node.type}`); - } - remount(name: string) { return `${this.var}.m(${name}.$$.slotted.default, null);`; } diff --git a/src/internal/utils.js b/src/internal/utils.js index a46385190d..222e2669e6 100644 --- a/src/internal/utils.js +++ b/src/internal/utils.js @@ -7,11 +7,6 @@ export function assign(tar, src) { return tar; } -export function assignTrue(tar, src) { - for (var k in src) tar[k] = 1; - return tar; -} - export function isPromise(value) { return value && typeof value.then === 'function'; } @@ -22,12 +17,6 @@ export function addLoc(element, file, line, column, char) { }; } -export function exclude(src, prop) { - const tar = {}; - for (const k in src) k === prop || (tar[k] = src[k]); - return tar; -} - export function run(fn) { return fn(); } diff --git a/src/parse/index.ts b/src/parse/index.ts index 3ae97f2ccf..bc37229ef9 100644 --- a/src/parse/index.ts +++ b/src/parse/index.ts @@ -199,10 +199,6 @@ export class Parser { return this.template.slice(start); } - remaining() { - return this.template.slice(this.index); - } - requireWhitespace() { if (!whitespace.test(this.template[this.index])) { this.error({ diff --git a/src/utils/CodeBuilder.ts b/src/utils/CodeBuilder.ts index 79fb19d85d..e192377cab 100644 --- a/src/utils/CodeBuilder.ts +++ b/src/utils/CodeBuilder.ts @@ -41,18 +41,10 @@ export default class CodeBuilder { if (line && !whitespace.test(line)) this.current.children.push(this.last = { type: 'line', line }); } - addLineAtStart(line: string) { - if (line && !whitespace.test(line)) this.root.children.unshift({ type: 'line', line }); - } - addBlock(block: string) { if (block && !whitespace.test(block)) this.current.children.push(this.last = { type: 'line', line: block, block: true }); } - addBlockAtStart(block: string) { - if (block && !whitespace.test(block)) this.root.children.unshift({ type: 'line', line: block, block: true }); - } - isEmpty() { return !findLine(this.root); } pushCondition(condition: string) { diff --git a/src/utils/__test__.ts b/src/utils/__test__.ts index c1681dd8d6..9e7c9f9937 100644 --- a/src/utils/__test__.ts +++ b/src/utils/__test__.ts @@ -124,67 +124,4 @@ describe('CodeBuilder', () => { ` ); }); - - it('adds a line at start', () => { - const builder = new CodeBuilder(); - - builder.addLine('// second'); - builder.addLineAtStart('// first'); - - assert.equal( - builder.toString(), - deindent` - // first - // second - ` - ); - }); - - it('adds a line at start before a block', () => { - const builder = new CodeBuilder(); - - builder.addBlock('// second'); - builder.addLineAtStart('// first'); - - assert.equal( - builder.toString(), - deindent` - // first - - // second - ` - ); - }); - - it('adds a block at start', () => { - const builder = new CodeBuilder(); - - builder.addLine('// second'); - builder.addBlockAtStart('// first'); - - assert.equal( - builder.toString(), - deindent` - // first - - // second - ` - ); - }); - - it('adds a block at start before a block', () => { - const builder = new CodeBuilder(); - - builder.addBlock('// second'); - builder.addBlockAtStart('// first'); - - assert.equal( - builder.toString(), - deindent` - // first - - // second - ` - ); - }); }); diff --git a/src/utils/replaceAsync.ts b/src/utils/replaceAsync.ts index 362b76b41d..fe76cf2e6d 100644 --- a/src/utils/replaceAsync.ts +++ b/src/utils/replaceAsync.ts @@ -10,11 +10,11 @@ export default async function replaceAsync( replacements.push( func(...args).then( res => - { + ({ offset: args[args.length - 2], length: args[0].length, replacement: res, - } + }) ) ); return ''; diff --git a/test/custom-elements/index.js b/test/custom-elements/index.js index ad9e6004dc..e50434cc61 100644 --- a/test/custom-elements/index.js +++ b/test/custom-elements/index.js @@ -89,8 +89,8 @@ describe('custom-elements', function() { ] }) .then(bundle => bundle.generate({ format: 'iife', name: 'test' })) - .then(generated => { - bundle = generated.code; + .then(result => { + bundle = result.output[0].code; const nightmare = new Nightmare({ show: false }); diff --git a/test/runtime/index.js b/test/runtime/index.js index 8912e3dab0..98daf51c2a 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -248,7 +248,7 @@ describe("runtime", () => { }); return eval( - `(function () { ${result.code}; return App; }())` + `(function () { ${result.output[0].code}; return App; }())` ); } From cb0a95e87dcba01c3c88e4528202a26f6c8c44a9 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 26 Jan 2019 13:12:59 -0500 Subject: [PATCH 056/125] downgrade JSDOM --- package-lock.json | 44 ++++++++++---------------------------------- package.json | 2 +- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebd7de3ed7..178493db83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -995,7 +995,7 @@ "dependencies": { "domelementtype": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", "dev": true } @@ -2907,18 +2907,18 @@ "dev": true }, "jsdom": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-13.2.0.tgz", - "integrity": "sha512-cG1NtMWO9hWpqRNRR3dSvEQa8bFI6iLlqU2x4kwX51FQjp0qus8T9aBaAO6iGp3DeBrhdwuKxckknohkmfvsFw==", + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-12.2.0.tgz", + "integrity": "sha512-QPOggIJ8fquWPLaYYMoh+zqUmdphDtu1ju0QGTitZT1Yd8I5qenPpXM1etzUegu3MjVp8XPzgZxdn8Yj7e40ig==", "dev": true, "requires": { "abab": "^2.0.0", - "acorn": "^6.0.4", + "acorn": "^6.0.2", "acorn-globals": "^4.3.0", "array-equal": "^1.0.0", "cssom": "^0.3.4", "cssstyle": "^1.1.1", - "data-urls": "^1.1.0", + "data-urls": "^1.0.1", "domexception": "^1.0.1", "escodegen": "^1.11.0", "html-encoding-sniffer": "^1.0.2", @@ -2927,29 +2927,16 @@ "pn": "^1.1.0", "request": "^2.88.0", "request-promise-native": "^1.0.5", - "saxes": "^3.1.5", + "saxes": "^3.1.3", "symbol-tree": "^3.2.2", - "tough-cookie": "^2.5.0", + "tough-cookie": "^2.4.3", "w3c-hr-time": "^1.0.1", - "w3c-xmlserializer": "^1.0.1", "webidl-conversions": "^4.0.2", "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", + "whatwg-mimetype": "^2.2.0", "whatwg-url": "^7.0.0", - "ws": "^6.1.2", + "ws": "^6.1.0", "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - } } }, "jsesc": { @@ -6011,17 +5998,6 @@ "browser-process-hrtime": "^0.1.2" } }, - "w3c-xmlserializer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.0.1.tgz", - "integrity": "sha512-XZGI1OH/OLQr/NaJhhPmzhngwcAnZDLytsvXnRmlYeRkmbb0I7sqFFA22erq4WQR0sUu17ZSQOAV9mFwCqKRNg==", - "dev": true, - "requires": { - "domexception": "^1.0.1", - "webidl-conversions": "^4.0.2", - "xml-name-validator": "^3.0.0" - } - }, "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", diff --git a/package.json b/package.json index ae0780e816..164bf61208 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "eslint-plugin-import": "^2.11.0", "estree-walker": "^0.6.0", "is-reference": "^1.1.1", - "jsdom": "^13.2.0", + "jsdom": "^12.2.0", "kleur": "^3.0.0", "locate-character": "^2.0.5", "magic-string": "^0.25.0", From 2b1f753d72d77568c4a95381682629d795059d99 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 26 Jan 2019 16:55:28 -0500 Subject: [PATCH 057/125] site: tidy code highlighting --- site/src/routes/api/blog/_posts.js | 91 ++++++++++++++---------------- site/src/routes/guide/_sections.js | 32 ++--------- 2 files changed, 48 insertions(+), 75 deletions(-) diff --git a/site/src/routes/api/blog/_posts.js b/site/src/routes/api/blog/_posts.js index 5a9765dfd0..8b70483cd1 100644 --- a/site/src/routes/api/blog/_posts.js +++ b/site/src/routes/api/blog/_posts.js @@ -3,58 +3,53 @@ import path from 'path'; import process_markdown from '../../../utils/_process_markdown.js'; import marked from 'marked'; -// import hljs from 'highlight.js'; -import prismjs from 'prismjs'; // prism-highlighter – smaller footprint [hljs: 192.5k] -require('prismjs/components/prism-bash'); +import PrismJS from 'prismjs'; +import 'prismjs/components/prism-bash'; // map lang to prism-language-attr const prismLang = { - bash: 'bash', - html: 'markup', - js: 'javascript', - css: 'css', + bash: 'bash', + html: 'markup', + js: 'javascript', + css: 'css', }; export default function() { - return fs - .readdirSync('content/blog') - .map(file => { - if (path.extname(file) !== '.md') return; - - const markdown = fs.readFileSync(`content/blog/${file}`, 'utf-8'); - - const { content, metadata } = process_markdown(markdown); - - const date = new Date(`${metadata.pubdate} EDT`); // cheeky hack - metadata.dateString = date.toDateString(); - - const renderer = new marked.Renderer(); - - renderer.code = (source, lang) => { - let plang = prismLang[lang]; - const highlighted = Prism.highlight( - source, - Prism.languages[plang], - lang, - ); - - return `
    ${highlighted}
    `; - }; - - const html = marked( - content.replace(/^\t+/gm, match => match.split('\t').join(' ')), - { - renderer, - }, - ); - - return { - html, - metadata, - slug: file.replace(/^[\d-]+/, '').replace(/\.md$/, ''), - }; - }) - .sort((a, b) => { - return a.metadata.pubdate < b.metadata.pubdate ? 1 : -1; - }); + return fs + .readdirSync('content/blog') + .map(file => { + if (path.extname(file) !== '.md') return; + + const markdown = fs.readFileSync(`content/blog/${file}`, 'utf-8'); + + const { content, metadata } = process_markdown(markdown); + + const date = new Date(`${metadata.pubdate} EDT`); // cheeky hack + metadata.dateString = date.toDateString(); + + const renderer = new marked.Renderer(); + + renderer.code = (source, lang) => { + const plang = prismLang[lang]; + const highlighted = PrismJS.highlight( + source, + PrismJS.languages[plang], + lang, + ); + + return `
    ${highlighted}
    `; + }; + + const html = marked( + content.replace(/^\t+/gm, match => match.split('\t').join(' ')), + { renderer } + ); + + return { + html, + metadata, + slug: file.replace(/^[\d-]+/, '').replace(/\.md$/, ''), + }; + }) + .sort((a, b) => a.metadata.pubdate < b.metadata.pubdate ? 1 : -1); } diff --git a/site/src/routes/guide/_sections.js b/site/src/routes/guide/_sections.js index fd15fb4571..6b282115d3 100644 --- a/site/src/routes/guide/_sections.js +++ b/site/src/routes/guide/_sections.js @@ -4,13 +4,8 @@ import * as fleece from 'golden-fleece'; import process_markdown from '../../utils/_process_markdown.js'; import marked from 'marked'; -import Prism from 'prismjs'; // prism-highlighter – smaller footprint [hljs: 192.5k] -require('prismjs/components/prism-bash'); - -const langs = { - 'hidden-data': 'json', - 'html-no-repl': 'html', -}; +import PrismJS from 'prismjs'; +import 'prismjs/components/prism-bash'; // map lang to prism-language-attr const prismLang = { @@ -20,10 +15,6 @@ const prismLang = { css: 'css', }; -function btoa(str) { - return new Buffer(str).toString('base64'); -} - const escaped = { '"': '"', "'": ''', @@ -112,13 +103,6 @@ export default function() { let className = 'code-block'; if (lang === 'html' && !group) { - /* prettier-ignore - ----------------------------------------------- - edit vedam - don't know how to access components here - so i hardcoded icon here - ----------------------------------------------- - */ if (!meta || meta.repl !== false) { prefix = ``; } @@ -140,16 +124,10 @@ export default function() { if (meta && meta.hidden) return ''; - /* prettier-ignore - ----------------------------------------------- - design-edit vedam - insert prism-highlighter - ----------------------------------------------- - */ - let plang = prismLang[lang]; - const highlighted = Prism.highlight( + const plang = prismLang[lang]; + const highlighted = PrismJS.highlight( source, - Prism.languages[plang], + PrismJS.languages[plang], lang ); From c2e6d1bf0db20272a4ce53ffbf62c96e4e468ce3 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 26 Jan 2019 18:53:47 -0500 Subject: [PATCH 058/125] =?UTF-8?q?Better=20composition=20=E2=80=94=20impl?= =?UTF-8?q?ements=20https://github.com/sveltejs/rfcs/pull/12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.mjs | 2 + package.json | 2 +- src/compile/Component.ts | 4 +- src/compile/css/Stylesheet.ts | 4 +- src/compile/nodes/CatchBlock.ts | 2 +- src/compile/nodes/EachBlock.ts | 5 +- src/compile/nodes/Element.ts | 38 ++-- src/compile/nodes/InlineComponent.ts | 34 +++- src/compile/nodes/Let.ts | 38 ++++ src/compile/nodes/Slot.ts | 38 ++-- src/compile/nodes/ThenBlock.ts | 2 +- src/compile/nodes/shared/Expression.ts | 5 +- src/compile/nodes/shared/Node.ts | 4 - src/compile/nodes/shared/TemplateScope.ts | 23 ++- src/compile/render-dom/Block.ts | 14 +- src/compile/render-dom/Renderer.ts | 1 - src/compile/render-dom/index.ts | 24 ++- src/compile/render-dom/wrappers/AwaitBlock.ts | 1 - src/compile/render-dom/wrappers/EachBlock.ts | 38 ++-- .../render-dom/wrappers/Element/Binding.ts | 13 +- .../render-dom/wrappers/Element/index.ts | 63 ++++--- src/compile/render-dom/wrappers/Fragment.ts | 6 +- src/compile/render-dom/wrappers/IfBlock.ts | 20 +-- .../wrappers/InlineComponent/index.ts | 75 +++++--- src/compile/render-dom/wrappers/Slot.ts | 162 +++++++++--------- src/compile/render-dom/wrappers/Text.ts | 4 - src/compile/render-dom/wrappers/shared/Tag.ts | 4 - .../render-dom/wrappers/shared/Wrapper.ts | 4 - .../wrappers/shared/get_context_merger.ts | 10 ++ src/compile/render-ssr/handlers/AwaitBlock.ts | 2 +- src/compile/render-ssr/handlers/EachBlock.ts | 2 +- src/compile/render-ssr/handlers/Element.ts | 29 ++-- src/compile/render-ssr/handlers/HtmlTag.ts | 2 +- src/compile/render-ssr/handlers/IfBlock.ts | 2 +- .../render-ssr/handlers/InlineComponent.ts | 25 ++- src/compile/render-ssr/handlers/Slot.ts | 7 +- src/compile/render-ssr/handlers/Tag.ts | 2 +- .../handlers/shared/get_slot_scope.ts | 6 + src/compile/wrapModule.ts | 12 +- src/internal/Component.js | 24 +-- src/internal/await-block.js | 2 +- src/internal/keyed-each.js | 4 +- src/internal/lifecycle.js | 21 ++- src/internal/scheduler.js | 5 +- src/internal/ssr.js | 5 +- src/internal/utils.js | 16 +- src/parse/state/tag.ts | 26 +-- src/utils/createDebuggingComment.ts | 13 +- src/utils/get_slot_data.ts | 18 ++ .../render-ssr/utils.ts => utils/snip.ts} | 0 src/utils/stringify_attribute.ts | 16 ++ .../action-custom-event-handler/expected.js | 2 +- test/js/samples/action/expected.js | 2 +- test/js/samples/bind-width-height/expected.js | 2 +- .../expected.js | 2 +- .../component-static-array/expected.js | 2 +- .../component-static-immutable/expected.js | 2 +- .../component-static-immutable2/expected.js | 2 +- test/js/samples/component-static/expected.js | 2 +- .../samples/computed-collapsed-if/expected.js | 2 +- test/js/samples/css-media-query/expected.js | 2 +- .../css-shadow-dom-keyframes/expected.js | 2 +- test/js/samples/debug-empty/expected.js | 2 +- .../debug-foo-bar-baz-things/expected.js | 8 +- test/js/samples/debug-foo/expected.js | 8 +- .../samples/deconflict-builtins/expected.js | 8 +- .../js/samples/deconflict-globals/expected.js | 2 +- .../expected.js | 2 +- test/js/samples/do-use-dataset/expected.js | 2 +- .../dont-use-dataset-in-legacy/expected.js | 2 +- .../dont-use-dataset-in-svg/expected.js | 2 +- test/js/samples/dynamic-import/expected.js | 2 +- .../each-block-changed-check/expected.js | 8 +- .../each-block-keyed-animated/expected.js | 8 +- test/js/samples/each-block-keyed/expected.js | 8 +- .../event-handler-no-passive/expected.js | 2 +- test/js/samples/event-modifiers/expected.js | 2 +- .../js/samples/head-no-whitespace/expected.js | 2 +- test/js/samples/hoisted-const/expected.js | 2 +- test/js/samples/hoisted-let/expected.js | 2 +- .../js/samples/if-block-no-update/expected.js | 10 +- test/js/samples/if-block-simple/expected.js | 8 +- .../expected.js | 2 +- .../inline-style-optimized-url/expected.js | 2 +- .../inline-style-optimized/expected.js | 2 +- .../inline-style-unoptimized/expected.js | 2 +- test/js/samples/input-files/expected.js | 2 +- test/js/samples/input-range/expected.js | 2 +- .../input-without-blowback-guard/expected.js | 2 +- .../expected.js | 2 +- .../expected.js | 2 +- .../expected.js | 2 +- .../expected.js | 2 +- test/js/samples/legacy-input-type/expected.js | 2 +- test/js/samples/media-bindings/expected.js | 2 +- .../non-imported-component/expected.js | 2 +- .../samples/non-mutable-reference/expected.js | 2 +- .../samples/select-dynamic-value/expected.js | 2 +- test/js/samples/setup-method/expected.js | 2 +- test/js/samples/svg-title/expected.js | 2 +- test/js/samples/title/expected.js | 2 +- .../use-elements-as-anchors/expected.js | 32 ++-- .../samples/window-binding-scroll/expected.js | 2 +- .../binding-select-in-yield/_config.js | 4 +- .../component-binding-blowback-c/_config.js | 2 +- .../component-slot-let-aliased/Nested.html | 5 + .../component-slot-let-aliased/_config.js | 24 +++ .../component-slot-let-aliased/main.html | 9 + .../samples/component-slot-let-b/Nested.html | 6 + .../samples/component-slot-let-b/_config.js | 18 ++ .../samples/component-slot-let-b/main.html | 7 + .../samples/component-slot-let-c/Nested.html | 6 + .../samples/component-slot-let-c/_config.js | 18 ++ .../samples/component-slot-let-c/main.html | 7 + .../Nested.html | 5 + .../_config.js | 34 ++++ .../component-slot-let-destructured/main.html | 9 + .../component-slot-let-named/Nested.html | 5 + .../component-slot-let-named/_config.js | 24 +++ .../component-slot-let-named/main.html | 11 ++ .../samples/component-slot-let/Nested.html | 5 + .../samples/component-slot-let/_config.js | 24 +++ .../samples/component-slot-let/main.html | 9 + test/runtime/samples/context-api/Tab.html | 17 ++ test/runtime/samples/context-api/TabList.html | 3 + .../runtime/samples/context-api/TabPanel.html | 16 ++ test/runtime/samples/context-api/Tabs.html | 52 ++++++ test/runtime/samples/context-api/_config.js | 73 ++++++++ test/runtime/samples/context-api/main.html | 30 ++++ .../component-slot-each-block/errors.json | 15 -- .../component-slot-each-block/input.html | 3 - 131 files changed, 1059 insertions(+), 445 deletions(-) create mode 100644 src/compile/nodes/Let.ts create mode 100644 src/compile/render-dom/wrappers/shared/get_context_merger.ts create mode 100644 src/compile/render-ssr/handlers/shared/get_slot_scope.ts create mode 100644 src/utils/get_slot_data.ts rename src/{compile/render-ssr/utils.ts => utils/snip.ts} (100%) create mode 100644 src/utils/stringify_attribute.ts create mode 100644 test/runtime/samples/component-slot-let-aliased/Nested.html create mode 100644 test/runtime/samples/component-slot-let-aliased/_config.js create mode 100644 test/runtime/samples/component-slot-let-aliased/main.html create mode 100644 test/runtime/samples/component-slot-let-b/Nested.html create mode 100644 test/runtime/samples/component-slot-let-b/_config.js create mode 100644 test/runtime/samples/component-slot-let-b/main.html create mode 100644 test/runtime/samples/component-slot-let-c/Nested.html create mode 100644 test/runtime/samples/component-slot-let-c/_config.js create mode 100644 test/runtime/samples/component-slot-let-c/main.html create mode 100644 test/runtime/samples/component-slot-let-destructured/Nested.html create mode 100644 test/runtime/samples/component-slot-let-destructured/_config.js create mode 100644 test/runtime/samples/component-slot-let-destructured/main.html create mode 100644 test/runtime/samples/component-slot-let-named/Nested.html create mode 100644 test/runtime/samples/component-slot-let-named/_config.js create mode 100644 test/runtime/samples/component-slot-let-named/main.html create mode 100644 test/runtime/samples/component-slot-let/Nested.html create mode 100644 test/runtime/samples/component-slot-let/_config.js create mode 100644 test/runtime/samples/component-slot-let/main.html create mode 100644 test/runtime/samples/context-api/Tab.html create mode 100644 test/runtime/samples/context-api/TabList.html create mode 100644 test/runtime/samples/context-api/TabPanel.html create mode 100644 test/runtime/samples/context-api/Tabs.html create mode 100644 test/runtime/samples/context-api/_config.js create mode 100644 test/runtime/samples/context-api/main.html delete mode 100644 test/validator/samples/component-slot-each-block/errors.json delete mode 100644 test/validator/samples/component-slot-each-block/input.html diff --git a/index.mjs b/index.mjs index 1ba5890537..768b53f626 100644 --- a/index.mjs +++ b/index.mjs @@ -3,6 +3,8 @@ export { onDestroy, beforeUpdate, afterUpdate, + setContext, + getContext, nextTick, createEventDispatcher } from './internal'; diff --git a/package.json b/package.json index 164bf61208..b1307936c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha18", + "version": "3.0.0-alpha19", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index.js", diff --git a/src/compile/Component.ts b/src/compile/Component.ts index a0386570e3..c7ca6b7feb 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -156,7 +156,7 @@ export default class Component { this.tag = options.customElement ? options.customElement === true ? this.meta.tag - : options.customElement + : options.customElement as string : this.name; this.walk_module_js(); @@ -553,7 +553,7 @@ export default class Component { walk_instance_js_post_template() { const script = this.instance_script; if (!script) return; - + this.hoist_instance_declarations(); this.extract_reactive_declarations(); this.extract_reactive_store_references(); diff --git a/src/compile/css/Stylesheet.ts b/src/compile/css/Stylesheet.ts index 2a22782a5a..2cfb960862 100644 --- a/src/compile/css/Stylesheet.ts +++ b/src/compile/css/Stylesheet.ts @@ -316,7 +316,7 @@ export default class Stylesheet { leave: (node: Node) => { if (node.type === 'Rule' || node.type === 'Atrule') stack.pop(); - if (node.type === 'Atrule') currentAtrule = stack[stack.length - 1]; + if (node.type === 'Atrule') currentAtrule = stack[stack.length - 1] as Atrule; } }); } else { @@ -330,7 +330,7 @@ export default class Stylesheet { const stack: Element[] = []; let parent: Node = node; while (parent = parent.parent) { - if (parent.type === 'Element') stack.unshift(parent); + if (parent.type === 'Element') stack.unshift(parent as Element); } for (let i = 0; i < this.children.length; i += 1) { diff --git a/src/compile/nodes/CatchBlock.ts b/src/compile/nodes/CatchBlock.ts index 6486f4a3a8..db202b9517 100644 --- a/src/compile/nodes/CatchBlock.ts +++ b/src/compile/nodes/CatchBlock.ts @@ -12,7 +12,7 @@ export default class CatchBlock extends Node { super(component, parent, scope, info); this.scope = scope.child(); - this.scope.add(parent.error, parent.expression.dependencies); + this.scope.add(parent.error, parent.expression.dependencies, this); this.children = mapChildren(component, parent, this.scope, info.children); this.warnIfEmptyBlock(); diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts index 6770ab8739..5ea1d5e033 100644 --- a/src/compile/nodes/EachBlock.ts +++ b/src/compile/nodes/EachBlock.ts @@ -20,6 +20,7 @@ export default class EachBlock extends Node { scope: TemplateScope; contexts: Array<{ name: string, tail: string }>; hasAnimation: boolean; + has_binding = false; children: Node[]; else?: ElseBlock; @@ -38,7 +39,7 @@ export default class EachBlock extends Node { unpackDestructuring(this.contexts, info.context, ''); this.contexts.forEach(context => { - this.scope.add(context.key.name, this.expression.dependencies); + this.scope.add(context.key.name, this.expression.dependencies, this); }); this.key = info.key @@ -48,7 +49,7 @@ export default class EachBlock extends Node { if (this.index) { // index can only change if this is a keyed each block const dependencies = this.key ? this.expression.dependencies : []; - this.scope.add(this.index, dependencies); + this.scope.add(this.index, dependencies, this); } this.hasAnimation = false; diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts index af2f8ec919..362dbb784f 100644 --- a/src/compile/nodes/Element.ts +++ b/src/compile/nodes/Element.ts @@ -1,5 +1,4 @@ import isVoidElementName from '../../utils/isVoidElementName'; -import { quotePropIfNecessary } from '../../utils/quoteIfNecessary'; import Node from './shared/Node'; import Attribute from './Attribute'; import Binding from './Binding'; @@ -14,6 +13,8 @@ import mapChildren from './shared/mapChildren'; import { dimensions } from '../../utils/patterns'; import fuzzymatch from '../../utils/fuzzymatch'; import list from '../../utils/list'; +import Let from './Let'; +import TemplateScope from './shared/TemplateScope'; const svg = /^(?:altGlyph|altGlyphDef|altGlyphItem|animate|animateColor|animateMotion|animateTransform|circle|clipPath|color-profile|cursor|defs|desc|discard|ellipse|feBlend|feColorMatrix|feComponentTransfer|feComposite|feConvolveMatrix|feDiffuseLighting|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMerge|feMergeNode|feMorphology|feOffset|fePointLight|feSpecularLighting|feSpotLight|feTile|feTurbulence|filter|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|foreignObject|g|glyph|glyphRef|hatch|hatchpath|hkern|image|line|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|metadata|missing-glyph|mpath|path|pattern|polygon|polyline|radialGradient|rect|set|solidcolor|stop|switch|symbol|text|textPath|tref|tspan|unknown|use|view|vkern)$/; @@ -75,12 +76,13 @@ const passiveEvents = new Set([ export default class Element extends Node { type: 'Element'; name: string; - scope: any; // TODO + scope: TemplateScope; attributes: Attribute[] = []; actions: Action[] = []; bindings: Binding[] = []; classes: Class[] = []; handlers: EventHandler[] = []; + lets: Let[] = []; intro?: Transition = null; outro?: Transition = null; animation?: Animation = null; @@ -168,6 +170,10 @@ export default class Element extends Node { this.handlers.push(new EventHandler(component, this, scope, node)); break; + case 'Let': + this.lets.push(new Let(component, this, scope, node)); + break; + case 'Transition': const transition = new Transition(component, this, scope, node); if (node.intro) this.intro = transition; @@ -183,7 +189,21 @@ export default class Element extends Node { } }); - this.children = mapChildren(component, this, scope, info.children); + if (this.lets.length > 0) { + this.scope = scope.child(); + + this.lets.forEach(l => { + const dependencies = new Set([l.name]); + + l.names.forEach(name => { + this.scope.add(name, dependencies); + }); + }); + } else { + this.scope = scope; + } + + this.children = mapChildren(component, this, this.scope, info.children); this.validate(); @@ -637,21 +657,11 @@ export default class Element extends Node { return this.name === 'audio' || this.name === 'video'; } - remount(name: string) { - const slot = this.attributes.find(attribute => attribute.name === 'slot'); - if (slot) { - const prop = quotePropIfNecessary(slot.chunks[0].data); - return `@append(${name}.$$.slotted${prop}, ${this.var});`; - } - - return `@append(${name}.$$.slotted.default, ${this.var});`; - } - addCssClass(className = this.component.stylesheet.id) { const classAttribute = this.attributes.find(a => a.name === 'class'); if (classAttribute && !classAttribute.isTrue) { if (classAttribute.chunks.length === 1 && classAttribute.chunks[0].type === 'Text') { - (classAttribute.chunks[0]).data += ` ${className}`; + (classAttribute.chunks[0] as Text).data += ` ${className}`; } else { (classAttribute.chunks).push( new Text(this.component, this, this.scope, { diff --git a/src/compile/nodes/InlineComponent.ts b/src/compile/nodes/InlineComponent.ts index 1aa07bdfc2..4d3b7332a6 100644 --- a/src/compile/nodes/InlineComponent.ts +++ b/src/compile/nodes/InlineComponent.ts @@ -5,15 +5,19 @@ import Binding from './Binding'; import EventHandler from './EventHandler'; import Expression from './shared/Expression'; import Component from '../Component'; +import Let from './Let'; +import TemplateScope from './shared/TemplateScope'; export default class InlineComponent extends Node { type: 'InlineComponent'; name: string; expression: Expression; - attributes: Attribute[]; - bindings: Binding[]; - handlers: EventHandler[]; + attributes: Attribute[] = []; + bindings: Binding[] = []; + handlers: EventHandler[] = []; + lets: Let[] = []; children: Node[]; + scope: TemplateScope; constructor(component: Component, parent, scope, info) { super(component, parent, scope, info); @@ -29,10 +33,6 @@ export default class InlineComponent extends Node { ? new Expression(component, this, scope, info.expression) : null; - this.attributes = []; - this.bindings = []; - this.handlers = []; - info.attributes.forEach(node => { switch (node.type) { case 'Action': @@ -60,6 +60,10 @@ export default class InlineComponent extends Node { this.handlers.push(new EventHandler(component, this, scope, node)); break; + case 'Let': + this.lets.push(new Let(component, this, scope, node)); + break; + case 'Transition': component.error(node, { code: `invalid-transition`, @@ -71,6 +75,20 @@ export default class InlineComponent extends Node { } }); - this.children = mapChildren(component, this, scope, info.children); + if (this.lets.length > 0) { + this.scope = scope.child(); + + this.lets.forEach(l => { + const dependencies = new Set([l.name]); + + l.names.forEach(name => { + this.scope.add(name, dependencies, this); + }); + }); + } else { + this.scope = scope; + } + + this.children = mapChildren(component, this, this.scope, info.children); } } diff --git a/src/compile/nodes/Let.ts b/src/compile/nodes/Let.ts new file mode 100644 index 0000000000..d855068c16 --- /dev/null +++ b/src/compile/nodes/Let.ts @@ -0,0 +1,38 @@ +import Node from './shared/Node'; +import Component from '../Component'; +import { walk } from 'estree-walker'; + +const applicable = new Set(['Identifier', 'ObjectExpression', 'ArrayExpression', 'Property']); + +export default class Let extends Node { + type: 'Let'; + name: string; + value: string; + names: string[] = []; + + constructor(component: Component, parent, scope, info) { + super(component, parent, scope, info); + + this.name = info.name; + this.value = info.expression && `[✂${info.expression.start}-${info.expression.end}✂]`; + + if (info.expression) { + walk(info.expression, { + enter: node => { + if (!applicable.has(node.type)) { + component.error(node, { + code: 'invalid-let', + message: `let directive value must be an identifier or an object/array pattern` + }); + } + + if (node.type === 'Identifier') { + this.names.push(node.name); + } + } + }); + } else { + this.names.push(this.name); + } + } +} \ No newline at end of file diff --git a/src/compile/nodes/Slot.ts b/src/compile/nodes/Slot.ts index 028f42852b..d66ec8c6c0 100644 --- a/src/compile/nodes/Slot.ts +++ b/src/compile/nodes/Slot.ts @@ -19,26 +19,28 @@ export default class Slot extends Element { }); } - if (attr.name !== 'name') { - component.error(attr, { - code: `invalid-slot-attribute`, - message: `"name" is the only attribute permitted on elements` - }); - } + // if (attr.name !== 'name') { + // component.error(attr, { + // code: `invalid-slot-attribute`, + // message: `"name" is the only attribute permitted on elements` + // }); + // } - if (attr.value.length !== 1 || attr.value[0].type !== 'Text') { - component.error(attr, { - code: `dynamic-slot-name`, - message: ` name cannot be dynamic` - }); - } + if (attr.name === 'name') { + if (attr.value.length !== 1 || attr.value[0].type !== 'Text') { + component.error(attr, { + code: `dynamic-slot-name`, + message: ` name cannot be dynamic` + }); + } - const slotName = attr.value[0].data; - if (slotName === 'default') { - component.error(attr, { - code: `invalid-slot-name`, - message: `default is a reserved word — it cannot be used as a slot name` - }); + const slotName = attr.value[0].data; + if (slotName === 'default') { + component.error(attr, { + code: `invalid-slot-name`, + message: `default is a reserved word — it cannot be used as a slot name` + }); + } } // TODO should duplicate slots be disallowed? Feels like it's more likely to be a diff --git a/src/compile/nodes/ThenBlock.ts b/src/compile/nodes/ThenBlock.ts index 9921eb77c7..6df8259273 100644 --- a/src/compile/nodes/ThenBlock.ts +++ b/src/compile/nodes/ThenBlock.ts @@ -12,7 +12,7 @@ export default class ThenBlock extends Node { super(component, parent, scope, info); this.scope = scope.child(); - this.scope.add(parent.value, parent.expression.dependencies); + this.scope.add(parent.value, parent.expression.dependencies, this); this.children = mapChildren(component, parent, this.scope, info.children); this.warnIfEmptyBlock(); diff --git a/src/compile/nodes/shared/Expression.ts b/src/compile/nodes/shared/Expression.ts index 852065d98d..9ec0c92e84 100644 --- a/src/compile/nodes/shared/Expression.ts +++ b/src/compile/nodes/shared/Expression.ts @@ -113,7 +113,10 @@ export default class Expression { // function, and it only applies if the dependency is writable // or a sub-path of a non-writable if (component.instance_script) { - if (component.writable_declarations.has(name) || name[0] === '$' || (component.userVars.has(name) && deep)) { + const owner = template_scope.getOwner(name); + const is_let = owner && (owner.type === 'InlineComponent' || owner.type === 'Element'); + + if (is_let || component.writable_declarations.has(name) || name[0] === '$' || (component.userVars.has(name) && deep)) { dynamic_dependencies.add(name); } } else { diff --git a/src/compile/nodes/shared/Node.ts b/src/compile/nodes/shared/Node.ts index 893d4e25a5..5d8435965c 100644 --- a/src/compile/nodes/shared/Node.ts +++ b/src/compile/nodes/shared/Node.ts @@ -48,10 +48,6 @@ export default class Node { if (this.parent) return this.parent.findNearest(selector); } - remount(name: string) { - return `${this.var}.m(${name}.$$.slotted.default, null);`; - } - warnIfEmptyBlock() { if (!this.component.options.dev) return; if (!/Block$/.test(this.type) || !this.children) return; diff --git a/src/compile/nodes/shared/TemplateScope.ts b/src/compile/nodes/shared/TemplateScope.ts index 8d31e848e6..df48cc57f9 100644 --- a/src/compile/nodes/shared/TemplateScope.ts +++ b/src/compile/nodes/shared/TemplateScope.ts @@ -1,19 +1,28 @@ +import Node from './Node'; +import EachBlock from '../EachBlock'; +import ThenBlock from '../ThenBlock'; +import CatchBlock from '../CatchBlock'; +import InlineComponent from '../InlineComponent'; + +type NodeWithScope = EachBlock | ThenBlock | CatchBlock | InlineComponent | Element; + export default class TemplateScope { names: Set; dependenciesForName: Map>; - mutables: Set; + mutables: Set = new Set(); + owners: Map = new Map(); parent?: TemplateScope; constructor(parent?: TemplateScope) { this.parent = parent; this.names = new Set(parent ? parent.names : []); this.dependenciesForName = new Map(parent ? parent.dependenciesForName : []); - this.mutables = new Set(); } - add(name, dependencies: Set) { + add(name, dependencies: Set, owner) { this.names.add(name); this.dependenciesForName.set(name, dependencies); + this.owners.set(name, owner); return this; } @@ -32,6 +41,10 @@ export default class TemplateScope { containsMutable(names: Iterable) { for (const name of names) { + const owner = this.getOwner(name); + const is_let = owner && (owner.type === 'InlineComponent' || owner.type === 'Element'); + if (is_let) return true; + if (name[0] === '$') return true; if (this.mutables.has(name)) return true; else if (this.dependenciesForName.has(name) && this.containsMutable(this.dependenciesForName.get(name))) return true; @@ -44,4 +57,8 @@ export default class TemplateScope { isTopLevel(name: string) { return !this.parent || !this.names.has(name) && this.parent.isTopLevel(name); } + + getOwner(name: string): NodeWithScope { + return this.owners.get(name) || (this.parent && this.parent.getOwner(name)); + } } \ No newline at end of file diff --git a/src/compile/render-dom/Block.ts b/src/compile/render-dom/Block.ts index 6d23fe9acb..bf4823f863 100644 --- a/src/compile/render-dom/Block.ts +++ b/src/compile/render-dom/Block.ts @@ -1,9 +1,10 @@ import CodeBuilder from '../../utils/CodeBuilder'; import deindent from '../../utils/deindent'; -import { escape } from '../../utils/stringify'; import Renderer from './Renderer'; import Wrapper from './wrappers/shared/Wrapper'; import EachBlockWrapper from './wrappers/EachBlock'; +import InlineComponentWrapper from './wrappers/InlineComponent'; +import ElementWrapper from './wrappers/Element'; export interface BlockOptions { parent?: Block; @@ -12,7 +13,6 @@ export interface BlockOptions { comment?: string; key?: string; bindings?: Map { object: string, property: string, snippet: string }>; - contextOwners?: Map; dependencies?: Set; } @@ -30,7 +30,6 @@ export default class Block { dependencies: Set; bindings: Map; - contextOwners: Map; builders: { init: CodeBuilder; @@ -61,7 +60,7 @@ export default class Block { variables: Map; getUniqueName: (name: string) => string; - hasUpdateMethod: boolean; + hasUpdateMethod = false; autofocus: string; constructor(options: BlockOptions) { @@ -79,7 +78,6 @@ export default class Block { this.dependencies = new Set(); this.bindings = options.bindings; - this.contextOwners = options.contextOwners; this.builders = { init: new CodeBuilder(), @@ -106,8 +104,6 @@ export default class Block { this.aliases = new Map().set('ctx', this.getUniqueName('ctx')); if (this.key) this.aliases.set('key', this.getUniqueName('key')); - - this.hasUpdateMethod = false; // determined later } assignVariableNames() { @@ -151,6 +147,8 @@ export default class Block { dependencies.forEach(dependency => { this.dependencies.add(dependency); }); + + this.hasUpdateMethod = true; } addElement( @@ -407,7 +405,7 @@ export default class Block { return deindent` ${this.comment && `// ${this.comment}`} - function ${this.name}($$, ${this.key ? `${localKey}, ` : ''}ctx) { + function ${this.name}(${this.key ? `${localKey}, ` : ''}ctx) { ${this.getContents(localKey)} } `; diff --git a/src/compile/render-dom/Renderer.ts b/src/compile/render-dom/Renderer.ts index 28a8a90dfb..d2bbcb3f53 100644 --- a/src/compile/render-dom/Renderer.ts +++ b/src/compile/render-dom/Renderer.ts @@ -44,7 +44,6 @@ export default class Renderer { key: null, bindings: new Map(), - contextOwners: new Map(), dependencies: new Set(), }); diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts index fc35e4f317..c7d79fb5d2 100644 --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -10,6 +10,7 @@ import addToSet from '../../utils/addToSet'; import getObject from '../../utils/getObject'; import { extractNames } from '../../utils/annotateWithScopes'; import { nodes_match } from '../../utils/nodes_match'; +import sanitize from '../../utils/sanitize'; export default function dom( component: Component, @@ -71,7 +72,7 @@ export default function dom( const props = component.props.filter(x => component.writable_declarations.has(x.name)); - const set = component.meta.props || props.length > 0 + const set = (component.meta.props || props.length > 0 || renderer.slots.size > 0) ? deindent` $$props => { ${component.meta.props && deindent` @@ -81,6 +82,8 @@ export default function dom( `} ${props.map(prop => `if ('${prop.as}' in $$props) $$invalidate('${prop.name}', ${prop.name} = $$props.${prop.as});`)} + ${renderer.slots.size > 0 && + `if ('$$scope' in $$props) $$invalidate('$$scope', $$scope = $$props.$$scope);`} } ` : null; @@ -235,10 +238,12 @@ export default function dom( } const args = ['$$self']; - if (component.props.length > 0 || component.has_reactive_assignments) args.push('$$props', '$$invalidate'); + if (component.props.length > 0 || component.has_reactive_assignments || renderer.slots.size > 0) { + args.push('$$props', '$$invalidate'); + } builder.addBlock(deindent` - function create_fragment($$, ctx) { + function create_fragment(ctx) { ${block.getContents()} } @@ -264,6 +269,15 @@ export default function dom( const reactive_stores = Array.from(component.template_references).filter(n => n[0] === '$'); filtered_declarations.push(...reactive_stores); + if (renderer.slots.size > 0) { + const arr = Array.from(renderer.slots); + filtered_declarations.push(...arr.map(name => `$$slot_${sanitize(name)}`), '$$scope'); + } + + if (renderer.bindingGroups.length > 0) { + filtered_declarations.push(`$$binding_groups`); + } + const has_definition = ( component.javascript || filtered_props.length > 0 || @@ -301,6 +315,10 @@ export default function dom( function ${definition}(${args.join(', ')}) { ${user_code} + ${renderer.slots.size && `let { ${[...renderer.slots].map(name => `$$slot_${sanitize(name)}`).join(', ')}, $$scope } = $$props;`} + + ${renderer.bindingGroups.length > 0 && `const $$binding_groups = [${renderer.bindingGroups.map(_ => `[]`).join(', ')}];`} + ${component.partly_hoisted.length > 0 && component.partly_hoisted.join('\n\n')} ${reactive_store_subscriptions} diff --git a/src/compile/render-dom/wrappers/AwaitBlock.ts b/src/compile/render-dom/wrappers/AwaitBlock.ts index c8ce02ab20..a5926fa8d7 100644 --- a/src/compile/render-dom/wrappers/AwaitBlock.ts +++ b/src/compile/render-dom/wrappers/AwaitBlock.ts @@ -135,7 +135,6 @@ export default class AwaitBlockWrapper extends Wrapper { block.maintainContext = true; const infoProps = [ - '$$', 'ctx', 'current: null', this.pending.block.name && `pending: ${this.pending.block.name}`, diff --git a/src/compile/render-dom/wrappers/EachBlock.ts b/src/compile/render-dom/wrappers/EachBlock.ts index c713ea5f19..39f3407020 100644 --- a/src/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compile/render-dom/wrappers/EachBlock.ts @@ -41,10 +41,6 @@ class ElseBlockWrapper extends Wrapper { ); this.isDynamic = this.block.dependencies.size > 0; - if (this.isDynamic) { - // TODO this can't be right - this.block.hasUpdateMethod = true; - } } } @@ -66,7 +62,6 @@ export default class EachBlockWrapper extends Wrapper { indexName: string; var = 'each'; - hasBinding = false; constructor( renderer: Renderer, @@ -85,10 +80,9 @@ export default class EachBlockWrapper extends Wrapper { this.block = block.child({ comment: createDebuggingComment(this.node, this.renderer.component), name: renderer.component.getUniqueName('create_each_block'), - key: node.key, // TODO... + key: node.key as string, - bindings: new Map(block.bindings), - contextOwners: new Map(block.contextOwners) + bindings: new Map(block.bindings) }); // TODO this seems messy @@ -114,8 +108,6 @@ export default class EachBlockWrapper extends Wrapper { }; node.contexts.forEach(prop => { - this.block.contextOwners.set(prop.key.name, this); - this.block.bindings.set(prop.key.name, { object: this.vars.each_block_value, property: this.indexName, @@ -149,7 +141,6 @@ export default class EachBlockWrapper extends Wrapper { } block.addDependencies(this.block.dependencies); - this.block.hasUpdateMethod = this.block.dependencies.size > 0; // TODO should this logic be in Block? if (this.block.hasOutros || (this.else && this.else.block.hasOutros)) { block.addOutro(); @@ -172,8 +163,8 @@ export default class EachBlockWrapper extends Wrapper { this.contextProps = this.node.contexts.map(prop => `child_ctx.${prop.key.name} = list[i]${prop.tail};`); - if (this.hasBinding) this.contextProps.push(`child_ctx.${this.vars.each_block_value} = list;`); - if (this.hasBinding || this.node.index) this.contextProps.push(`child_ctx.${this.indexName} = i;`); + if (this.node.has_binding) this.contextProps.push(`child_ctx.${this.vars.each_block_value} = list;`); + if (this.node.has_binding || this.node.index) this.contextProps.push(`child_ctx.${this.indexName} = i;`); const snippet = this.node.expression.render(block); @@ -216,7 +207,7 @@ export default class EachBlockWrapper extends Wrapper { // TODO neaten this up... will end up with an empty line in the block block.builders.init.addBlock(deindent` if (!${this.vars.each_block_value}.${this.vars.length}) { - ${each_block_else} = ${this.else.block.name}($$, ctx); + ${each_block_else} = ${this.else.block.name}(ctx); ${each_block_else}.c(); } `); @@ -234,7 +225,7 @@ export default class EachBlockWrapper extends Wrapper { if (!${this.vars.each_block_value}.${this.vars.length} && ${each_block_else}) { ${each_block_else}.p(changed, ctx); } else if (!${this.vars.each_block_value}.${this.vars.length}) { - ${each_block_else} = ${this.else.block.name}($$, ctx); + ${each_block_else} = ${this.else.block.name}(ctx); ${each_block_else}.c(); ${each_block_else}.m(${initialMountNode}, ${this.vars.anchor}); } else if (${each_block_else}) { @@ -250,7 +241,7 @@ export default class EachBlockWrapper extends Wrapper { ${each_block_else} = null; } } else if (!${each_block_else}) { - ${each_block_else} = ${this.else.block.name}($$, ctx); + ${each_block_else} = ${this.else.block.name}(ctx); ${each_block_else}.c(); ${each_block_else}.m(${initialMountNode}, ${this.vars.anchor}); } @@ -306,7 +297,7 @@ export default class EachBlockWrapper extends Wrapper { for (var #i = 0; #i < ${this.vars.each_block_value}.${length}; #i += 1) { let child_ctx = ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i); let key = ${get_key}(child_ctx); - ${iterations}[#i] = ${lookup}[key] = ${create_each_block}($$, key, child_ctx); + ${iterations}[#i] = ${lookup}[key] = ${create_each_block}(key, child_ctx); } `); @@ -342,7 +333,7 @@ export default class EachBlockWrapper extends Wrapper { ${this.block.hasOutros && `@group_outros();`} ${this.node.hasAnimation && `for (let #i = 0; #i < ${iterations}.length; #i += 1) ${iterations}[#i].r();`} - ${iterations} = @updateKeyedEach(${iterations}, $$, changed, ${get_key}, ${dynamic ? '1' : '0'}, ctx, ${this.vars.each_block_value}, ${lookup}, ${updateMountNode}, ${destroy}, ${create_each_block}, ${anchor}, ${this.vars.get_each_context}); + ${iterations} = @updateKeyedEach(${iterations}, changed, ${get_key}, ${dynamic ? '1' : '0'}, ctx, ${this.vars.each_block_value}, ${lookup}, ${updateMountNode}, ${destroy}, ${create_each_block}, ${anchor}, ${this.vars.get_each_context}); ${this.node.hasAnimation && `for (let #i = 0; #i < ${iterations}.length; #i += 1) ${iterations}[#i].a();`} ${this.block.hasOutros && `@check_outros();`} `); @@ -375,7 +366,7 @@ export default class EachBlockWrapper extends Wrapper { var ${iterations} = []; for (var #i = 0; #i < ${this.vars.each_block_value}.${length}; #i += 1) { - ${iterations}[#i] = ${create_each_block}($$, ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i)); + ${iterations}[#i] = ${create_each_block}(${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i)); } `); @@ -439,14 +430,14 @@ export default class EachBlockWrapper extends Wrapper { if (${iterations}[#i]) { ${iterations}[#i].p(changed, child_ctx); } else { - ${iterations}[#i] = ${create_each_block}($$, child_ctx); + ${iterations}[#i] = ${create_each_block}(child_ctx); ${iterations}[#i].c(); ${iterations}[#i].m(${updateMountNode}, ${anchor}); } ${has_transitions && `${iterations}[#i].i();`} ` : deindent` - ${iterations}[#i] = ${create_each_block}($$, child_ctx); + ${iterations}[#i] = ${create_each_block}(child_ctx); ${iterations}[#i].c(); ${iterations}[#i].m(${updateMountNode}, ${anchor}); ${has_transitions && `${iterations}[#i].i();`} @@ -499,9 +490,4 @@ export default class EachBlockWrapper extends Wrapper { block.builders.destroy.addBlock(`@destroyEach(${iterations}, detach);`); } - - remount(name: string) { - // TODO consider keyed blocks - return `for (var #i = 0; #i < ${this.vars.iterations}.length; #i += 1) ${this.vars.iterations}[#i].m(${name}.$$.slotted.default, null);`; - } } \ No newline at end of file diff --git a/src/compile/render-dom/wrappers/Element/Binding.ts b/src/compile/render-dom/wrappers/Element/Binding.ts index 8b34682f8c..710b6e8c6d 100644 --- a/src/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compile/render-dom/wrappers/Element/Binding.ts @@ -7,6 +7,7 @@ import Node from '../../../nodes/shared/Node'; import Renderer from '../../Renderer'; import flattenReference from '../../../../utils/flattenReference'; import { get_tail } from '../../../../utils/get_tail_snippet'; +import EachBlock from '../../../nodes/EachBlock'; // TODO this should live in a specific binding const readOnlyMediaAttributes = new Set([ @@ -52,9 +53,9 @@ export default class BindingWrapper { // we need to ensure that the each block creates a context including // the list and the index, if they're not otherwise referenced const { name } = getObject(this.node.expression.node); - const eachBlock = block.contextOwners.get(name); + const eachBlock = this.parent.node.scope.getOwner(name); - eachBlock.hasBinding = true; + (eachBlock as EachBlock).has_binding = true; } this.object = getObject(this.node.expression.node).name; @@ -124,11 +125,11 @@ export default class BindingWrapper { const bindingGroup = getBindingGroup(parent.renderer, this.node.expression.node); block.builders.hydrate.addLine( - `($$.binding_groups[${bindingGroup}] || ($$.binding_groups[${bindingGroup}] = [])).push(${parent.var});` + `ctx.$$binding_groups[${bindingGroup}].push(${parent.var});` ); block.builders.destroy.addLine( - `$$.binding_groups[${bindingGroup}].splice($$.binding_groups[${bindingGroup}].indexOf(${parent.var}), 1);` + `ctx.$$binding_groups[${bindingGroup}].splice(ctx.$$binding_groups[${bindingGroup}].indexOf(${parent.var}), 1);` ); break; @@ -278,7 +279,7 @@ function getValueFromDom( if (name === 'group') { const bindingGroup = getBindingGroup(renderer, binding.node.expression.node); if (type === 'checkbox') { - return `@getBindingGroupValue($$self.$$.binding_groups[${bindingGroup}])`; + return `@getBindingGroupValue($$binding_groups[${bindingGroup}])`; } return `this.__value`; @@ -295,4 +296,4 @@ function getValueFromDom( // everything else return `this.${name}`; -} \ No newline at end of file +} diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts index 7d0288726e..97654fd19c 100644 --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -19,6 +19,9 @@ import InlineComponentWrapper from '../InlineComponent'; import addToSet from '../../../../utils/addToSet'; import addEventHandlers from '../shared/addEventHandlers'; import addActions from '../shared/addActions'; +import createDebuggingComment from '../../../../utils/createDebuggingComment'; +import sanitize from '../../../../utils/sanitize'; +import { get_context_merger } from '../shared/get_context_merger'; const events = [ { @@ -91,7 +94,7 @@ export default class ElementWrapper extends Wrapper { bindings: Binding[]; classDependencies: string[]; - slotOwner?: InlineComponentWrapper; + slot_block: Block; selectBindingDependencies?: Set; var: string; @@ -126,8 +129,25 @@ export default class ElementWrapper extends Wrapper { } if (owner && owner.node.type === 'InlineComponent') { - this.slotOwner = owner; - owner._slots.add(attribute.getStaticValue()); + const name = attribute.getStaticValue(); + + if (!(owner as InlineComponentWrapper).slots.has(name)) { + const child_block = block.child({ + comment: createDebuggingComment(node, this.renderer.component), + name: this.renderer.component.getUniqueName(`create_${sanitize(name)}_slot`) + }); + + const fn = get_context_merger(this.node.lets); + + (owner as InlineComponentWrapper).slots.set(name, { + block: child_block, + fn + }); + this.renderer.blocks.push(child_block); + } + + this.slot_block = (owner as InlineComponentWrapper).slots.get(name).block; + block = this.slot_block; } } if (attribute.name === 'style') { @@ -179,6 +199,10 @@ export default class ElementWrapper extends Wrapper { } this.fragment = new FragmentWrapper(renderer, block, node.children, this, stripWhitespace, nextSibling); + + if (this.slot_block) { + block.parent.addDependencies(block.dependencies); + } } render(block: Block, parentNode: string, parentNodes: string) { @@ -194,15 +218,8 @@ export default class ElementWrapper extends Wrapper { const node = this.var; const nodes = parentNodes && block.getUniqueName(`${this.var}_nodes`) // if we're in unclaimable territory, i.e. , parentNodes is null - const slot = this.node.attributes.find((attribute: Node) => attribute.name === 'slot'); - const prop = slot && quotePropIfNecessary(slot.chunks[0].data); - - let initialMountNode; - - if (this.slotOwner) { - initialMountNode = `${this.slotOwner.var}.$$.slotted${prop}`; - } else { - initialMountNode = parentNode; + if (this.slot_block) { + block = this.slot_block; } block.addVariable(node); @@ -224,12 +241,12 @@ export default class ElementWrapper extends Wrapper { } } - if (initialMountNode) { + if (parentNode) { block.builders.mount.addLine( - `@append(${initialMountNode}, ${node});` + `@append(${parentNode}, ${node});` ); - if (initialMountNode === 'document.head') { + if (parentNode === 'document.head') { block.builders.destroy.addLine(`@detachNode(${node});`); } } else { @@ -317,7 +334,7 @@ export default class ElementWrapper extends Wrapper { let open = `<${wrapper.node.name}`; - (wrapper).attributes.forEach((attr: AttributeWrapper) => { + (wrapper as ElementWrapper).attributes.forEach((attr: AttributeWrapper) => { open += ` ${fixAttributeCasing(attr.node.name)}${attr.stringify()}` }); @@ -755,23 +772,13 @@ export default class ElementWrapper extends Wrapper { return null; } - remount(name: string) { - const slot = this.attributes.find(attribute => attribute.node.name === 'slot'); - if (slot) { - const prop = quotePropIfNecessary(slot.node.chunks[0].data); - return `@append(${name}.$$.slotted${prop}, ${this.var});`; - } - - return `@append(${name}.$$.slotted.default, ${this.var});`; - } - addCssClass(className = this.component.stylesheet.id) { const classAttribute = this.attributes.find(a => a.name === 'class'); if (classAttribute && !classAttribute.isTrue) { if (classAttribute.chunks.length === 1 && classAttribute.chunks[0].type === 'Text') { - (classAttribute.chunks[0]).data += ` ${className}`; + (classAttribute.chunks[0] as Text).data += ` ${className}`; } else { - (classAttribute.chunks).push( + (classAttribute.chunks as Node[]).push( new Text(this.component, this, this.scope, { type: 'Text', data: ` ${className}` diff --git a/src/compile/render-dom/wrappers/Fragment.ts b/src/compile/render-dom/wrappers/Fragment.ts index aad4c74c80..e4d989f9a5 100644 --- a/src/compile/render-dom/wrappers/Fragment.ts +++ b/src/compile/render-dom/wrappers/Fragment.ts @@ -63,6 +63,10 @@ export default class FragmentWrapper { while (i--) { const child = nodes[i]; + if (!child.type) { + throw new Error(`missing type`) + } + if (!(child.type in wrappers)) { throw new Error(`TODO implement ${child.type}`); } @@ -114,7 +118,7 @@ export default class FragmentWrapper { } if (stripWhitespace) { - const first = this.nodes[0]; + const first = this.nodes[0] as TextWrapper; if (first && first.node.type === 'Text') { first.data = trimStart(first.data); diff --git a/src/compile/render-dom/wrappers/IfBlock.ts b/src/compile/render-dom/wrappers/IfBlock.ts index ab4c697881..3d12c589ac 100644 --- a/src/compile/render-dom/wrappers/IfBlock.ts +++ b/src/compile/render-dom/wrappers/IfBlock.ts @@ -32,12 +32,12 @@ class IfBlockBranch extends Wrapper { ) { super(renderer, block, parent, node); - this.condition = (node).expression && (node).expression.render(block); + this.condition = (node as IfBlock).expression && (node as IfBlock).expression.render(block); this.block = block.child({ comment: createDebuggingComment(node, parent.renderer.component), name: parent.renderer.component.getUniqueName( - (node).expression ? `create_if_block` : `create_else_block` + (node as IfBlock).expression ? `create_if_block` : `create_else_block` ) }); @@ -222,7 +222,7 @@ export default class IfBlockWrapper extends Wrapper { block.builders.init.addBlock(deindent` var ${current_block_type} = ${select_block_type}(ctx); - var ${name} = ${current_block_type_and}${current_block_type}($$, ctx); + var ${name} = ${current_block_type_and}${current_block_type}(ctx); `); const initialMountNode = parentNode || '#target'; @@ -235,7 +235,7 @@ export default class IfBlockWrapper extends Wrapper { const changeBlock = deindent` ${if_name}${name}.d(1); - ${name} = ${current_block_type_and}${current_block_type}($$, ctx); + ${name} = ${current_block_type_and}${current_block_type}(ctx); if (${name}) { ${name}.c(); ${name}.m(${updateMountNode}, ${anchor}); @@ -302,12 +302,12 @@ export default class IfBlockWrapper extends Wrapper { if (hasElse) { block.builders.init.addBlock(deindent` ${current_block_type_index} = ${select_block_type}(ctx); - ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}]($$, ctx); + ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](ctx); `); } else { block.builders.init.addBlock(deindent` if (~(${current_block_type_index} = ${select_block_type}(ctx))) { - ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}]($$, ctx); + ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](ctx); } `); } @@ -334,7 +334,7 @@ export default class IfBlockWrapper extends Wrapper { const createNewBlock = deindent` ${name} = ${if_blocks}[${current_block_type_index}]; if (!${name}) { - ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}]($$, ctx); + ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](ctx); ${name}.c(); } ${name}.m(${updateMountNode}, ${anchor}); @@ -394,7 +394,7 @@ export default class IfBlockWrapper extends Wrapper { const branch = this.branches[0]; block.builders.init.addBlock(deindent` - var ${name} = (${branch.condition}) && ${branch.block.name}($$, ctx); + var ${name} = (${branch.condition}) && ${branch.block.name}(ctx); `); const initialMountNode = parentNode || '#target'; @@ -411,7 +411,7 @@ export default class IfBlockWrapper extends Wrapper { if (${name}) { ${name}.p(changed, ctx); } else { - ${name} = ${branch.block.name}($$, ctx); + ${name} = ${branch.block.name}(ctx); ${name}.c(); ${name}.m(${updateMountNode}, ${anchor}); } @@ -419,7 +419,7 @@ export default class IfBlockWrapper extends Wrapper { ` : deindent` if (!${name}) { - ${name} = ${branch.block.name}($$, ctx); + ${name} = ${branch.block.name}(ctx); ${name}.c(); ${name}.m(${updateMountNode}, ${anchor}); } diff --git a/src/compile/render-dom/wrappers/InlineComponent/index.ts b/src/compile/render-dom/wrappers/InlineComponent/index.ts index 9669910d06..5a97be48eb 100644 --- a/src/compile/render-dom/wrappers/InlineComponent/index.ts +++ b/src/compile/render-dom/wrappers/InlineComponent/index.ts @@ -10,12 +10,15 @@ import addToSet from '../../../../utils/addToSet'; import deindent from '../../../../utils/deindent'; import Attribute from '../../../nodes/Attribute'; import getObject from '../../../../utils/getObject'; -import Binding from '../../../nodes/Binding'; import flattenReference from '../../../../utils/flattenReference'; +import createDebuggingComment from '../../../../utils/createDebuggingComment'; +import sanitize from '../../../../utils/sanitize'; +import { get_context_merger } from '../shared/get_context_merger'; +import EachBlock from '../../../nodes/EachBlock'; export default class InlineComponentWrapper extends Wrapper { var: string; - _slots: Set; // TODO lose the underscore + slots: Map = new Map(); node: InlineComponent; fragment: FragmentWrapper; @@ -44,9 +47,9 @@ export default class InlineComponentWrapper extends Wrapper { // we need to ensure that the each block creates a context including // the list and the index, if they're not otherwise referenced const { name } = getObject(binding.expression.node); - const eachBlock = block.contextOwners.get(name); + const eachBlock = this.node.scope.getOwner(name); - eachBlock.hasBinding = true; + (eachBlock as EachBlock).has_binding = true; } block.addDependencies(binding.expression.dynamic_dependencies); @@ -65,8 +68,22 @@ export default class InlineComponentWrapper extends Wrapper { ).toLowerCase(); if (this.node.children.length) { - this._slots = new Set(['default']); - this.fragment = new FragmentWrapper(renderer, block, node.children, this, stripWhitespace, nextSibling); + const default_slot = block.child({ + comment: createDebuggingComment(node, renderer.component), + name: renderer.component.getUniqueName(`create_default_slot`) + }); + + this.renderer.blocks.push(default_slot); + + const fn = get_context_merger(this.node.lets); + + this.slots.set('default', { + block: default_slot, + fn + }); + this.fragment = new FragmentWrapper(renderer, default_slot, node.children, this, stripWhitespace, nextSibling); + + block.addDependencies(default_slot.dependencies); } block.addOutro(); @@ -84,15 +101,6 @@ export default class InlineComponentWrapper extends Wrapper { const component_opts = []; - if (this.fragment) { - const slots = Array.from(this._slots).map(name => `${quoteNameIfNecessary(name)}: @createFragment()`); - component_opts.push(`slots: { ${slots.join(', ')} }`); - - this.fragment.nodes.forEach((child: Wrapper) => { - child.render(block, `${this.var}.$$.slotted.default`, 'nodes'); - }); - } - const statements: string[] = []; const updates: string[] = []; const postupdates: string[] = []; @@ -102,13 +110,16 @@ export default class InlineComponentWrapper extends Wrapper { const usesSpread = !!this.node.attributes.find(a => a.isSpread); + const slot_props = Array.from(this.slots).map(([name, slot]) => `$$slot_${sanitize(name)}: [${slot.block.name}${slot.fn ? `, ${slot.fn}` : ''}]`); + if (slot_props.length > 0) slot_props.push(`$$scope: { ctx }`); + const attributeObject = usesSpread - ? '{}' + ? stringifyProps(slot_props) : stringifyProps( - this.node.attributes.map(attr => `${quoteNameIfNecessary(attr.name)}: ${attr.getValue()}`) + this.node.attributes.map(attr => `${quoteNameIfNecessary(attr.name)}: ${attr.getValue()}`).concat(slot_props) ); - if (this.node.attributes.length || this.node.bindings.length) { + if (this.node.attributes.length || this.node.bindings.length || slot_props.length) { if (!usesSpread && this.node.bindings.length === 0) { component_opts.push(`props: ${attributeObject}`); } else { @@ -117,6 +128,14 @@ export default class InlineComponentWrapper extends Wrapper { } } + if (this.fragment) { + const default_slot = this.slots.get('default'); + + this.fragment.nodes.forEach((child: Wrapper) => { + child.render(default_slot.block, null, 'nodes'); + }); + } + if (component.options.dev) { // TODO this is a terrible hack, but without it the component // will complain that options.target is missing. This would @@ -125,7 +144,16 @@ export default class InlineComponentWrapper extends Wrapper { component_opts.push(`$$inline: true`); } - if (!usesSpread && (this.node.attributes.filter(a => a.isDynamic).length || this.node.bindings.length)) { + const fragment_dependencies = new Set(); + this.slots.forEach(slot => { + slot.block.dependencies.forEach(name => { + if (renderer.component.mutable_props.has(name)) { + fragment_dependencies.add(name); + } + }); + }); + + if (!usesSpread && (this.node.attributes.filter(a => a.isDynamic).length || this.node.bindings.length || fragment_dependencies.size > 0)) { updates.push(`var ${name_changes} = {};`); } @@ -196,6 +224,10 @@ export default class InlineComponentWrapper extends Wrapper { } } + if (fragment_dependencies.size > 0) { + updates.push(`if (${[...fragment_dependencies].map(n => `changed.${n}`).join(' || ')}) ${name_changes}.$$scope = { changed, ctx };`); + } + const munged_bindings = this.node.bindings.map(binding => { component.has_reactive_assignments = true; @@ -375,7 +407,6 @@ export default class InlineComponentWrapper extends Wrapper { ${munged_bindings} ${munged_handlers} - ${this.fragment && this.fragment.nodes.map(child => child.remount(name))} ${name}.$$.fragment.c(); @mount_component(${name}, ${updateMountNode}, ${anchor}); ${name}.$$.fragment.i(); @@ -448,10 +479,6 @@ export default class InlineComponentWrapper extends Wrapper { `if (${name}) ${name}.$$.fragment.o();` ); } - - remount(name: string) { - return `${this.var}.$$.fragment.m(${name}.$$.slotted.default, null);`; - } } function isComputed(node: Node) { diff --git a/src/compile/render-dom/wrappers/Slot.ts b/src/compile/render-dom/wrappers/Slot.ts index 2788fc075b..ae81910dba 100644 --- a/src/compile/render-dom/wrappers/Slot.ts +++ b/src/compile/render-dom/wrappers/Slot.ts @@ -2,16 +2,20 @@ import Wrapper from './shared/Wrapper'; import Renderer from '../Renderer'; import Block from '../Block'; import Slot from '../../nodes/Slot'; -import { quotePropIfNecessary } from '../../../utils/quoteIfNecessary'; import FragmentWrapper from './Fragment'; import deindent from '../../../utils/deindent'; import sanitize from '../../../utils/sanitize'; +import addToSet from '../../../utils/addToSet'; +import get_slot_data from '../../../utils/get_slot_data'; +import stringifyProps from '../../../utils/stringifyProps'; +import Expression from '../../nodes/shared/Expression'; export default class SlotWrapper extends Wrapper { node: Slot; fragment: FragmentWrapper; var = 'slot'; + dependencies: Set = new Set(['$$scope']); constructor( renderer: Renderer, @@ -32,6 +36,12 @@ export default class SlotWrapper extends Wrapper { stripWhitespace, nextSibling ); + + this.node.attributes.forEach(attribute => { + addToSet(this.dependencies, attribute.dependencies); + }); + + block.addDependencies(this.dependencies); } render( @@ -41,41 +51,66 @@ export default class SlotWrapper extends Wrapper { ) { const { renderer } = this; - const slotName = this.node.getStaticAttributeValue('name') || 'default'; - renderer.slots.add(slotName); + const slot_name = this.node.getStaticAttributeValue('name') || 'default'; + renderer.slots.add(slot_name); + + let get_slot_changes; + let get_slot_context; + + const attributes = this.node.attributes.filter(attribute => attribute.name !== 'name'); + + if (attributes.length > 0) { + get_slot_changes = renderer.component.getUniqueName(`get_${slot_name}_slot_changes`); + get_slot_context = renderer.component.getUniqueName(`get_${slot_name}_slot_context`); - const content_name = block.getUniqueName(`slot_content_${sanitize(slotName)}`); - const prop = quotePropIfNecessary(slotName); - block.addVariable(content_name, `$$.slotted${prop}`); + const context_props = get_slot_data(attributes); + const changes_props = []; + + const dependencies = new Set(); + + attributes.forEach(attribute => { + attribute.chunks.forEach(chunk => { + if ((chunk as Expression).dependencies) { + addToSet(dependencies, (chunk as Expression).dependencies); + addToSet(dependencies, (chunk as Expression).contextual_dependencies); + } + }); + + if (attribute.dependencies.size > 0) { + changes_props.push(`${attribute.name}: ${[...attribute.dependencies].join(' || ')}`) + } + }); - // TODO can we use isDomNode instead of type === 'Element'? - const needsAnchorBefore = this.prev ? this.prev.node.type !== 'Element' : !parentNode; - const needsAnchorAfter = this.next ? this.next.node.type !== 'Element' : !parentNode; + const arg = dependencies.size > 0 ? `{ ${[...dependencies].join(', ')} }` : '{}'; - const anchorBefore = needsAnchorBefore - ? block.getUniqueName(`${content_name}_before`) - : (this.prev && this.prev.var) || 'null'; + renderer.blocks.push(deindent` + const ${get_slot_changes} = (${arg}) => (${stringifyProps(changes_props)}); + const ${get_slot_context} = (${arg}) => (${stringifyProps(context_props)}); + `); + } else { + get_slot_context = 'null'; + } - const anchorAfter = needsAnchorAfter - ? block.getUniqueName(`${content_name}_after`) - : (this.next && this.next.var) || 'null'; + const slot = block.getUniqueName(`${sanitize(slot_name)}_slot`); + const slot_definition = block.getUniqueName(`${sanitize(slot_name)}_slot`); - if (needsAnchorBefore) block.addVariable(anchorBefore); - if (needsAnchorAfter) block.addVariable(anchorAfter); + block.builders.init.addBlock(deindent` + const ${slot_definition} = ctx.$$slot_${sanitize(slot_name)}; + const ${slot} = @create_slot(${slot_definition}, ctx, ${get_slot_context}); + `); let mountBefore = block.builders.mount.toString(); - let destroyBefore = block.builders.destroy.toString(); - block.builders.create.pushCondition(`!${content_name}`); - block.builders.hydrate.pushCondition(`!${content_name}`); - block.builders.mount.pushCondition(`!${content_name}`); - block.builders.update.pushCondition(`!${content_name}`); - block.builders.destroy.pushCondition(`!${content_name}`); + block.builders.create.pushCondition(`!${slot}`); + block.builders.hydrate.pushCondition(`!${slot}`); + block.builders.mount.pushCondition(`!${slot}`); + block.builders.update.pushCondition(`!${slot}`); + block.builders.destroy.pushCondition(`!${slot}`); const listeners = block.event_listeners; block.event_listeners = []; this.fragment.render(block, parentNode, parentNodes); - block.renderListeners(`_${content_name}`); + block.renderListeners(`_${slot}`); block.event_listeners = listeners; block.builders.create.popCondition(); @@ -84,62 +119,35 @@ export default class SlotWrapper extends Wrapper { block.builders.update.popCondition(); block.builders.destroy.popCondition(); + block.builders.create.addLine( + `if (${slot}) ${slot}.c();` + ); + + block.builders.claim.addLine( + `if (${slot}) ${slot}.l(${parentNodes});` + ); + const mountLeadin = block.builders.mount.toString() !== mountBefore ? `else` - : `if (${content_name})`; - - if (parentNode) { - block.builders.mount.addBlock(deindent` - ${mountLeadin} { - ${needsAnchorBefore && `@append(${parentNode}, ${anchorBefore} || (${anchorBefore} = @createComment()));`} - @append(${parentNode}, ${content_name}); - ${needsAnchorAfter && `@append(${parentNode}, ${anchorAfter} || (${anchorAfter} = @createComment()));`} - } - `); - } else { - block.builders.mount.addBlock(deindent` - ${mountLeadin} { - ${needsAnchorBefore && `@insert(#target, ${anchorBefore} || (${anchorBefore} = @createComment()), anchor);`} - @insert(#target, ${content_name}, anchor); - ${needsAnchorAfter && `@insert(#target, ${anchorAfter} || (${anchorAfter} = @createComment()), anchor);`} - } - `); - } + : `if (${slot})`; - // if the slot is unmounted, move nodes back into the document fragment, - // so that it can be reinserted later - // TODO so that this can work with public API, component.$$.slotted should - // be all fragments, derived from options.slots. Not === options.slots - const unmountLeadin = block.builders.destroy.toString() !== destroyBefore - ? `else` - : `if (${content_name})`; + block.builders.mount.addBlock(deindent` + ${mountLeadin} { + ${slot}.m(${parentNode || '#target'}, ${parentNode ? 'null' : 'anchor'}); + } + `); - if (anchorBefore === 'null' && anchorAfter === 'null') { - block.builders.destroy.addBlock(deindent` - ${unmountLeadin} { - @reinsertChildren(${parentNode}, ${content_name}); - } - `); - } else if (anchorBefore === 'null') { - block.builders.destroy.addBlock(deindent` - ${unmountLeadin} { - @reinsertBefore(${anchorAfter}, ${content_name}); - } - `); - } else if (anchorAfter === 'null') { - block.builders.destroy.addBlock(deindent` - ${unmountLeadin} { - @reinsertAfter(${anchorBefore}, ${content_name}); - } - `); - } else { - block.builders.destroy.addBlock(deindent` - ${unmountLeadin} { - @reinsertBetween(${anchorBefore}, ${anchorAfter}, ${content_name}); - @detachNode(${anchorBefore}); - @detachNode(${anchorAfter}); - } - `); - } + let update_conditions = [...this.dependencies].map(name => `changed.${name}`).join(' || '); + if (this.dependencies.size > 1) update_conditions = `(${update_conditions})`; + + block.builders.update.addBlock(deindent` + if (${slot} && ${update_conditions}) { + ${slot}.p(@assign(@assign({}, ${get_slot_changes}(changed)), ctx.$$scope.changed), @get_slot_context(${slot_definition}, ctx, ${get_slot_context})); + } + `); + + block.builders.destroy.addLine( + `if (${slot}) ${slot}.d(detach);` + ); } } \ No newline at end of file diff --git a/src/compile/render-dom/wrappers/Text.ts b/src/compile/render-dom/wrappers/Text.ts index fea357f1d5..00028df67c 100644 --- a/src/compile/render-dom/wrappers/Text.ts +++ b/src/compile/render-dom/wrappers/Text.ts @@ -60,8 +60,4 @@ export default class TextWrapper extends Wrapper { parentNode ); } - - remount(name: string) { - return `@append(${name}.$$.slotted.default, ${this.var});`; - } } \ No newline at end of file diff --git a/src/compile/render-dom/wrappers/shared/Tag.ts b/src/compile/render-dom/wrappers/shared/Tag.ts index d44a53ffde..475c0d8a70 100644 --- a/src/compile/render-dom/wrappers/shared/Tag.ts +++ b/src/compile/render-dom/wrappers/shared/Tag.ts @@ -51,8 +51,4 @@ export default class Tag extends Wrapper { return { init: content }; } - - remount(name: string) { - return `@append(${name}.$$.slotted.default, ${this.var});`; - } } \ No newline at end of file diff --git a/src/compile/render-dom/wrappers/shared/Wrapper.ts b/src/compile/render-dom/wrappers/shared/Wrapper.ts index 70780dd0d2..f46d626078 100644 --- a/src/compile/render-dom/wrappers/shared/Wrapper.ts +++ b/src/compile/render-dom/wrappers/shared/Wrapper.ts @@ -75,8 +75,4 @@ export default class Wrapper { this.node.type === 'MustacheTag' ); } - - remount(name: string) { - return `${this.var}.m(${name}.$$.slotted.default, null);`; - } } \ No newline at end of file diff --git a/src/compile/render-dom/wrappers/shared/get_context_merger.ts b/src/compile/render-dom/wrappers/shared/get_context_merger.ts new file mode 100644 index 0000000000..bbd14ec87d --- /dev/null +++ b/src/compile/render-dom/wrappers/shared/get_context_merger.ts @@ -0,0 +1,10 @@ +import Let from '../../../nodes/Let'; + +export function get_context_merger(lets: Let[]) { + if (lets.length === 0) return null; + + const input = lets.map(l => l.value ? `${l.name}: ${l.value}` : l.name).join(', '); + const output = lets.map(l => l.names.join(', ')).join(', '); + + return `({ ${input} }) => ({ ${output} })`; +} \ No newline at end of file diff --git a/src/compile/render-ssr/handlers/AwaitBlock.ts b/src/compile/render-ssr/handlers/AwaitBlock.ts index 05da3a4ad6..a79ff18429 100644 --- a/src/compile/render-ssr/handlers/AwaitBlock.ts +++ b/src/compile/render-ssr/handlers/AwaitBlock.ts @@ -1,6 +1,6 @@ import Renderer from '../Renderer'; import { CompileOptions } from '../../../interfaces'; -import { snip } from '../utils'; +import { snip } from '../../../utils/snip'; export default function(node, renderer: Renderer, options: CompileOptions) { renderer.append('${(function(__value) { if(@isPromise(__value)) return `'); diff --git a/src/compile/render-ssr/handlers/EachBlock.ts b/src/compile/render-ssr/handlers/EachBlock.ts index 57b0ddd1f1..a764b151aa 100644 --- a/src/compile/render-ssr/handlers/EachBlock.ts +++ b/src/compile/render-ssr/handlers/EachBlock.ts @@ -1,4 +1,4 @@ -import { snip } from '../utils'; +import { snip } from '../../../utils/snip'; export default function(node, renderer, options) { const snippet = snip(node.expression); diff --git a/src/compile/render-ssr/handlers/Element.ts b/src/compile/render-ssr/handlers/Element.ts index 3a4316abfa..ba5bd998ab 100644 --- a/src/compile/render-ssr/handlers/Element.ts +++ b/src/compile/render-ssr/handlers/Element.ts @@ -2,8 +2,9 @@ import { quotePropIfNecessary, quoteNameIfNecessary } from '../../../utils/quote import isVoidElementName from '../../../utils/isVoidElementName'; import Attribute from '../../nodes/Attribute'; import Node from '../../nodes/shared/Node'; -import { escape, escapeTemplate } from '../../../utils/stringify'; -import { snip } from '../utils'; +import { snip } from '../../../utils/snip'; +import { stringify_attribute } from '../../../utils/stringify_attribute'; +import { get_slot_scope } from './shared/get_slot_scope'; // source: https://gist.github.com/ArjanSchouten/0b8574a6ad7f5065a5e7 const boolean_attributes = new Set([ @@ -57,6 +58,8 @@ export default function(node, renderer, options) { const target = renderer.targets[renderer.targets.length - 1]; target.slotStack.push(slotName); target.slots[slotName] = ''; + + options.slot_scopes.set(slotName, get_slot_scope(node.lets)); } const classExpr = node.classes.map((classDir: Class) => { @@ -75,7 +78,7 @@ export default function(node, renderer, options) { args.push(snip(attribute.expression)); } else { if (attribute.name === 'value' && node.name === 'textarea') { - textareaContents = stringifyAttribute(attribute); + textareaContents = stringify_attribute(attribute); } else if (attribute.isTrue) { args.push(`{ ${quoteNameIfNecessary(attribute.name)}: true }`); } else if ( @@ -86,7 +89,7 @@ export default function(node, renderer, options) { // a boolean attribute with one non-Text chunk args.push(`{ ${quoteNameIfNecessary(attribute.name)}: ${snip(attribute.chunks[0])} }`); } else { - args.push(`{ ${quoteNameIfNecessary(attribute.name)}: \`${stringifyAttribute(attribute)}\` }`); + args.push(`{ ${quoteNameIfNecessary(attribute.name)}: \`${stringify_attribute(attribute)}\` }`); } } }); @@ -97,7 +100,7 @@ export default function(node, renderer, options) { if (attribute.type !== 'Attribute') return; if (attribute.name === 'value' && node.name === 'textarea') { - textareaContents = stringifyAttribute(attribute); + textareaContents = stringify_attribute(attribute); } else if (attribute.isTrue) { openingTag += ` ${attribute.name}`; } else if ( @@ -109,14 +112,14 @@ export default function(node, renderer, options) { openingTag += '${' + snip(attribute.chunks[0]) + ' ? " ' + attribute.name + '" : "" }'; } else if (attribute.name === 'class' && classExpr) { addClassAttribute = false; - openingTag += ` class="\${[\`${stringifyAttribute(attribute)}\`, ${classExpr}].join(' ').trim() }"`; + openingTag += ` class="\${[\`${stringify_attribute(attribute)}\`, ${classExpr}].join(' ').trim() }"`; } else if (attribute.chunks.length === 1 && attribute.chunks[0].type !== 'Text') { const { name } = attribute; const snippet = snip(attribute.chunks[0]); openingTag += '${(v => v == null ? "" : ` ' + name + '="${@escape(' + snippet + ')}"`)(' + snippet + ')}'; } else { - openingTag += ` ${attribute.name}="${stringifyAttribute(attribute)}"`; + openingTag += ` ${attribute.name}="${stringify_attribute(attribute)}"`; } }); } @@ -149,16 +152,4 @@ export default function(node, renderer, options) { if (!isVoidElementName(node.name)) { renderer.append(``); } -} - -function stringifyAttribute(attribute: Attribute) { - return attribute.chunks - .map((chunk: Node) => { - if (chunk.type === 'Text') { - return escapeTemplate(escape(chunk.data).replace(/"/g, '"')); - } - - return '${@escape(' + snip(chunk) + ')}'; - }) - .join(''); } \ No newline at end of file diff --git a/src/compile/render-ssr/handlers/HtmlTag.ts b/src/compile/render-ssr/handlers/HtmlTag.ts index ce7c8bf97c..4d6934d892 100644 --- a/src/compile/render-ssr/handlers/HtmlTag.ts +++ b/src/compile/render-ssr/handlers/HtmlTag.ts @@ -1,4 +1,4 @@ -import { snip } from '../utils'; +import { snip } from '../../../utils/snip'; export default function(node, renderer, options) { renderer.append('${' + snip(node.expression) + '}'); diff --git a/src/compile/render-ssr/handlers/IfBlock.ts b/src/compile/render-ssr/handlers/IfBlock.ts index fadaccef98..9063bcc988 100644 --- a/src/compile/render-ssr/handlers/IfBlock.ts +++ b/src/compile/render-ssr/handlers/IfBlock.ts @@ -1,4 +1,4 @@ -import { snip } from '../utils'; +import { snip } from '../../../utils/snip'; export default function(node, renderer, options) { const snippet = snip(node.expression); diff --git a/src/compile/render-ssr/handlers/InlineComponent.ts b/src/compile/render-ssr/handlers/InlineComponent.ts index 408286b6ac..d1776988b5 100644 --- a/src/compile/render-ssr/handlers/InlineComponent.ts +++ b/src/compile/render-ssr/handlers/InlineComponent.ts @@ -1,11 +1,9 @@ import { escape, escapeTemplate, stringify } from '../../../utils/stringify'; -import getObject from '../../../utils/getObject'; -import { get_tail_snippet } from '../../../utils/get_tail_snippet'; -import { quoteNameIfNecessary, quotePropIfNecessary } from '../../../utils/quoteIfNecessary'; -import deindent from '../../../utils/deindent'; -import { snip } from '../utils'; +import { quoteNameIfNecessary } from '../../../utils/quoteIfNecessary'; +import { snip } from '../../../utils/snip'; import Renderer from '../Renderer'; import stringifyProps from '../../../utils/stringifyProps'; +import { get_slot_scope } from './shared/get_slot_scope'; type AppendTarget = any; // TODO @@ -33,12 +31,6 @@ function getAttributeValue(attribute) { return '`' + attribute.chunks.map(stringifyAttribute).join('') + '`'; } -function stringifyObject(props) { - return props.length > 0 - ? `{ ${props.join(', ')} }` - : `{};` -} - export default function(node, renderer: Renderer, options) { const binding_props = []; const binding_fns = []; @@ -98,11 +90,18 @@ export default function(node, renderer: Renderer, options) { renderer.targets.push(target); - renderer.render(node.children, options); + const slot_scopes = new Map(); + slot_scopes.set('default', get_slot_scope(node.lets)); + + renderer.render(node.children, Object.assign({}, options, { + slot_scopes + })); Object.keys(target.slots).forEach(name => { + const slot_scope = slot_scopes.get(name); + slot_fns.push( - `${quoteNameIfNecessary(name)}: () => \`${target.slots[name]}\`` + `${quoteNameIfNecessary(name)}: (${slot_scope}) => \`${target.slots[name]}\`` ); }); diff --git a/src/compile/render-ssr/handlers/Slot.ts b/src/compile/render-ssr/handlers/Slot.ts index 704f17fdc1..6bf2a22cad 100644 --- a/src/compile/render-ssr/handlers/Slot.ts +++ b/src/compile/render-ssr/handlers/Slot.ts @@ -1,4 +1,5 @@ import { quotePropIfNecessary } from '../../../utils/quoteIfNecessary'; +import get_slot_data from '../../../utils/get_slot_data'; export default function(node, renderer, options) { const name = node.attributes.find(attribute => attribute.name === 'name'); @@ -6,7 +7,11 @@ export default function(node, renderer, options) { const slot_name = name && name.chunks[0].data || 'default'; const prop = quotePropIfNecessary(slot_name); - renderer.append(`\${$$slots${prop} ? $$slots${prop}() : \``); + const slot_data = get_slot_data(node.attributes); + + const arg = slot_data.length > 0 ? `{ ${slot_data.join(', ')} }` : ''; + + renderer.append(`\${$$slots${prop} ? $$slots${prop}(${arg}) : \``); renderer.render(node.children, options); diff --git a/src/compile/render-ssr/handlers/Tag.ts b/src/compile/render-ssr/handlers/Tag.ts index f4bebed552..2cfbafd48a 100644 --- a/src/compile/render-ssr/handlers/Tag.ts +++ b/src/compile/render-ssr/handlers/Tag.ts @@ -1,4 +1,4 @@ -import { snip } from '../utils'; +import { snip } from '../../../utils/snip'; export default function(node, renderer, options) { const snippet = snip(node.expression); diff --git a/src/compile/render-ssr/handlers/shared/get_slot_scope.ts b/src/compile/render-ssr/handlers/shared/get_slot_scope.ts new file mode 100644 index 0000000000..52aa70f015 --- /dev/null +++ b/src/compile/render-ssr/handlers/shared/get_slot_scope.ts @@ -0,0 +1,6 @@ +import Let from '../../../nodes/Let'; + +export function get_slot_scope(lets: Let[]) { + if (lets.length === 0) return ''; + return `{ ${lets.map(l => l.value ? `${l.name}: ${l.value}` : l.name).join(', ')} }`; +} \ No newline at end of file diff --git a/src/compile/wrapModule.ts b/src/compile/wrapModule.ts index d4f8198bc0..05d33f7fd4 100644 --- a/src/compile/wrapModule.ts +++ b/src/compile/wrapModule.ts @@ -41,6 +41,12 @@ export default function wrapModule( throw new Error(`options.format is invalid (must be ${list(Object.keys(wrappers))})`); } +function editSource(source, sveltePath) { + return source === 'svelte' || source.startsWith('svelte/') + ? source.replace('svelte', sveltePath) + : source; +} + function esm( code: string, name: string, @@ -60,7 +66,7 @@ function esm( const importBlock = imports.length > 0 && ( imports .map((declaration: Node) => { - const import_source = declaration.source.value === 'svelte' ? sveltePath : declaration.source.value; + const import_source = editSource(declaration.source.value, sveltePath); return ( source.slice(declaration.start, declaration.source.start) + @@ -117,9 +123,7 @@ function cjs( lhs = `{ ${properties.join(', ')} }`; } - const source = node.source.value === 'svelte' - ? sveltePath - : node.source.value; + const source = editSource(node.source.value, sveltePath); return `const ${lhs} = require("${source}");` }); diff --git a/src/internal/Component.js b/src/internal/Component.js index 894f80461b..8a87654eb7 100644 --- a/src/internal/Component.js +++ b/src/internal/Component.js @@ -54,15 +54,16 @@ function make_dirty(component, key) { } export function init(component, options, instance, create_fragment, not_equal) { - const previous_component = current_component; + const parent_component = current_component; set_current_component(component); + const props = options.props || {}; + const $$ = component.$$ = { fragment: null, - ctx: options.props || {}, + ctx: null, // state - set: noop, update: noop, not_equal, bound: blankObject(), @@ -72,18 +73,17 @@ export function init(component, options, instance, create_fragment, not_equal) { on_destroy: [], before_render: [], after_render: [], + context: new Map(parent_component ? parent_component.$$.context : []), // everything else callbacks: blankObject(), - slotted: options.slots || {}, - dirty: null, - binding_groups: [] + dirty: null }; let ready = false; - if (instance) { - $$.ctx = instance(component, $$.ctx, (key, value) => { + $$.ctx = instance + ? instance(component, props, (key, value) => { if ($$.bound[key]) $$.bound[key](value); if ($$.ctx) { @@ -95,13 +95,13 @@ export function init(component, options, instance, create_fragment, not_equal) { $$.ctx[key] = value; return changed; } - }); - } + }) + : props; $$.update(); ready = true; run_all($$.before_render); - $$.fragment = create_fragment($$, $$.ctx); + $$.fragment = create_fragment($$.ctx); if (options.target) { if (options.hydrate) { @@ -115,7 +115,7 @@ export function init(component, options, instance, create_fragment, not_equal) { flush(); } - set_current_component(previous_component); + set_current_component(parent_component); } export let SvelteElement; diff --git a/src/internal/await-block.js b/src/internal/await-block.js index e9c25ec370..2e10250b4c 100644 --- a/src/internal/await-block.js +++ b/src/internal/await-block.js @@ -11,7 +11,7 @@ export function handlePromise(promise, info) { info.resolved = key && { [key]: value }; const child_ctx = assign(assign({}, info.ctx), info.resolved); - const block = type && (info.current = type)(info.$$, child_ctx); + const block = type && (info.current = type)(child_ctx); if (info.block) { if (info.blocks) { diff --git a/src/internal/keyed-each.js b/src/internal/keyed-each.js index ad5eb243d2..76e233f2ed 100644 --- a/src/internal/keyed-each.js +++ b/src/internal/keyed-each.js @@ -18,7 +18,7 @@ export function fixAndOutroAndDestroyBlock(block, lookup) { outroAndDestroyBlock(block, lookup); } -export function updateKeyedEach(old_blocks, component, changed, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { +export function updateKeyedEach(old_blocks, changed, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { var o = old_blocks.length; var n = list.length; @@ -37,7 +37,7 @@ export function updateKeyedEach(old_blocks, component, changed, get_key, dynamic var block = lookup[key]; if (!block) { - block = create_each_block(component, key, child_ctx); + block = create_each_block(key, child_ctx); block.c(); } else if (dynamic) { block.p(changed, child_ctx); diff --git a/src/internal/lifecycle.js b/src/internal/lifecycle.js index e413f4c8f4..02fc2161e1 100644 --- a/src/internal/lifecycle.js +++ b/src/internal/lifecycle.js @@ -4,20 +4,25 @@ export function set_current_component(component) { current_component = component; } +function get_current_component() { + if (!current_component) throw new Error(`Function called outside component initialization`); + return current_component; +} + export function beforeUpdate(fn) { - current_component.$$.before_render.push(fn); + get_current_component().$$.before_render.push(fn); } export function onMount(fn) { - current_component.$$.on_mount.push(fn); + get_current_component().$$.on_mount.push(fn); } export function afterUpdate(fn) { - current_component.$$.after_render.push(fn); + get_current_component().$$.after_render.push(fn); } export function onDestroy(fn) { - current_component.$$.on_destroy.push(fn); + get_current_component().$$.on_destroy.push(fn); } export function createEventDispatcher() { @@ -37,6 +42,14 @@ export function createEventDispatcher() { }; } +export function setContext(key, context) { + get_current_component().$$.context.set(key, context); +} + +export function getContext(key) { + return get_current_component().$$.context.get(key); +} + // TODO figure out if we still want to support // shorthand events, or if we want to implement // a real bubbling mechanism diff --git a/src/internal/scheduler.js b/src/internal/scheduler.js index 0626db2a97..4d9f9ad388 100644 --- a/src/internal/scheduler.js +++ b/src/internal/scheduler.js @@ -1,4 +1,5 @@ import { run_all } from './utils.js'; +import { set_current_component } from './lifecycle.js'; export let dirty_components = []; export const intros = { enabled: false }; @@ -34,7 +35,9 @@ export function flush() { // first, call beforeUpdate functions // and update components while (dirty_components.length) { - update(dirty_components.shift().$$); + const component = dirty_components.shift(); + set_current_component(component); + update(component.$$); } while (binding_callbacks.length) binding_callbacks.shift()(); diff --git a/src/internal/ssr.js b/src/internal/ssr.js index 170f841ec6..762c01a3c5 100644 --- a/src/internal/ssr.js +++ b/src/internal/ssr.js @@ -1,4 +1,4 @@ -import { set_current_component } from './lifecycle.js'; +import { set_current_component, current_component } from './lifecycle.js'; import { run_all, blankObject } from './utils.js'; export const invalidAttributeNameCharacter = /[\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; @@ -68,6 +68,8 @@ export function debug(file, line, column, values) { export function create_ssr_component($$render) { return { render: (props = {}, options = {}) => { + const parent_component = current_component; + // TODO do we need on_ready, since on_mount, // before_render and after_render don't run? const $$ = { @@ -75,6 +77,7 @@ export function create_ssr_component($$render) { on_destroy: [], before_render: [], after_render: [], + context: new Map(parent_component ? parent_component.$$.context : []), callbacks: blankObject() }; diff --git a/src/internal/utils.js b/src/internal/utils.js index 222e2669e6..5ac71b4fce 100644 --- a/src/internal/utils.js +++ b/src/internal/utils.js @@ -45,4 +45,18 @@ export function validate_store(store, name) { if (!store || typeof store.subscribe !== 'function') { throw new Error(`'${name}' is not a store with a 'subscribe' method`); } -} \ No newline at end of file +} + +export function create_slot(definition, ctx, fn) { + if (definition) { + const slot_ctx = get_slot_context(definition, ctx, fn); + return definition[0](slot_ctx); + } +} + +export function get_slot_context(definition, ctx, fn) { + return definition[1] + ? assign({}, assign(ctx.$$scope.ctx, definition[1](fn ? fn(ctx) : {}))) + : ctx.$$scope.ctx; +} + diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts index 6e53ab03e0..c11c660082 100644 --- a/src/parse/state/tag.ts +++ b/src/parse/state/tag.ts @@ -182,18 +182,19 @@ export default function tag(parser: Parser) { } } - if (name === 'slot') { - let i = parser.stack.length; - while (i--) { - const item = parser.stack[i]; - if (item.type === 'EachBlock') { - parser.error({ - code: `invalid-slot-placement`, - message: ` cannot be a child of an each-block` - }, start); - } - } - } + // TODO should this still error in in web component mode? + // if (name === 'slot') { + // let i = parser.stack.length; + // while (i--) { + // const item = parser.stack[i]; + // if (item.type === 'EachBlock') { + // parser.error({ + // code: `invalid-slot-placement`, + // message: ` cannot be a child of an each-block` + // }, start); + // } + // } + // } const uniqueNames = new Set(); @@ -464,6 +465,7 @@ function get_directive_type(name) { if (name === 'bind') return 'Binding'; if (name === 'class') return 'Class'; if (name === 'on') return 'EventHandler'; + if (name === 'let') return 'Let'; if (name === 'ref') return 'Ref'; if (name === 'in' || name === 'out' || name === 'transition') return 'Transition'; } diff --git a/src/utils/createDebuggingComment.ts b/src/utils/createDebuggingComment.ts index 15b8b12267..c90d7cf860 100644 --- a/src/utils/createDebuggingComment.ts +++ b/src/utils/createDebuggingComment.ts @@ -13,9 +13,16 @@ export default function createDebuggingComment( while (source[c - 1] === '{') c -= 1; } - let d = node.expression ? node.expression.node.end : c; - while (source[d] !== '}') d += 1; - while (source[d] === '}') d += 1; + let d; + + if (node.type === 'InlineComponent' || node.type === 'Element') { + d = node.children[0].start; + while (source[d - 1] !== '>') d -= 1; + } else { + d = node.expression ? node.expression.node.end : c; + while (source[d] !== '}') d += 1; + while (source[d] === '}') d += 1; + } const start = locate(c); const loc = `(${start.line + 1}:${start.column})`; diff --git a/src/utils/get_slot_data.ts b/src/utils/get_slot_data.ts new file mode 100644 index 0000000000..d5a5205ac9 --- /dev/null +++ b/src/utils/get_slot_data.ts @@ -0,0 +1,18 @@ +import { snip } from './snip'; +import { stringify_attribute } from './stringify_attribute'; + +export default function(attributes) { + return attributes + .filter(attribute => attribute.name !== 'name') + .map(attribute => { + const value = attribute.isTrue + ? 'true' + : attribute.chunks.length === 0 + ? '""' + : attribute.chunks.length === 1 && attribute.chunks[0].type !== 'Text' + ? snip(attribute.chunks[0]) + : stringify_attribute(attribute); + + return `${attribute.name}: ${value}`; + }); +} \ No newline at end of file diff --git a/src/compile/render-ssr/utils.ts b/src/utils/snip.ts similarity index 100% rename from src/compile/render-ssr/utils.ts rename to src/utils/snip.ts diff --git a/src/utils/stringify_attribute.ts b/src/utils/stringify_attribute.ts new file mode 100644 index 0000000000..933a84ed03 --- /dev/null +++ b/src/utils/stringify_attribute.ts @@ -0,0 +1,16 @@ +import Attribute from '../compile/nodes/Attribute'; +import Node from '../compile/nodes/shared/Node'; +import { escapeTemplate, escape } from './stringify'; +import { snip } from './snip'; + +export function stringify_attribute(attribute: Attribute) { + return attribute.chunks + .map((chunk: Node) => { + if (chunk.type === 'Text') { + return escapeTemplate(escape(chunk.data).replace(/"/g, '"')); + } + + return '${@escape(' + snip(chunk) + ')}'; + }) + .join(''); +} \ No newline at end of file diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js index 0c73a79237..d3fe89ca0e 100644 --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var button, foo_action; return { diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index 23f4bbe90d..07a54681c6 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var a, link_action; return { diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js index a1b13fedc6..f168db3e72 100644 --- a/test/js/samples/bind-width-height/expected.js +++ b/test/js/samples/bind-width-height/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div, div_resize_listener; return { diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index ff5ce3b048..43982fb97a 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -8,7 +8,7 @@ function add_css() { append(document.head, style); } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var p, text; return { diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js index ab3dbbc4f6..7fbcc27382 100644 --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var current; var nested = new ctx.Nested({ props: { foo: [1, 2, 3] } }); diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js index 0e8d67ccea..e3dc618115 100644 --- a/test/js/samples/component-static-immutable/expected.js +++ b/test/js/samples/component-static-immutable/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js index 0e8d67ccea..e3dc618115 100644 --- a/test/js/samples/component-static-immutable2/expected.js +++ b/test/js/samples/component-static-immutable2/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js index be7357c866..014e1caefb 100644 --- a/test/js/samples/component-static/expected.js +++ b/test/js/samples/component-static/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); diff --git a/test/js/samples/computed-collapsed-if/expected.js b/test/js/samples/computed-collapsed-if/expected.js index f9411cf5f6..8a9acf7523 100644 --- a/test/js/samples/computed-collapsed-if/expected.js +++ b/test/js/samples/computed-collapsed-if/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { return { c: noop, m: noop, diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index 72944cdaa6..89ae16d0fc 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -8,7 +8,7 @@ function add_css() { append(document.head, style); } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div; return { diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index 9582707de3..b7785963b3 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteElement, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div; return { diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 4ed9b00a85..4a6393388c 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -3,7 +3,7 @@ import { SvelteComponentDev, addLoc, append, createElement, createText, detachNo const file = undefined; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var h1, text0, text1, text2, text3; return { 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 24089b777c..b56d333238 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -10,7 +10,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each things as thing} -function create_each_block($$, ctx) { +function create_each_block(ctx) { var span, text0_value = ctx.thing.name, text0, text1; return { @@ -54,7 +54,7 @@ function create_each_block($$, ctx) { }; } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var text0, p, text1, text2; var each_value = ctx.things; @@ -62,7 +62,7 @@ function create_fragment($$, ctx) { var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); } return { @@ -103,7 +103,7 @@ function create_fragment($$, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block($$, child_ctx); + each_blocks[i] = create_each_block(child_ctx); each_blocks[i].c(); each_blocks[i].m(text0.parentNode, text0); } diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 2c7d3ef2d2..35d0a1f18f 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -10,7 +10,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each things as thing} -function create_each_block($$, ctx) { +function create_each_block(ctx) { var span, text0_value = ctx.thing.name, text0, text1; return { @@ -54,7 +54,7 @@ function create_each_block($$, ctx) { }; } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var text0, p, text1, text2; var each_value = ctx.things; @@ -62,7 +62,7 @@ function create_fragment($$, ctx) { var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); } return { @@ -103,7 +103,7 @@ function create_fragment($$, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block($$, child_ctx); + each_blocks[i] = create_each_block(child_ctx); each_blocks[i].c(); each_blocks[i].m(text0.parentNode, text0); } diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index d8f2db31ce..7ad954e330 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each createElement as node} -function create_each_block($$, ctx) { +function create_each_block(ctx) { var span, text_value = ctx.node, text; return { @@ -36,7 +36,7 @@ function create_each_block($$, ctx) { }; } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var each_anchor; var each_value = ctx.createElement; @@ -44,7 +44,7 @@ function create_fragment($$, ctx) { var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); } return { @@ -74,7 +74,7 @@ function create_fragment($$, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block($$, child_ctx); + each_blocks[i] = create_each_block(child_ctx); each_blocks[i].c(); each_blocks[i].m(each_anchor.parentNode, each_anchor); } diff --git a/test/js/samples/deconflict-globals/expected.js b/test/js/samples/deconflict-globals/expected.js index b8613b4ff9..f3e8c93ebe 100644 --- a/test/js/samples/deconflict-globals/expected.js +++ b/test/js/samples/deconflict-globals/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; import { onMount } from "svelte"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { return { c: noop, m: noop, 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 4f64e95350..e3dff9649d 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -3,7 +3,7 @@ import { SvelteComponentDev, addLoc, append, createElement, createText, detachNo const file = undefined; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var p, text0_value = Math.max(0, ctx.foo), text0, text1, text2; return { diff --git a/test/js/samples/do-use-dataset/expected.js b/test/js/samples/do-use-dataset/expected.js index 343ac22999..f340f71b01 100644 --- a/test/js/samples/do-use-dataset/expected.js +++ b/test/js/samples/do-use-dataset/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div0, text, div1; return { diff --git a/test/js/samples/dont-use-dataset-in-legacy/expected.js b/test/js/samples/dont-use-dataset-in-legacy/expected.js index dc787888af..974ed23b28 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div0, text, div1; return { diff --git a/test/js/samples/dont-use-dataset-in-svg/expected.js b/test/js/samples/dont-use-dataset-in-svg/expected.js index 1a5825a63d..cc29258326 100644 --- a/test/js/samples/dont-use-dataset-in-svg/expected.js +++ b/test/js/samples/dont-use-dataset-in-svg/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var svg, g0, g1; return { diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index 7b4a2fc004..8ccacdd398 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; import LazyLoad from "./LazyLoad.html"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var current; var lazyload = new LazyLoad({ props: { load: func } }); diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index 9dcf4b1ad2..0032b1c720 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -9,7 +9,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each comments as comment, i} -function create_each_block($$, ctx) { +function create_each_block(ctx) { var div, strong, text0, text1, span, text2_value = ctx.comment.author, text2, text3, text4_value = ctx.elapsed(ctx.comment.time, ctx.time), text4, text5, text6, raw_value = ctx.comment.html, raw_before; return { @@ -67,7 +67,7 @@ function create_each_block($$, ctx) { }; } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var text0, p, text1; var each_value = ctx.comments; @@ -75,7 +75,7 @@ function create_fragment($$, ctx) { var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); } return { @@ -109,7 +109,7 @@ function create_fragment($$, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block($$, child_ctx); + each_blocks[i] = create_each_block(child_ctx); each_blocks[i].c(); each_blocks[i].m(text0.parentNode, text0); } diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index fbd5fa15cc..e7e10208e4 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) { } // (19:0) {#each things as thing (thing.id)} -function create_each_block($$, key_1, ctx) { +function create_each_block(key_1, ctx) { var div, text_value = ctx.thing.name, text, rect, stop_animation = noop; return { @@ -55,7 +55,7 @@ function create_each_block($$, key_1, ctx) { }; } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var each_blocks = [], each_lookup = blankObject(), each_anchor; var each_value = ctx.things; @@ -65,7 +65,7 @@ function create_fragment($$, ctx) { for (var i = 0; i < each_value.length; i += 1) { let child_ctx = get_each_context(ctx, each_value, i); let key = get_key(child_ctx); - each_blocks[i] = each_lookup[key] = create_each_block($$, key, child_ctx); + each_blocks[i] = each_lookup[key] = create_each_block(key, child_ctx); } return { @@ -84,7 +84,7 @@ function create_fragment($$, ctx) { p(changed, ctx) { const each_value = ctx.things; for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].r(); - each_blocks = updateKeyedEach(each_blocks, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, each_anchor, get_each_context); + each_blocks = updateKeyedEach(each_blocks, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, each_anchor, get_each_context); for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a(); }, diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index 1599362932..c2dd23fb96 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each things as thing (thing.id)} -function create_each_block($$, key_1, ctx) { +function create_each_block(key_1, ctx) { var div, text_value = ctx.thing.name, text; return { @@ -41,7 +41,7 @@ function create_each_block($$, key_1, ctx) { }; } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var each_blocks = [], each_lookup = blankObject(), each_anchor; var each_value = ctx.things; @@ -51,7 +51,7 @@ function create_fragment($$, ctx) { for (var i = 0; i < each_value.length; i += 1) { let child_ctx = get_each_context(ctx, each_value, i); let key = get_key(child_ctx); - each_blocks[i] = each_lookup[key] = create_each_block($$, key, child_ctx); + each_blocks[i] = each_lookup[key] = create_each_block(key, child_ctx); } return { @@ -69,7 +69,7 @@ function create_fragment($$, ctx) { p(changed, ctx) { const each_value = ctx.things; - each_blocks = updateKeyedEach(each_blocks, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, each_anchor, get_each_context); + each_blocks = updateKeyedEach(each_blocks, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, each_anchor, get_each_context); }, i: noop, diff --git a/test/js/samples/event-handler-no-passive/expected.js b/test/js/samples/event-handler-no-passive/expected.js index 83b981cc40..19cfed3124 100644 --- a/test/js/samples/event-handler-no-passive/expected.js +++ b/test/js/samples/event-handler-no-passive/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var a, dispose; return { diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js index 4af2123bf8..b6c554a8b6 100644 --- a/test/js/samples/event-modifiers/expected.js +++ b/test/js/samples/event-modifiers/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, preventDefault, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div, button0, text1, button1, text3, button2, dispose; return { diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index 2a356d5939..9e38fe41d3 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var meta0, meta1; return { diff --git a/test/js/samples/hoisted-const/expected.js b/test/js/samples/hoisted-const/expected.js index 1720d67cd9..884f765ba7 100644 --- a/test/js/samples/hoisted-const/expected.js +++ b/test/js/samples/hoisted-const/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var b, text_value = get_answer(), text; return { diff --git a/test/js/samples/hoisted-let/expected.js b/test/js/samples/hoisted-let/expected.js index f206ffb3ba..d94eb2a7b7 100644 --- a/test/js/samples/hoisted-let/expected.js +++ b/test/js/samples/hoisted-let/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var b, text_value = get_answer(), text; return { diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index d8763aed51..a4c9fbc163 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; // (3:0) {:else} -function create_else_block($$, ctx) { +function create_else_block(ctx) { var p; return { @@ -24,7 +24,7 @@ function create_else_block($$, ctx) { } // (1:0) {#if foo} -function create_if_block($$, ctx) { +function create_if_block(ctx) { var p; return { @@ -45,7 +45,7 @@ function create_if_block($$, ctx) { }; } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var if_block_anchor; function select_block_type(ctx) { @@ -54,7 +54,7 @@ function create_fragment($$, ctx) { } var current_block_type = select_block_type(ctx); - var if_block = current_block_type($$, ctx); + var if_block = current_block_type(ctx); return { c() { @@ -70,7 +70,7 @@ function create_fragment($$, ctx) { p(changed, ctx) { if (current_block_type !== (current_block_type = select_block_type(ctx))) { if_block.d(1); - if_block = current_block_type($$, ctx); + if_block = current_block_type(ctx); if (if_block) { if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index bd6528b11c..76c69b000f 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; // (1:0) {#if foo} -function create_if_block($$, ctx) { +function create_if_block(ctx) { var p; return { @@ -23,10 +23,10 @@ function create_if_block($$, ctx) { }; } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var if_block_anchor; - var if_block = (ctx.foo) && create_if_block($$, ctx); + var if_block = (ctx.foo) && create_if_block(ctx); return { c() { @@ -42,7 +42,7 @@ function create_fragment($$, ctx) { p(changed, ctx) { if (ctx.foo) { if (!if_block) { - if_block = create_if_block($$, ctx); + if_block = create_if_block(ctx); if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js index b39aaf9d26..5988850ede 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected.js +++ b/test/js/samples/inline-style-optimized-multiple/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div; return { diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js index 49fb1d3427..c1ed003c83 100644 --- a/test/js/samples/inline-style-optimized-url/expected.js +++ b/test/js/samples/inline-style-optimized-url/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div; return { diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js index bfb7c56436..9d88cb7d35 100644 --- a/test/js/samples/inline-style-optimized/expected.js +++ b/test/js/samples/inline-style-optimized/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div; return { diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 73dd167875..31bda3a217 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div0, text, div1, div1_style_value; return { diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js index 507d9fa2a3..80a00a9701 100644 --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var input, dispose; return { diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js index 393a6bb39c..7a4cf6079a 100644 --- a/test/js/samples/input-range/expected.js +++ b/test/js/samples/input-range/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var input, dispose; return { diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index a0d6065de6..18c1535138 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var input, dispose; return { diff --git a/test/js/samples/instrumentation-script-if-no-block/expected.js b/test/js/samples/instrumentation-script-if-no-block/expected.js index 319ccb2637..f5100961fc 100644 --- a/test/js/samples/instrumentation-script-if-no-block/expected.js +++ b/test/js/samples/instrumentation-script-if-no-block/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var button, text1, p, text2, text3, dispose; return { diff --git a/test/js/samples/instrumentation-script-x-equals-x/expected.js b/test/js/samples/instrumentation-script-x-equals-x/expected.js index 21e26a907f..45a968f94f 100644 --- a/test/js/samples/instrumentation-script-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-script-x-equals-x/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var button, text1, p, text2, text3_value = ctx.things.length, text3, dispose; return { diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js index d403b12fb1..e5248cf5dc 100644 --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var button, text1, p, text2, text3, dispose; return { diff --git a/test/js/samples/instrumentation-template-x-equals-x/expected.js b/test/js/samples/instrumentation-template-x-equals-x/expected.js index a7496d403a..9f7ff64725 100644 --- a/test/js/samples/instrumentation-template-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-template-x-equals-x/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var button, text1, p, text2, text3_value = ctx.things.length, text3, dispose; return { diff --git a/test/js/samples/legacy-input-type/expected.js b/test/js/samples/legacy-input-type/expected.js index 3eefd6cedb..f9e0807314 100644 --- a/test/js/samples/legacy-input-type/expected.js +++ b/test/js/samples/legacy-input-type/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, safe_not_equal, setInputType } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var input; return { diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index 17d87e4a9d..8163a8a947 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, dispose; function audio_timeupdate_handler() { diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index 0b91f40560..a917990426 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createText, detachNode, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; import Imported from "Imported.html"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var text, current; var imported = new Imported({}); diff --git a/test/js/samples/non-mutable-reference/expected.js b/test/js/samples/non-mutable-reference/expected.js index 747f0e1641..d82617fccd 100644 --- a/test/js/samples/non-mutable-reference/expected.js +++ b/test/js/samples/non-mutable-reference/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var h1, text0, text1, text2; return { diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js index a7f49b940e..7f2bc3b55c 100644 --- a/test/js/samples/select-dynamic-value/expected.js +++ b/test/js/samples/select-dynamic-value/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var select, option0, option1, select_value_value; return { diff --git a/test/js/samples/setup-method/expected.js b/test/js/samples/setup-method/expected.js index 07a2dc46db..bd7e2e34b2 100644 --- a/test/js/samples/setup-method/expected.js +++ b/test/js/samples/setup-method/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { return { c: noop, m: noop, diff --git a/test/js/samples/svg-title/expected.js b/test/js/samples/svg-title/expected.js index 1db3124e9c..c88c0d5a5a 100644 --- a/test/js/samples/svg-title/expected.js +++ b/test/js/samples/svg-title/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var svg, title, text; return { diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js index 390f11cbcd..8bb0b59894 100644 --- a/test/js/samples/title/expected.js +++ b/test/js/samples/title/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var title_value; document.title = title_value = "a " + ctx.custom + " title"; diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index eda6f1f721..3cc4d4a09a 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; // (2:1) {#if a} -function create_if_block_4($$, ctx) { +function create_if_block_4(ctx) { var p; return { @@ -24,7 +24,7 @@ function create_if_block_4($$, ctx) { } // (8:1) {#if b} -function create_if_block_3($$, ctx) { +function create_if_block_3(ctx) { var p; return { @@ -46,7 +46,7 @@ function create_if_block_3($$, ctx) { } // (12:1) {#if c} -function create_if_block_2($$, ctx) { +function create_if_block_2(ctx) { var p; return { @@ -68,7 +68,7 @@ function create_if_block_2($$, ctx) { } // (18:1) {#if d} -function create_if_block_1($$, ctx) { +function create_if_block_1(ctx) { var p; return { @@ -90,7 +90,7 @@ function create_if_block_1($$, ctx) { } // (25:0) {#if e} -function create_if_block($$, ctx) { +function create_if_block(ctx) { var p; return { @@ -111,18 +111,18 @@ function create_if_block($$, ctx) { }; } -function create_fragment($$, ctx) { +function create_fragment(ctx) { var div, text0, p0, text2, text3, text4, p1, text6, text7, if_block4_anchor; - var if_block0 = (ctx.a) && create_if_block_4($$, ctx); + var if_block0 = (ctx.a) && create_if_block_4(ctx); - var if_block1 = (ctx.b) && create_if_block_3($$, ctx); + var if_block1 = (ctx.b) && create_if_block_3(ctx); - var if_block2 = (ctx.c) && create_if_block_2($$, ctx); + var if_block2 = (ctx.c) && create_if_block_2(ctx); - var if_block3 = (ctx.d) && create_if_block_1($$, ctx); + var if_block3 = (ctx.d) && create_if_block_1(ctx); - var if_block4 = (ctx.e) && create_if_block($$, ctx); + var if_block4 = (ctx.e) && create_if_block(ctx); return { c() { @@ -166,7 +166,7 @@ function create_fragment($$, ctx) { p(changed, ctx) { if (ctx.a) { if (!if_block0) { - if_block0 = create_if_block_4($$, ctx); + if_block0 = create_if_block_4(ctx); if_block0.c(); if_block0.m(div, text0); } @@ -177,7 +177,7 @@ function create_fragment($$, ctx) { if (ctx.b) { if (!if_block1) { - if_block1 = create_if_block_3($$, ctx); + if_block1 = create_if_block_3(ctx); if_block1.c(); if_block1.m(div, text3); } @@ -188,7 +188,7 @@ function create_fragment($$, ctx) { if (ctx.c) { if (!if_block2) { - if_block2 = create_if_block_2($$, ctx); + if_block2 = create_if_block_2(ctx); if_block2.c(); if_block2.m(div, text4); } @@ -199,7 +199,7 @@ function create_fragment($$, ctx) { if (ctx.d) { if (!if_block3) { - if_block3 = create_if_block_1($$, ctx); + if_block3 = create_if_block_1(ctx); if_block3.c(); if_block3.m(div, null); } @@ -210,7 +210,7 @@ function create_fragment($$, ctx) { if (ctx.e) { if (!if_block4) { - if_block4 = create_if_block($$, ctx); + if_block4 = create_if_block(ctx); if_block4.c(); if_block4.m(if_block4_anchor.parentNode, if_block4_anchor); } diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 7a5e291866..2696297623 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, dispose; add_render_callback(ctx.onwindowscroll); diff --git a/test/runtime/samples/binding-select-in-yield/_config.js b/test/runtime/samples/binding-select-in-yield/_config.js index 6c206837e1..11dcb3d58c 100644 --- a/test/runtime/samples/binding-select-in-yield/_config.js +++ b/test/runtime/samples/binding-select-in-yield/_config.js @@ -18,7 +18,7 @@ export default { `); - const select = target.querySelector('select'); + let select = target.querySelector('select'); const change = new window.MouseEvent('change'); select.options[2].selected = true; @@ -44,6 +44,8 @@ export default { await component.modal.toggle(); await component.modal.toggle(); + select = target.querySelector('select'); + assert.deepEqual(Array.from(select.options).map(o => o.selected), [ false, false, diff --git a/test/runtime/samples/component-binding-blowback-c/_config.js b/test/runtime/samples/component-binding-blowback-c/_config.js index b179f1c104..5ff0ae34f6 100644 --- a/test/runtime/samples/component-binding-blowback-c/_config.js +++ b/test/runtime/samples/component-binding-blowback-c/_config.js @@ -14,7 +14,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const input = target.querySelector('input'); input.value = 4; diff --git a/test/runtime/samples/component-slot-let-aliased/Nested.html b/test/runtime/samples/component-slot-let-aliased/Nested.html new file mode 100644 index 0000000000..38c6ed6cbe --- /dev/null +++ b/test/runtime/samples/component-slot-let-aliased/Nested.html @@ -0,0 +1,5 @@ +
    + {#each things as thing} + + {/each} +
    \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-aliased/_config.js b/test/runtime/samples/component-slot-let-aliased/_config.js new file mode 100644 index 0000000000..d66f613bb4 --- /dev/null +++ b/test/runtime/samples/component-slot-let-aliased/_config.js @@ -0,0 +1,24 @@ +export default { + props: { + things: [1, 2, 3] + }, + + html: ` +
    + 1 + 2 + 3 +
    `, + + test({ assert, component, target }) { + component.things = [1, 2, 3, 4]; + assert.htmlEqual(target.innerHTML, ` +
    + 1 + 2 + 3 + 4 +
    + `); + } +}; diff --git a/test/runtime/samples/component-slot-let-aliased/main.html b/test/runtime/samples/component-slot-let-aliased/main.html new file mode 100644 index 0000000000..1acb7fbcdc --- /dev/null +++ b/test/runtime/samples/component-slot-let-aliased/main.html @@ -0,0 +1,9 @@ + + + + {x} + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-b/Nested.html b/test/runtime/samples/component-slot-let-b/Nested.html new file mode 100644 index 0000000000..42963f6d1d --- /dev/null +++ b/test/runtime/samples/component-slot-let-b/Nested.html @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-b/_config.js b/test/runtime/samples/component-slot-let-b/_config.js new file mode 100644 index 0000000000..f13a3b2bb6 --- /dev/null +++ b/test/runtime/samples/component-slot-let-b/_config.js @@ -0,0 +1,18 @@ +export default { + html: ` + + 0 + `, + + async test({ assert, target, window }) { + const button = target.querySelector('button'); + const click = new window.MouseEvent('click'); + + await button.dispatchEvent(click); + + assert.htmlEqual(target.innerHTML, ` + + 1 + `); + } +}; diff --git a/test/runtime/samples/component-slot-let-b/main.html b/test/runtime/samples/component-slot-let-b/main.html new file mode 100644 index 0000000000..b4fd5f54c6 --- /dev/null +++ b/test/runtime/samples/component-slot-let-b/main.html @@ -0,0 +1,7 @@ + + + + {count} + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-c/Nested.html b/test/runtime/samples/component-slot-let-c/Nested.html new file mode 100644 index 0000000000..d38a1403fb --- /dev/null +++ b/test/runtime/samples/component-slot-let-c/Nested.html @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-c/_config.js b/test/runtime/samples/component-slot-let-c/_config.js new file mode 100644 index 0000000000..fe8e68b1ac --- /dev/null +++ b/test/runtime/samples/component-slot-let-c/_config.js @@ -0,0 +1,18 @@ +export default { + html: ` + + 0 (undefined) + `, + + async test({ assert, target, window }) { + const button = target.querySelector('button'); + const click = new window.MouseEvent('click'); + + await button.dispatchEvent(click); + + assert.htmlEqual(target.innerHTML, ` + + 1 (undefined) + `); + } +}; diff --git a/test/runtime/samples/component-slot-let-c/main.html b/test/runtime/samples/component-slot-let-c/main.html new file mode 100644 index 0000000000..b834fd8790 --- /dev/null +++ b/test/runtime/samples/component-slot-let-c/main.html @@ -0,0 +1,7 @@ + + + + {c} ({count}) + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-destructured/Nested.html b/test/runtime/samples/component-slot-let-destructured/Nested.html new file mode 100644 index 0000000000..38c6ed6cbe --- /dev/null +++ b/test/runtime/samples/component-slot-let-destructured/Nested.html @@ -0,0 +1,5 @@ +
    + {#each things as thing} + + {/each} +
    \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-destructured/_config.js b/test/runtime/samples/component-slot-let-destructured/_config.js new file mode 100644 index 0000000000..d7aaae2d77 --- /dev/null +++ b/test/runtime/samples/component-slot-let-destructured/_config.js @@ -0,0 +1,34 @@ +export default { + props: { + things: [ + { num: 1 }, + { num: 2 }, + { num: 3 } + ] + }, + + html: ` +
    + 1 + 2 + 3 +
    `, + + test({ assert, component, target }) { + component.things = [ + { num: 1 }, + { num: 2 }, + { num: 3 }, + { num: 4 } + ]; + + assert.htmlEqual(target.innerHTML, ` +
    + 1 + 2 + 3 + 4 +
    + `); + } +}; diff --git a/test/runtime/samples/component-slot-let-destructured/main.html b/test/runtime/samples/component-slot-let-destructured/main.html new file mode 100644 index 0000000000..488fd463de --- /dev/null +++ b/test/runtime/samples/component-slot-let-destructured/main.html @@ -0,0 +1,9 @@ + + + + {num} + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-named/Nested.html b/test/runtime/samples/component-slot-let-named/Nested.html new file mode 100644 index 0000000000..d95593fc18 --- /dev/null +++ b/test/runtime/samples/component-slot-let-named/Nested.html @@ -0,0 +1,5 @@ +
    + {#each things as thing} + + {/each} +
    \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-named/_config.js b/test/runtime/samples/component-slot-let-named/_config.js new file mode 100644 index 0000000000..f65448af93 --- /dev/null +++ b/test/runtime/samples/component-slot-let-named/_config.js @@ -0,0 +1,24 @@ +export default { + props: { + things: [1, 2, 3] + }, + + html: ` +
    +
    1
    +
    2
    +
    3
    +
    `, + + test({ assert, component, target }) { + component.things = [1, 2, 3, 4]; + assert.htmlEqual(target.innerHTML, ` +
    +
    1
    +
    2
    +
    3
    +
    4
    +
    + `); + } +}; diff --git a/test/runtime/samples/component-slot-let-named/main.html b/test/runtime/samples/component-slot-let-named/main.html new file mode 100644 index 0000000000..1c3d3365c7 --- /dev/null +++ b/test/runtime/samples/component-slot-let-named/main.html @@ -0,0 +1,11 @@ + + + +
    + {thing} +
    +
    \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let/Nested.html b/test/runtime/samples/component-slot-let/Nested.html new file mode 100644 index 0000000000..38c6ed6cbe --- /dev/null +++ b/test/runtime/samples/component-slot-let/Nested.html @@ -0,0 +1,5 @@ +
    + {#each things as thing} + + {/each} +
    \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let/_config.js b/test/runtime/samples/component-slot-let/_config.js new file mode 100644 index 0000000000..d66f613bb4 --- /dev/null +++ b/test/runtime/samples/component-slot-let/_config.js @@ -0,0 +1,24 @@ +export default { + props: { + things: [1, 2, 3] + }, + + html: ` +
    + 1 + 2 + 3 +
    `, + + test({ assert, component, target }) { + component.things = [1, 2, 3, 4]; + assert.htmlEqual(target.innerHTML, ` +
    + 1 + 2 + 3 + 4 +
    + `); + } +}; diff --git a/test/runtime/samples/component-slot-let/main.html b/test/runtime/samples/component-slot-let/main.html new file mode 100644 index 0000000000..76d491389f --- /dev/null +++ b/test/runtime/samples/component-slot-let/main.html @@ -0,0 +1,9 @@ + + + + {thing} + \ No newline at end of file diff --git a/test/runtime/samples/context-api/Tab.html b/test/runtime/samples/context-api/Tab.html new file mode 100644 index 0000000000..2f9793aed8 --- /dev/null +++ b/test/runtime/samples/context-api/Tab.html @@ -0,0 +1,17 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/context-api/TabList.html b/test/runtime/samples/context-api/TabList.html new file mode 100644 index 0000000000..08c86216ae --- /dev/null +++ b/test/runtime/samples/context-api/TabList.html @@ -0,0 +1,3 @@ +
    + +
    \ No newline at end of file diff --git a/test/runtime/samples/context-api/TabPanel.html b/test/runtime/samples/context-api/TabPanel.html new file mode 100644 index 0000000000..e15dfca021 --- /dev/null +++ b/test/runtime/samples/context-api/TabPanel.html @@ -0,0 +1,16 @@ + + +{#if $selectedPanel === panel} + +{/if} \ No newline at end of file diff --git a/test/runtime/samples/context-api/Tabs.html b/test/runtime/samples/context-api/Tabs.html new file mode 100644 index 0000000000..6692bb31e9 --- /dev/null +++ b/test/runtime/samples/context-api/Tabs.html @@ -0,0 +1,52 @@ + + + + + + +
    + +
    \ No newline at end of file diff --git a/test/runtime/samples/context-api/_config.js b/test/runtime/samples/context-api/_config.js new file mode 100644 index 0000000000..1bc475a156 --- /dev/null +++ b/test/runtime/samples/context-api/_config.js @@ -0,0 +1,73 @@ +export default { + html: ` +
    +
    + + +
    + +

    Small panel

    +
    + `, + + async test({ assert, component, target, window }) { + const click = new window.MouseEvent('click'); + let buttons = target.querySelectorAll('button'); + + await buttons[1].dispatchEvent(click); + + assert.htmlEqual(target.innerHTML, ` +
    +
    + + +
    + +

    Large panel

    +
    + `); + + component.show_medium = true; + + assert.htmlEqual(target.innerHTML, ` +
    +
    + + + +
    + +

    Large panel

    +
    + `); + + buttons = target.querySelectorAll('button'); + + await buttons[1].dispatchEvent(click); + + assert.htmlEqual(target.innerHTML, ` +
    +
    + + + +
    + +

    Medium panel

    +
    + `); + + component.show_medium = false; + + assert.htmlEqual(target.innerHTML, ` +
    +
    + + +
    + +

    Large panel

    +
    + `); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/context-api/main.html b/test/runtime/samples/context-api/main.html new file mode 100644 index 0000000000..ef3ee996d5 --- /dev/null +++ b/test/runtime/samples/context-api/main.html @@ -0,0 +1,30 @@ + + + + + small + {#if show_medium}medium{/if} + large + + + +

    Small panel

    +
    + + {#if show_medium} + +

    Medium panel

    +
    + {/if} + + +

    Large panel

    +
    +
    \ No newline at end of file diff --git a/test/validator/samples/component-slot-each-block/errors.json b/test/validator/samples/component-slot-each-block/errors.json deleted file mode 100644 index 97f88e4e60..0000000000 --- a/test/validator/samples/component-slot-each-block/errors.json +++ /dev/null @@ -1,15 +0,0 @@ -[{ - "code": "invalid-slot-placement", - "message": " cannot be a child of an each-block", - "start": { - "line": 2, - "column": 1, - "character": 25 - }, - "end": { - "line": 2, - "column": 1, - "character": 25 - }, - "pos": 25 -}] \ No newline at end of file diff --git a/test/validator/samples/component-slot-each-block/input.html b/test/validator/samples/component-slot-each-block/input.html deleted file mode 100644 index ddc27a7d0d..0000000000 --- a/test/validator/samples/component-slot-each-block/input.html +++ /dev/null @@ -1,3 +0,0 @@ -{#each things as thing} - -{/each} \ No newline at end of file From 9ff39c034ba92c2e673464a8738c39da67e57029 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 26 Jan 2019 19:19:19 -0500 Subject: [PATCH 059/125] bump alpha version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b1307936c7..ce86c0b2ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha19", + "version": "3.0.0-alpha20", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index.js", From ebd0b5ed0f48733b47bc00389725f3943cebfb40 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 26 Jan 2019 20:52:56 -0500 Subject: [PATCH 060/125] update rollup-plugin-sucrase --- package-lock.json | 12 ++++++------ package.json | 2 +- rollup.config.js | 4 +--- src/compile/render-dom/wrappers/Fragment.ts | 4 ++-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 178493db83..072761ad08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha18", + "version": "3.0.0-alpha20", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -209,7 +209,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 }, @@ -4787,13 +4787,13 @@ } }, "rollup-plugin-sucrase": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-sucrase/-/rollup-plugin-sucrase-2.0.0.tgz", - "integrity": "sha512-Gyb1eoOPXuODqz5z7y2UpNrYGOBvlxFVDVWgq9n6bn2ly9MMSlWW3YwflKRUj6popOCaxHSmKo1dH0jHoR14PQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-sucrase/-/rollup-plugin-sucrase-2.1.0.tgz", + "integrity": "sha512-chdA3OruR1FH/IIKrzZCpGKLXAx3DOHoK24RIPtlVccK0wbTpHE0HpGEQYCxte1XaB17NgRe/frFyKR7g45qxQ==", "dev": true, "requires": { "rollup-pluginutils": "^2.3.0", - "sucrase": "^3.9.5" + "sucrase": "3.x" } }, "rollup-plugin-typescript": { diff --git a/package.json b/package.json index ce86c0b2ae..6cc7dc89c9 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "rollup-plugin-json": "^3.0.0", "rollup-plugin-node-resolve": "^4.0.0", "rollup-plugin-replace": "^2.0.0", - "rollup-plugin-sucrase": "^2.0.0", + "rollup-plugin-sucrase": "^2.1.0", "rollup-plugin-typescript": "^1.0.0", "rollup-plugin-virtual": "^1.0.1", "rollup-watch": "^4.3.1", diff --git a/rollup.config.js b/rollup.config.js index a67cbb2553..ad58d25f22 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -43,9 +43,7 @@ export default [ replace({ __VERSION__: pkg.version }), - resolve({ - extensions: ['.js', '.ts'] - }), + resolve(), commonjs({ include: ['node_modules/**'] }), diff --git a/src/compile/render-dom/wrappers/Fragment.ts b/src/compile/render-dom/wrappers/Fragment.ts index e4d989f9a5..4c9ae10d65 100644 --- a/src/compile/render-dom/wrappers/Fragment.ts +++ b/src/compile/render-dom/wrappers/Fragment.ts @@ -3,10 +3,10 @@ import AwaitBlock from './AwaitBlock'; import Body from './Body'; import DebugTag from './DebugTag'; import EachBlock from './EachBlock'; -import Element from './Element'; +import Element from './Element/index'; import Head from './Head'; import IfBlock from './IfBlock'; -import InlineComponent from './InlineComponent'; +import InlineComponent from './InlineComponent/index'; import MustacheTag from './MustacheTag'; import RawMustacheTag from './RawMustacheTag'; import Slot from './Slot'; From eccc8b264d9855190fa74c1bf59098c9fd9efc18 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 26 Jan 2019 22:29:01 -0500 Subject: [PATCH 061/125] =?UTF-8?q?Implement=20local=20transitions=20?= =?UTF-8?q?=E2=80=94=20fixes=20#1480?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compile/nodes/Transition.ts | 2 + src/compile/render-dom/Block.ts | 10 +- src/compile/render-dom/wrappers/EachBlock.ts | 18 +- .../render-dom/wrappers/Element/index.ts | 63 +++++-- src/compile/render-dom/wrappers/IfBlock.ts | 15 +- .../wrappers/InlineComponent/index.ts | 20 ++- src/internal/await-block.js | 4 +- src/internal/keyed-each.js | 4 +- .../component-static-array/expected.js | 8 +- .../component-static-immutable/expected.js | 8 +- .../component-static-immutable2/expected.js | 8 +- test/js/samples/component-static/expected.js | 8 +- test/js/samples/dynamic-import/expected.js | 8 +- .../non-imported-component/expected.js | 12 +- test/js/samples/transition-local/expected.js | 162 ++++++++++++++++++ test/js/samples/transition-local/input.html | 12 ++ .../transition-js-local-and-global/_config.js | 67 ++++++++ .../transition-js-local-and-global/main.html | 20 +++ .../_config.js | 31 ++++ .../main.html | 19 ++ .../Widget.html | 12 ++ .../_config.js | 24 +++ .../main.html | 9 + .../_config.js | 30 ++++ .../main.html | 19 ++ .../_config.js | 30 ++++ .../transition-js-local-nested-each/main.html | 19 ++ .../transition-js-local-nested-if/_config.js | 40 +++++ .../transition-js-local-nested-if/main.html | 19 ++ .../samples/transition-js-local/_config.js | 40 +++++ .../samples/transition-js-local/main.html | 19 ++ 31 files changed, 688 insertions(+), 72 deletions(-) create mode 100644 test/js/samples/transition-local/expected.js create mode 100644 test/js/samples/transition-local/input.html create mode 100644 test/runtime/samples/transition-js-local-and-global/_config.js create mode 100644 test/runtime/samples/transition-js-local-and-global/main.html create mode 100644 test/runtime/samples/transition-js-local-nested-await/_config.js create mode 100644 test/runtime/samples/transition-js-local-nested-await/main.html create mode 100644 test/runtime/samples/transition-js-local-nested-component/Widget.html create mode 100644 test/runtime/samples/transition-js-local-nested-component/_config.js create mode 100644 test/runtime/samples/transition-js-local-nested-component/main.html create mode 100644 test/runtime/samples/transition-js-local-nested-each-keyed/_config.js create mode 100644 test/runtime/samples/transition-js-local-nested-each-keyed/main.html create mode 100644 test/runtime/samples/transition-js-local-nested-each/_config.js create mode 100644 test/runtime/samples/transition-js-local-nested-each/main.html create mode 100644 test/runtime/samples/transition-js-local-nested-if/_config.js create mode 100644 test/runtime/samples/transition-js-local-nested-if/main.html create mode 100644 test/runtime/samples/transition-js-local/_config.js create mode 100644 test/runtime/samples/transition-js-local/main.html diff --git a/src/compile/nodes/Transition.ts b/src/compile/nodes/Transition.ts index b77b57f21b..a0e42d939e 100644 --- a/src/compile/nodes/Transition.ts +++ b/src/compile/nodes/Transition.ts @@ -7,6 +7,7 @@ export default class Transition extends Node { name: string; directive: string; expression: Expression; + is_local: boolean; constructor(component: Component, parent, scope, info) { super(component, parent, scope, info); @@ -15,6 +16,7 @@ export default class Transition extends Node { this.name = info.name; this.directive = info.intro && info.outro ? 'transition' : info.intro ? 'in' : 'out'; + this.is_local = info.modifiers.includes('local'); if ((info.intro && parent.intro) || (info.outro && parent.outro)) { const parentTransition = (parent.intro || parent.outro); diff --git a/src/compile/render-dom/Block.ts b/src/compile/render-dom/Block.ts index bf4823f863..954110b368 100644 --- a/src/compile/render-dom/Block.ts +++ b/src/compile/render-dom/Block.ts @@ -174,13 +174,15 @@ export default class Block { } } - addIntro() { + addIntro(local?: boolean) { this.hasIntros = this.hasIntroMethod = this.renderer.hasIntroTransitions = true; + if (!local && this.parent) this.parent.addIntro(); } - addOutro() { + addOutro(local?: boolean) { this.hasOutros = this.hasOutroMethod = this.renderer.hasOutroTransitions = true; this.outros += 1; + if (!local && this.parent) this.parent.addOutro(); } addAnimation() { @@ -327,7 +329,7 @@ export default class Block { properties.addLine(`i: @noop,`); } else { properties.addBlock(deindent` - ${dev ? 'i: function intro' : 'i'}() { + ${dev ? 'i: function intro' : 'i'}(#local) { ${this.hasOutros && `if (#current) return;`} ${this.builders.intro} }, @@ -338,7 +340,7 @@ export default class Block { properties.addLine(`o: @noop,`); } else { properties.addBlock(deindent` - ${dev ? 'o: function outro' : 'o'}() { + ${dev ? 'o: function outro' : 'o'}(#local) { ${this.builders.outro} }, `); diff --git a/src/compile/render-dom/wrappers/EachBlock.ts b/src/compile/render-dom/wrappers/EachBlock.ts index 39f3407020..7ec9941d5e 100644 --- a/src/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compile/render-dom/wrappers/EachBlock.ts @@ -403,7 +403,7 @@ export default class EachBlockWrapper extends Wrapper { const outroBlock = this.block.hasOutros && block.getUniqueName('outroBlock') if (outroBlock) { block.builders.init.addBlock(deindent` - function ${outroBlock}(i, detach) { + function ${outroBlock}(i, detach, local) { if (${iterations}[i]) { if (detach) { @on_outro(() => { @@ -412,7 +412,7 @@ export default class EachBlockWrapper extends Wrapper { }); } - ${iterations}[i].o(); + ${iterations}[i].o(local); } } `); @@ -434,27 +434,27 @@ export default class EachBlockWrapper extends Wrapper { ${iterations}[#i].c(); ${iterations}[#i].m(${updateMountNode}, ${anchor}); } - ${has_transitions && `${iterations}[#i].i();`} + ${has_transitions && `${iterations}[#i].i(1);`} ` : deindent` ${iterations}[#i] = ${create_each_block}(child_ctx); ${iterations}[#i].c(); ${iterations}[#i].m(${updateMountNode}, ${anchor}); - ${has_transitions && `${iterations}[#i].i();`} + ${has_transitions && `${iterations}[#i].i(1);`} `; const start = this.block.hasUpdateMethod ? '0' : `${iterations}.length`; - let destroy; + let remove_old_blocks; if (this.block.hasOutros) { - destroy = deindent` + remove_old_blocks = deindent` @group_outros(); - for (; #i < ${iterations}.length; #i += 1) ${outroBlock}(#i, 1); + for (; #i < ${iterations}.length; #i += 1) ${outroBlock}(#i, 1, 1); @check_outros(); `; } else { - destroy = deindent` + remove_old_blocks = deindent` for (${this.block.hasUpdateMethod ? `` : `#i = ${this.vars.each_block_value}.${length}`}; #i < ${iterations}.length; #i += 1) { ${iterations}[#i].d(1); } @@ -471,7 +471,7 @@ export default class EachBlockWrapper extends Wrapper { ${forLoopBody} } - ${destroy} + ${remove_old_blocks} `; block.builders.update.addBlock(deindent` diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts index 97654fd19c..c61e81c69c 100644 --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -162,8 +162,8 @@ export default class ElementWrapper extends Wrapper { this.bindings = this.node.bindings.map(binding => new Binding(block, binding, this)); if (node.intro || node.outro) { - if (node.intro) block.addIntro(); - if (node.outro) block.addOutro(); + if (node.intro) block.addIntro(node.intro.is_local); + if (node.outro) block.addOutro(node.outro.is_local); } if (node.animation) { @@ -622,17 +622,34 @@ export default class ElementWrapper extends Wrapper { const fn = component.qualify(intro.name); - block.builders.intro.addBlock(deindent` + const intro_block = deindent` @add_render_callback(() => { if (!${name}) ${name} = @create_bidirectional_transition(${this.var}, ${fn}, ${snippet}, true); ${name}.run(1); }); - `); + `; - block.builders.outro.addBlock(deindent` + const outro_block = deindent` if (!${name}) ${name} = @create_bidirectional_transition(${this.var}, ${fn}, ${snippet}, false); ${name}.run(0); - `); + `; + + if (intro.is_local) { + block.builders.intro.addBlock(deindent` + if (#local) { + ${intro_block} + } + `); + + block.builders.outro.addBlock(deindent` + if (#local) { + ${outro_block} + } + `); + } else { + block.builders.intro.addBlock(intro_block); + block.builders.outro.addBlock(outro_block); + } block.builders.destroy.addConditional('detach', `if (${name}) ${name}.end();`); } @@ -649,25 +666,37 @@ export default class ElementWrapper extends Wrapper { const fn = component.qualify(intro.name); + let intro_block; + if (outro) { - block.builders.intro.addBlock(deindent` + intro_block = deindent` @add_render_callback(() => { if (!${introName}) ${introName} = @create_in_transition(${this.var}, ${fn}, ${snippet}); ${introName}.start(); }); - `); + `; block.builders.outro.addLine(`if (${introName}) ${introName}.invalidate()`); } else { - block.builders.intro.addBlock(deindent` + intro_block = deindent` if (!${introName}) { @add_render_callback(() => { ${introName} = @create_in_transition(${this.var}, ${fn}, ${snippet}); ${introName}.start(); }); } - `); + `; + } + + if (intro.is_local) { + intro_block = deindent` + if (#local) { + ${intro_block} + } + `; } + + block.builders.intro.addBlock(intro_block); } if (outro) { @@ -684,9 +713,19 @@ export default class ElementWrapper extends Wrapper { // TODO hide elements that have outro'd (unless they belong to a still-outroing // group) prior to their removal from the DOM - block.builders.outro.addBlock(deindent` + let outro_block = deindent` ${outroName} = @create_out_transition(${this.var}, ${fn}, ${snippet}); - `); + `; + + if (outro_block) { + outro_block = deindent` + if (#local) { + ${outro_block} + } + `; + } + + block.builders.outro.addBlock(outro_block); block.builders.destroy.addConditional('detach', `if (${outroName}) ${outroName}.end();`); } diff --git a/src/compile/render-dom/wrappers/IfBlock.ts b/src/compile/render-dom/wrappers/IfBlock.ts index 3d12c589ac..46a9357215 100644 --- a/src/compile/render-dom/wrappers/IfBlock.ts +++ b/src/compile/render-dom/wrappers/IfBlock.ts @@ -125,9 +125,6 @@ export default class IfBlockWrapper extends Wrapper { createBranches(this.node); - if (hasIntros) block.addIntro(); - if (hasOutros) block.addOutro(); - blocks.forEach(block => { block.hasUpdateMethod = isDynamic; block.hasIntroMethod = hasIntros; @@ -239,7 +236,7 @@ export default class IfBlockWrapper extends Wrapper { if (${name}) { ${name}.c(); ${name}.m(${updateMountNode}, ${anchor}); - ${has_transitions && `${name}.i();`} + ${has_transitions && `${name}.i(1);`} } `; @@ -327,7 +324,7 @@ export default class IfBlockWrapper extends Wrapper { ${if_blocks}[${previous_block_index}].d(1); ${if_blocks}[${previous_block_index}] = null; }); - ${name}.o(); + ${name}.o(1); @check_outros(); `; @@ -338,7 +335,7 @@ export default class IfBlockWrapper extends Wrapper { ${name}.c(); } ${name}.m(${updateMountNode}, ${anchor}); - ${has_transitions && `${name}.i();`} + ${has_transitions && `${name}.i(1);`} `; const changeBlock = hasElse @@ -415,7 +412,7 @@ export default class IfBlockWrapper extends Wrapper { ${name}.c(); ${name}.m(${updateMountNode}, ${anchor}); } - ${has_transitions && `${name}.i();`} + ${has_transitions && `${name}.i(1);`} ` : deindent` if (!${name}) { @@ -423,7 +420,7 @@ export default class IfBlockWrapper extends Wrapper { ${name}.c(); ${name}.m(${updateMountNode}, ${anchor}); } - ${has_transitions && `${name}.i();`} + ${has_transitions && `${name}.i(1);`} `; // no `p()` here — we don't want to update outroing nodes, @@ -436,7 +433,7 @@ export default class IfBlockWrapper extends Wrapper { ${name} = null; }); - ${name}.o(); + ${name}.o(1); @check_outros(); ` : deindent` diff --git a/src/compile/render-dom/wrappers/InlineComponent/index.ts b/src/compile/render-dom/wrappers/InlineComponent/index.ts index 5a97be48eb..67de8adf58 100644 --- a/src/compile/render-dom/wrappers/InlineComponent/index.ts +++ b/src/compile/render-dom/wrappers/InlineComponent/index.ts @@ -397,7 +397,7 @@ export default class InlineComponentWrapper extends Wrapper { @on_outro(() => { old_component.$destroy(); }); - old_component.$$.fragment.o(); + old_component.$$.fragment.o(1); @check_outros(); } @@ -409,7 +409,7 @@ export default class InlineComponentWrapper extends Wrapper { ${name}.$$.fragment.c(); @mount_component(${name}, ${updateMountNode}, ${anchor}); - ${name}.$$.fragment.i(); + ${name}.$$.fragment.i(1); } else { ${name} = null; } @@ -417,7 +417,7 @@ export default class InlineComponentWrapper extends Wrapper { `); block.builders.intro.addBlock(deindent` - if (${name}) ${name}.$$.fragment.i(); + if (${name}) ${name}.$$.fragment.i(#local); `); if (updates.length) { @@ -430,6 +430,10 @@ export default class InlineComponentWrapper extends Wrapper { `); } + block.builders.outro.addLine( + `if (${name}) ${name}.$$.fragment.o(#local);` + ); + block.builders.destroy.addLine(`if (${name}) ${name}.$destroy(${parentNode ? '' : 'detach'});`); } else { const expression = this.node.name === 'svelte:self' @@ -459,7 +463,7 @@ export default class InlineComponentWrapper extends Wrapper { ); block.builders.intro.addBlock(deindent` - ${name}.$$.fragment.i(); + ${name}.$$.fragment.i(#local); `); if (updates.length) { @@ -473,11 +477,11 @@ export default class InlineComponentWrapper extends Wrapper { block.builders.destroy.addBlock(deindent` ${name}.$destroy(${parentNode ? '' : 'detach'}); `); - } - block.builders.outro.addLine( - `if (${name}) ${name}.$$.fragment.o();` - ); + block.builders.outro.addLine( + `${name}.$$.fragment.o(#local);` + ); + } } } diff --git a/src/internal/await-block.js b/src/internal/await-block.js index 2e10250b4c..143694b04a 100644 --- a/src/internal/await-block.js +++ b/src/internal/await-block.js @@ -22,7 +22,7 @@ export function handlePromise(promise, info) { block.d(1); info.blocks[i] = null; }); - block.o(); + block.o(1); check_outros(); } }); @@ -32,7 +32,7 @@ export function handlePromise(promise, info) { block.c(); block.m(info.mount(), info.anchor); - if (block.i) block.i(); + if (block.i) block.i(1); flush(); } diff --git a/src/internal/keyed-each.js b/src/internal/keyed-each.js index 76e233f2ed..1ef9e27437 100644 --- a/src/internal/keyed-each.js +++ b/src/internal/keyed-each.js @@ -10,7 +10,7 @@ export function outroAndDestroyBlock(block, lookup) { destroyBlock(block, lookup); }); - block.o(); + block.o(1); } export function fixAndOutroAndDestroyBlock(block, lookup) { @@ -53,7 +53,7 @@ export function updateKeyedEach(old_blocks, changed, get_key, dynamic, ctx, list function insert(block) { block.m(node, next); - if (block.i) block.i(); + if (block.i) block.i(1); lookup[block.key] = block; next = block.first; n--; diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js index 7fbcc27382..7e8b1d8581 100644 --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -17,15 +17,15 @@ function create_fragment(ctx) { p: noop, - i() { + i(local) { if (current) return; - nested.$$.fragment.i(); + nested.$$.fragment.i(local); current = true; }, - o() { - if (nested) nested.$$.fragment.o(); + o(local) { + nested.$$.fragment.o(local); current = false; }, diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js index e3dc618115..aa5f88b86f 100644 --- a/test/js/samples/component-static-immutable/expected.js +++ b/test/js/samples/component-static-immutable/expected.js @@ -17,15 +17,15 @@ function create_fragment(ctx) { p: noop, - i() { + i(local) { if (current) return; - nested.$$.fragment.i(); + nested.$$.fragment.i(local); current = true; }, - o() { - if (nested) nested.$$.fragment.o(); + o(local) { + nested.$$.fragment.o(local); current = false; }, diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js index e3dc618115..aa5f88b86f 100644 --- a/test/js/samples/component-static-immutable2/expected.js +++ b/test/js/samples/component-static-immutable2/expected.js @@ -17,15 +17,15 @@ function create_fragment(ctx) { p: noop, - i() { + i(local) { if (current) return; - nested.$$.fragment.i(); + nested.$$.fragment.i(local); current = true; }, - o() { - if (nested) nested.$$.fragment.o(); + o(local) { + nested.$$.fragment.o(local); current = false; }, diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js index 014e1caefb..113a858257 100644 --- a/test/js/samples/component-static/expected.js +++ b/test/js/samples/component-static/expected.js @@ -17,15 +17,15 @@ function create_fragment(ctx) { p: noop, - i() { + i(local) { if (current) return; - nested.$$.fragment.i(); + nested.$$.fragment.i(local); current = true; }, - o() { - if (nested) nested.$$.fragment.o(); + o(local) { + nested.$$.fragment.o(local); current = false; }, diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index 8ccacdd398..7f7f8e39fd 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -18,15 +18,15 @@ function create_fragment(ctx) { p: noop, - i() { + i(local) { if (current) return; - lazyload.$$.fragment.i(); + lazyload.$$.fragment.i(local); current = true; }, - o() { - if (lazyload) lazyload.$$.fragment.o(); + o(local) { + lazyload.$$.fragment.o(local); current = false; }, diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index a917990426..0da9a66b98 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -24,18 +24,18 @@ function create_fragment(ctx) { p: noop, - i() { + i(local) { if (current) return; - imported.$$.fragment.i(); + imported.$$.fragment.i(local); - nonimported.$$.fragment.i(); + nonimported.$$.fragment.i(local); current = true; }, - o() { - if (imported) imported.$$.fragment.o(); - if (nonimported) nonimported.$$.fragment.o(); + o(local) { + imported.$$.fragment.o(local); + nonimported.$$.fragment.o(local); current = false; }, diff --git a/test/js/samples/transition-local/expected.js b/test/js/samples/transition-local/expected.js new file mode 100644 index 0000000000..1e96247f19 --- /dev/null +++ b/test/js/samples/transition-local/expected.js @@ -0,0 +1,162 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, add_render_callback, createComment, createElement, create_in_transition, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; + +// (8:0) {#if x} +function create_if_block(ctx) { + var if_block_anchor; + + var if_block = (ctx.y) && create_if_block_1(ctx); + + return { + c() { + if (if_block) if_block.c(); + if_block_anchor = createComment(); + }, + + m(target, anchor) { + if (if_block) if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + + p(changed, ctx) { + if (ctx.y) { + if (!if_block) { + if_block = create_if_block_1(ctx); + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + if_block.i(1); + } else if (if_block) { + if_block.d(1); + if_block = null; + } + }, + + d(detach) { + if (if_block) if_block.d(detach); + + if (detach) { + detachNode(if_block_anchor); + } + } + }; +} + +// (9:1) {#if y} +function create_if_block_1(ctx) { + var div, div_intro; + + return { + c() { + div = createElement("div"); + div.textContent = "..."; + }, + + m(target, anchor) { + insert(target, div, anchor); + }, + + i(local) { + if (local) { + if (!div_intro) { + add_render_callback(() => { + div_intro = create_in_transition(div, foo, {}); + div_intro.start(); + }); + } + } + }, + + o: noop, + + d(detach) { + if (detach) { + detachNode(div); + } + } + }; +} + +function create_fragment(ctx) { + var if_block_anchor; + + var if_block = (ctx.x) && create_if_block(ctx); + + return { + c() { + if (if_block) if_block.c(); + if_block_anchor = createComment(); + }, + + m(target, anchor) { + if (if_block) if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + + p(changed, ctx) { + if (ctx.x) { + if (if_block) { + if_block.p(changed, ctx); + } else { + if_block = create_if_block(ctx); + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + }, + + i: noop, + o: noop, + + d(detach) { + if (if_block) if_block.d(detach); + + if (detach) { + detachNode(if_block_anchor); + } + } + }; +} + +function foo() {} + +function instance($$self, $$props, $$invalidate) { + let { x, y } = $$props; + + $$self.$set = $$props => { + if ('x' in $$props) $$invalidate('x', x = $$props.x); + if ('y' in $$props) $$invalidate('y', y = $$props.y); + }; + + return { x, y }; +} + +class SvelteComponent extends SvelteComponent_1 { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal); + } + + get x() { + return this.$$.ctx.x; + } + + set x(x) { + this.$set({ x }); + flush(); + } + + get y() { + return this.$$.ctx.y; + } + + set y(y) { + this.$set({ y }); + flush(); + } +} + +export default SvelteComponent; \ No newline at end of file diff --git a/test/js/samples/transition-local/input.html b/test/js/samples/transition-local/input.html new file mode 100644 index 0000000000..3f87627c62 --- /dev/null +++ b/test/js/samples/transition-local/input.html @@ -0,0 +1,12 @@ + + +{#if x} + {#if y} +
    ...
    + {/if} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-and-global/_config.js b/test/runtime/samples/transition-js-local-and-global/_config.js new file mode 100644 index 0000000000..b7f8baa7ee --- /dev/null +++ b/test/runtime/samples/transition-js-local-and-global/_config.js @@ -0,0 +1,67 @@ +export default { + props: { + x: false, + y: true + }, + + test({ assert, component, target, raf }) { + // first, toggle x — first element should snap in + // and out while second one transitions + component.x = true; + + let divs = target.querySelectorAll('div'); + assert.equal(divs[0].foo, undefined); + assert.equal(divs[1].foo, 0); + + raf.tick(50); + assert.equal(divs[0].foo, undefined); + assert.equal(divs[1].foo, 0.5); + + raf.tick(100); + + component.x = false; + assert.htmlEqual(target.innerHTML, ` +
    snaps if x changes
    +
    transitions if x changes
    + `); + + raf.tick(150); + assert.equal(divs[0].foo, undefined); + assert.equal(divs[1].foo, 0.5); + + raf.tick(200); + assert.htmlEqual(target.innerHTML, ''); + + // then toggle y + component.y = false; + component.x = true; + component.y = true; + + assert.htmlEqual(target.innerHTML, ` +
    snaps if x changes
    +
    transitions if x changes
    + `); + divs = target.querySelectorAll('div'); + + raf.tick(250); + assert.equal(divs[0].foo, 0.5); + assert.equal(divs[1].foo, 0.5); + + raf.tick(300); + assert.equal(divs[0].foo, 1); + assert.equal(divs[1].foo, 1); + + component.y = false; + assert.htmlEqual(target.innerHTML, ` +
    snaps if x changes
    +
    transitions if x changes
    + `); + + raf.tick(320); + assert.equal(divs[0].foo, 0.8); + assert.equal(divs[1].foo, 0.8); + + raf.tick(400); + assert.htmlEqual(target.innerHTML, ''); + }, +}; diff --git a/test/runtime/samples/transition-js-local-and-global/main.html b/test/runtime/samples/transition-js-local-and-global/main.html new file mode 100644 index 0000000000..18fbaa1b78 --- /dev/null +++ b/test/runtime/samples/transition-js-local-and-global/main.html @@ -0,0 +1,20 @@ + + +{#if x} + {#if y} +
    snaps if x changes
    +
    transitions if x changes
    + {/if} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-await/_config.js b/test/runtime/samples/transition-js-local-nested-await/_config.js new file mode 100644 index 0000000000..b07d88741f --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-await/_config.js @@ -0,0 +1,31 @@ +let fulfil; + +const promise = new Promise(f => { + fulfil = f; +}); + +export default { + props: { + x: false, + promise + }, + + test({ assert, component, target, raf }) { + component.x = true; + fulfil(); + + return promise.then(() => { + const div = target.querySelector('div'); + assert.equal(div.foo, 0); + + raf.tick(100); + assert.equal(div.foo, 1); + + component.x = false; + assert.htmlEqual(target.innerHTML, ''); + + raf.tick(150); + assert.equal(div.foo, 1); + }); + } +}; diff --git a/test/runtime/samples/transition-js-local-nested-await/main.html b/test/runtime/samples/transition-js-local-nested-await/main.html new file mode 100644 index 0000000000..618dd3088d --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-await/main.html @@ -0,0 +1,19 @@ + + +{#if x} + {#await promise then value} +
    + {/await} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-component/Widget.html b/test/runtime/samples/transition-js-local-nested-component/Widget.html new file mode 100644 index 0000000000..f3baa4b004 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-component/Widget.html @@ -0,0 +1,12 @@ + + +
    \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-component/_config.js b/test/runtime/samples/transition-js-local-nested-component/_config.js new file mode 100644 index 0000000000..87d7aaa233 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-component/_config.js @@ -0,0 +1,24 @@ +export default { + props: { + x: false + }, + + test({ assert, component, target, raf }) { + component.x = true; + + const div = target.querySelector('div'); + assert.equal(div.foo, 0); + + raf.tick(100); + assert.equal(div.foo, 1); + + component.x = false; + assert.htmlEqual(target.innerHTML, '
    '); + + raf.tick(150); + assert.equal(div.foo, 0.5); + + raf.tick(200); + assert.htmlEqual(target.innerHTML, ''); + } +}; diff --git a/test/runtime/samples/transition-js-local-nested-component/main.html b/test/runtime/samples/transition-js-local-nested-component/main.html new file mode 100644 index 0000000000..2eb867a667 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-component/main.html @@ -0,0 +1,9 @@ + + +{#if x} + +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-each-keyed/_config.js b/test/runtime/samples/transition-js-local-nested-each-keyed/_config.js new file mode 100644 index 0000000000..0595e67013 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-each-keyed/_config.js @@ -0,0 +1,30 @@ +export default { + props: { + x: false, + things: ['a'] + }, + + test({ assert, component, target, raf }) { + component.x = true; + + const div1 = target.querySelector('div'); + assert.equal(div1.foo, undefined); + + raf.tick(100); + assert.equal(div1.foo, undefined); + + component.things = ['a', 'b']; + assert.htmlEqual(target.innerHTML, '
    '); + + const div2 = target.querySelector('div:last-child'); + assert.equal(div1.foo, undefined); + assert.equal(div2.foo, 0); + + raf.tick(200); + assert.equal(div1.foo, undefined); + assert.equal(div2.foo, 1); + + component.x = false; + assert.htmlEqual(target.innerHTML, ''); + }, +}; diff --git a/test/runtime/samples/transition-js-local-nested-each-keyed/main.html b/test/runtime/samples/transition-js-local-nested-each-keyed/main.html new file mode 100644 index 0000000000..90b6d110a7 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-each-keyed/main.html @@ -0,0 +1,19 @@ + + +{#if x} + {#each things as thing (thing)} +
    + {/each} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-each/_config.js b/test/runtime/samples/transition-js-local-nested-each/_config.js new file mode 100644 index 0000000000..0595e67013 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-each/_config.js @@ -0,0 +1,30 @@ +export default { + props: { + x: false, + things: ['a'] + }, + + test({ assert, component, target, raf }) { + component.x = true; + + const div1 = target.querySelector('div'); + assert.equal(div1.foo, undefined); + + raf.tick(100); + assert.equal(div1.foo, undefined); + + component.things = ['a', 'b']; + assert.htmlEqual(target.innerHTML, '
    '); + + const div2 = target.querySelector('div:last-child'); + assert.equal(div1.foo, undefined); + assert.equal(div2.foo, 0); + + raf.tick(200); + assert.equal(div1.foo, undefined); + assert.equal(div2.foo, 1); + + component.x = false; + assert.htmlEqual(target.innerHTML, ''); + }, +}; diff --git a/test/runtime/samples/transition-js-local-nested-each/main.html b/test/runtime/samples/transition-js-local-nested-each/main.html new file mode 100644 index 0000000000..feaadd9283 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-each/main.html @@ -0,0 +1,19 @@ + + +{#if x} + {#each things as thing} +
    + {/each} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-if/_config.js b/test/runtime/samples/transition-js-local-nested-if/_config.js new file mode 100644 index 0000000000..d1550c0cff --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-if/_config.js @@ -0,0 +1,40 @@ +export default { + props: { + x: false, + y: true + }, + + test({ assert, component, target, raf }) { + component.x = true; + + let div = target.querySelector('div'); + assert.equal(div.foo, undefined); + + component.y = false; + assert.htmlEqual(target.innerHTML, '
    '); + div = target.querySelector('div'); + + raf.tick(50); + assert.equal(div.foo, 0.5); + + raf.tick(100); + assert.htmlEqual(target.innerHTML, ''); + + component.x = false; + component.y = true; + assert.htmlEqual(target.innerHTML, ''); + + component.x = true; + assert.htmlEqual(target.innerHTML, '
    '); + div = target.querySelector('div'); + + component.y = false; + assert.htmlEqual(target.innerHTML, '
    '); + + raf.tick(150); + assert.equal(div.foo, 0.5); + + raf.tick(200); + assert.htmlEqual(target.innerHTML, ''); + }, +}; diff --git a/test/runtime/samples/transition-js-local-nested-if/main.html b/test/runtime/samples/transition-js-local-nested-if/main.html new file mode 100644 index 0000000000..cbdfbd8c25 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-if/main.html @@ -0,0 +1,19 @@ + + +{#if x} + {#if y} +
    + {/if} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local/_config.js b/test/runtime/samples/transition-js-local/_config.js new file mode 100644 index 0000000000..fa8a55bfcd --- /dev/null +++ b/test/runtime/samples/transition-js-local/_config.js @@ -0,0 +1,40 @@ +export default { + props: { + x: false, + y: true + }, + + test({ assert, component, target, window, raf }) { + component.x = true; + + let div = target.querySelector('div'); + assert.equal(div.foo, undefined); + + component.y = false; + assert.htmlEqual(target.innerHTML, '
    '); + div = target.querySelector('div'); + + raf.tick(50); + assert.equal(div.foo, 0.5); + + raf.tick(100); + assert.htmlEqual(target.innerHTML, ''); + + component.x = false; + component.y = true; + assert.htmlEqual(target.innerHTML, ''); + + component.x = true; + assert.htmlEqual(target.innerHTML, '
    '); + div = target.querySelector('div'); + + component.y = false; + assert.htmlEqual(target.innerHTML, '
    '); + + raf.tick(120); + assert.equal(div.foo, 0.8); + + raf.tick(200); + assert.htmlEqual(target.innerHTML, ''); + }, +}; diff --git a/test/runtime/samples/transition-js-local/main.html b/test/runtime/samples/transition-js-local/main.html new file mode 100644 index 0000000000..cbdfbd8c25 --- /dev/null +++ b/test/runtime/samples/transition-js-local/main.html @@ -0,0 +1,19 @@ + + +{#if x} + {#if y} +
    + {/if} +{/if} \ No newline at end of file From fcbb8e6efff72bc8a6e01725811c099ed0b212cb Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 26 Jan 2019 22:53:40 -0500 Subject: [PATCH 062/125] failing tests for #2000 --- .../_config.js | 25 +++++++++++++++++++ .../main.html | 16 ++++++++++++ .../transition-js-each-unchanged/_config.js | 25 +++++++++++++++++++ .../transition-js-each-unchanged/main.html | 16 ++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 test/runtime/samples/transition-js-each-keyed-unchanged/_config.js create mode 100644 test/runtime/samples/transition-js-each-keyed-unchanged/main.html create mode 100644 test/runtime/samples/transition-js-each-unchanged/_config.js create mode 100644 test/runtime/samples/transition-js-each-unchanged/main.html diff --git a/test/runtime/samples/transition-js-each-keyed-unchanged/_config.js b/test/runtime/samples/transition-js-each-keyed-unchanged/_config.js new file mode 100644 index 0000000000..b3a1882196 --- /dev/null +++ b/test/runtime/samples/transition-js-each-keyed-unchanged/_config.js @@ -0,0 +1,25 @@ +export default { + props: { + numbers: [1, 2, 3, 4, 5] + }, + + test({ assert, component, target, raf }) { + const divs1 = target.querySelectorAll('div'); + assert.equal(divs1[0].foo, undefined); + + component.numbers = [1, 2, 5, 4, 3]; + const divs2 = target.querySelectorAll('div'); + + assert.equal(divs1[0], divs2[0]); + assert.equal(divs1[1], divs2[1]); + assert.equal(divs1[2], divs2[4]); + assert.equal(divs1[3], divs2[3]); + assert.equal(divs1[4], divs2[2]); + + assert.equal(divs1[0].foo, undefined); + assert.equal(divs1[1].foo, undefined); + assert.equal(divs1[2].foo, undefined); + assert.equal(divs1[3].foo, undefined); + assert.equal(divs1[4].foo, undefined); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/transition-js-each-keyed-unchanged/main.html b/test/runtime/samples/transition-js-each-keyed-unchanged/main.html new file mode 100644 index 0000000000..ef2426c2db --- /dev/null +++ b/test/runtime/samples/transition-js-each-keyed-unchanged/main.html @@ -0,0 +1,16 @@ + + +{#each numbers as num, i (num)} +
    {num}
    +{/each} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-each-unchanged/_config.js b/test/runtime/samples/transition-js-each-unchanged/_config.js new file mode 100644 index 0000000000..9bd2206211 --- /dev/null +++ b/test/runtime/samples/transition-js-each-unchanged/_config.js @@ -0,0 +1,25 @@ +export default { + props: { + numbers: [1, 2, 3, 4, 5] + }, + + test({ assert, component, target, raf }) { + const divs1 = target.querySelectorAll('div'); + assert.equal(divs1[0].foo, undefined); + + component.numbers = [1, 2, 5, 4, 3]; + const divs2 = target.querySelectorAll('div'); + + assert.equal(divs1[0], divs2[0]); + assert.equal(divs1[1], divs2[1]); + assert.equal(divs1[2], divs2[2]); + assert.equal(divs1[3], divs2[3]); + assert.equal(divs1[4], divs2[4]); + + assert.equal(divs1[0].foo, undefined); + assert.equal(divs1[1].foo, undefined); + assert.equal(divs1[2].foo, undefined); + assert.equal(divs1[3].foo, undefined); + assert.equal(divs1[4].foo, undefined); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/transition-js-each-unchanged/main.html b/test/runtime/samples/transition-js-each-unchanged/main.html new file mode 100644 index 0000000000..d1cee7bd23 --- /dev/null +++ b/test/runtime/samples/transition-js-each-unchanged/main.html @@ -0,0 +1,16 @@ + + +{#each numbers as num, i} +
    {num}
    +{/each} \ No newline at end of file From cdcccfb4e45f83d0e3ecfeb67e98610f0e4de773 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 26 Jan 2019 23:40:05 -0500 Subject: [PATCH 063/125] set current = true on mount as well as intro - fixes #2000 --- src/compile/render-dom/Block.ts | 1 + src/compile/render-dom/wrappers/EachBlock.ts | 5 +++-- src/compile/render-dom/wrappers/Element/index.ts | 11 +++++++---- src/compile/render-dom/wrappers/IfBlock.ts | 11 +++++++---- .../render-dom/wrappers/InlineComponent/index.ts | 2 +- src/internal/Component.js | 2 +- src/internal/await-block.js | 2 +- src/internal/keyed-each.js | 2 +- test/js/samples/component-static-array/expected.js | 1 + .../js/samples/component-static-immutable/expected.js | 1 + .../samples/component-static-immutable2/expected.js | 1 + test/js/samples/component-static/expected.js | 1 + test/js/samples/dynamic-import/expected.js | 1 + test/js/samples/non-imported-component/expected.js | 1 + test/js/samples/transition-local/expected.js | 4 +++- 15 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/compile/render-dom/Block.ts b/src/compile/render-dom/Block.ts index 954110b368..1d5c3c99a2 100644 --- a/src/compile/render-dom/Block.ts +++ b/src/compile/render-dom/Block.ts @@ -223,6 +223,7 @@ export default class Block { if (!this.builders.intro.isEmpty()) { this.builders.intro.addLine(`#current = true;`); + this.builders.mount.addLine(`#current = true;`); } if (!this.builders.outro.isEmpty()) { diff --git a/src/compile/render-dom/wrappers/EachBlock.ts b/src/compile/render-dom/wrappers/EachBlock.ts index 7ec9941d5e..f756a9ce6e 100644 --- a/src/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compile/render-dom/wrappers/EachBlock.ts @@ -429,18 +429,19 @@ export default class EachBlockWrapper extends Wrapper { ? deindent` if (${iterations}[#i]) { ${iterations}[#i].p(changed, child_ctx); + ${has_transitions && `${iterations}[#i].i(1);`} } else { ${iterations}[#i] = ${create_each_block}(child_ctx); ${iterations}[#i].c(); + ${has_transitions && `${iterations}[#i].i(1);`} ${iterations}[#i].m(${updateMountNode}, ${anchor}); } - ${has_transitions && `${iterations}[#i].i(1);`} ` : deindent` ${iterations}[#i] = ${create_each_block}(child_ctx); ${iterations}[#i].c(); - ${iterations}[#i].m(${updateMountNode}, ${anchor}); ${has_transitions && `${iterations}[#i].i(1);`} + ${iterations}[#i].m(${updateMountNode}, ${anchor}); `; const start = this.block.hasUpdateMethod ? '0' : `${iterations}.length`; diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts index c61e81c69c..03ce9eed9f 100644 --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -671,12 +671,13 @@ export default class ElementWrapper extends Wrapper { if (outro) { intro_block = deindent` @add_render_callback(() => { + if (${outroName}) ${outroName}.end(1); if (!${introName}) ${introName} = @create_in_transition(${this.var}, ${fn}, ${snippet}); ${introName}.start(); }); `; - block.builders.outro.addLine(`if (${introName}) ${introName}.invalidate()`); + block.builders.outro.addLine(`if (${introName}) ${introName}.invalidate();`); } else { intro_block = deindent` if (!${introName}) { @@ -707,9 +708,11 @@ export default class ElementWrapper extends Wrapper { const fn = component.qualify(outro.name); - block.builders.intro.addBlock(deindent` - if (${outroName}) ${outroName}.end(1); - `); + if (!intro) { + block.builders.intro.addBlock(deindent` + if (${outroName}) ${outroName}.end(1); + `); + } // TODO hide elements that have outro'd (unless they belong to a still-outroing // group) prior to their removal from the DOM diff --git a/src/compile/render-dom/wrappers/IfBlock.ts b/src/compile/render-dom/wrappers/IfBlock.ts index 46a9357215..c3a8157dbe 100644 --- a/src/compile/render-dom/wrappers/IfBlock.ts +++ b/src/compile/render-dom/wrappers/IfBlock.ts @@ -235,8 +235,8 @@ export default class IfBlockWrapper extends Wrapper { ${name} = ${current_block_type_and}${current_block_type}(ctx); if (${name}) { ${name}.c(); - ${name}.m(${updateMountNode}, ${anchor}); ${has_transitions && `${name}.i(1);`} + ${name}.m(${updateMountNode}, ${anchor}); } `; @@ -334,8 +334,8 @@ export default class IfBlockWrapper extends Wrapper { ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](ctx); ${name}.c(); } - ${name}.m(${updateMountNode}, ${anchor}); ${has_transitions && `${name}.i(1);`} + ${name}.m(${updateMountNode}, ${anchor}); `; const changeBlock = hasElse @@ -407,20 +407,23 @@ export default class IfBlockWrapper extends Wrapper { ? deindent` if (${name}) { ${name}.p(changed, ctx); + ${has_transitions && `${name}.i(1);`} } else { ${name} = ${branch.block.name}(ctx); ${name}.c(); + ${has_transitions && `${name}.i(1);`} ${name}.m(${updateMountNode}, ${anchor}); } - ${has_transitions && `${name}.i(1);`} ` : deindent` if (!${name}) { ${name} = ${branch.block.name}(ctx); ${name}.c(); + ${has_transitions && `${name}.i(1);`} ${name}.m(${updateMountNode}, ${anchor}); + ${has_transitions && `} else { + ${name}.i(1);`} } - ${has_transitions && `${name}.i(1);`} `; // no `p()` here — we don't want to update outroing nodes, diff --git a/src/compile/render-dom/wrappers/InlineComponent/index.ts b/src/compile/render-dom/wrappers/InlineComponent/index.ts index 67de8adf58..75bff825c6 100644 --- a/src/compile/render-dom/wrappers/InlineComponent/index.ts +++ b/src/compile/render-dom/wrappers/InlineComponent/index.ts @@ -408,8 +408,8 @@ export default class InlineComponentWrapper extends Wrapper { ${munged_handlers} ${name}.$$.fragment.c(); - @mount_component(${name}, ${updateMountNode}, ${anchor}); ${name}.$$.fragment.i(1); + @mount_component(${name}, ${updateMountNode}, ${anchor}); } else { ${name} = null; } diff --git a/src/internal/Component.js b/src/internal/Component.js index 8a87654eb7..2698b3fe85 100644 --- a/src/internal/Component.js +++ b/src/internal/Component.js @@ -110,8 +110,8 @@ export function init(component, options, instance, create_fragment, not_equal) { $$.fragment.c(); } - mount_component(component, options.target, options.anchor); if (options.intro && component.$$.fragment.i) component.$$.fragment.i(); + mount_component(component, options.target, options.anchor); flush(); } diff --git a/src/internal/await-block.js b/src/internal/await-block.js index 143694b04a..b09eff8e25 100644 --- a/src/internal/await-block.js +++ b/src/internal/await-block.js @@ -31,8 +31,8 @@ export function handlePromise(promise, info) { } block.c(); - block.m(info.mount(), info.anchor); if (block.i) block.i(1); + block.m(info.mount(), info.anchor); flush(); } diff --git a/src/internal/keyed-each.js b/src/internal/keyed-each.js index 1ef9e27437..6732cac277 100644 --- a/src/internal/keyed-each.js +++ b/src/internal/keyed-each.js @@ -52,8 +52,8 @@ export function updateKeyedEach(old_blocks, changed, get_key, dynamic, ctx, list var did_move = {}; function insert(block) { - block.m(node, next); if (block.i) block.i(1); + block.m(node, next); lookup[block.key] = block; next = block.first; n--; diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js index 7e8b1d8581..14d61da17a 100644 --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -13,6 +13,7 @@ function create_fragment(ctx) { m(target, anchor) { mount_component(nested, target, anchor); + current = true; }, p: noop, diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js index aa5f88b86f..0f15a9ce57 100644 --- a/test/js/samples/component-static-immutable/expected.js +++ b/test/js/samples/component-static-immutable/expected.js @@ -13,6 +13,7 @@ function create_fragment(ctx) { m(target, anchor) { mount_component(nested, target, anchor); + current = true; }, p: noop, diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js index aa5f88b86f..0f15a9ce57 100644 --- a/test/js/samples/component-static-immutable2/expected.js +++ b/test/js/samples/component-static-immutable2/expected.js @@ -13,6 +13,7 @@ function create_fragment(ctx) { m(target, anchor) { mount_component(nested, target, anchor); + current = true; }, p: noop, diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js index 113a858257..72270bb828 100644 --- a/test/js/samples/component-static/expected.js +++ b/test/js/samples/component-static/expected.js @@ -13,6 +13,7 @@ function create_fragment(ctx) { m(target, anchor) { mount_component(nested, target, anchor); + current = true; }, p: noop, diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index 7f7f8e39fd..f4304f53ef 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -14,6 +14,7 @@ function create_fragment(ctx) { m(target, anchor) { mount_component(lazyload, target, anchor); + current = true; }, p: noop, diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index 0da9a66b98..b79dd60512 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -20,6 +20,7 @@ function create_fragment(ctx) { mount_component(imported, target, anchor); insert(target, text, anchor); mount_component(nonimported, target, anchor); + current = true; }, p: noop, diff --git a/test/js/samples/transition-local/expected.js b/test/js/samples/transition-local/expected.js index 1e96247f19..35dd0a137d 100644 --- a/test/js/samples/transition-local/expected.js +++ b/test/js/samples/transition-local/expected.js @@ -23,9 +23,11 @@ function create_if_block(ctx) { if (!if_block) { if_block = create_if_block_1(ctx); if_block.c(); + if_block.i(1); if_block.m(if_block_anchor.parentNode, if_block_anchor); + } else { + if_block.i(1); } - if_block.i(1); } else if (if_block) { if_block.d(1); if_block = null; From bcbe0a58b2424f951f9c976fed29458afbded3b2 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 27 Jan 2019 09:22:22 -0500 Subject: [PATCH 064/125] bind to store values in simple cases - fixes #1997 --- .../render-dom/wrappers/Element/Binding.ts | 23 +++++++++-- .../render-dom/wrappers/Element/index.ts | 2 +- .../samples/binding-store-deep/_config.js | 5 +++ .../samples/binding-store-deep/main.html | 8 ++++ test/runtime/samples/binding-store/_config.js | 41 +++++++++++++++++++ test/runtime/samples/binding-store/main.html | 8 ++++ 6 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 test/runtime/samples/binding-store-deep/_config.js create mode 100644 test/runtime/samples/binding-store-deep/main.html create mode 100644 test/runtime/samples/binding-store/_config.js create mode 100644 test/runtime/samples/binding-store/main.html diff --git a/src/compile/render-dom/wrappers/Element/Binding.ts b/src/compile/render-dom/wrappers/Element/Binding.ts index 710b6e8c6d..7604c16cc2 100644 --- a/src/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compile/render-dom/wrappers/Element/Binding.ts @@ -221,6 +221,17 @@ function getEventHandler( snippet: string ) { const value = getValueFromDom(renderer, binding.parent, binding); + const store = binding.object[0] === '$' ? binding.object.slice(1) : null; + + if (store && binding.node.expression.node.type === 'MemberExpression') { + // TODO is there a way around this? Mutating an object doesn't work, + // because stores check for referential equality (i.e. immutable data). + // But we can't safely or easily clone objects. So for now, we bail + renderer.component.error(binding.node.expression.node.property, { + code: 'invalid-store-binding', + message: 'Cannot bind to a nested property of a store' + }); + } if (binding.node.isContextual) { let tail = ''; @@ -233,15 +244,21 @@ function getEventHandler( return { usesContext: true, - mutation: `${snippet}${tail} = ${value};`, + mutation: store + ? `${store}.set(${value});` + : `${snippet}${tail} = ${value};`, contextual_dependencies: new Set([object, property]) }; } + const mutation = store + ? `${store}.set(${value});` + : `${snippet} = ${value};`; + if (binding.node.expression.node.type === 'MemberExpression') { return { usesContext: binding.node.expression.usesContext, - mutation: `${snippet} = ${value};`, + mutation, contextual_dependencies: binding.node.expression.contextual_dependencies, snippet }; @@ -249,7 +266,7 @@ function getEventHandler( return { usesContext: false, - mutation: `${snippet} = ${value};`, + mutation, contextual_dependencies: new Set() }; } diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts index 03ce9eed9f..97d0a90459 100644 --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -456,7 +456,7 @@ export default class ElementWrapper extends Wrapper { this.renderer.component.partly_hoisted.push(deindent` function ${handler}(${contextual_dependencies.size > 0 ? `{ ${[...contextual_dependencies].join(', ')} }` : ``}) { ${group.bindings.map(b => b.handler.mutation)} - ${Array.from(dependencies).map(dep => `$$invalidate('${dep}', ${dep});`)} + ${Array.from(dependencies).filter(dep => dep[0] !== '$').map(dep => `$$invalidate('${dep}', ${dep});`)} } `); diff --git a/test/runtime/samples/binding-store-deep/_config.js b/test/runtime/samples/binding-store-deep/_config.js new file mode 100644 index 0000000000..e43df6cfae --- /dev/null +++ b/test/runtime/samples/binding-store-deep/_config.js @@ -0,0 +1,5 @@ +export default { + error(assert, err) { + assert.equal(err.message, `Cannot bind to a nested property of a store`); + } +}; diff --git a/test/runtime/samples/binding-store-deep/main.html b/test/runtime/samples/binding-store-deep/main.html new file mode 100644 index 0000000000..3bfd8d5717 --- /dev/null +++ b/test/runtime/samples/binding-store-deep/main.html @@ -0,0 +1,8 @@ + + + +

    hello {$user.name}

    \ No newline at end of file diff --git a/test/runtime/samples/binding-store/_config.js b/test/runtime/samples/binding-store/_config.js new file mode 100644 index 0000000000..eb22d3e96c --- /dev/null +++ b/test/runtime/samples/binding-store/_config.js @@ -0,0 +1,41 @@ +export default { + html: ` + +

    hello world

    + `, + + ssrHtml: ` + +

    hello world

    + `, + + async test({ assert, component, target, window }) { + const input = target.querySelector('input'); + assert.equal(input.value, 'world'); + + const event = new window.Event('input'); + + const names = []; + const unsubscribe = component.name.subscribe(name => { + names.push(name); + }); + + input.value = 'everybody'; + await input.dispatchEvent(event); + + assert.htmlEqual(target.innerHTML, ` + +

    hello everybody

    + `); + + await component.name.set('goodbye'); + assert.equal(input.value, 'goodbye'); + assert.htmlEqual(target.innerHTML, ` + +

    hello goodbye

    + `); + + assert.deepEqual(names, ['world', 'everybody', 'goodbye']); + unsubscribe(); + }, +}; diff --git a/test/runtime/samples/binding-store/main.html b/test/runtime/samples/binding-store/main.html new file mode 100644 index 0000000000..cfcdb0cf20 --- /dev/null +++ b/test/runtime/samples/binding-store/main.html @@ -0,0 +1,8 @@ + + + +

    hello {$name}

    \ No newline at end of file From b1d919f3f28e1d316328248c0b7047d4514483cf Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 29 Jan 2019 09:10:10 -0500 Subject: [PATCH 065/125] =?UTF-8?q?Overhaul=20stats=20=E2=80=94=20closes?= =?UTF-8?q?=20#1891?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Stats.ts | 13 +- src/compile/Component.ts | 340 ++++++++++-------- src/compile/css/Stylesheet.ts | 6 +- src/compile/nodes/Attribute.ts | 17 +- src/compile/nodes/Binding.ts | 19 +- src/compile/nodes/Element.ts | 3 +- src/compile/nodes/EventHandler.ts | 9 +- src/compile/nodes/InlineComponent.ts | 2 +- src/compile/nodes/shared/Expression.ts | 121 ++++--- src/compile/nodes/shared/TemplateScope.ts | 29 +- src/compile/render-dom/index.ts | 79 ++-- src/compile/render-dom/wrappers/AwaitBlock.ts | 8 +- src/compile/render-dom/wrappers/DebugTag.ts | 2 +- src/compile/render-dom/wrappers/EachBlock.ts | 4 +- .../render-dom/wrappers/Element/Attribute.ts | 4 +- .../render-dom/wrappers/Element/Binding.ts | 10 +- .../wrappers/Element/StyleAttribute.ts | 2 +- .../render-dom/wrappers/Element/index.ts | 23 +- src/compile/render-dom/wrappers/IfBlock.ts | 2 +- .../wrappers/InlineComponent/index.ts | 39 +- src/compile/render-dom/wrappers/Title.ts | 4 +- src/compile/render-dom/wrappers/Window.ts | 10 +- src/compile/render-dom/wrappers/shared/Tag.ts | 23 +- .../render-dom/wrappers/shared/addActions.ts | 14 +- src/compile/render-ssr/index.ts | 17 +- src/interfaces.ts | 21 +- src/parse/acorn.ts | 4 +- src/parse/index.ts | 22 +- src/parse/read/script.ts | 25 +- src/utils/annotateWithScopes.ts | 7 +- test/parser/index.js | 3 +- .../samples/action-with-call/output.json | 5 +- .../action-with-identifier/output.json | 5 +- .../samples/action-with-literal/output.json | 5 +- test/parser/samples/action/output.json | 5 +- test/parser/samples/animation/output.json | 5 +- .../attribute-containing-solidus/output.json | 5 +- .../attribute-dynamic-boolean/output.json | 5 +- .../attribute-dynamic-reserved/output.json | 5 +- .../samples/attribute-dynamic/output.json | 5 +- .../samples/attribute-escaped/output.json | 5 +- .../samples/attribute-multiple/output.json | 5 +- .../samples/attribute-shorthand/output.json | 5 +- .../attribute-static-boolean/output.json | 5 +- .../samples/attribute-static/output.json | 5 +- .../samples/attribute-unquoted/output.json | 5 +- .../samples/await-then-catch/output.json | 5 +- .../samples/binding-shorthand/output.json | 5 +- test/parser/samples/binding/output.json | 5 +- test/parser/samples/comment/output.json | 5 +- .../samples/component-dynamic/output.json | 5 +- .../convert-entities-in-element/output.json | 5 +- .../samples/convert-entities/output.json | 5 +- test/parser/samples/css/output.json | 117 +++--- .../parser/samples/dynamic-import/output.json | 328 +++++++++-------- .../each-block-destructured/output.json | 5 +- .../samples/each-block-else/output.json | 5 +- .../samples/each-block-indexed/output.json | 5 +- .../samples/each-block-keyed/output.json | 5 +- test/parser/samples/each-block/output.json | 5 +- .../samples/element-with-mustache/output.json | 5 +- .../samples/element-with-text/output.json | 5 +- test/parser/samples/elements/output.json | 5 +- test/parser/samples/event-handler/output.json | 5 +- test/parser/samples/if-block-else/output.json | 5 +- .../samples/if-block-elseif/output.json | 5 +- test/parser/samples/if-block/output.json | 5 +- .../samples/implicitly-closed-li/output.json | 5 +- test/parser/samples/nbsp/output.json | 5 +- test/parser/samples/raw-mustaches/output.json | 5 +- test/parser/samples/refs/output.json | 5 +- .../samples/script-comment-only/output.json | 25 +- .../output.json | 73 ++-- .../script-comment-trailing/output.json | 73 ++-- test/parser/samples/script/output.json | 73 ++-- .../samples/self-closing-element/output.json | 5 +- .../parser/samples/self-reference/output.json | 5 +- .../space-between-mustaches/output.json | 5 +- test/parser/samples/spread/output.json | 5 +- .../samples/textarea-children/output.json | 5 +- .../transition-intro-no-params/output.json | 5 +- .../samples/transition-intro/output.json | 5 +- .../samples/unusual-identifier/output.json | 5 +- .../whitespace-leading-trailing/output.json | 5 +- .../samples/whitespace-normal/output.json | 5 +- test/parser/samples/yield/output.json | 5 +- test/stats/samples/implicit-action/_config.js | 5 + test/stats/samples/implicit-action/input.html | 1 + test/stats/samples/implicit/_config.js | 5 + test/stats/samples/implicit/input.html | 1 + test/stats/samples/imports/_config.js | 32 +- .../mutated-vs-reassigned-bindings/_config.js | 26 ++ .../mutated-vs-reassigned-bindings/input.html | 7 + .../samples/mutated-vs-reassigned/_config.js | 26 ++ .../samples/mutated-vs-reassigned/input.html | 7 + test/stats/samples/props/_config.js | 43 ++- .../stats/samples/store-referenced/_config.js | 26 ++ .../stats/samples/store-referenced/input.html | 5 + .../samples/store-unreferenced/_config.js | 26 ++ .../samples/store-unreferenced/input.html | 4 + .../samples/template-references/_config.js | 5 +- test/stats/samples/undeclared/_config.js | 5 + test/stats/samples/undeclared/input.html | 3 + test/validator/index.js | 17 +- .../samples/binding-invalid-value/errors.json | 15 + .../samples/binding-invalid-value/input.html | 2 + .../errors.json | 6 +- .../errors.json | 6 +- .../script-invalid-context/errors.json | 4 +- 109 files changed, 1265 insertions(+), 828 deletions(-) create mode 100644 test/stats/samples/implicit-action/_config.js create mode 100644 test/stats/samples/implicit-action/input.html create mode 100644 test/stats/samples/implicit/_config.js create mode 100644 test/stats/samples/implicit/input.html create mode 100644 test/stats/samples/mutated-vs-reassigned-bindings/_config.js create mode 100644 test/stats/samples/mutated-vs-reassigned-bindings/input.html create mode 100644 test/stats/samples/mutated-vs-reassigned/_config.js create mode 100644 test/stats/samples/mutated-vs-reassigned/input.html create mode 100644 test/stats/samples/store-referenced/_config.js create mode 100644 test/stats/samples/store-referenced/input.html create mode 100644 test/stats/samples/store-unreferenced/_config.js create mode 100644 test/stats/samples/store-unreferenced/input.html create mode 100644 test/stats/samples/undeclared/_config.js create mode 100644 test/stats/samples/undeclared/input.html create mode 100644 test/validator/samples/binding-invalid-value/errors.json create mode 100644 test/validator/samples/binding-invalid-value/input.html diff --git a/src/Stats.ts b/src/Stats.ts index 33f651b2fa..5236e6a85c 100644 --- a/src/Stats.ts +++ b/src/Stats.ts @@ -97,11 +97,18 @@ export default class Stats { }); return { - props: component.props.map(prop => prop.as), timings, warnings: this.warnings, - imports, - templateReferences: component && component.template_references + vars: component.vars.filter(variable => !variable.global && !variable.implicit && !variable.internal).map(variable => ({ + name: variable.name, + export_name: variable.export_name || null, + injected: variable.injected || false, + module: variable.module || false, + mutated: variable.mutated || false, + reassigned: variable.reassigned || false, + referenced: variable.referenced || false, + writable: variable.writable || false + })) }; } diff --git a/src/compile/Component.ts b/src/compile/Component.ts index c7ca6b7feb..42d3f7a449 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -11,11 +11,10 @@ import Stylesheet from './css/Stylesheet'; import { test } from '../config'; import Fragment from './nodes/Fragment'; import internal_exports from './internal-exports'; -import { Node, Ast, CompileOptions } from '../interfaces'; +import { Node, Ast, CompileOptions, Var } from '../interfaces'; import error from '../utils/error'; import getCodeFrame from '../utils/getCodeFrame'; import flattenReference from '../utils/flattenReference'; -import addToSet from '../utils/addToSet'; import isReference from 'is-reference'; import TemplateScope from './nodes/shared/TemplateScope'; import fuzzymatch from '../utils/fuzzymatch'; @@ -56,31 +55,22 @@ export default class Component { namespace: string; tag: string; - instance_script: Node; - module_script: Node; + vars: Var[] = []; + var_lookup: Map = new Map(); imports: Node[] = []; module_javascript: string; javascript: string; - declarations: string[] = []; - props: Array<{ name: string, as: string }> = []; - writable_declarations: Set = new Set(); - initialised_declarations: Set = new Set(); - imported_declarations: Set = new Set(); - hoistable_names: Set = new Set(); hoistable_nodes: Set = new Set(); node_for_declaration: Map = new Map(); - module_exports: Array<{ name: string, as: string }> = []; partly_hoisted: string[] = []; fully_hoisted: string[] = []; reactive_declarations: Array<{ assignees: Set, dependencies: Set, snippet: string }> = []; reactive_declaration_nodes: Set = new Set(); has_reactive_assignments = false; - mutable_props: Set = new Set(); indirectDependencies: Map> = new Map(); - template_references: Set = new Set(); file: string; locate: (c: number) => { line: number, column: number }; @@ -93,7 +83,6 @@ export default class Component { stylesheet: Stylesheet; - userVars: Set = new Set(); aliases: Map = new Map(); usedNames: Set = new Set(); @@ -122,26 +111,6 @@ export default class Component { this.stylesheet = new Stylesheet(source, ast, options.filename, options.dev); this.stylesheet.validate(this); - const module_scripts = ast.js.filter(script => this.get_context(script) === 'module'); - const instance_scripts = ast.js.filter(script => this.get_context(script) === 'default'); - - if (module_scripts.length > 1) { - this.error(module_scripts[1], { - code: `invalid-script`, - message: `A component can only have one '; +function get_context(parser: Parser, attributes: Node[], start: number) { + const context = attributes.find(attribute => attribute.name === 'context'); + if (!context) return 'default'; + + if (context.value.length !== 1 || context.value[0].type !== 'Text') { + parser.error({ + code: 'invalid-script', + message: `context attribute must be static` + }, start); + } + + const value = context.value[0].data; + + if (value !== 'module') { + parser.error({ + code: `invalid-script`, + message: `If the context attribute is supplied, its value must be "module"` + }, context.start); + } + + return value; +} + export default function readScript(parser: Parser, start: number, attributes: Node[]) { const scriptStart = parser.index; const scriptEnd = parser.template.indexOf(scriptClosingTag, scriptStart); @@ -30,7 +53,7 @@ export default function readScript(parser: Parser, start: number, attributes: No return { start, end: parser.index, - attributes, + context: get_context(parser, attributes, start), content: ast, }; } diff --git a/src/utils/annotateWithScopes.ts b/src/utils/annotateWithScopes.ts index 96459e1ede..adf7619bed 100644 --- a/src/utils/annotateWithScopes.ts +++ b/src/utils/annotateWithScopes.ts @@ -52,6 +52,10 @@ export function createScopes(expression: Node) { }, }); + scope.declarations.forEach((node, name) => { + globals.delete(name); + }); + return { map, scope, globals }; } @@ -60,7 +64,6 @@ export class Scope { block: boolean; declarations: Map = new Map(); - writable_declarations: Set = new Set(); initialised_declarations: Set = new Set(); constructor(parent: Scope, block: boolean) { @@ -72,13 +75,11 @@ export class Scope { if (node.kind === 'var' && this.block && this.parent) { this.parent.addDeclaration(node); } else if (node.type === 'VariableDeclaration') { - const writable = node.kind !== 'const'; const initialised = !!node.init; node.declarations.forEach((declarator: Node) => { extractNames(declarator.id).forEach(name => { this.declarations.set(name, node); - if (writable) this.writable_declarations.add(name); if (initialised) this.initialised_declarations.add(name); }); }); diff --git a/test/parser/index.js b/test/parser/index.js index 8f20c77abd..900cc3ae05 100644 --- a/test/parser/index.js +++ b/test/parser/index.js @@ -31,7 +31,8 @@ describe('parse', () => { assert.deepEqual(ast.html, expectedOutput.html); assert.deepEqual(ast.css, expectedOutput.css); - assert.deepEqual(ast.js, expectedOutput.js); + assert.deepEqual(ast.instance, expectedOutput.instance); + assert.deepEqual(ast.module, expectedOutput.module); } catch (err) { if (err.name !== 'ParseError') throw err; if (!expectedError) throw err; diff --git a/test/parser/samples/action-with-call/output.json b/test/parser/samples/action-with-call/output.json index 521599544b..d6aaa72892 100644 --- a/test/parser/samples/action-with-call/output.json +++ b/test/parser/samples/action-with-call/output.json @@ -42,6 +42,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/action-with-identifier/output.json b/test/parser/samples/action-with-identifier/output.json index 800ab800be..d58b9097b7 100644 --- a/test/parser/samples/action-with-identifier/output.json +++ b/test/parser/samples/action-with-identifier/output.json @@ -28,6 +28,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/action-with-literal/output.json b/test/parser/samples/action-with-literal/output.json index 0705cd9e39..4a6f596d10 100644 --- a/test/parser/samples/action-with-literal/output.json +++ b/test/parser/samples/action-with-literal/output.json @@ -29,6 +29,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/action/output.json b/test/parser/samples/action/output.json index 68afd79d23..2f553b5efa 100644 --- a/test/parser/samples/action/output.json +++ b/test/parser/samples/action/output.json @@ -23,6 +23,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/animation/output.json b/test/parser/samples/animation/output.json index 585ab3ff1c..8332b3ad04 100644 --- a/test/parser/samples/animation/output.json +++ b/test/parser/samples/animation/output.json @@ -55,6 +55,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-containing-solidus/output.json b/test/parser/samples/attribute-containing-solidus/output.json index 920a9420c8..95372bd77d 100644 --- a/test/parser/samples/attribute-containing-solidus/output.json +++ b/test/parser/samples/attribute-containing-solidus/output.json @@ -36,6 +36,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-dynamic-boolean/output.json b/test/parser/samples/attribute-dynamic-boolean/output.json index e50640f279..81a19f49b9 100644 --- a/test/parser/samples/attribute-dynamic-boolean/output.json +++ b/test/parser/samples/attribute-dynamic-boolean/output.json @@ -34,6 +34,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-dynamic-reserved/output.json b/test/parser/samples/attribute-dynamic-reserved/output.json index 042712b872..3a830d448f 100644 --- a/test/parser/samples/attribute-dynamic-reserved/output.json +++ b/test/parser/samples/attribute-dynamic-reserved/output.json @@ -34,6 +34,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-dynamic/output.json b/test/parser/samples/attribute-dynamic/output.json index f3099f6e62..50d8ec60a5 100644 --- a/test/parser/samples/attribute-dynamic/output.json +++ b/test/parser/samples/attribute-dynamic/output.json @@ -58,6 +58,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-escaped/output.json b/test/parser/samples/attribute-escaped/output.json index 979b54d713..6a4143e674 100644 --- a/test/parser/samples/attribute-escaped/output.json +++ b/test/parser/samples/attribute-escaped/output.json @@ -29,6 +29,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-multiple/output.json b/test/parser/samples/attribute-multiple/output.json index 5864363cdf..668409c0ef 100644 --- a/test/parser/samples/attribute-multiple/output.json +++ b/test/parser/samples/attribute-multiple/output.json @@ -43,6 +43,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-shorthand/output.json b/test/parser/samples/attribute-shorthand/output.json index 69f9329ed1..08ddf5eda9 100644 --- a/test/parser/samples/attribute-shorthand/output.json +++ b/test/parser/samples/attribute-shorthand/output.json @@ -34,6 +34,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-static-boolean/output.json b/test/parser/samples/attribute-static-boolean/output.json index 79ea9e9d11..f63b5734e0 100644 --- a/test/parser/samples/attribute-static-boolean/output.json +++ b/test/parser/samples/attribute-static-boolean/output.json @@ -22,6 +22,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-static/output.json b/test/parser/samples/attribute-static/output.json index cb0d7684da..3185e48736 100644 --- a/test/parser/samples/attribute-static/output.json +++ b/test/parser/samples/attribute-static/output.json @@ -29,6 +29,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-unquoted/output.json b/test/parser/samples/attribute-unquoted/output.json index 940ac5b01d..c7556f2eba 100644 --- a/test/parser/samples/attribute-unquoted/output.json +++ b/test/parser/samples/attribute-unquoted/output.json @@ -29,6 +29,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/await-then-catch/output.json b/test/parser/samples/await-then-catch/output.json index 1ab557f99d..21fc13eff9 100644 --- a/test/parser/samples/await-then-catch/output.json +++ b/test/parser/samples/await-then-catch/output.json @@ -155,6 +155,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/binding-shorthand/output.json b/test/parser/samples/binding-shorthand/output.json index c80fc5f7f2..3be1db50b4 100644 --- a/test/parser/samples/binding-shorthand/output.json +++ b/test/parser/samples/binding-shorthand/output.json @@ -28,6 +28,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/binding/output.json b/test/parser/samples/binding/output.json index 031d291fa7..5dc173c2a2 100644 --- a/test/parser/samples/binding/output.json +++ b/test/parser/samples/binding/output.json @@ -28,6 +28,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/comment/output.json b/test/parser/samples/comment/output.json index 10d85bf422..89295c188a 100644 --- a/test/parser/samples/comment/output.json +++ b/test/parser/samples/comment/output.json @@ -12,6 +12,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/component-dynamic/output.json b/test/parser/samples/component-dynamic/output.json index 9b08732c38..c2e4e3ee79 100644 --- a/test/parser/samples/component-dynamic/output.json +++ b/test/parser/samples/component-dynamic/output.json @@ -37,6 +37,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/convert-entities-in-element/output.json b/test/parser/samples/convert-entities-in-element/output.json index f481345a02..fb0f5b288e 100644 --- a/test/parser/samples/convert-entities-in-element/output.json +++ b/test/parser/samples/convert-entities-in-element/output.json @@ -21,6 +21,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/convert-entities/output.json b/test/parser/samples/convert-entities/output.json index b3e66a9007..ca1c1356f8 100644 --- a/test/parser/samples/convert-entities/output.json +++ b/test/parser/samples/convert-entities/output.json @@ -12,6 +12,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/css/output.json b/test/parser/samples/css/output.json index e91c31a71a..3127e01c71 100644 --- a/test/parser/samples/css/output.json +++ b/test/parser/samples/css/output.json @@ -27,71 +27,70 @@ } ] }, - "css": [ - { - "start": 16, - "end": 56, - "attributes": [], - "children": [ - { - "type": "Rule", - "selector": { - "type": "SelectorList", - "children": [ - { - "type": "Selector", + "css": { + "start": 16, + "end": 56, + "attributes": [], + "children": [ + { + "type": "Rule", + "selector": { + "type": "SelectorList", + "children": [ + { + "type": "Selector", + "children": [ + { + "type": "TypeSelector", + "name": "div", + "start": 25, + "end": 28 + } + ], + "start": 25, + "end": 28 + } + ], + "start": 25, + "end": 28 + }, + "block": { + "type": "Block", + "children": [ + { + "type": "Declaration", + "important": false, + "property": "color", + "value": { + "type": "Value", "children": [ { - "type": "TypeSelector", - "name": "div", - "start": 25, - "end": 28 + "type": "Identifier", + "name": "red", + "start": 40, + "end": 43 } ], - "start": 25, - "end": 28 - } - ], - "start": 25, - "end": 28 - }, - "block": { - "type": "Block", - "children": [ - { - "type": "Declaration", - "important": false, - "property": "color", - "value": { - "type": "Value", - "children": [ - { - "type": "Identifier", - "name": "red", - "start": 40, - "end": 43 - } - ], - "start": 39, - "end": 43 - }, - "start": 33, + "start": 39, "end": 43 - } - ], - "start": 29, - "end": 47 - }, - "start": 25, + }, + "start": 33, + "end": 43 + } + ], + "start": 29, "end": 47 - } - ], - "content": { - "start": 23, - "end": 48, - "styles": "\n\tdiv {\n\t\tcolor: red;\n\t}\n" + }, + "start": 25, + "end": 47 } + ], + "content": { + "start": 23, + "end": 48, + "styles": "\n\tdiv {\n\t\tcolor: red;\n\t}\n" } - ], - "js": [] + }, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/dynamic-import/output.json b/test/parser/samples/dynamic-import/output.json index 55c1bdf756..c0d4a45e0d 100644 --- a/test/parser/samples/dynamic-import/output.json +++ b/test/parser/samples/dynamic-import/output.json @@ -5,201 +5,199 @@ "type": "Fragment", "children": [] }, - "css": [], - "js": [ - { - "start": 0, - "end": 146, - "attributes": [], - "content": { - "type": "Program", - "start": 8, - "end": 137, - "body": [ - { - "type": "ImportDeclaration", - "start": 10, - "end": 43, - "specifiers": [ - { - "type": "ImportSpecifier", + "css": null, + "instance": { + "start": 0, + "end": 146, + "context": "default", + "content": { + "type": "Program", + "start": 8, + "end": 137, + "body": [ + { + "type": "ImportDeclaration", + "start": 10, + "end": 43, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 19, + "end": 26, + "imported": { + "type": "Identifier", "start": 19, "end": 26, - "imported": { - "type": "Identifier", - "start": 19, - "end": 26, - "name": "onMount" - }, - "local": { - "type": "Identifier", - "start": 19, - "end": 26, - "name": "onMount" - } + "name": "onMount" + }, + "local": { + "type": "Identifier", + "start": 19, + "end": 26, + "name": "onMount" } - ], - "source": { - "type": "Literal", - "start": 34, - "end": 42, - "value": "svelte", - "raw": "'svelte'" } - }, - { - "type": "ExpressionStatement", + ], + "source": { + "type": "Literal", + "start": 34, + "end": 42, + "value": "svelte", + "raw": "'svelte'" + } + }, + { + "type": "ExpressionStatement", + "start": 46, + "end": 136, + "expression": { + "type": "CallExpression", "start": 46, - "end": 136, - "expression": { - "type": "CallExpression", + "end": 135, + "callee": { + "type": "Identifier", "start": 46, - "end": 135, - "callee": { - "type": "Identifier", - "start": 46, - "end": 53, - "name": "onMount" - }, - "arguments": [ - { - "type": "ArrowFunctionExpression", - "start": 54, + "end": 53, + "name": "onMount" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 54, + "end": 134, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 60, "end": 134, - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 60, - "end": 134, - "body": [ - { - "type": "ExpressionStatement", + "body": [ + { + "type": "ExpressionStatement", + "start": 64, + "end": 131, + "expression": { + "type": "CallExpression", "start": 64, - "end": 131, - "expression": { - "type": "CallExpression", + "end": 130, + "callee": { + "type": "MemberExpression", "start": 64, - "end": 130, - "callee": { - "type": "MemberExpression", + "end": 87, + "object": { + "type": "CallExpression", "start": 64, - "end": 87, - "object": { - "type": "CallExpression", + "end": 82, + "callee": { + "type": "Import", "start": 64, - "end": 82, - "callee": { - "type": "Import", - "start": 64, - "end": 70 - }, - "arguments": [ - { - "type": "Literal", - "start": 71, - "end": 81, - "value": "./foo.js", - "raw": "'./foo.js'" - } - ] - }, - "property": { - "type": "Identifier", - "start": 83, - "end": 87, - "name": "then" + "end": 70 }, - "computed": false + "arguments": [ + { + "type": "Literal", + "start": 71, + "end": 81, + "value": "./foo.js", + "raw": "'./foo.js'" + } + ] + }, + "property": { + "type": "Identifier", + "start": 83, + "end": 87, + "name": "then" }, - "arguments": [ - { - "type": "ArrowFunctionExpression", - "start": 88, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 88, + "end": 129, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 88, + "end": 91, + "name": "foo" + } + ], + "body": { + "type": "BlockStatement", + "start": 95, "end": 129, - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [ + "body": [ { - "type": "Identifier", - "start": 88, - "end": 91, - "name": "foo" - } - ], - "body": { - "type": "BlockStatement", - "start": 95, - "end": 129, - "body": [ - { - "type": "ExpressionStatement", + "type": "ExpressionStatement", + "start": 100, + "end": 125, + "expression": { + "type": "CallExpression", "start": 100, - "end": 125, - "expression": { - "type": "CallExpression", + "end": 124, + "callee": { + "type": "MemberExpression", "start": 100, - "end": 124, - "callee": { - "type": "MemberExpression", + "end": 111, + "object": { + "type": "Identifier", "start": 100, + "end": 107, + "name": "console" + }, + "property": { + "type": "Identifier", + "start": 108, "end": 111, + "name": "log" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 112, + "end": 123, "object": { "type": "Identifier", - "start": 100, - "end": 107, - "name": "console" + "start": 112, + "end": 115, + "name": "foo" }, "property": { "type": "Identifier", - "start": 108, - "end": 111, - "name": "log" + "start": 116, + "end": 123, + "name": "default" }, "computed": false - }, - "arguments": [ - { - "type": "MemberExpression", - "start": 112, - "end": 123, - "object": { - "type": "Identifier", - "start": 112, - "end": 115, - "name": "foo" - }, - "property": { - "type": "Identifier", - "start": 116, - "end": 123, - "name": "default" - }, - "computed": false - } - ] - } + } + ] } - ] - } + } + ] } - ] - } + } + ] } - ] - } + } + ] } - ] - } + } + ] } - ], - "sourceType": "module" - } + } + ], + "sourceType": "module" } - ] + } } \ No newline at end of file diff --git a/test/parser/samples/each-block-destructured/output.json b/test/parser/samples/each-block-destructured/output.json index fdca5f82a2..b9efc18906 100644 --- a/test/parser/samples/each-block-destructured/output.json +++ b/test/parser/samples/each-block-destructured/output.json @@ -75,6 +75,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/each-block-else/output.json b/test/parser/samples/each-block-else/output.json index be0ac6d550..aefc8c2f39 100644 --- a/test/parser/samples/each-block-else/output.json +++ b/test/parser/samples/each-block-else/output.json @@ -67,6 +67,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/each-block-indexed/output.json b/test/parser/samples/each-block-indexed/output.json index bda5f86a89..7518652468 100644 --- a/test/parser/samples/each-block-indexed/output.json +++ b/test/parser/samples/each-block-indexed/output.json @@ -63,6 +63,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/each-block-keyed/output.json b/test/parser/samples/each-block-keyed/output.json index a00694fc4e..fe893bcdb9 100644 --- a/test/parser/samples/each-block-keyed/output.json +++ b/test/parser/samples/each-block-keyed/output.json @@ -63,6 +63,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/each-block/output.json b/test/parser/samples/each-block/output.json index a24c32e9ad..c16a71ad5d 100644 --- a/test/parser/samples/each-block/output.json +++ b/test/parser/samples/each-block/output.json @@ -45,6 +45,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/element-with-mustache/output.json b/test/parser/samples/element-with-mustache/output.json index a56cd27967..c8a386d681 100644 --- a/test/parser/samples/element-with-mustache/output.json +++ b/test/parser/samples/element-with-mustache/output.json @@ -38,6 +38,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/element-with-text/output.json b/test/parser/samples/element-with-text/output.json index 1ae33df94f..70f6163c93 100644 --- a/test/parser/samples/element-with-text/output.json +++ b/test/parser/samples/element-with-text/output.json @@ -21,6 +21,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/elements/output.json b/test/parser/samples/elements/output.json index 219799df3e..d216f7f5d8 100644 --- a/test/parser/samples/elements/output.json +++ b/test/parser/samples/elements/output.json @@ -22,6 +22,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/event-handler/output.json b/test/parser/samples/event-handler/output.json index 740e43e48d..b1fe89fc2a 100644 --- a/test/parser/samples/event-handler/output.json +++ b/test/parser/samples/event-handler/output.json @@ -98,6 +98,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/if-block-else/output.json b/test/parser/samples/if-block-else/output.json index 8e96c34efc..dedf2797c4 100644 --- a/test/parser/samples/if-block-else/output.json +++ b/test/parser/samples/if-block-else/output.json @@ -56,6 +56,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/if-block-elseif/output.json b/test/parser/samples/if-block-elseif/output.json index 257eb1e7d2..426e1f7fbc 100644 --- a/test/parser/samples/if-block-elseif/output.json +++ b/test/parser/samples/if-block-elseif/output.json @@ -96,6 +96,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/if-block/output.json b/test/parser/samples/if-block/output.json index ba734c0e56..d560824766 100644 --- a/test/parser/samples/if-block/output.json +++ b/test/parser/samples/if-block/output.json @@ -25,6 +25,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/implicitly-closed-li/output.json b/test/parser/samples/implicitly-closed-li/output.json index 69def7a9a2..caf69d7109 100644 --- a/test/parser/samples/implicitly-closed-li/output.json +++ b/test/parser/samples/implicitly-closed-li/output.json @@ -66,6 +66,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/nbsp/output.json b/test/parser/samples/nbsp/output.json index 7373bc9673..4fa318ce48 100644 --- a/test/parser/samples/nbsp/output.json +++ b/test/parser/samples/nbsp/output.json @@ -21,6 +21,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/raw-mustaches/output.json b/test/parser/samples/raw-mustaches/output.json index 41dab885e0..1d92b21c85 100644 --- a/test/parser/samples/raw-mustaches/output.json +++ b/test/parser/samples/raw-mustaches/output.json @@ -55,6 +55,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/refs/output.json b/test/parser/samples/refs/output.json index 3cd6c4d9fa..2cf5054304 100644 --- a/test/parser/samples/refs/output.json +++ b/test/parser/samples/refs/output.json @@ -28,6 +28,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/script-comment-only/output.json b/test/parser/samples/script-comment-only/output.json index b04d38633d..95ca769b20 100644 --- a/test/parser/samples/script-comment-only/output.json +++ b/test/parser/samples/script-comment-only/output.json @@ -20,19 +20,16 @@ } ] }, - "css": [], - "js": [ - { - "start": 0, - "end": 43, - "attributes": [], - "content": { - "type": "Program", - "start": 8, - "end": 34, - "body": [], - "sourceType": "module" - } + "instance": { + "start": 0, + "end": 43, + "context": "default", + "content": { + "type": "Program", + "start": 8, + "end": 34, + "body": [], + "sourceType": "module" } - ] + } } \ No newline at end of file diff --git a/test/parser/samples/script-comment-trailing-multiline/output.json b/test/parser/samples/script-comment-trailing-multiline/output.json index a32ff799f7..d4a45911a1 100644 --- a/test/parser/samples/script-comment-trailing-multiline/output.json +++ b/test/parser/samples/script-comment-trailing-multiline/output.json @@ -44,46 +44,43 @@ } ] }, - "css": [], - "js": [ - { - "start": 0, - "end": 77, - "attributes": [], - "content": { - "type": "Program", - "start": 8, - "end": 68, - "body": [ - { - "type": "VariableDeclaration", - "start": 10, - "end": 29, - "declarations": [ - { - "type": "VariableDeclarator", + "instance": { + "start": 0, + "end": 77, + "context": "default", + "content": { + "type": "Program", + "start": 8, + "end": 68, + "body": [ + { + "type": "VariableDeclaration", + "start": 10, + "end": 29, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 14, + "end": 28, + "id": { + "type": "Identifier", "start": 14, + "end": 18, + "name": "name" + }, + "init": { + "type": "Literal", + "start": 21, "end": 28, - "id": { - "type": "Identifier", - "start": 14, - "end": 18, - "name": "name" - }, - "init": { - "type": "Literal", - "start": 21, - "end": 28, - "value": "world", - "raw": "'world'" - } + "value": "world", + "raw": "'world'" } - ], - "kind": "let" - } - ], - "sourceType": "module" - } + } + ], + "kind": "let" + } + ], + "sourceType": "module" } - ] + } } \ No newline at end of file diff --git a/test/parser/samples/script-comment-trailing/output.json b/test/parser/samples/script-comment-trailing/output.json index 78012d4438..92d431b558 100644 --- a/test/parser/samples/script-comment-trailing/output.json +++ b/test/parser/samples/script-comment-trailing/output.json @@ -44,46 +44,43 @@ } ] }, - "css": [], - "js": [ - { - "start": 0, - "end": 66, - "attributes": [], - "content": { - "type": "Program", - "start": 8, - "end": 57, - "body": [ - { - "type": "VariableDeclaration", - "start": 10, - "end": 29, - "declarations": [ - { - "type": "VariableDeclarator", + "instance": { + "start": 0, + "end": 66, + "context": "default", + "content": { + "type": "Program", + "start": 8, + "end": 57, + "body": [ + { + "type": "VariableDeclaration", + "start": 10, + "end": 29, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 14, + "end": 28, + "id": { + "type": "Identifier", "start": 14, + "end": 18, + "name": "name" + }, + "init": { + "type": "Literal", + "start": 21, "end": 28, - "id": { - "type": "Identifier", - "start": 14, - "end": 18, - "name": "name" - }, - "init": { - "type": "Literal", - "start": 21, - "end": 28, - "value": "world", - "raw": "'world'" - } + "value": "world", + "raw": "'world'" } - ], - "kind": "let" - } - ], - "sourceType": "module" - } + } + ], + "kind": "let" + } + ], + "sourceType": "module" } - ] + } } \ No newline at end of file diff --git a/test/parser/samples/script/output.json b/test/parser/samples/script/output.json index bf89a0ff02..95966f5dc6 100644 --- a/test/parser/samples/script/output.json +++ b/test/parser/samples/script/output.json @@ -44,46 +44,43 @@ } ] }, - "css": [], - "js": [ - { - "start": 0, - "end": 39, - "attributes": [], - "content": { - "type": "Program", - "start": 8, - "end": 30, - "body": [ - { - "type": "VariableDeclaration", - "start": 10, - "end": 29, - "declarations": [ - { - "type": "VariableDeclarator", + "instance": { + "start": 0, + "end": 39, + "context": "default", + "content": { + "type": "Program", + "start": 8, + "end": 30, + "body": [ + { + "type": "VariableDeclaration", + "start": 10, + "end": 29, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 14, + "end": 28, + "id": { + "type": "Identifier", "start": 14, + "end": 18, + "name": "name" + }, + "init": { + "type": "Literal", + "start": 21, "end": 28, - "id": { - "type": "Identifier", - "start": 14, - "end": 18, - "name": "name" - }, - "init": { - "type": "Literal", - "start": 21, - "end": 28, - "value": "world", - "raw": "'world'" - } + "value": "world", + "raw": "'world'" } - ], - "kind": "let" - } - ], - "sourceType": "module" - } + } + ], + "kind": "let" + } + ], + "sourceType": "module" } - ] + } } \ No newline at end of file diff --git a/test/parser/samples/self-closing-element/output.json b/test/parser/samples/self-closing-element/output.json index f7475b41d7..47eea2f333 100644 --- a/test/parser/samples/self-closing-element/output.json +++ b/test/parser/samples/self-closing-element/output.json @@ -14,6 +14,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/self-reference/output.json b/test/parser/samples/self-reference/output.json index ff111e17ba..de5112a087 100644 --- a/test/parser/samples/self-reference/output.json +++ b/test/parser/samples/self-reference/output.json @@ -73,6 +73,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/space-between-mustaches/output.json b/test/parser/samples/space-between-mustaches/output.json index d66735213d..c89409daeb 100644 --- a/test/parser/samples/space-between-mustaches/output.json +++ b/test/parser/samples/space-between-mustaches/output.json @@ -72,6 +72,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/spread/output.json b/test/parser/samples/spread/output.json index a632dc89ab..3986da3578 100644 --- a/test/parser/samples/spread/output.json +++ b/test/parser/samples/spread/output.json @@ -26,6 +26,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/textarea-children/output.json b/test/parser/samples/textarea-children/output.json index 08f42919ed..3b403458fc 100644 --- a/test/parser/samples/textarea-children/output.json +++ b/test/parser/samples/textarea-children/output.json @@ -44,6 +44,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/transition-intro-no-params/output.json b/test/parser/samples/transition-intro-no-params/output.json index d53b4d9d88..edb15457e6 100644 --- a/test/parser/samples/transition-intro-no-params/output.json +++ b/test/parser/samples/transition-intro-no-params/output.json @@ -32,6 +32,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/transition-intro/output.json b/test/parser/samples/transition-intro/output.json index 6405d0bad5..5583dd89bc 100644 --- a/test/parser/samples/transition-intro/output.json +++ b/test/parser/samples/transition-intro/output.json @@ -60,6 +60,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/unusual-identifier/output.json b/test/parser/samples/unusual-identifier/output.json index fe9b175128..c0d4ecc3ff 100644 --- a/test/parser/samples/unusual-identifier/output.json +++ b/test/parser/samples/unusual-identifier/output.json @@ -45,6 +45,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/whitespace-leading-trailing/output.json b/test/parser/samples/whitespace-leading-trailing/output.json index 7dbf259721..f164af01ba 100644 --- a/test/parser/samples/whitespace-leading-trailing/output.json +++ b/test/parser/samples/whitespace-leading-trailing/output.json @@ -27,6 +27,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/whitespace-normal/output.json b/test/parser/samples/whitespace-normal/output.json index c150b53f04..e4ce956331 100644 --- a/test/parser/samples/whitespace-normal/output.json +++ b/test/parser/samples/whitespace-normal/output.json @@ -62,6 +62,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/yield/output.json b/test/parser/samples/yield/output.json index b16ab436f6..16ea79d8e8 100644 --- a/test/parser/samples/yield/output.json +++ b/test/parser/samples/yield/output.json @@ -17,6 +17,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/stats/samples/implicit-action/_config.js b/test/stats/samples/implicit-action/_config.js new file mode 100644 index 0000000000..71c255d54b --- /dev/null +++ b/test/stats/samples/implicit-action/_config.js @@ -0,0 +1,5 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, []); + }, +}; diff --git a/test/stats/samples/implicit-action/input.html b/test/stats/samples/implicit-action/input.html new file mode 100644 index 0000000000..466495d255 --- /dev/null +++ b/test/stats/samples/implicit-action/input.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/test/stats/samples/implicit/_config.js b/test/stats/samples/implicit/_config.js new file mode 100644 index 0000000000..71c255d54b --- /dev/null +++ b/test/stats/samples/implicit/_config.js @@ -0,0 +1,5 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, []); + }, +}; diff --git a/test/stats/samples/implicit/input.html b/test/stats/samples/implicit/input.html new file mode 100644 index 0000000000..e076ac55f8 --- /dev/null +++ b/test/stats/samples/implicit/input.html @@ -0,0 +1 @@ +{foo} \ No newline at end of file diff --git a/test/stats/samples/imports/_config.js b/test/stats/samples/imports/_config.js index f7c15183dd..287c5837ad 100644 --- a/test/stats/samples/imports/_config.js +++ b/test/stats/samples/imports/_config.js @@ -1,17 +1,35 @@ export default { test(assert, stats) { - assert.deepEqual(stats.imports, [ + assert.deepEqual(stats.vars, [ { - source: 'x', - specifiers: [{ name: 'default', as: 'x' }] + name: 'x', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: false, + writable: false }, { - source: 'y', - specifiers: [{ name: 'y', as: 'y' }] + name: 'y', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: false, + writable: false }, { - source: 'z', - specifiers: [{ name: '*', as: 'z' }] + name: 'z', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: false, + writable: false } ]); } diff --git a/test/stats/samples/mutated-vs-reassigned-bindings/_config.js b/test/stats/samples/mutated-vs-reassigned-bindings/_config.js new file mode 100644 index 0000000000..a1d027cbb5 --- /dev/null +++ b/test/stats/samples/mutated-vs-reassigned-bindings/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'count', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: true, + referenced: true, + writable: true + }, + { + name: 'user', + export_name: null, + injected: false, + module: false, + mutated: true, + reassigned: false, + referenced: true, + writable: false + } + ]); + } +}; \ No newline at end of file diff --git a/test/stats/samples/mutated-vs-reassigned-bindings/input.html b/test/stats/samples/mutated-vs-reassigned-bindings/input.html new file mode 100644 index 0000000000..c1186ad3a7 --- /dev/null +++ b/test/stats/samples/mutated-vs-reassigned-bindings/input.html @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/test/stats/samples/mutated-vs-reassigned/_config.js b/test/stats/samples/mutated-vs-reassigned/_config.js new file mode 100644 index 0000000000..a1d027cbb5 --- /dev/null +++ b/test/stats/samples/mutated-vs-reassigned/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'count', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: true, + referenced: true, + writable: true + }, + { + name: 'user', + export_name: null, + injected: false, + module: false, + mutated: true, + reassigned: false, + referenced: true, + writable: false + } + ]); + } +}; \ No newline at end of file diff --git a/test/stats/samples/mutated-vs-reassigned/input.html b/test/stats/samples/mutated-vs-reassigned/input.html new file mode 100644 index 0000000000..6a5e604c26 --- /dev/null +++ b/test/stats/samples/mutated-vs-reassigned/input.html @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/test/stats/samples/props/_config.js b/test/stats/samples/props/_config.js index 50c01e2ffb..cbec831f61 100644 --- a/test/stats/samples/props/_config.js +++ b/test/stats/samples/props/_config.js @@ -1,5 +1,46 @@ export default { test(assert, stats) { - assert.deepEqual(stats.props.sort(), ['cats', 'name']); + assert.deepEqual(stats.vars, [ + { + name: 'name', + export_name: 'name', + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + }, + { + name: 'cats', + export_name: 'cats', + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + }, + { + name: 'foo', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: false, + writable: true + }, + { + name: 'bar', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: true, + referenced: true, + writable: true + } + ]); } }; \ No newline at end of file diff --git a/test/stats/samples/store-referenced/_config.js b/test/stats/samples/store-referenced/_config.js new file mode 100644 index 0000000000..ecb958df1e --- /dev/null +++ b/test/stats/samples/store-referenced/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'foo', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + }, + { + name: '$foo', + export_name: null, + injected: true, + module: false, + mutated: true, + reassigned: false, + referenced: true, + writable: true + } + ]); + } +}; diff --git a/test/stats/samples/store-referenced/input.html b/test/stats/samples/store-referenced/input.html new file mode 100644 index 0000000000..0222372f4d --- /dev/null +++ b/test/stats/samples/store-referenced/input.html @@ -0,0 +1,5 @@ + + +{$foo} \ No newline at end of file diff --git a/test/stats/samples/store-unreferenced/_config.js b/test/stats/samples/store-unreferenced/_config.js new file mode 100644 index 0000000000..9ea5784f92 --- /dev/null +++ b/test/stats/samples/store-unreferenced/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'foo', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + }, + { + name: '$foo', + export_name: null, + injected: true, + module: false, + mutated: true, + reassigned: false, + referenced: false, + writable: true + } + ]); + } +}; diff --git a/test/stats/samples/store-unreferenced/input.html b/test/stats/samples/store-unreferenced/input.html new file mode 100644 index 0000000000..3ad525047d --- /dev/null +++ b/test/stats/samples/store-unreferenced/input.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/test/stats/samples/template-references/_config.js b/test/stats/samples/template-references/_config.js index 0bc844928f..71c255d54b 100644 --- a/test/stats/samples/template-references/_config.js +++ b/test/stats/samples/template-references/_config.js @@ -1,8 +1,5 @@ export default { test(assert, stats) { - assert.equal(stats.templateReferences.size, 3); - assert.ok(stats.templateReferences.has('foo')); - assert.ok(stats.templateReferences.has('Bar')); - assert.ok(stats.templateReferences.has('baz')); + assert.deepEqual(stats.vars, []); }, }; diff --git a/test/stats/samples/undeclared/_config.js b/test/stats/samples/undeclared/_config.js new file mode 100644 index 0000000000..71c255d54b --- /dev/null +++ b/test/stats/samples/undeclared/_config.js @@ -0,0 +1,5 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, []); + }, +}; diff --git a/test/stats/samples/undeclared/input.html b/test/stats/samples/undeclared/input.html new file mode 100644 index 0000000000..0178466fe3 --- /dev/null +++ b/test/stats/samples/undeclared/input.html @@ -0,0 +1,3 @@ + + +{foo} \ No newline at end of file diff --git a/test/validator/index.js b/test/validator/index.js index 9ca3fc57d1..517427e817 100644 --- a/test/validator/index.js +++ b/test/validator/index.js @@ -64,11 +64,16 @@ describe("validate", () => { throw new Error(`Expected an error: ${expected.message}`); } - assert.equal(error.code, expected.code); - assert.equal(error.message, expected.message); - assert.deepEqual(error.start, expected.start); - assert.deepEqual(error.end, expected.end); - assert.equal(error.pos, expected.pos); + try { + assert.equal(error.code, expected.code); + assert.equal(error.message, expected.message); + assert.deepEqual(error.start, expected.start); + assert.deepEqual(error.end, expected.end); + assert.equal(error.pos, expected.pos); + } catch (e) { + console.error(error) + throw e; + } } }); }); @@ -102,7 +107,7 @@ describe("validate", () => { name: "_", generate: false }); - + assert.deepEqual(stats.warnings, []); }); }); diff --git a/test/validator/samples/binding-invalid-value/errors.json b/test/validator/samples/binding-invalid-value/errors.json new file mode 100644 index 0000000000..07eb7b0f1c --- /dev/null +++ b/test/validator/samples/binding-invalid-value/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "binding-undeclared", + "message": "foo is not declared", + "pos": 37, + "start": { + "line": 2, + "column": 19, + "character": 37 + }, + "end": { + "line": 2, + "column": 22, + "character": 40 + } +}] \ No newline at end of file diff --git a/test/validator/samples/binding-invalid-value/input.html b/test/validator/samples/binding-invalid-value/input.html new file mode 100644 index 0000000000..9eeeba5fed --- /dev/null +++ b/test/validator/samples/binding-invalid-value/input.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/test/validator/samples/multiple-script-default-context/errors.json b/test/validator/samples/multiple-script-default-context/errors.json index 6e9a53d691..6f0637b51b 100644 --- a/test/validator/samples/multiple-script-default-context/errors.json +++ b/test/validator/samples/multiple-script-default-context/errors.json @@ -8,8 +8,8 @@ "character": 30 }, "end": { - "line": 7, - "column": 9, - "character": 58 + "line": 5, + "column": 0, + "character": 30 } }] \ No newline at end of file diff --git a/test/validator/samples/multiple-script-module-context/errors.json b/test/validator/samples/multiple-script-module-context/errors.json index ef8dc15273..7b86c61926 100644 --- a/test/validator/samples/multiple-script-module-context/errors.json +++ b/test/validator/samples/multiple-script-module-context/errors.json @@ -8,8 +8,8 @@ "character": 47 }, "end": { - "line": 7, - "column": 9, - "character": 92 + "line": 5, + "column": 0, + "character": 47 } }] \ No newline at end of file diff --git a/test/validator/samples/script-invalid-context/errors.json b/test/validator/samples/script-invalid-context/errors.json index 9c276d932d..07ad0f1270 100644 --- a/test/validator/samples/script-invalid-context/errors.json +++ b/test/validator/samples/script-invalid-context/errors.json @@ -9,7 +9,7 @@ }, "end": { "line": 1, - "column": 22, - "character": 22 + "column": 8, + "character": 8 } }] \ No newline at end of file From 67af1a203e03ff1d6b5405af7553682174d7a4a6 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 29 Jan 2019 11:25:40 -0500 Subject: [PATCH 066/125] disallow `slot` as a prop name in inline components (#2019) --- src/compile/nodes/InlineComponent.ts | 7 +++++++ test/validator/samples/prop-slot/errors.json | 15 +++++++++++++++ test/validator/samples/prop-slot/input.html | 5 +++++ 3 files changed, 27 insertions(+) create mode 100644 test/validator/samples/prop-slot/errors.json create mode 100644 test/validator/samples/prop-slot/input.html diff --git a/src/compile/nodes/InlineComponent.ts b/src/compile/nodes/InlineComponent.ts index 28c7b2594e..7ba476e21d 100644 --- a/src/compile/nodes/InlineComponent.ts +++ b/src/compile/nodes/InlineComponent.ts @@ -42,6 +42,13 @@ export default class InlineComponent extends Node { }); case 'Attribute': + if (node.name === 'slot') { + component.error(node, { + code: `invalid-prop`, + message: `'slot' is reserved for future use in named slots` + }); + } + // fallthrough case 'Spread': this.attributes.push(new Attribute(component, this, scope, node)); break; diff --git a/test/validator/samples/prop-slot/errors.json b/test/validator/samples/prop-slot/errors.json new file mode 100644 index 0000000000..01e864b542 --- /dev/null +++ b/test/validator/samples/prop-slot/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "invalid-prop", + "message": "'slot' is reserved for future use in named slots", + "start": { + "line": 5, + "column": 8, + "character": 65 + }, + "end": { + "line": 5, + "column": 18, + "character": 75 + }, + "pos": 65 +}] diff --git a/test/validator/samples/prop-slot/input.html b/test/validator/samples/prop-slot/input.html new file mode 100644 index 0000000000..6ce1b6dcce --- /dev/null +++ b/test/validator/samples/prop-slot/input.html @@ -0,0 +1,5 @@ + + + From 14d41af973eb6bf75bb9616a01dfc04cac74ab68 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 29 Jan 2019 12:44:53 -0500 Subject: [PATCH 067/125] site: update eslint-plugin-svelte3 --- site/package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/package-lock.json b/site/package-lock.json index 523cfeb0d8..e8ea70c875 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1522,7 +1522,7 @@ "dev": true }, "eslint-plugin-svelte3": { - "version": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#6c9cc7b733663f8b9c68817ddd50d6bf4f5052c3", + "version": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#5fc4861d4b191649b0badf4f9a4c2470f08b237e", "from": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#semver:*", "dev": true }, From a270661d20b98263d54a808d817e77fa4d5e0d5b Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 29 Jan 2019 14:09:51 -0500 Subject: [PATCH 068/125] rename `` to `` (#2017) --- site/content/examples/immutable/App.html | 2 +- .../examples/immutable/ImmutableTodo.html | 2 +- src/compile/Component.ts | 50 +++++++++---------- src/compile/nodes/Meta.ts | 5 -- src/compile/nodes/Options.ts | 5 ++ src/compile/nodes/shared/mapChildren.ts | 4 +- src/compile/render-dom/index.ts | 14 +++--- src/compile/render-dom/wrappers/Fragment.ts | 2 +- src/compile/render-ssr/Renderer.ts | 2 +- src/parse/state/tag.ts | 2 +- test/cli/samples/custom-element/src/Main.html | 4 +- .../samples/custom-method/main.html | 4 +- .../samples/escaped-css/main.html | 4 +- .../samples/html-slots/main.html | 4 +- test/custom-elements/samples/html/main.html | 4 +- .../samples/nested.skip/Counter.html | 4 +- .../samples/nested.skip/main.html | 4 +- .../samples/new-styled/main.html | 4 +- test/custom-elements/samples/new/main.html | 4 +- .../no-missing-prop-warnings/main.html | 4 +- .../samples/oncreate/main.html | 3 +- test/custom-elements/samples/props/main.html | 4 +- .../samples/props/my-widget.html | 4 +- .../component-static-immutable/input.html | 4 +- .../css-shadow-dom-keyframes/input.html | 4 +- .../error-svelte-selfdestructive/error.json | 2 +- .../immutable-svelte-meta-false/main.html | 4 +- .../samples/immutable-svelte-meta/main.html | 4 +- .../samples/spread-own-props/main.html | 2 +- .../Rect.html | 2 +- .../Rect.html | 2 +- .../namespace-invalid-unguessable/errors.json | 10 ++-- .../namespace-invalid-unguessable/input.html | 2 +- .../samples/namespace-invalid/errors.json | 10 ++-- .../samples/namespace-invalid/input.html | 2 +- .../samples/namespace-non-literal/errors.json | 10 ++-- .../samples/namespace-non-literal/input.html | 2 +- .../input.html | 2 +- .../validator/samples/tag-invalid/errors.json | 12 ++--- test/validator/samples/tag-invalid/input.html | 2 +- .../samples/tag-non-string/errors.json | 12 ++--- .../samples/tag-non-string/input.html | 2 +- 42 files changed, 114 insertions(+), 115 deletions(-) delete mode 100644 src/compile/nodes/Meta.ts create mode 100644 src/compile/nodes/Options.ts diff --git a/site/content/examples/immutable/App.html b/site/content/examples/immutable/App.html index db7795f43f..b5d78a165a 100644 --- a/site/content/examples/immutable/App.html +++ b/site/content/examples/immutable/App.html @@ -1,4 +1,4 @@ - + -

    {foo}

    \ No newline at end of file +

    {foo}

    diff --git a/test/custom-elements/samples/escaped-css/main.html b/test/custom-elements/samples/escaped-css/main.html index 0a28900d85..c465165483 100644 --- a/test/custom-elements/samples/escaped-css/main.html +++ b/test/custom-elements/samples/escaped-css/main.html @@ -1,4 +1,4 @@ - + @@ -6,4 +6,4 @@ .icon::before { content: '\ff' } - \ No newline at end of file + diff --git a/test/custom-elements/samples/html-slots/main.html b/test/custom-elements/samples/html-slots/main.html index fbc70b0aeb..91f1fb800e 100644 --- a/test/custom-elements/samples/html-slots/main.html +++ b/test/custom-elements/samples/html-slots/main.html @@ -1,4 +1,4 @@ - +
    @@ -8,4 +8,4 @@

    foo fallback content

    -
    \ No newline at end of file +
    diff --git a/test/custom-elements/samples/html/main.html b/test/custom-elements/samples/html/main.html index 4765b5a151..0931535a18 100644 --- a/test/custom-elements/samples/html/main.html +++ b/test/custom-elements/samples/html/main.html @@ -1,7 +1,7 @@ - + -

    Hello {name}!

    \ No newline at end of file +

    Hello {name}!

    diff --git a/test/custom-elements/samples/nested.skip/Counter.html b/test/custom-elements/samples/nested.skip/Counter.html index d365ce7644..87cde48466 100644 --- a/test/custom-elements/samples/nested.skip/Counter.html +++ b/test/custom-elements/samples/nested.skip/Counter.html @@ -1,7 +1,7 @@ - + - \ No newline at end of file + diff --git a/test/custom-elements/samples/nested.skip/main.html b/test/custom-elements/samples/nested.skip/main.html index 3e80f6015e..90459c83eb 100644 --- a/test/custom-elements/samples/nested.skip/main.html +++ b/test/custom-elements/samples/nested.skip/main.html @@ -1,4 +1,4 @@ - + -

    clicked {count} times

    \ No newline at end of file +

    clicked {count} times

    diff --git a/test/custom-elements/samples/new-styled/main.html b/test/custom-elements/samples/new-styled/main.html index be1b397fa5..e69c6e05b1 100644 --- a/test/custom-elements/samples/new-styled/main.html +++ b/test/custom-elements/samples/new-styled/main.html @@ -1,4 +1,4 @@ - +

    styled

    @@ -6,4 +6,4 @@ p { color: red; } - \ No newline at end of file + diff --git a/test/custom-elements/samples/new/main.html b/test/custom-elements/samples/new/main.html index 4765b5a151..0931535a18 100644 --- a/test/custom-elements/samples/new/main.html +++ b/test/custom-elements/samples/new/main.html @@ -1,7 +1,7 @@ - + -

    Hello {name}!

    \ No newline at end of file +

    Hello {name}!

    diff --git a/test/custom-elements/samples/no-missing-prop-warnings/main.html b/test/custom-elements/samples/no-missing-prop-warnings/main.html index a9baee2faf..3ea205e3f3 100644 --- a/test/custom-elements/samples/no-missing-prop-warnings/main.html +++ b/test/custom-elements/samples/no-missing-prop-warnings/main.html @@ -1,4 +1,4 @@ - +

    foo: {foo}

    -

    bar: {bar}

    \ No newline at end of file +

    bar: {bar}

    diff --git a/test/custom-elements/samples/oncreate/main.html b/test/custom-elements/samples/oncreate/main.html index 1a521ed761..ed3980a28e 100644 --- a/test/custom-elements/samples/oncreate/main.html +++ b/test/custom-elements/samples/oncreate/main.html @@ -1,4 +1,4 @@ - + - diff --git a/test/custom-elements/samples/props/main.html b/test/custom-elements/samples/props/main.html index bee06784e4..b36c7f3e3d 100644 --- a/test/custom-elements/samples/props/main.html +++ b/test/custom-elements/samples/props/main.html @@ -1,4 +1,4 @@ - + - \ No newline at end of file + diff --git a/test/custom-elements/samples/props/my-widget.html b/test/custom-elements/samples/props/my-widget.html index 6aabe5a73b..cf512e0ff8 100644 --- a/test/custom-elements/samples/props/my-widget.html +++ b/test/custom-elements/samples/props/my-widget.html @@ -1,8 +1,8 @@ - +

    {items.length} items

    -

    {items.join(', ')}

    \ No newline at end of file +

    {items.join(', ')}

    diff --git a/test/js/samples/component-static-immutable/input.html b/test/js/samples/component-static-immutable/input.html index d3c9d8066a..370c68e907 100644 --- a/test/js/samples/component-static-immutable/input.html +++ b/test/js/samples/component-static-immutable/input.html @@ -1,7 +1,7 @@ - + - \ No newline at end of file + diff --git a/test/js/samples/css-shadow-dom-keyframes/input.html b/test/js/samples/css-shadow-dom-keyframes/input.html index cc1274d7f9..bf0aebaa9a 100644 --- a/test/js/samples/css-shadow-dom-keyframes/input.html +++ b/test/js/samples/css-shadow-dom-keyframes/input.html @@ -1,4 +1,4 @@ - +
    fades in
    @@ -11,4 +11,4 @@ 0% { opacity: 0; } 100% { opacity: 1; } } - \ No newline at end of file + diff --git a/test/parser/samples/error-svelte-selfdestructive/error.json b/test/parser/samples/error-svelte-selfdestructive/error.json index bdef619538..2443bb9822 100644 --- a/test/parser/samples/error-svelte-selfdestructive/error.json +++ b/test/parser/samples/error-svelte-selfdestructive/error.json @@ -1,6 +1,6 @@ { "code": "invalid-tag-name", - "message": "Valid tag names are svelte:head, svelte:meta, svelte:window, svelte:body, svelte:self or svelte:component", + "message": "Valid tag names are svelte:head, svelte:options, svelte:window, svelte:body, svelte:self or svelte:component", "pos": 10, "start": { "character": 10, diff --git a/test/runtime/samples/immutable-svelte-meta-false/main.html b/test/runtime/samples/immutable-svelte-meta-false/main.html index 4649dac766..861260404b 100644 --- a/test/runtime/samples/immutable-svelte-meta-false/main.html +++ b/test/runtime/samples/immutable-svelte-meta-false/main.html @@ -1,4 +1,4 @@ - + + +

    {set.has('x')}

    \ No newline at end of file From f7d4d14f0c7a2b4ea7baf8b268a98c2e81550da7 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 29 Jan 2019 22:08:52 -0500 Subject: [PATCH 072/125] remove debugging output --- .../samples/deconflict-component-name-with-global/_config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/runtime/samples/deconflict-component-name-with-global/_config.js b/test/runtime/samples/deconflict-component-name-with-global/_config.js index 2b1efdcba6..4b8255868e 100644 --- a/test/runtime/samples/deconflict-component-name-with-global/_config.js +++ b/test/runtime/samples/deconflict-component-name-with-global/_config.js @@ -1,5 +1,4 @@ export default { - show: 1, compileOptions: { name: 'Set' }, From d9e80738c79c5eb4332cf26a4fbf6be7c17d982d Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 29 Jan 2019 22:23:49 -0500 Subject: [PATCH 073/125] fix tests --- src/compile/Component.ts | 2 ++ .../samples/dev-warning-missing-data-binding/_config.js | 2 +- .../samples/dev-warning-missing-data-component/_config.js | 2 +- test/runtime/samples/dev-warning-missing-data/_config.js | 4 ++-- test/runtime/samples/dev-warning-readonly-computed/_config.js | 2 +- .../samples/dev-warning-readonly-window-binding/_config.js | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/compile/Component.ts b/src/compile/Component.ts index e09f5ed0c6..a09955d86d 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -93,6 +93,8 @@ export default class Component { options: CompileOptions, stats: Stats ) { + this.name = name; + this.stats = stats; this.ast = ast; this.source = source; diff --git a/test/runtime/samples/dev-warning-missing-data-binding/_config.js b/test/runtime/samples/dev-warning-missing-data-binding/_config.js index ffe62384a1..f23c5d5ec5 100644 --- a/test/runtime/samples/dev-warning-missing-data-binding/_config.js +++ b/test/runtime/samples/dev-warning-missing-data-binding/_config.js @@ -4,6 +4,6 @@ export default { }, warnings: [ - ` was created without expected prop 'value'` + `
    was created without expected prop 'value'` ] }; diff --git a/test/runtime/samples/dev-warning-missing-data-component/_config.js b/test/runtime/samples/dev-warning-missing-data-component/_config.js index f3fc130528..a95e570988 100644 --- a/test/runtime/samples/dev-warning-missing-data-component/_config.js +++ b/test/runtime/samples/dev-warning-missing-data-component/_config.js @@ -4,6 +4,6 @@ export default { }, warnings: [ - ` was created without expected prop 'y'` + ` was created without expected prop 'y'` ] }; diff --git a/test/runtime/samples/dev-warning-missing-data/_config.js b/test/runtime/samples/dev-warning-missing-data/_config.js index 5bc6c8be1f..b929ff4741 100644 --- a/test/runtime/samples/dev-warning-missing-data/_config.js +++ b/test/runtime/samples/dev-warning-missing-data/_config.js @@ -4,7 +4,7 @@ export default { }, warnings: [ - ` was created without expected prop 'foo'`, - ` was created without expected prop 'bar'` + `
    was created without expected prop 'foo'`, + `
    was created without expected prop 'bar'` ] }; diff --git a/test/runtime/samples/dev-warning-readonly-computed/_config.js b/test/runtime/samples/dev-warning-readonly-computed/_config.js index e8ffbaba3c..33339071f4 100644 --- a/test/runtime/samples/dev-warning-readonly-computed/_config.js +++ b/test/runtime/samples/dev-warning-readonly-computed/_config.js @@ -12,7 +12,7 @@ export default { component.foo = 1; throw new Error( 'Expected an error' ); } catch ( err ) { - assert.equal( err.message, `: Cannot set read-only property 'foo'` ); + assert.equal( err.message, `
    : Cannot set read-only property 'foo'` ); } } }; \ No newline at end of file diff --git a/test/runtime/samples/dev-warning-readonly-window-binding/_config.js b/test/runtime/samples/dev-warning-readonly-window-binding/_config.js index 751cffde79..e0b46584e4 100644 --- a/test/runtime/samples/dev-warning-readonly-window-binding/_config.js +++ b/test/runtime/samples/dev-warning-readonly-window-binding/_config.js @@ -8,7 +8,7 @@ export default { component.width = 99; throw new Error('Expected an error'); } catch (err) { - assert.equal(err.message, `: Cannot set read-only property 'width'`); + assert.equal(err.message, `
    : Cannot set read-only property 'width'`); } } }; \ No newline at end of file From 84e3e667e4f5967aa9989f3f24561f132ff506e1 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 29 Jan 2019 22:28:36 -0500 Subject: [PATCH 074/125] bump alpha version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6f9b2a8f71..a26cfe8cf7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha21", + "version": "3.0.0-alpha22", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index.js", From 4252721deb6e5717a11aa6ca6e1803fbdda9bbce Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Tue, 29 Jan 2019 22:32:12 -0500 Subject: [PATCH 075/125] bump alpha version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a26cfe8cf7..25ba2a6772 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha22", + "version": "3.0.0-alpha23", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index.js", From 722e1fd3830f5e5b1d8f6c3c95b3bcbe2dac596f Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 30 Jan 2019 11:09:24 -0500 Subject: [PATCH 076/125] get name based on filename --- package-lock.json | 78 ++++++++++++++--------------- src/compile/index.ts | 11 +++- test/css/index.js | 2 - test/helpers.js | 13 +---- test/hydration/index.js | 6 --- test/runtime/index.js | 29 +++-------- test/server-side-rendering/index.js | 10 +++- 7 files changed, 66 insertions(+), 83 deletions(-) diff --git a/package-lock.json b/package-lock.json index 072761ad08..42fbca4d88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha20", + "version": "3.0.0-alpha23", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -130,7 +130,7 @@ }, "ansi-escapes": { "version": "3.1.0", - "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -209,7 +209,7 @@ }, "array-equal": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, @@ -541,7 +541,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -711,7 +711,7 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -741,7 +741,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -756,7 +756,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -995,7 +995,7 @@ "dependencies": { "domelementtype": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", "dev": true } @@ -1092,7 +1092,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -1324,7 +1324,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -1441,7 +1441,7 @@ }, "expand-range": { "version": "1.8.2", - "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { @@ -1681,7 +1681,7 @@ }, "fs-extra": { "version": "0.30.0", - "resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", "dev": true, "requires": { @@ -2662,7 +2662,7 @@ }, "is-builtin-module": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { @@ -2941,7 +2941,7 @@ }, "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, @@ -2977,7 +2977,7 @@ }, "jsonfile": { "version": "2.4.0", - "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "dev": true, "requires": { @@ -3053,7 +3053,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -3198,7 +3198,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -3226,7 +3226,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -3239,7 +3239,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -3348,7 +3348,7 @@ }, "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, @@ -3363,7 +3363,7 @@ "dependencies": { "commander": { "version": "1.0.4", - "resolved": "http://registry.npmjs.org/commander/-/commander-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-1.0.4.tgz", "integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=", "dev": true, "requires": { @@ -3395,7 +3395,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -3475,7 +3475,7 @@ }, "multiline": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz", "integrity": "sha1-abHyX/B00oKJBPJE3dBrfZbvbJM=", "dev": true, "requires": { @@ -3685,7 +3685,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -3856,7 +3856,7 @@ }, "os-tmpdir": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, @@ -3952,7 +3952,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -3997,7 +3997,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -4066,7 +4066,7 @@ }, "pretty-bytes": { "version": "1.0.4", - "resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", "dev": true, "requires": { @@ -4169,7 +4169,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -4509,7 +4509,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -4524,7 +4524,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -4876,7 +4876,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -5013,7 +5013,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -5267,7 +5267,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -5282,7 +5282,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -5633,13 +5633,13 @@ }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { "version": "0.2.3", - "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", "dev": true, "requires": { @@ -5655,7 +5655,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -5667,7 +5667,7 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true } diff --git a/src/compile/index.ts b/src/compile/index.ts index 8557bcdc75..97011c84e8 100644 --- a/src/compile/index.ts +++ b/src/compile/index.ts @@ -33,6 +33,15 @@ function validate_options(options: CompileOptions, stats: Stats) { } } +function get_name(filename) { + if (!filename) return null; + const parts = filename.split(/[\/\\]/); + if (/index\.\w+/.test(parts)) parts.pop(); + + const base = parts.pop().replace(/\..+/, ""); + return base[0].toUpperCase() + base.slice(1); +} + export default function compile(source: string, options: CompileOptions = {}) { options = assign({ generate: 'dom', dev: false }, options); @@ -54,7 +63,7 @@ export default function compile(source: string, options: CompileOptions = {}) { const component = new Component( ast, source, - options.name || 'SvelteComponent', + options.name || get_name(options.filename) || 'SvelteComponent', options, stats ); diff --git a/test/css/index.js b/test/css/index.js index 224af150bd..913dcf4237 100644 --- a/test/css/index.js +++ b/test/css/index.js @@ -62,7 +62,6 @@ describe('css', () => { input, Object.assign(config, { format: 'cjs', - name: 'SvelteComponent', onwarn: warning => { domWarnings.push(warning); } @@ -76,7 +75,6 @@ describe('css', () => { Object.assign(config, { format: 'cjs', generate: 'ssr', - name: 'SvelteComponent', onwarn: warning => { ssrWarnings.push(warning); } diff --git a/test/helpers.js b/test/helpers.js index 53b62aca5a..f2e2004f09 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -2,7 +2,6 @@ import * as jsdom from 'jsdom'; import * as assert from 'assert'; import * as glob from 'tiny-glob/sync.js'; import * as fs from 'fs'; -import * as path from 'path'; import * as colors from 'kleur'; // for coverage purposes, we need to test source files, @@ -171,24 +170,14 @@ export function addLineNumbers(code) { .join('\n'); } -function capitalise(str) { - return str[0].toUpperCase() + str.slice(1); -} - export function showOutput(cwd, options = {}, compile = svelte.compile) { glob('**/*.html', { cwd }).forEach(file => { if (file[0] === '_') return; - const name = path.basename(file) - .slice(0, -path.extname(file).length) - .replace(/^\d/, '_$&') - .replace(/[^a-zA-Z0-9_$]/g, ''); - const { js } = compile( fs.readFileSync(`${cwd}/${file}`, 'utf-8'), Object.assign(options, { - filename: file, - name: capitalise(name) + filename: file }) ); diff --git a/test/hydration/index.js b/test/hydration/index.js index e73bee4956..8b66937329 100644 --- a/test/hydration/index.js +++ b/test/hydration/index.js @@ -12,11 +12,6 @@ import { let compileOptions = null; -function getName(filename) { - const base = path.basename(filename).replace('.html', ''); - return base[0].toUpperCase() + base.slice(1); -} - const sveltePath = process.cwd(); describe('hydration', () => { @@ -27,7 +22,6 @@ describe('hydration', () => { const options = Object.assign( { filename, - name: getName(filename), hydratable: true, format: 'cjs', sveltePath diff --git a/test/runtime/index.js b/test/runtime/index.js index f320e37d6e..cd9a2a4946 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -19,11 +19,6 @@ let svelte; let compileOptions = null; let compile = null; -function getName(filename) { - const base = path.basename(filename).replace(".html", ""); - return base[0].toUpperCase() + base.slice(1); -} - const sveltePath = process.cwd().split('\\').join('/'); const internal = `${sveltePath}/internal.js`; @@ -33,10 +28,11 @@ describe("runtime", () => { svelte$ = loadSvelte(true); require.extensions[".html"] = function(module, filename) { - const options = Object.assign( - { filename, name: compileOptions.name || getName(filename), format: 'cjs', sveltePath }, - compileOptions - ); + const options = Object.assign({ + filename, + format: 'cjs', + sveltePath + }, compileOptions); const { js: { code } } = compile(fs.readFileSync(filename, "utf-8"), options); @@ -118,7 +114,7 @@ describe("runtime", () => { mod = require(`./samples/${dir}/main.html`); SvelteComponent = mod.default; } catch (err) { - showOutput(cwd, { internal, hydratable: hydrate, format: 'cjs' }, svelte.compile); // eslint-disable-line no-console + showOutput(cwd, compileOptions, svelte.compile); // eslint-disable-line no-console throw err; } @@ -189,22 +185,13 @@ describe("runtime", () => { } } else { failed.add(dir); - showOutput(cwd, { - internal, - hydratable: hydrate, - dev: compileOptions.dev, - format: 'cjs' - }, svelte.compile); // eslint-disable-line no-console + showOutput(cwd, compileOptions, svelte.compile); // eslint-disable-line no-console throw err; } }) .then(() => { if (config.show) { - showOutput(cwd, { - internal, - hydratable: hydrate, - format: 'cjs' - }, svelte.compile); + showOutput(cwd, compileOptions, svelte.compile); } flush(); diff --git a/test/server-side-rendering/index.js b/test/server-side-rendering/index.js index 4fd5223b1f..a23936bba3 100644 --- a/test/server-side-rendering/index.js +++ b/test/server-side-rendering/index.js @@ -109,7 +109,9 @@ describe("ssr", () => { delete require.cache[resolved]; }); - const compileOptions = Object.assign({ sveltePath }, config.compileOptions); + const compileOptions = Object.assign({ sveltePath }, config.compileOptions, { + generate: 'ssr' + }); require("../../register")(compileOptions); @@ -128,6 +130,10 @@ describe("ssr", () => { } if (config.after_test) config.after_test(); + + if (config.show) { + showOutput(cwd, compileOptions); + } } catch (err) { if (config.error) { if (typeof config.error === 'function') { @@ -136,7 +142,7 @@ describe("ssr", () => { assert.equal(config.error, err.message); } } else { - showOutput(cwd, { generate: "ssr" }); + showOutput(cwd, compileOptions); throw err; } } From 0d2622da4966997fc0fa54f41236193afe1806a7 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 30 Jan 2019 11:14:01 -0500 Subject: [PATCH 077/125] sanitize --- src/compile/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/compile/index.ts b/src/compile/index.ts index 97011c84e8..390774419d 100644 --- a/src/compile/index.ts +++ b/src/compile/index.ts @@ -38,7 +38,13 @@ function get_name(filename) { const parts = filename.split(/[\/\\]/); if (/index\.\w+/.test(parts)) parts.pop(); - const base = parts.pop().replace(/\..+/, ""); + const base = parts.pop() + .replace(/\..+/, "") + .replace(/[^a-zA-Z_$0-9]+/g, '_') + .replace(/^_/, '') + .replace(/_$/, '') + .replace(/^(\d)/, '_$1'); + return base[0].toUpperCase() + base.slice(1); } From 2703f609a5f0930cf7913dcd26fddf2837169a8d Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 30 Jan 2019 12:08:09 -0500 Subject: [PATCH 078/125] avoid spread pattern, it causes some problems with some setups somehow??? --- package.json | 2 +- src/compile/nodes/Attribute.ts | 2 +- src/compile/nodes/Element.ts | 2 +- src/compile/nodes/shared/Expression.ts | 6 +++--- src/compile/render-dom/index.ts | 4 ++-- src/compile/render-dom/wrappers/DebugTag.ts | 2 +- src/compile/render-dom/wrappers/Element/index.ts | 2 +- src/compile/render-dom/wrappers/InlineComponent/index.ts | 6 +++--- src/compile/render-dom/wrappers/Slot.ts | 2 +- src/parse/state/tag.ts | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 25ba2a6772..9c1b17397d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha23", + "version": "3.0.0-alpha25", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index.js", diff --git a/src/compile/nodes/Attribute.ts b/src/compile/nodes/Attribute.ts index 3e1a08855c..1071be902f 100644 --- a/src/compile/nodes/Attribute.ts +++ b/src/compile/nodes/Attribute.ts @@ -83,7 +83,7 @@ export default class Attribute extends Node { } }); - return [...dependencies]; + return Array.from(dependencies); } getValue() { diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts index ed0a0a3265..24378b180c 100644 --- a/src/compile/nodes/Element.ts +++ b/src/compile/nodes/Element.ts @@ -598,7 +598,7 @@ export default class Element extends Node { if (!validModifiers.has(modifier)) { component.error(handler, { code: 'invalid-event-modifier', - message: `Valid event modifiers are ${list([...validModifiers])}` + message: `Valid event modifiers are ${list(Array.from(validModifiers))}` }); } diff --git a/src/compile/nodes/shared/Expression.ts b/src/compile/nodes/shared/Expression.ts index ea2237543a..818066f21a 100644 --- a/src/compile/nodes/shared/Expression.ts +++ b/src/compile/nodes/shared/Expression.ts @@ -343,7 +343,7 @@ export default class Expression { ); const args = contextual_dependencies.size > 0 - ? [`{ ${[...contextual_dependencies].join(', ')} }`] + ? [`{ ${Array.from(contextual_dependencies).join(', ')} }`] : []; let original_params; @@ -356,7 +356,7 @@ export default class Expression { let body = code.slice(node.body.start, node.body.end).trim(); if (node.body.type !== 'BlockStatement') { if (pending_assignments.size > 0) { - const insert = [...pending_assignments].map(name => `$$invalidate('${name}', ${name})`).join('; '); + const insert = Array.from(pending_assignments).map(name => `$$invalidate('${name}', ${name})`).join('; '); pending_assignments = new Set(); component.has_reactive_assignments = true; @@ -431,7 +431,7 @@ export default class Expression { const insert = ( (has_semi ? ' ' : '; ') + - [...pending_assignments].map(name => `$$invalidate('${name}', ${name})`).join('; ') + Array.from(pending_assignments).map(name => `$$invalidate('${name}', ${name})`).join('; ') ); if (/^(Break|Continue|Return)Statement/.test(node.type)) { diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts index ecfe790f38..24058fc984 100644 --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -203,7 +203,7 @@ export default function dom( if (pending_assignments.size > 0) { if (node.type === 'ArrowFunctionExpression') { - const insert = [...pending_assignments].map(name => `$$invalidate('${name}', ${name})`).join(';'); + const insert = Array.from(pending_assignments).map(name => `$$invalidate('${name}', ${name})`).join(';'); pending_assignments = new Set(); code.prependRight(node.body.start, `{ const $$result = `); @@ -213,7 +213,7 @@ export default function dom( } else if (/Statement/.test(node.type)) { - const insert = [...pending_assignments].map(name => `$$invalidate('${name}', ${name})`).join('; '); + const insert = Array.from(pending_assignments).map(name => `$$invalidate('${name}', ${name})`).join('; '); if (/^(Break|Continue|Return)Statement/.test(node.type)) { if (node.argument) { diff --git a/src/compile/render-dom/wrappers/DebugTag.ts b/src/compile/render-dom/wrappers/DebugTag.ts index 294276a4ea..630735d110 100644 --- a/src/compile/render-dom/wrappers/DebugTag.ts +++ b/src/compile/render-dom/wrappers/DebugTag.ts @@ -48,7 +48,7 @@ export default class DebugTagWrapper extends Wrapper { addToSet(dependencies, expression.dependencies); }); - const condition = [...dependencies].map(d => `changed.${d}`).join(' || '); + const condition = Array.from(dependencies).map(d => `changed.${d}`).join(' || '); const identifiers = this.node.expressions.map(e => e.node.name).join(', '); diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts index 77cb4bbd9f..4a30232fcc 100644 --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -459,7 +459,7 @@ export default class ElementWrapper extends Wrapper { } this.renderer.component.partly_hoisted.push(deindent` - function ${handler}(${contextual_dependencies.size > 0 ? `{ ${[...contextual_dependencies].join(', ')} }` : ``}) { + function ${handler}(${contextual_dependencies.size > 0 ? `{ ${Array.from(contextual_dependencies).join(', ')} }` : ``}) { ${group.bindings.map(b => b.handler.mutation)} ${Array.from(dependencies).filter(dep => dep[0] !== '$').map(dep => `$$invalidate('${dep}', ${dep});`)} } diff --git a/src/compile/render-dom/wrappers/InlineComponent/index.ts b/src/compile/render-dom/wrappers/InlineComponent/index.ts index 5a07e3533a..a974de5687 100644 --- a/src/compile/render-dom/wrappers/InlineComponent/index.ts +++ b/src/compile/render-dom/wrappers/InlineComponent/index.ts @@ -181,7 +181,7 @@ export default class InlineComponentWrapper extends Wrapper { const { name, dependencies } = attr; const condition = dependencies.size > 0 && (dependencies.size !== allDependencies.size) - ? `(${[...dependencies].map(d => `changed.${d}`).join(' || ')})` + ? `(${Array.from(dependencies).map(d => `changed.${d}`).join(' || ')})` : null; if (attr.isSpread) { @@ -209,7 +209,7 @@ export default class InlineComponentWrapper extends Wrapper { } `); - const conditions = [...allDependencies].map(dep => `changed.${dep}`).join(' || '); + const conditions = Array.from(allDependencies).map(dep => `changed.${dep}`).join(' || '); updates.push(deindent` var ${name_changes} = ${allDependencies.size === 1 ? `${conditions}` : `(${conditions})`} ? @getSpreadUpdate(${levels}, [ @@ -232,7 +232,7 @@ export default class InlineComponentWrapper extends Wrapper { } if (fragment_dependencies.size > 0) { - updates.push(`if (${[...fragment_dependencies].map(n => `changed.${n}`).join(' || ')}) ${name_changes}.$$scope = { changed, ctx };`); + updates.push(`if (${Array.from(fragment_dependencies).map(n => `changed.${n}`).join(' || ')}) ${name_changes}.$$scope = { changed, ctx };`); } const munged_bindings = this.node.bindings.map(binding => { diff --git a/src/compile/render-dom/wrappers/Slot.ts b/src/compile/render-dom/wrappers/Slot.ts index ae81910dba..746f9a2066 100644 --- a/src/compile/render-dom/wrappers/Slot.ts +++ b/src/compile/render-dom/wrappers/Slot.ts @@ -81,7 +81,7 @@ export default class SlotWrapper extends Wrapper { } }); - const arg = dependencies.size > 0 ? `{ ${[...dependencies].join(', ')} }` : '{}'; + const arg = dependencies.size > 0 ? `{ ${Array.from(dependencies).join(', ')} }` : '{}'; renderer.blocks.push(deindent` const ${get_slot_changes} = (${arg}) => (${stringifyProps(changes_props)}); diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts index 451060aff7..9ca4d8f5dd 100644 --- a/src/parse/state/tag.ts +++ b/src/parse/state/tag.ts @@ -17,7 +17,7 @@ const metaTags = new Map([ ['svelte:body', 'Body'] ]); -const valid_meta_tags = [...metaTags.keys(), 'svelte:self', 'svelte:component']; +const valid_meta_tags = [Array.from(metaTags.keys()), 'svelte:self', 'svelte:component']; const specials = new Map([ [ From de23e19e5d6386207002cfc352f0512f990381cb Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 30 Jan 2019 12:13:29 -0500 Subject: [PATCH 079/125] doh --- src/parse/state/tag.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts index 9ca4d8f5dd..f62ac527bf 100644 --- a/src/parse/state/tag.ts +++ b/src/parse/state/tag.ts @@ -17,7 +17,7 @@ const metaTags = new Map([ ['svelte:body', 'Body'] ]); -const valid_meta_tags = [Array.from(metaTags.keys()), 'svelte:self', 'svelte:component']; +const valid_meta_tags = Array.from(metaTags.keys()).concat('svelte:self', 'svelte:component'); const specials = new Map([ [ From 5b57a17632597e9a2c831c271ed0eeef01117213 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 30 Jan 2019 13:15:21 -0500 Subject: [PATCH 080/125] deconflict with globals referenced in module context --- src/compile/Component.ts | 13 ++++++++++++- src/compile/index.ts | 5 ++++- .../_config.js | 9 +++++++++ .../main.html | 5 +++++ 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 test/runtime/samples/deconflict-component-name-with-module-global/_config.js create mode 100644 test/runtime/samples/deconflict-component-name-with-module-global/main.html diff --git a/src/compile/Component.ts b/src/compile/Component.ts index de960813b4..c9304ee54a 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -504,7 +504,7 @@ export default class Component { this.addSourcemapLocations(script.content); - let { scope } = createScopes(script.content); + let { scope, globals } = createScopes(script.content); this.module_scope = scope; scope.declarations.forEach((node, name) => { @@ -535,6 +535,17 @@ export default class Component { } }); + globals.forEach(name => { + if (name[0] === '$') { + // TODO should this be possible? + } else { + this.add_var({ + name, + global: true + }); + } + }); + this.extract_imports(script.content, true); this.extract_exports(script.content, true); remove_indentation(this.code, script.content); diff --git a/src/compile/index.ts b/src/compile/index.ts index 390774419d..2265d10301 100644 --- a/src/compile/index.ts +++ b/src/compile/index.ts @@ -36,7 +36,10 @@ function validate_options(options: CompileOptions, stats: Stats) { function get_name(filename) { if (!filename) return null; const parts = filename.split(/[\/\\]/); - if (/index\.\w+/.test(parts)) parts.pop(); + + if (parts.length > 1 && /^index\.\w+/.test(parts[parts.length - 1])) { + parts.pop(); + } const base = parts.pop() .replace(/\..+/, "") diff --git a/test/runtime/samples/deconflict-component-name-with-module-global/_config.js b/test/runtime/samples/deconflict-component-name-with-module-global/_config.js new file mode 100644 index 0000000000..4b8255868e --- /dev/null +++ b/test/runtime/samples/deconflict-component-name-with-module-global/_config.js @@ -0,0 +1,9 @@ +export default { + compileOptions: { + name: 'Set' + }, + + preserveIdentifiers: true, + + html: `

    true

    ` +}; \ No newline at end of file diff --git a/test/runtime/samples/deconflict-component-name-with-module-global/main.html b/test/runtime/samples/deconflict-component-name-with-module-global/main.html new file mode 100644 index 0000000000..a14f3e7a1e --- /dev/null +++ b/test/runtime/samples/deconflict-component-name-with-module-global/main.html @@ -0,0 +1,5 @@ + + +

    {set.has('x')}

    \ No newline at end of file From fb534a3d501be11347d43dbc59e1063be91ec1fb Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 30 Jan 2019 14:26:55 -0500 Subject: [PATCH 081/125] return promise from nextTick --- src/internal/scheduler.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/internal/scheduler.js b/src/internal/scheduler.js index 4d9f9ad388..bc4e14b96d 100644 --- a/src/internal/scheduler.js +++ b/src/internal/scheduler.js @@ -4,14 +4,13 @@ import { set_current_component } from './lifecycle.js'; export let dirty_components = []; export const intros = { enabled: false }; -let update_scheduled = false; +let update_promise; const binding_callbacks = []; const render_callbacks = []; export function schedule_update() { - if (!update_scheduled) { - update_scheduled = true; - queue_microtask(flush); + if (!update_promise) { + update_promise = Promise.resolve().then(flush); } } @@ -22,6 +21,7 @@ export function add_render_callback(fn) { export function nextTick(fn) { add_render_callback(fn); schedule_update(); + return update_promise; } export function add_binding_callback(fn) { @@ -56,7 +56,7 @@ export function flush() { } } while (dirty_components.length); - update_scheduled = false; + update_promise = null; } function update($$) { @@ -68,10 +68,4 @@ function update($$) { $$.after_render.forEach(add_render_callback); } -} - -function queue_microtask(callback) { - Promise.resolve().then(() => { - if (update_scheduled) callback(); - }); } \ No newline at end of file From 3c1734c1fc022133f65685e0ab128f2d4924d7c9 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 30 Jan 2019 14:27:39 -0500 Subject: [PATCH 082/125] make callback optional --- src/internal/scheduler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/scheduler.js b/src/internal/scheduler.js index bc4e14b96d..7292c85f07 100644 --- a/src/internal/scheduler.js +++ b/src/internal/scheduler.js @@ -19,7 +19,7 @@ export function add_render_callback(fn) { } export function nextTick(fn) { - add_render_callback(fn); + if (fn) add_render_callback(fn); schedule_update(); return update_promise; } From 3ea5f3b8f0e93180acca730316e3c2b1c9469375 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 30 Jan 2019 15:06:06 -0500 Subject: [PATCH 083/125] rename to tick, remove callback interface --- index.mjs | 2 +- src/internal/scheduler.js | 3 +-- test/runtime/samples/lifecycle-next-tick/main.html | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/index.mjs b/index.mjs index 768b53f626..ee5b575171 100644 --- a/index.mjs +++ b/index.mjs @@ -5,6 +5,6 @@ export { afterUpdate, setContext, getContext, - nextTick, + tick, createEventDispatcher } from './internal'; diff --git a/src/internal/scheduler.js b/src/internal/scheduler.js index 7292c85f07..717a5c7ff4 100644 --- a/src/internal/scheduler.js +++ b/src/internal/scheduler.js @@ -18,8 +18,7 @@ export function add_render_callback(fn) { render_callbacks.push(fn); } -export function nextTick(fn) { - if (fn) add_render_callback(fn); +export function tick() { schedule_update(); return update_promise; } diff --git a/test/runtime/samples/lifecycle-next-tick/main.html b/test/runtime/samples/lifecycle-next-tick/main.html index f7a889d433..0c577c20e8 100644 --- a/test/runtime/samples/lifecycle-next-tick/main.html +++ b/test/runtime/samples/lifecycle-next-tick/main.html @@ -1,5 +1,5 @@ + From 66d5a39f98fc8f49c8f4a6522a5ffc690581ac2a Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 1 Feb 2019 10:40:53 -0500 Subject: [PATCH 087/125] change pkg.main to appease webpack --- .eslintrc.json | 2 +- package-lock.json | 2 +- package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 59fd92eeb6..7e8c26382a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -34,7 +34,7 @@ "plugin:import/warnings" ], "parserOptions": { - "ecmaVersion": 6, + "ecmaVersion": 9, "sourceType": "module" }, "settings": { diff --git a/package-lock.json b/package-lock.json index 42fbca4d88..2a16152ce1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha23", + "version": "3.0.0-alpha26", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9c1b17397d..db066a3861 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "svelte", - "version": "3.0.0-alpha25", + "version": "3.0.0-alpha26", "description": "The magical disappearing UI framework", "module": "index.mjs", - "main": "index.js", + "main": "index", "bin": { "svelte": "svelte" }, From 36c536fd1b18d9383d86b4698a48acd9132d6493 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 1 Feb 2019 10:41:40 -0500 Subject: [PATCH 088/125] bump alpha version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2a16152ce1..32cb9afe7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha26", + "version": "3.0.0-alpha27", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index db066a3861..440fcabf30 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha26", + "version": "3.0.0-alpha27", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index", From 969c884e31502615de0d1a88d11a62960d73f6ae Mon Sep 17 00:00:00 2001 From: halfnelson Date: Sun, 3 Feb 2019 10:51:19 +1000 Subject: [PATCH 089/125] repl improvements - Dont bind props until after component is created - Remove debug logs - destroy repl proxy event listener on compont destory - all repl-proxy commands now return a value --- .../repl/_components/Output/Viewer.html | 22 +++-- site/src/routes/repl/_utils/replProxy.js | 15 +-- site/static/repl-runner.js | 96 +++++++++++-------- 3 files changed, 81 insertions(+), 52 deletions(-) diff --git a/site/src/routes/repl/_components/Output/Viewer.html b/site/src/routes/repl/_components/Output/Viewer.html index e62e0d695b..7fc6856d3e 100644 --- a/site/src/routes/repl/_components/Output/Viewer.html +++ b/site/src/routes/repl/_components/Output/Viewer.html @@ -1,5 +1,5 @@ + + + + \ No newline at end of file diff --git a/test/stats/samples/duplicate-non-hoistable/_config.js b/test/stats/samples/duplicate-non-hoistable/_config.js new file mode 100644 index 0000000000..4b598412a9 --- /dev/null +++ b/test/stats/samples/duplicate-non-hoistable/_config.js @@ -0,0 +1,16 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'console', + injected: false, + export_name: null, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + } + ]); + }, +}; diff --git a/test/stats/samples/duplicate-non-hoistable/input.html b/test/stats/samples/duplicate-non-hoistable/input.html new file mode 100644 index 0000000000..90f7734008 --- /dev/null +++ b/test/stats/samples/duplicate-non-hoistable/input.html @@ -0,0 +1,9 @@ + + + + +

    {console}

    \ No newline at end of file diff --git a/test/stats/samples/duplicate-vars/_config.js b/test/stats/samples/duplicate-vars/_config.js new file mode 100644 index 0000000000..f4f71fe021 --- /dev/null +++ b/test/stats/samples/duplicate-vars/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'foo', + injected: false, + export_name: null, + module: true, + mutated: false, + reassigned: false, + referenced: false, + writable: true + }, + { + name: 'foo', + injected: false, + export_name: null, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + } + ]); + }, +}; diff --git a/test/stats/samples/duplicate-vars/input.html b/test/stats/samples/duplicate-vars/input.html new file mode 100644 index 0000000000..20c48738db --- /dev/null +++ b/test/stats/samples/duplicate-vars/input.html @@ -0,0 +1,9 @@ + + + + +

    {foo}

    \ No newline at end of file From 0f7ae264e4e682b56c02ac184c96fb87e0d25359 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 3 Feb 2019 20:39:00 -0500 Subject: [PATCH 093/125] insert semicolon where necessary when initing props - fixes #2037 --- src/compile/Component.ts | 11 ++++++++--- .../samples/prop-without-semicolon-b/_config.js | 7 +++++++ .../samples/prop-without-semicolon-b/main.html | 6 ++++++ 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 test/runtime/samples/prop-without-semicolon-b/_config.js create mode 100644 test/runtime/samples/prop-without-semicolon-b/main.html diff --git a/src/compile/Component.ts b/src/compile/Component.ts index c9304ee54a..74c0b2b54c 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -744,10 +744,14 @@ export default class Component { }); } + const suffix = code.original[declarator.end] === ';' + ? ` = $$props` + : ` = $$props;` + if (declarator.id.end === declarator.end) { - code.appendLeft(declarator.end, ' = $$props'); + code.appendLeft(declarator.end, suffix); } else { - code.overwrite(declarator.id.end, declarator.end, ' = $$props'); + code.overwrite(declarator.id.end, declarator.end, suffix); } } @@ -823,7 +827,8 @@ export default class Component { }); if (combining) { - code.appendLeft(c, ' } = $$props'); + const suffix = code.original[c] === ';' ? ` } = $$props` : ` } = $$props;`; + code.appendLeft(c, suffix); } }); } diff --git a/test/runtime/samples/prop-without-semicolon-b/_config.js b/test/runtime/samples/prop-without-semicolon-b/_config.js new file mode 100644 index 0000000000..7104dc2b2d --- /dev/null +++ b/test/runtime/samples/prop-without-semicolon-b/_config.js @@ -0,0 +1,7 @@ +export default { + props: { + name: 'world' + }, + + html: `

    Hello world!

    ` +}; \ No newline at end of file diff --git a/test/runtime/samples/prop-without-semicolon-b/main.html b/test/runtime/samples/prop-without-semicolon-b/main.html new file mode 100644 index 0000000000..671fb95186 --- /dev/null +++ b/test/runtime/samples/prop-without-semicolon-b/main.html @@ -0,0 +1,6 @@ +

    Hello {name}!

    + + \ No newline at end of file From 183c9ca403218a8e85e1753e796da8ff49c7ae50 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 3 Feb 2019 22:07:34 -0500 Subject: [PATCH 094/125] switching to beta versions. dont read too much into it. just bored of lexicographic ordering --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e4f885bd1d..87725ebc4f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha27", + "version": "3.0.0-beta.1", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index", From 3a03485d0d9dc617b7595bb7cdd0801686c11fb8 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 3 Feb 2019 22:21:03 -0500 Subject: [PATCH 095/125] fix tests --- package.json | 2 +- test/js/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 87725ebc4f..4868803490 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-beta.1", + "version": "3.0.0-beta.2", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index", diff --git a/test/js/index.js b/test/js/index.js index 715a43a470..d6cb71e416 100644 --- a/test/js/index.js +++ b/test/js/index.js @@ -27,7 +27,7 @@ describe("js", () => { shared: true }); - actual = svelte.compile(input, options).js.code.replace(/generated by Svelte v\d+\.\d+\.\d+(-\w+)?/, 'generated by Svelte vX.Y.Z'); + actual = svelte.compile(input, options).js.code.replace(/generated by Svelte v\d+\.\d+\.\d+(-\w+\.\d+)?/, 'generated by Svelte vX.Y.Z'); } catch (err) { console.log(err.frame); throw err; From f7e015037ea2a5f754e9c50d477c93005ae8ea39 Mon Sep 17 00:00:00 2001 From: Jacob Wright Date: Tue, 5 Feb 2019 14:50:53 -0700 Subject: [PATCH 096/125] Ensure derive behaves consistently Fixes https://github.com/sveltejs/svelte/issues/2056 --- store.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/store.mjs b/store.mjs index ffdd90bf0e..797b512704 100644 --- a/store.mjs +++ b/store.mjs @@ -66,7 +66,6 @@ export function derive(stores, fn) { const single = !Array.isArray(stores); if (single) stores = [stores]; - const auto = fn.length === 1; let value = {}; return readable(set => { @@ -78,7 +77,7 @@ export function derive(stores, fn) { const sync = () => { if (pending) return; const result = fn(single ? values[0] : values, set); - if (auto && (value !== (value = result))) set(result); + if (value !== (value = result)) set(result); } const unsubscribers = stores.map((store, i) => store.subscribe( From 6eefb4b6012c8244aa6cd11a4b875e66179cf59d Mon Sep 17 00:00:00 2001 From: Jacob Wright Date: Tue, 5 Feb 2019 15:12:14 -0700 Subject: [PATCH 097/125] Fixes to correct solution --- store.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/store.mjs b/store.mjs index 797b512704..10bdad3626 100644 --- a/store.mjs +++ b/store.mjs @@ -66,6 +66,7 @@ export function derive(stores, fn) { const single = !Array.isArray(stores); if (single) stores = [stores]; + const auto = fn.length < 2; let value = {}; return readable(set => { @@ -77,7 +78,7 @@ export function derive(stores, fn) { const sync = () => { if (pending) return; const result = fn(single ? values[0] : values, set); - if (value !== (value = result)) set(result); + if (auto && (value !== (value = result))) set(result); } const unsubscribers = stores.map((store, i) => store.subscribe( From 7cf6c0a492b46b11745bc2d2af80c75a6075f55a Mon Sep 17 00:00:00 2001 From: Vasiliy Mikhaylovsky Date: Wed, 6 Feb 2019 03:18:31 +0500 Subject: [PATCH 098/125] Change "Keyed each blocks" to v3 https://v3.svelte.technology/repl?version=3.0.0-beta.1&gist=f39ae2d72b85b84415aed58acdc43d87 --- site/content/guide/18-advanced.md | 32 ++++++++++++------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/site/content/guide/18-advanced.md b/site/content/guide/18-advanced.md index 7ebd2ef850..51e4622176 100644 --- a/site/content/guide/18-advanced.md +++ b/site/content/guide/18-advanced.md @@ -18,7 +18,7 @@ It's easier to show the effect of this than to describe it. Open the following e ```html - +

    Keyed

    @@ -46,29 +46,21 @@ It's easier to show the effect of this than to describe it. Open the following e ``` From 539fbbd8efdabbc90f35bd71b0d49dcce0fb8be5 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 6 Feb 2019 14:49:24 -0500 Subject: [PATCH 099/125] inject lets for reactive declarations where necessary - fixes #2059 --- src/compile/Component.ts | 44 ++++++++++++++----- src/compile/render-dom/index.ts | 29 +++++++++--- src/compile/render-ssr/index.ts | 9 +++- .../reactive-values-implicit/_config.js | 14 ++++++ .../reactive-values-implicit/main.html | 10 +++++ .../samples/implicit-reactive/_config.js | 26 +++++++++++ .../samples/implicit-reactive/input.html | 6 +++ 7 files changed, 119 insertions(+), 19 deletions(-) create mode 100644 test/runtime/samples/reactive-values-implicit/_config.js create mode 100644 test/runtime/samples/reactive-values-implicit/main.html create mode 100644 test/stats/samples/implicit-reactive/_config.js create mode 100644 test/stats/samples/implicit-reactive/input.html diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 8ca4852df5..659cf972cc 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -20,7 +20,6 @@ import TemplateScope from './nodes/shared/TemplateScope'; import fuzzymatch from '../utils/fuzzymatch'; import { remove_indentation, add_indentation } from '../utils/indentation'; import getObject from '../utils/getObject'; -import deindent from '../utils/deindent'; import globalWhitelist from '../utils/globalWhitelist'; type ComponentOptions = { @@ -66,9 +65,10 @@ export default class Component { node_for_declaration: Map = new Map(); partly_hoisted: string[] = []; fully_hoisted: string[] = []; - reactive_declarations: Array<{ assignees: Set, dependencies: Set, snippet: string }> = []; + reactive_declarations: Array<{ assignees: Set, dependencies: Set, node: Node, injected: boolean }> = []; reactive_declaration_nodes: Set = new Set(); has_reactive_assignments = false; + injected_reactive_declaration_vars: Set = new Set(); indirectDependencies: Map> = new Map(); @@ -554,6 +554,19 @@ export default class Component { this.addSourcemapLocations(script.content); + // inject vars for reactive declarations + script.content.body.forEach(node => { + if (node.type !== 'LabeledStatement') return; + if (node.body.type !== 'ExpressionStatement') return; + if (node.body.expression.type !== 'AssignmentExpression') return; + + const { type, name } = node.body.expression.left; + + if (type === 'Identifier' && !this.var_lookup.has(name)) { + this.injected_reactive_declaration_vars.add(name); + } + }); + let { scope: instance_scope, map, globals } = createScopes(script.content); this.instance_scope = instance_scope; this.instance_scope_map = map; @@ -589,9 +602,17 @@ export default class Component { }); globals.forEach(name => { - if (this.module_scope && this.module_scope.declarations.has(name)) return; + if (this.var_lookup.has(name)) return; - if (name[0] === '$') { + if (this.injected_reactive_declaration_vars.has(name)) { + this.add_var({ + name, + injected: true, + writable: true, + reassigned: true, + initialised: true + }); + } else if (name[0] === '$') { this.add_var({ name, injected: true, @@ -1002,12 +1023,12 @@ export default class Component { assignees, dependencies, node, - snippet: node.body.type === 'BlockStatement' - ? `[✂${node.body.start}-${node.end}✂]` - : deindent` - { - [✂${node.body.start}-${node.end}✂] - }` + injected: ( + node.body.type === 'ExpressionStatement' && + node.body.expression.type === 'AssignmentExpression' && + node.body.expression.left.type === 'Identifier' && + this.var_lookup.get(node.body.expression.left.name).injected + ) }); } }); @@ -1082,8 +1103,7 @@ export default class Component { } if (allow_implicit && !this.ast.instance && !this.ast.module) return; - if (this.instance_scope && this.instance_scope.declarations.has(name)) return; - if (this.module_scope && this.module_scope.declarations.has(name)) return; + if (this.var_lookup.has(name)) return; if (template_scope && template_scope.names.has(name)) return; if (globalWhitelist.has(name)) return; diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts index 24058fc984..310800c197 100644 --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -178,10 +178,11 @@ export default function dom( code.overwrite(node.start, node.end, dirty.map(n => `$$invalidate('${n}', ${n})`).join('; ')); } else { names.forEach(name => { - if (scope.findOwner(name) !== component.instance_scope) return; + const owner = scope.findOwner(name); + if (owner && owner !== component.instance_scope) return; const variable = component.var_lookup.get(name); - if (variable && variable.hoistable) return; + if (variable && variable.hoistable || variable.global || variable.module) return; pending_assignments.add(name); component.has_reactive_assignments = true; @@ -312,6 +313,24 @@ export default function dom( .join('\n\n'); if (has_definition) { + const reactive_declarations = component.reactive_declarations.map(d => { + const condition = Array.from(d.dependencies).map(n => `$$dirty.${n}`).join(' || '); + const snippet = d.node.body.type === 'BlockStatement' + ? `[✂${d.node.body.start}-${d.node.end}✂]` + : deindent` + { + [✂${d.node.body.start}-${d.node.end}✂] + }`; + + return deindent` + if (${condition}) ${snippet}` + }); + + const injected = Array.from(component.injected_reactive_declaration_vars).filter(name => { + const variable = component.var_lookup.get(name); + return variable.injected; + }); + builder.addBlock(deindent` function ${definition}(${args.join(', ')}) { ${user_code} @@ -326,10 +345,10 @@ export default function dom( ${set && `$$self.$set = ${set};`} - ${component.reactive_declarations.length > 0 && deindent` + ${reactive_declarations.length > 0 && deindent` + ${injected.length && `let ${injected.join(', ')};`} $$self.$$.update = ($$dirty = { ${Array.from(all_reactive_dependencies).map(n => `${n}: 1`).join(', ')} }) => { - ${component.reactive_declarations.map(d => deindent` - if (${Array.from(d.dependencies).map(n => `$$dirty.${n}`).join(' || ')}) ${d.snippet}`)} + ${reactive_declarations} }; `} diff --git a/src/compile/render-ssr/index.ts b/src/compile/render-ssr/index.ts index 0ade0da8b4..a6d3123a33 100644 --- a/src/compile/render-ssr/index.ts +++ b/src/compile/render-ssr/index.ts @@ -50,6 +50,11 @@ export default function ssr( }) : []; + const reactive_declarations = component.reactive_declarations.map(d => { + const snippet = `[✂${d.node.body.start}-${d.node.end}✂]`; + return d.injected ? `let ${snippet}` : snippet; + }); + const main = renderer.has_bindings ? deindent` let $$settled; @@ -60,7 +65,7 @@ export default function ssr( ${reactive_store_values} - ${component.reactive_declarations.map(d => d.snippet)} + ${reactive_declarations} $$rendered = \`${renderer.code}\`; } while (!$$settled); @@ -70,7 +75,7 @@ export default function ssr( : deindent` ${reactive_store_values} - ${component.reactive_declarations.map(d => d.snippet)} + ${reactive_declarations} return \`${renderer.code}\`;`; diff --git a/test/runtime/samples/reactive-values-implicit/_config.js b/test/runtime/samples/reactive-values-implicit/_config.js new file mode 100644 index 0000000000..fae6f9e701 --- /dev/null +++ b/test/runtime/samples/reactive-values-implicit/_config.js @@ -0,0 +1,14 @@ +export default { + html: ` +

    1 + 2 = 3

    +

    3 * 3 = 9

    + `, + + test({ assert, component, target }) { + component.a = 3; + assert.htmlEqual(target.innerHTML, ` +

    3 + 2 = 5

    +

    5 * 5 = 25

    + `); + } +}; diff --git a/test/runtime/samples/reactive-values-implicit/main.html b/test/runtime/samples/reactive-values-implicit/main.html new file mode 100644 index 0000000000..745ba643e1 --- /dev/null +++ b/test/runtime/samples/reactive-values-implicit/main.html @@ -0,0 +1,10 @@ + + +

    {a} + {b} = {c}

    +

    {c} * {c} = {cSquared}

    \ No newline at end of file diff --git a/test/stats/samples/implicit-reactive/_config.js b/test/stats/samples/implicit-reactive/_config.js new file mode 100644 index 0000000000..0137632d2c --- /dev/null +++ b/test/stats/samples/implicit-reactive/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'a', + injected: false, + export_name: null, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + }, + { + name: 'b', + injected: true, + export_name: null, + module: false, + mutated: false, + reassigned: true, + referenced: true, + writable: true + } + ]); + }, +}; diff --git a/test/stats/samples/implicit-reactive/input.html b/test/stats/samples/implicit-reactive/input.html new file mode 100644 index 0000000000..5958474d1b --- /dev/null +++ b/test/stats/samples/implicit-reactive/input.html @@ -0,0 +1,6 @@ + + +

    {a} + 1 = {b}

    \ No newline at end of file From e2ff2f1d661b53607d12244b94027436626bbd54 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 6 Feb 2019 19:03:03 -0500 Subject: [PATCH 100/125] default to beta version --- site/package-lock.json | 2 +- site/src/routes/repl/_components/Repl.html | 2 +- site/src/routes/repl/embed.html | 2 +- site/src/routes/repl/index.html | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 58f6985fa2..f2620232f4 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1533,7 +1533,7 @@ "dev": true }, "eslint-plugin-svelte3": { - "version": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#5fc4861d4b191649b0badf4f9a4c2470f08b237e", + "version": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#6c9cc7b733663f8b9c68817ddd50d6bf4f5052c3", "from": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#semver:*", "dev": true }, diff --git a/site/src/routes/repl/_components/Repl.html b/site/src/routes/repl/_components/Repl.html index 6c9780a197..6b8a2313d4 100644 --- a/site/src/routes/repl/_components/Repl.html +++ b/site/src/routes/repl/_components/Repl.html @@ -8,7 +8,7 @@ import Output from './Output/index.html'; import InputOutputToggle from './InputOutputToggle.html'; - export let version = 'alpha'; // TODO change this to latest when the time comes + export let version = 'beta'; // TODO change this to latest when the time comes export let app; export let embedded = false; diff --git a/site/src/routes/repl/embed.html b/site/src/routes/repl/embed.html index 3ce9e5dbd8..dda614cb52 100644 --- a/site/src/routes/repl/embed.html +++ b/site/src/routes/repl/embed.html @@ -1,7 +1,7 @@ + +

    {a} {b}

    \ No newline at end of file diff --git a/test/validator/samples/reactive-declaration-cyclical/errors.json b/test/validator/samples/reactive-declaration-cyclical/errors.json new file mode 100644 index 0000000000..1e4169a0ee --- /dev/null +++ b/test/validator/samples/reactive-declaration-cyclical/errors.json @@ -0,0 +1,7 @@ +[{ + "message": "Cyclical dependency detected", + "code": "cyclical-reactive-declaration", + "start": { "line": 5, "column": 1, "character": 35 }, + "end": { "line": 5, "column": 14, "character": 48 }, + "pos": 35 +}] \ No newline at end of file diff --git a/test/validator/samples/reactive-declaration-cyclical/input.html b/test/validator/samples/reactive-declaration-cyclical/input.html new file mode 100644 index 0000000000..c8221b9aa8 --- /dev/null +++ b/test/validator/samples/reactive-declaration-cyclical/input.html @@ -0,0 +1,7 @@ + \ No newline at end of file From aa7bcb0a8e942680df318a595eb54cc5c31eda5f Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 7 Feb 2019 11:20:48 -0500 Subject: [PATCH 104/125] prevent duplicated reactive declarations - fixes #2054 --- src/compile/Component.ts | 8 +-- .../expected.js | 53 +++++++++++++++++++ .../input.html | 9 ++++ 3 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 test/js/samples/reactive-values-non-topologically-ordered/expected.js create mode 100644 test/js/samples/reactive-values-non-topologically-ordered/input.html diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 659cf972cc..92d0c353ee 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -1056,6 +1056,10 @@ export default class Component { }); } + if (this.reactive_declarations.indexOf(declaration) !== -1) { + return; + } + seen.add(declaration); if (declaration.dependencies.size === 0) { @@ -1069,9 +1073,7 @@ export default class Component { if (declaration.assignees.has(name)) return; const earlier_declarations = lookup.get(name); if (earlier_declarations) earlier_declarations.forEach(declaration => { - if (this.reactive_declarations.indexOf(declaration) === -1) { - add_declaration(declaration); - } + add_declaration(declaration); }); }); diff --git a/test/js/samples/reactive-values-non-topologically-ordered/expected.js b/test/js/samples/reactive-values-non-topologically-ordered/expected.js new file mode 100644 index 0000000000..de1a4cdc8c --- /dev/null +++ b/test/js/samples/reactive-values-non-topologically-ordered/expected.js @@ -0,0 +1,53 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; + +function create_fragment(ctx) { + return { + c: noop, + m: noop, + p: noop, + i: noop, + o: noop, + d: noop + }; +} + +function instance($$self, $$props, $$invalidate) { + let { x } = $$props; + + let a; + let b; + + $$self.$set = $$props => { + if ('x' in $$props) $$invalidate('x', x = $$props.x); + }; + + $$self.$$.update = ($$dirty = { b: 1, x: 1, a: 1 }) => { + if ($$dirty.b || $$dirty.x) { + b = x; $$invalidate('b', b); + } + if ($$dirty.a || $$dirty.b) { + a = b; $$invalidate('a', a); + } + }; + + return { x }; +} + +class SvelteComponent extends SvelteComponent_1 { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal); + } + + get x() { + return this.$$.ctx.x; + } + + set x(x) { + this.$set({ x }); + flush(); + } +} + +export default SvelteComponent; \ No newline at end of file diff --git a/test/js/samples/reactive-values-non-topologically-ordered/input.html b/test/js/samples/reactive-values-non-topologically-ordered/input.html new file mode 100644 index 0000000000..a443372b05 --- /dev/null +++ b/test/js/samples/reactive-values-non-topologically-ordered/input.html @@ -0,0 +1,9 @@ + \ No newline at end of file From e9b714110c553a3f324b5a00270eb368e38e82f9 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 7 Feb 2019 11:36:30 -0500 Subject: [PATCH 105/125] enclose text/compound slot attributes in backticks - fixes #2061 --- src/utils/get_slot_data.ts | 2 +- test/runtime/samples/component-slot-let-static/Nested.html | 1 + test/runtime/samples/component-slot-let-static/_config.js | 3 +++ test/runtime/samples/component-slot-let-static/main.html | 7 +++++++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 test/runtime/samples/component-slot-let-static/Nested.html create mode 100644 test/runtime/samples/component-slot-let-static/_config.js create mode 100644 test/runtime/samples/component-slot-let-static/main.html diff --git a/src/utils/get_slot_data.ts b/src/utils/get_slot_data.ts index d5a5205ac9..3b817c8329 100644 --- a/src/utils/get_slot_data.ts +++ b/src/utils/get_slot_data.ts @@ -11,7 +11,7 @@ export default function(attributes) { ? '""' : attribute.chunks.length === 1 && attribute.chunks[0].type !== 'Text' ? snip(attribute.chunks[0]) - : stringify_attribute(attribute); + : '`' + stringify_attribute(attribute) + '`'; return `${attribute.name}: ${value}`; }); diff --git a/test/runtime/samples/component-slot-let-static/Nested.html b/test/runtime/samples/component-slot-let-static/Nested.html new file mode 100644 index 0000000000..32eee1534a --- /dev/null +++ b/test/runtime/samples/component-slot-let-static/Nested.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-static/_config.js b/test/runtime/samples/component-slot-let-static/_config.js new file mode 100644 index 0000000000..3067939b88 --- /dev/null +++ b/test/runtime/samples/component-slot-let-static/_config.js @@ -0,0 +1,3 @@ +export default { + html: `

    Hi

    ` +}; diff --git a/test/runtime/samples/component-slot-let-static/main.html b/test/runtime/samples/component-slot-let-static/main.html new file mode 100644 index 0000000000..6e91b0d026 --- /dev/null +++ b/test/runtime/samples/component-slot-let-static/main.html @@ -0,0 +1,7 @@ + + + +

    {value}

    +
    \ No newline at end of file From bf16bb89c341740b6ddff25ae1affc28404ad729 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 7 Feb 2019 11:43:34 -0500 Subject: [PATCH 106/125] only do dirty check for writable values - fixes #2052 --- src/compile/render-dom/index.ts | 8 +++- .../expected.js | 40 +++++++++++++++++++ .../input.html | 7 ++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 test/js/samples/reactive-values-non-writable-dependencies/expected.js create mode 100644 test/js/samples/reactive-values-non-writable-dependencies/input.html diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts index 310800c197..e4a623f8c7 100644 --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -314,7 +314,13 @@ export default function dom( if (has_definition) { const reactive_declarations = component.reactive_declarations.map(d => { - const condition = Array.from(d.dependencies).map(n => `$$dirty.${n}`).join(' || '); + const condition = Array.from(d.dependencies) + .filter(n => { + const variable = component.var_lookup.get(n); + return variable && variable.writable; + }) + .map(n => `$$dirty.${n}`).join(' || '); + const snippet = d.node.body.type === 'BlockStatement' ? `[✂${d.node.body.start}-${d.node.end}✂]` : deindent` diff --git a/test/js/samples/reactive-values-non-writable-dependencies/expected.js b/test/js/samples/reactive-values-non-writable-dependencies/expected.js new file mode 100644 index 0000000000..fc2ca37d31 --- /dev/null +++ b/test/js/samples/reactive-values-non-writable-dependencies/expected.js @@ -0,0 +1,40 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, init, noop, safe_not_equal } from "svelte/internal"; + +function create_fragment(ctx) { + return { + c: noop, + m: noop, + p: noop, + i: noop, + o: noop, + d: noop + }; +} + +let a = 1; + +let b = 2; + +function instance($$self, $$props, $$invalidate) { + + + let max; + + $$self.$$.update = ($$dirty = { max: 1, Math: 1, a: 1, b: 1 }) => { + if ($$dirty.max || $$dirty.a || $$dirty.b) { + max = Math.max(a, b); $$invalidate('max', max); + } + }; + + return {}; +} + +class SvelteComponent extends SvelteComponent_1 { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal); + } +} + +export default SvelteComponent; \ No newline at end of file diff --git a/test/js/samples/reactive-values-non-writable-dependencies/input.html b/test/js/samples/reactive-values-non-writable-dependencies/input.html new file mode 100644 index 0000000000..8e3397e40d --- /dev/null +++ b/test/js/samples/reactive-values-non-writable-dependencies/input.html @@ -0,0 +1,7 @@ + \ No newline at end of file From cb2799d1efa91e35c54188fc875cf82a3e8bd68d Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 7 Feb 2019 11:54:40 -0500 Subject: [PATCH 107/125] only escape attribute values when rendering HTML --- src/compile/render-dom/wrappers/Slot.ts | 2 +- src/compile/render-ssr/handlers/Element.ts | 10 +++++----- src/compile/render-ssr/handlers/Slot.ts | 2 +- src/utils/get_slot_data.ts | 4 ++-- src/utils/stringify_attribute.ts | 6 ++++-- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/compile/render-dom/wrappers/Slot.ts b/src/compile/render-dom/wrappers/Slot.ts index 746f9a2066..440590239d 100644 --- a/src/compile/render-dom/wrappers/Slot.ts +++ b/src/compile/render-dom/wrappers/Slot.ts @@ -63,7 +63,7 @@ export default class SlotWrapper extends Wrapper { get_slot_changes = renderer.component.getUniqueName(`get_${slot_name}_slot_changes`); get_slot_context = renderer.component.getUniqueName(`get_${slot_name}_slot_context`); - const context_props = get_slot_data(attributes); + const context_props = get_slot_data(attributes, false); const changes_props = []; const dependencies = new Set(); diff --git a/src/compile/render-ssr/handlers/Element.ts b/src/compile/render-ssr/handlers/Element.ts index ba5bd998ab..622b0d3eec 100644 --- a/src/compile/render-ssr/handlers/Element.ts +++ b/src/compile/render-ssr/handlers/Element.ts @@ -78,7 +78,7 @@ export default function(node, renderer, options) { args.push(snip(attribute.expression)); } else { if (attribute.name === 'value' && node.name === 'textarea') { - textareaContents = stringify_attribute(attribute); + textareaContents = stringify_attribute(attribute, true); } else if (attribute.isTrue) { args.push(`{ ${quoteNameIfNecessary(attribute.name)}: true }`); } else if ( @@ -89,7 +89,7 @@ export default function(node, renderer, options) { // a boolean attribute with one non-Text chunk args.push(`{ ${quoteNameIfNecessary(attribute.name)}: ${snip(attribute.chunks[0])} }`); } else { - args.push(`{ ${quoteNameIfNecessary(attribute.name)}: \`${stringify_attribute(attribute)}\` }`); + args.push(`{ ${quoteNameIfNecessary(attribute.name)}: \`${stringify_attribute(attribute, true)}\` }`); } } }); @@ -100,7 +100,7 @@ export default function(node, renderer, options) { if (attribute.type !== 'Attribute') return; if (attribute.name === 'value' && node.name === 'textarea') { - textareaContents = stringify_attribute(attribute); + textareaContents = stringify_attribute(attribute, true); } else if (attribute.isTrue) { openingTag += ` ${attribute.name}`; } else if ( @@ -112,14 +112,14 @@ export default function(node, renderer, options) { openingTag += '${' + snip(attribute.chunks[0]) + ' ? " ' + attribute.name + '" : "" }'; } else if (attribute.name === 'class' && classExpr) { addClassAttribute = false; - openingTag += ` class="\${[\`${stringify_attribute(attribute)}\`, ${classExpr}].join(' ').trim() }"`; + openingTag += ` class="\${[\`${stringify_attribute(attribute, true)}\`, ${classExpr}].join(' ').trim() }"`; } else if (attribute.chunks.length === 1 && attribute.chunks[0].type !== 'Text') { const { name } = attribute; const snippet = snip(attribute.chunks[0]); openingTag += '${(v => v == null ? "" : ` ' + name + '="${@escape(' + snippet + ')}"`)(' + snippet + ')}'; } else { - openingTag += ` ${attribute.name}="${stringify_attribute(attribute)}"`; + openingTag += ` ${attribute.name}="${stringify_attribute(attribute, true)}"`; } }); } diff --git a/src/compile/render-ssr/handlers/Slot.ts b/src/compile/render-ssr/handlers/Slot.ts index 6bf2a22cad..341ae6df2d 100644 --- a/src/compile/render-ssr/handlers/Slot.ts +++ b/src/compile/render-ssr/handlers/Slot.ts @@ -7,7 +7,7 @@ export default function(node, renderer, options) { const slot_name = name && name.chunks[0].data || 'default'; const prop = quotePropIfNecessary(slot_name); - const slot_data = get_slot_data(node.attributes); + const slot_data = get_slot_data(node.attributes, true); const arg = slot_data.length > 0 ? `{ ${slot_data.join(', ')} }` : ''; diff --git a/src/utils/get_slot_data.ts b/src/utils/get_slot_data.ts index 3b817c8329..b7b08db341 100644 --- a/src/utils/get_slot_data.ts +++ b/src/utils/get_slot_data.ts @@ -1,7 +1,7 @@ import { snip } from './snip'; import { stringify_attribute } from './stringify_attribute'; -export default function(attributes) { +export default function get_slot_data(attributes, is_ssr: boolean) { return attributes .filter(attribute => attribute.name !== 'name') .map(attribute => { @@ -11,7 +11,7 @@ export default function(attributes) { ? '""' : attribute.chunks.length === 1 && attribute.chunks[0].type !== 'Text' ? snip(attribute.chunks[0]) - : '`' + stringify_attribute(attribute) + '`'; + : '`' + stringify_attribute(attribute, is_ssr) + '`'; return `${attribute.name}: ${value}`; }); diff --git a/src/utils/stringify_attribute.ts b/src/utils/stringify_attribute.ts index 933a84ed03..8cd7e2101c 100644 --- a/src/utils/stringify_attribute.ts +++ b/src/utils/stringify_attribute.ts @@ -3,14 +3,16 @@ import Node from '../compile/nodes/shared/Node'; import { escapeTemplate, escape } from './stringify'; import { snip } from './snip'; -export function stringify_attribute(attribute: Attribute) { +export function stringify_attribute(attribute: Attribute, is_ssr: boolean) { return attribute.chunks .map((chunk: Node) => { if (chunk.type === 'Text') { return escapeTemplate(escape(chunk.data).replace(/"/g, '"')); } - return '${@escape(' + snip(chunk) + ')}'; + return is_ssr + ? '${@escape(' + snip(chunk) + ')}' + : '${' + snip(chunk) + '}'; }) .join(''); } \ No newline at end of file From 687e352209b0665fc6589711bdca7914f0d946a0 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 8 Feb 2019 08:48:10 -0500 Subject: [PATCH 108/125] rename .html files to .svelte --- test/cli/samples/basic/src/{Main.html => Main.svelte} | 0 .../custom-element/src/{Main.html => Main.svelte} | 0 test/cli/samples/dev/src/{Main.html => Main.svelte} | 0 test/cli/samples/dir-sourcemap/src/Main.html | 5 ----- test/cli/samples/dir-sourcemap/src/Main.svelte | 5 +++++ .../dir-sourcemap/src/{Widget.html => Widget.svelte} | 0 test/cli/samples/dir-subdir/src/Main.html | 5 ----- test/cli/samples/dir-subdir/src/Main.svelte | 5 +++++ .../src/widget/{Widget.html => Widget.svelte} | 0 test/cli/samples/dir/src/Main.html | 5 ----- test/cli/samples/dir/src/Main.svelte | 5 +++++ .../samples/dir/src/{Widget.html => Widget.svelte} | 0 .../samples/globals/src/{Main.html => Main.svelte} | 0 .../sourcemap-inline/src/{Main.html => Main.svelte} | 0 .../samples/sourcemap/src/{Main.html => Main.svelte} | 0 test/cli/samples/ssr/src/{Main.html => Main.svelte} | 0 test/cli/samples/store/src/{Main.html => Main.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 test/css/samples/basic/{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../combinator-child/{input.html => input.svelte} | 0 .../css/samples/css-vars/{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../samples/empty-class/{input.html => input.svelte} | 0 .../empty-rule-dev/{input.html => input.svelte} | 0 .../samples/empty-rule/{input.html => input.svelte} | 0 .../global-keyframes/{input.html => input.svelte} | 0 test/css/samples/global/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../keyframes-from-to/{input.html => input.svelte} | 0 .../samples/keyframes/{input.html => input.svelte} | 0 .../local-inside-global/{input.html => input.svelte} | 0 .../media-query-word/{input.html => input.svelte} | 0 .../samples/media-query/{input.html => input.svelte} | 0 .../samples/nested/{expected.html => expected.svelte} | 0 test/css/samples/nested/{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../pseudo-element/{input.html => input.svelte} | 0 test/css/samples/spread/{input.html => input.svelte} | 0 .../supports-query/{input.html => input.svelte} | 0 .../universal-selector/{input.html => input.svelte} | 0 .../unknown-at-rule/{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../{input.html => input.svelte} | 0 .../{expected.html => expected.svelte} | 0 .../unused-selector/{input.html => input.svelte} | 0 .../samples/custom-method/{main.html => main.svelte} | 0 .../samples/escaped-css/{main.html => main.svelte} | 0 .../samples/html-slots/{main.html => main.svelte} | 0 .../samples/html/{main.html => main.svelte} | 0 .../nested.skip/{Counter.html => Counter.svelte} | 0 .../samples/nested.skip/{main.html => main.svelte} | 2 +- .../samples/new-styled/{main.html => main.svelte} | 0 .../samples/new/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/oncreate/{main.html => main.svelte} | 0 .../samples/props/{main.html => main.svelte} | 2 +- .../props/{my-widget.html => my-widget.svelte} | 0 .../samples/basic/{_after.html => _after.svelte} | 0 .../samples/basic/{_before.html => _before.svelte} | 0 .../samples/basic/{main.html => main.svelte} | 0 .../binding-input/{_after.html => _after.svelte} | 0 .../binding-input/{_before.html => _before.svelte} | 0 .../samples/binding-input/{main.html => main.svelte} | 0 .../{Nested.html => Nested.svelte} | 0 .../{_after.html => _after.svelte} | 0 .../{_before.html => _before.svelte} | 0 test/hydration/samples/component-in-element/main.html | 7 ------- .../samples/component-in-element/main.svelte | 7 +++++++ .../samples/component/{Nested.html => Nested.svelte} | 0 .../samples/component/{_after.html => _after.svelte} | 0 .../component/{_before.html => _before.svelte} | 0 test/hydration/samples/component/main.html | 5 ----- test/hydration/samples/component/main.svelte | 5 +++++ .../{_after.html => _after.svelte} | 0 .../{_before.html => _before.svelte} | 0 .../dynamic-text-changed/{main.html => main.svelte} | 0 .../dynamic-text/{_after.html => _after.svelte} | 0 .../dynamic-text/{_before.html => _before.svelte} | 0 .../samples/dynamic-text/{main.html => main.svelte} | 0 .../{_after.html => _after.svelte} | 0 .../{_before.html => _before.svelte} | 0 .../each-block-arg-clash/{main.html => main.svelte} | 0 .../samples/each-block/{_after.html => _after.svelte} | 0 .../each-block/{_before.html => _before.svelte} | 0 .../samples/each-block/{main.html => main.svelte} | 0 .../{_after.html => _after.svelte} | 0 .../{_before.html => _before.svelte} | 0 .../{main.html => main.svelte} | 0 .../{_after.html => _after.svelte} | 0 .../{_before.html => _before.svelte} | 0 .../{main.html => main.svelte} | 0 .../{_after.html => _after.svelte} | 0 .../{_before.html => _before.svelte} | 0 .../{main.html => main.svelte} | 0 .../{_after.html => _after.svelte} | 0 .../{_before.html => _before.svelte} | 0 .../{main.html => main.svelte} | 0 .../element-nested/{_after.html => _after.svelte} | 0 .../element-nested/{_before.html => _before.svelte} | 0 .../samples/element-nested/{main.html => main.svelte} | 0 .../element-ref/{_after.html => _after.svelte} | 0 .../element-ref/{_before.html => _before.svelte} | 0 .../samples/element-ref/{main.html => main.svelte} | 0 .../event-handler/{_after.html => _after.svelte} | 0 .../event-handler/{_before.html => _before.svelte} | 0 .../samples/event-handler/{main.html => main.svelte} | 0 .../if-block-anchor/{_after.html => _after.svelte} | 0 .../if-block-anchor/{_before.html => _before.svelte} | 0 .../if-block-anchor/{main.html => main.svelte} | 0 .../if-block-false/{_after.html => _after.svelte} | 0 .../if-block-false/{_before.html => _before.svelte} | 0 .../samples/if-block-false/{main.html => main.svelte} | 0 .../if-block-update/{_after.html => _after.svelte} | 0 .../if-block-update/{_before.html => _before.svelte} | 0 .../if-block-update/{main.html => main.svelte} | 0 .../samples/if-block/{_after.html => _after.svelte} | 0 .../samples/if-block/{_before.html => _before.svelte} | 0 .../samples/if-block/{main.html => main.svelte} | 0 .../samples/raw/{_after.html => _after.svelte} | 0 .../samples/raw/{_before.html => _before.svelte} | 0 test/hydration/samples/raw/{main.html => main.svelte} | 0 .../top-level-text/{_after.html => _after.svelte} | 0 .../top-level-text/{_before.html => _before.svelte} | 0 .../samples/top-level-text/{main.html => main.svelte} | 0 .../{input.html => input.svelte} | 0 test/js/samples/action/{input.html => input.svelte} | 0 .../bind-width-height/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../component-static/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../css-media-query/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../samples/debug-empty/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../js/samples/debug-foo/{input.html => input.svelte} | 0 .../debug-ssr-foo/{input.html => input.svelte} | 0 .../deconflict-builtins/{input.html => input.svelte} | 0 .../deconflict-globals/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../do-use-dataset/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 test/js/samples/dynamic-import/input.html | 5 ----- test/js/samples/dynamic-import/input.svelte | 5 +++++ .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../each-block-keyed/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../event-modifiers/{input.html => input.svelte} | 0 .../head-no-whitespace/{input.html => input.svelte} | 0 .../hoisted-const/{input.html => input.svelte} | 0 .../samples/hoisted-let/{input.html => input.svelte} | 0 .../if-block-no-update/{input.html => input.svelte} | 0 .../if-block-simple/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../samples/input-files/{input.html => input.svelte} | 0 .../samples/input-range/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../legacy-input-type/{input.html => input.svelte} | 0 .../media-bindings/{input.html => input.svelte} | 0 test/js/samples/non-imported-component/input.html | 6 ------ test/js/samples/non-imported-component/input.svelte | 6 ++++++ .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../select-dynamic-value/{input.html => input.svelte} | 0 .../samples/setup-method/{input.html => input.svelte} | 0 .../ssr-no-oncreate-etc/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../js/samples/svg-title/{input.html => input.svelte} | 0 test/js/samples/title/{input.html => input.svelte} | 0 .../transition-local/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../action-with-call/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../action-with-literal/{input.html => input.svelte} | 0 .../samples/action/{input.html => input.svelte} | 0 .../samples/animation/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../attribute-dynamic/{input.html => input.svelte} | 0 .../attribute-escaped/{input.html => input.svelte} | 0 .../attribute-multiple/{input.html => input.svelte} | 0 .../attribute-shorthand/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../attribute-static/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../attribute-unquoted/{input.html => input.svelte} | 0 .../await-then-catch/{input.html => input.svelte} | 0 .../binding-shorthand/{input.html => input.svelte} | 0 .../samples/binding/{input.html => input.svelte} | 0 .../samples/comment/{input.html => input.svelte} | 0 .../component-dynamic/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../convert-entities/{input.html => input.svelte} | 0 test/parser/samples/css/{input.html => input.svelte} | 0 .../dynamic-import/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../each-block-else/{input.html => input.svelte} | 0 .../each-block-indexed/{input.html => input.svelte} | 0 .../each-block-keyed/{input.html => input.svelte} | 0 .../samples/each-block/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../element-with-text/{input.html => input.svelte} | 0 .../samples/elements/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../samples/error-css/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../error-self-reference/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../error-void-closing/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../event-handler/{input.html => input.svelte} | 0 .../if-block-else/{input.html => input.svelte} | 0 .../if-block-elseif/{input.html => input.svelte} | 0 .../samples/if-block/{input.html => input.svelte} | 0 .../implicitly-closed-li/{input.html => input.svelte} | 0 test/parser/samples/nbsp/{input.html => input.svelte} | 0 .../raw-mustaches/{input.html => input.svelte} | 0 test/parser/samples/refs/{input.html => input.svelte} | 0 .../script-comment-only/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../samples/script/{input.html => input.svelte} | 0 .../self-closing-element/{input.html => input.svelte} | 0 .../self-reference/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../samples/spread/{input.html => input.svelte} | 0 .../textarea-children/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../transition-intro/{input.html => input.svelte} | 0 .../unusual-identifier/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../whitespace-normal/{input.html => input.svelte} | 0 .../parser/samples/yield/{input.html => input.svelte} | 0 .../samples/dependencies/{input.html => input.svelte} | 0 .../dependencies/{output.html => output.svelte} | 0 .../samples/filename/{input.html => input.svelte} | 0 .../samples/filename/{output.html => output.svelte} | 2 +- .../samples/ignores-null/{input.html => input.svelte} | 0 .../ignores-null/{output.html => output.svelte} | 0 .../samples/markup/{input.html => input.svelte} | 0 .../samples/markup/{output.html => output.svelte} | 0 .../{input.html => input.svelte} | 0 .../{output.html => output.svelte} | 0 .../script-multiple/{input.html => input.svelte} | 0 .../script-multiple/{output.html => output.svelte} | 0 .../samples/script/{input.html => input.svelte} | 0 .../samples/script/{output.html => output.svelte} | 0 .../samples/style-async/{input.html => input.svelte} | 0 .../style-async/{output.html => output.svelte} | 0 .../style-attributes/{input.html => input.svelte} | 0 .../style-attributes/{output.html => output.svelte} | 0 .../samples/style/{input.html => input.svelte} | 0 .../samples/style/{output.html => output.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../action-function/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/action-this/{main.html => main.svelte} | 0 .../samples/action-update/{main.html => main.svelte} | 0 .../runtime/samples/action/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/animation-css/{main.html => main.svelte} | 0 .../animation-js-delay/{main.html => main.svelte} | 0 .../animation-js-easing/{main.html => main.svelte} | 0 .../samples/animation-js/{main.html => main.svelte} | 0 .../assignment-in-init/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../attribute-boolean-true/{main.html => main.svelte} | 0 .../attribute-casing/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../attribute-dynamic-type/{main.html => main.svelte} | 0 .../attribute-dynamic/{main.html => main.svelte} | 0 .../attribute-empty-svg/{main.html => main.svelte} | 0 .../attribute-empty/{main.html => main.svelte} | 0 .../attribute-namespaced/{main.html => main.svelte} | 0 .../{Component.html => Component.svelte} | 0 .../samples/attribute-partial-number/main.html | 5 ----- .../samples/attribute-partial-number/main.svelte | 5 +++++ .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../attribute-static/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/autofocus/{main.html => main.svelte} | 0 .../await-component-oncreate/{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../await-containing-if/{main.html => main.svelte} | 0 .../samples/await-in-each/{main.html => main.svelte} | 0 .../await-set-simultaneous/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../await-then-catch-event/{main.html => main.svelte} | 0 .../await-then-catch-if/{main.html => main.svelte} | 0 .../await-then-catch-in-slot/{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../await-then-catch-order/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../await-then-catch/{main.html => main.svelte} | 0 .../await-then-shorthand/{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../await-with-components/{main.html => main.svelte} | 2 +- .../before-render-chain/{Item.html => Item.svelte} | 0 .../before-render-chain/{List.html => List.svelte} | 2 +- .../before-render-chain/{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../binding-indirect/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../binding-input-checkbox/{main.html => main.svelte} | 0 .../binding-input-number/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../binding-input-range/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../binding-input-text/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Modal.html => Modal.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../binding-select-late/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/binding-select/{main.html => main.svelte} | 0 .../binding-store-deep/{main.html => main.svelte} | 0 .../samples/binding-store/{main.html => main.svelte} | 0 .../binding-textarea/{main.html => main.svelte} | 0 .../binding-this-and-value/{main.html => main.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../binding-this-unset/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/binding-this/{main.html => main.svelte} | 0 .../bindings-before-onmount/{One.html => One.svelte} | 2 +- .../bindings-before-onmount/{Two.html => Two.svelte} | 0 .../runtime/samples/bindings-before-onmount/main.html | 7 ------- .../samples/bindings-before-onmount/main.svelte | 7 +++++++ .../bindings-coalesced/{Foo.html => Foo.svelte} | 0 .../bindings-coalesced/{main.html => main.svelte} | 2 +- .../samples/class-boolean/{main.html => main.svelte} | 0 .../samples/class-helper/{main.html => main.svelte} | 0 .../samples/class-in-each/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/class-shortcut/{main.html => main.svelte} | 0 .../class-with-attribute/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Bar.html => Bar.svelte} | 0 .../{Baz.html => Baz.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 6 +++--- .../{Bar.html => Bar.svelte} | 0 .../{Baz.html => Baz.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 6 +++--- ...omponentSelector.html => ComponentSelector.svelte} | 0 .../{Editor.html => Editor.svelte} | 0 .../{main.html => main.svelte} | 4 ++-- .../{Widget.html => Widget.svelte} | 0 .../component-binding-deep/{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../component-binding-each/{main.html => main.svelte} | 2 +- .../{A.html => A.svelte} | 2 +- .../{B.html => B.svelte} | 2 +- .../{C.html => C.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../component-binding-nested/{Bar.html => Bar.svelte} | 2 +- .../component-binding-nested/{Baz.html => Baz.svelte} | 0 .../component-binding-nested/{Foo.html => Foo.svelte} | 2 +- .../{main.html => main.svelte} | 2 +- .../{Bar.html => Bar.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 4 ++-- .../{Bar.html => Bar.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 4 ++-- .../{Counter.html => Counter.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Bar.html => Bar.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 4 ++-- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Counter.html => Counter.svelte} | 0 .../component-binding/{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../component-data-dynamic/{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 test/runtime/samples/component-data-empty/main.html | 7 ------- test/runtime/samples/component-data-empty/main.svelte | 7 +++++++ .../{Link.html => Link.svelte} | 0 .../main.html | 5 ----- .../main.svelte | 5 +++++ .../{Foo.html => Foo.svelte} | 0 .../samples/component-data-static-boolean/main.html | 5 ----- .../samples/component-data-static-boolean/main.svelte | 5 +++++ .../{Widget.html => Widget.svelte} | 0 .../component-data-static/{main.html => main.svelte} | 2 +- .../{Button.html => Button.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../samples/component-events-console/main.html | 5 ----- .../samples/component-events-console/main.svelte | 5 +++++ .../{Widget.html => Widget.svelte} | 0 .../component-events-data/{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../component-events-each/{main.html => main.svelte} | 2 +- .../component-events/{Widget.html => Widget.svelte} | 0 .../component-events/{main.html => main.svelte} | 2 +- .../{Component.html => Component.svelte} | 0 .../component-if-placement/{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../runtime/samples/component-nested-deep/Level1.html | 8 -------- .../samples/component-nested-deep/Level1.svelte | 8 ++++++++ .../runtime/samples/component-nested-deep/Level2.html | 6 ------ .../samples/component-nested-deep/Level2.svelte | 6 ++++++ .../{Level3.html => Level3.svelte} | 0 test/runtime/samples/component-nested-deep/main.html | 7 ------- .../runtime/samples/component-nested-deep/main.svelte | 7 +++++++ .../{Level1.html => Level1.svelte} | 4 ++-- .../{Level2.html => Level2.svelte} | 0 .../{Level3.html => Level3.svelte} | 0 .../runtime/samples/component-nested-deeper/main.html | 7 ------- .../samples/component-nested-deeper/main.svelte | 7 +++++++ .../component-not-void/{Link.html => Link.svelte} | 0 test/runtime/samples/component-not-void/main.html | 5 ----- test/runtime/samples/component-not-void/main.svelte | 5 +++++ .../component-ref/{Widget.html => Widget.svelte} | 0 .../samples/component-ref/{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../samples/component-shorthand-import/main.html | 5 ----- .../samples/component-shorthand-import/main.svelte | 5 +++++ .../{Nested.html => Nested.svelte} | 0 test/runtime/samples/component-slot-default/main.html | 7 ------- .../samples/component-slot-default/main.svelte | 7 +++++++ .../{Nested.html => Nested.svelte} | 0 .../component-slot-dynamic/{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 test/runtime/samples/component-slot-empty/main.html | 6 ------ test/runtime/samples/component-slot-empty/main.svelte | 6 ++++++ .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../main.svelte} | 6 +++--- .../{Nested.html => Nested.svelte} | 0 .../main.html => component-slot-if-block/main.svelte} | 6 +++--- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../component-slot-let-b/{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../component-slot-let-c/{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../component-slot-let/{Nested.html => Nested.svelte} | 0 .../component-slot-let/{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../component-slot-named/{main.html => main.svelte} | 2 +- .../{Inner.html => Inner.svelte} | 0 .../{Outer.html => Outer.svelte} | 0 .../samples/component-slot-nested-component/main.html | 8 -------- .../component-slot-nested-component/main.svelte | 8 ++++++++ .../{Nested.html => Nested.svelte} | 0 .../component-slot-nested/{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../component-slot-used-with-default-event/main.html | 7 ------- .../main.svelte | 7 +++++++ .../{Email.html => Email.svelte} | 0 .../samples/component-static-at-symbol/main.html | 5 ----- .../samples/component-static-at-symbol/main.svelte | 5 +++++ .../{Widget.html => Widget.svelte} | 0 .../component-template-inline-mutation/main.html | 6 ------ .../component-template-inline-mutation/main.svelte | 6 ++++++ .../{Foo.html => Foo.svelte} | 0 .../samples/component-yield-follows-element/main.html | 5 ----- .../component-yield-follows-element/main.svelte | 5 +++++ .../component-yield-if/{Widget.html => Widget.svelte} | 0 .../component-yield-if/{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Inner.html => Inner.svelte} | 0 .../{Outer.html => Outer.svelte} | 0 .../samples/component-yield-nested-if/main.html | 11 ----------- .../samples/component-yield-nested-if/main.svelte | 11 +++++++++++ .../{Widget.html => Widget.svelte} | 0 .../component-yield-parent/{main.html => main.svelte} | 2 +- .../{Modal.html => Modal.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 test/runtime/samples/component-yield-static/main.html | 7 ------- .../samples/component-yield-static/main.svelte | 7 +++++++ .../component-yield/{main.html => main.svelte} | 0 .../samples/component/{Widget.html => Widget.svelte} | 0 test/runtime/samples/component/main.html | 7 ------- test/runtime/samples/component/main.svelte | 7 +++++++ .../samples/context-api/{Tab.html => Tab.svelte} | 2 +- .../context-api/{TabList.html => TabList.svelte} | 0 .../context-api/{TabPanel.html => TabPanel.svelte} | 2 +- .../samples/context-api/{Tabs.html => Tabs.svelte} | 0 .../samples/context-api/{main.html => main.svelte} | 8 ++++---- .../samples/css-comments/{main.html => main.svelte} | 0 .../samples/css-false/{Widget.html => Widget.svelte} | 0 test/runtime/samples/css-false/main.html | 6 ------ test/runtime/samples/css-false/main.svelte | 6 ++++++ .../{Widget.html => Widget.svelte} | 0 .../css-space-in-attribute/{main.html => main.svelte} | 2 +- .../samples/css/{Widget.html => Widget.svelte} | 0 test/runtime/samples/css/main.html | 6 ------ test/runtime/samples/css/main.svelte | 6 ++++++ .../samples/custom-method/{main.html => main.svelte} | 0 .../deconflict-builtins/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../deconflict-contexts/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../deconflict-non-helpers/{main.html => main.svelte} | 0 test/runtime/samples/deconflict-self/main.html | 5 ----- test/runtime/samples/deconflict-self/main.svelte | 5 +++++ .../deconflict-self/nested/{main.html => main.svelte} | 0 .../deconflict-template-1/{main.html => main.svelte} | 0 .../deconflict-template-2/{main.html => main.svelte} | 0 .../deconflict-vars/{main.html => main.svelte} | 0 .../default-data-function/{main.html => main.svelte} | 0 .../default-data-override/{main.html => main.svelte} | 0 .../samples/default-data/{main.html => main.svelte} | 0 .../samples/destroy-twice/{main.html => main.svelte} | 0 .../samples/destructuring/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../dev-warning-helper/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../dev-warning-missing-data-component/main.html | 5 ----- .../dev-warning-missing-data-component/main.svelte | 5 +++++ .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/document-event/{main.html => main.svelte} | 0 .../{Green.html => Green.svelte} | 0 .../{Red.html => Red.svelte} | 0 .../dynamic-component-bindings-recreated-b/main.html | 10 ---------- .../main.svelte | 10 ++++++++++ .../{Green.html => Green.svelte} | 0 .../{Red.html => Red.svelte} | 0 .../dynamic-component-bindings-recreated/main.html | 9 --------- .../dynamic-component-bindings-recreated/main.svelte | 9 +++++++++ .../{Bar.html => Bar.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../samples/dynamic-component-bindings/main.html | 10 ---------- .../samples/dynamic-component-bindings/main.svelte | 10 ++++++++++ .../{main.html => main.svelte} | 0 .../dynamic-component-events/{Bar.html => Bar.svelte} | 0 .../dynamic-component-events/{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 4 ++-- .../dynamic-component-in-if/{Bar.html => Bar.svelte} | 0 .../dynamic-component-in-if/{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 4 ++-- .../{Bar.html => Bar.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 4 ++-- .../{Foo.html => Foo.svelte} | 0 .../samples/dynamic-component-nulled-out/main.html | 7 ------- .../samples/dynamic-component-nulled-out/main.svelte | 7 +++++++ .../dynamic-component-ref/{Foo.html => Foo.svelte} | 0 .../dynamic-component-ref/{main.html => main.svelte} | 2 +- .../dynamic-component-slot/{Bar.html => Bar.svelte} | 0 .../dynamic-component-slot/{Baz.html => Baz.svelte} | 0 .../dynamic-component-slot/{Foo.html => Foo.svelte} | 0 .../dynamic-component-slot/{main.html => main.svelte} | 6 +++--- .../{Bar.html => Bar.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../main.html | 8 -------- .../main.svelte | 8 ++++++++ .../dynamic-component/{Bar.html => Bar.svelte} | 0 .../dynamic-component/{Foo.html => Foo.svelte} | 0 test/runtime/samples/dynamic-component/main.html | 8 -------- test/runtime/samples/dynamic-component/main.svelte | 8 ++++++++ .../{main.html => main.svelte} | 0 .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../each-block-else/{main.html => main.svelte} | 0 .../{Thing.html => Thing.svelte} | 0 .../each-block-empty-outro/{main.html => main.svelte} | 2 +- .../each-block-function/{main.html => main.svelte} | 0 .../each-block-in-if-block/{main.html => main.svelte} | 0 .../each-block-index-only/{main.html => main.svelte} | 0 .../each-block-indexed/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../each-block-keyed-empty/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Nested.html => Nested.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../each-block-keyed/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../each-block-static/{main.html => main.svelte} | 0 .../each-block-text-node/{main.html => main.svelte} | 0 .../samples/each-block/{main.html => main.svelte} | 0 .../each-blocks-expression/{main.html => main.svelte} | 0 .../each-blocks-nested-b/{main.html => main.svelte} | 0 .../each-blocks-nested/{main.html => main.svelte} | 0 .../element-invalid-name/{main.html => main.svelte} | 0 .../element-source-location/{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../empty-style-block/{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../samples/escaped-text/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../event-handler-each/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../event-handler-hoisted/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../event-handler-removal/{main.html => main.svelte} | 0 .../event-handler-sanitize/{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../event-handler-shorthand-component/main.html | 5 ----- .../event-handler-shorthand-component/main.svelte | 5 +++++ .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../samples/event-handler/{main.html => main.svelte} | 0 .../{Nested.html => Nested.svelte} | 2 +- .../{Visibility.html => Visibility.svelte} | 0 .../flush-before-bindings/{main.html => main.svelte} | 2 +- .../function-in-expression/{main.html => main.svelte} | 0 .../get-after-destroy/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../hash-in-attribute/{main.html => main.svelte} | 0 .../samples/head-if-block/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../head-title-dynamic/{main.html => main.svelte} | 0 .../head-title-static/{main.html => main.svelte} | 0 .../samples/hello-world/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/helpers/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/html-entities/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../if-block-else-in-each/{main.html => main.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../samples/if-block-else/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../if-block-elseif-text/{main.html => main.svelte} | 0 .../if-block-elseif/{main.html => main.svelte} | 0 .../if-block-expression/{main.html => main.svelte} | 0 .../samples/if-block-first/{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../samples/if-block-or/{main.html => main.svelte} | 0 .../{Component.html => Component.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Component.html => Component.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../if-block-widget/{Widget.html => Widget.svelte} | 0 .../if-block-widget/{main.html => main.svelte} | 2 +- .../samples/if-block/{main.html => main.svelte} | 0 .../if-in-keyed-each/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../ignore-unchanged-raw/{main.html => main.svelte} | 0 .../ignore-unchanged-tag/{main.html => main.svelte} | 0 .../immutable-nested/{Nested.html => Nested.svelte} | 0 .../immutable-nested/{main.html => main.svelte} | 2 +- .../immutable-option/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../immutable-svelte-meta/{main.html => main.svelte} | 0 .../{ComponentOne.html => ComponentOne.svelte} | 0 .../{ComponentTwo.html => ComponentTwo.svelte} | 0 .../{main.html => main.svelte} | 4 ++-- .../initial-state-assign/{main.html => main.svelte} | 0 .../inline-expressions/{main.html => main.svelte} | 0 .../samples/input-list/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/internal-state/{Foo.html => Foo.svelte} | 0 test/runtime/samples/internal-state/main.html | 9 --------- test/runtime/samples/internal-state/main.svelte | 9 +++++++++ .../lifecycle-events/{main.html => main.svelte} | 0 .../lifecycle-next-tick/{main.html => main.svelte} | 0 .../lifecycle-render-order/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/module-context/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../names-deconflicted/{Widget.html => Widget.svelte} | 0 .../names-deconflicted/{main.html => main.svelte} | 2 +- test/runtime/samples/nbsp/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Folder.html => Folder.svelte} | 0 .../nested-transition-detach-if-false/main.html | 7 ------- .../nested-transition-detach-if-false/main.svelte | 7 +++++++ .../{Span.html => Span.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../noscript-removal/{main.html => main.svelte} | 0 .../ondestroy-before-cleanup/{Top.html => Top.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../samples/onmount-async/{main.html => main.svelte} | 0 .../{ParentWidget.html => ParentWidget.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../samples/onmount-fires-when-ready-nested/main.html | 9 --------- .../onmount-fires-when-ready-nested/main.svelte | 9 +++++++++ .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 test/runtime/samples/onmount-sibling-order/main.html | 6 ------ .../runtime/samples/onmount-sibling-order/main.svelte | 6 ++++++ .../option-without-select/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/preload/{main.html => main.svelte} | 0 .../prop-not-action/{Nested.html => Nested.svelte} | 0 test/runtime/samples/prop-not-action/main.html | 6 ------ test/runtime/samples/prop-not-action/main.svelte | 6 ++++++ .../{main.html => main.svelte} | 0 .../prop-without-semicolon/{main.html => main.svelte} | 0 .../raw-anchor-first-child/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../raw-anchor-last-child/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/raw-mustaches/{main.html => main.svelte} | 0 .../reactive-function/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../reactive-values/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../select-bind-array/{main.html => main.svelte} | 0 .../select-bind-in-array/{main.html => main.svelte} | 0 .../select-change-handler/{main.html => main.svelte} | 0 .../select-no-whitespace/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../select-one-way-bind/{main.html => main.svelte} | 0 .../samples/select-props/{main.html => main.svelte} | 0 .../runtime/samples/select/{main.html => main.svelte} | 0 .../self-reference-tree/{main.html => main.svelte} | 0 .../samples/self-reference/{main.html => main.svelte} | 0 .../set-after-destroy/{main.html => main.svelte} | 0 .../set-in-oncreate/{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../samples/set-in-onstate/{main.html => main.svelte} | 0 .../set-null-text-node/{main.html => main.svelte} | 0 .../set-prevents-loop/{Foo.html => Foo.svelte} | 0 .../set-prevents-loop/{main.html => main.svelte} | 2 +- .../set-undefined-attr/{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../samples/sigil-static-#/{main.html => main.svelte} | 0 .../samples/sigil-static-@/{main.html => main.svelte} | 0 .../single-static-element/{main.html => main.svelte} | 0 .../single-text-node/{main.html => main.svelte} | 0 .../slot-in-custom-element/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../spread-component-dynamic/{Foo.html => Foo.svelte} | 0 .../samples/spread-component-dynamic/main.html | 7 ------- .../samples/spread-component-dynamic/main.svelte | 7 +++++++ .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../samples/spread-component-with-bind/main.html | 8 -------- .../samples/spread-component-with-bind/main.svelte | 8 ++++++++ .../spread-component/{Widget.html => Widget.svelte} | 0 .../spread-component/{main.html => main.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../spread-each-component/{main.html => main.svelte} | 2 +- .../spread-each-element/{main.html => main.svelte} | 0 .../spread-element-boolean/{main.html => main.svelte} | 0 .../spread-element-input/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/spread-element/{main.html => main.svelte} | 0 .../spread-own-props/{Widget.html => Widget.svelte} | 0 .../spread-own-props/{main.html => main.svelte} | 2 +- .../state-deconflicted/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../store-auto-subscribe/{main.html => main.svelte} | 0 .../store-dev-mode-error/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/svg-attributes/{main.html => main.svelte} | 0 .../{Rect.html => Rect.svelte} | 0 .../main.svelte} | 2 +- .../{Rect.html => Rect.svelte} | 0 .../main.svelte} | 2 +- .../samples/svg-class/{main.html => main.svelte} | 0 .../svg-each-block-anchor/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../samples/svg-multiple/{main.html => main.svelte} | 0 .../svg-no-whitespace/{main.html => main.svelte} | 0 .../samples/svg-with-style/{main.html => main.svelte} | 0 .../samples/svg-xlink/{main.html => main.svelte} | 0 .../samples/svg-xmlns/{main.html => main.svelte} | 0 test/runtime/samples/svg/{main.html => main.svelte} | 0 .../samples/template/{main.html => main.svelte} | 0 .../textarea-children/{main.html => main.svelte} | 0 .../samples/textarea-value/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../transition-js-args/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../transition-js-context/{main.html => main.svelte} | 0 .../transition-js-deferred/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../transition-js-delay/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{A.html => A.svelte} | 0 .../{B.html => B.svelte} | 0 .../samples/transition-js-dynamic-component/main.html | 8 -------- .../transition-js-dynamic-component/main.svelte | 8 ++++++++ .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../transition-js-events/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../transition-js-initial/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../main.html | 5 ----- .../main.svelte | 5 +++++ .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../transition-js-local/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../{Widget.html => Widget.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{Child.html => Child.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../whitespace-each-block/{main.html => main.svelte} | 0 .../whitespace-list/{main.html => main.svelte} | 0 .../whitespace-normal/{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../{main.html => main.svelte} | 0 .../window-binding-resize/{main.html => main.svelte} | 0 .../window-event-context/{main.html => main.svelte} | 0 .../window-event-custom/{main.html => main.svelte} | 0 .../samples/window-event/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../attribute-boolean/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../attribute-dynamic/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../attribute-static/{main.html => main.svelte} | 0 .../bindings/{_expected.html => _expected.svelte} | 0 .../samples/bindings/{main.html => main.svelte} | 0 .../comment/{_expected.html => _expected.svelte} | 0 .../samples/comment/{main.html => main.svelte} | 0 .../{Foo.html => Foo.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../component-binding/{Foo.html => Foo.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../component-binding/{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../component-data-dynamic/{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../component-data-empty/{main.html => main.svelte} | 2 +- .../{Widget.html => Widget.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../{main.html => main.svelte} | 2 +- .../component-refs/{Widget.html => Widget.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../samples/component-refs/{main.html => main.svelte} | 2 +- .../{_expected.html => _expected.svelte} | 0 .../component-yield/{Widget.html => Widget.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../component-yield/{main.html => main.svelte} | 2 +- .../samples/component/{Widget.html => Widget.svelte} | 0 .../component/{_expected.html => _expected.svelte} | 0 .../samples/component/{main.html => main.svelte} | 2 +- .../computed/{_expected.html => _expected.svelte} | 0 .../samples/computed/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../default-data-override/{main.html => main.svelte} | 0 .../default-data/{_expected.html => _expected.svelte} | 0 .../samples/default-data/{main.html => main.svelte} | 0 .../directives/{_expected.html => _expected.svelte} | 0 .../samples/directives/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../dynamic-text-escaped/{main.html => main.svelte} | 0 .../dynamic-text/{_expected.html => _expected.svelte} | 0 .../samples/dynamic-text/{main.html => main.svelte} | 0 .../each-block/{_expected.html => _expected.svelte} | 0 .../samples/each-block/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../empty-elements-closed/{main.html => main.svelte} | 0 .../entities/{_expected.html => _expected.svelte} | 0 .../samples/entities/{main.html => main.svelte} | 0 .../samples/head-title/_expected-head.html | 1 - .../{_actual-head.html => _expected-head.svelte} | 0 .../head-title/{_expected.html => _expected.svelte} | 0 .../samples/head-title/{main.html => main.svelte} | 0 .../helpers/{_expected.html => _expected.svelte} | 0 .../samples/helpers/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../samples/if-block-false/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../samples/if-block-true/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../import-non-component/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../samples/raw-mustaches/{main.html => main.svelte} | 0 .../sanitize-name/{[foo].html => [foo].svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../samples/sanitize-name/main.html | 5 ----- .../samples/sanitize-name/main.svelte | 5 +++++ .../static-div/{_expected.html => _expected.svelte} | 0 .../samples/static-div/{main.html => main.svelte} | 0 .../static-text/{_expected.html => _expected.svelte} | 0 .../samples/static-text/{main.html => main.svelte} | 0 .../samples/styles-nested/{One.html => One.svelte} | 2 +- .../samples/styles-nested/{Two.html => Two.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../samples/styles-nested/{main.html => main.svelte} | 2 +- .../styles/{_expected.html => _expected.svelte} | 0 .../samples/styles/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../textarea-children/{main.html => main.svelte} | 0 .../{_expected.html => _expected.svelte} | 0 .../samples/textarea-value/{main.html => main.svelte} | 0 .../triple/{_expected.html => _expected.svelte} | 0 .../samples/triple/{main.html => main.svelte} | 0 .../samples/basic/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../samples/binding/{input.html => input.svelte} | 0 .../samples/css/{input.html => input.svelte} | 0 .../samples/each-block/{input.html => input.svelte} | 0 .../samples/script/{input.html => input.svelte} | 0 .../static-no-script/{input.html => input.svelte} | 0 test/stats/samples/basic/{input.html => input.svelte} | 0 .../duplicate-globals/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../duplicate-vars/{input.html => input.svelte} | 0 .../implicit-action/{input.html => input.svelte} | 0 .../implicit-reactive/{input.html => input.svelte} | 0 .../samples/implicit/{input.html => input.svelte} | 0 .../samples/imports/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 test/stats/samples/props/{input.html => input.svelte} | 0 .../store-referenced/{input.html => input.svelte} | 0 .../store-unreferenced/{input.html => input.svelte} | 0 .../template-references/{input.html => input.svelte} | 0 .../samples/undeclared/{input.html => input.svelte} | 0 .../a11y-alt-text/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../a11y-anchor-is-valid/{input.html => input.svelte} | 0 .../a11y-aria-props/{input.html => input.svelte} | 0 .../a11y-aria-role/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../a11y-html-has-lang/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../a11y-no-access-key/{input.html => input.svelte} | 0 .../a11y-no-autofocus/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 2 +- .../samples/a11y-scope/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../action-invalid/{input.html => input.svelte} | 0 test/validator/samples/action-on-component/input.html | 7 ------- .../samples/action-on-component/input.svelte | 7 +++++++ .../animation-duplicate/{input.html => input.svelte} | 0 .../animation-missing/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../animation-siblings/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 2 +- .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../binding-invalid/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 2 +- .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 2 +- .../{input.html => input.svelte} | 2 +- .../{input.html => input.svelte} | 0 .../css-invalid-global/{input.html => input.svelte} | 0 .../debug-invalid-args/{input.html => input.svelte} | 0 .../default-export/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../empty-block-dev/{input.html => input.svelte} | 0 .../empty-block-prod/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../missing-component/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../namespace-invalid/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../non-empty-block-dev/{input.html => input.svelte} | 0 .../samples/prop-slot/{input.html => input.svelte} | 2 +- .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../ref-not-supported/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../select-multiple/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../samples/tag-invalid/{input.html => input.svelte} | 0 .../tag-non-string/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../title-no-attributes/{input.html => input.svelte} | 0 .../title-no-children/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../transition-missing/{input.html => input.svelte} | 0 .../samples/transition-on-component/input.html | 7 ------- .../samples/transition-on-component/input.svelte | 7 +++++++ .../undefined-value/{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 .../{input.html => input.svelte} | 0 1251 files changed, 492 insertions(+), 493 deletions(-) rename test/cli/samples/basic/src/{Main.html => Main.svelte} (100%) rename test/cli/samples/custom-element/src/{Main.html => Main.svelte} (100%) rename test/cli/samples/dev/src/{Main.html => Main.svelte} (100%) delete mode 100644 test/cli/samples/dir-sourcemap/src/Main.html create mode 100644 test/cli/samples/dir-sourcemap/src/Main.svelte rename test/cli/samples/dir-sourcemap/src/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/cli/samples/dir-subdir/src/Main.html create mode 100644 test/cli/samples/dir-subdir/src/Main.svelte rename test/cli/samples/dir-subdir/src/widget/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/cli/samples/dir/src/Main.html create mode 100644 test/cli/samples/dir/src/Main.svelte rename test/cli/samples/dir/src/{Widget.html => Widget.svelte} (100%) rename test/cli/samples/globals/src/{Main.html => Main.svelte} (100%) rename test/cli/samples/sourcemap-inline/src/{Main.html => Main.svelte} (100%) rename test/cli/samples/sourcemap/src/{Main.html => Main.svelte} (100%) rename test/cli/samples/ssr/src/{Main.html => Main.svelte} (100%) rename test/cli/samples/store/src/{Main.html => Main.svelte} (100%) rename test/css/samples/attribute-selector-only-name/{input.html => input.svelte} (100%) rename test/css/samples/attribute-selector-unquoted/{input.html => input.svelte} (100%) rename test/css/samples/basic/{input.html => input.svelte} (100%) rename test/css/samples/combinator-child/{expected.html => expected.svelte} (100%) rename test/css/samples/combinator-child/{input.html => input.svelte} (100%) rename test/css/samples/css-vars/{input.html => input.svelte} (100%) rename test/css/samples/descendant-selector-non-top-level-outer/{expected.html => expected.svelte} (100%) rename test/css/samples/descendant-selector-non-top-level-outer/{input.html => input.svelte} (100%) rename test/css/samples/empty-class/{input.html => input.svelte} (100%) rename test/css/samples/empty-rule-dev/{input.html => input.svelte} (100%) rename test/css/samples/empty-rule/{input.html => input.svelte} (100%) rename test/css/samples/global-keyframes/{input.html => input.svelte} (100%) rename test/css/samples/global/{input.html => input.svelte} (100%) rename test/css/samples/keyframes-autoprefixed/{input.html => input.svelte} (100%) rename test/css/samples/keyframes-from-to/{input.html => input.svelte} (100%) rename test/css/samples/keyframes/{input.html => input.svelte} (100%) rename test/css/samples/local-inside-global/{input.html => input.svelte} (100%) rename test/css/samples/media-query-word/{input.html => input.svelte} (100%) rename test/css/samples/media-query/{input.html => input.svelte} (100%) rename test/css/samples/nested/{expected.html => expected.svelte} (100%) rename test/css/samples/nested/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-contains/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-contains/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-prefix/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-prefix/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-suffix/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-suffix/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-class-dynamic/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-class-dynamic/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-class-static/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-class-static/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner-class/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner-class/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-outer/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-outer/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-descendant/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-global/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-global/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-id/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-id/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-whitespace-multiple/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-whitespace-multiple/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute-whitespace/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute-whitespace/{input.html => input.svelte} (100%) rename test/css/samples/omit-scoping-attribute/{expected.html => expected.svelte} (100%) rename test/css/samples/omit-scoping-attribute/{input.html => input.svelte} (100%) rename test/css/samples/pseudo-element/{input.html => input.svelte} (100%) rename test/css/samples/spread/{input.html => input.svelte} (100%) rename test/css/samples/supports-query/{input.html => input.svelte} (100%) rename test/css/samples/universal-selector/{input.html => input.svelte} (100%) rename test/css/samples/unknown-at-rule/{input.html => input.svelte} (100%) rename test/css/samples/unused-selector-leading/{expected.html => expected.svelte} (100%) rename test/css/samples/unused-selector-leading/{input.html => input.svelte} (100%) rename test/css/samples/unused-selector-ternary/{expected.html => expected.svelte} (100%) rename test/css/samples/unused-selector-ternary/{input.html => input.svelte} (100%) rename test/css/samples/unused-selector/{expected.html => expected.svelte} (100%) rename test/css/samples/unused-selector/{input.html => input.svelte} (100%) rename test/custom-elements/samples/custom-method/{main.html => main.svelte} (100%) rename test/custom-elements/samples/escaped-css/{main.html => main.svelte} (100%) rename test/custom-elements/samples/html-slots/{main.html => main.svelte} (100%) rename test/custom-elements/samples/html/{main.html => main.svelte} (100%) rename test/custom-elements/samples/nested.skip/{Counter.html => Counter.svelte} (100%) rename test/custom-elements/samples/nested.skip/{main.html => main.svelte} (75%) rename test/custom-elements/samples/new-styled/{main.html => main.svelte} (100%) rename test/custom-elements/samples/new/{main.html => main.svelte} (100%) rename test/custom-elements/samples/no-missing-prop-warnings/{main.html => main.svelte} (100%) rename test/custom-elements/samples/oncreate/{main.html => main.svelte} (100%) rename test/custom-elements/samples/props/{main.html => main.svelte} (81%) rename test/custom-elements/samples/props/{my-widget.html => my-widget.svelte} (100%) rename test/hydration/samples/basic/{_after.html => _after.svelte} (100%) rename test/hydration/samples/basic/{_before.html => _before.svelte} (100%) rename test/hydration/samples/basic/{main.html => main.svelte} (100%) rename test/hydration/samples/binding-input/{_after.html => _after.svelte} (100%) rename test/hydration/samples/binding-input/{_before.html => _before.svelte} (100%) rename test/hydration/samples/binding-input/{main.html => main.svelte} (100%) rename test/hydration/samples/component-in-element/{Nested.html => Nested.svelte} (100%) rename test/hydration/samples/component-in-element/{_after.html => _after.svelte} (100%) rename test/hydration/samples/component-in-element/{_before.html => _before.svelte} (100%) delete mode 100644 test/hydration/samples/component-in-element/main.html create mode 100644 test/hydration/samples/component-in-element/main.svelte rename test/hydration/samples/component/{Nested.html => Nested.svelte} (100%) rename test/hydration/samples/component/{_after.html => _after.svelte} (100%) rename test/hydration/samples/component/{_before.html => _before.svelte} (100%) delete mode 100644 test/hydration/samples/component/main.html create mode 100644 test/hydration/samples/component/main.svelte rename test/hydration/samples/dynamic-text-changed/{_after.html => _after.svelte} (100%) rename test/hydration/samples/dynamic-text-changed/{_before.html => _before.svelte} (100%) rename test/hydration/samples/dynamic-text-changed/{main.html => main.svelte} (100%) rename test/hydration/samples/dynamic-text/{_after.html => _after.svelte} (100%) rename test/hydration/samples/dynamic-text/{_before.html => _before.svelte} (100%) rename test/hydration/samples/dynamic-text/{main.html => main.svelte} (100%) rename test/hydration/samples/each-block-arg-clash/{_after.html => _after.svelte} (100%) rename test/hydration/samples/each-block-arg-clash/{_before.html => _before.svelte} (100%) rename test/hydration/samples/each-block-arg-clash/{main.html => main.svelte} (100%) rename test/hydration/samples/each-block/{_after.html => _after.svelte} (100%) rename test/hydration/samples/each-block/{_before.html => _before.svelte} (100%) rename test/hydration/samples/each-block/{main.html => main.svelte} (100%) rename test/hydration/samples/element-attribute-added/{_after.html => _after.svelte} (100%) rename test/hydration/samples/element-attribute-added/{_before.html => _before.svelte} (100%) rename test/hydration/samples/element-attribute-added/{main.html => main.svelte} (100%) rename test/hydration/samples/element-attribute-changed/{_after.html => _after.svelte} (100%) rename test/hydration/samples/element-attribute-changed/{_before.html => _before.svelte} (100%) rename test/hydration/samples/element-attribute-changed/{main.html => main.svelte} (100%) rename test/hydration/samples/element-attribute-removed/{_after.html => _after.svelte} (100%) rename test/hydration/samples/element-attribute-removed/{_before.html => _before.svelte} (100%) rename test/hydration/samples/element-attribute-removed/{main.html => main.svelte} (100%) rename test/hydration/samples/element-attribute-unchanged/{_after.html => _after.svelte} (100%) rename test/hydration/samples/element-attribute-unchanged/{_before.html => _before.svelte} (100%) rename test/hydration/samples/element-attribute-unchanged/{main.html => main.svelte} (100%) rename test/hydration/samples/element-nested/{_after.html => _after.svelte} (100%) rename test/hydration/samples/element-nested/{_before.html => _before.svelte} (100%) rename test/hydration/samples/element-nested/{main.html => main.svelte} (100%) rename test/hydration/samples/element-ref/{_after.html => _after.svelte} (100%) rename test/hydration/samples/element-ref/{_before.html => _before.svelte} (100%) rename test/hydration/samples/element-ref/{main.html => main.svelte} (100%) rename test/hydration/samples/event-handler/{_after.html => _after.svelte} (100%) rename test/hydration/samples/event-handler/{_before.html => _before.svelte} (100%) rename test/hydration/samples/event-handler/{main.html => main.svelte} (100%) rename test/hydration/samples/if-block-anchor/{_after.html => _after.svelte} (100%) rename test/hydration/samples/if-block-anchor/{_before.html => _before.svelte} (100%) rename test/hydration/samples/if-block-anchor/{main.html => main.svelte} (100%) rename test/hydration/samples/if-block-false/{_after.html => _after.svelte} (100%) rename test/hydration/samples/if-block-false/{_before.html => _before.svelte} (100%) rename test/hydration/samples/if-block-false/{main.html => main.svelte} (100%) rename test/hydration/samples/if-block-update/{_after.html => _after.svelte} (100%) rename test/hydration/samples/if-block-update/{_before.html => _before.svelte} (100%) rename test/hydration/samples/if-block-update/{main.html => main.svelte} (100%) rename test/hydration/samples/if-block/{_after.html => _after.svelte} (100%) rename test/hydration/samples/if-block/{_before.html => _before.svelte} (100%) rename test/hydration/samples/if-block/{main.html => main.svelte} (100%) rename test/hydration/samples/raw/{_after.html => _after.svelte} (100%) rename test/hydration/samples/raw/{_before.html => _before.svelte} (100%) rename test/hydration/samples/raw/{main.html => main.svelte} (100%) rename test/hydration/samples/top-level-text/{_after.html => _after.svelte} (100%) rename test/hydration/samples/top-level-text/{_before.html => _before.svelte} (100%) rename test/hydration/samples/top-level-text/{main.html => main.svelte} (100%) rename test/js/samples/action-custom-event-handler/{input.html => input.svelte} (100%) rename test/js/samples/action/{input.html => input.svelte} (100%) rename test/js/samples/bind-width-height/{input.html => input.svelte} (100%) rename test/js/samples/collapses-text-around-comments/{input.html => input.svelte} (100%) rename test/js/samples/component-static-array/{input.html => input.svelte} (100%) rename test/js/samples/component-static-immutable/{input.html => input.svelte} (100%) rename test/js/samples/component-static-immutable2/{input.html => input.svelte} (100%) rename test/js/samples/component-static/{input.html => input.svelte} (100%) rename test/js/samples/computed-collapsed-if/{input.html => input.svelte} (100%) rename test/js/samples/css-media-query/{input.html => input.svelte} (100%) rename test/js/samples/css-shadow-dom-keyframes/{input.html => input.svelte} (100%) rename test/js/samples/debug-empty/{input.html => input.svelte} (100%) rename test/js/samples/debug-foo-bar-baz-things/{input.html => input.svelte} (100%) rename test/js/samples/debug-foo/{input.html => input.svelte} (100%) rename test/js/samples/debug-ssr-foo/{input.html => input.svelte} (100%) rename test/js/samples/deconflict-builtins/{input.html => input.svelte} (100%) rename test/js/samples/deconflict-globals/{input.html => input.svelte} (100%) rename test/js/samples/dev-warning-missing-data-computed/{input.html => input.svelte} (100%) rename test/js/samples/do-use-dataset/{input.html => input.svelte} (100%) rename test/js/samples/dont-use-dataset-in-legacy/{input.html => input.svelte} (100%) rename test/js/samples/dont-use-dataset-in-svg/{input.html => input.svelte} (100%) delete mode 100644 test/js/samples/dynamic-import/input.html create mode 100644 test/js/samples/dynamic-import/input.svelte rename test/js/samples/each-block-changed-check/{input.html => input.svelte} (100%) rename test/js/samples/each-block-keyed-animated/{input.html => input.svelte} (100%) rename test/js/samples/each-block-keyed/{input.html => input.svelte} (100%) rename test/js/samples/event-handler-no-passive/{input.html => input.svelte} (100%) rename test/js/samples/event-modifiers/{input.html => input.svelte} (100%) rename test/js/samples/head-no-whitespace/{input.html => input.svelte} (100%) rename test/js/samples/hoisted-const/{input.html => input.svelte} (100%) rename test/js/samples/hoisted-let/{input.html => input.svelte} (100%) rename test/js/samples/if-block-no-update/{input.html => input.svelte} (100%) rename test/js/samples/if-block-simple/{input.html => input.svelte} (100%) rename test/js/samples/inline-style-optimized-multiple/{input.html => input.svelte} (100%) rename test/js/samples/inline-style-optimized-url/{input.html => input.svelte} (100%) rename test/js/samples/inline-style-optimized/{input.html => input.svelte} (100%) rename test/js/samples/inline-style-unoptimized/{input.html => input.svelte} (100%) rename test/js/samples/input-files/{input.html => input.svelte} (100%) rename test/js/samples/input-range/{input.html => input.svelte} (100%) rename test/js/samples/input-without-blowback-guard/{input.html => input.svelte} (100%) rename test/js/samples/instrumentation-script-if-no-block/{input.html => input.svelte} (100%) rename test/js/samples/instrumentation-script-x-equals-x/{input.html => input.svelte} (100%) rename test/js/samples/instrumentation-template-if-no-block/{input.html => input.svelte} (100%) rename test/js/samples/instrumentation-template-x-equals-x/{input.html => input.svelte} (100%) rename test/js/samples/legacy-input-type/{input.html => input.svelte} (100%) rename test/js/samples/media-bindings/{input.html => input.svelte} (100%) delete mode 100644 test/js/samples/non-imported-component/input.html create mode 100644 test/js/samples/non-imported-component/input.svelte rename test/js/samples/non-mutable-reference/{input.html => input.svelte} (100%) rename test/js/samples/reactive-values-non-topologically-ordered/{input.html => input.svelte} (100%) rename test/js/samples/reactive-values-non-writable-dependencies/{input.html => input.svelte} (100%) rename test/js/samples/select-dynamic-value/{input.html => input.svelte} (100%) rename test/js/samples/setup-method/{input.html => input.svelte} (100%) rename test/js/samples/ssr-no-oncreate-etc/{input.html => input.svelte} (100%) rename test/js/samples/ssr-preserve-comments/{input.html => input.svelte} (100%) rename test/js/samples/svg-title/{input.html => input.svelte} (100%) rename test/js/samples/title/{input.html => input.svelte} (100%) rename test/js/samples/transition-local/{input.html => input.svelte} (100%) rename test/js/samples/use-elements-as-anchors/{input.html => input.svelte} (100%) rename test/js/samples/window-binding-scroll/{input.html => input.svelte} (100%) rename test/parser/samples/action-with-call/{input.html => input.svelte} (100%) rename test/parser/samples/action-with-identifier/{input.html => input.svelte} (100%) rename test/parser/samples/action-with-literal/{input.html => input.svelte} (100%) rename test/parser/samples/action/{input.html => input.svelte} (100%) rename test/parser/samples/animation/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-containing-solidus/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-dynamic-boolean/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-dynamic-reserved/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-dynamic/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-escaped/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-multiple/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-shorthand/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-static-boolean/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-static/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-unique-error/{input.html => input.svelte} (100%) rename test/parser/samples/attribute-unquoted/{input.html => input.svelte} (100%) rename test/parser/samples/await-then-catch/{input.html => input.svelte} (100%) rename test/parser/samples/binding-shorthand/{input.html => input.svelte} (100%) rename test/parser/samples/binding/{input.html => input.svelte} (100%) rename test/parser/samples/comment/{input.html => input.svelte} (100%) rename test/parser/samples/component-dynamic/{input.html => input.svelte} (100%) rename test/parser/samples/convert-entities-in-element/{input.html => input.svelte} (100%) rename test/parser/samples/convert-entities/{input.html => input.svelte} (100%) rename test/parser/samples/css/{input.html => input.svelte} (100%) rename test/parser/samples/dynamic-import/{input.html => input.svelte} (100%) rename test/parser/samples/each-block-destructured/{input.html => input.svelte} (100%) rename test/parser/samples/each-block-else/{input.html => input.svelte} (100%) rename test/parser/samples/each-block-indexed/{input.html => input.svelte} (100%) rename test/parser/samples/each-block-keyed/{input.html => input.svelte} (100%) rename test/parser/samples/each-block/{input.html => input.svelte} (100%) rename test/parser/samples/element-with-mustache/{input.html => input.svelte} (100%) rename test/parser/samples/element-with-text/{input.html => input.svelte} (100%) rename test/parser/samples/elements/{input.html => input.svelte} (100%) rename test/parser/samples/error-binding-disabled/{input.html => input.svelte} (100%) rename test/parser/samples/error-comment-unclosed/{input.html => input.svelte} (100%) rename test/parser/samples/error-css/{input.html => input.svelte} (100%) rename test/parser/samples/error-illegal-expression/{input.html => input.svelte} (100%) rename test/parser/samples/error-multiple-styles/{input.html => input.svelte} (100%) rename test/parser/samples/error-script-unclosed/{input.html => input.svelte} (100%) rename test/parser/samples/error-self-reference/{input.html => input.svelte} (100%) rename test/parser/samples/error-svelte-selfdestructive/{input.html => input.svelte} (100%) rename test/parser/samples/error-unexpected-end-of-input-b/{input.html => input.svelte} (100%) rename test/parser/samples/error-unexpected-end-of-input-c/{input.html => input.svelte} (100%) rename test/parser/samples/error-unexpected-end-of-input-d/{input.html => input.svelte} (100%) rename test/parser/samples/error-unexpected-end-of-input/{input.html => input.svelte} (100%) rename test/parser/samples/error-unmatched-closing-tag/{input.html => input.svelte} (100%) rename test/parser/samples/error-void-closing/{input.html => input.svelte} (100%) rename test/parser/samples/error-window-children/{input.html => input.svelte} (100%) rename test/parser/samples/error-window-duplicate/{input.html => input.svelte} (100%) rename test/parser/samples/error-window-inside-block/{input.html => input.svelte} (100%) rename test/parser/samples/error-window-inside-element/{input.html => input.svelte} (100%) rename test/parser/samples/event-handler/{input.html => input.svelte} (100%) rename test/parser/samples/if-block-else/{input.html => input.svelte} (100%) rename test/parser/samples/if-block-elseif/{input.html => input.svelte} (100%) rename test/parser/samples/if-block/{input.html => input.svelte} (100%) rename test/parser/samples/implicitly-closed-li/{input.html => input.svelte} (100%) rename test/parser/samples/nbsp/{input.html => input.svelte} (100%) rename test/parser/samples/raw-mustaches/{input.html => input.svelte} (100%) rename test/parser/samples/refs/{input.html => input.svelte} (100%) rename test/parser/samples/script-comment-only/{input.html => input.svelte} (100%) rename test/parser/samples/script-comment-trailing-multiline/{input.html => input.svelte} (100%) rename test/parser/samples/script-comment-trailing/{input.html => input.svelte} (100%) rename test/parser/samples/script/{input.html => input.svelte} (100%) rename test/parser/samples/self-closing-element/{input.html => input.svelte} (100%) rename test/parser/samples/self-reference/{input.html => input.svelte} (100%) rename test/parser/samples/space-between-mustaches/{input.html => input.svelte} (100%) rename test/parser/samples/spread/{input.html => input.svelte} (100%) rename test/parser/samples/textarea-children/{input.html => input.svelte} (100%) rename test/parser/samples/transition-intro-no-params/{input.html => input.svelte} (100%) rename test/parser/samples/transition-intro/{input.html => input.svelte} (100%) rename test/parser/samples/unusual-identifier/{input.html => input.svelte} (100%) rename test/parser/samples/whitespace-leading-trailing/{input.html => input.svelte} (100%) rename test/parser/samples/whitespace-normal/{input.html => input.svelte} (100%) rename test/parser/samples/yield/{input.html => input.svelte} (100%) rename test/preprocess/samples/dependencies/{input.html => input.svelte} (100%) rename test/preprocess/samples/dependencies/{output.html => output.svelte} (100%) rename test/preprocess/samples/filename/{input.html => input.svelte} (100%) rename test/preprocess/samples/filename/{output.html => output.svelte} (60%) rename test/preprocess/samples/ignores-null/{input.html => input.svelte} (100%) rename test/preprocess/samples/ignores-null/{output.html => output.svelte} (100%) rename test/preprocess/samples/markup/{input.html => input.svelte} (100%) rename test/preprocess/samples/markup/{output.html => output.svelte} (100%) rename test/preprocess/samples/multiple-preprocessors/{input.html => input.svelte} (100%) rename test/preprocess/samples/multiple-preprocessors/{output.html => output.svelte} (100%) rename test/preprocess/samples/script-multiple/{input.html => input.svelte} (100%) rename test/preprocess/samples/script-multiple/{output.html => output.svelte} (100%) rename test/preprocess/samples/script/{input.html => input.svelte} (100%) rename test/preprocess/samples/script/{output.html => output.svelte} (100%) rename test/preprocess/samples/style-async/{input.html => input.svelte} (100%) rename test/preprocess/samples/style-async/{output.html => output.svelte} (100%) rename test/preprocess/samples/style-attributes/{input.html => input.svelte} (100%) rename test/preprocess/samples/style-attributes/{output.html => output.svelte} (100%) rename test/preprocess/samples/style/{input.html => input.svelte} (100%) rename test/preprocess/samples/style/{output.html => output.svelte} (100%) rename test/runtime/samples/action-custom-event-handler-in-each-destructured/{main.html => main.svelte} (100%) rename test/runtime/samples/action-custom-event-handler-in-each/{main.html => main.svelte} (100%) rename test/runtime/samples/action-custom-event-handler-node-context/{main.html => main.svelte} (100%) rename test/runtime/samples/action-custom-event-handler-this/{main.html => main.svelte} (100%) rename test/runtime/samples/action-custom-event-handler-with-context/{main.html => main.svelte} (100%) rename test/runtime/samples/action-custom-event-handler/{main.html => main.svelte} (100%) rename test/runtime/samples/action-function/{main.html => main.svelte} (100%) rename test/runtime/samples/action-ternary-template/{main.html => main.svelte} (100%) rename test/runtime/samples/action-this/{main.html => main.svelte} (100%) rename test/runtime/samples/action-update/{main.html => main.svelte} (100%) rename test/runtime/samples/action/{main.html => main.svelte} (100%) rename test/runtime/samples/after-render-prevents-loop/{main.html => main.svelte} (100%) rename test/runtime/samples/after-render-triggers-update/{main.html => main.svelte} (100%) rename test/runtime/samples/animation-css/{main.html => main.svelte} (100%) rename test/runtime/samples/animation-js-delay/{main.html => main.svelte} (100%) rename test/runtime/samples/animation-js-easing/{main.html => main.svelte} (100%) rename test/runtime/samples/animation-js/{main.html => main.svelte} (100%) rename test/runtime/samples/assignment-in-init/{main.html => main.svelte} (100%) rename test/runtime/samples/assignment-to-computed-property/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-boolean-false/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-boolean-indeterminate/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-boolean-true/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-casing/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-dynamic-multiple/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-dynamic-no-dependencies/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-dynamic-quotemarks/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-dynamic-shorthand/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-dynamic-type/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-dynamic/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-empty-svg/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-empty/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-namespaced/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-partial-number/{Component.html => Component.svelte} (100%) delete mode 100644 test/runtime/samples/attribute-partial-number/main.html create mode 100644 test/runtime/samples/attribute-partial-number/main.svelte rename test/runtime/samples/attribute-prefer-expression/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-static-at-symbol/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-static-boolean/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-static-quotemarks/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-static/{main.html => main.svelte} (100%) rename test/runtime/samples/attribute-unknown-without-value/{main.html => main.svelte} (100%) rename test/runtime/samples/autofocus/{main.html => main.svelte} (100%) rename test/runtime/samples/await-component-oncreate/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/await-component-oncreate/{main.html => main.svelte} (67%) rename test/runtime/samples/await-containing-if/{main.html => main.svelte} (100%) rename test/runtime/samples/await-in-each/{main.html => main.svelte} (100%) rename test/runtime/samples/await-set-simultaneous/{main.html => main.svelte} (100%) rename test/runtime/samples/await-then-catch-anchor/{main.html => main.svelte} (100%) rename test/runtime/samples/await-then-catch-event/{main.html => main.svelte} (100%) rename test/runtime/samples/await-then-catch-if/{main.html => main.svelte} (100%) rename test/runtime/samples/await-then-catch-in-slot/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/await-then-catch-in-slot/{main.html => main.svelte} (84%) rename test/runtime/samples/await-then-catch-multiple/{main.html => main.svelte} (100%) rename test/runtime/samples/await-then-catch-no-values/{main.html => main.svelte} (100%) rename test/runtime/samples/await-then-catch-non-promise/{main.html => main.svelte} (100%) rename test/runtime/samples/await-then-catch-order/{main.html => main.svelte} (100%) rename test/runtime/samples/await-then-catch-static/{main.html => main.svelte} (100%) rename test/runtime/samples/await-then-catch/{main.html => main.svelte} (100%) rename test/runtime/samples/await-then-shorthand/{main.html => main.svelte} (100%) rename test/runtime/samples/await-with-components/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/await-with-components/{main.html => main.svelte} (78%) rename test/runtime/samples/before-render-chain/{Item.html => Item.svelte} (100%) rename test/runtime/samples/before-render-chain/{List.html => List.svelte} (82%) rename test/runtime/samples/before-render-chain/{main.html => main.svelte} (64%) rename test/runtime/samples/before-render-prevents-loop/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-audio-currenttime-duration-volume/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-indirect-computed/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-indirect/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-checkbox-deep-contextual/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-checkbox-group-outside-each/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-checkbox-group/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-checkbox-indeterminate/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-checkbox-with-event-in-each/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-checkbox/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-number/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-radio-group/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-range-change/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-range/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-text-contextual-deconflicted/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-text-contextual/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-text-deconflicted/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-text-deep-computed-dynamic/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-text-deep-computed/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-text-deep-contextual-computed-dynamic/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-text-deep-contextual/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-text-deep/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-text/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-input-with-event/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-select-implicit-option-value/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-select-in-each-block/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-select-in-yield/{Modal.html => Modal.svelte} (100%) rename test/runtime/samples/binding-select-in-yield/{main.html => main.svelte} (85%) rename test/runtime/samples/binding-select-initial-value-undefined/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-select-initial-value/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-select-late/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-select-multiple/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-select-optgroup/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-select/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-store-deep/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-store/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-textarea/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-this-and-value/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-this-component-reactive/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/binding-this-component-reactive/{main.html => main.svelte} (73%) rename test/runtime/samples/binding-this-element-reactive/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-this-no-innerhtml/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-this-unset/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-this-with-context/{main.html => main.svelte} (100%) rename test/runtime/samples/binding-this/{main.html => main.svelte} (100%) rename test/runtime/samples/bindings-before-onmount/{One.html => One.svelte} (74%) rename test/runtime/samples/bindings-before-onmount/{Two.html => Two.svelte} (100%) delete mode 100644 test/runtime/samples/bindings-before-onmount/main.html create mode 100644 test/runtime/samples/bindings-before-onmount/main.svelte rename test/runtime/samples/bindings-coalesced/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/bindings-coalesced/{main.html => main.svelte} (66%) rename test/runtime/samples/class-boolean/{main.html => main.svelte} (100%) rename test/runtime/samples/class-helper/{main.html => main.svelte} (100%) rename test/runtime/samples/class-in-each/{main.html => main.svelte} (100%) rename test/runtime/samples/class-shortcut-with-class/{main.html => main.svelte} (100%) rename test/runtime/samples/class-shortcut/{main.html => main.svelte} (100%) rename test/runtime/samples/class-with-attribute/{main.html => main.svelte} (100%) rename test/runtime/samples/class-with-dynamic-attribute/{main.html => main.svelte} (100%) rename test/runtime/samples/component-binding-blowback-b/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-binding-blowback-b/{main.html => main.svelte} (88%) rename test/runtime/samples/component-binding-blowback-c/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-binding-blowback-c/{main.html => main.svelte} (90%) rename test/runtime/samples/component-binding-blowback/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-binding-blowback/{main.html => main.svelte} (72%) rename test/runtime/samples/component-binding-computed/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-binding-computed/{main.html => main.svelte} (81%) rename test/runtime/samples/component-binding-conditional-b/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/component-binding-conditional-b/{Baz.html => Baz.svelte} (100%) rename test/runtime/samples/component-binding-conditional-b/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/component-binding-conditional-b/{main.html => main.svelte} (54%) rename test/runtime/samples/component-binding-conditional/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/component-binding-conditional/{Baz.html => Baz.svelte} (100%) rename test/runtime/samples/component-binding-conditional/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/component-binding-conditional/{main.html => main.svelte} (51%) rename test/runtime/samples/component-binding-deep-b/{ComponentSelector.html => ComponentSelector.svelte} (100%) rename test/runtime/samples/component-binding-deep-b/{Editor.html => Editor.svelte} (100%) rename test/runtime/samples/component-binding-deep-b/{main.html => main.svelte} (88%) rename test/runtime/samples/component-binding-deep/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-binding-deep/{main.html => main.svelte} (62%) rename test/runtime/samples/component-binding-each-nested/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-binding-each-nested/{main.html => main.svelte} (71%) rename test/runtime/samples/component-binding-each-object/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-binding-each-object/{main.html => main.svelte} (62%) rename test/runtime/samples/component-binding-each/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-binding-each/{main.html => main.svelte} (64%) rename test/runtime/samples/component-binding-infinite-loop/{A.html => A.svelte} (58%) rename test/runtime/samples/component-binding-infinite-loop/{B.html => B.svelte} (83%) rename test/runtime/samples/component-binding-infinite-loop/{C.html => C.svelte} (100%) rename test/runtime/samples/component-binding-infinite-loop/{main.html => main.svelte} (59%) rename test/runtime/samples/component-binding-nested/{Bar.html => Bar.svelte} (71%) rename test/runtime/samples/component-binding-nested/{Baz.html => Baz.svelte} (100%) rename test/runtime/samples/component-binding-nested/{Foo.html => Foo.svelte} (71%) rename test/runtime/samples/component-binding-nested/{main.html => main.svelte} (52%) rename test/runtime/samples/component-binding-parent-supercedes-child-b/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/component-binding-parent-supercedes-child-b/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/component-binding-parent-supercedes-child-b/{main.html => main.svelte} (55%) rename test/runtime/samples/component-binding-parent-supercedes-child-c/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/component-binding-parent-supercedes-child-c/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/component-binding-parent-supercedes-child-c/{main.html => main.svelte} (55%) rename test/runtime/samples/component-binding-parent-supercedes-child/{Counter.html => Counter.svelte} (100%) rename test/runtime/samples/component-binding-parent-supercedes-child/{main.html => main.svelte} (53%) rename test/runtime/samples/component-binding-private-state/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/component-binding-private-state/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/component-binding-private-state/{main.html => main.svelte} (55%) rename test/runtime/samples/component-binding-self-destroying/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-binding-self-destroying/{main.html => main.svelte} (75%) rename test/runtime/samples/component-binding/{Counter.html => Counter.svelte} (100%) rename test/runtime/samples/component-binding/{main.html => main.svelte} (51%) rename test/runtime/samples/component-data-dynamic-late/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-data-dynamic-late/{main.html => main.svelte} (67%) rename test/runtime/samples/component-data-dynamic-shorthand/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-data-dynamic-shorthand/{main.html => main.svelte} (57%) rename test/runtime/samples/component-data-dynamic/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-data-dynamic/{main.html => main.svelte} (80%) rename test/runtime/samples/component-data-empty/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/component-data-empty/main.html create mode 100644 test/runtime/samples/component-data-empty/main.svelte rename test/runtime/samples/component-data-static-boolean-regression/{Link.html => Link.svelte} (100%) delete mode 100644 test/runtime/samples/component-data-static-boolean-regression/main.html create mode 100644 test/runtime/samples/component-data-static-boolean-regression/main.svelte rename test/runtime/samples/component-data-static-boolean/{Foo.html => Foo.svelte} (100%) delete mode 100644 test/runtime/samples/component-data-static-boolean/main.html create mode 100644 test/runtime/samples/component-data-static-boolean/main.svelte rename test/runtime/samples/component-data-static/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-data-static/{main.html => main.svelte} (55%) rename test/runtime/samples/component-event-not-stale/{Button.html => Button.svelte} (100%) rename test/runtime/samples/component-event-not-stale/{main.html => main.svelte} (88%) rename test/runtime/samples/component-events-console/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/component-events-console/main.html create mode 100644 test/runtime/samples/component-events-console/main.svelte rename test/runtime/samples/component-events-data/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-events-data/{main.html => main.svelte} (81%) rename test/runtime/samples/component-events-each/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-events-each/{main.html => main.svelte} (85%) rename test/runtime/samples/component-events/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-events/{main.html => main.svelte} (83%) rename test/runtime/samples/component-if-placement/{Component.html => Component.svelte} (100%) rename test/runtime/samples/component-if-placement/{main.html => main.svelte} (63%) rename test/runtime/samples/component-name-deconflicted/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-name-deconflicted/{main.html => main.svelte} (70%) delete mode 100644 test/runtime/samples/component-nested-deep/Level1.html create mode 100644 test/runtime/samples/component-nested-deep/Level1.svelte delete mode 100644 test/runtime/samples/component-nested-deep/Level2.html create mode 100644 test/runtime/samples/component-nested-deep/Level2.svelte rename test/runtime/samples/component-nested-deep/{Level3.html => Level3.svelte} (100%) delete mode 100644 test/runtime/samples/component-nested-deep/main.html create mode 100644 test/runtime/samples/component-nested-deep/main.svelte rename test/runtime/samples/component-nested-deeper/{Level1.html => Level1.svelte} (74%) rename test/runtime/samples/component-nested-deeper/{Level2.html => Level2.svelte} (100%) rename test/runtime/samples/component-nested-deeper/{Level3.html => Level3.svelte} (100%) delete mode 100644 test/runtime/samples/component-nested-deeper/main.html create mode 100644 test/runtime/samples/component-nested-deeper/main.svelte rename test/runtime/samples/component-not-void/{Link.html => Link.svelte} (100%) delete mode 100644 test/runtime/samples/component-not-void/main.html create mode 100644 test/runtime/samples/component-not-void/main.svelte rename test/runtime/samples/component-ref/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-ref/{main.html => main.svelte} (62%) rename test/runtime/samples/component-shorthand-import/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/component-shorthand-import/main.html create mode 100644 test/runtime/samples/component-shorthand-import/main.svelte rename test/runtime/samples/component-slot-default/{Nested.html => Nested.svelte} (100%) delete mode 100644 test/runtime/samples/component-slot-default/main.html create mode 100644 test/runtime/samples/component-slot-default/main.svelte rename test/runtime/samples/component-slot-dynamic/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-dynamic/{main.html => main.svelte} (67%) rename test/runtime/samples/component-slot-each-block/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-each-block/{main.html => main.svelte} (69%) rename test/runtime/samples/component-slot-empty/{Nested.html => Nested.svelte} (100%) delete mode 100644 test/runtime/samples/component-slot-empty/main.html create mode 100644 test/runtime/samples/component-slot-empty/main.svelte rename test/runtime/samples/component-slot-fallback/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-fallback/{main.html => main.svelte} (51%) rename test/runtime/samples/component-slot-if-block-before-node/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/{component-slot-if-block/main.html => component-slot-if-block-before-node/main.svelte} (69%) rename test/runtime/samples/component-slot-if-block/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/{component-slot-if-block-before-node/main.html => component-slot-if-block/main.svelte} (69%) rename test/runtime/samples/component-slot-if-else-block-before-node/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-if-else-block-before-node/{main.html => main.svelte} (74%) rename test/runtime/samples/component-slot-let-aliased/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-let-aliased/{main.html => main.svelte} (65%) rename test/runtime/samples/component-slot-let-b/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-let-b/{main.html => main.svelte} (55%) rename test/runtime/samples/component-slot-let-c/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-let-c/{main.html => main.svelte} (60%) rename test/runtime/samples/component-slot-let-destructured/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-let-destructured/{main.html => main.svelte} (67%) rename test/runtime/samples/component-slot-let-named/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-let-named/{main.html => main.svelte} (71%) rename test/runtime/samples/component-slot-let-static/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-let-static/{main.html => main.svelte} (53%) rename test/runtime/samples/component-slot-let/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-let/{main.html => main.svelte} (65%) rename test/runtime/samples/component-slot-name-with-hyphen/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-name-with-hyphen/{main.html => main.svelte} (54%) rename test/runtime/samples/component-slot-named/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-named/{main.html => main.svelte} (63%) rename test/runtime/samples/component-slot-nested-component/{Inner.html => Inner.svelte} (100%) rename test/runtime/samples/component-slot-nested-component/{Outer.html => Outer.svelte} (100%) delete mode 100644 test/runtime/samples/component-slot-nested-component/main.html create mode 100644 test/runtime/samples/component-slot-nested-component/main.svelte rename test/runtime/samples/component-slot-nested/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/component-slot-nested/{main.html => main.svelte} (52%) rename test/runtime/samples/component-slot-used-with-default-event/{Nested.html => Nested.svelte} (100%) delete mode 100644 test/runtime/samples/component-slot-used-with-default-event/main.html create mode 100644 test/runtime/samples/component-slot-used-with-default-event/main.svelte rename test/runtime/samples/component-static-at-symbol/{Email.html => Email.svelte} (100%) delete mode 100644 test/runtime/samples/component-static-at-symbol/main.html create mode 100644 test/runtime/samples/component-static-at-symbol/main.svelte rename test/runtime/samples/component-template-inline-mutation/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/component-template-inline-mutation/main.html create mode 100644 test/runtime/samples/component-template-inline-mutation/main.svelte rename test/runtime/samples/component-yield-follows-element/{Foo.html => Foo.svelte} (100%) delete mode 100644 test/runtime/samples/component-yield-follows-element/main.html create mode 100644 test/runtime/samples/component-yield-follows-element/main.svelte rename test/runtime/samples/component-yield-if/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-yield-if/{main.html => main.svelte} (72%) rename test/runtime/samples/component-yield-multiple-in-each/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-yield-multiple-in-each/{main.html => main.svelte} (74%) rename test/runtime/samples/component-yield-multiple-in-if/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-yield-multiple-in-if/{main.html => main.svelte} (75%) rename test/runtime/samples/component-yield-nested-if/{Inner.html => Inner.svelte} (100%) rename test/runtime/samples/component-yield-nested-if/{Outer.html => Outer.svelte} (100%) delete mode 100644 test/runtime/samples/component-yield-nested-if/main.html create mode 100644 test/runtime/samples/component-yield-nested-if/main.svelte rename test/runtime/samples/component-yield-parent/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/component-yield-parent/{main.html => main.svelte} (64%) rename test/runtime/samples/component-yield-placement/{Modal.html => Modal.svelte} (100%) rename test/runtime/samples/component-yield-placement/{main.html => main.svelte} (83%) rename test/runtime/samples/component-yield-static/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/component-yield-static/main.html create mode 100644 test/runtime/samples/component-yield-static/main.svelte rename test/runtime/samples/component-yield/{main.html => main.svelte} (100%) rename test/runtime/samples/component/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/component/main.html create mode 100644 test/runtime/samples/component/main.svelte rename test/runtime/samples/context-api/{Tab.html => Tab.svelte} (87%) rename test/runtime/samples/context-api/{TabList.html => TabList.svelte} (100%) rename test/runtime/samples/context-api/{TabPanel.html => TabPanel.svelte} (86%) rename test/runtime/samples/context-api/{Tabs.html => Tabs.svelte} (100%) rename test/runtime/samples/context-api/{main.html => main.svelte} (68%) rename test/runtime/samples/css-comments/{main.html => main.svelte} (100%) rename test/runtime/samples/css-false/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/css-false/main.html create mode 100644 test/runtime/samples/css-false/main.svelte rename test/runtime/samples/css-space-in-attribute/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/css-space-in-attribute/{main.html => main.svelte} (51%) rename test/runtime/samples/css/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/css/main.html create mode 100644 test/runtime/samples/css/main.svelte rename test/runtime/samples/custom-method/{main.html => main.svelte} (100%) rename test/runtime/samples/deconflict-builtins/{main.html => main.svelte} (100%) rename test/runtime/samples/deconflict-component-name-with-global/{main.html => main.svelte} (100%) rename test/runtime/samples/deconflict-component-name-with-module-global/{main.html => main.svelte} (100%) rename test/runtime/samples/deconflict-component-refs/{main.html => main.svelte} (100%) rename test/runtime/samples/deconflict-contexts/{main.html => main.svelte} (100%) rename test/runtime/samples/deconflict-elements-indexes/{main.html => main.svelte} (100%) rename test/runtime/samples/deconflict-non-helpers/{main.html => main.svelte} (100%) delete mode 100644 test/runtime/samples/deconflict-self/main.html create mode 100644 test/runtime/samples/deconflict-self/main.svelte rename test/runtime/samples/deconflict-self/nested/{main.html => main.svelte} (100%) rename test/runtime/samples/deconflict-template-1/{main.html => main.svelte} (100%) rename test/runtime/samples/deconflict-template-2/{main.html => main.svelte} (100%) rename test/runtime/samples/deconflict-vars/{main.html => main.svelte} (100%) rename test/runtime/samples/default-data-function/{main.html => main.svelte} (100%) rename test/runtime/samples/default-data-override/{main.html => main.svelte} (100%) rename test/runtime/samples/default-data/{main.html => main.svelte} (100%) rename test/runtime/samples/destroy-twice/{main.html => main.svelte} (100%) rename test/runtime/samples/destructuring/{main.html => main.svelte} (100%) rename test/runtime/samples/dev-warning-destroy-twice/{main.html => main.svelte} (100%) rename test/runtime/samples/dev-warning-helper/{main.html => main.svelte} (100%) rename test/runtime/samples/dev-warning-missing-data-binding/{main.html => main.svelte} (100%) rename test/runtime/samples/dev-warning-missing-data-component/{Foo.html => Foo.svelte} (100%) delete mode 100644 test/runtime/samples/dev-warning-missing-data-component/main.html create mode 100644 test/runtime/samples/dev-warning-missing-data-component/main.svelte rename test/runtime/samples/dev-warning-missing-data-each/{main.html => main.svelte} (100%) rename test/runtime/samples/dev-warning-missing-data-excludes-event/{main.html => main.svelte} (100%) rename test/runtime/samples/dev-warning-missing-data/{main.html => main.svelte} (100%) rename test/runtime/samples/dev-warning-readonly-computed/{main.html => main.svelte} (100%) rename test/runtime/samples/dev-warning-readonly-window-binding/{main.html => main.svelte} (100%) rename test/runtime/samples/document-event/{main.html => main.svelte} (100%) rename test/runtime/samples/dynamic-component-bindings-recreated-b/{Green.html => Green.svelte} (100%) rename test/runtime/samples/dynamic-component-bindings-recreated-b/{Red.html => Red.svelte} (100%) delete mode 100644 test/runtime/samples/dynamic-component-bindings-recreated-b/main.html create mode 100644 test/runtime/samples/dynamic-component-bindings-recreated-b/main.svelte rename test/runtime/samples/dynamic-component-bindings-recreated/{Green.html => Green.svelte} (100%) rename test/runtime/samples/dynamic-component-bindings-recreated/{Red.html => Red.svelte} (100%) delete mode 100644 test/runtime/samples/dynamic-component-bindings-recreated/main.html create mode 100644 test/runtime/samples/dynamic-component-bindings-recreated/main.svelte rename test/runtime/samples/dynamic-component-bindings/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/dynamic-component-bindings/{Foo.html => Foo.svelte} (100%) delete mode 100644 test/runtime/samples/dynamic-component-bindings/main.html create mode 100644 test/runtime/samples/dynamic-component-bindings/main.svelte rename test/runtime/samples/dynamic-component-destroy-null/{main.html => main.svelte} (100%) rename test/runtime/samples/dynamic-component-events/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/dynamic-component-events/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/dynamic-component-events/{main.html => main.svelte} (58%) rename test/runtime/samples/dynamic-component-in-if/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/dynamic-component-in-if/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/dynamic-component-in-if/{main.html => main.svelte} (57%) rename test/runtime/samples/dynamic-component-inside-element/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/dynamic-component-inside-element/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/dynamic-component-inside-element/{main.html => main.svelte} (57%) rename test/runtime/samples/dynamic-component-nulled-out/{Foo.html => Foo.svelte} (100%) delete mode 100644 test/runtime/samples/dynamic-component-nulled-out/main.html create mode 100644 test/runtime/samples/dynamic-component-nulled-out/main.svelte rename test/runtime/samples/dynamic-component-ref/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/dynamic-component-ref/{main.html => main.svelte} (72%) rename test/runtime/samples/dynamic-component-slot/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/dynamic-component-slot/{Baz.html => Baz.svelte} (100%) rename test/runtime/samples/dynamic-component-slot/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/dynamic-component-slot/{main.html => main.svelte} (78%) rename test/runtime/samples/dynamic-component-update-existing-instance/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/dynamic-component-update-existing-instance/{Foo.html => Foo.svelte} (100%) delete mode 100644 test/runtime/samples/dynamic-component-update-existing-instance/main.html create mode 100644 test/runtime/samples/dynamic-component-update-existing-instance/main.svelte rename test/runtime/samples/dynamic-component/{Bar.html => Bar.svelte} (100%) rename test/runtime/samples/dynamic-component/{Foo.html => Foo.svelte} (100%) delete mode 100644 test/runtime/samples/dynamic-component/main.html create mode 100644 test/runtime/samples/dynamic-component/main.svelte rename test/runtime/samples/each-block-array-literal/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-containing-component-in-if/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/each-block-containing-component-in-if/{main.html => main.svelte} (67%) rename test/runtime/samples/each-block-containing-if/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-deconflict-name-context/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-destructured-array-sparse/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-destructured-array/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-destructured-object-binding/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-destructured-object/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-dynamic-else-static/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-else-mount-or-intro/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/each-block-else-mount-or-intro/{main.html => main.svelte} (73%) rename test/runtime/samples/each-block-else-starts-empty/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-else/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-empty-outro/{Thing.html => Thing.svelte} (100%) rename test/runtime/samples/each-block-empty-outro/{main.html => main.svelte} (79%) rename test/runtime/samples/each-block-function/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-in-if-block/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-index-only/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-indexed/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-keyed-dynamic/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-keyed-empty/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-keyed-non-prop/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-keyed-random-permute/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-keyed-siblings/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-keyed-static/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-keyed-unshift/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/each-block-keyed-unshift/{main.html => main.svelte} (70%) rename test/runtime/samples/each-block-keyed/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-random-permute/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-scope-shadow/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-static/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block-text-node/{main.html => main.svelte} (100%) rename test/runtime/samples/each-block/{main.html => main.svelte} (100%) rename test/runtime/samples/each-blocks-expression/{main.html => main.svelte} (100%) rename test/runtime/samples/each-blocks-nested-b/{main.html => main.svelte} (100%) rename test/runtime/samples/each-blocks-nested/{main.html => main.svelte} (100%) rename test/runtime/samples/element-invalid-name/{main.html => main.svelte} (100%) rename test/runtime/samples/element-source-location/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/element-source-location/{main.html => main.svelte} (54%) rename test/runtime/samples/empty-style-block/{main.html => main.svelte} (100%) rename test/runtime/samples/escape-template-literals/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/escape-template-literals/{main.html => main.svelte} (75%) rename test/runtime/samples/escaped-text/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-console-log/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-deconflicted/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-each-context/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-each-deconflicted/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-each-this/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-each/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-event-methods/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-hoisted/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-modifier-once/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-modifier-prevent-default/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-modifier-stop-propagation/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-removal/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-sanitize/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler-shorthand-component/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/event-handler-shorthand-component/main.html create mode 100644 test/runtime/samples/event-handler-shorthand-component/main.svelte rename test/runtime/samples/event-handler-shorthand-dynamic-component/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/event-handler-shorthand-dynamic-component/{main.html => main.svelte} (61%) rename test/runtime/samples/event-handler-this-methods/{main.html => main.svelte} (100%) rename test/runtime/samples/event-handler/{main.html => main.svelte} (100%) rename test/runtime/samples/flush-before-bindings/{Nested.html => Nested.svelte} (87%) rename test/runtime/samples/flush-before-bindings/{Visibility.html => Visibility.svelte} (100%) rename test/runtime/samples/flush-before-bindings/{main.html => main.svelte} (73%) rename test/runtime/samples/function-in-expression/{main.html => main.svelte} (100%) rename test/runtime/samples/get-after-destroy/{main.html => main.svelte} (100%) rename test/runtime/samples/globals-accessible-directly-process/{main.html => main.svelte} (100%) rename test/runtime/samples/globals-accessible-directly/{main.html => main.svelte} (100%) rename test/runtime/samples/globals-not-dereferenced/{main.html => main.svelte} (100%) rename test/runtime/samples/globals-not-overwritten-by-bindings/{main.html => main.svelte} (100%) rename test/runtime/samples/globals-shadowed-by-data/{main.html => main.svelte} (100%) rename test/runtime/samples/globals-shadowed-by-helpers/{main.html => main.svelte} (100%) rename test/runtime/samples/hash-in-attribute/{main.html => main.svelte} (100%) rename test/runtime/samples/head-if-block/{main.html => main.svelte} (100%) rename test/runtime/samples/head-title-dynamic-simple/{main.html => main.svelte} (100%) rename test/runtime/samples/head-title-dynamic/{main.html => main.svelte} (100%) rename test/runtime/samples/head-title-static/{main.html => main.svelte} (100%) rename test/runtime/samples/hello-world/{main.html => main.svelte} (100%) rename test/runtime/samples/helpers-not-call-expression/{main.html => main.svelte} (100%) rename test/runtime/samples/helpers/{main.html => main.svelte} (100%) rename test/runtime/samples/html-entities-inside-elements/{main.html => main.svelte} (100%) rename test/runtime/samples/html-entities/{main.html => main.svelte} (100%) rename test/runtime/samples/html-non-entities-inside-elements/{main.html => main.svelte} (100%) rename test/runtime/samples/if-block-component-without-outro/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/if-block-component-without-outro/{main.html => main.svelte} (57%) rename test/runtime/samples/if-block-else-in-each/{main.html => main.svelte} (100%) rename test/runtime/samples/if-block-else-partial-outro/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/if-block-else-partial-outro/{main.html => main.svelte} (73%) rename test/runtime/samples/if-block-else/{main.html => main.svelte} (100%) rename test/runtime/samples/if-block-elseif-no-else/{main.html => main.svelte} (100%) rename test/runtime/samples/if-block-elseif-text/{main.html => main.svelte} (100%) rename test/runtime/samples/if-block-elseif/{main.html => main.svelte} (100%) rename test/runtime/samples/if-block-expression/{main.html => main.svelte} (100%) rename test/runtime/samples/if-block-first/{main.html => main.svelte} (100%) rename test/runtime/samples/if-block-no-outro-else-with-outro/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/if-block-no-outro-else-with-outro/{main.html => main.svelte} (77%) rename test/runtime/samples/if-block-or/{main.html => main.svelte} (100%) rename test/runtime/samples/if-block-outro-nested-else/{Component.html => Component.svelte} (100%) rename test/runtime/samples/if-block-outro-nested-else/{main.html => main.svelte} (73%) rename test/runtime/samples/if-block-outro-unique-select-block-type/{Component.html => Component.svelte} (100%) rename test/runtime/samples/if-block-outro-unique-select-block-type/{main.html => main.svelte} (76%) rename test/runtime/samples/if-block-widget/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/if-block-widget/{main.html => main.svelte} (69%) rename test/runtime/samples/if-block/{main.html => main.svelte} (100%) rename test/runtime/samples/if-in-keyed-each/{main.html => main.svelte} (100%) rename test/runtime/samples/ignore-unchanged-attribute-compound/{main.html => main.svelte} (100%) rename test/runtime/samples/ignore-unchanged-attribute/{main.html => main.svelte} (100%) rename test/runtime/samples/ignore-unchanged-raw/{main.html => main.svelte} (100%) rename test/runtime/samples/ignore-unchanged-tag/{main.html => main.svelte} (100%) rename test/runtime/samples/immutable-nested/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/immutable-nested/{main.html => main.svelte} (68%) rename test/runtime/samples/immutable-option/{main.html => main.svelte} (100%) rename test/runtime/samples/immutable-svelte-meta-false/{main.html => main.svelte} (100%) rename test/runtime/samples/immutable-svelte-meta/{main.html => main.svelte} (100%) rename test/runtime/samples/imported-renamed-components/{ComponentOne.html => ComponentOne.svelte} (100%) rename test/runtime/samples/imported-renamed-components/{ComponentTwo.html => ComponentTwo.svelte} (100%) rename test/runtime/samples/imported-renamed-components/{main.html => main.svelte} (59%) rename test/runtime/samples/initial-state-assign/{main.html => main.svelte} (100%) rename test/runtime/samples/inline-expressions/{main.html => main.svelte} (100%) rename test/runtime/samples/input-list/{main.html => main.svelte} (100%) rename test/runtime/samples/instrumentation-script-destructuring/{main.html => main.svelte} (100%) rename test/runtime/samples/instrumentation-script-loop-scope/{main.html => main.svelte} (100%) rename test/runtime/samples/instrumentation-script-multiple-assignments/{main.html => main.svelte} (100%) rename test/runtime/samples/instrumentation-script-update/{main.html => main.svelte} (100%) rename test/runtime/samples/instrumentation-template-destructuring/{main.html => main.svelte} (100%) rename test/runtime/samples/instrumentation-template-loop-scope/{main.html => main.svelte} (100%) rename test/runtime/samples/instrumentation-template-multiple-assignments/{main.html => main.svelte} (100%) rename test/runtime/samples/instrumentation-template-update/{main.html => main.svelte} (100%) rename test/runtime/samples/internal-state/{Foo.html => Foo.svelte} (100%) delete mode 100644 test/runtime/samples/internal-state/main.html create mode 100644 test/runtime/samples/internal-state/main.svelte rename test/runtime/samples/lifecycle-events/{main.html => main.svelte} (100%) rename test/runtime/samples/lifecycle-next-tick/{main.html => main.svelte} (100%) rename test/runtime/samples/lifecycle-render-order/{main.html => main.svelte} (100%) rename test/runtime/samples/module-context-with-instance-script/{main.html => main.svelte} (100%) rename test/runtime/samples/module-context/{main.html => main.svelte} (100%) rename test/runtime/samples/mutation-tracking-across-sibling-scopes/{main.html => main.svelte} (100%) rename test/runtime/samples/names-deconflicted-nested/{main.html => main.svelte} (100%) rename test/runtime/samples/names-deconflicted/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/names-deconflicted/{main.html => main.svelte} (82%) rename test/runtime/samples/nbsp/{main.html => main.svelte} (100%) rename test/runtime/samples/nested-transition-detach-each/{main.html => main.svelte} (100%) rename test/runtime/samples/nested-transition-detach-if-false/{Folder.html => Folder.svelte} (100%) delete mode 100644 test/runtime/samples/nested-transition-detach-if-false/main.html create mode 100644 test/runtime/samples/nested-transition-detach-if-false/main.svelte rename test/runtime/samples/nested-transition-if-block-not-remounted/{Span.html => Span.svelte} (100%) rename test/runtime/samples/nested-transition-if-block-not-remounted/{main.html => main.svelte} (75%) rename test/runtime/samples/noscript-removal/{main.html => main.svelte} (100%) rename test/runtime/samples/ondestroy-before-cleanup/{Top.html => Top.svelte} (100%) rename test/runtime/samples/ondestroy-before-cleanup/{main.html => main.svelte} (74%) rename test/runtime/samples/onmount-async/{main.html => main.svelte} (100%) rename test/runtime/samples/onmount-fires-when-ready-nested/{ParentWidget.html => ParentWidget.svelte} (64%) rename test/runtime/samples/onmount-fires-when-ready-nested/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/onmount-fires-when-ready-nested/main.html create mode 100644 test/runtime/samples/onmount-fires-when-ready-nested/main.svelte rename test/runtime/samples/onmount-fires-when-ready/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/onmount-fires-when-ready/{main.html => main.svelte} (70%) rename test/runtime/samples/onmount-sibling-order/{Nested.html => Nested.svelte} (100%) delete mode 100644 test/runtime/samples/onmount-sibling-order/main.html create mode 100644 test/runtime/samples/onmount-sibling-order/main.svelte rename test/runtime/samples/option-without-select/{main.html => main.svelte} (100%) rename test/runtime/samples/paren-wrapped-expressions/{main.html => main.svelte} (100%) rename test/runtime/samples/preload/{main.html => main.svelte} (100%) rename test/runtime/samples/prop-not-action/{Nested.html => Nested.svelte} (100%) delete mode 100644 test/runtime/samples/prop-not-action/main.html create mode 100644 test/runtime/samples/prop-not-action/main.svelte rename test/runtime/samples/prop-without-semicolon-b/{main.html => main.svelte} (100%) rename test/runtime/samples/prop-without-semicolon/{main.html => main.svelte} (100%) rename test/runtime/samples/raw-anchor-first-child/{main.html => main.svelte} (100%) rename test/runtime/samples/raw-anchor-first-last-child/{main.html => main.svelte} (100%) rename test/runtime/samples/raw-anchor-last-child/{main.html => main.svelte} (100%) rename test/runtime/samples/raw-anchor-next-previous-sibling/{main.html => main.svelte} (100%) rename test/runtime/samples/raw-anchor-next-sibling/{main.html => main.svelte} (100%) rename test/runtime/samples/raw-anchor-previous-sibling/{main.html => main.svelte} (100%) rename test/runtime/samples/raw-mustaches-preserved/{main.html => main.svelte} (100%) rename test/runtime/samples/raw-mustaches/{main.html => main.svelte} (100%) rename test/runtime/samples/reactive-function/{main.html => main.svelte} (100%) rename test/runtime/samples/reactive-values-deconflicted/{main.html => main.svelte} (100%) rename test/runtime/samples/reactive-values-function-dependency/{main.html => main.svelte} (100%) rename test/runtime/samples/reactive-values-implicit/{main.html => main.svelte} (100%) rename test/runtime/samples/reactive-values-non-cyclical/{main.html => main.svelte} (100%) rename test/runtime/samples/reactive-values-readonly/{main.html => main.svelte} (100%) rename test/runtime/samples/reactive-values-second-order/{main.html => main.svelte} (100%) rename test/runtime/samples/reactive-values-self-dependency/{main.html => main.svelte} (100%) rename test/runtime/samples/reactive-values/{main.html => main.svelte} (100%) rename test/runtime/samples/script-style-non-top-level/{main.html => main.svelte} (100%) rename test/runtime/samples/select-bind-array/{main.html => main.svelte} (100%) rename test/runtime/samples/select-bind-in-array/{main.html => main.svelte} (100%) rename test/runtime/samples/select-change-handler/{main.html => main.svelte} (100%) rename test/runtime/samples/select-no-whitespace/{main.html => main.svelte} (100%) rename test/runtime/samples/select-one-way-bind-object/{main.html => main.svelte} (100%) rename test/runtime/samples/select-one-way-bind/{main.html => main.svelte} (100%) rename test/runtime/samples/select-props/{main.html => main.svelte} (100%) rename test/runtime/samples/select/{main.html => main.svelte} (100%) rename test/runtime/samples/self-reference-tree/{main.html => main.svelte} (100%) rename test/runtime/samples/self-reference/{main.html => main.svelte} (100%) rename test/runtime/samples/set-after-destroy/{main.html => main.svelte} (100%) rename test/runtime/samples/set-in-oncreate/{main.html => main.svelte} (100%) rename test/runtime/samples/set-in-onstate-dedupes-renders/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/set-in-onstate-dedupes-renders/{main.html => main.svelte} (83%) rename test/runtime/samples/set-in-onstate/{main.html => main.svelte} (100%) rename test/runtime/samples/set-null-text-node/{main.html => main.svelte} (100%) rename test/runtime/samples/set-prevents-loop/{Foo.html => Foo.svelte} (100%) rename test/runtime/samples/set-prevents-loop/{main.html => main.svelte} (81%) rename test/runtime/samples/set-undefined-attr/{main.html => main.svelte} (100%) rename test/runtime/samples/sigil-component-attribute/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/sigil-component-attribute/{main.html => main.svelte} (65%) rename test/runtime/samples/sigil-static-#/{main.html => main.svelte} (100%) rename test/runtime/samples/sigil-static-@/{main.html => main.svelte} (100%) rename test/runtime/samples/single-static-element/{main.html => main.svelte} (100%) rename test/runtime/samples/single-text-node/{main.html => main.svelte} (100%) rename test/runtime/samples/slot-in-custom-element/{main.html => main.svelte} (100%) rename test/runtime/samples/spread-component-dynamic-undefined/{main.html => main.svelte} (100%) rename test/runtime/samples/spread-component-dynamic/{Foo.html => Foo.svelte} (100%) delete mode 100644 test/runtime/samples/spread-component-dynamic/main.html create mode 100644 test/runtime/samples/spread-component-dynamic/main.svelte rename test/runtime/samples/spread-component-multiple-dependencies/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/spread-component-multiple-dependencies/{main.html => main.svelte} (80%) rename test/runtime/samples/spread-component-with-bind/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/spread-component-with-bind/main.html create mode 100644 test/runtime/samples/spread-component-with-bind/main.svelte rename test/runtime/samples/spread-component/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/spread-component/{main.html => main.svelte} (69%) rename test/runtime/samples/spread-each-component/{Nested.html => Nested.svelte} (100%) rename test/runtime/samples/spread-each-component/{main.html => main.svelte} (65%) rename test/runtime/samples/spread-each-element/{main.html => main.svelte} (100%) rename test/runtime/samples/spread-element-boolean/{main.html => main.svelte} (100%) rename test/runtime/samples/spread-element-input/{main.html => main.svelte} (100%) rename test/runtime/samples/spread-element-multiple-dependencies/{main.html => main.svelte} (100%) rename test/runtime/samples/spread-element-multiple/{main.html => main.svelte} (100%) rename test/runtime/samples/spread-element/{main.html => main.svelte} (100%) rename test/runtime/samples/spread-own-props/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/spread-own-props/{main.html => main.svelte} (73%) rename test/runtime/samples/state-deconflicted/{main.html => main.svelte} (100%) rename test/runtime/samples/store-auto-subscribe-implicit/{main.html => main.svelte} (100%) rename test/runtime/samples/store-auto-subscribe-in-each/{main.html => main.svelte} (100%) rename test/runtime/samples/store-auto-subscribe-in-reactive-declaration/{main.html => main.svelte} (100%) rename test/runtime/samples/store-auto-subscribe-in-script/{main.html => main.svelte} (100%) rename test/runtime/samples/store-auto-subscribe/{main.html => main.svelte} (100%) rename test/runtime/samples/store-dev-mode-error/{main.html => main.svelte} (100%) rename test/runtime/samples/store-prevent-user-declarations/{main.html => main.svelte} (100%) rename test/runtime/samples/svg-attributes/{main.html => main.svelte} (100%) rename test/runtime/samples/svg-child-component-declared-namespace-shorthand/{Rect.html => Rect.svelte} (100%) rename test/runtime/samples/{svg-child-component-declared-namespace/main.html => svg-child-component-declared-namespace-shorthand/main.svelte} (82%) rename test/runtime/samples/svg-child-component-declared-namespace/{Rect.html => Rect.svelte} (100%) rename test/runtime/samples/{svg-child-component-declared-namespace-shorthand/main.html => svg-child-component-declared-namespace/main.svelte} (82%) rename test/runtime/samples/svg-class/{main.html => main.svelte} (100%) rename test/runtime/samples/svg-each-block-anchor/{main.html => main.svelte} (100%) rename test/runtime/samples/svg-each-block-namespace/{main.html => main.svelte} (100%) rename test/runtime/samples/svg-multiple/{main.html => main.svelte} (100%) rename test/runtime/samples/svg-no-whitespace/{main.html => main.svelte} (100%) rename test/runtime/samples/svg-with-style/{main.html => main.svelte} (100%) rename test/runtime/samples/svg-xlink/{main.html => main.svelte} (100%) rename test/runtime/samples/svg-xmlns/{main.html => main.svelte} (100%) rename test/runtime/samples/svg/{main.html => main.svelte} (100%) rename test/runtime/samples/template/{main.html => main.svelte} (100%) rename test/runtime/samples/textarea-children/{main.html => main.svelte} (100%) rename test/runtime/samples/textarea-value/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-css-deferred-removal/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-css-duration/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-css-in-out-in/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-aborted-outro-in-each/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-aborted-outro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-args/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-await-block/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-context/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-deferred/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-delay-in-out/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-delay/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-destroyed-before-end/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-dynamic-component/{A.html => A.svelte} (100%) rename test/runtime/samples/transition-js-dynamic-component/{B.html => B.svelte} (100%) delete mode 100644 test/runtime/samples/transition-js-dynamic-component/main.html create mode 100644 test/runtime/samples/transition-js-dynamic-component/main.svelte rename test/runtime/samples/transition-js-dynamic-if-block-bidi/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-each-block-intro-outro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-each-block-intro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-each-block-keyed-intro-outro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-each-block-keyed-intro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-each-block-keyed-outro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-each-block-outro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-each-keyed-unchanged/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-each-unchanged/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-events/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-block-bidi/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-block-in-each-block-bidi/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-block-intro-outro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-block-intro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-block-outro-timeout/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-else-block-dynamic-outro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-else-block-intro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-else-block-outro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-if-elseif-block-outro/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-initial/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-intro-enabled-by-option/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-intro-skipped-by-default-nested/{Widget.html => Widget.svelte} (100%) delete mode 100644 test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.html create mode 100644 test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.svelte rename test/runtime/samples/transition-js-intro-skipped-by-default/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-local-and-global/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-local-nested-await/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-local-nested-component/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/transition-js-local-nested-component/{main.html => main.svelte} (55%) rename test/runtime/samples/transition-js-local-nested-each-keyed/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-local-nested-each/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-local-nested-if/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-local/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-nested-await/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-nested-component/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/transition-js-nested-component/{main.html => main.svelte} (55%) rename test/runtime/samples/transition-js-nested-each-delete/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-nested-each-keyed-2/{Widget.html => Widget.svelte} (100%) rename test/runtime/samples/transition-js-nested-each-keyed-2/{main.html => main.svelte} (65%) rename test/runtime/samples/transition-js-nested-each-keyed/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-nested-each/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-nested-if/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-nested-intro/{Child.html => Child.svelte} (100%) rename test/runtime/samples/transition-js-nested-intro/{main.html => main.svelte} (65%) rename test/runtime/samples/transition-js-parameterised-with-state/{main.html => main.svelte} (100%) rename test/runtime/samples/transition-js-parameterised/{main.html => main.svelte} (100%) rename test/runtime/samples/whitespace-each-block/{main.html => main.svelte} (100%) rename test/runtime/samples/whitespace-list/{main.html => main.svelte} (100%) rename test/runtime/samples/whitespace-normal/{main.html => main.svelte} (100%) rename test/runtime/samples/window-bind-scroll-update/{main.html => main.svelte} (100%) rename test/runtime/samples/window-binding-multiple-handlers/{main.html => main.svelte} (100%) rename test/runtime/samples/window-binding-resize/{main.html => main.svelte} (100%) rename test/runtime/samples/window-event-context/{main.html => main.svelte} (100%) rename test/runtime/samples/window-event-custom/{main.html => main.svelte} (100%) rename test/runtime/samples/window-event/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/attribute-boolean/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/attribute-boolean/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/attribute-dynamic/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/attribute-dynamic/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/attribute-escaped-quotes-spread/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/attribute-escaped-quotes-spread/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/attribute-escaped-quotes/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/attribute-escaped-quotes/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/attribute-static/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/attribute-static/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/bindings/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/bindings/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/comment/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/comment/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/component-binding-renamed/{Foo.html => Foo.svelte} (100%) rename test/server-side-rendering/samples/component-binding-renamed/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/component-binding-renamed/{main.html => main.svelte} (69%) rename test/server-side-rendering/samples/component-binding/{Foo.html => Foo.svelte} (100%) rename test/server-side-rendering/samples/component-binding/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/component-binding/{main.html => main.svelte} (62%) rename test/server-side-rendering/samples/component-data-dynamic/{Widget.html => Widget.svelte} (100%) rename test/server-side-rendering/samples/component-data-dynamic/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/component-data-dynamic/{main.html => main.svelte} (83%) rename test/server-side-rendering/samples/component-data-empty/{Widget.html => Widget.svelte} (100%) rename test/server-side-rendering/samples/component-data-empty/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/component-data-empty/{main.html => main.svelte} (56%) rename test/server-side-rendering/samples/component-refs-and-attributes/{Widget.html => Widget.svelte} (100%) rename test/server-side-rendering/samples/component-refs-and-attributes/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/component-refs-and-attributes/{main.html => main.svelte} (74%) rename test/server-side-rendering/samples/component-refs/{Widget.html => Widget.svelte} (100%) rename test/server-side-rendering/samples/component-refs/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/component-refs/{main.html => main.svelte} (67%) rename test/server-side-rendering/samples/component-with-different-extension/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/component-yield/{Widget.html => Widget.svelte} (100%) rename test/server-side-rendering/samples/component-yield/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/component-yield/{main.html => main.svelte} (69%) rename test/server-side-rendering/samples/component/{Widget.html => Widget.svelte} (100%) rename test/server-side-rendering/samples/component/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/component/{main.html => main.svelte} (53%) rename test/server-side-rendering/samples/computed/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/computed/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/default-data-override/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/default-data-override/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/default-data/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/default-data/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/directives/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/directives/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/dynamic-text-escaped/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/dynamic-text-escaped/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/dynamic-text/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/dynamic-text/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/each-block/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/each-block/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/empty-elements-closed/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/empty-elements-closed/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/entities/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/entities/{main.html => main.svelte} (100%) delete mode 100644 test/server-side-rendering/samples/head-title/_expected-head.html rename test/server-side-rendering/samples/head-title/{_actual-head.html => _expected-head.svelte} (100%) rename test/server-side-rendering/samples/head-title/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/head-title/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/helpers/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/helpers/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/if-block-false/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/if-block-false/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/if-block-true/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/if-block-true/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/import-non-component/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/import-non-component/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/raw-mustaches/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/raw-mustaches/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/sanitize-name/{[foo].html => [foo].svelte} (100%) rename test/server-side-rendering/samples/sanitize-name/{_expected.html => _expected.svelte} (100%) delete mode 100644 test/server-side-rendering/samples/sanitize-name/main.html create mode 100644 test/server-side-rendering/samples/sanitize-name/main.svelte rename test/server-side-rendering/samples/static-div/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/static-div/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/static-text/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/static-text/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/styles-nested/{One.html => One.svelte} (84%) rename test/server-side-rendering/samples/styles-nested/{Two.html => Two.svelte} (100%) rename test/server-side-rendering/samples/styles-nested/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/styles-nested/{main.html => main.svelte} (78%) rename test/server-side-rendering/samples/styles/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/styles/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/textarea-children/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/textarea-children/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/textarea-value/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/textarea-value/{main.html => main.svelte} (100%) rename test/server-side-rendering/samples/triple/{_expected.html => _expected.svelte} (100%) rename test/server-side-rendering/samples/triple/{main.html => main.svelte} (100%) rename test/sourcemaps/samples/basic/{input.html => input.svelte} (100%) rename test/sourcemaps/samples/binding-shorthand.skip/{input.html => input.svelte} (100%) rename test/sourcemaps/samples/binding/{input.html => input.svelte} (100%) rename test/sourcemaps/samples/css/{input.html => input.svelte} (100%) rename test/sourcemaps/samples/each-block/{input.html => input.svelte} (100%) rename test/sourcemaps/samples/script/{input.html => input.svelte} (100%) rename test/sourcemaps/samples/static-no-script/{input.html => input.svelte} (100%) rename test/stats/samples/basic/{input.html => input.svelte} (100%) rename test/stats/samples/duplicate-globals/{input.html => input.svelte} (100%) rename test/stats/samples/duplicate-non-hoistable/{input.html => input.svelte} (100%) rename test/stats/samples/duplicate-vars/{input.html => input.svelte} (100%) rename test/stats/samples/implicit-action/{input.html => input.svelte} (100%) rename test/stats/samples/implicit-reactive/{input.html => input.svelte} (100%) rename test/stats/samples/implicit/{input.html => input.svelte} (100%) rename test/stats/samples/imports/{input.html => input.svelte} (100%) rename test/stats/samples/mutated-vs-reassigned-bindings/{input.html => input.svelte} (100%) rename test/stats/samples/mutated-vs-reassigned/{input.html => input.svelte} (100%) rename test/stats/samples/props/{input.html => input.svelte} (100%) rename test/stats/samples/store-referenced/{input.html => input.svelte} (100%) rename test/stats/samples/store-unreferenced/{input.html => input.svelte} (100%) rename test/stats/samples/template-references/{input.html => input.svelte} (100%) rename test/stats/samples/undeclared/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-alt-text/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-anchor-has-content/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-anchor-in-svg-is-valid/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-anchor-is-valid/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-aria-props/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-aria-role/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-aria-unsupported-element/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-figcaption-right-place/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-figcaption-wrong-place/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-heading-has-content/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-html-has-lang/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-iframe-has-title/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-no-access-key/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-no-autofocus/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-no-distracting-elements/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-not-on-components/{input.html => input.svelte} (64%) rename test/validator/samples/a11y-scope/{input.html => input.svelte} (100%) rename test/validator/samples/a11y-tabindex-no-positive/{input.html => input.svelte} (100%) rename test/validator/samples/action-invalid/{input.html => input.svelte} (100%) delete mode 100644 test/validator/samples/action-on-component/input.html create mode 100644 test/validator/samples/action-on-component/input.svelte rename test/validator/samples/animation-duplicate/{input.html => input.svelte} (100%) rename test/validator/samples/animation-missing/{input.html => input.svelte} (100%) rename test/validator/samples/animation-not-in-each/{input.html => input.svelte} (100%) rename test/validator/samples/animation-not-in-keyed-each/{input.html => input.svelte} (100%) rename test/validator/samples/animation-siblings/{input.html => input.svelte} (100%) rename test/validator/samples/await-component-is-used/{input.html => input.svelte} (77%) rename test/validator/samples/binding-dimensions-svg-child/{input.html => input.svelte} (100%) rename test/validator/samples/binding-dimensions-svg/{input.html => input.svelte} (100%) rename test/validator/samples/binding-dimensions-void/{input.html => input.svelte} (100%) rename test/validator/samples/binding-input-checked/{input.html => input.svelte} (100%) rename test/validator/samples/binding-input-type-boolean/{input.html => input.svelte} (100%) rename test/validator/samples/binding-input-type-dynamic/{input.html => input.svelte} (100%) rename test/validator/samples/binding-invalid-on-element/{input.html => input.svelte} (100%) rename test/validator/samples/binding-invalid-value/{input.html => input.svelte} (100%) rename test/validator/samples/binding-invalid/{input.html => input.svelte} (100%) rename test/validator/samples/binding-select-multiple-dynamic/{input.html => input.svelte} (100%) rename test/validator/samples/component-slot-default-duplicate.skip/{input.html => input.svelte} (100%) rename test/validator/samples/component-slot-default-reserved/{input.html => input.svelte} (100%) rename test/validator/samples/component-slot-dynamic-attribute/{input.html => input.svelte} (58%) rename test/validator/samples/component-slot-dynamic/{input.html => input.svelte} (100%) rename test/validator/samples/component-slot-named-duplicate.skip/{input.html => input.svelte} (100%) rename test/validator/samples/component-slotted-each-block/{input.html => input.svelte} (66%) rename test/validator/samples/component-slotted-if-block/{input.html => input.svelte} (62%) rename test/validator/samples/css-invalid-global-placement/{input.html => input.svelte} (100%) rename test/validator/samples/css-invalid-global/{input.html => input.svelte} (100%) rename test/validator/samples/debug-invalid-args/{input.html => input.svelte} (100%) rename test/validator/samples/default-export/{input.html => input.svelte} (100%) rename test/validator/samples/directive-non-expression/{input.html => input.svelte} (100%) rename test/validator/samples/each-block-invalid-context-destructured/{input.html => input.svelte} (100%) rename test/validator/samples/each-block-invalid-context/{input.html => input.svelte} (100%) rename test/validator/samples/each-block-multiple-children/{input.html => input.svelte} (100%) rename test/validator/samples/empty-block-dev/{input.html => input.svelte} (100%) rename test/validator/samples/empty-block-prod/{input.html => input.svelte} (100%) rename test/validator/samples/event-modifiers-invalid-passive/{input.html => input.svelte} (100%) rename test/validator/samples/event-modifiers-invalid/{input.html => input.svelte} (100%) rename test/validator/samples/event-modifiers-legacy/{input.html => input.svelte} (100%) rename test/validator/samples/event-modifiers-redundant/{input.html => input.svelte} (100%) rename test/validator/samples/missing-component/{input.html => input.svelte} (100%) rename test/validator/samples/multiple-script-default-context/{input.html => input.svelte} (100%) rename test/validator/samples/multiple-script-module-context/{input.html => input.svelte} (100%) rename test/validator/samples/namespace-invalid-unguessable/{input.html => input.svelte} (100%) rename test/validator/samples/namespace-invalid/{input.html => input.svelte} (100%) rename test/validator/samples/namespace-non-literal/{input.html => input.svelte} (100%) rename test/validator/samples/non-empty-block-dev/{input.html => input.svelte} (100%) rename test/validator/samples/prop-slot/{input.html => input.svelte} (51%) rename test/validator/samples/reactive-declaration-cyclical/{input.html => input.svelte} (100%) rename test/validator/samples/ref-not-supported-in-css/{input.html => input.svelte} (100%) rename test/validator/samples/ref-not-supported/{input.html => input.svelte} (100%) rename test/validator/samples/script-invalid-context/{input.html => input.svelte} (100%) rename test/validator/samples/select-multiple/{input.html => input.svelte} (100%) rename test/validator/samples/slot-attribute-invalid/{input.html => input.svelte} (100%) rename test/validator/samples/svg-child-component-declared-namespace/{input.html => input.svelte} (100%) rename test/validator/samples/svg-child-component-undeclared-namespace/{input.html => input.svelte} (100%) rename test/validator/samples/tag-invalid/{input.html => input.svelte} (100%) rename test/validator/samples/tag-non-string/{input.html => input.svelte} (100%) rename test/validator/samples/textarea-value-children/{input.html => input.svelte} (100%) rename test/validator/samples/title-no-attributes/{input.html => input.svelte} (100%) rename test/validator/samples/title-no-children/{input.html => input.svelte} (100%) rename test/validator/samples/transition-duplicate-in-transition/{input.html => input.svelte} (100%) rename test/validator/samples/transition-duplicate-in/{input.html => input.svelte} (100%) rename test/validator/samples/transition-duplicate-out-transition/{input.html => input.svelte} (100%) rename test/validator/samples/transition-duplicate-out/{input.html => input.svelte} (100%) rename test/validator/samples/transition-duplicate-transition-in/{input.html => input.svelte} (100%) rename test/validator/samples/transition-duplicate-transition-out/{input.html => input.svelte} (100%) rename test/validator/samples/transition-duplicate-transition/{input.html => input.svelte} (100%) rename test/validator/samples/transition-missing/{input.html => input.svelte} (100%) delete mode 100644 test/validator/samples/transition-on-component/input.html create mode 100644 test/validator/samples/transition-on-component/input.svelte rename test/validator/samples/undefined-value/{input.html => input.svelte} (100%) rename test/validator/samples/window-binding-invalid-innerwidth/{input.html => input.svelte} (100%) rename test/validator/samples/window-binding-invalid-value/{input.html => input.svelte} (100%) rename test/validator/samples/window-binding-invalid-width/{input.html => input.svelte} (100%) rename test/validator/samples/window-binding-invalid/{input.html => input.svelte} (100%) rename test/validator/samples/window-binding-online/{input.html => input.svelte} (100%) diff --git a/test/cli/samples/basic/src/Main.html b/test/cli/samples/basic/src/Main.svelte similarity index 100% rename from test/cli/samples/basic/src/Main.html rename to test/cli/samples/basic/src/Main.svelte diff --git a/test/cli/samples/custom-element/src/Main.html b/test/cli/samples/custom-element/src/Main.svelte similarity index 100% rename from test/cli/samples/custom-element/src/Main.html rename to test/cli/samples/custom-element/src/Main.svelte diff --git a/test/cli/samples/dev/src/Main.html b/test/cli/samples/dev/src/Main.svelte similarity index 100% rename from test/cli/samples/dev/src/Main.html rename to test/cli/samples/dev/src/Main.svelte diff --git a/test/cli/samples/dir-sourcemap/src/Main.html b/test/cli/samples/dir-sourcemap/src/Main.html deleted file mode 100644 index cbcde3f1ed..0000000000 --- a/test/cli/samples/dir-sourcemap/src/Main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/cli/samples/dir-sourcemap/src/Main.svelte b/test/cli/samples/dir-sourcemap/src/Main.svelte new file mode 100644 index 0000000000..0a9d5bba87 --- /dev/null +++ b/test/cli/samples/dir-sourcemap/src/Main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/cli/samples/dir-sourcemap/src/Widget.html b/test/cli/samples/dir-sourcemap/src/Widget.svelte similarity index 100% rename from test/cli/samples/dir-sourcemap/src/Widget.html rename to test/cli/samples/dir-sourcemap/src/Widget.svelte diff --git a/test/cli/samples/dir-subdir/src/Main.html b/test/cli/samples/dir-subdir/src/Main.html deleted file mode 100644 index 89391562d5..0000000000 --- a/test/cli/samples/dir-subdir/src/Main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/cli/samples/dir-subdir/src/Main.svelte b/test/cli/samples/dir-subdir/src/Main.svelte new file mode 100644 index 0000000000..ac663b4338 --- /dev/null +++ b/test/cli/samples/dir-subdir/src/Main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/cli/samples/dir-subdir/src/widget/Widget.html b/test/cli/samples/dir-subdir/src/widget/Widget.svelte similarity index 100% rename from test/cli/samples/dir-subdir/src/widget/Widget.html rename to test/cli/samples/dir-subdir/src/widget/Widget.svelte diff --git a/test/cli/samples/dir/src/Main.html b/test/cli/samples/dir/src/Main.html deleted file mode 100644 index cbcde3f1ed..0000000000 --- a/test/cli/samples/dir/src/Main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/cli/samples/dir/src/Main.svelte b/test/cli/samples/dir/src/Main.svelte new file mode 100644 index 0000000000..0a9d5bba87 --- /dev/null +++ b/test/cli/samples/dir/src/Main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/cli/samples/dir/src/Widget.html b/test/cli/samples/dir/src/Widget.svelte similarity index 100% rename from test/cli/samples/dir/src/Widget.html rename to test/cli/samples/dir/src/Widget.svelte diff --git a/test/cli/samples/globals/src/Main.html b/test/cli/samples/globals/src/Main.svelte similarity index 100% rename from test/cli/samples/globals/src/Main.html rename to test/cli/samples/globals/src/Main.svelte diff --git a/test/cli/samples/sourcemap-inline/src/Main.html b/test/cli/samples/sourcemap-inline/src/Main.svelte similarity index 100% rename from test/cli/samples/sourcemap-inline/src/Main.html rename to test/cli/samples/sourcemap-inline/src/Main.svelte diff --git a/test/cli/samples/sourcemap/src/Main.html b/test/cli/samples/sourcemap/src/Main.svelte similarity index 100% rename from test/cli/samples/sourcemap/src/Main.html rename to test/cli/samples/sourcemap/src/Main.svelte diff --git a/test/cli/samples/ssr/src/Main.html b/test/cli/samples/ssr/src/Main.svelte similarity index 100% rename from test/cli/samples/ssr/src/Main.html rename to test/cli/samples/ssr/src/Main.svelte diff --git a/test/cli/samples/store/src/Main.html b/test/cli/samples/store/src/Main.svelte similarity index 100% rename from test/cli/samples/store/src/Main.html rename to test/cli/samples/store/src/Main.svelte diff --git a/test/css/samples/attribute-selector-only-name/input.html b/test/css/samples/attribute-selector-only-name/input.svelte similarity index 100% rename from test/css/samples/attribute-selector-only-name/input.html rename to test/css/samples/attribute-selector-only-name/input.svelte diff --git a/test/css/samples/attribute-selector-unquoted/input.html b/test/css/samples/attribute-selector-unquoted/input.svelte similarity index 100% rename from test/css/samples/attribute-selector-unquoted/input.html rename to test/css/samples/attribute-selector-unquoted/input.svelte diff --git a/test/css/samples/basic/input.html b/test/css/samples/basic/input.svelte similarity index 100% rename from test/css/samples/basic/input.html rename to test/css/samples/basic/input.svelte diff --git a/test/css/samples/combinator-child/expected.html b/test/css/samples/combinator-child/expected.svelte similarity index 100% rename from test/css/samples/combinator-child/expected.html rename to test/css/samples/combinator-child/expected.svelte diff --git a/test/css/samples/combinator-child/input.html b/test/css/samples/combinator-child/input.svelte similarity index 100% rename from test/css/samples/combinator-child/input.html rename to test/css/samples/combinator-child/input.svelte diff --git a/test/css/samples/css-vars/input.html b/test/css/samples/css-vars/input.svelte similarity index 100% rename from test/css/samples/css-vars/input.html rename to test/css/samples/css-vars/input.svelte diff --git a/test/css/samples/descendant-selector-non-top-level-outer/expected.html b/test/css/samples/descendant-selector-non-top-level-outer/expected.svelte similarity index 100% rename from test/css/samples/descendant-selector-non-top-level-outer/expected.html rename to test/css/samples/descendant-selector-non-top-level-outer/expected.svelte diff --git a/test/css/samples/descendant-selector-non-top-level-outer/input.html b/test/css/samples/descendant-selector-non-top-level-outer/input.svelte similarity index 100% rename from test/css/samples/descendant-selector-non-top-level-outer/input.html rename to test/css/samples/descendant-selector-non-top-level-outer/input.svelte diff --git a/test/css/samples/empty-class/input.html b/test/css/samples/empty-class/input.svelte similarity index 100% rename from test/css/samples/empty-class/input.html rename to test/css/samples/empty-class/input.svelte diff --git a/test/css/samples/empty-rule-dev/input.html b/test/css/samples/empty-rule-dev/input.svelte similarity index 100% rename from test/css/samples/empty-rule-dev/input.html rename to test/css/samples/empty-rule-dev/input.svelte diff --git a/test/css/samples/empty-rule/input.html b/test/css/samples/empty-rule/input.svelte similarity index 100% rename from test/css/samples/empty-rule/input.html rename to test/css/samples/empty-rule/input.svelte diff --git a/test/css/samples/global-keyframes/input.html b/test/css/samples/global-keyframes/input.svelte similarity index 100% rename from test/css/samples/global-keyframes/input.html rename to test/css/samples/global-keyframes/input.svelte diff --git a/test/css/samples/global/input.html b/test/css/samples/global/input.svelte similarity index 100% rename from test/css/samples/global/input.html rename to test/css/samples/global/input.svelte diff --git a/test/css/samples/keyframes-autoprefixed/input.html b/test/css/samples/keyframes-autoprefixed/input.svelte similarity index 100% rename from test/css/samples/keyframes-autoprefixed/input.html rename to test/css/samples/keyframes-autoprefixed/input.svelte diff --git a/test/css/samples/keyframes-from-to/input.html b/test/css/samples/keyframes-from-to/input.svelte similarity index 100% rename from test/css/samples/keyframes-from-to/input.html rename to test/css/samples/keyframes-from-to/input.svelte diff --git a/test/css/samples/keyframes/input.html b/test/css/samples/keyframes/input.svelte similarity index 100% rename from test/css/samples/keyframes/input.html rename to test/css/samples/keyframes/input.svelte diff --git a/test/css/samples/local-inside-global/input.html b/test/css/samples/local-inside-global/input.svelte similarity index 100% rename from test/css/samples/local-inside-global/input.html rename to test/css/samples/local-inside-global/input.svelte diff --git a/test/css/samples/media-query-word/input.html b/test/css/samples/media-query-word/input.svelte similarity index 100% rename from test/css/samples/media-query-word/input.html rename to test/css/samples/media-query-word/input.svelte diff --git a/test/css/samples/media-query/input.html b/test/css/samples/media-query/input.svelte similarity index 100% rename from test/css/samples/media-query/input.html rename to test/css/samples/media-query/input.svelte diff --git a/test/css/samples/nested/expected.html b/test/css/samples/nested/expected.svelte similarity index 100% rename from test/css/samples/nested/expected.html rename to test/css/samples/nested/expected.svelte diff --git a/test/css/samples/nested/input.html b/test/css/samples/nested/input.svelte similarity index 100% rename from test/css/samples/nested/input.html rename to test/css/samples/nested/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-contains/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-contains/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-contains/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-contains/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-prefix/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-prefix/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-suffix/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-suffix/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector/expected.html b/test/css/samples/omit-scoping-attribute-attribute-selector/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector/expected.html rename to test/css/samples/omit-scoping-attribute-attribute-selector/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-class-dynamic/expected.html b/test/css/samples/omit-scoping-attribute-class-dynamic/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-class-dynamic/expected.html rename to test/css/samples/omit-scoping-attribute-class-dynamic/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-class-dynamic/input.html b/test/css/samples/omit-scoping-attribute-class-dynamic/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-class-dynamic/input.html rename to test/css/samples/omit-scoping-attribute-class-dynamic/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-class-static/expected.html b/test/css/samples/omit-scoping-attribute-class-static/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-class-static/expected.html rename to test/css/samples/omit-scoping-attribute-class-static/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-class-static/input.html b/test/css/samples/omit-scoping-attribute-class-static/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-class-static/input.html rename to test/css/samples/omit-scoping-attribute-class-static/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.html rename to test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/input.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner-class/input.html rename to test/css/samples/omit-scoping-attribute-descendant-global-inner-class/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.html rename to test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/input.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/input.html rename to test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.html rename to test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner/input.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner/input.html rename to test/css/samples/omit-scoping-attribute-descendant-global-inner/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.html b/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.html rename to test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/input.html b/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/input.html rename to test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.html b/test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.html rename to test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer/input.html b/test/css/samples/omit-scoping-attribute-descendant-global-outer/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-outer/input.html rename to test/css/samples/omit-scoping-attribute-descendant-global-outer/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant/expected.html b/test/css/samples/omit-scoping-attribute-descendant/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant/expected.html rename to test/css/samples/omit-scoping-attribute-descendant/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant/input.html b/test/css/samples/omit-scoping-attribute-descendant/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant/input.html rename to test/css/samples/omit-scoping-attribute-descendant/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-global/expected.html b/test/css/samples/omit-scoping-attribute-global/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-global/expected.html rename to test/css/samples/omit-scoping-attribute-global/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-global/input.html b/test/css/samples/omit-scoping-attribute-global/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-global/input.html rename to test/css/samples/omit-scoping-attribute-global/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-id/expected.html b/test/css/samples/omit-scoping-attribute-id/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-id/expected.html rename to test/css/samples/omit-scoping-attribute-id/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-id/input.html b/test/css/samples/omit-scoping-attribute-id/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-id/input.html rename to test/css/samples/omit-scoping-attribute-id/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.html b/test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.html rename to test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-whitespace-multiple/input.html b/test/css/samples/omit-scoping-attribute-whitespace-multiple/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-whitespace-multiple/input.html rename to test/css/samples/omit-scoping-attribute-whitespace-multiple/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-whitespace/expected.html b/test/css/samples/omit-scoping-attribute-whitespace/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-whitespace/expected.html rename to test/css/samples/omit-scoping-attribute-whitespace/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute-whitespace/input.html b/test/css/samples/omit-scoping-attribute-whitespace/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-whitespace/input.html rename to test/css/samples/omit-scoping-attribute-whitespace/input.svelte diff --git a/test/css/samples/omit-scoping-attribute/expected.html b/test/css/samples/omit-scoping-attribute/expected.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute/expected.html rename to test/css/samples/omit-scoping-attribute/expected.svelte diff --git a/test/css/samples/omit-scoping-attribute/input.html b/test/css/samples/omit-scoping-attribute/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute/input.html rename to test/css/samples/omit-scoping-attribute/input.svelte diff --git a/test/css/samples/pseudo-element/input.html b/test/css/samples/pseudo-element/input.svelte similarity index 100% rename from test/css/samples/pseudo-element/input.html rename to test/css/samples/pseudo-element/input.svelte diff --git a/test/css/samples/spread/input.html b/test/css/samples/spread/input.svelte similarity index 100% rename from test/css/samples/spread/input.html rename to test/css/samples/spread/input.svelte diff --git a/test/css/samples/supports-query/input.html b/test/css/samples/supports-query/input.svelte similarity index 100% rename from test/css/samples/supports-query/input.html rename to test/css/samples/supports-query/input.svelte diff --git a/test/css/samples/universal-selector/input.html b/test/css/samples/universal-selector/input.svelte similarity index 100% rename from test/css/samples/universal-selector/input.html rename to test/css/samples/universal-selector/input.svelte diff --git a/test/css/samples/unknown-at-rule/input.html b/test/css/samples/unknown-at-rule/input.svelte similarity index 100% rename from test/css/samples/unknown-at-rule/input.html rename to test/css/samples/unknown-at-rule/input.svelte diff --git a/test/css/samples/unused-selector-leading/expected.html b/test/css/samples/unused-selector-leading/expected.svelte similarity index 100% rename from test/css/samples/unused-selector-leading/expected.html rename to test/css/samples/unused-selector-leading/expected.svelte diff --git a/test/css/samples/unused-selector-leading/input.html b/test/css/samples/unused-selector-leading/input.svelte similarity index 100% rename from test/css/samples/unused-selector-leading/input.html rename to test/css/samples/unused-selector-leading/input.svelte diff --git a/test/css/samples/unused-selector-ternary/expected.html b/test/css/samples/unused-selector-ternary/expected.svelte similarity index 100% rename from test/css/samples/unused-selector-ternary/expected.html rename to test/css/samples/unused-selector-ternary/expected.svelte diff --git a/test/css/samples/unused-selector-ternary/input.html b/test/css/samples/unused-selector-ternary/input.svelte similarity index 100% rename from test/css/samples/unused-selector-ternary/input.html rename to test/css/samples/unused-selector-ternary/input.svelte diff --git a/test/css/samples/unused-selector/expected.html b/test/css/samples/unused-selector/expected.svelte similarity index 100% rename from test/css/samples/unused-selector/expected.html rename to test/css/samples/unused-selector/expected.svelte diff --git a/test/css/samples/unused-selector/input.html b/test/css/samples/unused-selector/input.svelte similarity index 100% rename from test/css/samples/unused-selector/input.html rename to test/css/samples/unused-selector/input.svelte diff --git a/test/custom-elements/samples/custom-method/main.html b/test/custom-elements/samples/custom-method/main.svelte similarity index 100% rename from test/custom-elements/samples/custom-method/main.html rename to test/custom-elements/samples/custom-method/main.svelte diff --git a/test/custom-elements/samples/escaped-css/main.html b/test/custom-elements/samples/escaped-css/main.svelte similarity index 100% rename from test/custom-elements/samples/escaped-css/main.html rename to test/custom-elements/samples/escaped-css/main.svelte diff --git a/test/custom-elements/samples/html-slots/main.html b/test/custom-elements/samples/html-slots/main.svelte similarity index 100% rename from test/custom-elements/samples/html-slots/main.html rename to test/custom-elements/samples/html-slots/main.svelte diff --git a/test/custom-elements/samples/html/main.html b/test/custom-elements/samples/html/main.svelte similarity index 100% rename from test/custom-elements/samples/html/main.html rename to test/custom-elements/samples/html/main.svelte diff --git a/test/custom-elements/samples/nested.skip/Counter.html b/test/custom-elements/samples/nested.skip/Counter.svelte similarity index 100% rename from test/custom-elements/samples/nested.skip/Counter.html rename to test/custom-elements/samples/nested.skip/Counter.svelte diff --git a/test/custom-elements/samples/nested.skip/main.html b/test/custom-elements/samples/nested.skip/main.svelte similarity index 75% rename from test/custom-elements/samples/nested.skip/main.html rename to test/custom-elements/samples/nested.skip/main.svelte index 90459c83eb..cb26008061 100644 --- a/test/custom-elements/samples/nested.skip/main.html +++ b/test/custom-elements/samples/nested.skip/main.svelte @@ -1,7 +1,7 @@ diff --git a/test/custom-elements/samples/new-styled/main.html b/test/custom-elements/samples/new-styled/main.svelte similarity index 100% rename from test/custom-elements/samples/new-styled/main.html rename to test/custom-elements/samples/new-styled/main.svelte diff --git a/test/custom-elements/samples/new/main.html b/test/custom-elements/samples/new/main.svelte similarity index 100% rename from test/custom-elements/samples/new/main.html rename to test/custom-elements/samples/new/main.svelte diff --git a/test/custom-elements/samples/no-missing-prop-warnings/main.html b/test/custom-elements/samples/no-missing-prop-warnings/main.svelte similarity index 100% rename from test/custom-elements/samples/no-missing-prop-warnings/main.html rename to test/custom-elements/samples/no-missing-prop-warnings/main.svelte diff --git a/test/custom-elements/samples/oncreate/main.html b/test/custom-elements/samples/oncreate/main.svelte similarity index 100% rename from test/custom-elements/samples/oncreate/main.html rename to test/custom-elements/samples/oncreate/main.svelte diff --git a/test/custom-elements/samples/props/main.html b/test/custom-elements/samples/props/main.svelte similarity index 81% rename from test/custom-elements/samples/props/main.html rename to test/custom-elements/samples/props/main.svelte index b36c7f3e3d..80b483bf6e 100644 --- a/test/custom-elements/samples/props/main.html +++ b/test/custom-elements/samples/props/main.svelte @@ -1,7 +1,7 @@ diff --git a/test/custom-elements/samples/props/my-widget.html b/test/custom-elements/samples/props/my-widget.svelte similarity index 100% rename from test/custom-elements/samples/props/my-widget.html rename to test/custom-elements/samples/props/my-widget.svelte diff --git a/test/hydration/samples/basic/_after.html b/test/hydration/samples/basic/_after.svelte similarity index 100% rename from test/hydration/samples/basic/_after.html rename to test/hydration/samples/basic/_after.svelte diff --git a/test/hydration/samples/basic/_before.html b/test/hydration/samples/basic/_before.svelte similarity index 100% rename from test/hydration/samples/basic/_before.html rename to test/hydration/samples/basic/_before.svelte diff --git a/test/hydration/samples/basic/main.html b/test/hydration/samples/basic/main.svelte similarity index 100% rename from test/hydration/samples/basic/main.html rename to test/hydration/samples/basic/main.svelte diff --git a/test/hydration/samples/binding-input/_after.html b/test/hydration/samples/binding-input/_after.svelte similarity index 100% rename from test/hydration/samples/binding-input/_after.html rename to test/hydration/samples/binding-input/_after.svelte diff --git a/test/hydration/samples/binding-input/_before.html b/test/hydration/samples/binding-input/_before.svelte similarity index 100% rename from test/hydration/samples/binding-input/_before.html rename to test/hydration/samples/binding-input/_before.svelte diff --git a/test/hydration/samples/binding-input/main.html b/test/hydration/samples/binding-input/main.svelte similarity index 100% rename from test/hydration/samples/binding-input/main.html rename to test/hydration/samples/binding-input/main.svelte diff --git a/test/hydration/samples/component-in-element/Nested.html b/test/hydration/samples/component-in-element/Nested.svelte similarity index 100% rename from test/hydration/samples/component-in-element/Nested.html rename to test/hydration/samples/component-in-element/Nested.svelte diff --git a/test/hydration/samples/component-in-element/_after.html b/test/hydration/samples/component-in-element/_after.svelte similarity index 100% rename from test/hydration/samples/component-in-element/_after.html rename to test/hydration/samples/component-in-element/_after.svelte diff --git a/test/hydration/samples/component-in-element/_before.html b/test/hydration/samples/component-in-element/_before.svelte similarity index 100% rename from test/hydration/samples/component-in-element/_before.html rename to test/hydration/samples/component-in-element/_before.svelte diff --git a/test/hydration/samples/component-in-element/main.html b/test/hydration/samples/component-in-element/main.html deleted file mode 100644 index 4367a831ea..0000000000 --- a/test/hydration/samples/component-in-element/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - -
    - -
    \ No newline at end of file diff --git a/test/hydration/samples/component-in-element/main.svelte b/test/hydration/samples/component-in-element/main.svelte new file mode 100644 index 0000000000..f1d903fcd6 --- /dev/null +++ b/test/hydration/samples/component-in-element/main.svelte @@ -0,0 +1,7 @@ + + +
    + +
    \ No newline at end of file diff --git a/test/hydration/samples/component/Nested.html b/test/hydration/samples/component/Nested.svelte similarity index 100% rename from test/hydration/samples/component/Nested.html rename to test/hydration/samples/component/Nested.svelte diff --git a/test/hydration/samples/component/_after.html b/test/hydration/samples/component/_after.svelte similarity index 100% rename from test/hydration/samples/component/_after.html rename to test/hydration/samples/component/_after.svelte diff --git a/test/hydration/samples/component/_before.html b/test/hydration/samples/component/_before.svelte similarity index 100% rename from test/hydration/samples/component/_before.html rename to test/hydration/samples/component/_before.svelte diff --git a/test/hydration/samples/component/main.html b/test/hydration/samples/component/main.html deleted file mode 100644 index 583835f46a..0000000000 --- a/test/hydration/samples/component/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/hydration/samples/component/main.svelte b/test/hydration/samples/component/main.svelte new file mode 100644 index 0000000000..469c37f719 --- /dev/null +++ b/test/hydration/samples/component/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/hydration/samples/dynamic-text-changed/_after.html b/test/hydration/samples/dynamic-text-changed/_after.svelte similarity index 100% rename from test/hydration/samples/dynamic-text-changed/_after.html rename to test/hydration/samples/dynamic-text-changed/_after.svelte diff --git a/test/hydration/samples/dynamic-text-changed/_before.html b/test/hydration/samples/dynamic-text-changed/_before.svelte similarity index 100% rename from test/hydration/samples/dynamic-text-changed/_before.html rename to test/hydration/samples/dynamic-text-changed/_before.svelte diff --git a/test/hydration/samples/dynamic-text-changed/main.html b/test/hydration/samples/dynamic-text-changed/main.svelte similarity index 100% rename from test/hydration/samples/dynamic-text-changed/main.html rename to test/hydration/samples/dynamic-text-changed/main.svelte diff --git a/test/hydration/samples/dynamic-text/_after.html b/test/hydration/samples/dynamic-text/_after.svelte similarity index 100% rename from test/hydration/samples/dynamic-text/_after.html rename to test/hydration/samples/dynamic-text/_after.svelte diff --git a/test/hydration/samples/dynamic-text/_before.html b/test/hydration/samples/dynamic-text/_before.svelte similarity index 100% rename from test/hydration/samples/dynamic-text/_before.html rename to test/hydration/samples/dynamic-text/_before.svelte diff --git a/test/hydration/samples/dynamic-text/main.html b/test/hydration/samples/dynamic-text/main.svelte similarity index 100% rename from test/hydration/samples/dynamic-text/main.html rename to test/hydration/samples/dynamic-text/main.svelte diff --git a/test/hydration/samples/each-block-arg-clash/_after.html b/test/hydration/samples/each-block-arg-clash/_after.svelte similarity index 100% rename from test/hydration/samples/each-block-arg-clash/_after.html rename to test/hydration/samples/each-block-arg-clash/_after.svelte diff --git a/test/hydration/samples/each-block-arg-clash/_before.html b/test/hydration/samples/each-block-arg-clash/_before.svelte similarity index 100% rename from test/hydration/samples/each-block-arg-clash/_before.html rename to test/hydration/samples/each-block-arg-clash/_before.svelte diff --git a/test/hydration/samples/each-block-arg-clash/main.html b/test/hydration/samples/each-block-arg-clash/main.svelte similarity index 100% rename from test/hydration/samples/each-block-arg-clash/main.html rename to test/hydration/samples/each-block-arg-clash/main.svelte diff --git a/test/hydration/samples/each-block/_after.html b/test/hydration/samples/each-block/_after.svelte similarity index 100% rename from test/hydration/samples/each-block/_after.html rename to test/hydration/samples/each-block/_after.svelte diff --git a/test/hydration/samples/each-block/_before.html b/test/hydration/samples/each-block/_before.svelte similarity index 100% rename from test/hydration/samples/each-block/_before.html rename to test/hydration/samples/each-block/_before.svelte diff --git a/test/hydration/samples/each-block/main.html b/test/hydration/samples/each-block/main.svelte similarity index 100% rename from test/hydration/samples/each-block/main.html rename to test/hydration/samples/each-block/main.svelte diff --git a/test/hydration/samples/element-attribute-added/_after.html b/test/hydration/samples/element-attribute-added/_after.svelte similarity index 100% rename from test/hydration/samples/element-attribute-added/_after.html rename to test/hydration/samples/element-attribute-added/_after.svelte diff --git a/test/hydration/samples/element-attribute-added/_before.html b/test/hydration/samples/element-attribute-added/_before.svelte similarity index 100% rename from test/hydration/samples/element-attribute-added/_before.html rename to test/hydration/samples/element-attribute-added/_before.svelte diff --git a/test/hydration/samples/element-attribute-added/main.html b/test/hydration/samples/element-attribute-added/main.svelte similarity index 100% rename from test/hydration/samples/element-attribute-added/main.html rename to test/hydration/samples/element-attribute-added/main.svelte diff --git a/test/hydration/samples/element-attribute-changed/_after.html b/test/hydration/samples/element-attribute-changed/_after.svelte similarity index 100% rename from test/hydration/samples/element-attribute-changed/_after.html rename to test/hydration/samples/element-attribute-changed/_after.svelte diff --git a/test/hydration/samples/element-attribute-changed/_before.html b/test/hydration/samples/element-attribute-changed/_before.svelte similarity index 100% rename from test/hydration/samples/element-attribute-changed/_before.html rename to test/hydration/samples/element-attribute-changed/_before.svelte diff --git a/test/hydration/samples/element-attribute-changed/main.html b/test/hydration/samples/element-attribute-changed/main.svelte similarity index 100% rename from test/hydration/samples/element-attribute-changed/main.html rename to test/hydration/samples/element-attribute-changed/main.svelte diff --git a/test/hydration/samples/element-attribute-removed/_after.html b/test/hydration/samples/element-attribute-removed/_after.svelte similarity index 100% rename from test/hydration/samples/element-attribute-removed/_after.html rename to test/hydration/samples/element-attribute-removed/_after.svelte diff --git a/test/hydration/samples/element-attribute-removed/_before.html b/test/hydration/samples/element-attribute-removed/_before.svelte similarity index 100% rename from test/hydration/samples/element-attribute-removed/_before.html rename to test/hydration/samples/element-attribute-removed/_before.svelte diff --git a/test/hydration/samples/element-attribute-removed/main.html b/test/hydration/samples/element-attribute-removed/main.svelte similarity index 100% rename from test/hydration/samples/element-attribute-removed/main.html rename to test/hydration/samples/element-attribute-removed/main.svelte diff --git a/test/hydration/samples/element-attribute-unchanged/_after.html b/test/hydration/samples/element-attribute-unchanged/_after.svelte similarity index 100% rename from test/hydration/samples/element-attribute-unchanged/_after.html rename to test/hydration/samples/element-attribute-unchanged/_after.svelte diff --git a/test/hydration/samples/element-attribute-unchanged/_before.html b/test/hydration/samples/element-attribute-unchanged/_before.svelte similarity index 100% rename from test/hydration/samples/element-attribute-unchanged/_before.html rename to test/hydration/samples/element-attribute-unchanged/_before.svelte diff --git a/test/hydration/samples/element-attribute-unchanged/main.html b/test/hydration/samples/element-attribute-unchanged/main.svelte similarity index 100% rename from test/hydration/samples/element-attribute-unchanged/main.html rename to test/hydration/samples/element-attribute-unchanged/main.svelte diff --git a/test/hydration/samples/element-nested/_after.html b/test/hydration/samples/element-nested/_after.svelte similarity index 100% rename from test/hydration/samples/element-nested/_after.html rename to test/hydration/samples/element-nested/_after.svelte diff --git a/test/hydration/samples/element-nested/_before.html b/test/hydration/samples/element-nested/_before.svelte similarity index 100% rename from test/hydration/samples/element-nested/_before.html rename to test/hydration/samples/element-nested/_before.svelte diff --git a/test/hydration/samples/element-nested/main.html b/test/hydration/samples/element-nested/main.svelte similarity index 100% rename from test/hydration/samples/element-nested/main.html rename to test/hydration/samples/element-nested/main.svelte diff --git a/test/hydration/samples/element-ref/_after.html b/test/hydration/samples/element-ref/_after.svelte similarity index 100% rename from test/hydration/samples/element-ref/_after.html rename to test/hydration/samples/element-ref/_after.svelte diff --git a/test/hydration/samples/element-ref/_before.html b/test/hydration/samples/element-ref/_before.svelte similarity index 100% rename from test/hydration/samples/element-ref/_before.html rename to test/hydration/samples/element-ref/_before.svelte diff --git a/test/hydration/samples/element-ref/main.html b/test/hydration/samples/element-ref/main.svelte similarity index 100% rename from test/hydration/samples/element-ref/main.html rename to test/hydration/samples/element-ref/main.svelte diff --git a/test/hydration/samples/event-handler/_after.html b/test/hydration/samples/event-handler/_after.svelte similarity index 100% rename from test/hydration/samples/event-handler/_after.html rename to test/hydration/samples/event-handler/_after.svelte diff --git a/test/hydration/samples/event-handler/_before.html b/test/hydration/samples/event-handler/_before.svelte similarity index 100% rename from test/hydration/samples/event-handler/_before.html rename to test/hydration/samples/event-handler/_before.svelte diff --git a/test/hydration/samples/event-handler/main.html b/test/hydration/samples/event-handler/main.svelte similarity index 100% rename from test/hydration/samples/event-handler/main.html rename to test/hydration/samples/event-handler/main.svelte diff --git a/test/hydration/samples/if-block-anchor/_after.html b/test/hydration/samples/if-block-anchor/_after.svelte similarity index 100% rename from test/hydration/samples/if-block-anchor/_after.html rename to test/hydration/samples/if-block-anchor/_after.svelte diff --git a/test/hydration/samples/if-block-anchor/_before.html b/test/hydration/samples/if-block-anchor/_before.svelte similarity index 100% rename from test/hydration/samples/if-block-anchor/_before.html rename to test/hydration/samples/if-block-anchor/_before.svelte diff --git a/test/hydration/samples/if-block-anchor/main.html b/test/hydration/samples/if-block-anchor/main.svelte similarity index 100% rename from test/hydration/samples/if-block-anchor/main.html rename to test/hydration/samples/if-block-anchor/main.svelte diff --git a/test/hydration/samples/if-block-false/_after.html b/test/hydration/samples/if-block-false/_after.svelte similarity index 100% rename from test/hydration/samples/if-block-false/_after.html rename to test/hydration/samples/if-block-false/_after.svelte diff --git a/test/hydration/samples/if-block-false/_before.html b/test/hydration/samples/if-block-false/_before.svelte similarity index 100% rename from test/hydration/samples/if-block-false/_before.html rename to test/hydration/samples/if-block-false/_before.svelte diff --git a/test/hydration/samples/if-block-false/main.html b/test/hydration/samples/if-block-false/main.svelte similarity index 100% rename from test/hydration/samples/if-block-false/main.html rename to test/hydration/samples/if-block-false/main.svelte diff --git a/test/hydration/samples/if-block-update/_after.html b/test/hydration/samples/if-block-update/_after.svelte similarity index 100% rename from test/hydration/samples/if-block-update/_after.html rename to test/hydration/samples/if-block-update/_after.svelte diff --git a/test/hydration/samples/if-block-update/_before.html b/test/hydration/samples/if-block-update/_before.svelte similarity index 100% rename from test/hydration/samples/if-block-update/_before.html rename to test/hydration/samples/if-block-update/_before.svelte diff --git a/test/hydration/samples/if-block-update/main.html b/test/hydration/samples/if-block-update/main.svelte similarity index 100% rename from test/hydration/samples/if-block-update/main.html rename to test/hydration/samples/if-block-update/main.svelte diff --git a/test/hydration/samples/if-block/_after.html b/test/hydration/samples/if-block/_after.svelte similarity index 100% rename from test/hydration/samples/if-block/_after.html rename to test/hydration/samples/if-block/_after.svelte diff --git a/test/hydration/samples/if-block/_before.html b/test/hydration/samples/if-block/_before.svelte similarity index 100% rename from test/hydration/samples/if-block/_before.html rename to test/hydration/samples/if-block/_before.svelte diff --git a/test/hydration/samples/if-block/main.html b/test/hydration/samples/if-block/main.svelte similarity index 100% rename from test/hydration/samples/if-block/main.html rename to test/hydration/samples/if-block/main.svelte diff --git a/test/hydration/samples/raw/_after.html b/test/hydration/samples/raw/_after.svelte similarity index 100% rename from test/hydration/samples/raw/_after.html rename to test/hydration/samples/raw/_after.svelte diff --git a/test/hydration/samples/raw/_before.html b/test/hydration/samples/raw/_before.svelte similarity index 100% rename from test/hydration/samples/raw/_before.html rename to test/hydration/samples/raw/_before.svelte diff --git a/test/hydration/samples/raw/main.html b/test/hydration/samples/raw/main.svelte similarity index 100% rename from test/hydration/samples/raw/main.html rename to test/hydration/samples/raw/main.svelte diff --git a/test/hydration/samples/top-level-text/_after.html b/test/hydration/samples/top-level-text/_after.svelte similarity index 100% rename from test/hydration/samples/top-level-text/_after.html rename to test/hydration/samples/top-level-text/_after.svelte diff --git a/test/hydration/samples/top-level-text/_before.html b/test/hydration/samples/top-level-text/_before.svelte similarity index 100% rename from test/hydration/samples/top-level-text/_before.html rename to test/hydration/samples/top-level-text/_before.svelte diff --git a/test/hydration/samples/top-level-text/main.html b/test/hydration/samples/top-level-text/main.svelte similarity index 100% rename from test/hydration/samples/top-level-text/main.html rename to test/hydration/samples/top-level-text/main.svelte diff --git a/test/js/samples/action-custom-event-handler/input.html b/test/js/samples/action-custom-event-handler/input.svelte similarity index 100% rename from test/js/samples/action-custom-event-handler/input.html rename to test/js/samples/action-custom-event-handler/input.svelte diff --git a/test/js/samples/action/input.html b/test/js/samples/action/input.svelte similarity index 100% rename from test/js/samples/action/input.html rename to test/js/samples/action/input.svelte diff --git a/test/js/samples/bind-width-height/input.html b/test/js/samples/bind-width-height/input.svelte similarity index 100% rename from test/js/samples/bind-width-height/input.html rename to test/js/samples/bind-width-height/input.svelte diff --git a/test/js/samples/collapses-text-around-comments/input.html b/test/js/samples/collapses-text-around-comments/input.svelte similarity index 100% rename from test/js/samples/collapses-text-around-comments/input.html rename to test/js/samples/collapses-text-around-comments/input.svelte diff --git a/test/js/samples/component-static-array/input.html b/test/js/samples/component-static-array/input.svelte similarity index 100% rename from test/js/samples/component-static-array/input.html rename to test/js/samples/component-static-array/input.svelte diff --git a/test/js/samples/component-static-immutable/input.html b/test/js/samples/component-static-immutable/input.svelte similarity index 100% rename from test/js/samples/component-static-immutable/input.html rename to test/js/samples/component-static-immutable/input.svelte diff --git a/test/js/samples/component-static-immutable2/input.html b/test/js/samples/component-static-immutable2/input.svelte similarity index 100% rename from test/js/samples/component-static-immutable2/input.html rename to test/js/samples/component-static-immutable2/input.svelte diff --git a/test/js/samples/component-static/input.html b/test/js/samples/component-static/input.svelte similarity index 100% rename from test/js/samples/component-static/input.html rename to test/js/samples/component-static/input.svelte diff --git a/test/js/samples/computed-collapsed-if/input.html b/test/js/samples/computed-collapsed-if/input.svelte similarity index 100% rename from test/js/samples/computed-collapsed-if/input.html rename to test/js/samples/computed-collapsed-if/input.svelte diff --git a/test/js/samples/css-media-query/input.html b/test/js/samples/css-media-query/input.svelte similarity index 100% rename from test/js/samples/css-media-query/input.html rename to test/js/samples/css-media-query/input.svelte diff --git a/test/js/samples/css-shadow-dom-keyframes/input.html b/test/js/samples/css-shadow-dom-keyframes/input.svelte similarity index 100% rename from test/js/samples/css-shadow-dom-keyframes/input.html rename to test/js/samples/css-shadow-dom-keyframes/input.svelte diff --git a/test/js/samples/debug-empty/input.html b/test/js/samples/debug-empty/input.svelte similarity index 100% rename from test/js/samples/debug-empty/input.html rename to test/js/samples/debug-empty/input.svelte diff --git a/test/js/samples/debug-foo-bar-baz-things/input.html b/test/js/samples/debug-foo-bar-baz-things/input.svelte similarity index 100% rename from test/js/samples/debug-foo-bar-baz-things/input.html rename to test/js/samples/debug-foo-bar-baz-things/input.svelte diff --git a/test/js/samples/debug-foo/input.html b/test/js/samples/debug-foo/input.svelte similarity index 100% rename from test/js/samples/debug-foo/input.html rename to test/js/samples/debug-foo/input.svelte diff --git a/test/js/samples/debug-ssr-foo/input.html b/test/js/samples/debug-ssr-foo/input.svelte similarity index 100% rename from test/js/samples/debug-ssr-foo/input.html rename to test/js/samples/debug-ssr-foo/input.svelte diff --git a/test/js/samples/deconflict-builtins/input.html b/test/js/samples/deconflict-builtins/input.svelte similarity index 100% rename from test/js/samples/deconflict-builtins/input.html rename to test/js/samples/deconflict-builtins/input.svelte diff --git a/test/js/samples/deconflict-globals/input.html b/test/js/samples/deconflict-globals/input.svelte similarity index 100% rename from test/js/samples/deconflict-globals/input.html rename to test/js/samples/deconflict-globals/input.svelte diff --git a/test/js/samples/dev-warning-missing-data-computed/input.html b/test/js/samples/dev-warning-missing-data-computed/input.svelte similarity index 100% rename from test/js/samples/dev-warning-missing-data-computed/input.html rename to test/js/samples/dev-warning-missing-data-computed/input.svelte diff --git a/test/js/samples/do-use-dataset/input.html b/test/js/samples/do-use-dataset/input.svelte similarity index 100% rename from test/js/samples/do-use-dataset/input.html rename to test/js/samples/do-use-dataset/input.svelte diff --git a/test/js/samples/dont-use-dataset-in-legacy/input.html b/test/js/samples/dont-use-dataset-in-legacy/input.svelte similarity index 100% rename from test/js/samples/dont-use-dataset-in-legacy/input.html rename to test/js/samples/dont-use-dataset-in-legacy/input.svelte diff --git a/test/js/samples/dont-use-dataset-in-svg/input.html b/test/js/samples/dont-use-dataset-in-svg/input.svelte similarity index 100% rename from test/js/samples/dont-use-dataset-in-svg/input.html rename to test/js/samples/dont-use-dataset-in-svg/input.svelte diff --git a/test/js/samples/dynamic-import/input.html b/test/js/samples/dynamic-import/input.html deleted file mode 100644 index 3640ef5161..0000000000 --- a/test/js/samples/dynamic-import/input.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/js/samples/dynamic-import/input.svelte b/test/js/samples/dynamic-import/input.svelte new file mode 100644 index 0000000000..7e423b5e46 --- /dev/null +++ b/test/js/samples/dynamic-import/input.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/js/samples/each-block-changed-check/input.html b/test/js/samples/each-block-changed-check/input.svelte similarity index 100% rename from test/js/samples/each-block-changed-check/input.html rename to test/js/samples/each-block-changed-check/input.svelte diff --git a/test/js/samples/each-block-keyed-animated/input.html b/test/js/samples/each-block-keyed-animated/input.svelte similarity index 100% rename from test/js/samples/each-block-keyed-animated/input.html rename to test/js/samples/each-block-keyed-animated/input.svelte diff --git a/test/js/samples/each-block-keyed/input.html b/test/js/samples/each-block-keyed/input.svelte similarity index 100% rename from test/js/samples/each-block-keyed/input.html rename to test/js/samples/each-block-keyed/input.svelte diff --git a/test/js/samples/event-handler-no-passive/input.html b/test/js/samples/event-handler-no-passive/input.svelte similarity index 100% rename from test/js/samples/event-handler-no-passive/input.html rename to test/js/samples/event-handler-no-passive/input.svelte diff --git a/test/js/samples/event-modifiers/input.html b/test/js/samples/event-modifiers/input.svelte similarity index 100% rename from test/js/samples/event-modifiers/input.html rename to test/js/samples/event-modifiers/input.svelte diff --git a/test/js/samples/head-no-whitespace/input.html b/test/js/samples/head-no-whitespace/input.svelte similarity index 100% rename from test/js/samples/head-no-whitespace/input.html rename to test/js/samples/head-no-whitespace/input.svelte diff --git a/test/js/samples/hoisted-const/input.html b/test/js/samples/hoisted-const/input.svelte similarity index 100% rename from test/js/samples/hoisted-const/input.html rename to test/js/samples/hoisted-const/input.svelte diff --git a/test/js/samples/hoisted-let/input.html b/test/js/samples/hoisted-let/input.svelte similarity index 100% rename from test/js/samples/hoisted-let/input.html rename to test/js/samples/hoisted-let/input.svelte diff --git a/test/js/samples/if-block-no-update/input.html b/test/js/samples/if-block-no-update/input.svelte similarity index 100% rename from test/js/samples/if-block-no-update/input.html rename to test/js/samples/if-block-no-update/input.svelte diff --git a/test/js/samples/if-block-simple/input.html b/test/js/samples/if-block-simple/input.svelte similarity index 100% rename from test/js/samples/if-block-simple/input.html rename to test/js/samples/if-block-simple/input.svelte diff --git a/test/js/samples/inline-style-optimized-multiple/input.html b/test/js/samples/inline-style-optimized-multiple/input.svelte similarity index 100% rename from test/js/samples/inline-style-optimized-multiple/input.html rename to test/js/samples/inline-style-optimized-multiple/input.svelte diff --git a/test/js/samples/inline-style-optimized-url/input.html b/test/js/samples/inline-style-optimized-url/input.svelte similarity index 100% rename from test/js/samples/inline-style-optimized-url/input.html rename to test/js/samples/inline-style-optimized-url/input.svelte diff --git a/test/js/samples/inline-style-optimized/input.html b/test/js/samples/inline-style-optimized/input.svelte similarity index 100% rename from test/js/samples/inline-style-optimized/input.html rename to test/js/samples/inline-style-optimized/input.svelte diff --git a/test/js/samples/inline-style-unoptimized/input.html b/test/js/samples/inline-style-unoptimized/input.svelte similarity index 100% rename from test/js/samples/inline-style-unoptimized/input.html rename to test/js/samples/inline-style-unoptimized/input.svelte diff --git a/test/js/samples/input-files/input.html b/test/js/samples/input-files/input.svelte similarity index 100% rename from test/js/samples/input-files/input.html rename to test/js/samples/input-files/input.svelte diff --git a/test/js/samples/input-range/input.html b/test/js/samples/input-range/input.svelte similarity index 100% rename from test/js/samples/input-range/input.html rename to test/js/samples/input-range/input.svelte diff --git a/test/js/samples/input-without-blowback-guard/input.html b/test/js/samples/input-without-blowback-guard/input.svelte similarity index 100% rename from test/js/samples/input-without-blowback-guard/input.html rename to test/js/samples/input-without-blowback-guard/input.svelte diff --git a/test/js/samples/instrumentation-script-if-no-block/input.html b/test/js/samples/instrumentation-script-if-no-block/input.svelte similarity index 100% rename from test/js/samples/instrumentation-script-if-no-block/input.html rename to test/js/samples/instrumentation-script-if-no-block/input.svelte diff --git a/test/js/samples/instrumentation-script-x-equals-x/input.html b/test/js/samples/instrumentation-script-x-equals-x/input.svelte similarity index 100% rename from test/js/samples/instrumentation-script-x-equals-x/input.html rename to test/js/samples/instrumentation-script-x-equals-x/input.svelte diff --git a/test/js/samples/instrumentation-template-if-no-block/input.html b/test/js/samples/instrumentation-template-if-no-block/input.svelte similarity index 100% rename from test/js/samples/instrumentation-template-if-no-block/input.html rename to test/js/samples/instrumentation-template-if-no-block/input.svelte diff --git a/test/js/samples/instrumentation-template-x-equals-x/input.html b/test/js/samples/instrumentation-template-x-equals-x/input.svelte similarity index 100% rename from test/js/samples/instrumentation-template-x-equals-x/input.html rename to test/js/samples/instrumentation-template-x-equals-x/input.svelte diff --git a/test/js/samples/legacy-input-type/input.html b/test/js/samples/legacy-input-type/input.svelte similarity index 100% rename from test/js/samples/legacy-input-type/input.html rename to test/js/samples/legacy-input-type/input.svelte diff --git a/test/js/samples/media-bindings/input.html b/test/js/samples/media-bindings/input.svelte similarity index 100% rename from test/js/samples/media-bindings/input.html rename to test/js/samples/media-bindings/input.svelte diff --git a/test/js/samples/non-imported-component/input.html b/test/js/samples/non-imported-component/input.html deleted file mode 100644 index 60bb515a3c..0000000000 --- a/test/js/samples/non-imported-component/input.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/test/js/samples/non-imported-component/input.svelte b/test/js/samples/non-imported-component/input.svelte new file mode 100644 index 0000000000..fb2054bc7f --- /dev/null +++ b/test/js/samples/non-imported-component/input.svelte @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/js/samples/non-mutable-reference/input.html b/test/js/samples/non-mutable-reference/input.svelte similarity index 100% rename from test/js/samples/non-mutable-reference/input.html rename to test/js/samples/non-mutable-reference/input.svelte diff --git a/test/js/samples/reactive-values-non-topologically-ordered/input.html b/test/js/samples/reactive-values-non-topologically-ordered/input.svelte similarity index 100% rename from test/js/samples/reactive-values-non-topologically-ordered/input.html rename to test/js/samples/reactive-values-non-topologically-ordered/input.svelte diff --git a/test/js/samples/reactive-values-non-writable-dependencies/input.html b/test/js/samples/reactive-values-non-writable-dependencies/input.svelte similarity index 100% rename from test/js/samples/reactive-values-non-writable-dependencies/input.html rename to test/js/samples/reactive-values-non-writable-dependencies/input.svelte diff --git a/test/js/samples/select-dynamic-value/input.html b/test/js/samples/select-dynamic-value/input.svelte similarity index 100% rename from test/js/samples/select-dynamic-value/input.html rename to test/js/samples/select-dynamic-value/input.svelte diff --git a/test/js/samples/setup-method/input.html b/test/js/samples/setup-method/input.svelte similarity index 100% rename from test/js/samples/setup-method/input.html rename to test/js/samples/setup-method/input.svelte diff --git a/test/js/samples/ssr-no-oncreate-etc/input.html b/test/js/samples/ssr-no-oncreate-etc/input.svelte similarity index 100% rename from test/js/samples/ssr-no-oncreate-etc/input.html rename to test/js/samples/ssr-no-oncreate-etc/input.svelte diff --git a/test/js/samples/ssr-preserve-comments/input.html b/test/js/samples/ssr-preserve-comments/input.svelte similarity index 100% rename from test/js/samples/ssr-preserve-comments/input.html rename to test/js/samples/ssr-preserve-comments/input.svelte diff --git a/test/js/samples/svg-title/input.html b/test/js/samples/svg-title/input.svelte similarity index 100% rename from test/js/samples/svg-title/input.html rename to test/js/samples/svg-title/input.svelte diff --git a/test/js/samples/title/input.html b/test/js/samples/title/input.svelte similarity index 100% rename from test/js/samples/title/input.html rename to test/js/samples/title/input.svelte diff --git a/test/js/samples/transition-local/input.html b/test/js/samples/transition-local/input.svelte similarity index 100% rename from test/js/samples/transition-local/input.html rename to test/js/samples/transition-local/input.svelte diff --git a/test/js/samples/use-elements-as-anchors/input.html b/test/js/samples/use-elements-as-anchors/input.svelte similarity index 100% rename from test/js/samples/use-elements-as-anchors/input.html rename to test/js/samples/use-elements-as-anchors/input.svelte diff --git a/test/js/samples/window-binding-scroll/input.html b/test/js/samples/window-binding-scroll/input.svelte similarity index 100% rename from test/js/samples/window-binding-scroll/input.html rename to test/js/samples/window-binding-scroll/input.svelte diff --git a/test/parser/samples/action-with-call/input.html b/test/parser/samples/action-with-call/input.svelte similarity index 100% rename from test/parser/samples/action-with-call/input.html rename to test/parser/samples/action-with-call/input.svelte diff --git a/test/parser/samples/action-with-identifier/input.html b/test/parser/samples/action-with-identifier/input.svelte similarity index 100% rename from test/parser/samples/action-with-identifier/input.html rename to test/parser/samples/action-with-identifier/input.svelte diff --git a/test/parser/samples/action-with-literal/input.html b/test/parser/samples/action-with-literal/input.svelte similarity index 100% rename from test/parser/samples/action-with-literal/input.html rename to test/parser/samples/action-with-literal/input.svelte diff --git a/test/parser/samples/action/input.html b/test/parser/samples/action/input.svelte similarity index 100% rename from test/parser/samples/action/input.html rename to test/parser/samples/action/input.svelte diff --git a/test/parser/samples/animation/input.html b/test/parser/samples/animation/input.svelte similarity index 100% rename from test/parser/samples/animation/input.html rename to test/parser/samples/animation/input.svelte diff --git a/test/parser/samples/attribute-containing-solidus/input.html b/test/parser/samples/attribute-containing-solidus/input.svelte similarity index 100% rename from test/parser/samples/attribute-containing-solidus/input.html rename to test/parser/samples/attribute-containing-solidus/input.svelte diff --git a/test/parser/samples/attribute-dynamic-boolean/input.html b/test/parser/samples/attribute-dynamic-boolean/input.svelte similarity index 100% rename from test/parser/samples/attribute-dynamic-boolean/input.html rename to test/parser/samples/attribute-dynamic-boolean/input.svelte diff --git a/test/parser/samples/attribute-dynamic-reserved/input.html b/test/parser/samples/attribute-dynamic-reserved/input.svelte similarity index 100% rename from test/parser/samples/attribute-dynamic-reserved/input.html rename to test/parser/samples/attribute-dynamic-reserved/input.svelte diff --git a/test/parser/samples/attribute-dynamic/input.html b/test/parser/samples/attribute-dynamic/input.svelte similarity index 100% rename from test/parser/samples/attribute-dynamic/input.html rename to test/parser/samples/attribute-dynamic/input.svelte diff --git a/test/parser/samples/attribute-escaped/input.html b/test/parser/samples/attribute-escaped/input.svelte similarity index 100% rename from test/parser/samples/attribute-escaped/input.html rename to test/parser/samples/attribute-escaped/input.svelte diff --git a/test/parser/samples/attribute-multiple/input.html b/test/parser/samples/attribute-multiple/input.svelte similarity index 100% rename from test/parser/samples/attribute-multiple/input.html rename to test/parser/samples/attribute-multiple/input.svelte diff --git a/test/parser/samples/attribute-shorthand/input.html b/test/parser/samples/attribute-shorthand/input.svelte similarity index 100% rename from test/parser/samples/attribute-shorthand/input.html rename to test/parser/samples/attribute-shorthand/input.svelte diff --git a/test/parser/samples/attribute-static-boolean/input.html b/test/parser/samples/attribute-static-boolean/input.svelte similarity index 100% rename from test/parser/samples/attribute-static-boolean/input.html rename to test/parser/samples/attribute-static-boolean/input.svelte diff --git a/test/parser/samples/attribute-static/input.html b/test/parser/samples/attribute-static/input.svelte similarity index 100% rename from test/parser/samples/attribute-static/input.html rename to test/parser/samples/attribute-static/input.svelte diff --git a/test/parser/samples/attribute-unique-error/input.html b/test/parser/samples/attribute-unique-error/input.svelte similarity index 100% rename from test/parser/samples/attribute-unique-error/input.html rename to test/parser/samples/attribute-unique-error/input.svelte diff --git a/test/parser/samples/attribute-unquoted/input.html b/test/parser/samples/attribute-unquoted/input.svelte similarity index 100% rename from test/parser/samples/attribute-unquoted/input.html rename to test/parser/samples/attribute-unquoted/input.svelte diff --git a/test/parser/samples/await-then-catch/input.html b/test/parser/samples/await-then-catch/input.svelte similarity index 100% rename from test/parser/samples/await-then-catch/input.html rename to test/parser/samples/await-then-catch/input.svelte diff --git a/test/parser/samples/binding-shorthand/input.html b/test/parser/samples/binding-shorthand/input.svelte similarity index 100% rename from test/parser/samples/binding-shorthand/input.html rename to test/parser/samples/binding-shorthand/input.svelte diff --git a/test/parser/samples/binding/input.html b/test/parser/samples/binding/input.svelte similarity index 100% rename from test/parser/samples/binding/input.html rename to test/parser/samples/binding/input.svelte diff --git a/test/parser/samples/comment/input.html b/test/parser/samples/comment/input.svelte similarity index 100% rename from test/parser/samples/comment/input.html rename to test/parser/samples/comment/input.svelte diff --git a/test/parser/samples/component-dynamic/input.html b/test/parser/samples/component-dynamic/input.svelte similarity index 100% rename from test/parser/samples/component-dynamic/input.html rename to test/parser/samples/component-dynamic/input.svelte diff --git a/test/parser/samples/convert-entities-in-element/input.html b/test/parser/samples/convert-entities-in-element/input.svelte similarity index 100% rename from test/parser/samples/convert-entities-in-element/input.html rename to test/parser/samples/convert-entities-in-element/input.svelte diff --git a/test/parser/samples/convert-entities/input.html b/test/parser/samples/convert-entities/input.svelte similarity index 100% rename from test/parser/samples/convert-entities/input.html rename to test/parser/samples/convert-entities/input.svelte diff --git a/test/parser/samples/css/input.html b/test/parser/samples/css/input.svelte similarity index 100% rename from test/parser/samples/css/input.html rename to test/parser/samples/css/input.svelte diff --git a/test/parser/samples/dynamic-import/input.html b/test/parser/samples/dynamic-import/input.svelte similarity index 100% rename from test/parser/samples/dynamic-import/input.html rename to test/parser/samples/dynamic-import/input.svelte diff --git a/test/parser/samples/each-block-destructured/input.html b/test/parser/samples/each-block-destructured/input.svelte similarity index 100% rename from test/parser/samples/each-block-destructured/input.html rename to test/parser/samples/each-block-destructured/input.svelte diff --git a/test/parser/samples/each-block-else/input.html b/test/parser/samples/each-block-else/input.svelte similarity index 100% rename from test/parser/samples/each-block-else/input.html rename to test/parser/samples/each-block-else/input.svelte diff --git a/test/parser/samples/each-block-indexed/input.html b/test/parser/samples/each-block-indexed/input.svelte similarity index 100% rename from test/parser/samples/each-block-indexed/input.html rename to test/parser/samples/each-block-indexed/input.svelte diff --git a/test/parser/samples/each-block-keyed/input.html b/test/parser/samples/each-block-keyed/input.svelte similarity index 100% rename from test/parser/samples/each-block-keyed/input.html rename to test/parser/samples/each-block-keyed/input.svelte diff --git a/test/parser/samples/each-block/input.html b/test/parser/samples/each-block/input.svelte similarity index 100% rename from test/parser/samples/each-block/input.html rename to test/parser/samples/each-block/input.svelte diff --git a/test/parser/samples/element-with-mustache/input.html b/test/parser/samples/element-with-mustache/input.svelte similarity index 100% rename from test/parser/samples/element-with-mustache/input.html rename to test/parser/samples/element-with-mustache/input.svelte diff --git a/test/parser/samples/element-with-text/input.html b/test/parser/samples/element-with-text/input.svelte similarity index 100% rename from test/parser/samples/element-with-text/input.html rename to test/parser/samples/element-with-text/input.svelte diff --git a/test/parser/samples/elements/input.html b/test/parser/samples/elements/input.svelte similarity index 100% rename from test/parser/samples/elements/input.html rename to test/parser/samples/elements/input.svelte diff --git a/test/parser/samples/error-binding-disabled/input.html b/test/parser/samples/error-binding-disabled/input.svelte similarity index 100% rename from test/parser/samples/error-binding-disabled/input.html rename to test/parser/samples/error-binding-disabled/input.svelte diff --git a/test/parser/samples/error-comment-unclosed/input.html b/test/parser/samples/error-comment-unclosed/input.svelte similarity index 100% rename from test/parser/samples/error-comment-unclosed/input.html rename to test/parser/samples/error-comment-unclosed/input.svelte diff --git a/test/parser/samples/error-css/input.html b/test/parser/samples/error-css/input.svelte similarity index 100% rename from test/parser/samples/error-css/input.html rename to test/parser/samples/error-css/input.svelte diff --git a/test/parser/samples/error-illegal-expression/input.html b/test/parser/samples/error-illegal-expression/input.svelte similarity index 100% rename from test/parser/samples/error-illegal-expression/input.html rename to test/parser/samples/error-illegal-expression/input.svelte diff --git a/test/parser/samples/error-multiple-styles/input.html b/test/parser/samples/error-multiple-styles/input.svelte similarity index 100% rename from test/parser/samples/error-multiple-styles/input.html rename to test/parser/samples/error-multiple-styles/input.svelte diff --git a/test/parser/samples/error-script-unclosed/input.html b/test/parser/samples/error-script-unclosed/input.svelte similarity index 100% rename from test/parser/samples/error-script-unclosed/input.html rename to test/parser/samples/error-script-unclosed/input.svelte diff --git a/test/parser/samples/error-self-reference/input.html b/test/parser/samples/error-self-reference/input.svelte similarity index 100% rename from test/parser/samples/error-self-reference/input.html rename to test/parser/samples/error-self-reference/input.svelte diff --git a/test/parser/samples/error-svelte-selfdestructive/input.html b/test/parser/samples/error-svelte-selfdestructive/input.svelte similarity index 100% rename from test/parser/samples/error-svelte-selfdestructive/input.html rename to test/parser/samples/error-svelte-selfdestructive/input.svelte diff --git a/test/parser/samples/error-unexpected-end-of-input-b/input.html b/test/parser/samples/error-unexpected-end-of-input-b/input.svelte similarity index 100% rename from test/parser/samples/error-unexpected-end-of-input-b/input.html rename to test/parser/samples/error-unexpected-end-of-input-b/input.svelte diff --git a/test/parser/samples/error-unexpected-end-of-input-c/input.html b/test/parser/samples/error-unexpected-end-of-input-c/input.svelte similarity index 100% rename from test/parser/samples/error-unexpected-end-of-input-c/input.html rename to test/parser/samples/error-unexpected-end-of-input-c/input.svelte diff --git a/test/parser/samples/error-unexpected-end-of-input-d/input.html b/test/parser/samples/error-unexpected-end-of-input-d/input.svelte similarity index 100% rename from test/parser/samples/error-unexpected-end-of-input-d/input.html rename to test/parser/samples/error-unexpected-end-of-input-d/input.svelte diff --git a/test/parser/samples/error-unexpected-end-of-input/input.html b/test/parser/samples/error-unexpected-end-of-input/input.svelte similarity index 100% rename from test/parser/samples/error-unexpected-end-of-input/input.html rename to test/parser/samples/error-unexpected-end-of-input/input.svelte diff --git a/test/parser/samples/error-unmatched-closing-tag/input.html b/test/parser/samples/error-unmatched-closing-tag/input.svelte similarity index 100% rename from test/parser/samples/error-unmatched-closing-tag/input.html rename to test/parser/samples/error-unmatched-closing-tag/input.svelte diff --git a/test/parser/samples/error-void-closing/input.html b/test/parser/samples/error-void-closing/input.svelte similarity index 100% rename from test/parser/samples/error-void-closing/input.html rename to test/parser/samples/error-void-closing/input.svelte diff --git a/test/parser/samples/error-window-children/input.html b/test/parser/samples/error-window-children/input.svelte similarity index 100% rename from test/parser/samples/error-window-children/input.html rename to test/parser/samples/error-window-children/input.svelte diff --git a/test/parser/samples/error-window-duplicate/input.html b/test/parser/samples/error-window-duplicate/input.svelte similarity index 100% rename from test/parser/samples/error-window-duplicate/input.html rename to test/parser/samples/error-window-duplicate/input.svelte diff --git a/test/parser/samples/error-window-inside-block/input.html b/test/parser/samples/error-window-inside-block/input.svelte similarity index 100% rename from test/parser/samples/error-window-inside-block/input.html rename to test/parser/samples/error-window-inside-block/input.svelte diff --git a/test/parser/samples/error-window-inside-element/input.html b/test/parser/samples/error-window-inside-element/input.svelte similarity index 100% rename from test/parser/samples/error-window-inside-element/input.html rename to test/parser/samples/error-window-inside-element/input.svelte diff --git a/test/parser/samples/event-handler/input.html b/test/parser/samples/event-handler/input.svelte similarity index 100% rename from test/parser/samples/event-handler/input.html rename to test/parser/samples/event-handler/input.svelte diff --git a/test/parser/samples/if-block-else/input.html b/test/parser/samples/if-block-else/input.svelte similarity index 100% rename from test/parser/samples/if-block-else/input.html rename to test/parser/samples/if-block-else/input.svelte diff --git a/test/parser/samples/if-block-elseif/input.html b/test/parser/samples/if-block-elseif/input.svelte similarity index 100% rename from test/parser/samples/if-block-elseif/input.html rename to test/parser/samples/if-block-elseif/input.svelte diff --git a/test/parser/samples/if-block/input.html b/test/parser/samples/if-block/input.svelte similarity index 100% rename from test/parser/samples/if-block/input.html rename to test/parser/samples/if-block/input.svelte diff --git a/test/parser/samples/implicitly-closed-li/input.html b/test/parser/samples/implicitly-closed-li/input.svelte similarity index 100% rename from test/parser/samples/implicitly-closed-li/input.html rename to test/parser/samples/implicitly-closed-li/input.svelte diff --git a/test/parser/samples/nbsp/input.html b/test/parser/samples/nbsp/input.svelte similarity index 100% rename from test/parser/samples/nbsp/input.html rename to test/parser/samples/nbsp/input.svelte diff --git a/test/parser/samples/raw-mustaches/input.html b/test/parser/samples/raw-mustaches/input.svelte similarity index 100% rename from test/parser/samples/raw-mustaches/input.html rename to test/parser/samples/raw-mustaches/input.svelte diff --git a/test/parser/samples/refs/input.html b/test/parser/samples/refs/input.svelte similarity index 100% rename from test/parser/samples/refs/input.html rename to test/parser/samples/refs/input.svelte diff --git a/test/parser/samples/script-comment-only/input.html b/test/parser/samples/script-comment-only/input.svelte similarity index 100% rename from test/parser/samples/script-comment-only/input.html rename to test/parser/samples/script-comment-only/input.svelte diff --git a/test/parser/samples/script-comment-trailing-multiline/input.html b/test/parser/samples/script-comment-trailing-multiline/input.svelte similarity index 100% rename from test/parser/samples/script-comment-trailing-multiline/input.html rename to test/parser/samples/script-comment-trailing-multiline/input.svelte diff --git a/test/parser/samples/script-comment-trailing/input.html b/test/parser/samples/script-comment-trailing/input.svelte similarity index 100% rename from test/parser/samples/script-comment-trailing/input.html rename to test/parser/samples/script-comment-trailing/input.svelte diff --git a/test/parser/samples/script/input.html b/test/parser/samples/script/input.svelte similarity index 100% rename from test/parser/samples/script/input.html rename to test/parser/samples/script/input.svelte diff --git a/test/parser/samples/self-closing-element/input.html b/test/parser/samples/self-closing-element/input.svelte similarity index 100% rename from test/parser/samples/self-closing-element/input.html rename to test/parser/samples/self-closing-element/input.svelte diff --git a/test/parser/samples/self-reference/input.html b/test/parser/samples/self-reference/input.svelte similarity index 100% rename from test/parser/samples/self-reference/input.html rename to test/parser/samples/self-reference/input.svelte diff --git a/test/parser/samples/space-between-mustaches/input.html b/test/parser/samples/space-between-mustaches/input.svelte similarity index 100% rename from test/parser/samples/space-between-mustaches/input.html rename to test/parser/samples/space-between-mustaches/input.svelte diff --git a/test/parser/samples/spread/input.html b/test/parser/samples/spread/input.svelte similarity index 100% rename from test/parser/samples/spread/input.html rename to test/parser/samples/spread/input.svelte diff --git a/test/parser/samples/textarea-children/input.html b/test/parser/samples/textarea-children/input.svelte similarity index 100% rename from test/parser/samples/textarea-children/input.html rename to test/parser/samples/textarea-children/input.svelte diff --git a/test/parser/samples/transition-intro-no-params/input.html b/test/parser/samples/transition-intro-no-params/input.svelte similarity index 100% rename from test/parser/samples/transition-intro-no-params/input.html rename to test/parser/samples/transition-intro-no-params/input.svelte diff --git a/test/parser/samples/transition-intro/input.html b/test/parser/samples/transition-intro/input.svelte similarity index 100% rename from test/parser/samples/transition-intro/input.html rename to test/parser/samples/transition-intro/input.svelte diff --git a/test/parser/samples/unusual-identifier/input.html b/test/parser/samples/unusual-identifier/input.svelte similarity index 100% rename from test/parser/samples/unusual-identifier/input.html rename to test/parser/samples/unusual-identifier/input.svelte diff --git a/test/parser/samples/whitespace-leading-trailing/input.html b/test/parser/samples/whitespace-leading-trailing/input.svelte similarity index 100% rename from test/parser/samples/whitespace-leading-trailing/input.html rename to test/parser/samples/whitespace-leading-trailing/input.svelte diff --git a/test/parser/samples/whitespace-normal/input.html b/test/parser/samples/whitespace-normal/input.svelte similarity index 100% rename from test/parser/samples/whitespace-normal/input.html rename to test/parser/samples/whitespace-normal/input.svelte diff --git a/test/parser/samples/yield/input.html b/test/parser/samples/yield/input.svelte similarity index 100% rename from test/parser/samples/yield/input.html rename to test/parser/samples/yield/input.svelte diff --git a/test/preprocess/samples/dependencies/input.html b/test/preprocess/samples/dependencies/input.svelte similarity index 100% rename from test/preprocess/samples/dependencies/input.html rename to test/preprocess/samples/dependencies/input.svelte diff --git a/test/preprocess/samples/dependencies/output.html b/test/preprocess/samples/dependencies/output.svelte similarity index 100% rename from test/preprocess/samples/dependencies/output.html rename to test/preprocess/samples/dependencies/output.svelte diff --git a/test/preprocess/samples/filename/input.html b/test/preprocess/samples/filename/input.svelte similarity index 100% rename from test/preprocess/samples/filename/input.html rename to test/preprocess/samples/filename/input.svelte diff --git a/test/preprocess/samples/filename/output.html b/test/preprocess/samples/filename/output.svelte similarity index 60% rename from test/preprocess/samples/filename/output.html rename to test/preprocess/samples/filename/output.svelte index 90fa180704..1dcf67cc00 100644 --- a/test/preprocess/samples/filename/output.html +++ b/test/preprocess/samples/filename/output.svelte @@ -1,3 +1,3 @@

    Hello file.html!

    - \ No newline at end of file + \ No newline at end of file diff --git a/test/preprocess/samples/ignores-null/input.html b/test/preprocess/samples/ignores-null/input.svelte similarity index 100% rename from test/preprocess/samples/ignores-null/input.html rename to test/preprocess/samples/ignores-null/input.svelte diff --git a/test/preprocess/samples/ignores-null/output.html b/test/preprocess/samples/ignores-null/output.svelte similarity index 100% rename from test/preprocess/samples/ignores-null/output.html rename to test/preprocess/samples/ignores-null/output.svelte diff --git a/test/preprocess/samples/markup/input.html b/test/preprocess/samples/markup/input.svelte similarity index 100% rename from test/preprocess/samples/markup/input.html rename to test/preprocess/samples/markup/input.svelte diff --git a/test/preprocess/samples/markup/output.html b/test/preprocess/samples/markup/output.svelte similarity index 100% rename from test/preprocess/samples/markup/output.html rename to test/preprocess/samples/markup/output.svelte diff --git a/test/preprocess/samples/multiple-preprocessors/input.html b/test/preprocess/samples/multiple-preprocessors/input.svelte similarity index 100% rename from test/preprocess/samples/multiple-preprocessors/input.html rename to test/preprocess/samples/multiple-preprocessors/input.svelte diff --git a/test/preprocess/samples/multiple-preprocessors/output.html b/test/preprocess/samples/multiple-preprocessors/output.svelte similarity index 100% rename from test/preprocess/samples/multiple-preprocessors/output.html rename to test/preprocess/samples/multiple-preprocessors/output.svelte diff --git a/test/preprocess/samples/script-multiple/input.html b/test/preprocess/samples/script-multiple/input.svelte similarity index 100% rename from test/preprocess/samples/script-multiple/input.html rename to test/preprocess/samples/script-multiple/input.svelte diff --git a/test/preprocess/samples/script-multiple/output.html b/test/preprocess/samples/script-multiple/output.svelte similarity index 100% rename from test/preprocess/samples/script-multiple/output.html rename to test/preprocess/samples/script-multiple/output.svelte diff --git a/test/preprocess/samples/script/input.html b/test/preprocess/samples/script/input.svelte similarity index 100% rename from test/preprocess/samples/script/input.html rename to test/preprocess/samples/script/input.svelte diff --git a/test/preprocess/samples/script/output.html b/test/preprocess/samples/script/output.svelte similarity index 100% rename from test/preprocess/samples/script/output.html rename to test/preprocess/samples/script/output.svelte diff --git a/test/preprocess/samples/style-async/input.html b/test/preprocess/samples/style-async/input.svelte similarity index 100% rename from test/preprocess/samples/style-async/input.html rename to test/preprocess/samples/style-async/input.svelte diff --git a/test/preprocess/samples/style-async/output.html b/test/preprocess/samples/style-async/output.svelte similarity index 100% rename from test/preprocess/samples/style-async/output.html rename to test/preprocess/samples/style-async/output.svelte diff --git a/test/preprocess/samples/style-attributes/input.html b/test/preprocess/samples/style-attributes/input.svelte similarity index 100% rename from test/preprocess/samples/style-attributes/input.html rename to test/preprocess/samples/style-attributes/input.svelte diff --git a/test/preprocess/samples/style-attributes/output.html b/test/preprocess/samples/style-attributes/output.svelte similarity index 100% rename from test/preprocess/samples/style-attributes/output.html rename to test/preprocess/samples/style-attributes/output.svelte diff --git a/test/preprocess/samples/style/input.html b/test/preprocess/samples/style/input.svelte similarity index 100% rename from test/preprocess/samples/style/input.html rename to test/preprocess/samples/style/input.svelte diff --git a/test/preprocess/samples/style/output.html b/test/preprocess/samples/style/output.svelte similarity index 100% rename from test/preprocess/samples/style/output.html rename to test/preprocess/samples/style/output.svelte diff --git a/test/runtime/samples/action-custom-event-handler-in-each-destructured/main.html b/test/runtime/samples/action-custom-event-handler-in-each-destructured/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler-in-each-destructured/main.html rename to test/runtime/samples/action-custom-event-handler-in-each-destructured/main.svelte diff --git a/test/runtime/samples/action-custom-event-handler-in-each/main.html b/test/runtime/samples/action-custom-event-handler-in-each/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler-in-each/main.html rename to test/runtime/samples/action-custom-event-handler-in-each/main.svelte diff --git a/test/runtime/samples/action-custom-event-handler-node-context/main.html b/test/runtime/samples/action-custom-event-handler-node-context/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler-node-context/main.html rename to test/runtime/samples/action-custom-event-handler-node-context/main.svelte diff --git a/test/runtime/samples/action-custom-event-handler-this/main.html b/test/runtime/samples/action-custom-event-handler-this/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler-this/main.html rename to test/runtime/samples/action-custom-event-handler-this/main.svelte diff --git a/test/runtime/samples/action-custom-event-handler-with-context/main.html b/test/runtime/samples/action-custom-event-handler-with-context/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler-with-context/main.html rename to test/runtime/samples/action-custom-event-handler-with-context/main.svelte diff --git a/test/runtime/samples/action-custom-event-handler/main.html b/test/runtime/samples/action-custom-event-handler/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler/main.html rename to test/runtime/samples/action-custom-event-handler/main.svelte diff --git a/test/runtime/samples/action-function/main.html b/test/runtime/samples/action-function/main.svelte similarity index 100% rename from test/runtime/samples/action-function/main.html rename to test/runtime/samples/action-function/main.svelte diff --git a/test/runtime/samples/action-ternary-template/main.html b/test/runtime/samples/action-ternary-template/main.svelte similarity index 100% rename from test/runtime/samples/action-ternary-template/main.html rename to test/runtime/samples/action-ternary-template/main.svelte diff --git a/test/runtime/samples/action-this/main.html b/test/runtime/samples/action-this/main.svelte similarity index 100% rename from test/runtime/samples/action-this/main.html rename to test/runtime/samples/action-this/main.svelte diff --git a/test/runtime/samples/action-update/main.html b/test/runtime/samples/action-update/main.svelte similarity index 100% rename from test/runtime/samples/action-update/main.html rename to test/runtime/samples/action-update/main.svelte diff --git a/test/runtime/samples/action/main.html b/test/runtime/samples/action/main.svelte similarity index 100% rename from test/runtime/samples/action/main.html rename to test/runtime/samples/action/main.svelte diff --git a/test/runtime/samples/after-render-prevents-loop/main.html b/test/runtime/samples/after-render-prevents-loop/main.svelte similarity index 100% rename from test/runtime/samples/after-render-prevents-loop/main.html rename to test/runtime/samples/after-render-prevents-loop/main.svelte diff --git a/test/runtime/samples/after-render-triggers-update/main.html b/test/runtime/samples/after-render-triggers-update/main.svelte similarity index 100% rename from test/runtime/samples/after-render-triggers-update/main.html rename to test/runtime/samples/after-render-triggers-update/main.svelte diff --git a/test/runtime/samples/animation-css/main.html b/test/runtime/samples/animation-css/main.svelte similarity index 100% rename from test/runtime/samples/animation-css/main.html rename to test/runtime/samples/animation-css/main.svelte diff --git a/test/runtime/samples/animation-js-delay/main.html b/test/runtime/samples/animation-js-delay/main.svelte similarity index 100% rename from test/runtime/samples/animation-js-delay/main.html rename to test/runtime/samples/animation-js-delay/main.svelte diff --git a/test/runtime/samples/animation-js-easing/main.html b/test/runtime/samples/animation-js-easing/main.svelte similarity index 100% rename from test/runtime/samples/animation-js-easing/main.html rename to test/runtime/samples/animation-js-easing/main.svelte diff --git a/test/runtime/samples/animation-js/main.html b/test/runtime/samples/animation-js/main.svelte similarity index 100% rename from test/runtime/samples/animation-js/main.html rename to test/runtime/samples/animation-js/main.svelte diff --git a/test/runtime/samples/assignment-in-init/main.html b/test/runtime/samples/assignment-in-init/main.svelte similarity index 100% rename from test/runtime/samples/assignment-in-init/main.html rename to test/runtime/samples/assignment-in-init/main.svelte diff --git a/test/runtime/samples/assignment-to-computed-property/main.html b/test/runtime/samples/assignment-to-computed-property/main.svelte similarity index 100% rename from test/runtime/samples/assignment-to-computed-property/main.html rename to test/runtime/samples/assignment-to-computed-property/main.svelte diff --git a/test/runtime/samples/attribute-boolean-false/main.html b/test/runtime/samples/attribute-boolean-false/main.svelte similarity index 100% rename from test/runtime/samples/attribute-boolean-false/main.html rename to test/runtime/samples/attribute-boolean-false/main.svelte diff --git a/test/runtime/samples/attribute-boolean-indeterminate/main.html b/test/runtime/samples/attribute-boolean-indeterminate/main.svelte similarity index 100% rename from test/runtime/samples/attribute-boolean-indeterminate/main.html rename to test/runtime/samples/attribute-boolean-indeterminate/main.svelte diff --git a/test/runtime/samples/attribute-boolean-true/main.html b/test/runtime/samples/attribute-boolean-true/main.svelte similarity index 100% rename from test/runtime/samples/attribute-boolean-true/main.html rename to test/runtime/samples/attribute-boolean-true/main.svelte diff --git a/test/runtime/samples/attribute-casing/main.html b/test/runtime/samples/attribute-casing/main.svelte similarity index 100% rename from test/runtime/samples/attribute-casing/main.html rename to test/runtime/samples/attribute-casing/main.svelte diff --git a/test/runtime/samples/attribute-dynamic-multiple/main.html b/test/runtime/samples/attribute-dynamic-multiple/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic-multiple/main.html rename to test/runtime/samples/attribute-dynamic-multiple/main.svelte diff --git a/test/runtime/samples/attribute-dynamic-no-dependencies/main.html b/test/runtime/samples/attribute-dynamic-no-dependencies/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic-no-dependencies/main.html rename to test/runtime/samples/attribute-dynamic-no-dependencies/main.svelte diff --git a/test/runtime/samples/attribute-dynamic-quotemarks/main.html b/test/runtime/samples/attribute-dynamic-quotemarks/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic-quotemarks/main.html rename to test/runtime/samples/attribute-dynamic-quotemarks/main.svelte diff --git a/test/runtime/samples/attribute-dynamic-shorthand/main.html b/test/runtime/samples/attribute-dynamic-shorthand/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic-shorthand/main.html rename to test/runtime/samples/attribute-dynamic-shorthand/main.svelte diff --git a/test/runtime/samples/attribute-dynamic-type/main.html b/test/runtime/samples/attribute-dynamic-type/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic-type/main.html rename to test/runtime/samples/attribute-dynamic-type/main.svelte diff --git a/test/runtime/samples/attribute-dynamic/main.html b/test/runtime/samples/attribute-dynamic/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic/main.html rename to test/runtime/samples/attribute-dynamic/main.svelte diff --git a/test/runtime/samples/attribute-empty-svg/main.html b/test/runtime/samples/attribute-empty-svg/main.svelte similarity index 100% rename from test/runtime/samples/attribute-empty-svg/main.html rename to test/runtime/samples/attribute-empty-svg/main.svelte diff --git a/test/runtime/samples/attribute-empty/main.html b/test/runtime/samples/attribute-empty/main.svelte similarity index 100% rename from test/runtime/samples/attribute-empty/main.html rename to test/runtime/samples/attribute-empty/main.svelte diff --git a/test/runtime/samples/attribute-namespaced/main.html b/test/runtime/samples/attribute-namespaced/main.svelte similarity index 100% rename from test/runtime/samples/attribute-namespaced/main.html rename to test/runtime/samples/attribute-namespaced/main.svelte diff --git a/test/runtime/samples/attribute-partial-number/Component.html b/test/runtime/samples/attribute-partial-number/Component.svelte similarity index 100% rename from test/runtime/samples/attribute-partial-number/Component.html rename to test/runtime/samples/attribute-partial-number/Component.svelte diff --git a/test/runtime/samples/attribute-partial-number/main.html b/test/runtime/samples/attribute-partial-number/main.html deleted file mode 100644 index c720ea4eed..0000000000 --- a/test/runtime/samples/attribute-partial-number/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/attribute-partial-number/main.svelte b/test/runtime/samples/attribute-partial-number/main.svelte new file mode 100644 index 0000000000..163116e4fa --- /dev/null +++ b/test/runtime/samples/attribute-partial-number/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/attribute-prefer-expression/main.html b/test/runtime/samples/attribute-prefer-expression/main.svelte similarity index 100% rename from test/runtime/samples/attribute-prefer-expression/main.html rename to test/runtime/samples/attribute-prefer-expression/main.svelte diff --git a/test/runtime/samples/attribute-static-at-symbol/main.html b/test/runtime/samples/attribute-static-at-symbol/main.svelte similarity index 100% rename from test/runtime/samples/attribute-static-at-symbol/main.html rename to test/runtime/samples/attribute-static-at-symbol/main.svelte diff --git a/test/runtime/samples/attribute-static-boolean/main.html b/test/runtime/samples/attribute-static-boolean/main.svelte similarity index 100% rename from test/runtime/samples/attribute-static-boolean/main.html rename to test/runtime/samples/attribute-static-boolean/main.svelte diff --git a/test/runtime/samples/attribute-static-quotemarks/main.html b/test/runtime/samples/attribute-static-quotemarks/main.svelte similarity index 100% rename from test/runtime/samples/attribute-static-quotemarks/main.html rename to test/runtime/samples/attribute-static-quotemarks/main.svelte diff --git a/test/runtime/samples/attribute-static/main.html b/test/runtime/samples/attribute-static/main.svelte similarity index 100% rename from test/runtime/samples/attribute-static/main.html rename to test/runtime/samples/attribute-static/main.svelte diff --git a/test/runtime/samples/attribute-unknown-without-value/main.html b/test/runtime/samples/attribute-unknown-without-value/main.svelte similarity index 100% rename from test/runtime/samples/attribute-unknown-without-value/main.html rename to test/runtime/samples/attribute-unknown-without-value/main.svelte diff --git a/test/runtime/samples/autofocus/main.html b/test/runtime/samples/autofocus/main.svelte similarity index 100% rename from test/runtime/samples/autofocus/main.html rename to test/runtime/samples/autofocus/main.svelte diff --git a/test/runtime/samples/await-component-oncreate/Foo.html b/test/runtime/samples/await-component-oncreate/Foo.svelte similarity index 100% rename from test/runtime/samples/await-component-oncreate/Foo.html rename to test/runtime/samples/await-component-oncreate/Foo.svelte diff --git a/test/runtime/samples/await-component-oncreate/main.html b/test/runtime/samples/await-component-oncreate/main.svelte similarity index 67% rename from test/runtime/samples/await-component-oncreate/main.html rename to test/runtime/samples/await-component-oncreate/main.svelte index 80a686962e..d1ddc16fd2 100644 --- a/test/runtime/samples/await-component-oncreate/main.html +++ b/test/runtime/samples/await-component-oncreate/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/await-containing-if/main.html b/test/runtime/samples/await-containing-if/main.svelte similarity index 100% rename from test/runtime/samples/await-containing-if/main.html rename to test/runtime/samples/await-containing-if/main.svelte diff --git a/test/runtime/samples/await-in-each/main.html b/test/runtime/samples/await-in-each/main.svelte similarity index 100% rename from test/runtime/samples/await-in-each/main.html rename to test/runtime/samples/await-in-each/main.svelte diff --git a/test/runtime/samples/await-set-simultaneous/main.html b/test/runtime/samples/await-set-simultaneous/main.svelte similarity index 100% rename from test/runtime/samples/await-set-simultaneous/main.html rename to test/runtime/samples/await-set-simultaneous/main.svelte diff --git a/test/runtime/samples/await-then-catch-anchor/main.html b/test/runtime/samples/await-then-catch-anchor/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-anchor/main.html rename to test/runtime/samples/await-then-catch-anchor/main.svelte diff --git a/test/runtime/samples/await-then-catch-event/main.html b/test/runtime/samples/await-then-catch-event/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-event/main.html rename to test/runtime/samples/await-then-catch-event/main.svelte diff --git a/test/runtime/samples/await-then-catch-if/main.html b/test/runtime/samples/await-then-catch-if/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-if/main.html rename to test/runtime/samples/await-then-catch-if/main.svelte diff --git a/test/runtime/samples/await-then-catch-in-slot/Foo.html b/test/runtime/samples/await-then-catch-in-slot/Foo.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-in-slot/Foo.html rename to test/runtime/samples/await-then-catch-in-slot/Foo.svelte diff --git a/test/runtime/samples/await-then-catch-in-slot/main.html b/test/runtime/samples/await-then-catch-in-slot/main.svelte similarity index 84% rename from test/runtime/samples/await-then-catch-in-slot/main.html rename to test/runtime/samples/await-then-catch-in-slot/main.svelte index ded116356c..3aa75374ea 100644 --- a/test/runtime/samples/await-then-catch-in-slot/main.html +++ b/test/runtime/samples/await-then-catch-in-slot/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/await-then-catch-multiple/main.html b/test/runtime/samples/await-then-catch-multiple/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-multiple/main.html rename to test/runtime/samples/await-then-catch-multiple/main.svelte diff --git a/test/runtime/samples/await-then-catch-no-values/main.html b/test/runtime/samples/await-then-catch-no-values/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-no-values/main.html rename to test/runtime/samples/await-then-catch-no-values/main.svelte diff --git a/test/runtime/samples/await-then-catch-non-promise/main.html b/test/runtime/samples/await-then-catch-non-promise/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-non-promise/main.html rename to test/runtime/samples/await-then-catch-non-promise/main.svelte diff --git a/test/runtime/samples/await-then-catch-order/main.html b/test/runtime/samples/await-then-catch-order/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-order/main.html rename to test/runtime/samples/await-then-catch-order/main.svelte diff --git a/test/runtime/samples/await-then-catch-static/main.html b/test/runtime/samples/await-then-catch-static/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-static/main.html rename to test/runtime/samples/await-then-catch-static/main.svelte diff --git a/test/runtime/samples/await-then-catch/main.html b/test/runtime/samples/await-then-catch/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch/main.html rename to test/runtime/samples/await-then-catch/main.svelte diff --git a/test/runtime/samples/await-then-shorthand/main.html b/test/runtime/samples/await-then-shorthand/main.svelte similarity index 100% rename from test/runtime/samples/await-then-shorthand/main.html rename to test/runtime/samples/await-then-shorthand/main.svelte diff --git a/test/runtime/samples/await-with-components/Widget.html b/test/runtime/samples/await-with-components/Widget.svelte similarity index 100% rename from test/runtime/samples/await-with-components/Widget.html rename to test/runtime/samples/await-with-components/Widget.svelte diff --git a/test/runtime/samples/await-with-components/main.html b/test/runtime/samples/await-with-components/main.svelte similarity index 78% rename from test/runtime/samples/await-with-components/main.html rename to test/runtime/samples/await-with-components/main.svelte index 84894997e1..02b32bb496 100644 --- a/test/runtime/samples/await-with-components/main.html +++ b/test/runtime/samples/await-with-components/main.svelte @@ -7,6 +7,6 @@ {/await} \ No newline at end of file diff --git a/test/runtime/samples/before-render-chain/Item.html b/test/runtime/samples/before-render-chain/Item.svelte similarity index 100% rename from test/runtime/samples/before-render-chain/Item.html rename to test/runtime/samples/before-render-chain/Item.svelte diff --git a/test/runtime/samples/before-render-chain/List.html b/test/runtime/samples/before-render-chain/List.svelte similarity index 82% rename from test/runtime/samples/before-render-chain/List.html rename to test/runtime/samples/before-render-chain/List.svelte index 645356bd92..5b12d8a104 100644 --- a/test/runtime/samples/before-render-chain/List.html +++ b/test/runtime/samples/before-render-chain/List.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/before-render-prevents-loop/main.html b/test/runtime/samples/before-render-prevents-loop/main.svelte similarity index 100% rename from test/runtime/samples/before-render-prevents-loop/main.html rename to test/runtime/samples/before-render-prevents-loop/main.svelte diff --git a/test/runtime/samples/binding-audio-currenttime-duration-volume/main.html b/test/runtime/samples/binding-audio-currenttime-duration-volume/main.svelte similarity index 100% rename from test/runtime/samples/binding-audio-currenttime-duration-volume/main.html rename to test/runtime/samples/binding-audio-currenttime-duration-volume/main.svelte diff --git a/test/runtime/samples/binding-indirect-computed/main.html b/test/runtime/samples/binding-indirect-computed/main.svelte similarity index 100% rename from test/runtime/samples/binding-indirect-computed/main.html rename to test/runtime/samples/binding-indirect-computed/main.svelte diff --git a/test/runtime/samples/binding-indirect/main.html b/test/runtime/samples/binding-indirect/main.svelte similarity index 100% rename from test/runtime/samples/binding-indirect/main.html rename to test/runtime/samples/binding-indirect/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox-deep-contextual/main.html b/test/runtime/samples/binding-input-checkbox-deep-contextual/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox-deep-contextual/main.html rename to test/runtime/samples/binding-input-checkbox-deep-contextual/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox-group-outside-each/main.html b/test/runtime/samples/binding-input-checkbox-group-outside-each/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox-group-outside-each/main.html rename to test/runtime/samples/binding-input-checkbox-group-outside-each/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox-group/main.html b/test/runtime/samples/binding-input-checkbox-group/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox-group/main.html rename to test/runtime/samples/binding-input-checkbox-group/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox-indeterminate/main.html b/test/runtime/samples/binding-input-checkbox-indeterminate/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox-indeterminate/main.html rename to test/runtime/samples/binding-input-checkbox-indeterminate/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox-with-event-in-each/main.html b/test/runtime/samples/binding-input-checkbox-with-event-in-each/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox-with-event-in-each/main.html rename to test/runtime/samples/binding-input-checkbox-with-event-in-each/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox/main.html b/test/runtime/samples/binding-input-checkbox/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox/main.html rename to test/runtime/samples/binding-input-checkbox/main.svelte diff --git a/test/runtime/samples/binding-input-number/main.html b/test/runtime/samples/binding-input-number/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-number/main.html rename to test/runtime/samples/binding-input-number/main.svelte diff --git a/test/runtime/samples/binding-input-radio-group/main.html b/test/runtime/samples/binding-input-radio-group/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-radio-group/main.html rename to test/runtime/samples/binding-input-radio-group/main.svelte diff --git a/test/runtime/samples/binding-input-range-change/main.html b/test/runtime/samples/binding-input-range-change/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-range-change/main.html rename to test/runtime/samples/binding-input-range-change/main.svelte diff --git a/test/runtime/samples/binding-input-range/main.html b/test/runtime/samples/binding-input-range/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-range/main.html rename to test/runtime/samples/binding-input-range/main.svelte diff --git a/test/runtime/samples/binding-input-text-contextual-deconflicted/main.html b/test/runtime/samples/binding-input-text-contextual-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-contextual-deconflicted/main.html rename to test/runtime/samples/binding-input-text-contextual-deconflicted/main.svelte diff --git a/test/runtime/samples/binding-input-text-contextual/main.html b/test/runtime/samples/binding-input-text-contextual/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-contextual/main.html rename to test/runtime/samples/binding-input-text-contextual/main.svelte diff --git a/test/runtime/samples/binding-input-text-deconflicted/main.html b/test/runtime/samples/binding-input-text-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deconflicted/main.html rename to test/runtime/samples/binding-input-text-deconflicted/main.svelte diff --git a/test/runtime/samples/binding-input-text-deep-computed-dynamic/main.html b/test/runtime/samples/binding-input-text-deep-computed-dynamic/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deep-computed-dynamic/main.html rename to test/runtime/samples/binding-input-text-deep-computed-dynamic/main.svelte diff --git a/test/runtime/samples/binding-input-text-deep-computed/main.html b/test/runtime/samples/binding-input-text-deep-computed/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deep-computed/main.html rename to test/runtime/samples/binding-input-text-deep-computed/main.svelte diff --git a/test/runtime/samples/binding-input-text-deep-contextual-computed-dynamic/main.html b/test/runtime/samples/binding-input-text-deep-contextual-computed-dynamic/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deep-contextual-computed-dynamic/main.html rename to test/runtime/samples/binding-input-text-deep-contextual-computed-dynamic/main.svelte diff --git a/test/runtime/samples/binding-input-text-deep-contextual/main.html b/test/runtime/samples/binding-input-text-deep-contextual/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deep-contextual/main.html rename to test/runtime/samples/binding-input-text-deep-contextual/main.svelte diff --git a/test/runtime/samples/binding-input-text-deep/main.html b/test/runtime/samples/binding-input-text-deep/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deep/main.html rename to test/runtime/samples/binding-input-text-deep/main.svelte diff --git a/test/runtime/samples/binding-input-text/main.html b/test/runtime/samples/binding-input-text/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text/main.html rename to test/runtime/samples/binding-input-text/main.svelte diff --git a/test/runtime/samples/binding-input-with-event/main.html b/test/runtime/samples/binding-input-with-event/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-with-event/main.html rename to test/runtime/samples/binding-input-with-event/main.svelte diff --git a/test/runtime/samples/binding-select-implicit-option-value/main.html b/test/runtime/samples/binding-select-implicit-option-value/main.svelte similarity index 100% rename from test/runtime/samples/binding-select-implicit-option-value/main.html rename to test/runtime/samples/binding-select-implicit-option-value/main.svelte diff --git a/test/runtime/samples/binding-select-in-each-block/main.html b/test/runtime/samples/binding-select-in-each-block/main.svelte similarity index 100% rename from test/runtime/samples/binding-select-in-each-block/main.html rename to test/runtime/samples/binding-select-in-each-block/main.svelte diff --git a/test/runtime/samples/binding-select-in-yield/Modal.html b/test/runtime/samples/binding-select-in-yield/Modal.svelte similarity index 100% rename from test/runtime/samples/binding-select-in-yield/Modal.html rename to test/runtime/samples/binding-select-in-yield/Modal.svelte diff --git a/test/runtime/samples/binding-select-in-yield/main.html b/test/runtime/samples/binding-select-in-yield/main.svelte similarity index 85% rename from test/runtime/samples/binding-select-in-yield/main.html rename to test/runtime/samples/binding-select-in-yield/main.svelte index cb1499e1c7..2d3ef28f28 100644 --- a/test/runtime/samples/binding-select-in-yield/main.html +++ b/test/runtime/samples/binding-select-in-yield/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/binding-this-element-reactive/main.html b/test/runtime/samples/binding-this-element-reactive/main.svelte similarity index 100% rename from test/runtime/samples/binding-this-element-reactive/main.html rename to test/runtime/samples/binding-this-element-reactive/main.svelte diff --git a/test/runtime/samples/binding-this-no-innerhtml/main.html b/test/runtime/samples/binding-this-no-innerhtml/main.svelte similarity index 100% rename from test/runtime/samples/binding-this-no-innerhtml/main.html rename to test/runtime/samples/binding-this-no-innerhtml/main.svelte diff --git a/test/runtime/samples/binding-this-unset/main.html b/test/runtime/samples/binding-this-unset/main.svelte similarity index 100% rename from test/runtime/samples/binding-this-unset/main.html rename to test/runtime/samples/binding-this-unset/main.svelte diff --git a/test/runtime/samples/binding-this-with-context/main.html b/test/runtime/samples/binding-this-with-context/main.svelte similarity index 100% rename from test/runtime/samples/binding-this-with-context/main.html rename to test/runtime/samples/binding-this-with-context/main.svelte diff --git a/test/runtime/samples/binding-this/main.html b/test/runtime/samples/binding-this/main.svelte similarity index 100% rename from test/runtime/samples/binding-this/main.html rename to test/runtime/samples/binding-this/main.svelte diff --git a/test/runtime/samples/bindings-before-onmount/One.html b/test/runtime/samples/bindings-before-onmount/One.svelte similarity index 74% rename from test/runtime/samples/bindings-before-onmount/One.html rename to test/runtime/samples/bindings-before-onmount/One.svelte index b2ba905ec9..5dd38a6f08 100644 --- a/test/runtime/samples/bindings-before-onmount/One.html +++ b/test/runtime/samples/bindings-before-onmount/One.svelte @@ -1,6 +1,6 @@ - - \ No newline at end of file diff --git a/test/runtime/samples/bindings-before-onmount/main.svelte b/test/runtime/samples/bindings-before-onmount/main.svelte new file mode 100644 index 0000000000..65c1221b26 --- /dev/null +++ b/test/runtime/samples/bindings-before-onmount/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/bindings-coalesced/Foo.html b/test/runtime/samples/bindings-coalesced/Foo.svelte similarity index 100% rename from test/runtime/samples/bindings-coalesced/Foo.html rename to test/runtime/samples/bindings-coalesced/Foo.svelte diff --git a/test/runtime/samples/bindings-coalesced/main.html b/test/runtime/samples/bindings-coalesced/main.svelte similarity index 66% rename from test/runtime/samples/bindings-coalesced/main.html rename to test/runtime/samples/bindings-coalesced/main.svelte index cf0b85491a..003f89c6d9 100644 --- a/test/runtime/samples/bindings-coalesced/main.html +++ b/test/runtime/samples/bindings-coalesced/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-each/Widget.html b/test/runtime/samples/component-binding-each/Widget.svelte similarity index 100% rename from test/runtime/samples/component-binding-each/Widget.html rename to test/runtime/samples/component-binding-each/Widget.svelte diff --git a/test/runtime/samples/component-binding-each/main.html b/test/runtime/samples/component-binding-each/main.svelte similarity index 64% rename from test/runtime/samples/component-binding-each/main.html rename to test/runtime/samples/component-binding-each/main.svelte index 49ab04e68f..36a7c46225 100644 --- a/test/runtime/samples/component-binding-each/main.html +++ b/test/runtime/samples/component-binding-each/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-infinite-loop/A.html b/test/runtime/samples/component-binding-infinite-loop/A.svelte similarity index 58% rename from test/runtime/samples/component-binding-infinite-loop/A.html rename to test/runtime/samples/component-binding-infinite-loop/A.svelte index d4a9bf8eac..8ba3ec20f3 100644 --- a/test/runtime/samples/component-binding-infinite-loop/A.html +++ b/test/runtime/samples/component-binding-infinite-loop/A.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-infinite-loop/B.html b/test/runtime/samples/component-binding-infinite-loop/B.svelte similarity index 83% rename from test/runtime/samples/component-binding-infinite-loop/B.html rename to test/runtime/samples/component-binding-infinite-loop/B.svelte index 72bbbe4110..cbc8160679 100644 --- a/test/runtime/samples/component-binding-infinite-loop/B.html +++ b/test/runtime/samples/component-binding-infinite-loop/B.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-nested/Bar.html b/test/runtime/samples/component-binding-nested/Bar.svelte similarity index 71% rename from test/runtime/samples/component-binding-nested/Bar.html rename to test/runtime/samples/component-binding-nested/Bar.svelte index 9ed5c6f42c..19159f168d 100644 --- a/test/runtime/samples/component-binding-nested/Bar.html +++ b/test/runtime/samples/component-binding-nested/Bar.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-nested/Baz.html b/test/runtime/samples/component-binding-nested/Baz.svelte similarity index 100% rename from test/runtime/samples/component-binding-nested/Baz.html rename to test/runtime/samples/component-binding-nested/Baz.svelte diff --git a/test/runtime/samples/component-binding-nested/Foo.html b/test/runtime/samples/component-binding-nested/Foo.svelte similarity index 71% rename from test/runtime/samples/component-binding-nested/Foo.html rename to test/runtime/samples/component-binding-nested/Foo.svelte index 500480eae6..4a3e59afe7 100644 --- a/test/runtime/samples/component-binding-nested/Foo.html +++ b/test/runtime/samples/component-binding-nested/Foo.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-nested/main.html b/test/runtime/samples/component-binding-nested/main.svelte similarity index 52% rename from test/runtime/samples/component-binding-nested/main.html rename to test/runtime/samples/component-binding-nested/main.svelte index cae8f4dc52..18f96b310c 100644 --- a/test/runtime/samples/component-binding-nested/main.html +++ b/test/runtime/samples/component-binding-nested/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.html b/test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.svelte similarity index 100% rename from test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.html rename to test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.svelte diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.html b/test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.svelte similarity index 100% rename from test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.html rename to test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.svelte diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/main.html b/test/runtime/samples/component-binding-parent-supercedes-child-b/main.svelte similarity index 55% rename from test/runtime/samples/component-binding-parent-supercedes-child-b/main.html rename to test/runtime/samples/component-binding-parent-supercedes-child-b/main.svelte index aaad9eb2fe..e6edf3b1f7 100644 --- a/test/runtime/samples/component-binding-parent-supercedes-child-b/main.html +++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/main.svelte @@ -1,6 +1,6 @@ diff --git a/test/runtime/samples/component-binding-private-state/Bar.html b/test/runtime/samples/component-binding-private-state/Bar.svelte similarity index 100% rename from test/runtime/samples/component-binding-private-state/Bar.html rename to test/runtime/samples/component-binding-private-state/Bar.svelte diff --git a/test/runtime/samples/component-binding-private-state/Foo.html b/test/runtime/samples/component-binding-private-state/Foo.svelte similarity index 100% rename from test/runtime/samples/component-binding-private-state/Foo.html rename to test/runtime/samples/component-binding-private-state/Foo.svelte diff --git a/test/runtime/samples/component-binding-private-state/main.html b/test/runtime/samples/component-binding-private-state/main.svelte similarity index 55% rename from test/runtime/samples/component-binding-private-state/main.html rename to test/runtime/samples/component-binding-private-state/main.svelte index ffc5bd188d..426ef04bad 100644 --- a/test/runtime/samples/component-binding-private-state/main.html +++ b/test/runtime/samples/component-binding-private-state/main.svelte @@ -1,6 +1,6 @@ diff --git a/test/runtime/samples/component-binding/Counter.html b/test/runtime/samples/component-binding/Counter.svelte similarity index 100% rename from test/runtime/samples/component-binding/Counter.html rename to test/runtime/samples/component-binding/Counter.svelte diff --git a/test/runtime/samples/component-binding/main.html b/test/runtime/samples/component-binding/main.svelte similarity index 51% rename from test/runtime/samples/component-binding/main.html rename to test/runtime/samples/component-binding/main.svelte index 5639d47eb1..3a582fe7bd 100644 --- a/test/runtime/samples/component-binding/main.html +++ b/test/runtime/samples/component-binding/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-data-dynamic-late/Widget.html b/test/runtime/samples/component-data-dynamic-late/Widget.svelte similarity index 100% rename from test/runtime/samples/component-data-dynamic-late/Widget.html rename to test/runtime/samples/component-data-dynamic-late/Widget.svelte diff --git a/test/runtime/samples/component-data-dynamic-late/main.html b/test/runtime/samples/component-data-dynamic-late/main.svelte similarity index 67% rename from test/runtime/samples/component-data-dynamic-late/main.html rename to test/runtime/samples/component-data-dynamic-late/main.svelte index 4c07837598..4e11d151cf 100644 --- a/test/runtime/samples/component-data-dynamic-late/main.html +++ b/test/runtime/samples/component-data-dynamic-late/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-data-dynamic/Widget.html b/test/runtime/samples/component-data-dynamic/Widget.svelte similarity index 100% rename from test/runtime/samples/component-data-dynamic/Widget.html rename to test/runtime/samples/component-data-dynamic/Widget.svelte diff --git a/test/runtime/samples/component-data-dynamic/main.html b/test/runtime/samples/component-data-dynamic/main.svelte similarity index 80% rename from test/runtime/samples/component-data-dynamic/main.html rename to test/runtime/samples/component-data-dynamic/main.svelte index 7c796ca9b6..42ef74a185 100644 --- a/test/runtime/samples/component-data-dynamic/main.html +++ b/test/runtime/samples/component-data-dynamic/main.svelte @@ -1,5 +1,5 @@ - -
    - -
    \ No newline at end of file diff --git a/test/runtime/samples/component-data-empty/main.svelte b/test/runtime/samples/component-data-empty/main.svelte new file mode 100644 index 0000000000..be6a137e8a --- /dev/null +++ b/test/runtime/samples/component-data-empty/main.svelte @@ -0,0 +1,7 @@ + + +
    + +
    \ No newline at end of file diff --git a/test/runtime/samples/component-data-static-boolean-regression/Link.html b/test/runtime/samples/component-data-static-boolean-regression/Link.svelte similarity index 100% rename from test/runtime/samples/component-data-static-boolean-regression/Link.html rename to test/runtime/samples/component-data-static-boolean-regression/Link.svelte diff --git a/test/runtime/samples/component-data-static-boolean-regression/main.html b/test/runtime/samples/component-data-static-boolean-regression/main.html deleted file mode 100644 index 8207fef20e..0000000000 --- a/test/runtime/samples/component-data-static-boolean-regression/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-data-static-boolean-regression/main.svelte b/test/runtime/samples/component-data-static-boolean-regression/main.svelte new file mode 100644 index 0000000000..492d1dc78a --- /dev/null +++ b/test/runtime/samples/component-data-static-boolean-regression/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-data-static-boolean/Foo.html b/test/runtime/samples/component-data-static-boolean/Foo.svelte similarity index 100% rename from test/runtime/samples/component-data-static-boolean/Foo.html rename to test/runtime/samples/component-data-static-boolean/Foo.svelte diff --git a/test/runtime/samples/component-data-static-boolean/main.html b/test/runtime/samples/component-data-static-boolean/main.html deleted file mode 100644 index cfaef9dea3..0000000000 --- a/test/runtime/samples/component-data-static-boolean/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-data-static-boolean/main.svelte b/test/runtime/samples/component-data-static-boolean/main.svelte new file mode 100644 index 0000000000..edb8e749af --- /dev/null +++ b/test/runtime/samples/component-data-static-boolean/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-data-static/Widget.html b/test/runtime/samples/component-data-static/Widget.svelte similarity index 100% rename from test/runtime/samples/component-data-static/Widget.html rename to test/runtime/samples/component-data-static/Widget.svelte diff --git a/test/runtime/samples/component-data-static/main.html b/test/runtime/samples/component-data-static/main.svelte similarity index 55% rename from test/runtime/samples/component-data-static/main.html rename to test/runtime/samples/component-data-static/main.svelte index ec8e37c45e..b116b262a0 100644 --- a/test/runtime/samples/component-data-static/main.html +++ b/test/runtime/samples/component-data-static/main.svelte @@ -1,5 +1,5 @@
    diff --git a/test/runtime/samples/component-event-not-stale/Button.html b/test/runtime/samples/component-event-not-stale/Button.svelte similarity index 100% rename from test/runtime/samples/component-event-not-stale/Button.html rename to test/runtime/samples/component-event-not-stale/Button.svelte diff --git a/test/runtime/samples/component-event-not-stale/main.html b/test/runtime/samples/component-event-not-stale/main.svelte similarity index 88% rename from test/runtime/samples/component-event-not-stale/main.html rename to test/runtime/samples/component-event-not-stale/main.svelte index 1beacd0e2d..0b2ab2c1ee 100644 --- a/test/runtime/samples/component-event-not-stale/main.html +++ b/test/runtime/samples/component-event-not-stale/main.svelte @@ -1,6 +1,6 @@ - - \ No newline at end of file diff --git a/test/runtime/samples/component-events-console/main.svelte b/test/runtime/samples/component-events-console/main.svelte new file mode 100644 index 0000000000..fba004b4eb --- /dev/null +++ b/test/runtime/samples/component-events-console/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-events-data/Widget.html b/test/runtime/samples/component-events-data/Widget.svelte similarity index 100% rename from test/runtime/samples/component-events-data/Widget.html rename to test/runtime/samples/component-events-data/Widget.svelte diff --git a/test/runtime/samples/component-events-data/main.html b/test/runtime/samples/component-events-data/main.svelte similarity index 81% rename from test/runtime/samples/component-events-data/main.html rename to test/runtime/samples/component-events-data/main.svelte index 5661404a46..ea44594ccd 100644 --- a/test/runtime/samples/component-events-data/main.html +++ b/test/runtime/samples/component-events-data/main.svelte @@ -1,6 +1,6 @@ diff --git a/test/runtime/samples/component-events-each/Widget.html b/test/runtime/samples/component-events-each/Widget.svelte similarity index 100% rename from test/runtime/samples/component-events-each/Widget.html rename to test/runtime/samples/component-events-each/Widget.svelte diff --git a/test/runtime/samples/component-events-each/main.html b/test/runtime/samples/component-events-each/main.svelte similarity index 85% rename from test/runtime/samples/component-events-each/main.html rename to test/runtime/samples/component-events-each/main.svelte index 4a5a694172..f229873431 100644 --- a/test/runtime/samples/component-events-each/main.html +++ b/test/runtime/samples/component-events-each/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-name-deconflicted/Nested.html b/test/runtime/samples/component-name-deconflicted/Nested.svelte similarity index 100% rename from test/runtime/samples/component-name-deconflicted/Nested.html rename to test/runtime/samples/component-name-deconflicted/Nested.svelte diff --git a/test/runtime/samples/component-name-deconflicted/main.html b/test/runtime/samples/component-name-deconflicted/main.svelte similarity index 70% rename from test/runtime/samples/component-name-deconflicted/main.html rename to test/runtime/samples/component-name-deconflicted/main.svelte index 03d43c357b..1649ad0a7d 100644 --- a/test/runtime/samples/component-name-deconflicted/main.html +++ b/test/runtime/samples/component-name-deconflicted/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-nested-deep/Level1.html b/test/runtime/samples/component-nested-deep/Level1.html deleted file mode 100644 index 246bc4dfb7..0000000000 --- a/test/runtime/samples/component-nested-deep/Level1.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deep/Level1.svelte b/test/runtime/samples/component-nested-deep/Level1.svelte new file mode 100644 index 0000000000..1889fa2bd0 --- /dev/null +++ b/test/runtime/samples/component-nested-deep/Level1.svelte @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deep/Level2.html b/test/runtime/samples/component-nested-deep/Level2.html deleted file mode 100644 index 4b992b5cb3..0000000000 --- a/test/runtime/samples/component-nested-deep/Level2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -level 2 - \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deep/Level2.svelte b/test/runtime/samples/component-nested-deep/Level2.svelte new file mode 100644 index 0000000000..500c4c9887 --- /dev/null +++ b/test/runtime/samples/component-nested-deep/Level2.svelte @@ -0,0 +1,6 @@ + + +level 2 + \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deep/Level3.html b/test/runtime/samples/component-nested-deep/Level3.svelte similarity index 100% rename from test/runtime/samples/component-nested-deep/Level3.html rename to test/runtime/samples/component-nested-deep/Level3.svelte diff --git a/test/runtime/samples/component-nested-deep/main.html b/test/runtime/samples/component-nested-deep/main.html deleted file mode 100644 index 57e4fc02b1..0000000000 --- a/test/runtime/samples/component-nested-deep/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deep/main.svelte b/test/runtime/samples/component-nested-deep/main.svelte new file mode 100644 index 0000000000..a7007e27ea --- /dev/null +++ b/test/runtime/samples/component-nested-deep/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deeper/Level1.html b/test/runtime/samples/component-nested-deeper/Level1.svelte similarity index 74% rename from test/runtime/samples/component-nested-deeper/Level1.html rename to test/runtime/samples/component-nested-deeper/Level1.svelte index 273e1b61c8..887782f121 100644 --- a/test/runtime/samples/component-nested-deeper/Level1.html +++ b/test/runtime/samples/component-nested-deeper/Level1.svelte @@ -1,6 +1,6 @@ diff --git a/test/runtime/samples/component-nested-deeper/Level2.html b/test/runtime/samples/component-nested-deeper/Level2.svelte similarity index 100% rename from test/runtime/samples/component-nested-deeper/Level2.html rename to test/runtime/samples/component-nested-deeper/Level2.svelte diff --git a/test/runtime/samples/component-nested-deeper/Level3.html b/test/runtime/samples/component-nested-deeper/Level3.svelte similarity index 100% rename from test/runtime/samples/component-nested-deeper/Level3.html rename to test/runtime/samples/component-nested-deeper/Level3.svelte diff --git a/test/runtime/samples/component-nested-deeper/main.html b/test/runtime/samples/component-nested-deeper/main.html deleted file mode 100644 index 4c72ae6743..0000000000 --- a/test/runtime/samples/component-nested-deeper/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deeper/main.svelte b/test/runtime/samples/component-nested-deeper/main.svelte new file mode 100644 index 0000000000..a1a6ff0de5 --- /dev/null +++ b/test/runtime/samples/component-nested-deeper/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-not-void/Link.html b/test/runtime/samples/component-not-void/Link.svelte similarity index 100% rename from test/runtime/samples/component-not-void/Link.html rename to test/runtime/samples/component-not-void/Link.svelte diff --git a/test/runtime/samples/component-not-void/main.html b/test/runtime/samples/component-not-void/main.html deleted file mode 100644 index 0769c81092..0000000000 --- a/test/runtime/samples/component-not-void/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Hello \ No newline at end of file diff --git a/test/runtime/samples/component-not-void/main.svelte b/test/runtime/samples/component-not-void/main.svelte new file mode 100644 index 0000000000..836777832b --- /dev/null +++ b/test/runtime/samples/component-not-void/main.svelte @@ -0,0 +1,5 @@ + + +Hello \ No newline at end of file diff --git a/test/runtime/samples/component-ref/Widget.html b/test/runtime/samples/component-ref/Widget.svelte similarity index 100% rename from test/runtime/samples/component-ref/Widget.html rename to test/runtime/samples/component-ref/Widget.svelte diff --git a/test/runtime/samples/component-ref/main.html b/test/runtime/samples/component-ref/main.svelte similarity index 62% rename from test/runtime/samples/component-ref/main.html rename to test/runtime/samples/component-ref/main.svelte index a91173c5af..1f51727c76 100644 --- a/test/runtime/samples/component-ref/main.html +++ b/test/runtime/samples/component-ref/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-shorthand-import/Widget.html b/test/runtime/samples/component-shorthand-import/Widget.svelte similarity index 100% rename from test/runtime/samples/component-shorthand-import/Widget.html rename to test/runtime/samples/component-shorthand-import/Widget.svelte diff --git a/test/runtime/samples/component-shorthand-import/main.html b/test/runtime/samples/component-shorthand-import/main.html deleted file mode 100644 index cbcde3f1ed..0000000000 --- a/test/runtime/samples/component-shorthand-import/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-shorthand-import/main.svelte b/test/runtime/samples/component-shorthand-import/main.svelte new file mode 100644 index 0000000000..0a9d5bba87 --- /dev/null +++ b/test/runtime/samples/component-shorthand-import/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-default/Nested.html b/test/runtime/samples/component-slot-default/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-default/Nested.html rename to test/runtime/samples/component-slot-default/Nested.svelte diff --git a/test/runtime/samples/component-slot-default/main.html b/test/runtime/samples/component-slot-default/main.html deleted file mode 100644 index 06a1f64cae..0000000000 --- a/test/runtime/samples/component-slot-default/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - Hello - \ No newline at end of file diff --git a/test/runtime/samples/component-slot-default/main.svelte b/test/runtime/samples/component-slot-default/main.svelte new file mode 100644 index 0000000000..1e1ea8daa8 --- /dev/null +++ b/test/runtime/samples/component-slot-default/main.svelte @@ -0,0 +1,7 @@ + + + + Hello + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-dynamic/Nested.html b/test/runtime/samples/component-slot-dynamic/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-dynamic/Nested.html rename to test/runtime/samples/component-slot-dynamic/Nested.svelte diff --git a/test/runtime/samples/component-slot-dynamic/main.html b/test/runtime/samples/component-slot-dynamic/main.svelte similarity index 67% rename from test/runtime/samples/component-slot-dynamic/main.html rename to test/runtime/samples/component-slot-dynamic/main.svelte index ad952b38bb..8eb876444a 100644 --- a/test/runtime/samples/component-slot-dynamic/main.html +++ b/test/runtime/samples/component-slot-dynamic/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-each-block/Nested.html b/test/runtime/samples/component-slot-each-block/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-each-block/Nested.html rename to test/runtime/samples/component-slot-each-block/Nested.svelte diff --git a/test/runtime/samples/component-slot-each-block/main.html b/test/runtime/samples/component-slot-each-block/main.svelte similarity index 69% rename from test/runtime/samples/component-slot-each-block/main.html rename to test/runtime/samples/component-slot-each-block/main.svelte index 911eb5c1ae..986c5c40e1 100644 --- a/test/runtime/samples/component-slot-each-block/main.html +++ b/test/runtime/samples/component-slot-each-block/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-empty/Nested.html b/test/runtime/samples/component-slot-empty/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-empty/Nested.html rename to test/runtime/samples/component-slot-empty/Nested.svelte diff --git a/test/runtime/samples/component-slot-empty/main.html b/test/runtime/samples/component-slot-empty/main.html deleted file mode 100644 index 3d76b0a696..0000000000 --- a/test/runtime/samples/component-slot-empty/main.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/test/runtime/samples/component-slot-empty/main.svelte b/test/runtime/samples/component-slot-empty/main.svelte new file mode 100644 index 0000000000..619060e4cb --- /dev/null +++ b/test/runtime/samples/component-slot-empty/main.svelte @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-fallback/Nested.html b/test/runtime/samples/component-slot-fallback/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-fallback/Nested.html rename to test/runtime/samples/component-slot-fallback/Nested.svelte diff --git a/test/runtime/samples/component-slot-fallback/main.html b/test/runtime/samples/component-slot-fallback/main.svelte similarity index 51% rename from test/runtime/samples/component-slot-fallback/main.html rename to test/runtime/samples/component-slot-fallback/main.svelte index f4d609216c..0bdb6f8b1d 100644 --- a/test/runtime/samples/component-slot-fallback/main.html +++ b/test/runtime/samples/component-slot-fallback/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-if-block-before-node/Nested.html b/test/runtime/samples/component-slot-if-block-before-node/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-if-block-before-node/Nested.html rename to test/runtime/samples/component-slot-if-block-before-node/Nested.svelte diff --git a/test/runtime/samples/component-slot-if-block/main.html b/test/runtime/samples/component-slot-if-block-before-node/main.svelte similarity index 69% rename from test/runtime/samples/component-slot-if-block/main.html rename to test/runtime/samples/component-slot-if-block-before-node/main.svelte index 2b0405a471..6e51f27649 100644 --- a/test/runtime/samples/component-slot-if-block/main.html +++ b/test/runtime/samples/component-slot-if-block-before-node/main.svelte @@ -1,13 +1,13 @@ -

    unconditional

    - {#if foo}

    conditional

    {/if} + +

    unconditional

    \ No newline at end of file diff --git a/test/runtime/samples/component-slot-if-block/Nested.html b/test/runtime/samples/component-slot-if-block/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-if-block/Nested.html rename to test/runtime/samples/component-slot-if-block/Nested.svelte diff --git a/test/runtime/samples/component-slot-if-block-before-node/main.html b/test/runtime/samples/component-slot-if-block/main.svelte similarity index 69% rename from test/runtime/samples/component-slot-if-block-before-node/main.html rename to test/runtime/samples/component-slot-if-block/main.svelte index 01ea1e8455..465da320a9 100644 --- a/test/runtime/samples/component-slot-if-block-before-node/main.html +++ b/test/runtime/samples/component-slot-if-block/main.svelte @@ -1,13 +1,13 @@ +

    unconditional

    + {#if foo}

    conditional

    {/if} - -

    unconditional

    \ No newline at end of file diff --git a/test/runtime/samples/component-slot-if-else-block-before-node/Nested.html b/test/runtime/samples/component-slot-if-else-block-before-node/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-if-else-block-before-node/Nested.html rename to test/runtime/samples/component-slot-if-else-block-before-node/Nested.svelte diff --git a/test/runtime/samples/component-slot-if-else-block-before-node/main.html b/test/runtime/samples/component-slot-if-else-block-before-node/main.svelte similarity index 74% rename from test/runtime/samples/component-slot-if-else-block-before-node/main.html rename to test/runtime/samples/component-slot-if-else-block-before-node/main.svelte index 684497b98a..0b24f77b16 100644 --- a/test/runtime/samples/component-slot-if-else-block-before-node/main.html +++ b/test/runtime/samples/component-slot-if-else-block-before-node/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-let-aliased/Nested.html b/test/runtime/samples/component-slot-let-aliased/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-let-aliased/Nested.html rename to test/runtime/samples/component-slot-let-aliased/Nested.svelte diff --git a/test/runtime/samples/component-slot-let-aliased/main.html b/test/runtime/samples/component-slot-let-aliased/main.svelte similarity index 65% rename from test/runtime/samples/component-slot-let-aliased/main.html rename to test/runtime/samples/component-slot-let-aliased/main.svelte index 1acb7fbcdc..468a58face 100644 --- a/test/runtime/samples/component-slot-let-aliased/main.html +++ b/test/runtime/samples/component-slot-let-aliased/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-let-b/Nested.html b/test/runtime/samples/component-slot-let-b/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-let-b/Nested.html rename to test/runtime/samples/component-slot-let-b/Nested.svelte diff --git a/test/runtime/samples/component-slot-let-b/main.html b/test/runtime/samples/component-slot-let-b/main.svelte similarity index 55% rename from test/runtime/samples/component-slot-let-b/main.html rename to test/runtime/samples/component-slot-let-b/main.svelte index b4fd5f54c6..4acec62b21 100644 --- a/test/runtime/samples/component-slot-let-b/main.html +++ b/test/runtime/samples/component-slot-let-b/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-let-c/Nested.html b/test/runtime/samples/component-slot-let-c/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-let-c/Nested.html rename to test/runtime/samples/component-slot-let-c/Nested.svelte diff --git a/test/runtime/samples/component-slot-let-c/main.html b/test/runtime/samples/component-slot-let-c/main.svelte similarity index 60% rename from test/runtime/samples/component-slot-let-c/main.html rename to test/runtime/samples/component-slot-let-c/main.svelte index b834fd8790..b594964303 100644 --- a/test/runtime/samples/component-slot-let-c/main.html +++ b/test/runtime/samples/component-slot-let-c/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-let-destructured/Nested.html b/test/runtime/samples/component-slot-let-destructured/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-let-destructured/Nested.html rename to test/runtime/samples/component-slot-let-destructured/Nested.svelte diff --git a/test/runtime/samples/component-slot-let-destructured/main.html b/test/runtime/samples/component-slot-let-destructured/main.svelte similarity index 67% rename from test/runtime/samples/component-slot-let-destructured/main.html rename to test/runtime/samples/component-slot-let-destructured/main.svelte index 488fd463de..1ee93bf105 100644 --- a/test/runtime/samples/component-slot-let-destructured/main.html +++ b/test/runtime/samples/component-slot-let-destructured/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-let-named/Nested.html b/test/runtime/samples/component-slot-let-named/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-let-named/Nested.html rename to test/runtime/samples/component-slot-let-named/Nested.svelte diff --git a/test/runtime/samples/component-slot-let-named/main.html b/test/runtime/samples/component-slot-let-named/main.svelte similarity index 71% rename from test/runtime/samples/component-slot-let-named/main.html rename to test/runtime/samples/component-slot-let-named/main.svelte index 1c3d3365c7..f9e9e3a10f 100644 --- a/test/runtime/samples/component-slot-let-named/main.html +++ b/test/runtime/samples/component-slot-let-named/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-let-static/Nested.html b/test/runtime/samples/component-slot-let-static/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-let-static/Nested.html rename to test/runtime/samples/component-slot-let-static/Nested.svelte diff --git a/test/runtime/samples/component-slot-let-static/main.html b/test/runtime/samples/component-slot-let-static/main.svelte similarity index 53% rename from test/runtime/samples/component-slot-let-static/main.html rename to test/runtime/samples/component-slot-let-static/main.svelte index 6e91b0d026..3eeaba976e 100644 --- a/test/runtime/samples/component-slot-let-static/main.html +++ b/test/runtime/samples/component-slot-let-static/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-let/Nested.html b/test/runtime/samples/component-slot-let/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-let/Nested.html rename to test/runtime/samples/component-slot-let/Nested.svelte diff --git a/test/runtime/samples/component-slot-let/main.html b/test/runtime/samples/component-slot-let/main.svelte similarity index 65% rename from test/runtime/samples/component-slot-let/main.html rename to test/runtime/samples/component-slot-let/main.svelte index 76d491389f..d00bb8e41e 100644 --- a/test/runtime/samples/component-slot-let/main.html +++ b/test/runtime/samples/component-slot-let/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-name-with-hyphen/Nested.html b/test/runtime/samples/component-slot-name-with-hyphen/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-name-with-hyphen/Nested.html rename to test/runtime/samples/component-slot-name-with-hyphen/Nested.svelte diff --git a/test/runtime/samples/component-slot-name-with-hyphen/main.html b/test/runtime/samples/component-slot-name-with-hyphen/main.svelte similarity index 54% rename from test/runtime/samples/component-slot-name-with-hyphen/main.html rename to test/runtime/samples/component-slot-name-with-hyphen/main.svelte index a77e524f89..13a65b2196 100644 --- a/test/runtime/samples/component-slot-name-with-hyphen/main.html +++ b/test/runtime/samples/component-slot-name-with-hyphen/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-named/Nested.html b/test/runtime/samples/component-slot-named/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-named/Nested.html rename to test/runtime/samples/component-slot-named/Nested.svelte diff --git a/test/runtime/samples/component-slot-named/main.html b/test/runtime/samples/component-slot-named/main.svelte similarity index 63% rename from test/runtime/samples/component-slot-named/main.html rename to test/runtime/samples/component-slot-named/main.svelte index 627c3ab7e0..e25587c1e5 100644 --- a/test/runtime/samples/component-slot-named/main.html +++ b/test/runtime/samples/component-slot-named/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-nested-component/Inner.html b/test/runtime/samples/component-slot-nested-component/Inner.svelte similarity index 100% rename from test/runtime/samples/component-slot-nested-component/Inner.html rename to test/runtime/samples/component-slot-nested-component/Inner.svelte diff --git a/test/runtime/samples/component-slot-nested-component/Outer.html b/test/runtime/samples/component-slot-nested-component/Outer.svelte similarity index 100% rename from test/runtime/samples/component-slot-nested-component/Outer.html rename to test/runtime/samples/component-slot-nested-component/Outer.svelte diff --git a/test/runtime/samples/component-slot-nested-component/main.html b/test/runtime/samples/component-slot-nested-component/main.html deleted file mode 100644 index d86e58bb70..0000000000 --- a/test/runtime/samples/component-slot-nested-component/main.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - foo - \ No newline at end of file diff --git a/test/runtime/samples/component-slot-nested-component/main.svelte b/test/runtime/samples/component-slot-nested-component/main.svelte new file mode 100644 index 0000000000..45c6d437b6 --- /dev/null +++ b/test/runtime/samples/component-slot-nested-component/main.svelte @@ -0,0 +1,8 @@ + + + + foo + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-nested/Nested.html b/test/runtime/samples/component-slot-nested/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-nested/Nested.html rename to test/runtime/samples/component-slot-nested/Nested.svelte diff --git a/test/runtime/samples/component-slot-nested/main.html b/test/runtime/samples/component-slot-nested/main.svelte similarity index 52% rename from test/runtime/samples/component-slot-nested/main.html rename to test/runtime/samples/component-slot-nested/main.svelte index a109ec9c06..982a918709 100644 --- a/test/runtime/samples/component-slot-nested/main.html +++ b/test/runtime/samples/component-slot-nested/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-used-with-default-event/Nested.html b/test/runtime/samples/component-slot-used-with-default-event/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-used-with-default-event/Nested.html rename to test/runtime/samples/component-slot-used-with-default-event/Nested.svelte diff --git a/test/runtime/samples/component-slot-used-with-default-event/main.html b/test/runtime/samples/component-slot-used-with-default-event/main.html deleted file mode 100644 index 06a1f64cae..0000000000 --- a/test/runtime/samples/component-slot-used-with-default-event/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - Hello - \ No newline at end of file diff --git a/test/runtime/samples/component-slot-used-with-default-event/main.svelte b/test/runtime/samples/component-slot-used-with-default-event/main.svelte new file mode 100644 index 0000000000..1e1ea8daa8 --- /dev/null +++ b/test/runtime/samples/component-slot-used-with-default-event/main.svelte @@ -0,0 +1,7 @@ + + + + Hello + \ No newline at end of file diff --git a/test/runtime/samples/component-static-at-symbol/Email.html b/test/runtime/samples/component-static-at-symbol/Email.svelte similarity index 100% rename from test/runtime/samples/component-static-at-symbol/Email.html rename to test/runtime/samples/component-static-at-symbol/Email.svelte diff --git a/test/runtime/samples/component-static-at-symbol/main.html b/test/runtime/samples/component-static-at-symbol/main.html deleted file mode 100644 index 275b922f6a..0000000000 --- a/test/runtime/samples/component-static-at-symbol/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-static-at-symbol/main.svelte b/test/runtime/samples/component-static-at-symbol/main.svelte new file mode 100644 index 0000000000..39f82ffd25 --- /dev/null +++ b/test/runtime/samples/component-static-at-symbol/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-template-inline-mutation/Widget.html b/test/runtime/samples/component-template-inline-mutation/Widget.svelte similarity index 100% rename from test/runtime/samples/component-template-inline-mutation/Widget.html rename to test/runtime/samples/component-template-inline-mutation/Widget.svelte diff --git a/test/runtime/samples/component-template-inline-mutation/main.html b/test/runtime/samples/component-template-inline-mutation/main.html deleted file mode 100644 index f094aef743..0000000000 --- a/test/runtime/samples/component-template-inline-mutation/main.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/test/runtime/samples/component-template-inline-mutation/main.svelte b/test/runtime/samples/component-template-inline-mutation/main.svelte new file mode 100644 index 0000000000..b77462c690 --- /dev/null +++ b/test/runtime/samples/component-template-inline-mutation/main.svelte @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/component-yield-follows-element/Foo.html b/test/runtime/samples/component-yield-follows-element/Foo.svelte similarity index 100% rename from test/runtime/samples/component-yield-follows-element/Foo.html rename to test/runtime/samples/component-yield-follows-element/Foo.svelte diff --git a/test/runtime/samples/component-yield-follows-element/main.html b/test/runtime/samples/component-yield-follows-element/main.html deleted file mode 100644 index b362e9a410..0000000000 --- a/test/runtime/samples/component-yield-follows-element/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - -test \ No newline at end of file diff --git a/test/runtime/samples/component-yield-follows-element/main.svelte b/test/runtime/samples/component-yield-follows-element/main.svelte new file mode 100644 index 0000000000..3a43b58231 --- /dev/null +++ b/test/runtime/samples/component-yield-follows-element/main.svelte @@ -0,0 +1,5 @@ + + +test \ No newline at end of file diff --git a/test/runtime/samples/component-yield-if/Widget.html b/test/runtime/samples/component-yield-if/Widget.svelte similarity index 100% rename from test/runtime/samples/component-yield-if/Widget.html rename to test/runtime/samples/component-yield-if/Widget.svelte diff --git a/test/runtime/samples/component-yield-if/main.html b/test/runtime/samples/component-yield-if/main.svelte similarity index 72% rename from test/runtime/samples/component-yield-if/main.html rename to test/runtime/samples/component-yield-if/main.svelte index 768993e064..4e02155a8b 100644 --- a/test/runtime/samples/component-yield-if/main.html +++ b/test/runtime/samples/component-yield-if/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-yield-multiple-in-if/Widget.html b/test/runtime/samples/component-yield-multiple-in-if/Widget.svelte similarity index 100% rename from test/runtime/samples/component-yield-multiple-in-if/Widget.html rename to test/runtime/samples/component-yield-multiple-in-if/Widget.svelte diff --git a/test/runtime/samples/component-yield-multiple-in-if/main.html b/test/runtime/samples/component-yield-multiple-in-if/main.svelte similarity index 75% rename from test/runtime/samples/component-yield-multiple-in-if/main.html rename to test/runtime/samples/component-yield-multiple-in-if/main.svelte index 53eba749d6..db518183b5 100644 --- a/test/runtime/samples/component-yield-multiple-in-if/main.html +++ b/test/runtime/samples/component-yield-multiple-in-if/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-yield-nested-if/Inner.html b/test/runtime/samples/component-yield-nested-if/Inner.svelte similarity index 100% rename from test/runtime/samples/component-yield-nested-if/Inner.html rename to test/runtime/samples/component-yield-nested-if/Inner.svelte diff --git a/test/runtime/samples/component-yield-nested-if/Outer.html b/test/runtime/samples/component-yield-nested-if/Outer.svelte similarity index 100% rename from test/runtime/samples/component-yield-nested-if/Outer.html rename to test/runtime/samples/component-yield-nested-if/Outer.svelte diff --git a/test/runtime/samples/component-yield-nested-if/main.html b/test/runtime/samples/component-yield-nested-if/main.html deleted file mode 100644 index 98c27812e6..0000000000 --- a/test/runtime/samples/component-yield-nested-if/main.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - One - - \ No newline at end of file diff --git a/test/runtime/samples/component-yield-nested-if/main.svelte b/test/runtime/samples/component-yield-nested-if/main.svelte new file mode 100644 index 0000000000..2107a21ed4 --- /dev/null +++ b/test/runtime/samples/component-yield-nested-if/main.svelte @@ -0,0 +1,11 @@ + + + + One + + \ No newline at end of file diff --git a/test/runtime/samples/component-yield-parent/Widget.html b/test/runtime/samples/component-yield-parent/Widget.svelte similarity index 100% rename from test/runtime/samples/component-yield-parent/Widget.html rename to test/runtime/samples/component-yield-parent/Widget.svelte diff --git a/test/runtime/samples/component-yield-parent/main.html b/test/runtime/samples/component-yield-parent/main.svelte similarity index 64% rename from test/runtime/samples/component-yield-parent/main.html rename to test/runtime/samples/component-yield-parent/main.svelte index b36dbc1b14..8de37236ae 100644 --- a/test/runtime/samples/component-yield-parent/main.html +++ b/test/runtime/samples/component-yield-parent/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-yield-placement/Modal.html b/test/runtime/samples/component-yield-placement/Modal.svelte similarity index 100% rename from test/runtime/samples/component-yield-placement/Modal.html rename to test/runtime/samples/component-yield-placement/Modal.svelte diff --git a/test/runtime/samples/component-yield-placement/main.html b/test/runtime/samples/component-yield-placement/main.svelte similarity index 83% rename from test/runtime/samples/component-yield-placement/main.html rename to test/runtime/samples/component-yield-placement/main.svelte index cc5bfd73ed..ee1a1221eb 100644 --- a/test/runtime/samples/component-yield-placement/main.html +++ b/test/runtime/samples/component-yield-placement/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-yield-static/Widget.html b/test/runtime/samples/component-yield-static/Widget.svelte similarity index 100% rename from test/runtime/samples/component-yield-static/Widget.html rename to test/runtime/samples/component-yield-static/Widget.svelte diff --git a/test/runtime/samples/component-yield-static/main.html b/test/runtime/samples/component-yield-static/main.html deleted file mode 100644 index 9d5807872d..0000000000 --- a/test/runtime/samples/component-yield-static/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - -Hello {name} \ No newline at end of file diff --git a/test/runtime/samples/component-yield-static/main.svelte b/test/runtime/samples/component-yield-static/main.svelte new file mode 100644 index 0000000000..3e99a8baa9 --- /dev/null +++ b/test/runtime/samples/component-yield-static/main.svelte @@ -0,0 +1,7 @@ + + +Hello {name} \ No newline at end of file diff --git a/test/runtime/samples/component-yield/main.html b/test/runtime/samples/component-yield/main.svelte similarity index 100% rename from test/runtime/samples/component-yield/main.html rename to test/runtime/samples/component-yield/main.svelte diff --git a/test/runtime/samples/component/Widget.html b/test/runtime/samples/component/Widget.svelte similarity index 100% rename from test/runtime/samples/component/Widget.html rename to test/runtime/samples/component/Widget.svelte diff --git a/test/runtime/samples/component/main.html b/test/runtime/samples/component/main.html deleted file mode 100644 index 1bd0073a0e..0000000000 --- a/test/runtime/samples/component/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - -
    - -
    \ No newline at end of file diff --git a/test/runtime/samples/component/main.svelte b/test/runtime/samples/component/main.svelte new file mode 100644 index 0000000000..fb2f332507 --- /dev/null +++ b/test/runtime/samples/component/main.svelte @@ -0,0 +1,7 @@ + + +
    + +
    \ No newline at end of file diff --git a/test/runtime/samples/context-api/Tab.html b/test/runtime/samples/context-api/Tab.svelte similarity index 87% rename from test/runtime/samples/context-api/Tab.html rename to test/runtime/samples/context-api/Tab.svelte index 2f9793aed8..af3f002521 100644 --- a/test/runtime/samples/context-api/Tab.html +++ b/test/runtime/samples/context-api/Tab.svelte @@ -1,6 +1,6 @@ diff --git a/test/runtime/samples/css-comments/main.html b/test/runtime/samples/css-comments/main.svelte similarity index 100% rename from test/runtime/samples/css-comments/main.html rename to test/runtime/samples/css-comments/main.svelte diff --git a/test/runtime/samples/css-false/Widget.html b/test/runtime/samples/css-false/Widget.svelte similarity index 100% rename from test/runtime/samples/css-false/Widget.html rename to test/runtime/samples/css-false/Widget.svelte diff --git a/test/runtime/samples/css-false/main.html b/test/runtime/samples/css-false/main.html deleted file mode 100644 index dbbc5c325b..0000000000 --- a/test/runtime/samples/css-false/main.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    control

    - \ No newline at end of file diff --git a/test/runtime/samples/css-false/main.svelte b/test/runtime/samples/css-false/main.svelte new file mode 100644 index 0000000000..5129d127ba --- /dev/null +++ b/test/runtime/samples/css-false/main.svelte @@ -0,0 +1,6 @@ + + +

    control

    + \ No newline at end of file diff --git a/test/runtime/samples/css-space-in-attribute/Widget.html b/test/runtime/samples/css-space-in-attribute/Widget.svelte similarity index 100% rename from test/runtime/samples/css-space-in-attribute/Widget.html rename to test/runtime/samples/css-space-in-attribute/Widget.svelte diff --git a/test/runtime/samples/css-space-in-attribute/main.html b/test/runtime/samples/css-space-in-attribute/main.svelte similarity index 51% rename from test/runtime/samples/css-space-in-attribute/main.html rename to test/runtime/samples/css-space-in-attribute/main.svelte index 93bec897f3..e23e6c4e40 100644 --- a/test/runtime/samples/css-space-in-attribute/main.html +++ b/test/runtime/samples/css-space-in-attribute/main.svelte @@ -1,5 +1,5 @@

    control

    diff --git a/test/runtime/samples/css/Widget.html b/test/runtime/samples/css/Widget.svelte similarity index 100% rename from test/runtime/samples/css/Widget.html rename to test/runtime/samples/css/Widget.svelte diff --git a/test/runtime/samples/css/main.html b/test/runtime/samples/css/main.html deleted file mode 100644 index dbbc5c325b..0000000000 --- a/test/runtime/samples/css/main.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    control

    - \ No newline at end of file diff --git a/test/runtime/samples/css/main.svelte b/test/runtime/samples/css/main.svelte new file mode 100644 index 0000000000..5129d127ba --- /dev/null +++ b/test/runtime/samples/css/main.svelte @@ -0,0 +1,6 @@ + + +

    control

    + \ No newline at end of file diff --git a/test/runtime/samples/custom-method/main.html b/test/runtime/samples/custom-method/main.svelte similarity index 100% rename from test/runtime/samples/custom-method/main.html rename to test/runtime/samples/custom-method/main.svelte diff --git a/test/runtime/samples/deconflict-builtins/main.html b/test/runtime/samples/deconflict-builtins/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-builtins/main.html rename to test/runtime/samples/deconflict-builtins/main.svelte diff --git a/test/runtime/samples/deconflict-component-name-with-global/main.html b/test/runtime/samples/deconflict-component-name-with-global/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-component-name-with-global/main.html rename to test/runtime/samples/deconflict-component-name-with-global/main.svelte diff --git a/test/runtime/samples/deconflict-component-name-with-module-global/main.html b/test/runtime/samples/deconflict-component-name-with-module-global/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-component-name-with-module-global/main.html rename to test/runtime/samples/deconflict-component-name-with-module-global/main.svelte diff --git a/test/runtime/samples/deconflict-component-refs/main.html b/test/runtime/samples/deconflict-component-refs/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-component-refs/main.html rename to test/runtime/samples/deconflict-component-refs/main.svelte diff --git a/test/runtime/samples/deconflict-contexts/main.html b/test/runtime/samples/deconflict-contexts/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-contexts/main.html rename to test/runtime/samples/deconflict-contexts/main.svelte diff --git a/test/runtime/samples/deconflict-elements-indexes/main.html b/test/runtime/samples/deconflict-elements-indexes/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-elements-indexes/main.html rename to test/runtime/samples/deconflict-elements-indexes/main.svelte diff --git a/test/runtime/samples/deconflict-non-helpers/main.html b/test/runtime/samples/deconflict-non-helpers/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-non-helpers/main.html rename to test/runtime/samples/deconflict-non-helpers/main.svelte diff --git a/test/runtime/samples/deconflict-self/main.html b/test/runtime/samples/deconflict-self/main.html deleted file mode 100644 index 30f524eb69..0000000000 --- a/test/runtime/samples/deconflict-self/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - -
    \ No newline at end of file diff --git a/test/runtime/samples/deconflict-self/main.svelte b/test/runtime/samples/deconflict-self/main.svelte new file mode 100644 index 0000000000..7010a66c88 --- /dev/null +++ b/test/runtime/samples/deconflict-self/main.svelte @@ -0,0 +1,5 @@ + + +
    \ No newline at end of file diff --git a/test/runtime/samples/deconflict-self/nested/main.html b/test/runtime/samples/deconflict-self/nested/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-self/nested/main.html rename to test/runtime/samples/deconflict-self/nested/main.svelte diff --git a/test/runtime/samples/deconflict-template-1/main.html b/test/runtime/samples/deconflict-template-1/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-template-1/main.html rename to test/runtime/samples/deconflict-template-1/main.svelte diff --git a/test/runtime/samples/deconflict-template-2/main.html b/test/runtime/samples/deconflict-template-2/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-template-2/main.html rename to test/runtime/samples/deconflict-template-2/main.svelte diff --git a/test/runtime/samples/deconflict-vars/main.html b/test/runtime/samples/deconflict-vars/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-vars/main.html rename to test/runtime/samples/deconflict-vars/main.svelte diff --git a/test/runtime/samples/default-data-function/main.html b/test/runtime/samples/default-data-function/main.svelte similarity index 100% rename from test/runtime/samples/default-data-function/main.html rename to test/runtime/samples/default-data-function/main.svelte diff --git a/test/runtime/samples/default-data-override/main.html b/test/runtime/samples/default-data-override/main.svelte similarity index 100% rename from test/runtime/samples/default-data-override/main.html rename to test/runtime/samples/default-data-override/main.svelte diff --git a/test/runtime/samples/default-data/main.html b/test/runtime/samples/default-data/main.svelte similarity index 100% rename from test/runtime/samples/default-data/main.html rename to test/runtime/samples/default-data/main.svelte diff --git a/test/runtime/samples/destroy-twice/main.html b/test/runtime/samples/destroy-twice/main.svelte similarity index 100% rename from test/runtime/samples/destroy-twice/main.html rename to test/runtime/samples/destroy-twice/main.svelte diff --git a/test/runtime/samples/destructuring/main.html b/test/runtime/samples/destructuring/main.svelte similarity index 100% rename from test/runtime/samples/destructuring/main.html rename to test/runtime/samples/destructuring/main.svelte diff --git a/test/runtime/samples/dev-warning-destroy-twice/main.html b/test/runtime/samples/dev-warning-destroy-twice/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-destroy-twice/main.html rename to test/runtime/samples/dev-warning-destroy-twice/main.svelte diff --git a/test/runtime/samples/dev-warning-helper/main.html b/test/runtime/samples/dev-warning-helper/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-helper/main.html rename to test/runtime/samples/dev-warning-helper/main.svelte diff --git a/test/runtime/samples/dev-warning-missing-data-binding/main.html b/test/runtime/samples/dev-warning-missing-data-binding/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-missing-data-binding/main.html rename to test/runtime/samples/dev-warning-missing-data-binding/main.svelte diff --git a/test/runtime/samples/dev-warning-missing-data-component/Foo.html b/test/runtime/samples/dev-warning-missing-data-component/Foo.svelte similarity index 100% rename from test/runtime/samples/dev-warning-missing-data-component/Foo.html rename to test/runtime/samples/dev-warning-missing-data-component/Foo.svelte diff --git a/test/runtime/samples/dev-warning-missing-data-component/main.html b/test/runtime/samples/dev-warning-missing-data-component/main.html deleted file mode 100644 index 2bda6e2937..0000000000 --- a/test/runtime/samples/dev-warning-missing-data-component/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/dev-warning-missing-data-component/main.svelte b/test/runtime/samples/dev-warning-missing-data-component/main.svelte new file mode 100644 index 0000000000..15a5895b3d --- /dev/null +++ b/test/runtime/samples/dev-warning-missing-data-component/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/dev-warning-missing-data-each/main.html b/test/runtime/samples/dev-warning-missing-data-each/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-missing-data-each/main.html rename to test/runtime/samples/dev-warning-missing-data-each/main.svelte diff --git a/test/runtime/samples/dev-warning-missing-data-excludes-event/main.html b/test/runtime/samples/dev-warning-missing-data-excludes-event/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-missing-data-excludes-event/main.html rename to test/runtime/samples/dev-warning-missing-data-excludes-event/main.svelte diff --git a/test/runtime/samples/dev-warning-missing-data/main.html b/test/runtime/samples/dev-warning-missing-data/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-missing-data/main.html rename to test/runtime/samples/dev-warning-missing-data/main.svelte diff --git a/test/runtime/samples/dev-warning-readonly-computed/main.html b/test/runtime/samples/dev-warning-readonly-computed/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-readonly-computed/main.html rename to test/runtime/samples/dev-warning-readonly-computed/main.svelte diff --git a/test/runtime/samples/dev-warning-readonly-window-binding/main.html b/test/runtime/samples/dev-warning-readonly-window-binding/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-readonly-window-binding/main.html rename to test/runtime/samples/dev-warning-readonly-window-binding/main.svelte diff --git a/test/runtime/samples/document-event/main.html b/test/runtime/samples/document-event/main.svelte similarity index 100% rename from test/runtime/samples/document-event/main.html rename to test/runtime/samples/document-event/main.svelte diff --git a/test/runtime/samples/dynamic-component-bindings-recreated-b/Green.html b/test/runtime/samples/dynamic-component-bindings-recreated-b/Green.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings-recreated-b/Green.html rename to test/runtime/samples/dynamic-component-bindings-recreated-b/Green.svelte diff --git a/test/runtime/samples/dynamic-component-bindings-recreated-b/Red.html b/test/runtime/samples/dynamic-component-bindings-recreated-b/Red.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings-recreated-b/Red.html rename to test/runtime/samples/dynamic-component-bindings-recreated-b/Red.svelte diff --git a/test/runtime/samples/dynamic-component-bindings-recreated-b/main.html b/test/runtime/samples/dynamic-component-bindings-recreated-b/main.html deleted file mode 100644 index cdae60e835..0000000000 --- a/test/runtime/samples/dynamic-component-bindings-recreated-b/main.html +++ /dev/null @@ -1,10 +0,0 @@ - - -

    parent {foo}

    - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings-recreated-b/main.svelte b/test/runtime/samples/dynamic-component-bindings-recreated-b/main.svelte new file mode 100644 index 0000000000..019718e5cb --- /dev/null +++ b/test/runtime/samples/dynamic-component-bindings-recreated-b/main.svelte @@ -0,0 +1,10 @@ + + +

    parent {foo}

    + \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/Green.html b/test/runtime/samples/dynamic-component-bindings-recreated/Green.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings-recreated/Green.html rename to test/runtime/samples/dynamic-component-bindings-recreated/Green.svelte diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/Red.html b/test/runtime/samples/dynamic-component-bindings-recreated/Red.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings-recreated/Red.html rename to test/runtime/samples/dynamic-component-bindings-recreated/Red.svelte diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/main.html b/test/runtime/samples/dynamic-component-bindings-recreated/main.html deleted file mode 100644 index c91906e5df..0000000000 --- a/test/runtime/samples/dynamic-component-bindings-recreated/main.html +++ /dev/null @@ -1,9 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/main.svelte b/test/runtime/samples/dynamic-component-bindings-recreated/main.svelte new file mode 100644 index 0000000000..011ac923b2 --- /dev/null +++ b/test/runtime/samples/dynamic-component-bindings-recreated/main.svelte @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings/Bar.html b/test/runtime/samples/dynamic-component-bindings/Bar.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings/Bar.html rename to test/runtime/samples/dynamic-component-bindings/Bar.svelte diff --git a/test/runtime/samples/dynamic-component-bindings/Foo.html b/test/runtime/samples/dynamic-component-bindings/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings/Foo.html rename to test/runtime/samples/dynamic-component-bindings/Foo.svelte diff --git a/test/runtime/samples/dynamic-component-bindings/main.html b/test/runtime/samples/dynamic-component-bindings/main.html deleted file mode 100644 index 0df350a9f2..0000000000 --- a/test/runtime/samples/dynamic-component-bindings/main.html +++ /dev/null @@ -1,10 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings/main.svelte b/test/runtime/samples/dynamic-component-bindings/main.svelte new file mode 100644 index 0000000000..31d0f86e5e --- /dev/null +++ b/test/runtime/samples/dynamic-component-bindings/main.svelte @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-destroy-null/main.html b/test/runtime/samples/dynamic-component-destroy-null/main.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-destroy-null/main.html rename to test/runtime/samples/dynamic-component-destroy-null/main.svelte diff --git a/test/runtime/samples/dynamic-component-events/Bar.html b/test/runtime/samples/dynamic-component-events/Bar.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-events/Bar.html rename to test/runtime/samples/dynamic-component-events/Bar.svelte diff --git a/test/runtime/samples/dynamic-component-events/Foo.html b/test/runtime/samples/dynamic-component-events/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-events/Foo.html rename to test/runtime/samples/dynamic-component-events/Foo.svelte diff --git a/test/runtime/samples/dynamic-component-events/main.html b/test/runtime/samples/dynamic-component-events/main.svelte similarity index 58% rename from test/runtime/samples/dynamic-component-events/main.html rename to test/runtime/samples/dynamic-component-events/main.svelte index 77856e8e63..f60e578289 100644 --- a/test/runtime/samples/dynamic-component-events/main.html +++ b/test/runtime/samples/dynamic-component-events/main.svelte @@ -1,6 +1,6 @@ diff --git a/test/runtime/samples/dynamic-component-nulled-out/Foo.html b/test/runtime/samples/dynamic-component-nulled-out/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-nulled-out/Foo.html rename to test/runtime/samples/dynamic-component-nulled-out/Foo.svelte diff --git a/test/runtime/samples/dynamic-component-nulled-out/main.html b/test/runtime/samples/dynamic-component-nulled-out/main.html deleted file mode 100644 index b98ecb8f7e..0000000000 --- a/test/runtime/samples/dynamic-component-nulled-out/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-nulled-out/main.svelte b/test/runtime/samples/dynamic-component-nulled-out/main.svelte new file mode 100644 index 0000000000..2df6837267 --- /dev/null +++ b/test/runtime/samples/dynamic-component-nulled-out/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-ref/Foo.html b/test/runtime/samples/dynamic-component-ref/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-ref/Foo.html rename to test/runtime/samples/dynamic-component-ref/Foo.svelte diff --git a/test/runtime/samples/dynamic-component-ref/main.html b/test/runtime/samples/dynamic-component-ref/main.svelte similarity index 72% rename from test/runtime/samples/dynamic-component-ref/main.html rename to test/runtime/samples/dynamic-component-ref/main.svelte index fe9c52cab6..984f34fc7b 100644 --- a/test/runtime/samples/dynamic-component-ref/main.html +++ b/test/runtime/samples/dynamic-component-ref/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/dynamic-component-slot/Bar.html b/test/runtime/samples/dynamic-component-slot/Bar.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-slot/Bar.html rename to test/runtime/samples/dynamic-component-slot/Bar.svelte diff --git a/test/runtime/samples/dynamic-component-slot/Baz.html b/test/runtime/samples/dynamic-component-slot/Baz.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-slot/Baz.html rename to test/runtime/samples/dynamic-component-slot/Baz.svelte diff --git a/test/runtime/samples/dynamic-component-slot/Foo.html b/test/runtime/samples/dynamic-component-slot/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-slot/Foo.html rename to test/runtime/samples/dynamic-component-slot/Foo.svelte diff --git a/test/runtime/samples/dynamic-component-slot/main.html b/test/runtime/samples/dynamic-component-slot/main.svelte similarity index 78% rename from test/runtime/samples/dynamic-component-slot/main.html rename to test/runtime/samples/dynamic-component-slot/main.svelte index 32f1ecce19..99bcf9e64f 100644 --- a/test/runtime/samples/dynamic-component-slot/main.html +++ b/test/runtime/samples/dynamic-component-slot/main.svelte @@ -1,7 +1,7 @@ - - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-update-existing-instance/main.svelte b/test/runtime/samples/dynamic-component-update-existing-instance/main.svelte new file mode 100644 index 0000000000..6e2a8cde5e --- /dev/null +++ b/test/runtime/samples/dynamic-component-update-existing-instance/main.svelte @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component/Bar.html b/test/runtime/samples/dynamic-component/Bar.svelte similarity index 100% rename from test/runtime/samples/dynamic-component/Bar.html rename to test/runtime/samples/dynamic-component/Bar.svelte diff --git a/test/runtime/samples/dynamic-component/Foo.html b/test/runtime/samples/dynamic-component/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component/Foo.html rename to test/runtime/samples/dynamic-component/Foo.svelte diff --git a/test/runtime/samples/dynamic-component/main.html b/test/runtime/samples/dynamic-component/main.html deleted file mode 100644 index efa9394d30..0000000000 --- a/test/runtime/samples/dynamic-component/main.html +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component/main.svelte b/test/runtime/samples/dynamic-component/main.svelte new file mode 100644 index 0000000000..6e2a8cde5e --- /dev/null +++ b/test/runtime/samples/dynamic-component/main.svelte @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/each-block-array-literal/main.html b/test/runtime/samples/each-block-array-literal/main.svelte similarity index 100% rename from test/runtime/samples/each-block-array-literal/main.html rename to test/runtime/samples/each-block-array-literal/main.svelte diff --git a/test/runtime/samples/each-block-containing-component-in-if/Nested.html b/test/runtime/samples/each-block-containing-component-in-if/Nested.svelte similarity index 100% rename from test/runtime/samples/each-block-containing-component-in-if/Nested.html rename to test/runtime/samples/each-block-containing-component-in-if/Nested.svelte diff --git a/test/runtime/samples/each-block-containing-component-in-if/main.html b/test/runtime/samples/each-block-containing-component-in-if/main.svelte similarity index 67% rename from test/runtime/samples/each-block-containing-component-in-if/main.html rename to test/runtime/samples/each-block-containing-component-in-if/main.svelte index 16f042a277..049948fa56 100644 --- a/test/runtime/samples/each-block-containing-component-in-if/main.html +++ b/test/runtime/samples/each-block-containing-component-in-if/main.svelte @@ -1,5 +1,5 @@ {#each items as item} diff --git a/test/runtime/samples/each-block-else-starts-empty/main.html b/test/runtime/samples/each-block-else-starts-empty/main.svelte similarity index 100% rename from test/runtime/samples/each-block-else-starts-empty/main.html rename to test/runtime/samples/each-block-else-starts-empty/main.svelte diff --git a/test/runtime/samples/each-block-else/main.html b/test/runtime/samples/each-block-else/main.svelte similarity index 100% rename from test/runtime/samples/each-block-else/main.html rename to test/runtime/samples/each-block-else/main.svelte diff --git a/test/runtime/samples/each-block-empty-outro/Thing.html b/test/runtime/samples/each-block-empty-outro/Thing.svelte similarity index 100% rename from test/runtime/samples/each-block-empty-outro/Thing.html rename to test/runtime/samples/each-block-empty-outro/Thing.svelte diff --git a/test/runtime/samples/each-block-empty-outro/main.html b/test/runtime/samples/each-block-empty-outro/main.svelte similarity index 79% rename from test/runtime/samples/each-block-empty-outro/main.html rename to test/runtime/samples/each-block-empty-outro/main.svelte index 325cbbcf45..338f471d31 100644 --- a/test/runtime/samples/each-block-empty-outro/main.html +++ b/test/runtime/samples/each-block-empty-outro/main.svelte @@ -2,7 +2,7 @@ export let visible; export let empty; - import Thing from './Thing.html'; + import Thing from './Thing.svelte'; {#if visible} diff --git a/test/runtime/samples/each-block-function/main.html b/test/runtime/samples/each-block-function/main.svelte similarity index 100% rename from test/runtime/samples/each-block-function/main.html rename to test/runtime/samples/each-block-function/main.svelte diff --git a/test/runtime/samples/each-block-in-if-block/main.html b/test/runtime/samples/each-block-in-if-block/main.svelte similarity index 100% rename from test/runtime/samples/each-block-in-if-block/main.html rename to test/runtime/samples/each-block-in-if-block/main.svelte diff --git a/test/runtime/samples/each-block-index-only/main.html b/test/runtime/samples/each-block-index-only/main.svelte similarity index 100% rename from test/runtime/samples/each-block-index-only/main.html rename to test/runtime/samples/each-block-index-only/main.svelte diff --git a/test/runtime/samples/each-block-indexed/main.html b/test/runtime/samples/each-block-indexed/main.svelte similarity index 100% rename from test/runtime/samples/each-block-indexed/main.html rename to test/runtime/samples/each-block-indexed/main.svelte diff --git a/test/runtime/samples/each-block-keyed-dynamic/main.html b/test/runtime/samples/each-block-keyed-dynamic/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-dynamic/main.html rename to test/runtime/samples/each-block-keyed-dynamic/main.svelte diff --git a/test/runtime/samples/each-block-keyed-empty/main.html b/test/runtime/samples/each-block-keyed-empty/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-empty/main.html rename to test/runtime/samples/each-block-keyed-empty/main.svelte diff --git a/test/runtime/samples/each-block-keyed-non-prop/main.html b/test/runtime/samples/each-block-keyed-non-prop/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-non-prop/main.html rename to test/runtime/samples/each-block-keyed-non-prop/main.svelte diff --git a/test/runtime/samples/each-block-keyed-random-permute/main.html b/test/runtime/samples/each-block-keyed-random-permute/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-random-permute/main.html rename to test/runtime/samples/each-block-keyed-random-permute/main.svelte diff --git a/test/runtime/samples/each-block-keyed-siblings/main.html b/test/runtime/samples/each-block-keyed-siblings/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-siblings/main.html rename to test/runtime/samples/each-block-keyed-siblings/main.svelte diff --git a/test/runtime/samples/each-block-keyed-static/main.html b/test/runtime/samples/each-block-keyed-static/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-static/main.html rename to test/runtime/samples/each-block-keyed-static/main.svelte diff --git a/test/runtime/samples/each-block-keyed-unshift/Nested.html b/test/runtime/samples/each-block-keyed-unshift/Nested.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-unshift/Nested.html rename to test/runtime/samples/each-block-keyed-unshift/Nested.svelte diff --git a/test/runtime/samples/each-block-keyed-unshift/main.html b/test/runtime/samples/each-block-keyed-unshift/main.svelte similarity index 70% rename from test/runtime/samples/each-block-keyed-unshift/main.html rename to test/runtime/samples/each-block-keyed-unshift/main.svelte index 5af62d4e08..b8954e17fd 100644 --- a/test/runtime/samples/each-block-keyed-unshift/main.html +++ b/test/runtime/samples/each-block-keyed-unshift/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/each-block-keyed/main.html b/test/runtime/samples/each-block-keyed/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed/main.html rename to test/runtime/samples/each-block-keyed/main.svelte diff --git a/test/runtime/samples/each-block-random-permute/main.html b/test/runtime/samples/each-block-random-permute/main.svelte similarity index 100% rename from test/runtime/samples/each-block-random-permute/main.html rename to test/runtime/samples/each-block-random-permute/main.svelte diff --git a/test/runtime/samples/each-block-scope-shadow/main.html b/test/runtime/samples/each-block-scope-shadow/main.svelte similarity index 100% rename from test/runtime/samples/each-block-scope-shadow/main.html rename to test/runtime/samples/each-block-scope-shadow/main.svelte diff --git a/test/runtime/samples/each-block-static/main.html b/test/runtime/samples/each-block-static/main.svelte similarity index 100% rename from test/runtime/samples/each-block-static/main.html rename to test/runtime/samples/each-block-static/main.svelte diff --git a/test/runtime/samples/each-block-text-node/main.html b/test/runtime/samples/each-block-text-node/main.svelte similarity index 100% rename from test/runtime/samples/each-block-text-node/main.html rename to test/runtime/samples/each-block-text-node/main.svelte diff --git a/test/runtime/samples/each-block/main.html b/test/runtime/samples/each-block/main.svelte similarity index 100% rename from test/runtime/samples/each-block/main.html rename to test/runtime/samples/each-block/main.svelte diff --git a/test/runtime/samples/each-blocks-expression/main.html b/test/runtime/samples/each-blocks-expression/main.svelte similarity index 100% rename from test/runtime/samples/each-blocks-expression/main.html rename to test/runtime/samples/each-blocks-expression/main.svelte diff --git a/test/runtime/samples/each-blocks-nested-b/main.html b/test/runtime/samples/each-blocks-nested-b/main.svelte similarity index 100% rename from test/runtime/samples/each-blocks-nested-b/main.html rename to test/runtime/samples/each-blocks-nested-b/main.svelte diff --git a/test/runtime/samples/each-blocks-nested/main.html b/test/runtime/samples/each-blocks-nested/main.svelte similarity index 100% rename from test/runtime/samples/each-blocks-nested/main.html rename to test/runtime/samples/each-blocks-nested/main.svelte diff --git a/test/runtime/samples/element-invalid-name/main.html b/test/runtime/samples/element-invalid-name/main.svelte similarity index 100% rename from test/runtime/samples/element-invalid-name/main.html rename to test/runtime/samples/element-invalid-name/main.svelte diff --git a/test/runtime/samples/element-source-location/Foo.html b/test/runtime/samples/element-source-location/Foo.svelte similarity index 100% rename from test/runtime/samples/element-source-location/Foo.html rename to test/runtime/samples/element-source-location/Foo.svelte diff --git a/test/runtime/samples/element-source-location/main.html b/test/runtime/samples/element-source-location/main.svelte similarity index 54% rename from test/runtime/samples/element-source-location/main.html rename to test/runtime/samples/element-source-location/main.svelte index ca70895728..38855ef3ac 100644 --- a/test/runtime/samples/element-source-location/main.html +++ b/test/runtime/samples/element-source-location/main.svelte @@ -1,5 +1,5 @@

    this is a header

    diff --git a/test/runtime/samples/empty-style-block/main.html b/test/runtime/samples/empty-style-block/main.svelte similarity index 100% rename from test/runtime/samples/empty-style-block/main.html rename to test/runtime/samples/empty-style-block/main.svelte diff --git a/test/runtime/samples/escape-template-literals/Widget.html b/test/runtime/samples/escape-template-literals/Widget.svelte similarity index 100% rename from test/runtime/samples/escape-template-literals/Widget.html rename to test/runtime/samples/escape-template-literals/Widget.svelte diff --git a/test/runtime/samples/escape-template-literals/main.html b/test/runtime/samples/escape-template-literals/main.svelte similarity index 75% rename from test/runtime/samples/escape-template-literals/main.html rename to test/runtime/samples/escape-template-literals/main.svelte index bfd016de6b..d26aa6ea63 100644 --- a/test/runtime/samples/escape-template-literals/main.html +++ b/test/runtime/samples/escape-template-literals/main.svelte @@ -1,5 +1,5 @@ `${foo}\n` diff --git a/test/runtime/samples/escaped-text/main.html b/test/runtime/samples/escaped-text/main.svelte similarity index 100% rename from test/runtime/samples/escaped-text/main.html rename to test/runtime/samples/escaped-text/main.svelte diff --git a/test/runtime/samples/event-handler-console-log/main.html b/test/runtime/samples/event-handler-console-log/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-console-log/main.html rename to test/runtime/samples/event-handler-console-log/main.svelte diff --git a/test/runtime/samples/event-handler-deconflicted/main.html b/test/runtime/samples/event-handler-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-deconflicted/main.html rename to test/runtime/samples/event-handler-deconflicted/main.svelte diff --git a/test/runtime/samples/event-handler-each-context/main.html b/test/runtime/samples/event-handler-each-context/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-each-context/main.html rename to test/runtime/samples/event-handler-each-context/main.svelte diff --git a/test/runtime/samples/event-handler-each-deconflicted/main.html b/test/runtime/samples/event-handler-each-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-each-deconflicted/main.html rename to test/runtime/samples/event-handler-each-deconflicted/main.svelte diff --git a/test/runtime/samples/event-handler-each-this/main.html b/test/runtime/samples/event-handler-each-this/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-each-this/main.html rename to test/runtime/samples/event-handler-each-this/main.svelte diff --git a/test/runtime/samples/event-handler-each/main.html b/test/runtime/samples/event-handler-each/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-each/main.html rename to test/runtime/samples/event-handler-each/main.svelte diff --git a/test/runtime/samples/event-handler-event-methods/main.html b/test/runtime/samples/event-handler-event-methods/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-event-methods/main.html rename to test/runtime/samples/event-handler-event-methods/main.svelte diff --git a/test/runtime/samples/event-handler-hoisted/main.html b/test/runtime/samples/event-handler-hoisted/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-hoisted/main.html rename to test/runtime/samples/event-handler-hoisted/main.svelte diff --git a/test/runtime/samples/event-handler-modifier-once/main.html b/test/runtime/samples/event-handler-modifier-once/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-modifier-once/main.html rename to test/runtime/samples/event-handler-modifier-once/main.svelte diff --git a/test/runtime/samples/event-handler-modifier-prevent-default/main.html b/test/runtime/samples/event-handler-modifier-prevent-default/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-modifier-prevent-default/main.html rename to test/runtime/samples/event-handler-modifier-prevent-default/main.svelte diff --git a/test/runtime/samples/event-handler-modifier-stop-propagation/main.html b/test/runtime/samples/event-handler-modifier-stop-propagation/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-modifier-stop-propagation/main.html rename to test/runtime/samples/event-handler-modifier-stop-propagation/main.svelte diff --git a/test/runtime/samples/event-handler-removal/main.html b/test/runtime/samples/event-handler-removal/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-removal/main.html rename to test/runtime/samples/event-handler-removal/main.svelte diff --git a/test/runtime/samples/event-handler-sanitize/main.html b/test/runtime/samples/event-handler-sanitize/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-sanitize/main.html rename to test/runtime/samples/event-handler-sanitize/main.svelte diff --git a/test/runtime/samples/event-handler-shorthand-component/Widget.html b/test/runtime/samples/event-handler-shorthand-component/Widget.svelte similarity index 100% rename from test/runtime/samples/event-handler-shorthand-component/Widget.html rename to test/runtime/samples/event-handler-shorthand-component/Widget.svelte diff --git a/test/runtime/samples/event-handler-shorthand-component/main.html b/test/runtime/samples/event-handler-shorthand-component/main.html deleted file mode 100644 index 26586d3fd3..0000000000 --- a/test/runtime/samples/event-handler-shorthand-component/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/event-handler-shorthand-component/main.svelte b/test/runtime/samples/event-handler-shorthand-component/main.svelte new file mode 100644 index 0000000000..df21f9e8b8 --- /dev/null +++ b/test/runtime/samples/event-handler-shorthand-component/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/event-handler-shorthand-dynamic-component/Widget.html b/test/runtime/samples/event-handler-shorthand-dynamic-component/Widget.svelte similarity index 100% rename from test/runtime/samples/event-handler-shorthand-dynamic-component/Widget.html rename to test/runtime/samples/event-handler-shorthand-dynamic-component/Widget.svelte diff --git a/test/runtime/samples/event-handler-shorthand-dynamic-component/main.html b/test/runtime/samples/event-handler-shorthand-dynamic-component/main.svelte similarity index 61% rename from test/runtime/samples/event-handler-shorthand-dynamic-component/main.html rename to test/runtime/samples/event-handler-shorthand-dynamic-component/main.svelte index f38a4d30bb..f6c5494ce4 100644 --- a/test/runtime/samples/event-handler-shorthand-dynamic-component/main.html +++ b/test/runtime/samples/event-handler-shorthand-dynamic-component/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/event-handler-this-methods/main.html b/test/runtime/samples/event-handler-this-methods/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-this-methods/main.html rename to test/runtime/samples/event-handler-this-methods/main.svelte diff --git a/test/runtime/samples/event-handler/main.html b/test/runtime/samples/event-handler/main.svelte similarity index 100% rename from test/runtime/samples/event-handler/main.html rename to test/runtime/samples/event-handler/main.svelte diff --git a/test/runtime/samples/flush-before-bindings/Nested.html b/test/runtime/samples/flush-before-bindings/Nested.svelte similarity index 87% rename from test/runtime/samples/flush-before-bindings/Nested.html rename to test/runtime/samples/flush-before-bindings/Nested.svelte index a632b585a8..0a1721d308 100644 --- a/test/runtime/samples/flush-before-bindings/Nested.html +++ b/test/runtime/samples/flush-before-bindings/Nested.svelte @@ -1,5 +1,5 @@ {#if foo} diff --git a/test/runtime/samples/if-block-else-in-each/main.html b/test/runtime/samples/if-block-else-in-each/main.svelte similarity index 100% rename from test/runtime/samples/if-block-else-in-each/main.html rename to test/runtime/samples/if-block-else-in-each/main.svelte diff --git a/test/runtime/samples/if-block-else-partial-outro/Foo.html b/test/runtime/samples/if-block-else-partial-outro/Foo.svelte similarity index 100% rename from test/runtime/samples/if-block-else-partial-outro/Foo.html rename to test/runtime/samples/if-block-else-partial-outro/Foo.svelte diff --git a/test/runtime/samples/if-block-else-partial-outro/main.html b/test/runtime/samples/if-block-else-partial-outro/main.svelte similarity index 73% rename from test/runtime/samples/if-block-else-partial-outro/main.html rename to test/runtime/samples/if-block-else-partial-outro/main.svelte index 90c253c730..47f986ea48 100644 --- a/test/runtime/samples/if-block-else-partial-outro/main.html +++ b/test/runtime/samples/if-block-else-partial-outro/main.svelte @@ -2,7 +2,7 @@ export let y = false; export let x = 'x'; - import Foo from './Foo.html'; + import Foo from './Foo.svelte'; {#if y} diff --git a/test/runtime/samples/if-block-else/main.html b/test/runtime/samples/if-block-else/main.svelte similarity index 100% rename from test/runtime/samples/if-block-else/main.html rename to test/runtime/samples/if-block-else/main.svelte diff --git a/test/runtime/samples/if-block-elseif-no-else/main.html b/test/runtime/samples/if-block-elseif-no-else/main.svelte similarity index 100% rename from test/runtime/samples/if-block-elseif-no-else/main.html rename to test/runtime/samples/if-block-elseif-no-else/main.svelte diff --git a/test/runtime/samples/if-block-elseif-text/main.html b/test/runtime/samples/if-block-elseif-text/main.svelte similarity index 100% rename from test/runtime/samples/if-block-elseif-text/main.html rename to test/runtime/samples/if-block-elseif-text/main.svelte diff --git a/test/runtime/samples/if-block-elseif/main.html b/test/runtime/samples/if-block-elseif/main.svelte similarity index 100% rename from test/runtime/samples/if-block-elseif/main.html rename to test/runtime/samples/if-block-elseif/main.svelte diff --git a/test/runtime/samples/if-block-expression/main.html b/test/runtime/samples/if-block-expression/main.svelte similarity index 100% rename from test/runtime/samples/if-block-expression/main.html rename to test/runtime/samples/if-block-expression/main.svelte diff --git a/test/runtime/samples/if-block-first/main.html b/test/runtime/samples/if-block-first/main.svelte similarity index 100% rename from test/runtime/samples/if-block-first/main.html rename to test/runtime/samples/if-block-first/main.svelte diff --git a/test/runtime/samples/if-block-no-outro-else-with-outro/Widget.html b/test/runtime/samples/if-block-no-outro-else-with-outro/Widget.svelte similarity index 100% rename from test/runtime/samples/if-block-no-outro-else-with-outro/Widget.html rename to test/runtime/samples/if-block-no-outro-else-with-outro/Widget.svelte diff --git a/test/runtime/samples/if-block-no-outro-else-with-outro/main.html b/test/runtime/samples/if-block-no-outro-else-with-outro/main.svelte similarity index 77% rename from test/runtime/samples/if-block-no-outro-else-with-outro/main.html rename to test/runtime/samples/if-block-no-outro-else-with-outro/main.svelte index 2007bf2ea2..e32a7a52cb 100644 --- a/test/runtime/samples/if-block-no-outro-else-with-outro/main.html +++ b/test/runtime/samples/if-block-no-outro-else-with-outro/main.svelte @@ -2,7 +2,7 @@ export let foo; export let x = 'x'; - import Widget from './Widget.html'; + import Widget from './Widget.svelte'; {#if foo} diff --git a/test/runtime/samples/if-block-or/main.html b/test/runtime/samples/if-block-or/main.svelte similarity index 100% rename from test/runtime/samples/if-block-or/main.html rename to test/runtime/samples/if-block-or/main.svelte diff --git a/test/runtime/samples/if-block-outro-nested-else/Component.html b/test/runtime/samples/if-block-outro-nested-else/Component.svelte similarity index 100% rename from test/runtime/samples/if-block-outro-nested-else/Component.html rename to test/runtime/samples/if-block-outro-nested-else/Component.svelte diff --git a/test/runtime/samples/if-block-outro-nested-else/main.html b/test/runtime/samples/if-block-outro-nested-else/main.svelte similarity index 73% rename from test/runtime/samples/if-block-outro-nested-else/main.html rename to test/runtime/samples/if-block-outro-nested-else/main.svelte index c10f861a6c..3937998c40 100644 --- a/test/runtime/samples/if-block-outro-nested-else/main.html +++ b/test/runtime/samples/if-block-outro-nested-else/main.svelte @@ -1,7 +1,7 @@ {#if foo} diff --git a/test/runtime/samples/if-block-outro-unique-select-block-type/Component.html b/test/runtime/samples/if-block-outro-unique-select-block-type/Component.svelte similarity index 100% rename from test/runtime/samples/if-block-outro-unique-select-block-type/Component.html rename to test/runtime/samples/if-block-outro-unique-select-block-type/Component.svelte diff --git a/test/runtime/samples/if-block-outro-unique-select-block-type/main.html b/test/runtime/samples/if-block-outro-unique-select-block-type/main.svelte similarity index 76% rename from test/runtime/samples/if-block-outro-unique-select-block-type/main.html rename to test/runtime/samples/if-block-outro-unique-select-block-type/main.svelte index 77b3a6dfe3..0579a562eb 100644 --- a/test/runtime/samples/if-block-outro-unique-select-block-type/main.html +++ b/test/runtime/samples/if-block-outro-unique-select-block-type/main.svelte @@ -1,7 +1,7 @@ {#if foo} diff --git a/test/runtime/samples/if-block-widget/Widget.html b/test/runtime/samples/if-block-widget/Widget.svelte similarity index 100% rename from test/runtime/samples/if-block-widget/Widget.html rename to test/runtime/samples/if-block-widget/Widget.svelte diff --git a/test/runtime/samples/if-block-widget/main.html b/test/runtime/samples/if-block-widget/main.svelte similarity index 69% rename from test/runtime/samples/if-block-widget/main.html rename to test/runtime/samples/if-block-widget/main.svelte index 12996bbcd4..fef00e276c 100644 --- a/test/runtime/samples/if-block-widget/main.html +++ b/test/runtime/samples/if-block-widget/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/if-block/main.html b/test/runtime/samples/if-block/main.svelte similarity index 100% rename from test/runtime/samples/if-block/main.html rename to test/runtime/samples/if-block/main.svelte diff --git a/test/runtime/samples/if-in-keyed-each/main.html b/test/runtime/samples/if-in-keyed-each/main.svelte similarity index 100% rename from test/runtime/samples/if-in-keyed-each/main.html rename to test/runtime/samples/if-in-keyed-each/main.svelte diff --git a/test/runtime/samples/ignore-unchanged-attribute-compound/main.html b/test/runtime/samples/ignore-unchanged-attribute-compound/main.svelte similarity index 100% rename from test/runtime/samples/ignore-unchanged-attribute-compound/main.html rename to test/runtime/samples/ignore-unchanged-attribute-compound/main.svelte diff --git a/test/runtime/samples/ignore-unchanged-attribute/main.html b/test/runtime/samples/ignore-unchanged-attribute/main.svelte similarity index 100% rename from test/runtime/samples/ignore-unchanged-attribute/main.html rename to test/runtime/samples/ignore-unchanged-attribute/main.svelte diff --git a/test/runtime/samples/ignore-unchanged-raw/main.html b/test/runtime/samples/ignore-unchanged-raw/main.svelte similarity index 100% rename from test/runtime/samples/ignore-unchanged-raw/main.html rename to test/runtime/samples/ignore-unchanged-raw/main.svelte diff --git a/test/runtime/samples/ignore-unchanged-tag/main.html b/test/runtime/samples/ignore-unchanged-tag/main.svelte similarity index 100% rename from test/runtime/samples/ignore-unchanged-tag/main.html rename to test/runtime/samples/ignore-unchanged-tag/main.svelte diff --git a/test/runtime/samples/immutable-nested/Nested.html b/test/runtime/samples/immutable-nested/Nested.svelte similarity index 100% rename from test/runtime/samples/immutable-nested/Nested.html rename to test/runtime/samples/immutable-nested/Nested.svelte diff --git a/test/runtime/samples/immutable-nested/main.html b/test/runtime/samples/immutable-nested/main.svelte similarity index 68% rename from test/runtime/samples/immutable-nested/main.html rename to test/runtime/samples/immutable-nested/main.svelte index aa8efa9ebc..e50055be0c 100644 --- a/test/runtime/samples/immutable-nested/main.html +++ b/test/runtime/samples/immutable-nested/main.svelte @@ -1,7 +1,7 @@
    diff --git a/test/runtime/samples/immutable-option/main.html b/test/runtime/samples/immutable-option/main.svelte similarity index 100% rename from test/runtime/samples/immutable-option/main.html rename to test/runtime/samples/immutable-option/main.svelte diff --git a/test/runtime/samples/immutable-svelte-meta-false/main.html b/test/runtime/samples/immutable-svelte-meta-false/main.svelte similarity index 100% rename from test/runtime/samples/immutable-svelte-meta-false/main.html rename to test/runtime/samples/immutable-svelte-meta-false/main.svelte diff --git a/test/runtime/samples/immutable-svelte-meta/main.html b/test/runtime/samples/immutable-svelte-meta/main.svelte similarity index 100% rename from test/runtime/samples/immutable-svelte-meta/main.html rename to test/runtime/samples/immutable-svelte-meta/main.svelte diff --git a/test/runtime/samples/imported-renamed-components/ComponentOne.html b/test/runtime/samples/imported-renamed-components/ComponentOne.svelte similarity index 100% rename from test/runtime/samples/imported-renamed-components/ComponentOne.html rename to test/runtime/samples/imported-renamed-components/ComponentOne.svelte diff --git a/test/runtime/samples/imported-renamed-components/ComponentTwo.html b/test/runtime/samples/imported-renamed-components/ComponentTwo.svelte similarity index 100% rename from test/runtime/samples/imported-renamed-components/ComponentTwo.html rename to test/runtime/samples/imported-renamed-components/ComponentTwo.svelte diff --git a/test/runtime/samples/imported-renamed-components/main.html b/test/runtime/samples/imported-renamed-components/main.svelte similarity index 59% rename from test/runtime/samples/imported-renamed-components/main.html rename to test/runtime/samples/imported-renamed-components/main.svelte index 9c6efdb230..9055a9e9a5 100644 --- a/test/runtime/samples/imported-renamed-components/main.html +++ b/test/runtime/samples/imported-renamed-components/main.svelte @@ -1,6 +1,6 @@ - - - - \ No newline at end of file diff --git a/test/runtime/samples/internal-state/main.svelte b/test/runtime/samples/internal-state/main.svelte new file mode 100644 index 0000000000..594ab3c837 --- /dev/null +++ b/test/runtime/samples/internal-state/main.svelte @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/test/runtime/samples/lifecycle-events/main.html b/test/runtime/samples/lifecycle-events/main.svelte similarity index 100% rename from test/runtime/samples/lifecycle-events/main.html rename to test/runtime/samples/lifecycle-events/main.svelte diff --git a/test/runtime/samples/lifecycle-next-tick/main.html b/test/runtime/samples/lifecycle-next-tick/main.svelte similarity index 100% rename from test/runtime/samples/lifecycle-next-tick/main.html rename to test/runtime/samples/lifecycle-next-tick/main.svelte diff --git a/test/runtime/samples/lifecycle-render-order/main.html b/test/runtime/samples/lifecycle-render-order/main.svelte similarity index 100% rename from test/runtime/samples/lifecycle-render-order/main.html rename to test/runtime/samples/lifecycle-render-order/main.svelte diff --git a/test/runtime/samples/module-context-with-instance-script/main.html b/test/runtime/samples/module-context-with-instance-script/main.svelte similarity index 100% rename from test/runtime/samples/module-context-with-instance-script/main.html rename to test/runtime/samples/module-context-with-instance-script/main.svelte diff --git a/test/runtime/samples/module-context/main.html b/test/runtime/samples/module-context/main.svelte similarity index 100% rename from test/runtime/samples/module-context/main.html rename to test/runtime/samples/module-context/main.svelte diff --git a/test/runtime/samples/mutation-tracking-across-sibling-scopes/main.html b/test/runtime/samples/mutation-tracking-across-sibling-scopes/main.svelte similarity index 100% rename from test/runtime/samples/mutation-tracking-across-sibling-scopes/main.html rename to test/runtime/samples/mutation-tracking-across-sibling-scopes/main.svelte diff --git a/test/runtime/samples/names-deconflicted-nested/main.html b/test/runtime/samples/names-deconflicted-nested/main.svelte similarity index 100% rename from test/runtime/samples/names-deconflicted-nested/main.html rename to test/runtime/samples/names-deconflicted-nested/main.svelte diff --git a/test/runtime/samples/names-deconflicted/Widget.html b/test/runtime/samples/names-deconflicted/Widget.svelte similarity index 100% rename from test/runtime/samples/names-deconflicted/Widget.html rename to test/runtime/samples/names-deconflicted/Widget.svelte diff --git a/test/runtime/samples/names-deconflicted/main.html b/test/runtime/samples/names-deconflicted/main.svelte similarity index 82% rename from test/runtime/samples/names-deconflicted/main.html rename to test/runtime/samples/names-deconflicted/main.svelte index f2c47a7718..60e3ea1320 100644 --- a/test/runtime/samples/names-deconflicted/main.html +++ b/test/runtime/samples/names-deconflicted/main.svelte @@ -1,5 +1,5 @@ - - \ No newline at end of file diff --git a/test/runtime/samples/nested-transition-detach-if-false/main.svelte b/test/runtime/samples/nested-transition-detach-if-false/main.svelte new file mode 100644 index 0000000000..2a7a4b49bf --- /dev/null +++ b/test/runtime/samples/nested-transition-detach-if-false/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/nested-transition-if-block-not-remounted/Span.html b/test/runtime/samples/nested-transition-if-block-not-remounted/Span.svelte similarity index 100% rename from test/runtime/samples/nested-transition-if-block-not-remounted/Span.html rename to test/runtime/samples/nested-transition-if-block-not-remounted/Span.svelte diff --git a/test/runtime/samples/nested-transition-if-block-not-remounted/main.html b/test/runtime/samples/nested-transition-if-block-not-remounted/main.svelte similarity index 75% rename from test/runtime/samples/nested-transition-if-block-not-remounted/main.html rename to test/runtime/samples/nested-transition-if-block-not-remounted/main.svelte index 373d3d0485..e6456a86f6 100644 --- a/test/runtime/samples/nested-transition-if-block-not-remounted/main.html +++ b/test/runtime/samples/nested-transition-if-block-not-remounted/main.svelte @@ -1,7 +1,7 @@
    diff --git a/test/runtime/samples/noscript-removal/main.html b/test/runtime/samples/noscript-removal/main.svelte similarity index 100% rename from test/runtime/samples/noscript-removal/main.html rename to test/runtime/samples/noscript-removal/main.svelte diff --git a/test/runtime/samples/ondestroy-before-cleanup/Top.html b/test/runtime/samples/ondestroy-before-cleanup/Top.svelte similarity index 100% rename from test/runtime/samples/ondestroy-before-cleanup/Top.html rename to test/runtime/samples/ondestroy-before-cleanup/Top.svelte diff --git a/test/runtime/samples/ondestroy-before-cleanup/main.html b/test/runtime/samples/ondestroy-before-cleanup/main.svelte similarity index 74% rename from test/runtime/samples/ondestroy-before-cleanup/main.html rename to test/runtime/samples/ondestroy-before-cleanup/main.svelte index 34053dd613..efd940053e 100644 --- a/test/runtime/samples/ondestroy-before-cleanup/main.html +++ b/test/runtime/samples/ondestroy-before-cleanup/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/onmount-fires-when-ready-nested/Widget.html b/test/runtime/samples/onmount-fires-when-ready-nested/Widget.svelte similarity index 100% rename from test/runtime/samples/onmount-fires-when-ready-nested/Widget.html rename to test/runtime/samples/onmount-fires-when-ready-nested/Widget.svelte diff --git a/test/runtime/samples/onmount-fires-when-ready-nested/main.html b/test/runtime/samples/onmount-fires-when-ready-nested/main.html deleted file mode 100644 index 910f63e086..0000000000 --- a/test/runtime/samples/onmount-fires-when-ready-nested/main.html +++ /dev/null @@ -1,9 +0,0 @@ - - -
    - - -
    diff --git a/test/runtime/samples/onmount-fires-when-ready-nested/main.svelte b/test/runtime/samples/onmount-fires-when-ready-nested/main.svelte new file mode 100644 index 0000000000..a155293e26 --- /dev/null +++ b/test/runtime/samples/onmount-fires-when-ready-nested/main.svelte @@ -0,0 +1,9 @@ + + +
    + + +
    diff --git a/test/runtime/samples/onmount-fires-when-ready/Widget.html b/test/runtime/samples/onmount-fires-when-ready/Widget.svelte similarity index 100% rename from test/runtime/samples/onmount-fires-when-ready/Widget.html rename to test/runtime/samples/onmount-fires-when-ready/Widget.svelte diff --git a/test/runtime/samples/onmount-fires-when-ready/main.html b/test/runtime/samples/onmount-fires-when-ready/main.svelte similarity index 70% rename from test/runtime/samples/onmount-fires-when-ready/main.html rename to test/runtime/samples/onmount-fires-when-ready/main.svelte index f2760ecff1..1204ac6719 100644 --- a/test/runtime/samples/onmount-fires-when-ready/main.html +++ b/test/runtime/samples/onmount-fires-when-ready/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/onmount-sibling-order/Nested.html b/test/runtime/samples/onmount-sibling-order/Nested.svelte similarity index 100% rename from test/runtime/samples/onmount-sibling-order/Nested.html rename to test/runtime/samples/onmount-sibling-order/Nested.svelte diff --git a/test/runtime/samples/onmount-sibling-order/main.html b/test/runtime/samples/onmount-sibling-order/main.html deleted file mode 100644 index e4218aa4b4..0000000000 --- a/test/runtime/samples/onmount-sibling-order/main.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/test/runtime/samples/onmount-sibling-order/main.svelte b/test/runtime/samples/onmount-sibling-order/main.svelte new file mode 100644 index 0000000000..3fbf499755 --- /dev/null +++ b/test/runtime/samples/onmount-sibling-order/main.svelte @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/option-without-select/main.html b/test/runtime/samples/option-without-select/main.svelte similarity index 100% rename from test/runtime/samples/option-without-select/main.html rename to test/runtime/samples/option-without-select/main.svelte diff --git a/test/runtime/samples/paren-wrapped-expressions/main.html b/test/runtime/samples/paren-wrapped-expressions/main.svelte similarity index 100% rename from test/runtime/samples/paren-wrapped-expressions/main.html rename to test/runtime/samples/paren-wrapped-expressions/main.svelte diff --git a/test/runtime/samples/preload/main.html b/test/runtime/samples/preload/main.svelte similarity index 100% rename from test/runtime/samples/preload/main.html rename to test/runtime/samples/preload/main.svelte diff --git a/test/runtime/samples/prop-not-action/Nested.html b/test/runtime/samples/prop-not-action/Nested.svelte similarity index 100% rename from test/runtime/samples/prop-not-action/Nested.html rename to test/runtime/samples/prop-not-action/Nested.svelte diff --git a/test/runtime/samples/prop-not-action/main.html b/test/runtime/samples/prop-not-action/main.html deleted file mode 100644 index c0ddd01e79..0000000000 --- a/test/runtime/samples/prop-not-action/main.html +++ /dev/null @@ -1,6 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/prop-not-action/main.svelte b/test/runtime/samples/prop-not-action/main.svelte new file mode 100644 index 0000000000..e1c40bc070 --- /dev/null +++ b/test/runtime/samples/prop-not-action/main.svelte @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/prop-without-semicolon-b/main.html b/test/runtime/samples/prop-without-semicolon-b/main.svelte similarity index 100% rename from test/runtime/samples/prop-without-semicolon-b/main.html rename to test/runtime/samples/prop-without-semicolon-b/main.svelte diff --git a/test/runtime/samples/prop-without-semicolon/main.html b/test/runtime/samples/prop-without-semicolon/main.svelte similarity index 100% rename from test/runtime/samples/prop-without-semicolon/main.html rename to test/runtime/samples/prop-without-semicolon/main.svelte diff --git a/test/runtime/samples/raw-anchor-first-child/main.html b/test/runtime/samples/raw-anchor-first-child/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-first-child/main.html rename to test/runtime/samples/raw-anchor-first-child/main.svelte diff --git a/test/runtime/samples/raw-anchor-first-last-child/main.html b/test/runtime/samples/raw-anchor-first-last-child/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-first-last-child/main.html rename to test/runtime/samples/raw-anchor-first-last-child/main.svelte diff --git a/test/runtime/samples/raw-anchor-last-child/main.html b/test/runtime/samples/raw-anchor-last-child/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-last-child/main.html rename to test/runtime/samples/raw-anchor-last-child/main.svelte diff --git a/test/runtime/samples/raw-anchor-next-previous-sibling/main.html b/test/runtime/samples/raw-anchor-next-previous-sibling/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-next-previous-sibling/main.html rename to test/runtime/samples/raw-anchor-next-previous-sibling/main.svelte diff --git a/test/runtime/samples/raw-anchor-next-sibling/main.html b/test/runtime/samples/raw-anchor-next-sibling/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-next-sibling/main.html rename to test/runtime/samples/raw-anchor-next-sibling/main.svelte diff --git a/test/runtime/samples/raw-anchor-previous-sibling/main.html b/test/runtime/samples/raw-anchor-previous-sibling/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-previous-sibling/main.html rename to test/runtime/samples/raw-anchor-previous-sibling/main.svelte diff --git a/test/runtime/samples/raw-mustaches-preserved/main.html b/test/runtime/samples/raw-mustaches-preserved/main.svelte similarity index 100% rename from test/runtime/samples/raw-mustaches-preserved/main.html rename to test/runtime/samples/raw-mustaches-preserved/main.svelte diff --git a/test/runtime/samples/raw-mustaches/main.html b/test/runtime/samples/raw-mustaches/main.svelte similarity index 100% rename from test/runtime/samples/raw-mustaches/main.html rename to test/runtime/samples/raw-mustaches/main.svelte diff --git a/test/runtime/samples/reactive-function/main.html b/test/runtime/samples/reactive-function/main.svelte similarity index 100% rename from test/runtime/samples/reactive-function/main.html rename to test/runtime/samples/reactive-function/main.svelte diff --git a/test/runtime/samples/reactive-values-deconflicted/main.html b/test/runtime/samples/reactive-values-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-deconflicted/main.html rename to test/runtime/samples/reactive-values-deconflicted/main.svelte diff --git a/test/runtime/samples/reactive-values-function-dependency/main.html b/test/runtime/samples/reactive-values-function-dependency/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-function-dependency/main.html rename to test/runtime/samples/reactive-values-function-dependency/main.svelte diff --git a/test/runtime/samples/reactive-values-implicit/main.html b/test/runtime/samples/reactive-values-implicit/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-implicit/main.html rename to test/runtime/samples/reactive-values-implicit/main.svelte diff --git a/test/runtime/samples/reactive-values-non-cyclical/main.html b/test/runtime/samples/reactive-values-non-cyclical/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-non-cyclical/main.html rename to test/runtime/samples/reactive-values-non-cyclical/main.svelte diff --git a/test/runtime/samples/reactive-values-readonly/main.html b/test/runtime/samples/reactive-values-readonly/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-readonly/main.html rename to test/runtime/samples/reactive-values-readonly/main.svelte diff --git a/test/runtime/samples/reactive-values-second-order/main.html b/test/runtime/samples/reactive-values-second-order/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-second-order/main.html rename to test/runtime/samples/reactive-values-second-order/main.svelte diff --git a/test/runtime/samples/reactive-values-self-dependency/main.html b/test/runtime/samples/reactive-values-self-dependency/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-self-dependency/main.html rename to test/runtime/samples/reactive-values-self-dependency/main.svelte diff --git a/test/runtime/samples/reactive-values/main.html b/test/runtime/samples/reactive-values/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values/main.html rename to test/runtime/samples/reactive-values/main.svelte diff --git a/test/runtime/samples/script-style-non-top-level/main.html b/test/runtime/samples/script-style-non-top-level/main.svelte similarity index 100% rename from test/runtime/samples/script-style-non-top-level/main.html rename to test/runtime/samples/script-style-non-top-level/main.svelte diff --git a/test/runtime/samples/select-bind-array/main.html b/test/runtime/samples/select-bind-array/main.svelte similarity index 100% rename from test/runtime/samples/select-bind-array/main.html rename to test/runtime/samples/select-bind-array/main.svelte diff --git a/test/runtime/samples/select-bind-in-array/main.html b/test/runtime/samples/select-bind-in-array/main.svelte similarity index 100% rename from test/runtime/samples/select-bind-in-array/main.html rename to test/runtime/samples/select-bind-in-array/main.svelte diff --git a/test/runtime/samples/select-change-handler/main.html b/test/runtime/samples/select-change-handler/main.svelte similarity index 100% rename from test/runtime/samples/select-change-handler/main.html rename to test/runtime/samples/select-change-handler/main.svelte diff --git a/test/runtime/samples/select-no-whitespace/main.html b/test/runtime/samples/select-no-whitespace/main.svelte similarity index 100% rename from test/runtime/samples/select-no-whitespace/main.html rename to test/runtime/samples/select-no-whitespace/main.svelte diff --git a/test/runtime/samples/select-one-way-bind-object/main.html b/test/runtime/samples/select-one-way-bind-object/main.svelte similarity index 100% rename from test/runtime/samples/select-one-way-bind-object/main.html rename to test/runtime/samples/select-one-way-bind-object/main.svelte diff --git a/test/runtime/samples/select-one-way-bind/main.html b/test/runtime/samples/select-one-way-bind/main.svelte similarity index 100% rename from test/runtime/samples/select-one-way-bind/main.html rename to test/runtime/samples/select-one-way-bind/main.svelte diff --git a/test/runtime/samples/select-props/main.html b/test/runtime/samples/select-props/main.svelte similarity index 100% rename from test/runtime/samples/select-props/main.html rename to test/runtime/samples/select-props/main.svelte diff --git a/test/runtime/samples/select/main.html b/test/runtime/samples/select/main.svelte similarity index 100% rename from test/runtime/samples/select/main.html rename to test/runtime/samples/select/main.svelte diff --git a/test/runtime/samples/self-reference-tree/main.html b/test/runtime/samples/self-reference-tree/main.svelte similarity index 100% rename from test/runtime/samples/self-reference-tree/main.html rename to test/runtime/samples/self-reference-tree/main.svelte diff --git a/test/runtime/samples/self-reference/main.html b/test/runtime/samples/self-reference/main.svelte similarity index 100% rename from test/runtime/samples/self-reference/main.html rename to test/runtime/samples/self-reference/main.svelte diff --git a/test/runtime/samples/set-after-destroy/main.html b/test/runtime/samples/set-after-destroy/main.svelte similarity index 100% rename from test/runtime/samples/set-after-destroy/main.html rename to test/runtime/samples/set-after-destroy/main.svelte diff --git a/test/runtime/samples/set-in-oncreate/main.html b/test/runtime/samples/set-in-oncreate/main.svelte similarity index 100% rename from test/runtime/samples/set-in-oncreate/main.html rename to test/runtime/samples/set-in-oncreate/main.svelte diff --git a/test/runtime/samples/set-in-onstate-dedupes-renders/Widget.html b/test/runtime/samples/set-in-onstate-dedupes-renders/Widget.svelte similarity index 100% rename from test/runtime/samples/set-in-onstate-dedupes-renders/Widget.html rename to test/runtime/samples/set-in-onstate-dedupes-renders/Widget.svelte diff --git a/test/runtime/samples/set-in-onstate-dedupes-renders/main.html b/test/runtime/samples/set-in-onstate-dedupes-renders/main.svelte similarity index 83% rename from test/runtime/samples/set-in-onstate-dedupes-renders/main.html rename to test/runtime/samples/set-in-onstate-dedupes-renders/main.svelte index d6fe905c3b..cf87944bb8 100644 --- a/test/runtime/samples/set-in-onstate-dedupes-renders/main.html +++ b/test/runtime/samples/set-in-onstate-dedupes-renders/main.svelte @@ -1,7 +1,7 @@ diff --git a/test/runtime/samples/sigil-static-#/main.html b/test/runtime/samples/sigil-static-#/main.svelte similarity index 100% rename from test/runtime/samples/sigil-static-#/main.html rename to test/runtime/samples/sigil-static-#/main.svelte diff --git a/test/runtime/samples/sigil-static-@/main.html b/test/runtime/samples/sigil-static-@/main.svelte similarity index 100% rename from test/runtime/samples/sigil-static-@/main.html rename to test/runtime/samples/sigil-static-@/main.svelte diff --git a/test/runtime/samples/single-static-element/main.html b/test/runtime/samples/single-static-element/main.svelte similarity index 100% rename from test/runtime/samples/single-static-element/main.html rename to test/runtime/samples/single-static-element/main.svelte diff --git a/test/runtime/samples/single-text-node/main.html b/test/runtime/samples/single-text-node/main.svelte similarity index 100% rename from test/runtime/samples/single-text-node/main.html rename to test/runtime/samples/single-text-node/main.svelte diff --git a/test/runtime/samples/slot-in-custom-element/main.html b/test/runtime/samples/slot-in-custom-element/main.svelte similarity index 100% rename from test/runtime/samples/slot-in-custom-element/main.html rename to test/runtime/samples/slot-in-custom-element/main.svelte diff --git a/test/runtime/samples/spread-component-dynamic-undefined/main.html b/test/runtime/samples/spread-component-dynamic-undefined/main.svelte similarity index 100% rename from test/runtime/samples/spread-component-dynamic-undefined/main.html rename to test/runtime/samples/spread-component-dynamic-undefined/main.svelte diff --git a/test/runtime/samples/spread-component-dynamic/Foo.html b/test/runtime/samples/spread-component-dynamic/Foo.svelte similarity index 100% rename from test/runtime/samples/spread-component-dynamic/Foo.html rename to test/runtime/samples/spread-component-dynamic/Foo.svelte diff --git a/test/runtime/samples/spread-component-dynamic/main.html b/test/runtime/samples/spread-component-dynamic/main.html deleted file mode 100644 index 4b83ee5307..0000000000 --- a/test/runtime/samples/spread-component-dynamic/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/spread-component-dynamic/main.svelte b/test/runtime/samples/spread-component-dynamic/main.svelte new file mode 100644 index 0000000000..879a5c2cd5 --- /dev/null +++ b/test/runtime/samples/spread-component-dynamic/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/spread-component-multiple-dependencies/Widget.html b/test/runtime/samples/spread-component-multiple-dependencies/Widget.svelte similarity index 100% rename from test/runtime/samples/spread-component-multiple-dependencies/Widget.html rename to test/runtime/samples/spread-component-multiple-dependencies/Widget.svelte diff --git a/test/runtime/samples/spread-component-multiple-dependencies/main.html b/test/runtime/samples/spread-component-multiple-dependencies/main.svelte similarity index 80% rename from test/runtime/samples/spread-component-multiple-dependencies/main.html rename to test/runtime/samples/spread-component-multiple-dependencies/main.svelte index 79ed1d2974..a60043391a 100644 --- a/test/runtime/samples/spread-component-multiple-dependencies/main.html +++ b/test/runtime/samples/spread-component-multiple-dependencies/main.svelte @@ -4,7 +4,7 @@ export let b = 'b'; export let bar = { baz: 'baz' }; - import Widget from './Widget.html'; + import Widget from './Widget.svelte'; diff --git a/test/runtime/samples/spread-component-with-bind/Widget.html b/test/runtime/samples/spread-component-with-bind/Widget.svelte similarity index 100% rename from test/runtime/samples/spread-component-with-bind/Widget.html rename to test/runtime/samples/spread-component-with-bind/Widget.svelte diff --git a/test/runtime/samples/spread-component-with-bind/main.html b/test/runtime/samples/spread-component-with-bind/main.html deleted file mode 100644 index e4c81624fd..0000000000 --- a/test/runtime/samples/spread-component-with-bind/main.html +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/spread-component-with-bind/main.svelte b/test/runtime/samples/spread-component-with-bind/main.svelte new file mode 100644 index 0000000000..98375e2348 --- /dev/null +++ b/test/runtime/samples/spread-component-with-bind/main.svelte @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/spread-component/Widget.html b/test/runtime/samples/spread-component/Widget.svelte similarity index 100% rename from test/runtime/samples/spread-component/Widget.html rename to test/runtime/samples/spread-component/Widget.svelte diff --git a/test/runtime/samples/spread-component/main.html b/test/runtime/samples/spread-component/main.svelte similarity index 69% rename from test/runtime/samples/spread-component/main.html rename to test/runtime/samples/spread-component/main.svelte index 351a7964ef..3ca281903e 100644 --- a/test/runtime/samples/spread-component/main.html +++ b/test/runtime/samples/spread-component/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/spread-each-component/Nested.html b/test/runtime/samples/spread-each-component/Nested.svelte similarity index 100% rename from test/runtime/samples/spread-each-component/Nested.html rename to test/runtime/samples/spread-each-component/Nested.svelte diff --git a/test/runtime/samples/spread-each-component/main.html b/test/runtime/samples/spread-each-component/main.svelte similarity index 65% rename from test/runtime/samples/spread-each-component/main.html rename to test/runtime/samples/spread-each-component/main.svelte index 2124861160..f8c0cebaba 100644 --- a/test/runtime/samples/spread-each-component/main.html +++ b/test/runtime/samples/spread-each-component/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/spread-each-element/main.html b/test/runtime/samples/spread-each-element/main.svelte similarity index 100% rename from test/runtime/samples/spread-each-element/main.html rename to test/runtime/samples/spread-each-element/main.svelte diff --git a/test/runtime/samples/spread-element-boolean/main.html b/test/runtime/samples/spread-element-boolean/main.svelte similarity index 100% rename from test/runtime/samples/spread-element-boolean/main.html rename to test/runtime/samples/spread-element-boolean/main.svelte diff --git a/test/runtime/samples/spread-element-input/main.html b/test/runtime/samples/spread-element-input/main.svelte similarity index 100% rename from test/runtime/samples/spread-element-input/main.html rename to test/runtime/samples/spread-element-input/main.svelte diff --git a/test/runtime/samples/spread-element-multiple-dependencies/main.html b/test/runtime/samples/spread-element-multiple-dependencies/main.svelte similarity index 100% rename from test/runtime/samples/spread-element-multiple-dependencies/main.html rename to test/runtime/samples/spread-element-multiple-dependencies/main.svelte diff --git a/test/runtime/samples/spread-element-multiple/main.html b/test/runtime/samples/spread-element-multiple/main.svelte similarity index 100% rename from test/runtime/samples/spread-element-multiple/main.html rename to test/runtime/samples/spread-element-multiple/main.svelte diff --git a/test/runtime/samples/spread-element/main.html b/test/runtime/samples/spread-element/main.svelte similarity index 100% rename from test/runtime/samples/spread-element/main.html rename to test/runtime/samples/spread-element/main.svelte diff --git a/test/runtime/samples/spread-own-props/Widget.html b/test/runtime/samples/spread-own-props/Widget.svelte similarity index 100% rename from test/runtime/samples/spread-own-props/Widget.html rename to test/runtime/samples/spread-own-props/Widget.svelte diff --git a/test/runtime/samples/spread-own-props/main.html b/test/runtime/samples/spread-own-props/main.svelte similarity index 73% rename from test/runtime/samples/spread-own-props/main.html rename to test/runtime/samples/spread-own-props/main.svelte index 79afded90e..5fbd75d663 100644 --- a/test/runtime/samples/spread-own-props/main.html +++ b/test/runtime/samples/spread-own-props/main.svelte @@ -1,7 +1,7 @@ diff --git a/test/runtime/samples/state-deconflicted/main.html b/test/runtime/samples/state-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/state-deconflicted/main.html rename to test/runtime/samples/state-deconflicted/main.svelte diff --git a/test/runtime/samples/store-auto-subscribe-implicit/main.html b/test/runtime/samples/store-auto-subscribe-implicit/main.svelte similarity index 100% rename from test/runtime/samples/store-auto-subscribe-implicit/main.html rename to test/runtime/samples/store-auto-subscribe-implicit/main.svelte diff --git a/test/runtime/samples/store-auto-subscribe-in-each/main.html b/test/runtime/samples/store-auto-subscribe-in-each/main.svelte similarity index 100% rename from test/runtime/samples/store-auto-subscribe-in-each/main.html rename to test/runtime/samples/store-auto-subscribe-in-each/main.svelte diff --git a/test/runtime/samples/store-auto-subscribe-in-reactive-declaration/main.html b/test/runtime/samples/store-auto-subscribe-in-reactive-declaration/main.svelte similarity index 100% rename from test/runtime/samples/store-auto-subscribe-in-reactive-declaration/main.html rename to test/runtime/samples/store-auto-subscribe-in-reactive-declaration/main.svelte diff --git a/test/runtime/samples/store-auto-subscribe-in-script/main.html b/test/runtime/samples/store-auto-subscribe-in-script/main.svelte similarity index 100% rename from test/runtime/samples/store-auto-subscribe-in-script/main.html rename to test/runtime/samples/store-auto-subscribe-in-script/main.svelte diff --git a/test/runtime/samples/store-auto-subscribe/main.html b/test/runtime/samples/store-auto-subscribe/main.svelte similarity index 100% rename from test/runtime/samples/store-auto-subscribe/main.html rename to test/runtime/samples/store-auto-subscribe/main.svelte diff --git a/test/runtime/samples/store-dev-mode-error/main.html b/test/runtime/samples/store-dev-mode-error/main.svelte similarity index 100% rename from test/runtime/samples/store-dev-mode-error/main.html rename to test/runtime/samples/store-dev-mode-error/main.svelte diff --git a/test/runtime/samples/store-prevent-user-declarations/main.html b/test/runtime/samples/store-prevent-user-declarations/main.svelte similarity index 100% rename from test/runtime/samples/store-prevent-user-declarations/main.html rename to test/runtime/samples/store-prevent-user-declarations/main.svelte diff --git a/test/runtime/samples/svg-attributes/main.html b/test/runtime/samples/svg-attributes/main.svelte similarity index 100% rename from test/runtime/samples/svg-attributes/main.html rename to test/runtime/samples/svg-attributes/main.svelte diff --git a/test/runtime/samples/svg-child-component-declared-namespace-shorthand/Rect.html b/test/runtime/samples/svg-child-component-declared-namespace-shorthand/Rect.svelte similarity index 100% rename from test/runtime/samples/svg-child-component-declared-namespace-shorthand/Rect.html rename to test/runtime/samples/svg-child-component-declared-namespace-shorthand/Rect.svelte diff --git a/test/runtime/samples/svg-child-component-declared-namespace/main.html b/test/runtime/samples/svg-child-component-declared-namespace-shorthand/main.svelte similarity index 82% rename from test/runtime/samples/svg-child-component-declared-namespace/main.html rename to test/runtime/samples/svg-child-component-declared-namespace-shorthand/main.svelte index 9e82368dbc..aa65b2b453 100644 --- a/test/runtime/samples/svg-child-component-declared-namespace/main.html +++ b/test/runtime/samples/svg-child-component-declared-namespace-shorthand/main.svelte @@ -1,5 +1,5 @@ - - \ No newline at end of file diff --git a/test/runtime/samples/transition-js-dynamic-component/main.svelte b/test/runtime/samples/transition-js-dynamic-component/main.svelte new file mode 100644 index 0000000000..08697ec1a9 --- /dev/null +++ b/test/runtime/samples/transition-js-dynamic-component/main.svelte @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/transition-js-dynamic-if-block-bidi/main.html b/test/runtime/samples/transition-js-dynamic-if-block-bidi/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-dynamic-if-block-bidi/main.html rename to test/runtime/samples/transition-js-dynamic-if-block-bidi/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-intro-outro/main.html b/test/runtime/samples/transition-js-each-block-intro-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-intro-outro/main.html rename to test/runtime/samples/transition-js-each-block-intro-outro/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-intro/main.html b/test/runtime/samples/transition-js-each-block-intro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-intro/main.html rename to test/runtime/samples/transition-js-each-block-intro/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-keyed-intro-outro/main.html b/test/runtime/samples/transition-js-each-block-keyed-intro-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-keyed-intro-outro/main.html rename to test/runtime/samples/transition-js-each-block-keyed-intro-outro/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-keyed-intro/main.html b/test/runtime/samples/transition-js-each-block-keyed-intro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-keyed-intro/main.html rename to test/runtime/samples/transition-js-each-block-keyed-intro/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-keyed-outro/main.html b/test/runtime/samples/transition-js-each-block-keyed-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-keyed-outro/main.html rename to test/runtime/samples/transition-js-each-block-keyed-outro/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-outro/main.html b/test/runtime/samples/transition-js-each-block-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-outro/main.html rename to test/runtime/samples/transition-js-each-block-outro/main.svelte diff --git a/test/runtime/samples/transition-js-each-keyed-unchanged/main.html b/test/runtime/samples/transition-js-each-keyed-unchanged/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-keyed-unchanged/main.html rename to test/runtime/samples/transition-js-each-keyed-unchanged/main.svelte diff --git a/test/runtime/samples/transition-js-each-unchanged/main.html b/test/runtime/samples/transition-js-each-unchanged/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-unchanged/main.html rename to test/runtime/samples/transition-js-each-unchanged/main.svelte diff --git a/test/runtime/samples/transition-js-events/main.html b/test/runtime/samples/transition-js-events/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-events/main.html rename to test/runtime/samples/transition-js-events/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-bidi/main.html b/test/runtime/samples/transition-js-if-block-bidi/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-bidi/main.html rename to test/runtime/samples/transition-js-if-block-bidi/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/main.html b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/main.html rename to test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/main.html b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/main.html rename to test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-in-each-block-bidi/main.html b/test/runtime/samples/transition-js-if-block-in-each-block-bidi/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-in-each-block-bidi/main.html rename to test/runtime/samples/transition-js-if-block-in-each-block-bidi/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-intro-outro/main.html b/test/runtime/samples/transition-js-if-block-intro-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-intro-outro/main.html rename to test/runtime/samples/transition-js-if-block-intro-outro/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-intro/main.html b/test/runtime/samples/transition-js-if-block-intro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-intro/main.html rename to test/runtime/samples/transition-js-if-block-intro/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-outro-timeout/main.html b/test/runtime/samples/transition-js-if-block-outro-timeout/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-outro-timeout/main.html rename to test/runtime/samples/transition-js-if-block-outro-timeout/main.svelte diff --git a/test/runtime/samples/transition-js-if-else-block-dynamic-outro/main.html b/test/runtime/samples/transition-js-if-else-block-dynamic-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-else-block-dynamic-outro/main.html rename to test/runtime/samples/transition-js-if-else-block-dynamic-outro/main.svelte diff --git a/test/runtime/samples/transition-js-if-else-block-intro/main.html b/test/runtime/samples/transition-js-if-else-block-intro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-else-block-intro/main.html rename to test/runtime/samples/transition-js-if-else-block-intro/main.svelte diff --git a/test/runtime/samples/transition-js-if-else-block-outro/main.html b/test/runtime/samples/transition-js-if-else-block-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-else-block-outro/main.html rename to test/runtime/samples/transition-js-if-else-block-outro/main.svelte diff --git a/test/runtime/samples/transition-js-if-elseif-block-outro/main.html b/test/runtime/samples/transition-js-if-elseif-block-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-elseif-block-outro/main.html rename to test/runtime/samples/transition-js-if-elseif-block-outro/main.svelte diff --git a/test/runtime/samples/transition-js-initial/main.html b/test/runtime/samples/transition-js-initial/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-initial/main.html rename to test/runtime/samples/transition-js-initial/main.svelte diff --git a/test/runtime/samples/transition-js-intro-enabled-by-option/main.html b/test/runtime/samples/transition-js-intro-enabled-by-option/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-intro-enabled-by-option/main.html rename to test/runtime/samples/transition-js-intro-enabled-by-option/main.svelte diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.html b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.svelte similarity index 100% rename from test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.html rename to test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.svelte diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.html b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.html deleted file mode 100644 index cbcde3f1ed..0000000000 --- a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.svelte b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.svelte new file mode 100644 index 0000000000..0a9d5bba87 --- /dev/null +++ b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default/main.html b/test/runtime/samples/transition-js-intro-skipped-by-default/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-intro-skipped-by-default/main.html rename to test/runtime/samples/transition-js-intro-skipped-by-default/main.svelte diff --git a/test/runtime/samples/transition-js-local-and-global/main.html b/test/runtime/samples/transition-js-local-and-global/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-local-and-global/main.html rename to test/runtime/samples/transition-js-local-and-global/main.svelte diff --git a/test/runtime/samples/transition-js-local-nested-await/main.html b/test/runtime/samples/transition-js-local-nested-await/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-local-nested-await/main.html rename to test/runtime/samples/transition-js-local-nested-await/main.svelte diff --git a/test/runtime/samples/transition-js-local-nested-component/Widget.html b/test/runtime/samples/transition-js-local-nested-component/Widget.svelte similarity index 100% rename from test/runtime/samples/transition-js-local-nested-component/Widget.html rename to test/runtime/samples/transition-js-local-nested-component/Widget.svelte diff --git a/test/runtime/samples/transition-js-local-nested-component/main.html b/test/runtime/samples/transition-js-local-nested-component/main.svelte similarity index 55% rename from test/runtime/samples/transition-js-local-nested-component/main.html rename to test/runtime/samples/transition-js-local-nested-component/main.svelte index 2eb867a667..761ef9d860 100644 --- a/test/runtime/samples/transition-js-local-nested-component/main.html +++ b/test/runtime/samples/transition-js-local-nested-component/main.svelte @@ -1,7 +1,7 @@ {#if x} diff --git a/test/runtime/samples/transition-js-local-nested-each-keyed/main.html b/test/runtime/samples/transition-js-local-nested-each-keyed/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-local-nested-each-keyed/main.html rename to test/runtime/samples/transition-js-local-nested-each-keyed/main.svelte diff --git a/test/runtime/samples/transition-js-local-nested-each/main.html b/test/runtime/samples/transition-js-local-nested-each/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-local-nested-each/main.html rename to test/runtime/samples/transition-js-local-nested-each/main.svelte diff --git a/test/runtime/samples/transition-js-local-nested-if/main.html b/test/runtime/samples/transition-js-local-nested-if/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-local-nested-if/main.html rename to test/runtime/samples/transition-js-local-nested-if/main.svelte diff --git a/test/runtime/samples/transition-js-local/main.html b/test/runtime/samples/transition-js-local/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-local/main.html rename to test/runtime/samples/transition-js-local/main.svelte diff --git a/test/runtime/samples/transition-js-nested-await/main.html b/test/runtime/samples/transition-js-nested-await/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-await/main.html rename to test/runtime/samples/transition-js-nested-await/main.svelte diff --git a/test/runtime/samples/transition-js-nested-component/Widget.html b/test/runtime/samples/transition-js-nested-component/Widget.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-component/Widget.html rename to test/runtime/samples/transition-js-nested-component/Widget.svelte diff --git a/test/runtime/samples/transition-js-nested-component/main.html b/test/runtime/samples/transition-js-nested-component/main.svelte similarity index 55% rename from test/runtime/samples/transition-js-nested-component/main.html rename to test/runtime/samples/transition-js-nested-component/main.svelte index b4b3beccd8..8cfaa3bf02 100644 --- a/test/runtime/samples/transition-js-nested-component/main.html +++ b/test/runtime/samples/transition-js-nested-component/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/transition-js-nested-each-delete/main.html b/test/runtime/samples/transition-js-nested-each-delete/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-each-delete/main.html rename to test/runtime/samples/transition-js-nested-each-delete/main.svelte diff --git a/test/runtime/samples/transition-js-nested-each-keyed-2/Widget.html b/test/runtime/samples/transition-js-nested-each-keyed-2/Widget.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-each-keyed-2/Widget.html rename to test/runtime/samples/transition-js-nested-each-keyed-2/Widget.svelte diff --git a/test/runtime/samples/transition-js-nested-each-keyed-2/main.html b/test/runtime/samples/transition-js-nested-each-keyed-2/main.svelte similarity index 65% rename from test/runtime/samples/transition-js-nested-each-keyed-2/main.html rename to test/runtime/samples/transition-js-nested-each-keyed-2/main.svelte index 11096498cb..8a8ef57576 100644 --- a/test/runtime/samples/transition-js-nested-each-keyed-2/main.html +++ b/test/runtime/samples/transition-js-nested-each-keyed-2/main.svelte @@ -2,7 +2,7 @@ export let x; export let things; - import Widget from './Widget.html'; + import Widget from './Widget.svelte'; {#if x} diff --git a/test/runtime/samples/transition-js-nested-each-keyed/main.html b/test/runtime/samples/transition-js-nested-each-keyed/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-each-keyed/main.html rename to test/runtime/samples/transition-js-nested-each-keyed/main.svelte diff --git a/test/runtime/samples/transition-js-nested-each/main.html b/test/runtime/samples/transition-js-nested-each/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-each/main.html rename to test/runtime/samples/transition-js-nested-each/main.svelte diff --git a/test/runtime/samples/transition-js-nested-if/main.html b/test/runtime/samples/transition-js-nested-if/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-if/main.html rename to test/runtime/samples/transition-js-nested-if/main.svelte diff --git a/test/runtime/samples/transition-js-nested-intro/Child.html b/test/runtime/samples/transition-js-nested-intro/Child.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-intro/Child.html rename to test/runtime/samples/transition-js-nested-intro/Child.svelte diff --git a/test/runtime/samples/transition-js-nested-intro/main.html b/test/runtime/samples/transition-js-nested-intro/main.svelte similarity index 65% rename from test/runtime/samples/transition-js-nested-intro/main.html rename to test/runtime/samples/transition-js-nested-intro/main.svelte index f222940ad5..5ae29bee7b 100644 --- a/test/runtime/samples/transition-js-nested-intro/main.html +++ b/test/runtime/samples/transition-js-nested-intro/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/transition-js-parameterised-with-state/main.html b/test/runtime/samples/transition-js-parameterised-with-state/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-parameterised-with-state/main.html rename to test/runtime/samples/transition-js-parameterised-with-state/main.svelte diff --git a/test/runtime/samples/transition-js-parameterised/main.html b/test/runtime/samples/transition-js-parameterised/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-parameterised/main.html rename to test/runtime/samples/transition-js-parameterised/main.svelte diff --git a/test/runtime/samples/whitespace-each-block/main.html b/test/runtime/samples/whitespace-each-block/main.svelte similarity index 100% rename from test/runtime/samples/whitespace-each-block/main.html rename to test/runtime/samples/whitespace-each-block/main.svelte diff --git a/test/runtime/samples/whitespace-list/main.html b/test/runtime/samples/whitespace-list/main.svelte similarity index 100% rename from test/runtime/samples/whitespace-list/main.html rename to test/runtime/samples/whitespace-list/main.svelte diff --git a/test/runtime/samples/whitespace-normal/main.html b/test/runtime/samples/whitespace-normal/main.svelte similarity index 100% rename from test/runtime/samples/whitespace-normal/main.html rename to test/runtime/samples/whitespace-normal/main.svelte diff --git a/test/runtime/samples/window-bind-scroll-update/main.html b/test/runtime/samples/window-bind-scroll-update/main.svelte similarity index 100% rename from test/runtime/samples/window-bind-scroll-update/main.html rename to test/runtime/samples/window-bind-scroll-update/main.svelte diff --git a/test/runtime/samples/window-binding-multiple-handlers/main.html b/test/runtime/samples/window-binding-multiple-handlers/main.svelte similarity index 100% rename from test/runtime/samples/window-binding-multiple-handlers/main.html rename to test/runtime/samples/window-binding-multiple-handlers/main.svelte diff --git a/test/runtime/samples/window-binding-resize/main.html b/test/runtime/samples/window-binding-resize/main.svelte similarity index 100% rename from test/runtime/samples/window-binding-resize/main.html rename to test/runtime/samples/window-binding-resize/main.svelte diff --git a/test/runtime/samples/window-event-context/main.html b/test/runtime/samples/window-event-context/main.svelte similarity index 100% rename from test/runtime/samples/window-event-context/main.html rename to test/runtime/samples/window-event-context/main.svelte diff --git a/test/runtime/samples/window-event-custom/main.html b/test/runtime/samples/window-event-custom/main.svelte similarity index 100% rename from test/runtime/samples/window-event-custom/main.html rename to test/runtime/samples/window-event-custom/main.svelte diff --git a/test/runtime/samples/window-event/main.html b/test/runtime/samples/window-event/main.svelte similarity index 100% rename from test/runtime/samples/window-event/main.html rename to test/runtime/samples/window-event/main.svelte diff --git a/test/server-side-rendering/samples/attribute-boolean/_expected.html b/test/server-side-rendering/samples/attribute-boolean/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-boolean/_expected.html rename to test/server-side-rendering/samples/attribute-boolean/_expected.svelte diff --git a/test/server-side-rendering/samples/attribute-boolean/main.html b/test/server-side-rendering/samples/attribute-boolean/main.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-boolean/main.html rename to test/server-side-rendering/samples/attribute-boolean/main.svelte diff --git a/test/server-side-rendering/samples/attribute-dynamic/_expected.html b/test/server-side-rendering/samples/attribute-dynamic/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-dynamic/_expected.html rename to test/server-side-rendering/samples/attribute-dynamic/_expected.svelte diff --git a/test/server-side-rendering/samples/attribute-dynamic/main.html b/test/server-side-rendering/samples/attribute-dynamic/main.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-dynamic/main.html rename to test/server-side-rendering/samples/attribute-dynamic/main.svelte diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.html b/test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.html rename to test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.svelte diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes-spread/main.html b/test/server-side-rendering/samples/attribute-escaped-quotes-spread/main.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-escaped-quotes-spread/main.html rename to test/server-side-rendering/samples/attribute-escaped-quotes-spread/main.svelte diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes/_expected.html b/test/server-side-rendering/samples/attribute-escaped-quotes/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-escaped-quotes/_expected.html rename to test/server-side-rendering/samples/attribute-escaped-quotes/_expected.svelte diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes/main.html b/test/server-side-rendering/samples/attribute-escaped-quotes/main.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-escaped-quotes/main.html rename to test/server-side-rendering/samples/attribute-escaped-quotes/main.svelte diff --git a/test/server-side-rendering/samples/attribute-static/_expected.html b/test/server-side-rendering/samples/attribute-static/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-static/_expected.html rename to test/server-side-rendering/samples/attribute-static/_expected.svelte diff --git a/test/server-side-rendering/samples/attribute-static/main.html b/test/server-side-rendering/samples/attribute-static/main.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-static/main.html rename to test/server-side-rendering/samples/attribute-static/main.svelte diff --git a/test/server-side-rendering/samples/bindings/_expected.html b/test/server-side-rendering/samples/bindings/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/bindings/_expected.html rename to test/server-side-rendering/samples/bindings/_expected.svelte diff --git a/test/server-side-rendering/samples/bindings/main.html b/test/server-side-rendering/samples/bindings/main.svelte similarity index 100% rename from test/server-side-rendering/samples/bindings/main.html rename to test/server-side-rendering/samples/bindings/main.svelte diff --git a/test/server-side-rendering/samples/comment/_expected.html b/test/server-side-rendering/samples/comment/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/comment/_expected.html rename to test/server-side-rendering/samples/comment/_expected.svelte diff --git a/test/server-side-rendering/samples/comment/main.html b/test/server-side-rendering/samples/comment/main.svelte similarity index 100% rename from test/server-side-rendering/samples/comment/main.html rename to test/server-side-rendering/samples/comment/main.svelte diff --git a/test/server-side-rendering/samples/component-binding-renamed/Foo.html b/test/server-side-rendering/samples/component-binding-renamed/Foo.svelte similarity index 100% rename from test/server-side-rendering/samples/component-binding-renamed/Foo.html rename to test/server-side-rendering/samples/component-binding-renamed/Foo.svelte diff --git a/test/server-side-rendering/samples/component-binding-renamed/_expected.html b/test/server-side-rendering/samples/component-binding-renamed/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/component-binding-renamed/_expected.html rename to test/server-side-rendering/samples/component-binding-renamed/_expected.svelte diff --git a/test/server-side-rendering/samples/component-binding-renamed/main.html b/test/server-side-rendering/samples/component-binding-renamed/main.svelte similarity index 69% rename from test/server-side-rendering/samples/component-binding-renamed/main.html rename to test/server-side-rendering/samples/component-binding-renamed/main.svelte index 5c8af5f2ea..927239e1ec 100644 --- a/test/server-side-rendering/samples/component-binding-renamed/main.html +++ b/test/server-side-rendering/samples/component-binding-renamed/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/server-side-rendering/samples/component-data-dynamic/Widget.html b/test/server-side-rendering/samples/component-data-dynamic/Widget.svelte similarity index 100% rename from test/server-side-rendering/samples/component-data-dynamic/Widget.html rename to test/server-side-rendering/samples/component-data-dynamic/Widget.svelte diff --git a/test/server-side-rendering/samples/component-data-dynamic/_expected.html b/test/server-side-rendering/samples/component-data-dynamic/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/component-data-dynamic/_expected.html rename to test/server-side-rendering/samples/component-data-dynamic/_expected.svelte diff --git a/test/server-side-rendering/samples/component-data-dynamic/main.html b/test/server-side-rendering/samples/component-data-dynamic/main.svelte similarity index 83% rename from test/server-side-rendering/samples/component-data-dynamic/main.html rename to test/server-side-rendering/samples/component-data-dynamic/main.svelte index 74998f4742..ce7f22d6ea 100644 --- a/test/server-side-rendering/samples/component-data-dynamic/main.html +++ b/test/server-side-rendering/samples/component-data-dynamic/main.svelte @@ -1,5 +1,5 @@
    diff --git a/test/server-side-rendering/samples/component-refs-and-attributes/Widget.html b/test/server-side-rendering/samples/component-refs-and-attributes/Widget.svelte similarity index 100% rename from test/server-side-rendering/samples/component-refs-and-attributes/Widget.html rename to test/server-side-rendering/samples/component-refs-and-attributes/Widget.svelte diff --git a/test/server-side-rendering/samples/component-refs-and-attributes/_expected.html b/test/server-side-rendering/samples/component-refs-and-attributes/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/component-refs-and-attributes/_expected.html rename to test/server-side-rendering/samples/component-refs-and-attributes/_expected.svelte diff --git a/test/server-side-rendering/samples/component-refs-and-attributes/main.html b/test/server-side-rendering/samples/component-refs-and-attributes/main.svelte similarity index 74% rename from test/server-side-rendering/samples/component-refs-and-attributes/main.html rename to test/server-side-rendering/samples/component-refs-and-attributes/main.svelte index 8192bdf402..5c86521df5 100644 --- a/test/server-side-rendering/samples/component-refs-and-attributes/main.html +++ b/test/server-side-rendering/samples/component-refs-and-attributes/main.svelte @@ -1,7 +1,7 @@ diff --git a/test/server-side-rendering/samples/component-refs/Widget.html b/test/server-side-rendering/samples/component-refs/Widget.svelte similarity index 100% rename from test/server-side-rendering/samples/component-refs/Widget.html rename to test/server-side-rendering/samples/component-refs/Widget.svelte diff --git a/test/server-side-rendering/samples/component-refs/_expected.html b/test/server-side-rendering/samples/component-refs/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/component-refs/_expected.html rename to test/server-side-rendering/samples/component-refs/_expected.svelte diff --git a/test/server-side-rendering/samples/component-refs/main.html b/test/server-side-rendering/samples/component-refs/main.svelte similarity index 67% rename from test/server-side-rendering/samples/component-refs/main.html rename to test/server-side-rendering/samples/component-refs/main.svelte index 96b3d15de4..6ec0bc5438 100644 --- a/test/server-side-rendering/samples/component-refs/main.html +++ b/test/server-side-rendering/samples/component-refs/main.svelte @@ -1,7 +1,7 @@
    diff --git a/test/server-side-rendering/samples/component-with-different-extension/_expected.html b/test/server-side-rendering/samples/component-with-different-extension/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/component-with-different-extension/_expected.html rename to test/server-side-rendering/samples/component-with-different-extension/_expected.svelte diff --git a/test/server-side-rendering/samples/component-yield/Widget.html b/test/server-side-rendering/samples/component-yield/Widget.svelte similarity index 100% rename from test/server-side-rendering/samples/component-yield/Widget.html rename to test/server-side-rendering/samples/component-yield/Widget.svelte diff --git a/test/server-side-rendering/samples/component-yield/_expected.html b/test/server-side-rendering/samples/component-yield/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/component-yield/_expected.html rename to test/server-side-rendering/samples/component-yield/_expected.svelte diff --git a/test/server-side-rendering/samples/component-yield/main.html b/test/server-side-rendering/samples/component-yield/main.svelte similarity index 69% rename from test/server-side-rendering/samples/component-yield/main.html rename to test/server-side-rendering/samples/component-yield/main.svelte index 9c2f573c91..2dbd669a78 100644 --- a/test/server-side-rendering/samples/component-yield/main.html +++ b/test/server-side-rendering/samples/component-yield/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/server-side-rendering/samples/component/Widget.html b/test/server-side-rendering/samples/component/Widget.svelte similarity index 100% rename from test/server-side-rendering/samples/component/Widget.html rename to test/server-side-rendering/samples/component/Widget.svelte diff --git a/test/server-side-rendering/samples/component/_expected.html b/test/server-side-rendering/samples/component/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/component/_expected.html rename to test/server-side-rendering/samples/component/_expected.svelte diff --git a/test/server-side-rendering/samples/component/main.html b/test/server-side-rendering/samples/component/main.svelte similarity index 53% rename from test/server-side-rendering/samples/component/main.html rename to test/server-side-rendering/samples/component/main.svelte index ecb4297a40..ac0b429163 100644 --- a/test/server-side-rendering/samples/component/main.html +++ b/test/server-side-rendering/samples/component/main.svelte @@ -1,5 +1,5 @@
    diff --git a/test/server-side-rendering/samples/computed/_expected.html b/test/server-side-rendering/samples/computed/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/computed/_expected.html rename to test/server-side-rendering/samples/computed/_expected.svelte diff --git a/test/server-side-rendering/samples/computed/main.html b/test/server-side-rendering/samples/computed/main.svelte similarity index 100% rename from test/server-side-rendering/samples/computed/main.html rename to test/server-side-rendering/samples/computed/main.svelte diff --git a/test/server-side-rendering/samples/default-data-override/_expected.html b/test/server-side-rendering/samples/default-data-override/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/default-data-override/_expected.html rename to test/server-side-rendering/samples/default-data-override/_expected.svelte diff --git a/test/server-side-rendering/samples/default-data-override/main.html b/test/server-side-rendering/samples/default-data-override/main.svelte similarity index 100% rename from test/server-side-rendering/samples/default-data-override/main.html rename to test/server-side-rendering/samples/default-data-override/main.svelte diff --git a/test/server-side-rendering/samples/default-data/_expected.html b/test/server-side-rendering/samples/default-data/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/default-data/_expected.html rename to test/server-side-rendering/samples/default-data/_expected.svelte diff --git a/test/server-side-rendering/samples/default-data/main.html b/test/server-side-rendering/samples/default-data/main.svelte similarity index 100% rename from test/server-side-rendering/samples/default-data/main.html rename to test/server-side-rendering/samples/default-data/main.svelte diff --git a/test/server-side-rendering/samples/directives/_expected.html b/test/server-side-rendering/samples/directives/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/directives/_expected.html rename to test/server-side-rendering/samples/directives/_expected.svelte diff --git a/test/server-side-rendering/samples/directives/main.html b/test/server-side-rendering/samples/directives/main.svelte similarity index 100% rename from test/server-side-rendering/samples/directives/main.html rename to test/server-side-rendering/samples/directives/main.svelte diff --git a/test/server-side-rendering/samples/dynamic-text-escaped/_expected.html b/test/server-side-rendering/samples/dynamic-text-escaped/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/dynamic-text-escaped/_expected.html rename to test/server-side-rendering/samples/dynamic-text-escaped/_expected.svelte diff --git a/test/server-side-rendering/samples/dynamic-text-escaped/main.html b/test/server-side-rendering/samples/dynamic-text-escaped/main.svelte similarity index 100% rename from test/server-side-rendering/samples/dynamic-text-escaped/main.html rename to test/server-side-rendering/samples/dynamic-text-escaped/main.svelte diff --git a/test/server-side-rendering/samples/dynamic-text/_expected.html b/test/server-side-rendering/samples/dynamic-text/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/dynamic-text/_expected.html rename to test/server-side-rendering/samples/dynamic-text/_expected.svelte diff --git a/test/server-side-rendering/samples/dynamic-text/main.html b/test/server-side-rendering/samples/dynamic-text/main.svelte similarity index 100% rename from test/server-side-rendering/samples/dynamic-text/main.html rename to test/server-side-rendering/samples/dynamic-text/main.svelte diff --git a/test/server-side-rendering/samples/each-block/_expected.html b/test/server-side-rendering/samples/each-block/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/each-block/_expected.html rename to test/server-side-rendering/samples/each-block/_expected.svelte diff --git a/test/server-side-rendering/samples/each-block/main.html b/test/server-side-rendering/samples/each-block/main.svelte similarity index 100% rename from test/server-side-rendering/samples/each-block/main.html rename to test/server-side-rendering/samples/each-block/main.svelte diff --git a/test/server-side-rendering/samples/empty-elements-closed/_expected.html b/test/server-side-rendering/samples/empty-elements-closed/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/empty-elements-closed/_expected.html rename to test/server-side-rendering/samples/empty-elements-closed/_expected.svelte diff --git a/test/server-side-rendering/samples/empty-elements-closed/main.html b/test/server-side-rendering/samples/empty-elements-closed/main.svelte similarity index 100% rename from test/server-side-rendering/samples/empty-elements-closed/main.html rename to test/server-side-rendering/samples/empty-elements-closed/main.svelte diff --git a/test/server-side-rendering/samples/entities/_expected.html b/test/server-side-rendering/samples/entities/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/entities/_expected.html rename to test/server-side-rendering/samples/entities/_expected.svelte diff --git a/test/server-side-rendering/samples/entities/main.html b/test/server-side-rendering/samples/entities/main.svelte similarity index 100% rename from test/server-side-rendering/samples/entities/main.html rename to test/server-side-rendering/samples/entities/main.svelte diff --git a/test/server-side-rendering/samples/head-title/_expected-head.html b/test/server-side-rendering/samples/head-title/_expected-head.html deleted file mode 100644 index 7d696352f9..0000000000 --- a/test/server-side-rendering/samples/head-title/_expected-head.html +++ /dev/null @@ -1 +0,0 @@ -a custom title \ No newline at end of file diff --git a/test/server-side-rendering/samples/head-title/_actual-head.html b/test/server-side-rendering/samples/head-title/_expected-head.svelte similarity index 100% rename from test/server-side-rendering/samples/head-title/_actual-head.html rename to test/server-side-rendering/samples/head-title/_expected-head.svelte diff --git a/test/server-side-rendering/samples/head-title/_expected.html b/test/server-side-rendering/samples/head-title/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/head-title/_expected.html rename to test/server-side-rendering/samples/head-title/_expected.svelte diff --git a/test/server-side-rendering/samples/head-title/main.html b/test/server-side-rendering/samples/head-title/main.svelte similarity index 100% rename from test/server-side-rendering/samples/head-title/main.html rename to test/server-side-rendering/samples/head-title/main.svelte diff --git a/test/server-side-rendering/samples/helpers/_expected.html b/test/server-side-rendering/samples/helpers/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/helpers/_expected.html rename to test/server-side-rendering/samples/helpers/_expected.svelte diff --git a/test/server-side-rendering/samples/helpers/main.html b/test/server-side-rendering/samples/helpers/main.svelte similarity index 100% rename from test/server-side-rendering/samples/helpers/main.html rename to test/server-side-rendering/samples/helpers/main.svelte diff --git a/test/server-side-rendering/samples/if-block-false/_expected.html b/test/server-side-rendering/samples/if-block-false/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/if-block-false/_expected.html rename to test/server-side-rendering/samples/if-block-false/_expected.svelte diff --git a/test/server-side-rendering/samples/if-block-false/main.html b/test/server-side-rendering/samples/if-block-false/main.svelte similarity index 100% rename from test/server-side-rendering/samples/if-block-false/main.html rename to test/server-side-rendering/samples/if-block-false/main.svelte diff --git a/test/server-side-rendering/samples/if-block-true/_expected.html b/test/server-side-rendering/samples/if-block-true/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/if-block-true/_expected.html rename to test/server-side-rendering/samples/if-block-true/_expected.svelte diff --git a/test/server-side-rendering/samples/if-block-true/main.html b/test/server-side-rendering/samples/if-block-true/main.svelte similarity index 100% rename from test/server-side-rendering/samples/if-block-true/main.html rename to test/server-side-rendering/samples/if-block-true/main.svelte diff --git a/test/server-side-rendering/samples/import-non-component/_expected.html b/test/server-side-rendering/samples/import-non-component/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/import-non-component/_expected.html rename to test/server-side-rendering/samples/import-non-component/_expected.svelte diff --git a/test/server-side-rendering/samples/import-non-component/main.html b/test/server-side-rendering/samples/import-non-component/main.svelte similarity index 100% rename from test/server-side-rendering/samples/import-non-component/main.html rename to test/server-side-rendering/samples/import-non-component/main.svelte diff --git a/test/server-side-rendering/samples/raw-mustaches/_expected.html b/test/server-side-rendering/samples/raw-mustaches/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/raw-mustaches/_expected.html rename to test/server-side-rendering/samples/raw-mustaches/_expected.svelte diff --git a/test/server-side-rendering/samples/raw-mustaches/main.html b/test/server-side-rendering/samples/raw-mustaches/main.svelte similarity index 100% rename from test/server-side-rendering/samples/raw-mustaches/main.html rename to test/server-side-rendering/samples/raw-mustaches/main.svelte diff --git a/test/server-side-rendering/samples/sanitize-name/[foo].html b/test/server-side-rendering/samples/sanitize-name/[foo].svelte similarity index 100% rename from test/server-side-rendering/samples/sanitize-name/[foo].html rename to test/server-side-rendering/samples/sanitize-name/[foo].svelte diff --git a/test/server-side-rendering/samples/sanitize-name/_expected.html b/test/server-side-rendering/samples/sanitize-name/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/sanitize-name/_expected.html rename to test/server-side-rendering/samples/sanitize-name/_expected.svelte diff --git a/test/server-side-rendering/samples/sanitize-name/main.html b/test/server-side-rendering/samples/sanitize-name/main.html deleted file mode 100644 index 6d7986da2e..0000000000 --- a/test/server-side-rendering/samples/sanitize-name/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/server-side-rendering/samples/sanitize-name/main.svelte b/test/server-side-rendering/samples/sanitize-name/main.svelte new file mode 100644 index 0000000000..1438843da9 --- /dev/null +++ b/test/server-side-rendering/samples/sanitize-name/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/server-side-rendering/samples/static-div/_expected.html b/test/server-side-rendering/samples/static-div/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/static-div/_expected.html rename to test/server-side-rendering/samples/static-div/_expected.svelte diff --git a/test/server-side-rendering/samples/static-div/main.html b/test/server-side-rendering/samples/static-div/main.svelte similarity index 100% rename from test/server-side-rendering/samples/static-div/main.html rename to test/server-side-rendering/samples/static-div/main.svelte diff --git a/test/server-side-rendering/samples/static-text/_expected.html b/test/server-side-rendering/samples/static-text/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/static-text/_expected.html rename to test/server-side-rendering/samples/static-text/_expected.svelte diff --git a/test/server-side-rendering/samples/static-text/main.html b/test/server-side-rendering/samples/static-text/main.svelte similarity index 100% rename from test/server-side-rendering/samples/static-text/main.html rename to test/server-side-rendering/samples/static-text/main.svelte diff --git a/test/server-side-rendering/samples/styles-nested/One.html b/test/server-side-rendering/samples/styles-nested/One.svelte similarity index 84% rename from test/server-side-rendering/samples/styles-nested/One.html rename to test/server-side-rendering/samples/styles-nested/One.svelte index df5512b91a..94b44675c8 100644 --- a/test/server-side-rendering/samples/styles-nested/One.html +++ b/test/server-side-rendering/samples/styles-nested/One.svelte @@ -1,5 +1,5 @@ diff --git a/test/server-side-rendering/samples/styles-nested/Two.html b/test/server-side-rendering/samples/styles-nested/Two.svelte similarity index 100% rename from test/server-side-rendering/samples/styles-nested/Two.html rename to test/server-side-rendering/samples/styles-nested/Two.svelte diff --git a/test/server-side-rendering/samples/styles-nested/_expected.html b/test/server-side-rendering/samples/styles-nested/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/styles-nested/_expected.html rename to test/server-side-rendering/samples/styles-nested/_expected.svelte diff --git a/test/server-side-rendering/samples/styles-nested/main.html b/test/server-side-rendering/samples/styles-nested/main.svelte similarity index 78% rename from test/server-side-rendering/samples/styles-nested/main.html rename to test/server-side-rendering/samples/styles-nested/main.svelte index 11775475b8..d6f1d594e3 100644 --- a/test/server-side-rendering/samples/styles-nested/main.html +++ b/test/server-side-rendering/samples/styles-nested/main.svelte @@ -1,5 +1,5 @@
    red
    diff --git a/test/server-side-rendering/samples/styles/_expected.html b/test/server-side-rendering/samples/styles/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/styles/_expected.html rename to test/server-side-rendering/samples/styles/_expected.svelte diff --git a/test/server-side-rendering/samples/styles/main.html b/test/server-side-rendering/samples/styles/main.svelte similarity index 100% rename from test/server-side-rendering/samples/styles/main.html rename to test/server-side-rendering/samples/styles/main.svelte diff --git a/test/server-side-rendering/samples/textarea-children/_expected.html b/test/server-side-rendering/samples/textarea-children/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/textarea-children/_expected.html rename to test/server-side-rendering/samples/textarea-children/_expected.svelte diff --git a/test/server-side-rendering/samples/textarea-children/main.html b/test/server-side-rendering/samples/textarea-children/main.svelte similarity index 100% rename from test/server-side-rendering/samples/textarea-children/main.html rename to test/server-side-rendering/samples/textarea-children/main.svelte diff --git a/test/server-side-rendering/samples/textarea-value/_expected.html b/test/server-side-rendering/samples/textarea-value/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/textarea-value/_expected.html rename to test/server-side-rendering/samples/textarea-value/_expected.svelte diff --git a/test/server-side-rendering/samples/textarea-value/main.html b/test/server-side-rendering/samples/textarea-value/main.svelte similarity index 100% rename from test/server-side-rendering/samples/textarea-value/main.html rename to test/server-side-rendering/samples/textarea-value/main.svelte diff --git a/test/server-side-rendering/samples/triple/_expected.html b/test/server-side-rendering/samples/triple/_expected.svelte similarity index 100% rename from test/server-side-rendering/samples/triple/_expected.html rename to test/server-side-rendering/samples/triple/_expected.svelte diff --git a/test/server-side-rendering/samples/triple/main.html b/test/server-side-rendering/samples/triple/main.svelte similarity index 100% rename from test/server-side-rendering/samples/triple/main.html rename to test/server-side-rendering/samples/triple/main.svelte diff --git a/test/sourcemaps/samples/basic/input.html b/test/sourcemaps/samples/basic/input.svelte similarity index 100% rename from test/sourcemaps/samples/basic/input.html rename to test/sourcemaps/samples/basic/input.svelte diff --git a/test/sourcemaps/samples/binding-shorthand.skip/input.html b/test/sourcemaps/samples/binding-shorthand.skip/input.svelte similarity index 100% rename from test/sourcemaps/samples/binding-shorthand.skip/input.html rename to test/sourcemaps/samples/binding-shorthand.skip/input.svelte diff --git a/test/sourcemaps/samples/binding/input.html b/test/sourcemaps/samples/binding/input.svelte similarity index 100% rename from test/sourcemaps/samples/binding/input.html rename to test/sourcemaps/samples/binding/input.svelte diff --git a/test/sourcemaps/samples/css/input.html b/test/sourcemaps/samples/css/input.svelte similarity index 100% rename from test/sourcemaps/samples/css/input.html rename to test/sourcemaps/samples/css/input.svelte diff --git a/test/sourcemaps/samples/each-block/input.html b/test/sourcemaps/samples/each-block/input.svelte similarity index 100% rename from test/sourcemaps/samples/each-block/input.html rename to test/sourcemaps/samples/each-block/input.svelte diff --git a/test/sourcemaps/samples/script/input.html b/test/sourcemaps/samples/script/input.svelte similarity index 100% rename from test/sourcemaps/samples/script/input.html rename to test/sourcemaps/samples/script/input.svelte diff --git a/test/sourcemaps/samples/static-no-script/input.html b/test/sourcemaps/samples/static-no-script/input.svelte similarity index 100% rename from test/sourcemaps/samples/static-no-script/input.html rename to test/sourcemaps/samples/static-no-script/input.svelte diff --git a/test/stats/samples/basic/input.html b/test/stats/samples/basic/input.svelte similarity index 100% rename from test/stats/samples/basic/input.html rename to test/stats/samples/basic/input.svelte diff --git a/test/stats/samples/duplicate-globals/input.html b/test/stats/samples/duplicate-globals/input.svelte similarity index 100% rename from test/stats/samples/duplicate-globals/input.html rename to test/stats/samples/duplicate-globals/input.svelte diff --git a/test/stats/samples/duplicate-non-hoistable/input.html b/test/stats/samples/duplicate-non-hoistable/input.svelte similarity index 100% rename from test/stats/samples/duplicate-non-hoistable/input.html rename to test/stats/samples/duplicate-non-hoistable/input.svelte diff --git a/test/stats/samples/duplicate-vars/input.html b/test/stats/samples/duplicate-vars/input.svelte similarity index 100% rename from test/stats/samples/duplicate-vars/input.html rename to test/stats/samples/duplicate-vars/input.svelte diff --git a/test/stats/samples/implicit-action/input.html b/test/stats/samples/implicit-action/input.svelte similarity index 100% rename from test/stats/samples/implicit-action/input.html rename to test/stats/samples/implicit-action/input.svelte diff --git a/test/stats/samples/implicit-reactive/input.html b/test/stats/samples/implicit-reactive/input.svelte similarity index 100% rename from test/stats/samples/implicit-reactive/input.html rename to test/stats/samples/implicit-reactive/input.svelte diff --git a/test/stats/samples/implicit/input.html b/test/stats/samples/implicit/input.svelte similarity index 100% rename from test/stats/samples/implicit/input.html rename to test/stats/samples/implicit/input.svelte diff --git a/test/stats/samples/imports/input.html b/test/stats/samples/imports/input.svelte similarity index 100% rename from test/stats/samples/imports/input.html rename to test/stats/samples/imports/input.svelte diff --git a/test/stats/samples/mutated-vs-reassigned-bindings/input.html b/test/stats/samples/mutated-vs-reassigned-bindings/input.svelte similarity index 100% rename from test/stats/samples/mutated-vs-reassigned-bindings/input.html rename to test/stats/samples/mutated-vs-reassigned-bindings/input.svelte diff --git a/test/stats/samples/mutated-vs-reassigned/input.html b/test/stats/samples/mutated-vs-reassigned/input.svelte similarity index 100% rename from test/stats/samples/mutated-vs-reassigned/input.html rename to test/stats/samples/mutated-vs-reassigned/input.svelte diff --git a/test/stats/samples/props/input.html b/test/stats/samples/props/input.svelte similarity index 100% rename from test/stats/samples/props/input.html rename to test/stats/samples/props/input.svelte diff --git a/test/stats/samples/store-referenced/input.html b/test/stats/samples/store-referenced/input.svelte similarity index 100% rename from test/stats/samples/store-referenced/input.html rename to test/stats/samples/store-referenced/input.svelte diff --git a/test/stats/samples/store-unreferenced/input.html b/test/stats/samples/store-unreferenced/input.svelte similarity index 100% rename from test/stats/samples/store-unreferenced/input.html rename to test/stats/samples/store-unreferenced/input.svelte diff --git a/test/stats/samples/template-references/input.html b/test/stats/samples/template-references/input.svelte similarity index 100% rename from test/stats/samples/template-references/input.html rename to test/stats/samples/template-references/input.svelte diff --git a/test/stats/samples/undeclared/input.html b/test/stats/samples/undeclared/input.svelte similarity index 100% rename from test/stats/samples/undeclared/input.html rename to test/stats/samples/undeclared/input.svelte diff --git a/test/validator/samples/a11y-alt-text/input.html b/test/validator/samples/a11y-alt-text/input.svelte similarity index 100% rename from test/validator/samples/a11y-alt-text/input.html rename to test/validator/samples/a11y-alt-text/input.svelte diff --git a/test/validator/samples/a11y-anchor-has-content/input.html b/test/validator/samples/a11y-anchor-has-content/input.svelte similarity index 100% rename from test/validator/samples/a11y-anchor-has-content/input.html rename to test/validator/samples/a11y-anchor-has-content/input.svelte diff --git a/test/validator/samples/a11y-anchor-in-svg-is-valid/input.html b/test/validator/samples/a11y-anchor-in-svg-is-valid/input.svelte similarity index 100% rename from test/validator/samples/a11y-anchor-in-svg-is-valid/input.html rename to test/validator/samples/a11y-anchor-in-svg-is-valid/input.svelte diff --git a/test/validator/samples/a11y-anchor-is-valid/input.html b/test/validator/samples/a11y-anchor-is-valid/input.svelte similarity index 100% rename from test/validator/samples/a11y-anchor-is-valid/input.html rename to test/validator/samples/a11y-anchor-is-valid/input.svelte diff --git a/test/validator/samples/a11y-aria-props/input.html b/test/validator/samples/a11y-aria-props/input.svelte similarity index 100% rename from test/validator/samples/a11y-aria-props/input.html rename to test/validator/samples/a11y-aria-props/input.svelte diff --git a/test/validator/samples/a11y-aria-role/input.html b/test/validator/samples/a11y-aria-role/input.svelte similarity index 100% rename from test/validator/samples/a11y-aria-role/input.html rename to test/validator/samples/a11y-aria-role/input.svelte diff --git a/test/validator/samples/a11y-aria-unsupported-element/input.html b/test/validator/samples/a11y-aria-unsupported-element/input.svelte similarity index 100% rename from test/validator/samples/a11y-aria-unsupported-element/input.html rename to test/validator/samples/a11y-aria-unsupported-element/input.svelte diff --git a/test/validator/samples/a11y-figcaption-right-place/input.html b/test/validator/samples/a11y-figcaption-right-place/input.svelte similarity index 100% rename from test/validator/samples/a11y-figcaption-right-place/input.html rename to test/validator/samples/a11y-figcaption-right-place/input.svelte diff --git a/test/validator/samples/a11y-figcaption-wrong-place/input.html b/test/validator/samples/a11y-figcaption-wrong-place/input.svelte similarity index 100% rename from test/validator/samples/a11y-figcaption-wrong-place/input.html rename to test/validator/samples/a11y-figcaption-wrong-place/input.svelte diff --git a/test/validator/samples/a11y-heading-has-content/input.html b/test/validator/samples/a11y-heading-has-content/input.svelte similarity index 100% rename from test/validator/samples/a11y-heading-has-content/input.html rename to test/validator/samples/a11y-heading-has-content/input.svelte diff --git a/test/validator/samples/a11y-html-has-lang/input.html b/test/validator/samples/a11y-html-has-lang/input.svelte similarity index 100% rename from test/validator/samples/a11y-html-has-lang/input.html rename to test/validator/samples/a11y-html-has-lang/input.svelte diff --git a/test/validator/samples/a11y-iframe-has-title/input.html b/test/validator/samples/a11y-iframe-has-title/input.svelte similarity index 100% rename from test/validator/samples/a11y-iframe-has-title/input.html rename to test/validator/samples/a11y-iframe-has-title/input.svelte diff --git a/test/validator/samples/a11y-no-access-key/input.html b/test/validator/samples/a11y-no-access-key/input.svelte similarity index 100% rename from test/validator/samples/a11y-no-access-key/input.html rename to test/validator/samples/a11y-no-access-key/input.svelte diff --git a/test/validator/samples/a11y-no-autofocus/input.html b/test/validator/samples/a11y-no-autofocus/input.svelte similarity index 100% rename from test/validator/samples/a11y-no-autofocus/input.html rename to test/validator/samples/a11y-no-autofocus/input.svelte diff --git a/test/validator/samples/a11y-no-distracting-elements/input.html b/test/validator/samples/a11y-no-distracting-elements/input.svelte similarity index 100% rename from test/validator/samples/a11y-no-distracting-elements/input.html rename to test/validator/samples/a11y-no-distracting-elements/input.svelte diff --git a/test/validator/samples/a11y-not-on-components/input.html b/test/validator/samples/a11y-not-on-components/input.svelte similarity index 64% rename from test/validator/samples/a11y-not-on-components/input.html rename to test/validator/samples/a11y-not-on-components/input.svelte index e0ee327280..c7673a67ed 100644 --- a/test/validator/samples/a11y-not-on-components/input.html +++ b/test/validator/samples/a11y-not-on-components/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/a11y-scope/input.html b/test/validator/samples/a11y-scope/input.svelte similarity index 100% rename from test/validator/samples/a11y-scope/input.html rename to test/validator/samples/a11y-scope/input.svelte diff --git a/test/validator/samples/a11y-tabindex-no-positive/input.html b/test/validator/samples/a11y-tabindex-no-positive/input.svelte similarity index 100% rename from test/validator/samples/a11y-tabindex-no-positive/input.html rename to test/validator/samples/a11y-tabindex-no-positive/input.svelte diff --git a/test/validator/samples/action-invalid/input.html b/test/validator/samples/action-invalid/input.svelte similarity index 100% rename from test/validator/samples/action-invalid/input.html rename to test/validator/samples/action-invalid/input.svelte diff --git a/test/validator/samples/action-on-component/input.html b/test/validator/samples/action-on-component/input.html deleted file mode 100644 index 788bedaa94..0000000000 --- a/test/validator/samples/action-on-component/input.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/validator/samples/action-on-component/input.svelte b/test/validator/samples/action-on-component/input.svelte new file mode 100644 index 0000000000..a067c05dbd --- /dev/null +++ b/test/validator/samples/action-on-component/input.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/validator/samples/animation-duplicate/input.html b/test/validator/samples/animation-duplicate/input.svelte similarity index 100% rename from test/validator/samples/animation-duplicate/input.html rename to test/validator/samples/animation-duplicate/input.svelte diff --git a/test/validator/samples/animation-missing/input.html b/test/validator/samples/animation-missing/input.svelte similarity index 100% rename from test/validator/samples/animation-missing/input.html rename to test/validator/samples/animation-missing/input.svelte diff --git a/test/validator/samples/animation-not-in-each/input.html b/test/validator/samples/animation-not-in-each/input.svelte similarity index 100% rename from test/validator/samples/animation-not-in-each/input.html rename to test/validator/samples/animation-not-in-each/input.svelte diff --git a/test/validator/samples/animation-not-in-keyed-each/input.html b/test/validator/samples/animation-not-in-keyed-each/input.svelte similarity index 100% rename from test/validator/samples/animation-not-in-keyed-each/input.html rename to test/validator/samples/animation-not-in-keyed-each/input.svelte diff --git a/test/validator/samples/animation-siblings/input.html b/test/validator/samples/animation-siblings/input.svelte similarity index 100% rename from test/validator/samples/animation-siblings/input.html rename to test/validator/samples/animation-siblings/input.svelte diff --git a/test/validator/samples/await-component-is-used/input.html b/test/validator/samples/await-component-is-used/input.svelte similarity index 77% rename from test/validator/samples/await-component-is-used/input.html rename to test/validator/samples/await-component-is-used/input.svelte index 029b549675..5fe87e0c70 100644 --- a/test/validator/samples/await-component-is-used/input.html +++ b/test/validator/samples/await-component-is-used/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/binding-dimensions-svg-child/input.html b/test/validator/samples/binding-dimensions-svg-child/input.svelte similarity index 100% rename from test/validator/samples/binding-dimensions-svg-child/input.html rename to test/validator/samples/binding-dimensions-svg-child/input.svelte diff --git a/test/validator/samples/binding-dimensions-svg/input.html b/test/validator/samples/binding-dimensions-svg/input.svelte similarity index 100% rename from test/validator/samples/binding-dimensions-svg/input.html rename to test/validator/samples/binding-dimensions-svg/input.svelte diff --git a/test/validator/samples/binding-dimensions-void/input.html b/test/validator/samples/binding-dimensions-void/input.svelte similarity index 100% rename from test/validator/samples/binding-dimensions-void/input.html rename to test/validator/samples/binding-dimensions-void/input.svelte diff --git a/test/validator/samples/binding-input-checked/input.html b/test/validator/samples/binding-input-checked/input.svelte similarity index 100% rename from test/validator/samples/binding-input-checked/input.html rename to test/validator/samples/binding-input-checked/input.svelte diff --git a/test/validator/samples/binding-input-type-boolean/input.html b/test/validator/samples/binding-input-type-boolean/input.svelte similarity index 100% rename from test/validator/samples/binding-input-type-boolean/input.html rename to test/validator/samples/binding-input-type-boolean/input.svelte diff --git a/test/validator/samples/binding-input-type-dynamic/input.html b/test/validator/samples/binding-input-type-dynamic/input.svelte similarity index 100% rename from test/validator/samples/binding-input-type-dynamic/input.html rename to test/validator/samples/binding-input-type-dynamic/input.svelte diff --git a/test/validator/samples/binding-invalid-on-element/input.html b/test/validator/samples/binding-invalid-on-element/input.svelte similarity index 100% rename from test/validator/samples/binding-invalid-on-element/input.html rename to test/validator/samples/binding-invalid-on-element/input.svelte diff --git a/test/validator/samples/binding-invalid-value/input.html b/test/validator/samples/binding-invalid-value/input.svelte similarity index 100% rename from test/validator/samples/binding-invalid-value/input.html rename to test/validator/samples/binding-invalid-value/input.svelte diff --git a/test/validator/samples/binding-invalid/input.html b/test/validator/samples/binding-invalid/input.svelte similarity index 100% rename from test/validator/samples/binding-invalid/input.html rename to test/validator/samples/binding-invalid/input.svelte diff --git a/test/validator/samples/binding-select-multiple-dynamic/input.html b/test/validator/samples/binding-select-multiple-dynamic/input.svelte similarity index 100% rename from test/validator/samples/binding-select-multiple-dynamic/input.html rename to test/validator/samples/binding-select-multiple-dynamic/input.svelte diff --git a/test/validator/samples/component-slot-default-duplicate.skip/input.html b/test/validator/samples/component-slot-default-duplicate.skip/input.svelte similarity index 100% rename from test/validator/samples/component-slot-default-duplicate.skip/input.html rename to test/validator/samples/component-slot-default-duplicate.skip/input.svelte diff --git a/test/validator/samples/component-slot-default-reserved/input.html b/test/validator/samples/component-slot-default-reserved/input.svelte similarity index 100% rename from test/validator/samples/component-slot-default-reserved/input.html rename to test/validator/samples/component-slot-default-reserved/input.svelte diff --git a/test/validator/samples/component-slot-dynamic-attribute/input.html b/test/validator/samples/component-slot-dynamic-attribute/input.svelte similarity index 58% rename from test/validator/samples/component-slot-dynamic-attribute/input.html rename to test/validator/samples/component-slot-dynamic-attribute/input.svelte index 83e1df8aa2..1eb8b4f1f0 100644 --- a/test/validator/samples/component-slot-dynamic-attribute/input.html +++ b/test/validator/samples/component-slot-dynamic-attribute/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/component-slot-dynamic/input.html b/test/validator/samples/component-slot-dynamic/input.svelte similarity index 100% rename from test/validator/samples/component-slot-dynamic/input.html rename to test/validator/samples/component-slot-dynamic/input.svelte diff --git a/test/validator/samples/component-slot-named-duplicate.skip/input.html b/test/validator/samples/component-slot-named-duplicate.skip/input.svelte similarity index 100% rename from test/validator/samples/component-slot-named-duplicate.skip/input.html rename to test/validator/samples/component-slot-named-duplicate.skip/input.svelte diff --git a/test/validator/samples/component-slotted-each-block/input.html b/test/validator/samples/component-slotted-each-block/input.svelte similarity index 66% rename from test/validator/samples/component-slotted-each-block/input.html rename to test/validator/samples/component-slotted-each-block/input.svelte index 2c053a1e6c..f000278a99 100644 --- a/test/validator/samples/component-slotted-each-block/input.html +++ b/test/validator/samples/component-slotted-each-block/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/component-slotted-if-block/input.html b/test/validator/samples/component-slotted-if-block/input.svelte similarity index 62% rename from test/validator/samples/component-slotted-if-block/input.html rename to test/validator/samples/component-slotted-if-block/input.svelte index eda6bc2e13..d9159dfd60 100644 --- a/test/validator/samples/component-slotted-if-block/input.html +++ b/test/validator/samples/component-slotted-if-block/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/css-invalid-global-placement/input.html b/test/validator/samples/css-invalid-global-placement/input.svelte similarity index 100% rename from test/validator/samples/css-invalid-global-placement/input.html rename to test/validator/samples/css-invalid-global-placement/input.svelte diff --git a/test/validator/samples/css-invalid-global/input.html b/test/validator/samples/css-invalid-global/input.svelte similarity index 100% rename from test/validator/samples/css-invalid-global/input.html rename to test/validator/samples/css-invalid-global/input.svelte diff --git a/test/validator/samples/debug-invalid-args/input.html b/test/validator/samples/debug-invalid-args/input.svelte similarity index 100% rename from test/validator/samples/debug-invalid-args/input.html rename to test/validator/samples/debug-invalid-args/input.svelte diff --git a/test/validator/samples/default-export/input.html b/test/validator/samples/default-export/input.svelte similarity index 100% rename from test/validator/samples/default-export/input.html rename to test/validator/samples/default-export/input.svelte diff --git a/test/validator/samples/directive-non-expression/input.html b/test/validator/samples/directive-non-expression/input.svelte similarity index 100% rename from test/validator/samples/directive-non-expression/input.html rename to test/validator/samples/directive-non-expression/input.svelte diff --git a/test/validator/samples/each-block-invalid-context-destructured/input.html b/test/validator/samples/each-block-invalid-context-destructured/input.svelte similarity index 100% rename from test/validator/samples/each-block-invalid-context-destructured/input.html rename to test/validator/samples/each-block-invalid-context-destructured/input.svelte diff --git a/test/validator/samples/each-block-invalid-context/input.html b/test/validator/samples/each-block-invalid-context/input.svelte similarity index 100% rename from test/validator/samples/each-block-invalid-context/input.html rename to test/validator/samples/each-block-invalid-context/input.svelte diff --git a/test/validator/samples/each-block-multiple-children/input.html b/test/validator/samples/each-block-multiple-children/input.svelte similarity index 100% rename from test/validator/samples/each-block-multiple-children/input.html rename to test/validator/samples/each-block-multiple-children/input.svelte diff --git a/test/validator/samples/empty-block-dev/input.html b/test/validator/samples/empty-block-dev/input.svelte similarity index 100% rename from test/validator/samples/empty-block-dev/input.html rename to test/validator/samples/empty-block-dev/input.svelte diff --git a/test/validator/samples/empty-block-prod/input.html b/test/validator/samples/empty-block-prod/input.svelte similarity index 100% rename from test/validator/samples/empty-block-prod/input.html rename to test/validator/samples/empty-block-prod/input.svelte diff --git a/test/validator/samples/event-modifiers-invalid-passive/input.html b/test/validator/samples/event-modifiers-invalid-passive/input.svelte similarity index 100% rename from test/validator/samples/event-modifiers-invalid-passive/input.html rename to test/validator/samples/event-modifiers-invalid-passive/input.svelte diff --git a/test/validator/samples/event-modifiers-invalid/input.html b/test/validator/samples/event-modifiers-invalid/input.svelte similarity index 100% rename from test/validator/samples/event-modifiers-invalid/input.html rename to test/validator/samples/event-modifiers-invalid/input.svelte diff --git a/test/validator/samples/event-modifiers-legacy/input.html b/test/validator/samples/event-modifiers-legacy/input.svelte similarity index 100% rename from test/validator/samples/event-modifiers-legacy/input.html rename to test/validator/samples/event-modifiers-legacy/input.svelte diff --git a/test/validator/samples/event-modifiers-redundant/input.html b/test/validator/samples/event-modifiers-redundant/input.svelte similarity index 100% rename from test/validator/samples/event-modifiers-redundant/input.html rename to test/validator/samples/event-modifiers-redundant/input.svelte diff --git a/test/validator/samples/missing-component/input.html b/test/validator/samples/missing-component/input.svelte similarity index 100% rename from test/validator/samples/missing-component/input.html rename to test/validator/samples/missing-component/input.svelte diff --git a/test/validator/samples/multiple-script-default-context/input.html b/test/validator/samples/multiple-script-default-context/input.svelte similarity index 100% rename from test/validator/samples/multiple-script-default-context/input.html rename to test/validator/samples/multiple-script-default-context/input.svelte diff --git a/test/validator/samples/multiple-script-module-context/input.html b/test/validator/samples/multiple-script-module-context/input.svelte similarity index 100% rename from test/validator/samples/multiple-script-module-context/input.html rename to test/validator/samples/multiple-script-module-context/input.svelte diff --git a/test/validator/samples/namespace-invalid-unguessable/input.html b/test/validator/samples/namespace-invalid-unguessable/input.svelte similarity index 100% rename from test/validator/samples/namespace-invalid-unguessable/input.html rename to test/validator/samples/namespace-invalid-unguessable/input.svelte diff --git a/test/validator/samples/namespace-invalid/input.html b/test/validator/samples/namespace-invalid/input.svelte similarity index 100% rename from test/validator/samples/namespace-invalid/input.html rename to test/validator/samples/namespace-invalid/input.svelte diff --git a/test/validator/samples/namespace-non-literal/input.html b/test/validator/samples/namespace-non-literal/input.svelte similarity index 100% rename from test/validator/samples/namespace-non-literal/input.html rename to test/validator/samples/namespace-non-literal/input.svelte diff --git a/test/validator/samples/non-empty-block-dev/input.html b/test/validator/samples/non-empty-block-dev/input.svelte similarity index 100% rename from test/validator/samples/non-empty-block-dev/input.html rename to test/validator/samples/non-empty-block-dev/input.svelte diff --git a/test/validator/samples/prop-slot/input.html b/test/validator/samples/prop-slot/input.svelte similarity index 51% rename from test/validator/samples/prop-slot/input.html rename to test/validator/samples/prop-slot/input.svelte index 6ce1b6dcce..816c656aa0 100644 --- a/test/validator/samples/prop-slot/input.html +++ b/test/validator/samples/prop-slot/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/reactive-declaration-cyclical/input.html b/test/validator/samples/reactive-declaration-cyclical/input.svelte similarity index 100% rename from test/validator/samples/reactive-declaration-cyclical/input.html rename to test/validator/samples/reactive-declaration-cyclical/input.svelte diff --git a/test/validator/samples/ref-not-supported-in-css/input.html b/test/validator/samples/ref-not-supported-in-css/input.svelte similarity index 100% rename from test/validator/samples/ref-not-supported-in-css/input.html rename to test/validator/samples/ref-not-supported-in-css/input.svelte diff --git a/test/validator/samples/ref-not-supported/input.html b/test/validator/samples/ref-not-supported/input.svelte similarity index 100% rename from test/validator/samples/ref-not-supported/input.html rename to test/validator/samples/ref-not-supported/input.svelte diff --git a/test/validator/samples/script-invalid-context/input.html b/test/validator/samples/script-invalid-context/input.svelte similarity index 100% rename from test/validator/samples/script-invalid-context/input.html rename to test/validator/samples/script-invalid-context/input.svelte diff --git a/test/validator/samples/select-multiple/input.html b/test/validator/samples/select-multiple/input.svelte similarity index 100% rename from test/validator/samples/select-multiple/input.html rename to test/validator/samples/select-multiple/input.svelte diff --git a/test/validator/samples/slot-attribute-invalid/input.html b/test/validator/samples/slot-attribute-invalid/input.svelte similarity index 100% rename from test/validator/samples/slot-attribute-invalid/input.html rename to test/validator/samples/slot-attribute-invalid/input.svelte diff --git a/test/validator/samples/svg-child-component-declared-namespace/input.html b/test/validator/samples/svg-child-component-declared-namespace/input.svelte similarity index 100% rename from test/validator/samples/svg-child-component-declared-namespace/input.html rename to test/validator/samples/svg-child-component-declared-namespace/input.svelte diff --git a/test/validator/samples/svg-child-component-undeclared-namespace/input.html b/test/validator/samples/svg-child-component-undeclared-namespace/input.svelte similarity index 100% rename from test/validator/samples/svg-child-component-undeclared-namespace/input.html rename to test/validator/samples/svg-child-component-undeclared-namespace/input.svelte diff --git a/test/validator/samples/tag-invalid/input.html b/test/validator/samples/tag-invalid/input.svelte similarity index 100% rename from test/validator/samples/tag-invalid/input.html rename to test/validator/samples/tag-invalid/input.svelte diff --git a/test/validator/samples/tag-non-string/input.html b/test/validator/samples/tag-non-string/input.svelte similarity index 100% rename from test/validator/samples/tag-non-string/input.html rename to test/validator/samples/tag-non-string/input.svelte diff --git a/test/validator/samples/textarea-value-children/input.html b/test/validator/samples/textarea-value-children/input.svelte similarity index 100% rename from test/validator/samples/textarea-value-children/input.html rename to test/validator/samples/textarea-value-children/input.svelte diff --git a/test/validator/samples/title-no-attributes/input.html b/test/validator/samples/title-no-attributes/input.svelte similarity index 100% rename from test/validator/samples/title-no-attributes/input.html rename to test/validator/samples/title-no-attributes/input.svelte diff --git a/test/validator/samples/title-no-children/input.html b/test/validator/samples/title-no-children/input.svelte similarity index 100% rename from test/validator/samples/title-no-children/input.html rename to test/validator/samples/title-no-children/input.svelte diff --git a/test/validator/samples/transition-duplicate-in-transition/input.html b/test/validator/samples/transition-duplicate-in-transition/input.svelte similarity index 100% rename from test/validator/samples/transition-duplicate-in-transition/input.html rename to test/validator/samples/transition-duplicate-in-transition/input.svelte diff --git a/test/validator/samples/transition-duplicate-in/input.html b/test/validator/samples/transition-duplicate-in/input.svelte similarity index 100% rename from test/validator/samples/transition-duplicate-in/input.html rename to test/validator/samples/transition-duplicate-in/input.svelte diff --git a/test/validator/samples/transition-duplicate-out-transition/input.html b/test/validator/samples/transition-duplicate-out-transition/input.svelte similarity index 100% rename from test/validator/samples/transition-duplicate-out-transition/input.html rename to test/validator/samples/transition-duplicate-out-transition/input.svelte diff --git a/test/validator/samples/transition-duplicate-out/input.html b/test/validator/samples/transition-duplicate-out/input.svelte similarity index 100% rename from test/validator/samples/transition-duplicate-out/input.html rename to test/validator/samples/transition-duplicate-out/input.svelte diff --git a/test/validator/samples/transition-duplicate-transition-in/input.html b/test/validator/samples/transition-duplicate-transition-in/input.svelte similarity index 100% rename from test/validator/samples/transition-duplicate-transition-in/input.html rename to test/validator/samples/transition-duplicate-transition-in/input.svelte diff --git a/test/validator/samples/transition-duplicate-transition-out/input.html b/test/validator/samples/transition-duplicate-transition-out/input.svelte similarity index 100% rename from test/validator/samples/transition-duplicate-transition-out/input.html rename to test/validator/samples/transition-duplicate-transition-out/input.svelte diff --git a/test/validator/samples/transition-duplicate-transition/input.html b/test/validator/samples/transition-duplicate-transition/input.svelte similarity index 100% rename from test/validator/samples/transition-duplicate-transition/input.html rename to test/validator/samples/transition-duplicate-transition/input.svelte diff --git a/test/validator/samples/transition-missing/input.html b/test/validator/samples/transition-missing/input.svelte similarity index 100% rename from test/validator/samples/transition-missing/input.html rename to test/validator/samples/transition-missing/input.svelte diff --git a/test/validator/samples/transition-on-component/input.html b/test/validator/samples/transition-on-component/input.html deleted file mode 100644 index 392f346424..0000000000 --- a/test/validator/samples/transition-on-component/input.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/validator/samples/transition-on-component/input.svelte b/test/validator/samples/transition-on-component/input.svelte new file mode 100644 index 0000000000..12c3cd9bf8 --- /dev/null +++ b/test/validator/samples/transition-on-component/input.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/validator/samples/undefined-value/input.html b/test/validator/samples/undefined-value/input.svelte similarity index 100% rename from test/validator/samples/undefined-value/input.html rename to test/validator/samples/undefined-value/input.svelte diff --git a/test/validator/samples/window-binding-invalid-innerwidth/input.html b/test/validator/samples/window-binding-invalid-innerwidth/input.svelte similarity index 100% rename from test/validator/samples/window-binding-invalid-innerwidth/input.html rename to test/validator/samples/window-binding-invalid-innerwidth/input.svelte diff --git a/test/validator/samples/window-binding-invalid-value/input.html b/test/validator/samples/window-binding-invalid-value/input.svelte similarity index 100% rename from test/validator/samples/window-binding-invalid-value/input.html rename to test/validator/samples/window-binding-invalid-value/input.svelte diff --git a/test/validator/samples/window-binding-invalid-width/input.html b/test/validator/samples/window-binding-invalid-width/input.svelte similarity index 100% rename from test/validator/samples/window-binding-invalid-width/input.html rename to test/validator/samples/window-binding-invalid-width/input.svelte diff --git a/test/validator/samples/window-binding-invalid/input.html b/test/validator/samples/window-binding-invalid/input.svelte similarity index 100% rename from test/validator/samples/window-binding-invalid/input.html rename to test/validator/samples/window-binding-invalid/input.svelte diff --git a/test/validator/samples/window-binding-online/input.html b/test/validator/samples/window-binding-online/input.svelte similarity index 100% rename from test/validator/samples/window-binding-online/input.html rename to test/validator/samples/window-binding-online/input.svelte From 206a3d0131f8c01c762c68d75f4af413942289b1 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 8 Feb 2019 09:32:36 -0500 Subject: [PATCH 109/125] update tests --- register.js | 3 ++- test/cli/samples/basic/command.sh | 2 +- test/cli/samples/basic/expected/Main.js | 2 +- test/cli/samples/custom-element/command.sh | 2 +- test/cli/samples/custom-element/expected/Main.js | 2 +- test/cli/samples/dev/command.sh | 2 +- test/cli/samples/dev/expected/Main.js | 4 ++-- test/cli/samples/dir-sourcemap/expected/Main.js | 4 ++-- .../cli/samples/dir-sourcemap/expected/Main.js.map | 2 +- test/cli/samples/dir-sourcemap/expected/Widget.js | 2 +- .../samples/dir-sourcemap/expected/Widget.js.map | 2 +- test/cli/samples/dir-subdir/expected/Main.js | 4 ++-- .../samples/dir-subdir/expected/widget/Widget.js | 2 +- test/cli/samples/dir/expected/Main.js | 4 ++-- test/cli/samples/dir/expected/Widget.js | 2 +- test/cli/samples/globals/command.sh | 2 +- test/cli/samples/globals/expected/Main.js | 2 +- test/cli/samples/sourcemap-inline/command.sh | 2 +- test/cli/samples/sourcemap-inline/expected/Main.js | 2 +- test/cli/samples/sourcemap/command.sh | 2 +- test/cli/samples/sourcemap/expected/Main.js | 2 +- test/cli/samples/sourcemap/expected/Main.js.map | 2 +- test/cli/samples/ssr/command.sh | 2 +- test/cli/samples/ssr/expected/Main.js | 2 +- test/cli/samples/store/command.sh | 2 +- test/cli/samples/store/expected/Main.js | 2 +- test/css/index.js | 2 +- .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 test/css/samples/empty-class/_config.js | 2 +- .../nested/{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../{expected.svelte => expected.html} | 0 .../css/samples/unused-selector-leading/_config.js | 4 ++-- .../{expected.svelte => expected.html} | 0 .../css/samples/unused-selector-ternary/_config.js | 2 +- .../{expected.svelte => expected.html} | 0 test/css/samples/unused-selector/_config.js | 2 +- .../{expected.svelte => expected.html} | 0 test/custom-elements/index.js | 2 +- test/custom-elements/samples/custom-method/test.js | 2 +- test/custom-elements/samples/escaped-css/test.js | 2 +- test/custom-elements/samples/html-slots/test.js | 2 +- test/custom-elements/samples/html/test.js | 2 +- test/custom-elements/samples/nested.skip/test.js | 2 +- test/custom-elements/samples/new-styled/test.js | 2 +- test/custom-elements/samples/new/test.js | 2 +- .../samples/no-missing-prop-warnings/test.js | 2 +- test/custom-elements/samples/oncreate/test.js | 2 +- test/custom-elements/samples/props/test.js | 2 +- test/helpers.js | 2 +- test/hydration/index.js | 4 ++-- .../samples/basic/{_after.svelte => _after.html} | 0 .../samples/basic/{_before.svelte => _before.html} | 0 .../binding-input/{_after.svelte => _after.html} | 0 .../binding-input/{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../component/{_after.svelte => _after.html} | 0 .../component/{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../dynamic-text/{_after.svelte => _after.html} | 0 .../dynamic-text/{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../each-block/{_after.svelte => _after.html} | 0 .../each-block/{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../element-nested/{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../element-ref/{_after.svelte => _after.html} | 0 .../element-ref/{_before.svelte => _before.html} | 0 .../event-handler/{_after.svelte => _after.html} | 0 .../event-handler/{_before.svelte => _before.html} | 0 .../if-block-anchor/{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../if-block-false/{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../if-block-update/{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 .../if-block/{_after.svelte => _after.html} | 0 .../if-block/{_before.svelte => _before.html} | 0 .../samples/raw/{_after.svelte => _after.html} | 0 .../samples/raw/{_before.svelte => _before.html} | 0 .../top-level-text/{_after.svelte => _after.html} | 0 .../{_before.svelte => _before.html} | 0 test/js/index.js | 2 +- test/js/samples/dynamic-import/expected.js | 4 ++-- test/js/samples/non-imported-component/expected.js | 2 +- test/parser/index.js | 2 +- test/preprocess/index.js | 4 ++-- test/preprocess/samples/filename/_config.js | 2 +- test/preprocess/samples/filename/output.svelte | 4 ++-- test/runtime/index.js | 6 +++--- .../ComponentSelector.svelte | 2 +- .../samples/component-binding-deep-b/_config.js | 12 ++++++------ .../samples/element-source-location/_config.js | 6 +++--- test/server-side-rendering/index.js | 14 +++----------- .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../bindings/{_expected.svelte => _expected.html} | 0 .../comment/{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../component/{_expected.svelte => _expected.html} | 0 .../computed/{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../entities/{_expected.svelte => _expected.html} | 0 .../{_expected-head.svelte => _expected-head.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../helpers/{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../styles/{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../{_expected.svelte => _expected.html} | 0 .../triple/{_expected.svelte => _expected.html} | 0 test/sourcemaps/index.js | 6 +++--- test/sourcemaps/samples/basic/test.js | 4 ++-- .../samples/binding-shorthand.skip/test.js | 2 +- test/sourcemaps/samples/binding/test.js | 4 ++-- test/sourcemaps/samples/css/test.js | 2 +- test/sourcemaps/samples/each-block/test.js | 2 +- test/sourcemaps/samples/script/test.js | 2 +- test/sourcemaps/samples/static-no-script/test.js | 4 ++-- test/stats/index.js | 2 +- test/validator/index.js | 2 +- .../samples/a11y-not-on-components/warnings.json | 6 +++--- .../samples/action-on-component/errors.json | 6 +++--- .../component-slot-dynamic-attribute/errors.json | 6 +++--- .../component-slotted-each-block/errors.json | 6 +++--- .../samples/component-slotted-if-block/errors.json | 6 +++--- test/validator/samples/prop-slot/errors.json | 6 +++--- .../samples/transition-on-component/errors.json | 6 +++--- 183 files changed, 113 insertions(+), 120 deletions(-) rename test/css/samples/combinator-child/{expected.svelte => expected.html} (100%) rename test/css/samples/descendant-selector-non-top-level-outer/{expected.svelte => expected.html} (100%) rename test/css/samples/nested/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-contains/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-equals/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-prefix/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-suffix/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-attribute-selector/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-class-dynamic/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-class-static/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner-class/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-inner/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant-global-outer/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-descendant/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-global/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-id/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-whitespace-multiple/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute-whitespace/{expected.svelte => expected.html} (100%) rename test/css/samples/omit-scoping-attribute/{expected.svelte => expected.html} (100%) rename test/css/samples/unused-selector-leading/{expected.svelte => expected.html} (100%) rename test/css/samples/unused-selector-ternary/{expected.svelte => expected.html} (100%) rename test/css/samples/unused-selector/{expected.svelte => expected.html} (100%) rename test/hydration/samples/basic/{_after.svelte => _after.html} (100%) rename test/hydration/samples/basic/{_before.svelte => _before.html} (100%) rename test/hydration/samples/binding-input/{_after.svelte => _after.html} (100%) rename test/hydration/samples/binding-input/{_before.svelte => _before.html} (100%) rename test/hydration/samples/component-in-element/{_after.svelte => _after.html} (100%) rename test/hydration/samples/component-in-element/{_before.svelte => _before.html} (100%) rename test/hydration/samples/component/{_after.svelte => _after.html} (100%) rename test/hydration/samples/component/{_before.svelte => _before.html} (100%) rename test/hydration/samples/dynamic-text-changed/{_after.svelte => _after.html} (100%) rename test/hydration/samples/dynamic-text-changed/{_before.svelte => _before.html} (100%) rename test/hydration/samples/dynamic-text/{_after.svelte => _after.html} (100%) rename test/hydration/samples/dynamic-text/{_before.svelte => _before.html} (100%) rename test/hydration/samples/each-block-arg-clash/{_after.svelte => _after.html} (100%) rename test/hydration/samples/each-block-arg-clash/{_before.svelte => _before.html} (100%) rename test/hydration/samples/each-block/{_after.svelte => _after.html} (100%) rename test/hydration/samples/each-block/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-attribute-added/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-attribute-added/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-attribute-changed/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-attribute-changed/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-attribute-removed/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-attribute-removed/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-attribute-unchanged/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-attribute-unchanged/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-nested/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-nested/{_before.svelte => _before.html} (100%) rename test/hydration/samples/element-ref/{_after.svelte => _after.html} (100%) rename test/hydration/samples/element-ref/{_before.svelte => _before.html} (100%) rename test/hydration/samples/event-handler/{_after.svelte => _after.html} (100%) rename test/hydration/samples/event-handler/{_before.svelte => _before.html} (100%) rename test/hydration/samples/if-block-anchor/{_after.svelte => _after.html} (100%) rename test/hydration/samples/if-block-anchor/{_before.svelte => _before.html} (100%) rename test/hydration/samples/if-block-false/{_after.svelte => _after.html} (100%) rename test/hydration/samples/if-block-false/{_before.svelte => _before.html} (100%) rename test/hydration/samples/if-block-update/{_after.svelte => _after.html} (100%) rename test/hydration/samples/if-block-update/{_before.svelte => _before.html} (100%) rename test/hydration/samples/if-block/{_after.svelte => _after.html} (100%) rename test/hydration/samples/if-block/{_before.svelte => _before.html} (100%) rename test/hydration/samples/raw/{_after.svelte => _after.html} (100%) rename test/hydration/samples/raw/{_before.svelte => _before.html} (100%) rename test/hydration/samples/top-level-text/{_after.svelte => _after.html} (100%) rename test/hydration/samples/top-level-text/{_before.svelte => _before.html} (100%) rename test/server-side-rendering/samples/attribute-boolean/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/attribute-dynamic/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/attribute-escaped-quotes-spread/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/attribute-escaped-quotes/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/attribute-static/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/bindings/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/comment/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-binding-renamed/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-binding/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-data-dynamic/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-data-empty/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-refs-and-attributes/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-refs/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-with-different-extension/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component-yield/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/component/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/computed/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/default-data-override/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/default-data/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/directives/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/dynamic-text-escaped/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/dynamic-text/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/each-block/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/empty-elements-closed/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/entities/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/head-title/{_expected-head.svelte => _expected-head.html} (100%) rename test/server-side-rendering/samples/head-title/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/helpers/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/if-block-false/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/if-block-true/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/import-non-component/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/raw-mustaches/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/sanitize-name/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/static-div/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/static-text/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/styles-nested/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/styles/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/textarea-children/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/textarea-value/{_expected.svelte => _expected.html} (100%) rename test/server-side-rendering/samples/triple/{_expected.svelte => _expected.html} (100%) diff --git a/register.js b/register.js index cbd4a387ac..4dee2a4b6a 100644 --- a/register.js +++ b/register.js @@ -3,7 +3,7 @@ const path = require('path'); const { compile } = require('./compiler.js'); let compileOptions = { - extensions: ['.html'] + extensions: ['.svelte', '.html'] }; function capitalise(name) { @@ -43,6 +43,7 @@ function registerExtension(extension) { }; } +registerExtension('.svelte'); registerExtension('.html'); module.exports = register; \ No newline at end of file diff --git a/test/cli/samples/basic/command.sh b/test/cli/samples/basic/command.sh index 0ae80e4c95..9e272a7d5b 100644 --- a/test/cli/samples/basic/command.sh +++ b/test/cli/samples/basic/command.sh @@ -1 +1 @@ -svelte compile src/Main.html > actual/Main.js +svelte compile src/Main.svelte > actual/Main.js diff --git a/test/cli/samples/basic/expected/Main.js b/test/cli/samples/basic/expected/Main.js index ba35a0c1e9..ecc2beb83c 100644 --- a/test/cli/samples/basic/expected/Main.js +++ b/test/cli/samples/basic/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/custom-element/command.sh b/test/cli/samples/custom-element/command.sh index b93c2cb16a..ee9f854e9b 100644 --- a/test/cli/samples/custom-element/command.sh +++ b/test/cli/samples/custom-element/command.sh @@ -1 +1 @@ -svelte compile src/Main.html --customElement > actual/Main.js +svelte compile src/Main.svelte --customElement > actual/Main.js diff --git a/test/cli/samples/custom-element/expected/Main.js b/test/cli/samples/custom-element/expected/Main.js index 40865a2c81..f6befc4e3b 100644 --- a/test/cli/samples/custom-element/expected/Main.js +++ b/test/cli/samples/custom-element/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dev/command.sh b/test/cli/samples/dev/command.sh index 37d9b87fc0..b9dc99e7d1 100644 --- a/test/cli/samples/dev/command.sh +++ b/test/cli/samples/dev/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -d > actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -d > actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/dev/expected/Main.js b/test/cli/samples/dev/expected/Main.js index be11885fa0..db75c4a5c1 100644 --- a/test/cli/samples/dev/expected/Main.js +++ b/test/cli/samples/dev/expected/Main.js @@ -1,6 +1,6 @@ -/* src/Main.html generated by Svelte v2.13.4 */ +/* src/Main.svelte generated by Svelte v2.13.4 */ -const file = "src/Main.html"; +const file = "src/Main.svelte"; function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dir-sourcemap/expected/Main.js b/test/cli/samples/dir-sourcemap/expected/Main.js index 0c0fab6094..e164569e1c 100644 --- a/test/cli/samples/dir-sourcemap/expected/Main.js +++ b/test/cli/samples/dir-sourcemap/expected/Main.js @@ -1,5 +1,5 @@ -/* src/Main.html generated by Svelte vx.y.z */ -import Widget from './Widget.html'; +/* src/Main.svelte generated by Svelte vx.y.z */ +import Widget from './Widget.svelte'; diff --git a/test/cli/samples/dir-sourcemap/expected/Main.js.map b/test/cli/samples/dir-sourcemap/expected/Main.js.map index 621cf85109..a0f4cf48c7 100644 --- a/test/cli/samples/dir-sourcemap/expected/Main.js.map +++ b/test/cli/samples/dir-sourcemap/expected/Main.js.map @@ -1 +1 @@ -{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Main.js","sources":["../src/Main.svelte"],"sourcesContent":["\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/dir-sourcemap/expected/Widget.js b/test/cli/samples/dir-sourcemap/expected/Widget.js index b6019a73fd..d55dcbda4c 100644 --- a/test/cli/samples/dir-sourcemap/expected/Widget.js +++ b/test/cli/samples/dir-sourcemap/expected/Widget.js @@ -1,4 +1,4 @@ -/* src/Widget.html generated by Svelte vx.y.z */ +/* src/Widget.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dir-sourcemap/expected/Widget.js.map b/test/cli/samples/dir-sourcemap/expected/Widget.js.map index 57807d3fc0..37247333ed 100644 --- a/test/cli/samples/dir-sourcemap/expected/Widget.js.map +++ b/test/cli/samples/dir-sourcemap/expected/Widget.js.map @@ -1 +1 @@ -{"version":3,"file":"Widget.js","sources":["../src/Widget.html"],"sourcesContent":["

    widget

    "],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Widget.js","sources":["../src/Widget.svelte"],"sourcesContent":["

    widget

    "],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/dir-subdir/expected/Main.js b/test/cli/samples/dir-subdir/expected/Main.js index 2778c8c868..3026a122e2 100644 --- a/test/cli/samples/dir-subdir/expected/Main.js +++ b/test/cli/samples/dir-subdir/expected/Main.js @@ -1,5 +1,5 @@ -/* src/Main.html generated by Svelte vx.y.z */ -import Widget from './widget/Widget.html'; +/* src/Main.svelte generated by Svelte vx.y.z */ +import Widget from './widget/Widget.svelte'; diff --git a/test/cli/samples/dir-subdir/expected/widget/Widget.js b/test/cli/samples/dir-subdir/expected/widget/Widget.js index 9282b7ddb4..e63ac2dad7 100644 --- a/test/cli/samples/dir-subdir/expected/widget/Widget.js +++ b/test/cli/samples/dir-subdir/expected/widget/Widget.js @@ -1,4 +1,4 @@ -/* src/widget/Widget.html generated by Svelte vx.y.z */ +/* src/widget/Widget.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dir/expected/Main.js b/test/cli/samples/dir/expected/Main.js index bbc005da76..d87ac37939 100644 --- a/test/cli/samples/dir/expected/Main.js +++ b/test/cli/samples/dir/expected/Main.js @@ -1,5 +1,5 @@ -/* src/Main.html generated by Svelte vx.y.z */ -import Widget from './Widget.html'; +/* src/Main.svelte generated by Svelte vx.y.z */ +import Widget from './Widget.svelte'; diff --git a/test/cli/samples/dir/expected/Widget.js b/test/cli/samples/dir/expected/Widget.js index c5981a4c53..eeb37e3cfa 100644 --- a/test/cli/samples/dir/expected/Widget.js +++ b/test/cli/samples/dir/expected/Widget.js @@ -1,4 +1,4 @@ -/* src/Widget.html generated by Svelte vx.y.z */ +/* src/Widget.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/globals/command.sh b/test/cli/samples/globals/command.sh index 9ed0c2a844..9e1a2de74a 100644 --- a/test/cli/samples/globals/command.sh +++ b/test/cli/samples/globals/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -f iife -g the-answer:theAnswer > actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -f iife -g the-answer:theAnswer > actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/globals/expected/Main.js b/test/cli/samples/globals/expected/Main.js index 1c6e01cdb8..8e526b08bf 100644 --- a/test/cli/samples/globals/expected/Main.js +++ b/test/cli/samples/globals/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ var Main = (function(answer) { "use strict"; answer = (answer && answer.__esModule) ? answer["default"] : answer; diff --git a/test/cli/samples/sourcemap-inline/command.sh b/test/cli/samples/sourcemap-inline/command.sh index 36b5b71b8d..073fa7d259 100644 --- a/test/cli/samples/sourcemap-inline/command.sh +++ b/test/cli/samples/sourcemap-inline/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -m inline -o actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -m inline -o actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/sourcemap-inline/expected/Main.js b/test/cli/samples/sourcemap-inline/expected/Main.js index 668ff8b1bf..534c6734f2 100644 --- a/test/cli/samples/sourcemap-inline/expected/Main.js +++ b/test/cli/samples/sourcemap-inline/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/sourcemap/command.sh b/test/cli/samples/sourcemap/command.sh index 4309d50b89..9164b1760c 100644 --- a/test/cli/samples/sourcemap/command.sh +++ b/test/cli/samples/sourcemap/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -m -o actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -m -o actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/sourcemap/expected/Main.js b/test/cli/samples/sourcemap/expected/Main.js index 95e6718715..59059aadcb 100644 --- a/test/cli/samples/sourcemap/expected/Main.js +++ b/test/cli/samples/sourcemap/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/sourcemap/expected/Main.js.map b/test/cli/samples/sourcemap/expected/Main.js.map index a3be94cb9a..a31dec16ab 100644 --- a/test/cli/samples/sourcemap/expected/Main.js.map +++ b/test/cli/samples/sourcemap/expected/Main.js.map @@ -1 +1 @@ -{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["

    Hello world!

    \n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Main.js","sources":["../src/Main.svelte"],"sourcesContent":["

    Hello world!

    \n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/ssr/command.sh b/test/cli/samples/ssr/command.sh index 30e155691a..878f6038ab 100644 --- a/test/cli/samples/ssr/command.sh +++ b/test/cli/samples/ssr/command.sh @@ -1 +1 @@ -svelte compile --generate ssr src/Main.html > actual/Main.js +svelte compile --generate ssr src/Main.svelte > actual/Main.js diff --git a/test/cli/samples/ssr/expected/Main.js b/test/cli/samples/ssr/expected/Main.js index adf4e19fa0..b7a4f4addf 100644 --- a/test/cli/samples/ssr/expected/Main.js +++ b/test/cli/samples/ssr/expected/Main.js @@ -2,7 +2,7 @@ var Main = {}; -Main.filename = "src/Main.html"; +Main.filename = "src/Main.svelte"; Main.data = function() { return {}; diff --git a/test/cli/samples/store/command.sh b/test/cli/samples/store/command.sh index a734fdc772..dedeae05ef 100644 --- a/test/cli/samples/store/command.sh +++ b/test/cli/samples/store/command.sh @@ -1 +1 @@ -svelte compile src/Main.html --store > actual/Main.js +svelte compile src/Main.svelte --store > actual/Main.js diff --git a/test/cli/samples/store/expected/Main.js b/test/cli/samples/store/expected/Main.js index dbd365c15d..28bc62b786 100644 --- a/test/cli/samples/store/expected/Main.js +++ b/test/cli/samples/store/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var h1, text0, text1; diff --git a/test/css/index.js b/test/css/index.js index 913dcf4237..9e32b0ea5d 100644 --- a/test/css/index.js +++ b/test/css/index.js @@ -51,7 +51,7 @@ describe('css', () => { (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = tryRequire(`./samples/${dir}/_config.js`) || {}; const input = fs - .readFileSync(`test/css/samples/${dir}/input.html`, 'utf-8') + .readFileSync(`test/css/samples/${dir}/input.svelte`, 'utf-8') .replace(/\s+$/, ''); const expectedWarnings = (config.warnings || []).map(normalizeWarning); diff --git a/test/css/samples/combinator-child/expected.svelte b/test/css/samples/combinator-child/expected.html similarity index 100% rename from test/css/samples/combinator-child/expected.svelte rename to test/css/samples/combinator-child/expected.html diff --git a/test/css/samples/descendant-selector-non-top-level-outer/expected.svelte b/test/css/samples/descendant-selector-non-top-level-outer/expected.html similarity index 100% rename from test/css/samples/descendant-selector-non-top-level-outer/expected.svelte rename to test/css/samples/descendant-selector-non-top-level-outer/expected.html diff --git a/test/css/samples/empty-class/_config.js b/test/css/samples/empty-class/_config.js index fb1565c7bc..cc766d9478 100644 --- a/test/css/samples/empty-class/_config.js +++ b/test/css/samples/empty-class/_config.js @@ -1,6 +1,6 @@ export default { warnings: [{ - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/nested/expected.svelte b/test/css/samples/nested/expected.html similarity index 100% rename from test/css/samples/nested/expected.svelte rename to test/css/samples/nested/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-contains/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-prefix/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-suffix/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/expected.html diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector/expected.svelte b/test/css/samples/omit-scoping-attribute-attribute-selector/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector/expected.svelte rename to test/css/samples/omit-scoping-attribute-attribute-selector/expected.html diff --git a/test/css/samples/omit-scoping-attribute-class-dynamic/expected.svelte b/test/css/samples/omit-scoping-attribute-class-dynamic/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-class-dynamic/expected.svelte rename to test/css/samples/omit-scoping-attribute-class-dynamic/expected.html diff --git a/test/css/samples/omit-scoping-attribute-class-static/expected.svelte b/test/css/samples/omit-scoping-attribute-class-static/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-class-static/expected.svelte rename to test/css/samples/omit-scoping-attribute-class-static/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant-global-inner-class/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant-global-inner/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant-global-outer/expected.html diff --git a/test/css/samples/omit-scoping-attribute-descendant/expected.svelte b/test/css/samples/omit-scoping-attribute-descendant/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant/expected.svelte rename to test/css/samples/omit-scoping-attribute-descendant/expected.html diff --git a/test/css/samples/omit-scoping-attribute-global/expected.svelte b/test/css/samples/omit-scoping-attribute-global/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-global/expected.svelte rename to test/css/samples/omit-scoping-attribute-global/expected.html diff --git a/test/css/samples/omit-scoping-attribute-id/expected.svelte b/test/css/samples/omit-scoping-attribute-id/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-id/expected.svelte rename to test/css/samples/omit-scoping-attribute-id/expected.html diff --git a/test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.svelte b/test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.svelte rename to test/css/samples/omit-scoping-attribute-whitespace-multiple/expected.html diff --git a/test/css/samples/omit-scoping-attribute-whitespace/expected.svelte b/test/css/samples/omit-scoping-attribute-whitespace/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute-whitespace/expected.svelte rename to test/css/samples/omit-scoping-attribute-whitespace/expected.html diff --git a/test/css/samples/omit-scoping-attribute/expected.svelte b/test/css/samples/omit-scoping-attribute/expected.html similarity index 100% rename from test/css/samples/omit-scoping-attribute/expected.svelte rename to test/css/samples/omit-scoping-attribute/expected.html diff --git a/test/css/samples/unused-selector-leading/_config.js b/test/css/samples/unused-selector-leading/_config.js index c01e978405..20310a5847 100644 --- a/test/css/samples/unused-selector-leading/_config.js +++ b/test/css/samples/unused-selector-leading/_config.js @@ -1,7 +1,7 @@ export default { warnings: [ { - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { @@ -25,7 +25,7 @@ export default { }, { - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/unused-selector-leading/expected.svelte b/test/css/samples/unused-selector-leading/expected.html similarity index 100% rename from test/css/samples/unused-selector-leading/expected.svelte rename to test/css/samples/unused-selector-leading/expected.html diff --git a/test/css/samples/unused-selector-ternary/_config.js b/test/css/samples/unused-selector-ternary/_config.js index 043a7addf9..68254477d9 100644 --- a/test/css/samples/unused-selector-ternary/_config.js +++ b/test/css/samples/unused-selector-ternary/_config.js @@ -4,7 +4,7 @@ export default { }, warnings: [{ - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/unused-selector-ternary/expected.svelte b/test/css/samples/unused-selector-ternary/expected.html similarity index 100% rename from test/css/samples/unused-selector-ternary/expected.svelte rename to test/css/samples/unused-selector-ternary/expected.html diff --git a/test/css/samples/unused-selector/_config.js b/test/css/samples/unused-selector/_config.js index 5f6abbc08b..49fb3a27e7 100644 --- a/test/css/samples/unused-selector/_config.js +++ b/test/css/samples/unused-selector/_config.js @@ -1,6 +1,6 @@ export default { warnings: [{ - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/unused-selector/expected.svelte b/test/css/samples/unused-selector/expected.html similarity index 100% rename from test/css/samples/unused-selector/expected.svelte rename to test/css/samples/unused-selector/expected.html diff --git a/test/custom-elements/index.js b/test/custom-elements/index.js index e50434cc61..d2641cb5b0 100644 --- a/test/custom-elements/index.js +++ b/test/custom-elements/index.js @@ -72,7 +72,7 @@ describe('custom-elements', function() { }, transform(code, id) { - if (id.endsWith('.html')) { + if (id.endsWith('.svelte')) { const compiled = svelte.compile(code, { customElement: true, dev: config.dev diff --git a/test/custom-elements/samples/custom-method/test.js b/test/custom-elements/samples/custom-method/test.js index 2233f0b452..e274786079 100644 --- a/test/custom-elements/samples/custom-method/test.js +++ b/test/custom-elements/samples/custom-method/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default async function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/escaped-css/test.js b/test/custom-elements/samples/escaped-css/test.js index bd148ad5a7..3696ee8c1b 100644 --- a/test/custom-elements/samples/escaped-css/test.js +++ b/test/custom-elements/samples/escaped-css/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { new CustomElement({ diff --git a/test/custom-elements/samples/html-slots/test.js b/test/custom-elements/samples/html-slots/test.js index 87cfd2029d..bb38a83eab 100644 --- a/test/custom-elements/samples/html-slots/test.js +++ b/test/custom-elements/samples/html-slots/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { target.innerHTML = ` diff --git a/test/custom-elements/samples/html/test.js b/test/custom-elements/samples/html/test.js index 732d79f009..1638ead784 100644 --- a/test/custom-elements/samples/html/test.js +++ b/test/custom-elements/samples/html/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/nested.skip/test.js b/test/custom-elements/samples/nested.skip/test.js index d6d52426af..85320297ea 100644 --- a/test/custom-elements/samples/nested.skip/test.js +++ b/test/custom-elements/samples/nested.skip/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default async function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/new-styled/test.js b/test/custom-elements/samples/new-styled/test.js index 6bb37d7a2a..f027121009 100644 --- a/test/custom-elements/samples/new-styled/test.js +++ b/test/custom-elements/samples/new-styled/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { target.innerHTML = '

    unstyled

    '; diff --git a/test/custom-elements/samples/new/test.js b/test/custom-elements/samples/new/test.js index f37f4301fb..1137495e35 100644 --- a/test/custom-elements/samples/new/test.js +++ b/test/custom-elements/samples/new/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { new CustomElement({ diff --git a/test/custom-elements/samples/no-missing-prop-warnings/test.js b/test/custom-elements/samples/no-missing-prop-warnings/test.js index 9430e97f3a..e7ced25e19 100644 --- a/test/custom-elements/samples/no-missing-prop-warnings/test.js +++ b/test/custom-elements/samples/no-missing-prop-warnings/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { const warnings = []; diff --git a/test/custom-elements/samples/oncreate/test.js b/test/custom-elements/samples/oncreate/test.js index a64a8c9fec..11d76078f2 100644 --- a/test/custom-elements/samples/oncreate/test.js +++ b/test/custom-elements/samples/oncreate/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/props/test.js b/test/custom-elements/samples/props/test.js index 1e95fe3ad2..9c7e44c3a3 100644 --- a/test/custom-elements/samples/props/test.js +++ b/test/custom-elements/samples/props/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { new CustomElement({ diff --git a/test/helpers.js b/test/helpers.js index f2e2004f09..b7064c99eb 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -171,7 +171,7 @@ export function addLineNumbers(code) { } export function showOutput(cwd, options = {}, compile = svelte.compile) { - glob('**/*.html', { cwd }).forEach(file => { + glob('**/*.svelte', { cwd }).forEach(file => { if (file[0] === '_') return; const { js } = compile( diff --git a/test/hydration/index.js b/test/hydration/index.js index 8b66937329..24c61fb56a 100644 --- a/test/hydration/index.js +++ b/test/hydration/index.js @@ -18,7 +18,7 @@ describe('hydration', () => { before(() => { const svelte = loadSvelte(); - require.extensions['.html'] = function(module, filename) { + require.extensions['.svelte'] = function(module, filename) { const options = Object.assign( { filename, @@ -62,7 +62,7 @@ describe('hydration', () => { let SvelteComponent; try { - SvelteComponent = require(`${cwd}/main.html`).default; + SvelteComponent = require(`${cwd}/main.svelte`).default; } catch (err) { throw err; } diff --git a/test/hydration/samples/basic/_after.svelte b/test/hydration/samples/basic/_after.html similarity index 100% rename from test/hydration/samples/basic/_after.svelte rename to test/hydration/samples/basic/_after.html diff --git a/test/hydration/samples/basic/_before.svelte b/test/hydration/samples/basic/_before.html similarity index 100% rename from test/hydration/samples/basic/_before.svelte rename to test/hydration/samples/basic/_before.html diff --git a/test/hydration/samples/binding-input/_after.svelte b/test/hydration/samples/binding-input/_after.html similarity index 100% rename from test/hydration/samples/binding-input/_after.svelte rename to test/hydration/samples/binding-input/_after.html diff --git a/test/hydration/samples/binding-input/_before.svelte b/test/hydration/samples/binding-input/_before.html similarity index 100% rename from test/hydration/samples/binding-input/_before.svelte rename to test/hydration/samples/binding-input/_before.html diff --git a/test/hydration/samples/component-in-element/_after.svelte b/test/hydration/samples/component-in-element/_after.html similarity index 100% rename from test/hydration/samples/component-in-element/_after.svelte rename to test/hydration/samples/component-in-element/_after.html diff --git a/test/hydration/samples/component-in-element/_before.svelte b/test/hydration/samples/component-in-element/_before.html similarity index 100% rename from test/hydration/samples/component-in-element/_before.svelte rename to test/hydration/samples/component-in-element/_before.html diff --git a/test/hydration/samples/component/_after.svelte b/test/hydration/samples/component/_after.html similarity index 100% rename from test/hydration/samples/component/_after.svelte rename to test/hydration/samples/component/_after.html diff --git a/test/hydration/samples/component/_before.svelte b/test/hydration/samples/component/_before.html similarity index 100% rename from test/hydration/samples/component/_before.svelte rename to test/hydration/samples/component/_before.html diff --git a/test/hydration/samples/dynamic-text-changed/_after.svelte b/test/hydration/samples/dynamic-text-changed/_after.html similarity index 100% rename from test/hydration/samples/dynamic-text-changed/_after.svelte rename to test/hydration/samples/dynamic-text-changed/_after.html diff --git a/test/hydration/samples/dynamic-text-changed/_before.svelte b/test/hydration/samples/dynamic-text-changed/_before.html similarity index 100% rename from test/hydration/samples/dynamic-text-changed/_before.svelte rename to test/hydration/samples/dynamic-text-changed/_before.html diff --git a/test/hydration/samples/dynamic-text/_after.svelte b/test/hydration/samples/dynamic-text/_after.html similarity index 100% rename from test/hydration/samples/dynamic-text/_after.svelte rename to test/hydration/samples/dynamic-text/_after.html diff --git a/test/hydration/samples/dynamic-text/_before.svelte b/test/hydration/samples/dynamic-text/_before.html similarity index 100% rename from test/hydration/samples/dynamic-text/_before.svelte rename to test/hydration/samples/dynamic-text/_before.html diff --git a/test/hydration/samples/each-block-arg-clash/_after.svelte b/test/hydration/samples/each-block-arg-clash/_after.html similarity index 100% rename from test/hydration/samples/each-block-arg-clash/_after.svelte rename to test/hydration/samples/each-block-arg-clash/_after.html diff --git a/test/hydration/samples/each-block-arg-clash/_before.svelte b/test/hydration/samples/each-block-arg-clash/_before.html similarity index 100% rename from test/hydration/samples/each-block-arg-clash/_before.svelte rename to test/hydration/samples/each-block-arg-clash/_before.html diff --git a/test/hydration/samples/each-block/_after.svelte b/test/hydration/samples/each-block/_after.html similarity index 100% rename from test/hydration/samples/each-block/_after.svelte rename to test/hydration/samples/each-block/_after.html diff --git a/test/hydration/samples/each-block/_before.svelte b/test/hydration/samples/each-block/_before.html similarity index 100% rename from test/hydration/samples/each-block/_before.svelte rename to test/hydration/samples/each-block/_before.html diff --git a/test/hydration/samples/element-attribute-added/_after.svelte b/test/hydration/samples/element-attribute-added/_after.html similarity index 100% rename from test/hydration/samples/element-attribute-added/_after.svelte rename to test/hydration/samples/element-attribute-added/_after.html diff --git a/test/hydration/samples/element-attribute-added/_before.svelte b/test/hydration/samples/element-attribute-added/_before.html similarity index 100% rename from test/hydration/samples/element-attribute-added/_before.svelte rename to test/hydration/samples/element-attribute-added/_before.html diff --git a/test/hydration/samples/element-attribute-changed/_after.svelte b/test/hydration/samples/element-attribute-changed/_after.html similarity index 100% rename from test/hydration/samples/element-attribute-changed/_after.svelte rename to test/hydration/samples/element-attribute-changed/_after.html diff --git a/test/hydration/samples/element-attribute-changed/_before.svelte b/test/hydration/samples/element-attribute-changed/_before.html similarity index 100% rename from test/hydration/samples/element-attribute-changed/_before.svelte rename to test/hydration/samples/element-attribute-changed/_before.html diff --git a/test/hydration/samples/element-attribute-removed/_after.svelte b/test/hydration/samples/element-attribute-removed/_after.html similarity index 100% rename from test/hydration/samples/element-attribute-removed/_after.svelte rename to test/hydration/samples/element-attribute-removed/_after.html diff --git a/test/hydration/samples/element-attribute-removed/_before.svelte b/test/hydration/samples/element-attribute-removed/_before.html similarity index 100% rename from test/hydration/samples/element-attribute-removed/_before.svelte rename to test/hydration/samples/element-attribute-removed/_before.html diff --git a/test/hydration/samples/element-attribute-unchanged/_after.svelte b/test/hydration/samples/element-attribute-unchanged/_after.html similarity index 100% rename from test/hydration/samples/element-attribute-unchanged/_after.svelte rename to test/hydration/samples/element-attribute-unchanged/_after.html diff --git a/test/hydration/samples/element-attribute-unchanged/_before.svelte b/test/hydration/samples/element-attribute-unchanged/_before.html similarity index 100% rename from test/hydration/samples/element-attribute-unchanged/_before.svelte rename to test/hydration/samples/element-attribute-unchanged/_before.html diff --git a/test/hydration/samples/element-nested/_after.svelte b/test/hydration/samples/element-nested/_after.html similarity index 100% rename from test/hydration/samples/element-nested/_after.svelte rename to test/hydration/samples/element-nested/_after.html diff --git a/test/hydration/samples/element-nested/_before.svelte b/test/hydration/samples/element-nested/_before.html similarity index 100% rename from test/hydration/samples/element-nested/_before.svelte rename to test/hydration/samples/element-nested/_before.html diff --git a/test/hydration/samples/element-ref/_after.svelte b/test/hydration/samples/element-ref/_after.html similarity index 100% rename from test/hydration/samples/element-ref/_after.svelte rename to test/hydration/samples/element-ref/_after.html diff --git a/test/hydration/samples/element-ref/_before.svelte b/test/hydration/samples/element-ref/_before.html similarity index 100% rename from test/hydration/samples/element-ref/_before.svelte rename to test/hydration/samples/element-ref/_before.html diff --git a/test/hydration/samples/event-handler/_after.svelte b/test/hydration/samples/event-handler/_after.html similarity index 100% rename from test/hydration/samples/event-handler/_after.svelte rename to test/hydration/samples/event-handler/_after.html diff --git a/test/hydration/samples/event-handler/_before.svelte b/test/hydration/samples/event-handler/_before.html similarity index 100% rename from test/hydration/samples/event-handler/_before.svelte rename to test/hydration/samples/event-handler/_before.html diff --git a/test/hydration/samples/if-block-anchor/_after.svelte b/test/hydration/samples/if-block-anchor/_after.html similarity index 100% rename from test/hydration/samples/if-block-anchor/_after.svelte rename to test/hydration/samples/if-block-anchor/_after.html diff --git a/test/hydration/samples/if-block-anchor/_before.svelte b/test/hydration/samples/if-block-anchor/_before.html similarity index 100% rename from test/hydration/samples/if-block-anchor/_before.svelte rename to test/hydration/samples/if-block-anchor/_before.html diff --git a/test/hydration/samples/if-block-false/_after.svelte b/test/hydration/samples/if-block-false/_after.html similarity index 100% rename from test/hydration/samples/if-block-false/_after.svelte rename to test/hydration/samples/if-block-false/_after.html diff --git a/test/hydration/samples/if-block-false/_before.svelte b/test/hydration/samples/if-block-false/_before.html similarity index 100% rename from test/hydration/samples/if-block-false/_before.svelte rename to test/hydration/samples/if-block-false/_before.html diff --git a/test/hydration/samples/if-block-update/_after.svelte b/test/hydration/samples/if-block-update/_after.html similarity index 100% rename from test/hydration/samples/if-block-update/_after.svelte rename to test/hydration/samples/if-block-update/_after.html diff --git a/test/hydration/samples/if-block-update/_before.svelte b/test/hydration/samples/if-block-update/_before.html similarity index 100% rename from test/hydration/samples/if-block-update/_before.svelte rename to test/hydration/samples/if-block-update/_before.html diff --git a/test/hydration/samples/if-block/_after.svelte b/test/hydration/samples/if-block/_after.html similarity index 100% rename from test/hydration/samples/if-block/_after.svelte rename to test/hydration/samples/if-block/_after.html diff --git a/test/hydration/samples/if-block/_before.svelte b/test/hydration/samples/if-block/_before.html similarity index 100% rename from test/hydration/samples/if-block/_before.svelte rename to test/hydration/samples/if-block/_before.html diff --git a/test/hydration/samples/raw/_after.svelte b/test/hydration/samples/raw/_after.html similarity index 100% rename from test/hydration/samples/raw/_after.svelte rename to test/hydration/samples/raw/_after.html diff --git a/test/hydration/samples/raw/_before.svelte b/test/hydration/samples/raw/_before.html similarity index 100% rename from test/hydration/samples/raw/_before.svelte rename to test/hydration/samples/raw/_before.html diff --git a/test/hydration/samples/top-level-text/_after.svelte b/test/hydration/samples/top-level-text/_after.html similarity index 100% rename from test/hydration/samples/top-level-text/_after.svelte rename to test/hydration/samples/top-level-text/_after.html diff --git a/test/hydration/samples/top-level-text/_before.svelte b/test/hydration/samples/top-level-text/_before.html similarity index 100% rename from test/hydration/samples/top-level-text/_before.svelte rename to test/hydration/samples/top-level-text/_before.html diff --git a/test/js/index.js b/test/js/index.js index d6cb71e416..77da160591 100644 --- a/test/js/index.js +++ b/test/js/index.js @@ -18,7 +18,7 @@ describe("js", () => { dir = path.resolve("test/js/samples", dir); const config = loadConfig(`${dir}/_config.js`); - const input = fs.readFileSync(`${dir}/input.html`, "utf-8").replace(/\s+$/, ""); + const input = fs.readFileSync(`${dir}/input.svelte`, "utf-8").replace(/\s+$/, ""); let actual; diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index f4304f53ef..c7a82698c2 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -1,6 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; -import LazyLoad from "./LazyLoad.html"; +import LazyLoad from "./LazyLoad.svelte"; function create_fragment(ctx) { var current; @@ -38,7 +38,7 @@ function create_fragment(ctx) { } function func() { - return import('./Foo.html'); + return import('./Foo.svelte'); } class SvelteComponent extends SvelteComponent_1 { diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index b79dd60512..ee31f589ea 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -1,6 +1,6 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createText, detachNode, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; -import Imported from "Imported.html"; +import Imported from "Imported.svelte"; function create_fragment(ctx) { var text, current; diff --git a/test/parser/index.js b/test/parser/index.js index 900cc3ae05..990a8751ef 100644 --- a/test/parser/index.js +++ b/test/parser/index.js @@ -18,7 +18,7 @@ describe('parse', () => { (solo ? it.only : it)(dir, () => { const options = tryToLoadJson(`test/parser/samples/${dir}/options.json`) || {}; - const input = fs.readFileSync(`test/parser/samples/${dir}/input.html`, 'utf-8').replace(/\s+$/, ''); + const input = fs.readFileSync(`test/parser/samples/${dir}/input.svelte`, 'utf-8').replace(/\s+$/, ''); const expectedOutput = tryToLoadJson(`test/parser/samples/${dir}/output.json`); const expectedError = tryToLoadJson(`test/parser/samples/${dir}/error.json`); diff --git a/test/preprocess/index.js b/test/preprocess/index.js index fddc14ec94..8d114ab7b3 100644 --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -13,8 +13,8 @@ describe('preprocess', () => { } (config.skip ? it.skip : config.solo ? it.only : it)(dir, async () => { - const input = fs.readFileSync(`test/preprocess/samples/${dir}/input.html`, 'utf-8'); - const expected = fs.readFileSync(`test/preprocess/samples/${dir}/output.html`, 'utf-8'); + const input = fs.readFileSync(`test/preprocess/samples/${dir}/input.svelte`, 'utf-8'); + const expected = fs.readFileSync(`test/preprocess/samples/${dir}/output.svelte`, 'utf-8'); const result = await svelte.preprocess(input, config.preprocess); fs.writeFileSync(`test/preprocess/samples/${dir}/_actual.html`, result.code); diff --git a/test/preprocess/samples/filename/_config.js b/test/preprocess/samples/filename/_config.js index d7a3c19770..c71cdafcac 100644 --- a/test/preprocess/samples/filename/_config.js +++ b/test/preprocess/samples/filename/_config.js @@ -1,6 +1,6 @@ export default { preprocess: { - filename: 'file.html', + filename: 'file.svelte', markup: ({ content, filename }) => { return { code: content.replace('__MARKUP_FILENAME__', filename) diff --git a/test/preprocess/samples/filename/output.svelte b/test/preprocess/samples/filename/output.svelte index 1dcf67cc00..9eece2e222 100644 --- a/test/preprocess/samples/filename/output.svelte +++ b/test/preprocess/samples/filename/output.svelte @@ -1,3 +1,3 @@ -

    Hello file.html!

    - +

    Hello file.svelte!

    + \ No newline at end of file diff --git a/test/runtime/index.js b/test/runtime/index.js index cd9a2a4946..002ca2605f 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -27,7 +27,7 @@ describe("runtime", () => { svelte = loadSvelte(false); svelte$ = loadSvelte(true); - require.extensions[".html"] = function(module, filename) { + require.extensions[".svelte"] = function(module, filename) { const options = Object.assign({ filename, format: 'cjs', @@ -74,7 +74,7 @@ describe("runtime", () => { compileOptions.immutable = config.immutable; Object.keys(require.cache) - .filter(x => x.endsWith(".html")) + .filter(x => x.endsWith(".svelte")) .forEach(file => { delete require.cache[file]; }); @@ -111,7 +111,7 @@ describe("runtime", () => { }; try { - mod = require(`./samples/${dir}/main.html`); + mod = require(`./samples/${dir}/main.svelte`); SvelteComponent = mod.default; } catch (err) { showOutput(cwd, compileOptions, svelte.compile); // eslint-disable-line no-console diff --git a/test/runtime/samples/component-binding-deep-b/ComponentSelector.svelte b/test/runtime/samples/component-binding-deep-b/ComponentSelector.svelte index 0edb702f10..9b55ab769d 100644 --- a/test/runtime/samples/component-binding-deep-b/ComponentSelector.svelte +++ b/test/runtime/samples/component-binding-deep-b/ComponentSelector.svelte @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/test/runtime/samples/component-binding-deep-b/_config.js b/test/runtime/samples/component-binding-deep-b/_config.js index f701a36fac..5adee6eac1 100644 --- a/test/runtime/samples/component-binding-deep-b/_config.js +++ b/test/runtime/samples/component-binding-deep-b/_config.js @@ -21,8 +21,8 @@ export default { html: ` @@ -40,8 +40,8 @@ export default { assert.equal(component.compiled, 'ONE SOURCE CHANGED\nTWO SOURCE'); assert.htmlEqual(target.innerHTML, ` @@ -70,8 +70,8 @@ export default { assert.equal(component.compiled, 'ONE SOURCE CHANGED\nTWO SOURCE CHANGED'); assert.htmlEqual(target.innerHTML, ` diff --git a/test/runtime/samples/element-source-location/_config.js b/test/runtime/samples/element-source-location/_config.js index 7733688f23..61ae36d107 100644 --- a/test/runtime/samples/element-source-location/_config.js +++ b/test/runtime/samples/element-source-location/_config.js @@ -10,14 +10,14 @@ export default { const p = target.querySelector('p'); assert.deepEqual(h1.__svelte_meta.loc, { - file: path.relative(process.cwd(), path.resolve(__dirname, 'main.html')), + file: path.relative(process.cwd(), path.resolve(__dirname, 'main.svelte')), line: 4, column: 0, - char: 51 + char: 53 }); assert.deepEqual(p.__svelte_meta.loc, { - file: path.relative(process.cwd(), path.resolve(__dirname, 'Foo.html')), + file: path.relative(process.cwd(), path.resolve(__dirname, 'Foo.svelte')), line: 1, column: 1, char: 7 diff --git a/test/server-side-rendering/index.js b/test/server-side-rendering/index.js index a23936bba3..6a546b0b7b 100644 --- a/test/server-side-rendering/index.js +++ b/test/server-side-rendering/index.js @@ -46,15 +46,7 @@ describe("ssr", () => { (solo ? it.only : it)(dir, () => { dir = path.resolve("test/server-side-rendering/samples", dir); try { - let Component; - - const mainHtmlFile = `${dir}/main.html`; - const mainSvelteFile = `${dir}/main.svelte`; - if (fs.existsSync(mainHtmlFile)) { - Component = require(mainHtmlFile).default; - } else if (fs.existsSync(mainSvelteFile)) { - Component = require(mainSvelteFile).default; - } + const Component = require(`${dir}/main.svelte`).default; const expectedHtml = tryToReadFile(`${dir}/_expected.html`); const expectedCss = tryToReadFile(`${dir}/_expected.css`) || ""; @@ -104,7 +96,7 @@ describe("ssr", () => { (config.skip ? it.skip : config.solo ? it.only : it)(dir, () => { const cwd = path.resolve("test/runtime/samples", dir); - glob('**/*.html', { cwd: `test/runtime/samples/${dir}` }).forEach(file => { + glob('**/*.svelte', { cwd: `test/runtime/samples/${dir}` }).forEach(file => { const resolved = require.resolve(`../runtime/samples/${dir}/${file}`); delete require.cache[resolved]; }); @@ -118,7 +110,7 @@ describe("ssr", () => { try { if (config.before_test) config.before_test(); - const Component = require(`../runtime/samples/${dir}/main.html`).default; + const Component = require(`../runtime/samples/${dir}/main.svelte`).default; const { html } = Component.render(config.props, { store: (config.store !== true) && config.store }); diff --git a/test/server-side-rendering/samples/attribute-boolean/_expected.svelte b/test/server-side-rendering/samples/attribute-boolean/_expected.html similarity index 100% rename from test/server-side-rendering/samples/attribute-boolean/_expected.svelte rename to test/server-side-rendering/samples/attribute-boolean/_expected.html diff --git a/test/server-side-rendering/samples/attribute-dynamic/_expected.svelte b/test/server-side-rendering/samples/attribute-dynamic/_expected.html similarity index 100% rename from test/server-side-rendering/samples/attribute-dynamic/_expected.svelte rename to test/server-side-rendering/samples/attribute-dynamic/_expected.html diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.svelte b/test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.html similarity index 100% rename from test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.svelte rename to test/server-side-rendering/samples/attribute-escaped-quotes-spread/_expected.html diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes/_expected.svelte b/test/server-side-rendering/samples/attribute-escaped-quotes/_expected.html similarity index 100% rename from test/server-side-rendering/samples/attribute-escaped-quotes/_expected.svelte rename to test/server-side-rendering/samples/attribute-escaped-quotes/_expected.html diff --git a/test/server-side-rendering/samples/attribute-static/_expected.svelte b/test/server-side-rendering/samples/attribute-static/_expected.html similarity index 100% rename from test/server-side-rendering/samples/attribute-static/_expected.svelte rename to test/server-side-rendering/samples/attribute-static/_expected.html diff --git a/test/server-side-rendering/samples/bindings/_expected.svelte b/test/server-side-rendering/samples/bindings/_expected.html similarity index 100% rename from test/server-side-rendering/samples/bindings/_expected.svelte rename to test/server-side-rendering/samples/bindings/_expected.html diff --git a/test/server-side-rendering/samples/comment/_expected.svelte b/test/server-side-rendering/samples/comment/_expected.html similarity index 100% rename from test/server-side-rendering/samples/comment/_expected.svelte rename to test/server-side-rendering/samples/comment/_expected.html diff --git a/test/server-side-rendering/samples/component-binding-renamed/_expected.svelte b/test/server-side-rendering/samples/component-binding-renamed/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-binding-renamed/_expected.svelte rename to test/server-side-rendering/samples/component-binding-renamed/_expected.html diff --git a/test/server-side-rendering/samples/component-binding/_expected.svelte b/test/server-side-rendering/samples/component-binding/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-binding/_expected.svelte rename to test/server-side-rendering/samples/component-binding/_expected.html diff --git a/test/server-side-rendering/samples/component-data-dynamic/_expected.svelte b/test/server-side-rendering/samples/component-data-dynamic/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-data-dynamic/_expected.svelte rename to test/server-side-rendering/samples/component-data-dynamic/_expected.html diff --git a/test/server-side-rendering/samples/component-data-empty/_expected.svelte b/test/server-side-rendering/samples/component-data-empty/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-data-empty/_expected.svelte rename to test/server-side-rendering/samples/component-data-empty/_expected.html diff --git a/test/server-side-rendering/samples/component-refs-and-attributes/_expected.svelte b/test/server-side-rendering/samples/component-refs-and-attributes/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-refs-and-attributes/_expected.svelte rename to test/server-side-rendering/samples/component-refs-and-attributes/_expected.html diff --git a/test/server-side-rendering/samples/component-refs/_expected.svelte b/test/server-side-rendering/samples/component-refs/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-refs/_expected.svelte rename to test/server-side-rendering/samples/component-refs/_expected.html diff --git a/test/server-side-rendering/samples/component-with-different-extension/_expected.svelte b/test/server-side-rendering/samples/component-with-different-extension/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-with-different-extension/_expected.svelte rename to test/server-side-rendering/samples/component-with-different-extension/_expected.html diff --git a/test/server-side-rendering/samples/component-yield/_expected.svelte b/test/server-side-rendering/samples/component-yield/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component-yield/_expected.svelte rename to test/server-side-rendering/samples/component-yield/_expected.html diff --git a/test/server-side-rendering/samples/component/_expected.svelte b/test/server-side-rendering/samples/component/_expected.html similarity index 100% rename from test/server-side-rendering/samples/component/_expected.svelte rename to test/server-side-rendering/samples/component/_expected.html diff --git a/test/server-side-rendering/samples/computed/_expected.svelte b/test/server-side-rendering/samples/computed/_expected.html similarity index 100% rename from test/server-side-rendering/samples/computed/_expected.svelte rename to test/server-side-rendering/samples/computed/_expected.html diff --git a/test/server-side-rendering/samples/default-data-override/_expected.svelte b/test/server-side-rendering/samples/default-data-override/_expected.html similarity index 100% rename from test/server-side-rendering/samples/default-data-override/_expected.svelte rename to test/server-side-rendering/samples/default-data-override/_expected.html diff --git a/test/server-side-rendering/samples/default-data/_expected.svelte b/test/server-side-rendering/samples/default-data/_expected.html similarity index 100% rename from test/server-side-rendering/samples/default-data/_expected.svelte rename to test/server-side-rendering/samples/default-data/_expected.html diff --git a/test/server-side-rendering/samples/directives/_expected.svelte b/test/server-side-rendering/samples/directives/_expected.html similarity index 100% rename from test/server-side-rendering/samples/directives/_expected.svelte rename to test/server-side-rendering/samples/directives/_expected.html diff --git a/test/server-side-rendering/samples/dynamic-text-escaped/_expected.svelte b/test/server-side-rendering/samples/dynamic-text-escaped/_expected.html similarity index 100% rename from test/server-side-rendering/samples/dynamic-text-escaped/_expected.svelte rename to test/server-side-rendering/samples/dynamic-text-escaped/_expected.html diff --git a/test/server-side-rendering/samples/dynamic-text/_expected.svelte b/test/server-side-rendering/samples/dynamic-text/_expected.html similarity index 100% rename from test/server-side-rendering/samples/dynamic-text/_expected.svelte rename to test/server-side-rendering/samples/dynamic-text/_expected.html diff --git a/test/server-side-rendering/samples/each-block/_expected.svelte b/test/server-side-rendering/samples/each-block/_expected.html similarity index 100% rename from test/server-side-rendering/samples/each-block/_expected.svelte rename to test/server-side-rendering/samples/each-block/_expected.html diff --git a/test/server-side-rendering/samples/empty-elements-closed/_expected.svelte b/test/server-side-rendering/samples/empty-elements-closed/_expected.html similarity index 100% rename from test/server-side-rendering/samples/empty-elements-closed/_expected.svelte rename to test/server-side-rendering/samples/empty-elements-closed/_expected.html diff --git a/test/server-side-rendering/samples/entities/_expected.svelte b/test/server-side-rendering/samples/entities/_expected.html similarity index 100% rename from test/server-side-rendering/samples/entities/_expected.svelte rename to test/server-side-rendering/samples/entities/_expected.html diff --git a/test/server-side-rendering/samples/head-title/_expected-head.svelte b/test/server-side-rendering/samples/head-title/_expected-head.html similarity index 100% rename from test/server-side-rendering/samples/head-title/_expected-head.svelte rename to test/server-side-rendering/samples/head-title/_expected-head.html diff --git a/test/server-side-rendering/samples/head-title/_expected.svelte b/test/server-side-rendering/samples/head-title/_expected.html similarity index 100% rename from test/server-side-rendering/samples/head-title/_expected.svelte rename to test/server-side-rendering/samples/head-title/_expected.html diff --git a/test/server-side-rendering/samples/helpers/_expected.svelte b/test/server-side-rendering/samples/helpers/_expected.html similarity index 100% rename from test/server-side-rendering/samples/helpers/_expected.svelte rename to test/server-side-rendering/samples/helpers/_expected.html diff --git a/test/server-side-rendering/samples/if-block-false/_expected.svelte b/test/server-side-rendering/samples/if-block-false/_expected.html similarity index 100% rename from test/server-side-rendering/samples/if-block-false/_expected.svelte rename to test/server-side-rendering/samples/if-block-false/_expected.html diff --git a/test/server-side-rendering/samples/if-block-true/_expected.svelte b/test/server-side-rendering/samples/if-block-true/_expected.html similarity index 100% rename from test/server-side-rendering/samples/if-block-true/_expected.svelte rename to test/server-side-rendering/samples/if-block-true/_expected.html diff --git a/test/server-side-rendering/samples/import-non-component/_expected.svelte b/test/server-side-rendering/samples/import-non-component/_expected.html similarity index 100% rename from test/server-side-rendering/samples/import-non-component/_expected.svelte rename to test/server-side-rendering/samples/import-non-component/_expected.html diff --git a/test/server-side-rendering/samples/raw-mustaches/_expected.svelte b/test/server-side-rendering/samples/raw-mustaches/_expected.html similarity index 100% rename from test/server-side-rendering/samples/raw-mustaches/_expected.svelte rename to test/server-side-rendering/samples/raw-mustaches/_expected.html diff --git a/test/server-side-rendering/samples/sanitize-name/_expected.svelte b/test/server-side-rendering/samples/sanitize-name/_expected.html similarity index 100% rename from test/server-side-rendering/samples/sanitize-name/_expected.svelte rename to test/server-side-rendering/samples/sanitize-name/_expected.html diff --git a/test/server-side-rendering/samples/static-div/_expected.svelte b/test/server-side-rendering/samples/static-div/_expected.html similarity index 100% rename from test/server-side-rendering/samples/static-div/_expected.svelte rename to test/server-side-rendering/samples/static-div/_expected.html diff --git a/test/server-side-rendering/samples/static-text/_expected.svelte b/test/server-side-rendering/samples/static-text/_expected.html similarity index 100% rename from test/server-side-rendering/samples/static-text/_expected.svelte rename to test/server-side-rendering/samples/static-text/_expected.html diff --git a/test/server-side-rendering/samples/styles-nested/_expected.svelte b/test/server-side-rendering/samples/styles-nested/_expected.html similarity index 100% rename from test/server-side-rendering/samples/styles-nested/_expected.svelte rename to test/server-side-rendering/samples/styles-nested/_expected.html diff --git a/test/server-side-rendering/samples/styles/_expected.svelte b/test/server-side-rendering/samples/styles/_expected.html similarity index 100% rename from test/server-side-rendering/samples/styles/_expected.svelte rename to test/server-side-rendering/samples/styles/_expected.html diff --git a/test/server-side-rendering/samples/textarea-children/_expected.svelte b/test/server-side-rendering/samples/textarea-children/_expected.html similarity index 100% rename from test/server-side-rendering/samples/textarea-children/_expected.svelte rename to test/server-side-rendering/samples/textarea-children/_expected.html diff --git a/test/server-side-rendering/samples/textarea-value/_expected.svelte b/test/server-side-rendering/samples/textarea-value/_expected.html similarity index 100% rename from test/server-side-rendering/samples/textarea-value/_expected.svelte rename to test/server-side-rendering/samples/textarea-value/_expected.html diff --git a/test/server-side-rendering/samples/triple/_expected.svelte b/test/server-side-rendering/samples/triple/_expected.html similarity index 100% rename from test/server-side-rendering/samples/triple/_expected.svelte rename to test/server-side-rendering/samples/triple/_expected.html diff --git a/test/sourcemaps/index.js b/test/sourcemaps/index.js index 7bdcaa7f41..79028719b9 100644 --- a/test/sourcemaps/index.js +++ b/test/sourcemaps/index.js @@ -21,7 +21,7 @@ describe("sourcemaps", () => { const config = loadConfig(`./sourcemaps/samples/${dir}/_config.js`); const filename = path.resolve( - `test/sourcemaps/samples/${dir}/input.html` + `test/sourcemaps/samples/${dir}/input.svelte` ); const outputFilename = path.resolve( `test/sourcemaps/samples/${dir}/output` @@ -56,8 +56,8 @@ describe("sourcemaps", () => { ); } - assert.deepEqual(js.map.sources, ["input.html"]); - if (css.map) assert.deepEqual(css.map.sources, ["input.html"]); + assert.deepEqual(js.map.sources, ["input.svelte"]); + if (css.map) assert.deepEqual(css.map.sources, ["input.svelte"]); const { test } = require(`./samples/${dir}/test.js`); diff --git a/test/sourcemaps/samples/basic/test.js b/test/sourcemaps/samples/basic/test.js index f0680b7351..f13ff5d0e1 100644 --- a/test/sourcemaps/samples/basic/test.js +++ b/test/sourcemaps/samples/basic/test.js @@ -12,7 +12,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column @@ -26,7 +26,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/binding-shorthand.skip/test.js b/test/sourcemaps/samples/binding-shorthand.skip/test.js index 8c2216ead5..cdfbbdc091 100644 --- a/test/sourcemaps/samples/binding-shorthand.skip/test.js +++ b/test/sourcemaps/samples/binding-shorthand.skip/test.js @@ -13,7 +13,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual(actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/binding/test.js b/test/sourcemaps/samples/binding/test.js index a0750d89a1..31c0e98442 100644 --- a/test/sourcemaps/samples/binding/test.js +++ b/test/sourcemaps/samples/binding/test.js @@ -12,7 +12,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual(actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column @@ -26,7 +26,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual(actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/css/test.js b/test/sourcemaps/samples/css/test.js index c1f55612eb..54082bd4ee 100644 --- a/test/sourcemaps/samples/css/test.js +++ b/test/sourcemaps/samples/css/test.js @@ -9,7 +9,7 @@ export function test({ assert, smcCss, locateInSource, locateInGeneratedCss }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/each-block/test.js b/test/sourcemaps/samples/each-block/test.js index b0c1eb9583..6e9d2d70b0 100644 --- a/test/sourcemaps/samples/each-block/test.js +++ b/test/sourcemaps/samples/each-block/test.js @@ -10,7 +10,7 @@ export function test({ assert, code, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/script/test.js b/test/sourcemaps/samples/script/test.js index 87818fef09..73971ef487 100644 --- a/test/sourcemaps/samples/script/test.js +++ b/test/sourcemaps/samples/script/test.js @@ -8,7 +8,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/static-no-script/test.js b/test/sourcemaps/samples/static-no-script/test.js index d4b66d9abc..a8f4d89ab8 100644 --- a/test/sourcemaps/samples/static-no-script/test.js +++ b/test/sourcemaps/samples/static-no-script/test.js @@ -2,8 +2,8 @@ const fs = require( 'fs' ); const path = require( 'path' ); export function test({ assert, map }) { - assert.deepEqual( map.sources, [ 'input.html' ]); + assert.deepEqual( map.sources, [ 'input.svelte' ]); assert.deepEqual( map.sourcesContent, [ - fs.readFileSync( path.join( __dirname, 'input.html' ), 'utf-8' ) + fs.readFileSync( path.join( __dirname, 'input.svelte' ), 'utf-8' ) ]); } diff --git a/test/stats/index.js b/test/stats/index.js index e0b114dd9a..fe4c2ac55b 100644 --- a/test/stats/index.js +++ b/test/stats/index.js @@ -16,7 +16,7 @@ describe('stats', () => { (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = loadConfig(`./stats/samples/${dir}/_config.js`); - const filename = `test/stats/samples/${dir}/input.html`; + const filename = `test/stats/samples/${dir}/input.svelte`; const input = fs.readFileSync(filename, 'utf-8').replace(/\s+$/, ''); const expectedWarnings = diff --git a/test/validator/index.js b/test/validator/index.js index 517427e817..f10024b86c 100644 --- a/test/validator/index.js +++ b/test/validator/index.js @@ -17,7 +17,7 @@ describe("validate", () => { (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = loadConfig(`./validator/samples/${dir}/_config.js`); - const input = fs.readFileSync(`test/validator/samples/${dir}/input.html`, "utf-8").replace(/\s+$/, ""); + const input = fs.readFileSync(`test/validator/samples/${dir}/input.svelte`, "utf-8").replace(/\s+$/, ""); const expectedWarnings = tryToLoadJson(`test/validator/samples/${dir}/warnings.json`) || []; const expectedErrors = tryToLoadJson(`test/validator/samples/${dir}/errors.json`); diff --git a/test/validator/samples/a11y-not-on-components/warnings.json b/test/validator/samples/a11y-not-on-components/warnings.json index 7e17fda95a..4d8fb62182 100644 --- a/test/validator/samples/a11y-not-on-components/warnings.json +++ b/test/validator/samples/a11y-not-on-components/warnings.json @@ -5,13 +5,13 @@ "start": { "column": 8, "line": 6, - "character": 86 + "character": 88 }, "end": { "line": 6, "column": 17, - "character": 95 + "character": 97 }, - "pos": 86 + "pos": 88 } ] diff --git a/test/validator/samples/action-on-component/errors.json b/test/validator/samples/action-on-component/errors.json index 596ef16482..7ffaeb45fd 100644 --- a/test/validator/samples/action-on-component/errors.json +++ b/test/validator/samples/action-on-component/errors.json @@ -1,15 +1,15 @@ [{ "code": "invalid-action", "message": "Actions can only be applied to DOM elements, not components", - "pos": 84, + "pos": 86, "start": { "line": 7, "column": 8, - "character": 84 + "character": 86 }, "end": { "line": 7, "column": 15, - "character": 91 + "character": 93 } }] \ No newline at end of file diff --git a/test/validator/samples/component-slot-dynamic-attribute/errors.json b/test/validator/samples/component-slot-dynamic-attribute/errors.json index 6108b89bfb..8944f9cd3e 100644 --- a/test/validator/samples/component-slot-dynamic-attribute/errors.json +++ b/test/validator/samples/component-slot-dynamic-attribute/errors.json @@ -4,12 +4,12 @@ "start": { "line": 6, "column": 9, - "character": 75 + "character": 77 }, "end": { "line": 6, "column": 19, - "character": 85 + "character": 87 }, - "pos": 75 + "pos": 77 }] \ No newline at end of file diff --git a/test/validator/samples/component-slotted-each-block/errors.json b/test/validator/samples/component-slotted-each-block/errors.json index b2ae858fb6..89f394bca4 100644 --- a/test/validator/samples/component-slotted-each-block/errors.json +++ b/test/validator/samples/component-slotted-each-block/errors.json @@ -4,12 +4,12 @@ "start": { "line": 7, "column": 7, - "character": 98 + "character": 100 }, "end": { "line": 7, "column": 17, - "character": 108 + "character": 110 }, - "pos": 98 + "pos": 100 }] \ No newline at end of file diff --git a/test/validator/samples/component-slotted-if-block/errors.json b/test/validator/samples/component-slotted-if-block/errors.json index bd3ef87fad..ab35a77fce 100644 --- a/test/validator/samples/component-slotted-if-block/errors.json +++ b/test/validator/samples/component-slotted-if-block/errors.json @@ -4,12 +4,12 @@ "start": { "line": 7, "column": 7, - "character": 86 + "character": 88 }, "end": { "line": 7, "column": 17, - "character": 96 + "character": 98 }, - "pos": 86 + "pos": 88 }] \ No newline at end of file diff --git a/test/validator/samples/prop-slot/errors.json b/test/validator/samples/prop-slot/errors.json index 01e864b542..4fbfa3935c 100644 --- a/test/validator/samples/prop-slot/errors.json +++ b/test/validator/samples/prop-slot/errors.json @@ -4,12 +4,12 @@ "start": { "line": 5, "column": 8, - "character": 65 + "character": 67 }, "end": { "line": 5, "column": 18, - "character": 75 + "character": 77 }, - "pos": 65 + "pos": 67 }] diff --git a/test/validator/samples/transition-on-component/errors.json b/test/validator/samples/transition-on-component/errors.json index bee8bf7539..400539f8e6 100644 --- a/test/validator/samples/transition-on-component/errors.json +++ b/test/validator/samples/transition-on-component/errors.json @@ -4,12 +4,12 @@ "start": { "line": 7, "column": 8, - "character": 85 + "character": 87 }, "end": { "line": 7, "column": 14, - "character": 91 + "character": 93 }, - "pos": 85 + "pos": 87 }] \ No newline at end of file From e6ed8ef49fcc6e48e7a07a42cd502801b6c5845a Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 8 Feb 2019 20:58:18 -0500 Subject: [PATCH 110/125] update site, including REPL, to use .svelte --- .../7guis-circles/{App.html => App.svelte} | 0 .../7guis-counter/{App.html => App.svelte} | 0 .../7guis-crud/{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 .../7guis-temperature/{App.html => App.svelte} | 0 .../7guis-timer/{App.html => App.svelte} | 0 .../await-block/{App.html => App.svelte} | 0 .../bar-chart/{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 .../binding-textarea/{App.html => App.svelte} | 0 .../each-blocks/{App.html => App.svelte} | 0 .../hacker-news/{App.html => App.svelte} | 4 ++-- .../{Comment.html => Comment.svelte} | 0 .../hacker-news/{Item.html => Item.svelte} | 0 .../hacker-news/{List.html => List.svelte} | 0 .../{Summary.html => Summary.svelte} | 0 .../hello-world/{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 2 +- .../{Foo.html => Foo.svelte} | 0 .../{App.html => App.svelte} | 0 .../if-blocks/{App.html => App.svelte} | 0 .../immutable/{App.html => App.svelte} | 4 ++-- ...ImmutableTodo.html => ImmutableTodo.svelte} | 0 .../{MutableTodo.html => MutableTodo.svelte} | 0 .../line-chart/{App.html => App.svelte} | 0 .../modal-with-slot/{App.html => App.svelte} | 2 +- .../{Modal.html => Modal.svelte} | 0 .../motion-spring/{App.html => App.svelte} | 0 .../nested-components/{App.html => App.svelte} | 2 +- .../{Nested.html => Nested.svelte} | 0 .../examples/parallax/{App.html => App.svelte} | 0 .../scatterplot/{App.html => App.svelte} | 2 +- .../{Scatterplot.html => Scatterplot.svelte} | 0 .../scoped-styles/{App.html => App.svelte} | 0 .../self-references/{App.html => App.svelte} | 0 .../svg-clock/{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 .../transitions-fade/{App.html => App.svelte} | 0 .../transitions-fly/{App.html => App.svelte} | 0 .../{App.html => App.svelte} | 0 site/package-lock.json | 6 +++--- site/package.json | 2 +- site/src/components/{Icon.html => Icon.svelte} | 0 .../{InlineSvg.html => InlineSvg.svelte} | 0 site/src/components/{Logo.html => Logo.svelte} | 0 .../components/{TopNav.html => TopNav.svelte} | 4 ++-- site/src/routes/{_error.html => _error.svelte} | 0 .../routes/{_layout.html => _layout.svelte} | 4 ++-- site/src/routes/{about.html => about.svelte} | 0 site/src/routes/api/examples/[slug].js | 8 ++++---- .../routes/blog/{[slug].html => [slug].svelte} | 0 .../routes/blog/{index.html => index.svelte} | 0 site/src/routes/gist/[id].js | 4 ++-- ...uideContents.html => _GuideContents.svelte} | 2 +- site/src/routes/guide/_sections.js | 2 +- .../routes/guide/{index.html => index.svelte} | 4 ++-- site/src/routes/{index.html => index.svelte} | 4 ++-- .../{UserMenu.html => UserMenu.svelte} | 0 .../AppControls/{index.html => index.svelte} | 10 +++++----- .../{CodeMirror.html => CodeMirror.svelte} | 0 ...tSelector.html => ComponentSelector.svelte} | 8 ++++---- .../{ModuleEditor.html => ModuleEditor.svelte} | 2 +- .../Input/{index.html => index.svelte} | 4 ++-- ...putToggle.html => InputOutputToggle.svelte} | 0 ...ilerOptions.html => CompilerOptions.svelte} | 0 .../{PropEditor.html => PropEditor.svelte} | 2 +- .../Output/{Viewer.html => Viewer.svelte} | 0 .../Output/{index.html => index.svelte} | 10 +++++----- .../_components/{Repl.html => Repl.svelte} | 18 +++++++++--------- .../{SplitPane.html => SplitPane.svelte} | 0 .../routes/repl/{embed.html => embed.svelte} | 10 +++++----- .../routes/repl/{index.html => index.svelte} | 17 ++++++++++------- site/static/workers/bundler.js | 10 ++++++---- 80 files changed, 76 insertions(+), 71 deletions(-) rename site/content/examples/7guis-circles/{App.html => App.svelte} (100%) rename site/content/examples/7guis-counter/{App.html => App.svelte} (100%) rename site/content/examples/7guis-crud/{App.html => App.svelte} (100%) rename site/content/examples/7guis-flight-booker/{App.html => App.svelte} (100%) rename site/content/examples/7guis-temperature/{App.html => App.svelte} (100%) rename site/content/examples/7guis-timer/{App.html => App.svelte} (100%) rename site/content/examples/await-block/{App.html => App.svelte} (100%) rename site/content/examples/bar-chart/{App.html => App.svelte} (100%) rename site/content/examples/binding-input-checkbox-group/{App.html => App.svelte} (100%) rename site/content/examples/binding-input-checkbox/{App.html => App.svelte} (100%) rename site/content/examples/binding-input-numeric/{App.html => App.svelte} (100%) rename site/content/examples/binding-input-radio/{App.html => App.svelte} (100%) rename site/content/examples/binding-input-text/{App.html => App.svelte} (100%) rename site/content/examples/binding-media-elements/{App.html => App.svelte} (100%) rename site/content/examples/binding-textarea/{App.html => App.svelte} (100%) rename site/content/examples/each-blocks/{App.html => App.svelte} (100%) rename site/content/examples/hacker-news/{App.html => App.svelte} (92%) rename site/content/examples/hacker-news/{Comment.html => Comment.svelte} (100%) rename site/content/examples/hacker-news/{Item.html => Item.svelte} (100%) rename site/content/examples/hacker-news/{List.html => List.svelte} (100%) rename site/content/examples/hacker-news/{Summary.html => Summary.svelte} (100%) rename site/content/examples/hello-world/{App.html => App.svelte} (100%) rename site/content/examples/homepage-demo-hello-world/{App.html => App.svelte} (100%) rename site/content/examples/homepage-demo-reactivity/{App.html => App.svelte} (100%) rename site/content/examples/homepage-demo-scoped-styles/{App.html => App.svelte} (73%) rename site/content/examples/homepage-demo-scoped-styles/{Foo.html => Foo.svelte} (100%) rename site/content/examples/homepage-demo-transitions/{App.html => App.svelte} (100%) rename site/content/examples/if-blocks/{App.html => App.svelte} (100%) rename site/content/examples/immutable/{App.html => App.svelte} (86%) rename site/content/examples/immutable/{ImmutableTodo.html => ImmutableTodo.svelte} (100%) rename site/content/examples/immutable/{MutableTodo.html => MutableTodo.svelte} (100%) rename site/content/examples/line-chart/{App.html => App.svelte} (100%) rename site/content/examples/modal-with-slot/{App.html => App.svelte} (95%) rename site/content/examples/modal-with-slot/{Modal.html => Modal.svelte} (100%) rename site/content/examples/motion-spring/{App.html => App.svelte} (100%) rename site/content/examples/nested-components/{App.html => App.svelte} (53%) rename site/content/examples/nested-components/{Nested.html => Nested.svelte} (100%) rename site/content/examples/parallax/{App.html => App.svelte} (100%) rename site/content/examples/scatterplot/{App.html => App.svelte} (87%) rename site/content/examples/scatterplot/{Scatterplot.html => Scatterplot.svelte} (100%) rename site/content/examples/scoped-styles/{App.html => App.svelte} (100%) rename site/content/examples/self-references/{App.html => App.svelte} (100%) rename site/content/examples/svg-clock/{App.html => App.svelte} (100%) rename site/content/examples/transitions-custom/{App.html => App.svelte} (100%) rename site/content/examples/transitions-fade/{App.html => App.svelte} (100%) rename site/content/examples/transitions-fly/{App.html => App.svelte} (100%) rename site/content/examples/transitions-in-out/{App.html => App.svelte} (100%) rename site/src/components/{Icon.html => Icon.svelte} (100%) rename site/src/components/{InlineSvg.html => InlineSvg.svelte} (100%) rename site/src/components/{Logo.html => Logo.svelte} (100%) rename site/src/components/{TopNav.html => TopNav.svelte} (98%) rename site/src/routes/{_error.html => _error.svelte} (100%) rename site/src/routes/{_layout.html => _layout.svelte} (76%) rename site/src/routes/{about.html => about.svelte} (100%) rename site/src/routes/blog/{[slug].html => [slug].svelte} (100%) rename site/src/routes/blog/{index.html => index.svelte} (100%) rename site/src/routes/guide/{_GuideContents.html => _GuideContents.svelte} (98%) rename site/src/routes/guide/{index.html => index.svelte} (98%) rename site/src/routes/{index.html => index.svelte} (98%) rename site/src/routes/repl/_components/AppControls/{UserMenu.html => UserMenu.svelte} (100%) rename site/src/routes/repl/_components/AppControls/{index.html => index.svelte} (96%) rename site/src/routes/repl/_components/{CodeMirror.html => CodeMirror.svelte} (100%) rename site/src/routes/repl/_components/Input/{ComponentSelector.html => ComponentSelector.svelte} (96%) rename site/src/routes/repl/_components/Input/{ModuleEditor.html => ModuleEditor.svelte} (91%) rename site/src/routes/repl/_components/Input/{index.html => index.svelte} (77%) rename site/src/routes/repl/_components/{InputOutputToggle.html => InputOutputToggle.svelte} (100%) rename site/src/routes/repl/_components/Output/{CompilerOptions.html => CompilerOptions.svelte} (100%) rename site/src/routes/repl/_components/Output/{PropEditor.html => PropEditor.svelte} (95%) rename site/src/routes/repl/_components/Output/{Viewer.html => Viewer.svelte} (100%) rename site/src/routes/repl/_components/Output/{index.html => index.svelte} (94%) rename site/src/routes/repl/_components/{Repl.html => Repl.svelte} (94%) rename site/src/routes/repl/_components/{SplitPane.html => SplitPane.svelte} (100%) rename site/src/routes/repl/{embed.html => embed.svelte} (87%) rename site/src/routes/repl/{index.html => index.svelte} (89%) diff --git a/site/content/examples/7guis-circles/App.html b/site/content/examples/7guis-circles/App.svelte similarity index 100% rename from site/content/examples/7guis-circles/App.html rename to site/content/examples/7guis-circles/App.svelte diff --git a/site/content/examples/7guis-counter/App.html b/site/content/examples/7guis-counter/App.svelte similarity index 100% rename from site/content/examples/7guis-counter/App.html rename to site/content/examples/7guis-counter/App.svelte diff --git a/site/content/examples/7guis-crud/App.html b/site/content/examples/7guis-crud/App.svelte similarity index 100% rename from site/content/examples/7guis-crud/App.html rename to site/content/examples/7guis-crud/App.svelte diff --git a/site/content/examples/7guis-flight-booker/App.html b/site/content/examples/7guis-flight-booker/App.svelte similarity index 100% rename from site/content/examples/7guis-flight-booker/App.html rename to site/content/examples/7guis-flight-booker/App.svelte diff --git a/site/content/examples/7guis-temperature/App.html b/site/content/examples/7guis-temperature/App.svelte similarity index 100% rename from site/content/examples/7guis-temperature/App.html rename to site/content/examples/7guis-temperature/App.svelte diff --git a/site/content/examples/7guis-timer/App.html b/site/content/examples/7guis-timer/App.svelte similarity index 100% rename from site/content/examples/7guis-timer/App.html rename to site/content/examples/7guis-timer/App.svelte diff --git a/site/content/examples/await-block/App.html b/site/content/examples/await-block/App.svelte similarity index 100% rename from site/content/examples/await-block/App.html rename to site/content/examples/await-block/App.svelte diff --git a/site/content/examples/bar-chart/App.html b/site/content/examples/bar-chart/App.svelte similarity index 100% rename from site/content/examples/bar-chart/App.html rename to site/content/examples/bar-chart/App.svelte diff --git a/site/content/examples/binding-input-checkbox-group/App.html b/site/content/examples/binding-input-checkbox-group/App.svelte similarity index 100% rename from site/content/examples/binding-input-checkbox-group/App.html rename to site/content/examples/binding-input-checkbox-group/App.svelte diff --git a/site/content/examples/binding-input-checkbox/App.html b/site/content/examples/binding-input-checkbox/App.svelte similarity index 100% rename from site/content/examples/binding-input-checkbox/App.html rename to site/content/examples/binding-input-checkbox/App.svelte diff --git a/site/content/examples/binding-input-numeric/App.html b/site/content/examples/binding-input-numeric/App.svelte similarity index 100% rename from site/content/examples/binding-input-numeric/App.html rename to site/content/examples/binding-input-numeric/App.svelte diff --git a/site/content/examples/binding-input-radio/App.html b/site/content/examples/binding-input-radio/App.svelte similarity index 100% rename from site/content/examples/binding-input-radio/App.html rename to site/content/examples/binding-input-radio/App.svelte diff --git a/site/content/examples/binding-input-text/App.html b/site/content/examples/binding-input-text/App.svelte similarity index 100% rename from site/content/examples/binding-input-text/App.html rename to site/content/examples/binding-input-text/App.svelte diff --git a/site/content/examples/binding-media-elements/App.html b/site/content/examples/binding-media-elements/App.svelte similarity index 100% rename from site/content/examples/binding-media-elements/App.html rename to site/content/examples/binding-media-elements/App.svelte diff --git a/site/content/examples/binding-textarea/App.html b/site/content/examples/binding-textarea/App.svelte similarity index 100% rename from site/content/examples/binding-textarea/App.html rename to site/content/examples/binding-textarea/App.svelte diff --git a/site/content/examples/each-blocks/App.html b/site/content/examples/each-blocks/App.svelte similarity index 100% rename from site/content/examples/each-blocks/App.html rename to site/content/examples/each-blocks/App.svelte diff --git a/site/content/examples/hacker-news/App.html b/site/content/examples/hacker-news/App.svelte similarity index 92% rename from site/content/examples/hacker-news/App.html rename to site/content/examples/hacker-news/App.svelte index 2f8283fdf2..68ba61d6dc 100644 --- a/site/content/examples/hacker-news/App.html +++ b/site/content/examples/hacker-news/App.svelte @@ -1,7 +1,7 @@
    -