From 55130be026cb2c188584a94c2f273e9299a23164 Mon Sep 17 00:00:00 2001 From: DoctorNefario <5243039+DoctorNefario@users.noreply.github.com> Date: Fri, 8 Oct 2021 07:08:26 +1100 Subject: [PATCH 1/8] [docs] use 'transition' directive for custom JS transitions (#6796) This prevents transition jumping when visibility is repeatedly toggled --- .../09-transitions/04-custom-js-transitions/App.svelte | 2 +- .../10-transitions/05-custom-js-transitions/app-a/App.svelte | 4 ++-- .../10-transitions/05-custom-js-transitions/app-b/App.svelte | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte b/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte index 5e1ad9863c..90701aeab4 100644 --- a/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte +++ b/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte @@ -30,7 +30,7 @@ {#if visible} -

+

The quick brown fox jumps over the lazy dog

{/if} diff --git a/site/content/tutorial/10-transitions/05-custom-js-transitions/app-a/App.svelte b/site/content/tutorial/10-transitions/05-custom-js-transitions/app-a/App.svelte index 11a8ec3ef5..7ce4a86e92 100644 --- a/site/content/tutorial/10-transitions/05-custom-js-transitions/app-a/App.svelte +++ b/site/content/tutorial/10-transitions/05-custom-js-transitions/app-a/App.svelte @@ -16,7 +16,7 @@ {#if visible} -

+

The quick brown fox jumps over the lazy dog

-{/if} \ No newline at end of file +{/if} diff --git a/site/content/tutorial/10-transitions/05-custom-js-transitions/app-b/App.svelte b/site/content/tutorial/10-transitions/05-custom-js-transitions/app-b/App.svelte index 5e1ad9863c..90701aeab4 100644 --- a/site/content/tutorial/10-transitions/05-custom-js-transitions/app-b/App.svelte +++ b/site/content/tutorial/10-transitions/05-custom-js-transitions/app-b/App.svelte @@ -30,7 +30,7 @@ {#if visible} -

+

The quick brown fox jumps over the lazy dog

{/if} From a5968dd2d0db552c5091052010a0ccc14531ef22 Mon Sep 17 00:00:00 2001 From: Yuichiro Yamashita Date: Fri, 8 Oct 2021 05:41:28 +0900 Subject: [PATCH 2/8] [chore] adjust @typescript-eslint/no-unused-vars lint config (#6798) --- package-lock.json | 5 +++-- package.json | 2 +- test/runtime/samples/$$slot/_config.js | 2 +- .../action-custom-event-handler-node-context/_config.js | 2 +- .../samples/action-custom-event-handler-this/_config.js | 2 +- .../action-custom-event-handler-with-context/_config.js | 2 +- test/runtime/samples/action-function/_config.js | 2 +- test/runtime/samples/action-object-deep/_config.js | 2 +- test/runtime/samples/action-object/_config.js | 2 +- .../samples/action-receives-element-mounted/_config.js | 2 +- test/runtime/samples/action-ternary-template/_config.js | 2 +- test/runtime/samples/action-this/_config.js | 2 +- test/runtime/samples/animation-js-delay/_config.js | 2 +- test/runtime/samples/animation-js-easing/_config.js | 2 +- test/runtime/samples/animation-js/_config.js | 2 +- test/runtime/samples/apply-directives-in-order-2/_config.js | 2 +- test/runtime/samples/apply-directives-in-order/_config.js | 2 +- test/runtime/samples/attribute-boolean-false/_config.js | 2 +- test/runtime/samples/attribute-boolean-true/_config.js | 2 +- test/runtime/samples/attribute-namespaced/_config.js | 2 +- test/runtime/samples/attribute-static-boolean/_config.js | 2 +- test/runtime/samples/await-conservative-update/_config.js | 2 +- test/runtime/samples/await-in-each/_config.js | 2 +- test/runtime/samples/await-then-catch-order/_config.js | 2 +- test/runtime/samples/await-then-catch-static/_config.js | 2 +- test/runtime/samples/await-then-destruct-array/_config.js | 2 +- test/runtime/samples/await-then-destruct-default/_config.js | 2 +- test/runtime/samples/await-then-destruct-object/_config.js | 2 +- test/runtime/samples/await-then-destruct-rest/_config.js | 2 +- test/runtime/samples/await-then-if/_config.js | 4 ++-- .../samples/binding-input-group-duplicate-value/_config.js | 2 +- test/runtime/samples/binding-input-group-each-6/_config.js | 2 +- test/runtime/samples/binding-input-group-each-7/_config.js | 2 +- .../runtime/samples/binding-input-text-undefined/_config.js | 2 +- .../runtime/samples/binding-select-initial-value/_config.js | 2 +- test/runtime/samples/bitmask-overflow-if/_config.js | 2 +- test/runtime/samples/bitmask-overflow-slot-6/_config.js | 6 +++--- test/runtime/samples/class-shortcut-with-class/_config.js | 2 +- test/runtime/samples/class-shortcut/_config.js | 2 +- .../class-with-dynamic-attribute-and-spread/_config.js | 2 +- .../runtime/samples/class-with-dynamic-attribute/_config.js | 2 +- test/runtime/samples/class-with-spread-and-bind/_config.js | 2 +- test/runtime/samples/class-with-spread/_config.js | 2 +- test/runtime/samples/component-binding-accessors/_config.js | 2 +- .../runtime/samples/component-binding-blowback-b/_config.js | 2 +- .../component-binding-parent-supercedes-child-b/_config.js | 2 +- .../component-binding-parent-supercedes-child-c/_config.js | 2 +- .../samples/component-binding-private-state/_config.js | 2 +- .../samples/component-binding-reactive-statement/_config.js | 2 +- .../component-event-handler-contenteditable/_config.js | 2 +- test/runtime/samples/component-events-console/_config.js | 2 +- test/runtime/samples/component-nested-deep/_config.js | 2 +- test/runtime/samples/component-nested-deeper/_config.js | 2 +- .../samples/component-slot-attribute-order/_config.js | 2 +- test/runtime/samples/component-slot-dynamic/_config.js | 2 +- .../samples/component-slot-let-destructured-2/_config.js | 2 +- test/runtime/samples/component-slot-nested-if/_config.js | 2 +- .../component-svelte-slot-let-destructured-2/_config.js | 2 +- test/runtime/samples/component-yield-placement/_config.js | 2 +- test/runtime/samples/css-comments/_config.js | 2 +- test/runtime/samples/css-false/_config.js | 2 +- test/runtime/samples/css-space-in-attribute/_config.js | 2 +- test/runtime/samples/css/_config.js | 2 +- test/runtime/samples/destroy-twice/_config.js | 2 +- .../samples/dynamic-component-destroy-null/_config.js | 2 +- .../samples/each-block-keyed-component-action/_config.js | 2 +- test/runtime/samples/each-block-keyed-dynamic-2/_config.js | 2 +- test/runtime/samples/each-blocks-assignment-2/_config.js | 2 +- test/runtime/samples/each-blocks-assignment/_config.js | 4 ++-- test/runtime/samples/each-blocks-nested-b/_config.js | 2 +- test/runtime/samples/each-blocks-nested/_config.js | 5 ++--- test/runtime/samples/element-source-location/_config.js | 2 +- test/runtime/samples/event-handler-console-log/_config.js | 2 +- test/runtime/samples/event-handler-destructured/_config.js | 2 +- .../samples/event-handler-dynamic-bound-var/_config.js | 2 +- .../samples/event-handler-dynamic-expression/_config.js | 6 +++--- test/runtime/samples/event-handler-dynamic-hash/_config.js | 2 +- .../samples/event-handler-dynamic-invalid/_config.js | 2 +- test/runtime/samples/event-handler-dynamic/_config.js | 2 +- test/runtime/samples/event-handler-each/_config.js | 2 +- test/runtime/samples/event-handler-sanitize/_config.js | 2 +- test/runtime/samples/event-handler-this-methods/_config.js | 2 +- test/runtime/samples/event-handler/_config.js | 2 +- test/runtime/samples/globals-accessible-directly/_config.js | 2 +- test/runtime/samples/head-if-else-block/_config.js | 2 +- test/runtime/samples/head-title-dynamic-simple/_config.js | 2 +- test/runtime/samples/head-title-dynamic/_config.js | 2 +- test/runtime/samples/head-title-static/_config.js | 2 +- test/runtime/samples/if-block-outro-nested-else/_config.js | 2 +- .../samples/instrumentation-script-destructuring/_config.js | 2 +- .../samples/instrumentation-script-loop-scope/_config.js | 2 +- .../samples/instrumentation-script-update/_config.js | 2 +- .../instrumentation-template-destructuring/_config.js | 2 +- .../samples/instrumentation-template-loop-scope/_config.js | 2 +- .../samples/instrumentation-template-update/_config.js | 2 +- test/runtime/samples/key-block-2/_config.js | 2 +- test/runtime/samples/key-block-3/_config.js | 2 +- test/runtime/samples/key-block-array-immutable/_config.js | 2 +- test/runtime/samples/key-block-array/_config.js | 2 +- test/runtime/samples/key-block-expression-2/_config.js | 2 +- test/runtime/samples/key-block-expression/_config.js | 2 +- test/runtime/samples/key-block-static-if/_config.js | 2 +- test/runtime/samples/key-block-static/_config.js | 2 +- test/runtime/samples/key-block-transition/_config.js | 4 ++-- test/runtime/samples/key-block/_config.js | 4 ++-- .../samples/lifecycle-render-order-for-children/_config.js | 2 +- test/runtime/samples/nbsp-div/_config.js | 2 +- test/runtime/samples/nbsp/_config.js | 2 +- .../samples/nested-transition-detach-each/_config.js | 2 +- .../samples/props-reactive-only-with-change/_config.js | 2 +- test/runtime/samples/props-reactive-slot/_config.js | 2 +- .../_config.js | 2 +- .../samples/reactive-function-called-reassigned/_config.js | 2 +- test/runtime/samples/reactive-values-exported/_config.js | 2 +- test/runtime/samples/reactive-values-fixed/_config.js | 2 +- .../runtime/samples/reactive-values-second-order/_config.js | 2 +- test/runtime/samples/select-bind-in-array/_config.js | 2 +- test/runtime/samples/select-no-whitespace/_config.js | 2 +- test/runtime/samples/select-props/_config.js | 2 +- test/runtime/samples/set-after-destroy/_config.js | 2 +- .../samples/set-in-onstate-dedupes-renders/_config.js | 2 +- test/runtime/samples/spread-component-with-bind/_config.js | 2 +- .../_config.js | 2 +- test/runtime/samples/spread-element-input-select/_config.js | 2 +- .../samples/spread-element-input-value-undefined/_config.js | 2 +- .../spread-element-select-value-undefined/_config.js | 2 +- .../samples/store-assignment-updates-property/_config.js | 2 +- .../_config.js | 2 +- test/runtime/samples/store-contextual/_config.js | 2 +- .../samples/store-invalidation-while-update-1/_config.js | 4 ++-- .../samples/store-invalidation-while-update-2/_config.js | 4 ++-- test/runtime/samples/svg-attributes/_config.js | 2 +- test/runtime/samples/svg-class/_config.js | 2 +- test/runtime/samples/svg-each-block-namespace/_config.js | 2 +- test/runtime/samples/svg-no-whitespace/_config.js | 2 +- test/runtime/samples/svg-xlink/_config.js | 2 +- test/runtime/samples/target-dom-detached/_config.js | 2 +- test/runtime/samples/target-dom/_config.js | 2 +- test/runtime/samples/target-shadow-dom/_config.js | 2 +- test/runtime/samples/template/_config.js | 2 +- test/runtime/samples/transition-abort/_config.js | 2 +- .../samples/transition-css-deferred-removal/_config.js | 2 +- test/runtime/samples/transition-css-duration/_config.js | 2 +- test/runtime/samples/transition-css-iframe/_config.js | 2 +- .../samples/transition-css-in-out-in-with-param/_config.js | 2 +- test/runtime/samples/transition-css-in-out-in/_config.js | 2 +- test/runtime/samples/transition-js-args-dynamic/_config.js | 2 +- test/runtime/samples/transition-js-args/_config.js | 2 +- test/runtime/samples/transition-js-context/_config.js | 2 +- test/runtime/samples/transition-js-delay-in-out/_config.js | 2 +- test/runtime/samples/transition-js-delay/_config.js | 2 +- .../samples/transition-js-destroyed-before-end/_config.js | 2 +- .../samples/transition-js-dynamic-component/_config.js | 2 +- .../samples/transition-js-each-block-intro-outro/_config.js | 2 +- .../samples/transition-js-each-block-intro/_config.js | 2 +- .../transition-js-each-block-keyed-intro-outro/_config.js | 2 +- .../samples/transition-js-each-block-keyed-intro/_config.js | 2 +- .../samples/transition-js-each-block-keyed-outro/_config.js | 2 +- .../samples/transition-js-each-block-outro/_config.js | 2 +- .../transition-js-each-else-block-intro-outro/_config.js | 2 +- .../samples/transition-js-each-else-block-intro/_config.js | 2 +- .../samples/transition-js-each-else-block-outro/_config.js | 2 +- .../samples/transition-js-each-keyed-unchanged/_config.js | 2 +- .../runtime/samples/transition-js-each-unchanged/_config.js | 2 +- test/runtime/samples/transition-js-if-block-bidi/_config.js | 2 +- .../transition-js-if-block-in-each-block-bidi-2/_config.js | 2 +- .../transition-js-if-block-in-each-block-bidi/_config.js | 2 +- .../samples/transition-js-if-block-intro-outro/_config.js | 2 +- .../transition-js-if-else-block-dynamic-outro/_config.js | 2 +- .../_config.js | 2 +- .../samples/transition-js-if-else-block-outro/_config.js | 2 +- .../samples/transition-js-if-elseif-block-outro/_config.js | 2 +- test/runtime/samples/transition-js-initial/_config.js | 2 +- .../transition-js-intro-enabled-by-option/_config.js | 2 +- .../_config.js | 2 +- .../transition-js-intro-skipped-by-default/_config.js | 2 +- test/runtime/samples/transition-js-local/_config.js | 2 +- test/runtime/samples/transition-js-nested-await/_config.js | 2 +- .../samples/transition-js-nested-component/_config.js | 2 +- .../samples/transition-js-nested-each-keyed-2/_config.js | 2 +- .../samples/transition-js-nested-each-keyed/_config.js | 2 +- test/runtime/samples/transition-js-nested-if/_config.js | 2 +- test/runtime/samples/transition-js-nested-intro/_config.js | 2 +- .../transition-js-parameterised-with-state/_config.js | 2 +- test/runtime/samples/transition-js-parameterised/_config.js | 2 +- test/runtime/samples/transition-js-slot-2/_config.js | 2 +- test/runtime/samples/transition-js-slot-3/_config.js | 2 +- .../samples/transition-js-slot-4-cancelled/_config.js | 2 +- .../transition-js-slot-5-cancelled-overflow/_config.js | 2 +- .../transition-js-slot-6-spread-cancelled/_config.js | 2 +- .../_config.js | 2 +- test/runtime/samples/transition-js-slot-fallback/_config.js | 2 +- test/runtime/samples/transition-js-slot/_config.js | 2 +- test/runtime/samples/whitespace-each-block/_config.js | 2 +- test/runtime/samples/whitespace-list/_config.js | 2 +- test/runtime/samples/whitespace-normal/_config.js | 2 +- test/runtime/samples/window-bind-scroll-update/_config.js | 2 +- test/runtime/samples/window-binding-resize/_config.js | 2 +- test/runtime/samples/window-binding-scroll-store/_config.js | 2 +- test/runtime/samples/window-event-custom/_config.js | 2 +- test/runtime/samples/window-event/_config.js | 2 +- 201 files changed, 214 insertions(+), 214 deletions(-) diff --git a/package-lock.json b/package-lock.json index fffe3c5df3..872f3c61ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "svelte", "version": "3.43.1", "license": "MIT", "devDependencies": { @@ -16,7 +17,7 @@ "@rollup/plugin-sucrase": "^3.1.0", "@rollup/plugin-typescript": "^2.0.1", "@rollup/plugin-virtual": "^2.0.0", - "@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.7.0", + "@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.8.0", "@types/mocha": "^7.0.0", "@types/node": "^8.10.53", "@typescript-eslint/eslint-plugin": "^4.31.2", @@ -5804,7 +5805,7 @@ "@sveltejs/eslint-config": { "version": "git+ssh://git@github.com/sveltejs/eslint-config.git#31fd4faeea88990069502460b023698b1c9c2d13", "dev": true, - "from": "@sveltejs/eslint-config@github:sveltejs/eslint-config#v5.7.0" + "from": "@sveltejs/eslint-config@github:sveltejs/eslint-config#v5.8.0" }, "@tootallnate/once": { "version": "1.0.0", diff --git a/package.json b/package.json index 997b54b5d3..5b67d2c541 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "@rollup/plugin-sucrase": "^3.1.0", "@rollup/plugin-typescript": "^2.0.1", "@rollup/plugin-virtual": "^2.0.0", - "@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.7.0", + "@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.8.0", "@types/mocha": "^7.0.0", "@types/node": "^8.10.53", "@typescript-eslint/eslint-plugin": "^4.31.2", diff --git a/test/runtime/samples/$$slot/_config.js b/test/runtime/samples/$$slot/_config.js index 13b2137cdb..46e435ae97 100644 --- a/test/runtime/samples/$$slot/_config.js +++ b/test/runtime/samples/$$slot/_config.js @@ -11,7 +11,7 @@ export default {
hello world
`, - async test({ assert, target, component }) { + async test({ assert, component }) { assert.equal(component.getA(), ''); assert.equal(component.getB(), 'foo'); } diff --git a/test/runtime/samples/action-custom-event-handler-node-context/_config.js b/test/runtime/samples/action-custom-event-handler-node-context/_config.js index ea94abe9b3..9a5d0d5f82 100644 --- a/test/runtime/samples/action-custom-event-handler-node-context/_config.js +++ b/test/runtime/samples/action-custom-event-handler-node-context/_config.js @@ -3,7 +3,7 @@ export default { html: '', - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const event = new window.MouseEvent('click'); const button = target.querySelector('button'); diff --git a/test/runtime/samples/action-custom-event-handler-this/_config.js b/test/runtime/samples/action-custom-event-handler-this/_config.js index ec3fa373eb..29c2059d9f 100644 --- a/test/runtime/samples/action-custom-event-handler-this/_config.js +++ b/test/runtime/samples/action-custom-event-handler-this/_config.js @@ -1,7 +1,7 @@ export default { html: '', - test({ assert, component, target, window }) { + test({ assert, target, window }) { const input = target.querySelector('input'); const event = new window.KeyboardEvent('keydown', { key: 'Enter' diff --git a/test/runtime/samples/action-custom-event-handler-with-context/_config.js b/test/runtime/samples/action-custom-event-handler-with-context/_config.js index 104ec27503..41ea15151a 100644 --- a/test/runtime/samples/action-custom-event-handler-with-context/_config.js +++ b/test/runtime/samples/action-custom-event-handler-with-context/_config.js @@ -1,7 +1,7 @@ export default { html: '', - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const event = new window.MouseEvent('click', { clientX: 42, clientY: 42 diff --git a/test/runtime/samples/action-function/_config.js b/test/runtime/samples/action-function/_config.js index 07b4087dcc..6aa972f1a8 100644 --- a/test/runtime/samples/action-function/_config.js +++ b/test/runtime/samples/action-function/_config.js @@ -3,7 +3,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelector('button'); const eventEnter = new window.MouseEvent('mouseenter'); const eventLeave = new window.MouseEvent('mouseleave'); diff --git a/test/runtime/samples/action-object-deep/_config.js b/test/runtime/samples/action-object-deep/_config.js index 7fdc11af2b..ce4981c568 100644 --- a/test/runtime/samples/action-object-deep/_config.js +++ b/test/runtime/samples/action-object-deep/_config.js @@ -2,7 +2,7 @@ export default { html: ` `, - async test({ assert, target, window }) { + async test({ assert, target }) { assert.equal(target.querySelector('button').foo, 'bar1337'); } }; diff --git a/test/runtime/samples/action-object/_config.js b/test/runtime/samples/action-object/_config.js index 7fdc11af2b..ce4981c568 100644 --- a/test/runtime/samples/action-object/_config.js +++ b/test/runtime/samples/action-object/_config.js @@ -2,7 +2,7 @@ export default { html: ` `, - async test({ assert, target, window }) { + async test({ assert, target }) { assert.equal(target.querySelector('button').foo, 'bar1337'); } }; diff --git a/test/runtime/samples/action-receives-element-mounted/_config.js b/test/runtime/samples/action-receives-element-mounted/_config.js index 0806d0fa90..c6f3fcd89f 100644 --- a/test/runtime/samples/action-receives-element-mounted/_config.js +++ b/test/runtime/samples/action-receives-element-mounted/_config.js @@ -2,7 +2,7 @@ const result = {}; export default { props: { result }, - async test({ assert, component, target, window }) { + async test({ assert }) { assert.notEqual(result.parentElement, null); } }; diff --git a/test/runtime/samples/action-ternary-template/_config.js b/test/runtime/samples/action-ternary-template/_config.js index ecb18dceec..8e5e8e2236 100644 --- a/test/runtime/samples/action-ternary-template/_config.js +++ b/test/runtime/samples/action-ternary-template/_config.js @@ -8,7 +8,7 @@ export default {

`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const header = target.querySelector('h1'); const click = new window.MouseEvent('click'); diff --git a/test/runtime/samples/action-this/_config.js b/test/runtime/samples/action-this/_config.js index 933ce993b9..85cb917d96 100644 --- a/test/runtime/samples/action-this/_config.js +++ b/test/runtime/samples/action-this/_config.js @@ -1,5 +1,5 @@ export default { - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelector('button'); const click = new window.MouseEvent('click'); diff --git a/test/runtime/samples/animation-js-delay/_config.js b/test/runtime/samples/animation-js-delay/_config.js index 2cee51121f..d7eba13bd4 100644 --- a/test/runtime/samples/animation-js-delay/_config.js +++ b/test/runtime/samples/animation-js-delay/_config.js @@ -17,7 +17,7 @@ export default {
e
`, - test({ assert, component, target, window, raf }) { + test({ assert, component, window, raf }) { let divs = window.document.querySelectorAll('div'); divs.forEach(div => { div.getBoundingClientRect = function() { diff --git a/test/runtime/samples/animation-js-easing/_config.js b/test/runtime/samples/animation-js-easing/_config.js index e466309f57..9cbb77275a 100644 --- a/test/runtime/samples/animation-js-easing/_config.js +++ b/test/runtime/samples/animation-js-easing/_config.js @@ -17,7 +17,7 @@ export default {
e
`, - test({ assert, component, target, window, raf }) { + test({ assert, component, raf }) { let divs = document.querySelectorAll('div'); divs.forEach(div => { div.getBoundingClientRect = function() { diff --git a/test/runtime/samples/animation-js/_config.js b/test/runtime/samples/animation-js/_config.js index 5c5e874b3e..64373d08a3 100644 --- a/test/runtime/samples/animation-js/_config.js +++ b/test/runtime/samples/animation-js/_config.js @@ -17,7 +17,7 @@ export default {
e
`, - test({ assert, component, target, window, raf }) { + test({ assert, component, raf }) { let divs = document.querySelectorAll('div'); divs.forEach(div => { div.getBoundingClientRect = function() { diff --git a/test/runtime/samples/apply-directives-in-order-2/_config.js b/test/runtime/samples/apply-directives-in-order-2/_config.js index caff97a5b9..6072a18b27 100644 --- a/test/runtime/samples/apply-directives-in-order-2/_config.js +++ b/test/runtime/samples/apply-directives-in-order-2/_config.js @@ -4,7 +4,7 @@ export default { value }, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const inputs = target.querySelectorAll('input'); const event = new window.Event('input'); diff --git a/test/runtime/samples/apply-directives-in-order/_config.js b/test/runtime/samples/apply-directives-in-order/_config.js index 0c85c97f8b..2e057118b4 100644 --- a/test/runtime/samples/apply-directives-in-order/_config.js +++ b/test/runtime/samples/apply-directives-in-order/_config.js @@ -13,7 +13,7 @@ export default {

`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const input = target.querySelector('input'); const event = new window.Event('input'); diff --git a/test/runtime/samples/attribute-boolean-false/_config.js b/test/runtime/samples/attribute-boolean-false/_config.js index 935b709fab..e4aaabecaf 100644 --- a/test/runtime/samples/attribute-boolean-false/_config.js +++ b/test/runtime/samples/attribute-boolean-false/_config.js @@ -1,6 +1,6 @@ export default { html: '', - test({ assert, component, target }) { + test({ assert, target }) { const textarea = target.querySelector('textarea'); assert.ok(textarea.readOnly === false); } diff --git a/test/runtime/samples/attribute-boolean-true/_config.js b/test/runtime/samples/attribute-boolean-true/_config.js index ccc0814296..79c8ea1ad6 100644 --- a/test/runtime/samples/attribute-boolean-true/_config.js +++ b/test/runtime/samples/attribute-boolean-true/_config.js @@ -1,6 +1,6 @@ export default { html: '', - test({ assert, component, target }) { + test({ assert, target }) { const textarea = target.querySelector('textarea'); assert.ok(textarea.readOnly); } diff --git a/test/runtime/samples/attribute-namespaced/_config.js b/test/runtime/samples/attribute-namespaced/_config.js index 275a198219..f3a7f28a93 100644 --- a/test/runtime/samples/attribute-namespaced/_config.js +++ b/test/runtime/samples/attribute-namespaced/_config.js @@ -7,7 +7,7 @@ export default { `, - test({ assert, component, target }) { + test({ assert, target }) { const use = target.querySelector( 'use' ); assert.equal( use.getAttributeNS( 'http://www.w3.org/1999/xlink', 'href' ), '#bar' ); } diff --git a/test/runtime/samples/attribute-static-boolean/_config.js b/test/runtime/samples/attribute-static-boolean/_config.js index 3dba036319..2d31b26747 100644 --- a/test/runtime/samples/attribute-static-boolean/_config.js +++ b/test/runtime/samples/attribute-static-boolean/_config.js @@ -1,6 +1,6 @@ export default { html: '', - test({ assert, component, target }) { + test({ assert, target }) { const textarea = target.querySelector( 'textarea' ); assert.ok( textarea.readOnly ); } diff --git a/test/runtime/samples/await-conservative-update/_config.js b/test/runtime/samples/await-conservative-update/_config.js index 20a9448ebd..c548a400af 100644 --- a/test/runtime/samples/await-conservative-update/_config.js +++ b/test/runtime/samples/await-conservative-update/_config.js @@ -5,7 +5,7 @@ export default {

loading...

`, - test({ assert, component, target }) { + test({ assert, target }) { return sleep(50).then(() => { assert.htmlEqual(target.innerHTML, `

the answer is 42

diff --git a/test/runtime/samples/await-in-each/_config.js b/test/runtime/samples/await-in-each/_config.js index a648bbe38a..617194a95c 100644 --- a/test/runtime/samples/await-in-each/_config.js +++ b/test/runtime/samples/await-in-each/_config.js @@ -18,7 +18,7 @@ export default {

a title: loading...

`, - test({ assert, component, target }) { + test({ assert, target }) { fulfil(42); return thePromise diff --git a/test/runtime/samples/await-then-catch-order/_config.js b/test/runtime/samples/await-then-catch-order/_config.js index f972520904..29fc074162 100644 --- a/test/runtime/samples/await-then-catch-order/_config.js +++ b/test/runtime/samples/await-then-catch-order/_config.js @@ -13,7 +13,7 @@ export default {

loading...

true!

`, - test({ assert, component, target }) { + test({ assert, target }) { fulfil(42); return thePromise diff --git a/test/runtime/samples/await-then-catch-static/_config.js b/test/runtime/samples/await-then-catch-static/_config.js index 35fc865d44..6918986950 100644 --- a/test/runtime/samples/await-then-catch-static/_config.js +++ b/test/runtime/samples/await-then-catch-static/_config.js @@ -22,7 +22,7 @@ export default {

loaded

`); - promise = new Promise((f, r) => { + promise = new Promise((f, _) => { fulfil = f; }); diff --git a/test/runtime/samples/await-then-destruct-array/_config.js b/test/runtime/samples/await-then-destruct-array/_config.js index 55c48481e0..58a66a698d 100644 --- a/test/runtime/samples/await-then-destruct-array/_config.js +++ b/test/runtime/samples/await-then-destruct-array/_config.js @@ -1,6 +1,6 @@ export default { props: { - thePromise: new Promise(resolve => {}) + thePromise: new Promise(_ => {}) }, html: ` diff --git a/test/runtime/samples/await-then-destruct-default/_config.js b/test/runtime/samples/await-then-destruct-default/_config.js index d0e5a49f28..151f2c91f7 100644 --- a/test/runtime/samples/await-then-destruct-default/_config.js +++ b/test/runtime/samples/await-then-destruct-default/_config.js @@ -1,5 +1,5 @@ export default { - async test({ assert, component, target }) { + async test({ assert, target }) { await Promise.resolve(); assert.htmlEqual( diff --git a/test/runtime/samples/await-then-destruct-object/_config.js b/test/runtime/samples/await-then-destruct-object/_config.js index 7d08ad3711..47e8422cc4 100644 --- a/test/runtime/samples/await-then-destruct-object/_config.js +++ b/test/runtime/samples/await-then-destruct-object/_config.js @@ -1,6 +1,6 @@ export default { props: { - thePromise: new Promise(resolve => {}) + thePromise: new Promise(_ => {}) }, html: ` diff --git a/test/runtime/samples/await-then-destruct-rest/_config.js b/test/runtime/samples/await-then-destruct-rest/_config.js index 528568e569..0a7445b535 100644 --- a/test/runtime/samples/await-then-destruct-rest/_config.js +++ b/test/runtime/samples/await-then-destruct-rest/_config.js @@ -1,5 +1,5 @@ export default { - async test({ assert, component, target }) { + async test({ assert, target }) { await Promise.resolve(); assert.htmlEqual( diff --git a/test/runtime/samples/await-then-if/_config.js b/test/runtime/samples/await-then-if/_config.js index f9e81dd2cc..f29f5df0e5 100644 --- a/test/runtime/samples/await-then-if/_config.js +++ b/test/runtime/samples/await-then-if/_config.js @@ -13,11 +13,11 @@ export default { loading... `, - async test({ assert, component, target }) { + async test({ assert, target }) { fulfil([]); await thePromise; - + assert.htmlEqual(target.innerHTML, `

promise array is empty

`); diff --git a/test/runtime/samples/binding-input-group-duplicate-value/_config.js b/test/runtime/samples/binding-input-group-duplicate-value/_config.js index b5f3ae0115..db7dd84dee 100644 --- a/test/runtime/samples/binding-input-group-duplicate-value/_config.js +++ b/test/runtime/samples/binding-input-group-duplicate-value/_config.js @@ -17,7 +17,7 @@ export default { d
`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const inputs = target.querySelectorAll('input'); const p = target.querySelector('p'); diff --git a/test/runtime/samples/binding-input-group-each-6/_config.js b/test/runtime/samples/binding-input-group-each-6/_config.js index 4d280ed7ac..7fd1232a27 100644 --- a/test/runtime/samples/binding-input-group-each-6/_config.js +++ b/test/runtime/samples/binding-input-group-each-6/_config.js @@ -13,7 +13,7 @@ export default {

`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const inputs = target.querySelectorAll('input'); assert.equal(inputs[0].checked, false); assert.equal(inputs[1].checked, false); diff --git a/test/runtime/samples/binding-input-group-each-7/_config.js b/test/runtime/samples/binding-input-group-each-7/_config.js index 3063141983..7535001f67 100644 --- a/test/runtime/samples/binding-input-group-each-7/_config.js +++ b/test/runtime/samples/binding-input-group-each-7/_config.js @@ -20,7 +20,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const inputs = target.querySelectorAll('input'); const checked = new Set(); const checkInbox = async (i) => { diff --git a/test/runtime/samples/binding-input-text-undefined/_config.js b/test/runtime/samples/binding-input-text-undefined/_config.js index fa59b1f796..82cada3b15 100644 --- a/test/runtime/samples/binding-input-text-undefined/_config.js +++ b/test/runtime/samples/binding-input-text-undefined/_config.js @@ -7,7 +7,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { const input = target.querySelector('input'); assert.equal(input.value, ''); diff --git a/test/runtime/samples/binding-select-initial-value/_config.js b/test/runtime/samples/binding-select-initial-value/_config.js index 517107c4fb..5dbd761b61 100644 --- a/test/runtime/samples/binding-select-initial-value/_config.js +++ b/test/runtime/samples/binding-select-initial-value/_config.js @@ -15,7 +15,7 @@ export default { selected: 'b' }, - test({ assert, component, target }) { + test({ assert, target }) { const select = target.querySelector('select'); const options = [...target.querySelectorAll('option')]; diff --git a/test/runtime/samples/bitmask-overflow-if/_config.js b/test/runtime/samples/bitmask-overflow-if/_config.js index 49f48925c5..39ddc997fc 100644 --- a/test/runtime/samples/bitmask-overflow-if/_config.js +++ b/test/runtime/samples/bitmask-overflow-if/_config.js @@ -6,7 +6,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelector('button'); await button.dispatchEvent(new window.MouseEvent('click')); diff --git a/test/runtime/samples/bitmask-overflow-slot-6/_config.js b/test/runtime/samples/bitmask-overflow-slot-6/_config.js index 7cf7538b69..3bcf4b98e4 100644 --- a/test/runtime/samples/bitmask-overflow-slot-6/_config.js +++ b/test/runtime/samples/bitmask-overflow-slot-6/_config.js @@ -7,11 +7,11 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelectorAll('button')[1]; const div = target.querySelector('div'); await div.dispatchEvent(new window.MouseEvent('click')); - + assert.htmlEqual(target.innerHTML, `
@@ -19,7 +19,7 @@ export default {
`); - + await button.dispatchEvent(new window.MouseEvent('click')); assert.htmlEqual(target.innerHTML, `
diff --git a/test/runtime/samples/class-shortcut-with-class/_config.js b/test/runtime/samples/class-shortcut-with-class/_config.js index 6d647e8f9d..5f2f28555e 100644 --- a/test/runtime/samples/class-shortcut-with-class/_config.js +++ b/test/runtime/samples/class-shortcut-with-class/_config.js @@ -7,7 +7,7 @@ export default { html: '
', - test({ assert, component, target, window }) { + test({ assert, component, target }) { component.foo = false; assert.htmlEqual(target.innerHTML, ` diff --git a/test/runtime/samples/class-shortcut/_config.js b/test/runtime/samples/class-shortcut/_config.js index aba7e0e031..ac5be276b0 100644 --- a/test/runtime/samples/class-shortcut/_config.js +++ b/test/runtime/samples/class-shortcut/_config.js @@ -6,7 +6,7 @@ export default { html: '
', - test({ assert, component, target, window }) { + test({ assert, component, target }) { component.foo = false; assert.htmlEqual(target.innerHTML, ` diff --git a/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js b/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js index f704e9327f..0c357926e2 100644 --- a/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js +++ b/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js @@ -8,7 +8,7 @@ export default { html: '
', - test({ assert, component, target, window }) { + test({ assert, component, target }) { component.myClass = 'one'; component.attributes = { 'aria-label': 'Test' diff --git a/test/runtime/samples/class-with-dynamic-attribute/_config.js b/test/runtime/samples/class-with-dynamic-attribute/_config.js index 2be6500674..8e05c72065 100644 --- a/test/runtime/samples/class-with-dynamic-attribute/_config.js +++ b/test/runtime/samples/class-with-dynamic-attribute/_config.js @@ -5,7 +5,7 @@ export default { html: '
', - test({ assert, component, target, window }) { + test({ assert, component, target }) { component.myClass = 'one'; assert.htmlEqual(target.innerHTML, ` diff --git a/test/runtime/samples/class-with-spread-and-bind/_config.js b/test/runtime/samples/class-with-spread-and-bind/_config.js index 7b50502f34..d1f3503b6c 100644 --- a/test/runtime/samples/class-with-spread-and-bind/_config.js +++ b/test/runtime/samples/class-with-spread-and-bind/_config.js @@ -5,7 +5,7 @@ export default { html: '
', - test({ assert, component, target, window }) { + test({ assert, component, target }) { component.primary = true; assert.htmlEqual( diff --git a/test/runtime/samples/class-with-spread/_config.js b/test/runtime/samples/class-with-spread/_config.js index c7c85e38b0..d49b3f053e 100644 --- a/test/runtime/samples/class-with-spread/_config.js +++ b/test/runtime/samples/class-with-spread/_config.js @@ -8,7 +8,7 @@ export default { html: '
', - test({ assert, component, target, window }) { + test({ assert, component, target }) { component.myClass = 'one'; component.attributes = { 'aria-label': 'Test' diff --git a/test/runtime/samples/component-binding-accessors/_config.js b/test/runtime/samples/component-binding-accessors/_config.js index 0fb83df870..4513b43a0b 100644 --- a/test/runtime/samples/component-binding-accessors/_config.js +++ b/test/runtime/samples/component-binding-accessors/_config.js @@ -1,5 +1,5 @@ export default { - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const [input1, input2] = target.querySelectorAll('input'); assert.equal(input1.value, 'something'); assert.equal(input2.value, 'something'); diff --git a/test/runtime/samples/component-binding-blowback-b/_config.js b/test/runtime/samples/component-binding-blowback-b/_config.js index 69af7917ca..2f6350c4fb 100644 --- a/test/runtime/samples/component-binding-blowback-b/_config.js +++ b/test/runtime/samples/component-binding-blowback-b/_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-binding-parent-supercedes-child-b/_config.js b/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js index bf6312f5ad..4e31a4d79c 100644 --- a/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js +++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js @@ -4,7 +4,7 @@ export default {

x in parent: yes

`, - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { component.a = false; assert.htmlEqual(target.innerHTML, ` 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 index bf6312f5ad..4e31a4d79c 100644 --- a/test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js +++ b/test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js @@ -4,7 +4,7 @@ export default {

x in parent: yes

`, - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { component.a = false; assert.htmlEqual(target.innerHTML, ` diff --git a/test/runtime/samples/component-binding-private-state/_config.js b/test/runtime/samples/component-binding-private-state/_config.js index bd8a25d490..f4f2fd6f83 100644 --- a/test/runtime/samples/component-binding-private-state/_config.js +++ b/test/runtime/samples/component-binding-private-state/_config.js @@ -4,7 +4,7 @@ export default {

x in parent: undefined

`, - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { component.a = false; assert.htmlEqual(target.innerHTML, ` diff --git a/test/runtime/samples/component-binding-reactive-statement/_config.js b/test/runtime/samples/component-binding-reactive-statement/_config.js index 49342d0645..8b8d091c73 100644 --- a/test/runtime/samples/component-binding-reactive-statement/_config.js +++ b/test/runtime/samples/component-binding-reactive-statement/_config.js @@ -4,7 +4,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const event = new window.MouseEvent('click'); const buttons = target.querySelectorAll('button'); diff --git a/test/runtime/samples/component-event-handler-contenteditable/_config.js b/test/runtime/samples/component-event-handler-contenteditable/_config.js index 3a85734975..1628e22d01 100644 --- a/test/runtime/samples/component-event-handler-contenteditable/_config.js +++ b/test/runtime/samples/component-event-handler-contenteditable/_config.js @@ -3,7 +3,7 @@ export default {
`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const div = target.querySelector('div'); const text = window.document.createTextNode('a'); div.insertBefore(text, null); diff --git a/test/runtime/samples/component-events-console/_config.js b/test/runtime/samples/component-events-console/_config.js index 39ccbd719f..fc3b4daa85 100644 --- a/test/runtime/samples/component-events-console/_config.js +++ b/test/runtime/samples/component-events-console/_config.js @@ -1,7 +1,7 @@ export default { html: '', - test({ assert, component, target }) { + test({ assert, target }) { const button = target.querySelector('button'); const messages = []; diff --git a/test/runtime/samples/component-nested-deep/_config.js b/test/runtime/samples/component-nested-deep/_config.js index 0114e79223..3d5305529e 100644 --- a/test/runtime/samples/component-nested-deep/_config.js +++ b/test/runtime/samples/component-nested-deep/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component }) { + test({ component }) { component.l1.$destroy(); } }; diff --git a/test/runtime/samples/component-nested-deeper/_config.js b/test/runtime/samples/component-nested-deeper/_config.js index 86993b3e9a..828a3169ac 100644 --- a/test/runtime/samples/component-nested-deeper/_config.js +++ b/test/runtime/samples/component-nested-deeper/_config.js @@ -3,7 +3,7 @@ export default { values: [1, 2, 3, 4] }, - test({ assert, component }) { + test({ component }) { component.values = [2, 3]; } }; diff --git a/test/runtime/samples/component-slot-attribute-order/_config.js b/test/runtime/samples/component-slot-attribute-order/_config.js index 54dc21c446..f4572317ca 100644 --- a/test/runtime/samples/component-slot-attribute-order/_config.js +++ b/test/runtime/samples/component-slot-attribute-order/_config.js @@ -4,7 +4,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const [btn, btn1, btn2] = target.querySelectorAll('button'); await btn.dispatchEvent(new window.MouseEvent('click')); diff --git a/test/runtime/samples/component-slot-dynamic/_config.js b/test/runtime/samples/component-slot-dynamic/_config.js index 9e43ff15fe..9a6ed1a057 100644 --- a/test/runtime/samples/component-slot-dynamic/_config.js +++ b/test/runtime/samples/component-slot-dynamic/_config.js @@ -3,7 +3,7 @@ export default {

override default slot

`, - test({ assert, component }) { + test({ component }) { component.nested.foo = 'b'; } }; diff --git a/test/runtime/samples/component-slot-let-destructured-2/_config.js b/test/runtime/samples/component-slot-let-destructured-2/_config.js index 38b04b7b5e..e407dcf2f8 100644 --- a/test/runtime/samples/component-slot-let-destructured-2/_config.js +++ b/test/runtime/samples/component-slot-let-destructured-2/_config.js @@ -13,7 +13,7 @@ export default {
`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const [button1, button2, button3] = target.querySelectorAll('button'); const event = new window.MouseEvent('click'); diff --git a/test/runtime/samples/component-slot-nested-if/_config.js b/test/runtime/samples/component-slot-nested-if/_config.js index 45c570fc22..e4af352970 100644 --- a/test/runtime/samples/component-slot-nested-if/_config.js +++ b/test/runtime/samples/component-slot-nested-if/_config.js @@ -2,7 +2,7 @@ export default { html: ` `, - async test({ assert, target, snapshot, component, window }) { + async test({ assert, target, window }) { const input = target.querySelector('input'); input.value = 'a'; diff --git a/test/runtime/samples/component-svelte-slot-let-destructured-2/_config.js b/test/runtime/samples/component-svelte-slot-let-destructured-2/_config.js index 38b04b7b5e..e407dcf2f8 100644 --- a/test/runtime/samples/component-svelte-slot-let-destructured-2/_config.js +++ b/test/runtime/samples/component-svelte-slot-let-destructured-2/_config.js @@ -13,7 +13,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const [button1, button2, button3] = target.querySelectorAll('button'); const event = new window.MouseEvent('click'); diff --git a/test/runtime/samples/component-yield-placement/_config.js b/test/runtime/samples/component-yield-placement/_config.js index eaa600b07d..089b3ce752 100644 --- a/test/runtime/samples/component-yield-placement/_config.js +++ b/test/runtime/samples/component-yield-placement/_config.js @@ -12,7 +12,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelector('button'); const click = new window.MouseEvent('click'); diff --git a/test/runtime/samples/css-comments/_config.js b/test/runtime/samples/css-comments/_config.js index 7f11f792c7..baf571fcd1 100644 --- a/test/runtime/samples/css-comments/_config.js +++ b/test/runtime/samples/css-comments/_config.js @@ -1,6 +1,6 @@ // JSDOM makes this test pass when it should fail. weird export default { - test({ assert, component, target, window }) { + test({ assert, target, window }) { const p = target.querySelector( 'p' ); assert.equal( window.getComputedStyle( p ).color, 'red' ); } diff --git a/test/runtime/samples/css-false/_config.js b/test/runtime/samples/css-false/_config.js index 2ade2acf83..320efce35b 100644 --- a/test/runtime/samples/css-false/_config.js +++ b/test/runtime/samples/css-false/_config.js @@ -3,7 +3,7 @@ export default { css: false }, - test({ assert, component, target, window }) { + test({ assert, target, window }) { const [ control, test ] = target.querySelectorAll( 'p' ); assert.equal( window.getComputedStyle( control ).color, '' ); diff --git a/test/runtime/samples/css-space-in-attribute/_config.js b/test/runtime/samples/css-space-in-attribute/_config.js index dc931217fc..c88f72cafa 100644 --- a/test/runtime/samples/css-space-in-attribute/_config.js +++ b/test/runtime/samples/css-space-in-attribute/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window }) { + test({ assert, target, window }) { const [ control, test ] = target.querySelectorAll( 'p' ); assert.equal( window.getComputedStyle( control ).color, '' ); diff --git a/test/runtime/samples/css/_config.js b/test/runtime/samples/css/_config.js index c4500e7441..6119af94de 100644 --- a/test/runtime/samples/css/_config.js +++ b/test/runtime/samples/css/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window }) { + test({ assert, target, window }) { const [control, test] = target.querySelectorAll('p'); assert.equal(window.getComputedStyle(control).color, ''); diff --git a/test/runtime/samples/destroy-twice/_config.js b/test/runtime/samples/destroy-twice/_config.js index 1279b2315d..39f6cdcd57 100644 --- a/test/runtime/samples/destroy-twice/_config.js +++ b/test/runtime/samples/destroy-twice/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component }) { + test({ component }) { component.$destroy(); component.$destroy(); } diff --git a/test/runtime/samples/dynamic-component-destroy-null/_config.js b/test/runtime/samples/dynamic-component-destroy-null/_config.js index 00f7d47d0f..c9bc1a05c0 100644 --- a/test/runtime/samples/dynamic-component-destroy-null/_config.js +++ b/test/runtime/samples/dynamic-component-destroy-null/_config.js @@ -3,7 +3,7 @@ export default { x: true }, - test({ assert, component }) { + test({ component }) { component.x = false; } }; diff --git a/test/runtime/samples/each-block-keyed-component-action/_config.js b/test/runtime/samples/each-block-keyed-component-action/_config.js index a1afc44c93..af621330d3 100644 --- a/test/runtime/samples/each-block-keyed-component-action/_config.js +++ b/test/runtime/samples/each-block-keyed-component-action/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, raf }) { + test({ assert, component }) { assert.equal(component.count, 0); component.arr = ['2']; diff --git a/test/runtime/samples/each-block-keyed-dynamic-2/_config.js b/test/runtime/samples/each-block-keyed-dynamic-2/_config.js index e25083c751..0c28656f5f 100644 --- a/test/runtime/samples/each-block-keyed-dynamic-2/_config.js +++ b/test/runtime/samples/each-block-keyed-dynamic-2/_config.js @@ -5,7 +5,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelector('button'); const event = new window.MouseEvent('click'); diff --git a/test/runtime/samples/each-blocks-assignment-2/_config.js b/test/runtime/samples/each-blocks-assignment-2/_config.js index f69b4fe9f6..93f06956d0 100644 --- a/test/runtime/samples/each-blocks-assignment-2/_config.js +++ b/test/runtime/samples/each-blocks-assignment-2/_config.js @@ -3,7 +3,7 @@ export default { foo `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelector('button'); const clickEvent = new window.MouseEvent('click'); diff --git a/test/runtime/samples/each-blocks-assignment/_config.js b/test/runtime/samples/each-blocks-assignment/_config.js index b651e3e02b..5e22381e9e 100644 --- a/test/runtime/samples/each-blocks-assignment/_config.js +++ b/test/runtime/samples/each-blocks-assignment/_config.js @@ -8,7 +8,7 @@ export default { 3 `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { let [incrementBtn, ...buttons] = target.querySelectorAll('button'); const clickEvent = new window.MouseEvent('click'); @@ -92,6 +92,6 @@ export default { 8 ` - ); + ); } }; diff --git a/test/runtime/samples/each-blocks-nested-b/_config.js b/test/runtime/samples/each-blocks-nested-b/_config.js index 7b13d988b4..ab008b4249 100644 --- a/test/runtime/samples/each-blocks-nested-b/_config.js +++ b/test/runtime/samples/each-blocks-nested-b/_config.js @@ -29,7 +29,7 @@ export default { ] }, html: '

animals: aardvark

animals: buffalo

animals: chinchilla

countries: albania

countries: brazil

countries: china

people: alice

people: bob

people: carol

people: dave

', - test({ assert, component, target }) { + test() { // TODO } }; diff --git a/test/runtime/samples/each-blocks-nested/_config.js b/test/runtime/samples/each-blocks-nested/_config.js index 3318bc344d..04d9bd11c5 100644 --- a/test/runtime/samples/each-blocks-nested/_config.js +++ b/test/runtime/samples/each-blocks-nested/_config.js @@ -6,7 +6,6 @@ export default { html: '
a, 1
a, 2
a, 3
b, 1
b, 2
b, 3
c, 1
c, 2
c, 3
', - test({ assert, component, target }) { - // TODO - } + // TODO + test() {} }; diff --git a/test/runtime/samples/element-source-location/_config.js b/test/runtime/samples/element-source-location/_config.js index 101cc2cad1..be528d15eb 100644 --- a/test/runtime/samples/element-source-location/_config.js +++ b/test/runtime/samples/element-source-location/_config.js @@ -5,7 +5,7 @@ export default { dev: true }, - test({ assert, component, target }) { + test({ assert, target }) { const h1 = target.querySelector('h1'); const p = target.querySelector('p'); diff --git a/test/runtime/samples/event-handler-console-log/_config.js b/test/runtime/samples/event-handler-console-log/_config.js index 35e447c45b..289a84e44c 100644 --- a/test/runtime/samples/event-handler-console-log/_config.js +++ b/test/runtime/samples/event-handler-console-log/_config.js @@ -7,7 +7,7 @@ export default { `, - test({ assert, component, target, window }) { + test({ assert, target, window }) { const button = target.querySelector('button'); const event = new window.MouseEvent('click'); diff --git a/test/runtime/samples/event-handler-destructured/_config.js b/test/runtime/samples/event-handler-destructured/_config.js index b32fe76c0a..2c37a17c75 100644 --- a/test/runtime/samples/event-handler-destructured/_config.js +++ b/test/runtime/samples/event-handler-destructured/_config.js @@ -3,7 +3,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelector('button'); const event = new window.MouseEvent('click'); diff --git a/test/runtime/samples/event-handler-dynamic-bound-var/_config.js b/test/runtime/samples/event-handler-dynamic-bound-var/_config.js index c490db000a..fbbfee221d 100644 --- a/test/runtime/samples/event-handler-dynamic-bound-var/_config.js +++ b/test/runtime/samples/event-handler-dynamic-bound-var/_config.js @@ -3,7 +3,7 @@ export default { Hello World `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelector('button'); const event = new window.MouseEvent('click'); diff --git a/test/runtime/samples/event-handler-dynamic-expression/_config.js b/test/runtime/samples/event-handler-dynamic-expression/_config.js index f479c9cef2..f2c876cdeb 100644 --- a/test/runtime/samples/event-handler-dynamic-expression/_config.js +++ b/test/runtime/samples/event-handler-dynamic-expression/_config.js @@ -1,7 +1,7 @@ export default { html: '', - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const [button] = target.querySelectorAll( 'button' ); @@ -10,10 +10,10 @@ export default { await button.dispatchEvent(event); assert.htmlEqual(target.innerHTML, ''); - + await button.dispatchEvent(event); assert.htmlEqual(target.innerHTML, ''); - + await button.dispatchEvent(event); assert.htmlEqual(target.innerHTML, ''); } diff --git a/test/runtime/samples/event-handler-dynamic-hash/_config.js b/test/runtime/samples/event-handler-dynamic-hash/_config.js index 35f5fa103d..e98d0f6104 100644 --- a/test/runtime/samples/event-handler-dynamic-hash/_config.js +++ b/test/runtime/samples/event-handler-dynamic-hash/_config.js @@ -8,7 +8,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const [updateButton1, updateButton2, button] = target.querySelectorAll( 'button' ); diff --git a/test/runtime/samples/event-handler-dynamic-invalid/_config.js b/test/runtime/samples/event-handler-dynamic-invalid/_config.js index 0ed298c95a..beebd4459e 100644 --- a/test/runtime/samples/event-handler-dynamic-invalid/_config.js +++ b/test/runtime/samples/event-handler-dynamic-invalid/_config.js @@ -3,7 +3,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const [buttonUndef, buttonNull, buttonInvalid] = target.querySelectorAll( 'button' ); diff --git a/test/runtime/samples/event-handler-dynamic/_config.js b/test/runtime/samples/event-handler-dynamic/_config.js index 35f5fa103d..e98d0f6104 100644 --- a/test/runtime/samples/event-handler-dynamic/_config.js +++ b/test/runtime/samples/event-handler-dynamic/_config.js @@ -8,7 +8,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const [updateButton1, updateButton2, button] = target.querySelectorAll( 'button' ); diff --git a/test/runtime/samples/event-handler-each/_config.js b/test/runtime/samples/event-handler-each/_config.js index 281f6d0d7c..9c0407860e 100644 --- a/test/runtime/samples/event-handler-each/_config.js +++ b/test/runtime/samples/event-handler-each/_config.js @@ -15,7 +15,7 @@ export default {

selected: foo

`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const buttons = target.querySelectorAll('button'); const event = new window.MouseEvent('click'); diff --git a/test/runtime/samples/event-handler-sanitize/_config.js b/test/runtime/samples/event-handler-sanitize/_config.js index 9f16b14093..ddc15724a3 100644 --- a/test/runtime/samples/event-handler-sanitize/_config.js +++ b/test/runtime/samples/event-handler-sanitize/_config.js @@ -3,7 +3,7 @@ export default {
toggle
`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const div = target.querySelector('div'); const event = new window.MouseEvent('some-event'); diff --git a/test/runtime/samples/event-handler-this-methods/_config.js b/test/runtime/samples/event-handler-this-methods/_config.js index 8be56cf1a6..d7907f752d 100644 --- a/test/runtime/samples/event-handler-this-methods/_config.js +++ b/test/runtime/samples/event-handler-this-methods/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window }) { + test({ assert, target, window }) { // Click events don't focus elements in JSDOM – obviously they would // in real browsers. More realistically, you'd use this for e.g. // this.select(), but that's harder to test than this.focus() diff --git a/test/runtime/samples/event-handler/_config.js b/test/runtime/samples/event-handler/_config.js index 3a5ac7a18b..f142fc9daa 100644 --- a/test/runtime/samples/event-handler/_config.js +++ b/test/runtime/samples/event-handler/_config.js @@ -3,7 +3,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelector('button'); const event = new window.MouseEvent('click'); diff --git a/test/runtime/samples/globals-accessible-directly/_config.js b/test/runtime/samples/globals-accessible-directly/_config.js index ad010356c8..30e176ae1b 100644 --- a/test/runtime/samples/globals-accessible-directly/_config.js +++ b/test/runtime/samples/globals-accessible-directly/_config.js @@ -1,7 +1,7 @@ export default { html: '', - test({ assert, component, target }) { + test({ assert, target }) { assert.htmlEqual(target.innerHTML, 'NaN'); } }; diff --git a/test/runtime/samples/head-if-else-block/_config.js b/test/runtime/samples/head-if-else-block/_config.js index 7665bfe90b..64da6ff796 100644 --- a/test/runtime/samples/head-if-else-block/_config.js +++ b/test/runtime/samples/head-if-else-block/_config.js @@ -3,7 +3,7 @@ export default { condition: false }, - test({ assert, component, target, window }) { + test({ assert, component, window }) { assert.equal(window.document.title, ''); assert.equal(Boolean(window.document.getElementById('meta')), true); diff --git a/test/runtime/samples/head-title-dynamic-simple/_config.js b/test/runtime/samples/head-title-dynamic-simple/_config.js index cc2301a2f9..7a086419ee 100644 --- a/test/runtime/samples/head-title-dynamic-simple/_config.js +++ b/test/runtime/samples/head-title-dynamic-simple/_config.js @@ -3,7 +3,7 @@ export default { foo: 'A Title' }, - test({ assert, component, target, window }) { + test({ assert, component, window }) { assert.equal(window.document.title, 'A Title'); component.foo = 'Also A Title'; diff --git a/test/runtime/samples/head-title-dynamic/_config.js b/test/runtime/samples/head-title-dynamic/_config.js index 95d5f8debf..2555e55b8c 100644 --- a/test/runtime/samples/head-title-dynamic/_config.js +++ b/test/runtime/samples/head-title-dynamic/_config.js @@ -3,7 +3,7 @@ export default { adjective: 'custom' }, - test({ assert, component, target, window }) { + test({ assert, component, window }) { assert.equal(window.document.title, 'a custom title'); component.adjective = 'different'; diff --git a/test/runtime/samples/head-title-static/_config.js b/test/runtime/samples/head-title-static/_config.js index ee9a0316b5..184d04c092 100644 --- a/test/runtime/samples/head-title-static/_config.js +++ b/test/runtime/samples/head-title-static/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window }) { + test({ assert, window }) { assert.equal(window.document.title, 'changed'); } }; diff --git a/test/runtime/samples/if-block-outro-nested-else/_config.js b/test/runtime/samples/if-block-outro-nested-else/_config.js index 226116fe13..06b89ea723 100644 --- a/test/runtime/samples/if-block-outro-nested-else/_config.js +++ b/test/runtime/samples/if-block-outro-nested-else/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target }) { + test({ component }) { // Would cause "TypeError: Cannot read property 'o' of undefined" component.foo = false; } diff --git a/test/runtime/samples/instrumentation-script-destructuring/_config.js b/test/runtime/samples/instrumentation-script-destructuring/_config.js index 2b677a8b3a..b8ccf586ae 100644 --- a/test/runtime/samples/instrumentation-script-destructuring/_config.js +++ b/test/runtime/samples/instrumentation-script-destructuring/_config.js @@ -6,7 +6,7 @@ export default {

x: 0

`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const buttons = target.querySelectorAll('button'); const click = new window.MouseEvent('click'); diff --git a/test/runtime/samples/instrumentation-script-loop-scope/_config.js b/test/runtime/samples/instrumentation-script-loop-scope/_config.js index 069114c523..1b57ed1e72 100644 --- a/test/runtime/samples/instrumentation-script-loop-scope/_config.js +++ b/test/runtime/samples/instrumentation-script-loop-scope/_config.js @@ -4,7 +4,7 @@ export default {

x: 0

`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const buttons = target.querySelectorAll('button'); const click = new window.MouseEvent('click'); diff --git a/test/runtime/samples/instrumentation-script-update/_config.js b/test/runtime/samples/instrumentation-script-update/_config.js index 223904ad63..d662856a7b 100644 --- a/test/runtime/samples/instrumentation-script-update/_config.js +++ b/test/runtime/samples/instrumentation-script-update/_config.js @@ -4,7 +4,7 @@ export default {

x: 0

`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const buttons = target.querySelectorAll('button'); const click = new window.MouseEvent('click'); diff --git a/test/runtime/samples/instrumentation-template-destructuring/_config.js b/test/runtime/samples/instrumentation-template-destructuring/_config.js index 2b677a8b3a..b8ccf586ae 100644 --- a/test/runtime/samples/instrumentation-template-destructuring/_config.js +++ b/test/runtime/samples/instrumentation-template-destructuring/_config.js @@ -6,7 +6,7 @@ export default {

x: 0

`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const buttons = target.querySelectorAll('button'); const click = new window.MouseEvent('click'); diff --git a/test/runtime/samples/instrumentation-template-loop-scope/_config.js b/test/runtime/samples/instrumentation-template-loop-scope/_config.js index 069114c523..1b57ed1e72 100644 --- a/test/runtime/samples/instrumentation-template-loop-scope/_config.js +++ b/test/runtime/samples/instrumentation-template-loop-scope/_config.js @@ -4,7 +4,7 @@ export default {

x: 0

`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const buttons = target.querySelectorAll('button'); const click = new window.MouseEvent('click'); diff --git a/test/runtime/samples/instrumentation-template-update/_config.js b/test/runtime/samples/instrumentation-template-update/_config.js index 223904ad63..d662856a7b 100644 --- a/test/runtime/samples/instrumentation-template-update/_config.js +++ b/test/runtime/samples/instrumentation-template-update/_config.js @@ -4,7 +4,7 @@ export default {

x: 0

`, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const buttons = target.querySelectorAll('button'); const click = new window.MouseEvent('click'); diff --git a/test/runtime/samples/key-block-2/_config.js b/test/runtime/samples/key-block-2/_config.js index 9bbf1f199f..9bb7f17140 100644 --- a/test/runtime/samples/key-block-2/_config.js +++ b/test/runtime/samples/key-block-2/_config.js @@ -1,7 +1,7 @@ // with reactive content beside `key` export default { html: '
00
', - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { const div = target.querySelector('div'); component.reactive = 2; assert.htmlEqual(target.innerHTML, '
02
'); diff --git a/test/runtime/samples/key-block-3/_config.js b/test/runtime/samples/key-block-3/_config.js index 17b6146827..6a41869f9b 100644 --- a/test/runtime/samples/key-block-3/_config.js +++ b/test/runtime/samples/key-block-3/_config.js @@ -1,7 +1,7 @@ // key is not used in the template export default { html: '
', - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { const div = target.querySelector('div'); component.value = 5; diff --git a/test/runtime/samples/key-block-array-immutable/_config.js b/test/runtime/samples/key-block-array-immutable/_config.js index b1ffd6cd15..02823ec98a 100644 --- a/test/runtime/samples/key-block-array-immutable/_config.js +++ b/test/runtime/samples/key-block-array-immutable/_config.js @@ -1,6 +1,6 @@ export default { html: '
1
', - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { let div = target.querySelector('div'); await component.append(2); assert.htmlEqual(target.innerHTML, '
1
'); diff --git a/test/runtime/samples/key-block-array/_config.js b/test/runtime/samples/key-block-array/_config.js index 374175177d..6c22a03ed4 100644 --- a/test/runtime/samples/key-block-array/_config.js +++ b/test/runtime/samples/key-block-array/_config.js @@ -1,6 +1,6 @@ export default { html: '
1
', - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { let div = target.querySelector('div'); await component.append(2); assert.htmlEqual(target.innerHTML, '
1,2
'); diff --git a/test/runtime/samples/key-block-expression-2/_config.js b/test/runtime/samples/key-block-expression-2/_config.js index bab23d2a84..602a8364ee 100644 --- a/test/runtime/samples/key-block-expression-2/_config.js +++ b/test/runtime/samples/key-block-expression-2/_config.js @@ -1,6 +1,6 @@ export default { html: '
3
', - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { const div = target.querySelector('div'); await component.mutate(); diff --git a/test/runtime/samples/key-block-expression/_config.js b/test/runtime/samples/key-block-expression/_config.js index c04d55bd29..85de9f8e88 100644 --- a/test/runtime/samples/key-block-expression/_config.js +++ b/test/runtime/samples/key-block-expression/_config.js @@ -1,6 +1,6 @@ export default { html: '
000
', - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { let div = target.querySelector('div'); component.value = 2; assert.htmlEqual(target.innerHTML, '
200
'); diff --git a/test/runtime/samples/key-block-static-if/_config.js b/test/runtime/samples/key-block-static-if/_config.js index 2926ad7c24..2dfca9d8b6 100644 --- a/test/runtime/samples/key-block-static-if/_config.js +++ b/test/runtime/samples/key-block-static-if/_config.js @@ -5,7 +5,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const button = target.querySelector('button'); await button.dispatchEvent(new window.Event('click')); diff --git a/test/runtime/samples/key-block-static/_config.js b/test/runtime/samples/key-block-static/_config.js index 8323336615..8c327bcefd 100644 --- a/test/runtime/samples/key-block-static/_config.js +++ b/test/runtime/samples/key-block-static/_config.js @@ -1,6 +1,6 @@ export default { html: '
00
', - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { const div = target.querySelector('div'); component.anotherValue = 2; assert.htmlEqual(target.innerHTML, '
02
'); diff --git a/test/runtime/samples/key-block-transition/_config.js b/test/runtime/samples/key-block-transition/_config.js index 53de6b333c..d4bef20311 100644 --- a/test/runtime/samples/key-block-transition/_config.js +++ b/test/runtime/samples/key-block-transition/_config.js @@ -1,8 +1,8 @@ export default { html: '
0
', - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { component.value = 2; - + const [div1, div2] = target.querySelectorAll('div'); assert.htmlEqual(div1.outerHTML, '
0
'); diff --git a/test/runtime/samples/key-block/_config.js b/test/runtime/samples/key-block/_config.js index b25ca901f8..119c50e21d 100644 --- a/test/runtime/samples/key-block/_config.js +++ b/test/runtime/samples/key-block/_config.js @@ -1,6 +1,6 @@ export default { html: '
0
0
', - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { let [div1, div2] = target.querySelectorAll('div'); component.value = 5; @@ -8,7 +8,7 @@ export default { assert.notStrictEqual(div1, target.querySelectorAll('div')[0]); assert.strictEqual(div2, target.querySelectorAll('div')[1]); [div1, div2] = target.querySelectorAll('div'); - + component.reactive = 10; assert.htmlEqual(target.innerHTML, '
5
10
'); assert.strictEqual(div1, target.querySelectorAll('div')[0]); diff --git a/test/runtime/samples/lifecycle-render-order-for-children/_config.js b/test/runtime/samples/lifecycle-render-order-for-children/_config.js index b85c91d07f..32bc35d49c 100644 --- a/test/runtime/samples/lifecycle-render-order-for-children/_config.js +++ b/test/runtime/samples/lifecycle-render-order-for-children/_config.js @@ -5,7 +5,7 @@ export default { before_test() { order.length = 0; }, - test({ assert, component, target, compileOptions }) { + test({ assert, compileOptions }) { if (compileOptions.hydratable) { assert.deepEqual(order, [ '0: beforeUpdate', diff --git a/test/runtime/samples/nbsp-div/_config.js b/test/runtime/samples/nbsp-div/_config.js index 5ab7a7f04b..0d3264b720 100644 --- a/test/runtime/samples/nbsp-div/_config.js +++ b/test/runtime/samples/nbsp-div/_config.js @@ -3,7 +3,7 @@ export default {
 hello  
 hello   hello
`, - test({ assert, component, target }) { + test({ assert, target }) { const divList = target.querySelectorAll('div'); assert.equal( divList[0].textContent.charCodeAt( 0 ), 160 ); assert.equal( divList[1].textContent.charCodeAt( 0 ), 160 ); diff --git a/test/runtime/samples/nbsp/_config.js b/test/runtime/samples/nbsp/_config.js index 5cfbc4ca35..89fea253d2 100644 --- a/test/runtime/samples/nbsp/_config.js +++ b/test/runtime/samples/nbsp/_config.js @@ -1,7 +1,7 @@ export default { html: ' ', - test({ assert, component, target }) { + test({ assert, target }) { const text = target.querySelector( 'span' ).textContent; assert.equal( text.charCodeAt( 0 ), 160 ); } diff --git a/test/runtime/samples/nested-transition-detach-each/_config.js b/test/runtime/samples/nested-transition-detach-each/_config.js index 41d32e597c..8737cfa0fa 100644 --- a/test/runtime/samples/nested-transition-detach-each/_config.js +++ b/test/runtime/samples/nested-transition-detach-each/_config.js @@ -11,7 +11,7 @@ export default { dev: true }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; assert.htmlEqual(target.innerHTML, `
diff --git a/test/runtime/samples/props-reactive-only-with-change/_config.js b/test/runtime/samples/props-reactive-only-with-change/_config.js index dcf12868f9..8ed82fc8ec 100644 --- a/test/runtime/samples/props-reactive-only-with-change/_config.js +++ b/test/runtime/samples/props-reactive-only-with-change/_config.js @@ -11,7 +11,7 @@ export default { callbacks = []; }, - async test({ assert, component, target }) { + async test({ assert, component }) { assert.equal(callbacks.length, 2); assert.equal(JSON.stringify(callbacks), '["1","2"]'); diff --git a/test/runtime/samples/props-reactive-slot/_config.js b/test/runtime/samples/props-reactive-slot/_config.js index 266f0fc8a8..6129866605 100644 --- a/test/runtime/samples/props-reactive-slot/_config.js +++ b/test/runtime/samples/props-reactive-slot/_config.js @@ -4,7 +4,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const btn = target.querySelector('button'); const clickEvent = new window.MouseEvent('click'); diff --git a/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-3/_config.js b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-3/_config.js index 08a3435a4b..bc34b3893c 100644 --- a/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-3/_config.js +++ b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-3/_config.js @@ -5,7 +5,7 @@ export default { before_test() { store.reset(); }, - async test({ assert, target, component }) { + async test({ assert, target }) { store.set(42); await Promise.resolve(); diff --git a/test/runtime/samples/reactive-function-called-reassigned/_config.js b/test/runtime/samples/reactive-function-called-reassigned/_config.js index b4d50a3e84..3469c285af 100644 --- a/test/runtime/samples/reactive-function-called-reassigned/_config.js +++ b/test/runtime/samples/reactive-function-called-reassigned/_config.js @@ -12,7 +12,7 @@ export default { before_test() { called = 0; }, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { assert.equal(called, 1); const input = target.querySelector('input'); diff --git a/test/runtime/samples/reactive-values-exported/_config.js b/test/runtime/samples/reactive-values-exported/_config.js index 56220d3993..9f782835f3 100644 --- a/test/runtime/samples/reactive-values-exported/_config.js +++ b/test/runtime/samples/reactive-values-exported/_config.js @@ -7,7 +7,7 @@ export default {

1 1 1

`, - test({ assert, component, target }) { + test({ assert, component }) { assert.equal(component.y, 1); assert.equal(component.z, 1); diff --git a/test/runtime/samples/reactive-values-fixed/_config.js b/test/runtime/samples/reactive-values-fixed/_config.js index 58aee09c35..9f25b3e24e 100644 --- a/test/runtime/samples/reactive-values-fixed/_config.js +++ b/test/runtime/samples/reactive-values-fixed/_config.js @@ -3,7 +3,7 @@ export default {

4

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

4

`); diff --git a/test/runtime/samples/reactive-values-second-order/_config.js b/test/runtime/samples/reactive-values-second-order/_config.js index c1dee87e2c..c70fb0641c 100644 --- a/test/runtime/samples/reactive-values-second-order/_config.js +++ b/test/runtime/samples/reactive-values-second-order/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target }) { + test({ assert, component }) { assert.equal(component.qux, 2); component.foo = 2; diff --git a/test/runtime/samples/select-bind-in-array/_config.js b/test/runtime/samples/select-bind-in-array/_config.js index d104743d44..79c5641324 100644 --- a/test/runtime/samples/select-bind-in-array/_config.js +++ b/test/runtime/samples/select-bind-in-array/_config.js @@ -7,7 +7,7 @@ export default { items }, - test({ assert, component, target }) { + test({ assert, component }) { const items = component.items; assert.equal( items[0].id, 'a' ); diff --git a/test/runtime/samples/select-no-whitespace/_config.js b/test/runtime/samples/select-no-whitespace/_config.js index fbd4990317..b00b800033 100644 --- a/test/runtime/samples/select-no-whitespace/_config.js +++ b/test/runtime/samples/select-no-whitespace/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target }) { + test({ assert, target }) { const select = target.querySelector( 'select' ); assert.equal( select.childNodes.length, 3 ); } diff --git a/test/runtime/samples/select-props/_config.js b/test/runtime/samples/select-props/_config.js index 640fee0ef7..93915d5b82 100644 --- a/test/runtime/samples/select-props/_config.js +++ b/test/runtime/samples/select-props/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window }) { + test({ assert, component, window }) { const selects = document.querySelectorAll('select'); const event1 = new window.Event('change'); diff --git a/test/runtime/samples/set-after-destroy/_config.js b/test/runtime/samples/set-after-destroy/_config.js index 063c133b87..3411f0cc79 100644 --- a/test/runtime/samples/set-after-destroy/_config.js +++ b/test/runtime/samples/set-after-destroy/_config.js @@ -3,7 +3,7 @@ export default { x: 1 }, - test({ assert, component }) { + test({ component }) { component.$destroy(); component.x = 2; } diff --git a/test/runtime/samples/set-in-onstate-dedupes-renders/_config.js b/test/runtime/samples/set-in-onstate-dedupes-renders/_config.js index 1d572f52fa..9f50a3cf25 100644 --- a/test/runtime/samples/set-in-onstate-dedupes-renders/_config.js +++ b/test/runtime/samples/set-in-onstate-dedupes-renders/_config.js @@ -1,7 +1,7 @@ export default { skip: true, // nice-to-have – tricky though, so skipping for now - test({ assert, component }) { + test({ component }) { component.foo = { x: 2 }; } }; diff --git a/test/runtime/samples/spread-component-with-bind/_config.js b/test/runtime/samples/spread-component-with-bind/_config.js index 96eb3c9475..5394fa80e0 100644 --- a/test/runtime/samples/spread-component-with-bind/_config.js +++ b/test/runtime/samples/spread-component-with-bind/_config.js @@ -9,7 +9,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const input = target.querySelector('input'); input.value = 'bar'; diff --git a/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js b/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js index 4bbc9d278c..5176fb976c 100644 --- a/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js +++ b/test/runtime/samples/spread-element-input-bind-group-with-value-attr/_config.js @@ -7,7 +7,7 @@ export default { html: '', - async test({ assert, component, target, window }) { + async test({ assert, target }) { const input = target.querySelector('input'); assert.equal(input.value, 'abc'); assert.equal(input.__value, 'abc'); diff --git a/test/runtime/samples/spread-element-input-select/_config.js b/test/runtime/samples/spread-element-input-select/_config.js index 7361e6bb31..7971a2a3fc 100644 --- a/test/runtime/samples/spread-element-input-select/_config.js +++ b/test/runtime/samples/spread-element-input-select/_config.js @@ -1,5 +1,5 @@ export default { - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { const select = target.querySelector('select'); const [option1, option2] = select.childNodes; diff --git a/test/runtime/samples/spread-element-input-value-undefined/_config.js b/test/runtime/samples/spread-element-input-value-undefined/_config.js index 9a83dccd80..9f5c0b8e77 100644 --- a/test/runtime/samples/spread-element-input-value-undefined/_config.js +++ b/test/runtime/samples/spread-element-input-value-undefined/_config.js @@ -1,5 +1,5 @@ export default { - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { const input = target.querySelector('input'); component.value = undefined; diff --git a/test/runtime/samples/spread-element-select-value-undefined/_config.js b/test/runtime/samples/spread-element-select-value-undefined/_config.js index 59cf59d662..0c2c76a119 100644 --- a/test/runtime/samples/spread-element-select-value-undefined/_config.js +++ b/test/runtime/samples/spread-element-select-value-undefined/_config.js @@ -1,5 +1,5 @@ export default { - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { const select = target.querySelector('select'); assert.equal(select.value, '1'); diff --git a/test/runtime/samples/store-assignment-updates-property/_config.js b/test/runtime/samples/store-assignment-updates-property/_config.js index a1c41b9888..467e7782d6 100644 --- a/test/runtime/samples/store-assignment-updates-property/_config.js +++ b/test/runtime/samples/store-assignment-updates-property/_config.js @@ -6,7 +6,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const [btn1, btn2] = target.querySelectorAll('button'); const click = new window.MouseEvent('click'); diff --git a/test/runtime/samples/store-auto-subscribe-in-reactive-declaration-2/_config.js b/test/runtime/samples/store-auto-subscribe-in-reactive-declaration-2/_config.js index 27189d58d7..560eb44a9a 100644 --- a/test/runtime/samples/store-auto-subscribe-in-reactive-declaration-2/_config.js +++ b/test/runtime/samples/store-auto-subscribe-in-reactive-declaration-2/_config.js @@ -4,7 +4,7 @@ export default {
Hello World
`, - async test({ assert, component, target, window }) { + async test({ assert, component, target }) { await component.update_value('Hi Svelte'); assert.htmlEqual(target.innerHTML, ` diff --git a/test/runtime/samples/store-contextual/_config.js b/test/runtime/samples/store-contextual/_config.js index 2a4f8fef8d..0b7aa6cf33 100644 --- a/test/runtime/samples/store-contextual/_config.js +++ b/test/runtime/samples/store-contextual/_config.js @@ -30,7 +30,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const inputs = target.querySelectorAll('input'); const change = new window.MouseEvent('change'); diff --git a/test/runtime/samples/store-invalidation-while-update-1/_config.js b/test/runtime/samples/store-invalidation-while-update-1/_config.js index 0f8ff1809b..bc78193ae7 100644 --- a/test/runtime/samples/store-invalidation-while-update-1/_config.js +++ b/test/runtime/samples/store-invalidation-while-update-1/_config.js @@ -12,7 +12,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const input = target.querySelector('input'); const button = target.querySelector('button'); @@ -28,7 +28,7 @@ export default {
foo
`); - + await button.dispatchEvent(clickEvent); assert.htmlEqual(target.innerHTML, ` diff --git a/test/runtime/samples/store-invalidation-while-update-2/_config.js b/test/runtime/samples/store-invalidation-while-update-2/_config.js index 2465b7d444..78104ef293 100644 --- a/test/runtime/samples/store-invalidation-while-update-2/_config.js +++ b/test/runtime/samples/store-invalidation-while-update-2/_config.js @@ -12,7 +12,7 @@ export default { `, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const input = target.querySelector('input'); const button = target.querySelector('button'); @@ -28,7 +28,7 @@ export default { `); - + await button.dispatchEvent(clickEvent); assert.htmlEqual(target.innerHTML, `
foo
diff --git a/test/runtime/samples/svg-attributes/_config.js b/test/runtime/samples/svg-attributes/_config.js index 668fb391c0..44f7d3a368 100644 --- a/test/runtime/samples/svg-attributes/_config.js +++ b/test/runtime/samples/svg-attributes/_config.js @@ -7,7 +7,7 @@ export default { `, - test({ assert, component, target }) { + test({ assert, target }) { const circle = target.querySelector('circle'); assert.equal(circle.getAttribute('class'), 'red'); } diff --git a/test/runtime/samples/svg-class/_config.js b/test/runtime/samples/svg-class/_config.js index 36f5d06b1c..ce32d1fb93 100644 --- a/test/runtime/samples/svg-class/_config.js +++ b/test/runtime/samples/svg-class/_config.js @@ -3,7 +3,7 @@ export default { html: "", - test({ assert, component, target }) { + test({ assert, target }) { const svg = target.querySelector('svg'); assert.equal(svg.namespaceURI, 'http://www.w3.org/2000/svg'); diff --git a/test/runtime/samples/svg-each-block-namespace/_config.js b/test/runtime/samples/svg-each-block-namespace/_config.js index 795510c879..c43734885f 100644 --- a/test/runtime/samples/svg-each-block-namespace/_config.js +++ b/test/runtime/samples/svg-each-block-namespace/_config.js @@ -5,7 +5,7 @@ export default { `, - test({ assert, component, target }) { + test({ assert, target }) { const circles = target.querySelectorAll('circle'); assert.equal(circles[0].namespaceURI, 'http://www.w3.org/2000/svg'); assert.equal(circles[1].namespaceURI, 'http://www.w3.org/2000/svg'); diff --git a/test/runtime/samples/svg-no-whitespace/_config.js b/test/runtime/samples/svg-no-whitespace/_config.js index 6d4cefba21..2f7a917f16 100644 --- a/test/runtime/samples/svg-no-whitespace/_config.js +++ b/test/runtime/samples/svg-no-whitespace/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target }) { + test({ assert, target }) { const svg = target.querySelector( 'svg' ); assert.equal( svg.childNodes.length, 2 ); diff --git a/test/runtime/samples/svg-xlink/_config.js b/test/runtime/samples/svg-xlink/_config.js index 6e0ad4664c..d3018b3698 100644 --- a/test/runtime/samples/svg-xlink/_config.js +++ b/test/runtime/samples/svg-xlink/_config.js @@ -8,7 +8,7 @@ export default { `, - test({ assert, component, target }) { + test({ assert, target }) { const use = target.querySelector('use'); const href = use.attributes[ 'xlink:href' ]; diff --git a/test/runtime/samples/target-dom-detached/_config.js b/test/runtime/samples/target-dom-detached/_config.js index b63656530c..055d1868eb 100644 --- a/test/runtime/samples/target-dom-detached/_config.js +++ b/test/runtime/samples/target-dom-detached/_config.js @@ -3,7 +3,7 @@ export default { compileOptions: { cssHash: () => 'svelte-xyz' }, - async test({ assert, component, target, window }) { + async test({ assert, component, window }) { assert.htmlEqual( window.document.head.innerHTML, '' diff --git a/test/runtime/samples/target-dom/_config.js b/test/runtime/samples/target-dom/_config.js index b63656530c..055d1868eb 100644 --- a/test/runtime/samples/target-dom/_config.js +++ b/test/runtime/samples/target-dom/_config.js @@ -3,7 +3,7 @@ export default { compileOptions: { cssHash: () => 'svelte-xyz' }, - async test({ assert, component, target, window }) { + async test({ assert, component, window }) { assert.htmlEqual( window.document.head.innerHTML, '' diff --git a/test/runtime/samples/target-shadow-dom/_config.js b/test/runtime/samples/target-shadow-dom/_config.js index cec383afd0..ff775d15fd 100644 --- a/test/runtime/samples/target-shadow-dom/_config.js +++ b/test/runtime/samples/target-shadow-dom/_config.js @@ -3,7 +3,7 @@ export default { compileOptions: { cssHash: () => 'svelte-xyz' }, - async test({ assert, component, target, window }) { + async test({ assert, component, window }) { assert.htmlEqual(window.document.head.innerHTML, ''); assert.htmlEqual(component.div.shadowRoot.innerHTML, ` diff --git a/test/runtime/samples/template/_config.js b/test/runtime/samples/template/_config.js index fd9bb3af67..f5117d3808 100644 --- a/test/runtime/samples/template/_config.js +++ b/test/runtime/samples/template/_config.js @@ -7,7 +7,7 @@ export default { `, - test({ assert, component, target }) { + test({ assert, target }) { const template = target.querySelector('template'); assert.htmlEqual(template.innerHTML, ` diff --git a/test/runtime/samples/transition-abort/_config.js b/test/runtime/samples/transition-abort/_config.js index 4f31c44a4d..c0f702cb76 100644 --- a/test/runtime/samples/transition-abort/_config.js +++ b/test/runtime/samples/transition-abort/_config.js @@ -7,7 +7,7 @@ export default {
a
`, - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { component.visible = false; // abort halfway through the outro transition diff --git a/test/runtime/samples/transition-css-deferred-removal/_config.js b/test/runtime/samples/transition-css-deferred-removal/_config.js index 763f004835..9bf429cd9e 100644 --- a/test/runtime/samples/transition-css-deferred-removal/_config.js +++ b/test/runtime/samples/transition-css-deferred-removal/_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 outer = target.querySelector('.outer'); diff --git a/test/runtime/samples/transition-css-duration/_config.js b/test/runtime/samples/transition-css-duration/_config.js index a448c3f164..b2a9fb3476 100644 --- a/test/runtime/samples/transition-css-duration/_config.js +++ b/test/runtime/samples/transition-css-duration/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-css-iframe/_config.js b/test/runtime/samples/transition-css-iframe/_config.js index 612ee8e5ba..a7d98dc474 100644 --- a/test/runtime/samples/transition-css-iframe/_config.js +++ b/test/runtime/samples/transition-css-iframe/_config.js @@ -1,7 +1,7 @@ export default { skip_if_ssr: true, - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { const frame = target.querySelector('iframe'); await Promise.resolve(); diff --git a/test/runtime/samples/transition-css-in-out-in-with-param/_config.js b/test/runtime/samples/transition-css-in-out-in-with-param/_config.js index c5dfb63225..7d0dfa9a07 100644 --- a/test/runtime/samples/transition-css-in-out-in-with-param/_config.js +++ b/test/runtime/samples/transition-css-in-out-in-with-param/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-css-in-out-in/_config.js b/test/runtime/samples/transition-css-in-out-in/_config.js index 6d93c0e8c3..5debe6abd6 100644 --- a/test/runtime/samples/transition-css-in-out-in/_config.js +++ b/test/runtime/samples/transition-css-in-out-in/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-args-dynamic/_config.js b/test/runtime/samples/transition-js-args-dynamic/_config.js index 513a17486a..50bf9eeefc 100644 --- a/test/runtime/samples/transition-js-args-dynamic/_config.js +++ b/test/runtime/samples/transition-js-args-dynamic/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-args/_config.js b/test/runtime/samples/transition-js-args/_config.js index 00682894cd..5fb9f1e93d 100644 --- a/test/runtime/samples/transition-js-args/_config.js +++ b/test/runtime/samples/transition-js-args/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-context/_config.js b/test/runtime/samples/transition-js-context/_config.js index e2e7135180..6bc20d3dd1 100644 --- a/test/runtime/samples/transition-js-context/_config.js +++ b/test/runtime/samples/transition-js-context/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-delay-in-out/_config.js b/test/runtime/samples/transition-js-delay-in-out/_config.js index bb00604dd9..5a17eead20 100644 --- a/test/runtime/samples/transition-js-delay-in-out/_config.js +++ b/test/runtime/samples/transition-js-delay-in-out/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); assert.equal(div.foo, 0); diff --git a/test/runtime/samples/transition-js-delay/_config.js b/test/runtime/samples/transition-js-delay/_config.js index 4567573661..aeb42b5d0f 100644 --- a/test/runtime/samples/transition-js-delay/_config.js +++ b/test/runtime/samples/transition-js-delay/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); assert.equal(div.foo, 0); diff --git a/test/runtime/samples/transition-js-destroyed-before-end/_config.js b/test/runtime/samples/transition-js-destroyed-before-end/_config.js index 59615bd7a5..8033c7c00c 100644 --- a/test/runtime/samples/transition-js-destroyed-before-end/_config.js +++ b/test/runtime/samples/transition-js-destroyed-before-end/_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 div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-dynamic-component/_config.js b/test/runtime/samples/transition-js-dynamic-component/_config.js index e8104a67e5..b59bd41af8 100644 --- a/test/runtime/samples/transition-js-dynamic-component/_config.js +++ b/test/runtime/samples/transition-js-dynamic-component/_config.js @@ -7,7 +7,7 @@ export default {
a
`, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.x = false; assert.htmlEqual(target.innerHTML, ` diff --git a/test/runtime/samples/transition-js-each-block-intro-outro/_config.js b/test/runtime/samples/transition-js-each-block-intro-outro/_config.js index 9b83a1a1d3..9a0326fbb0 100644 --- a/test/runtime/samples/transition-js-each-block-intro-outro/_config.js +++ b/test/runtime/samples/transition-js-each-block-intro-outro/_config.js @@ -4,7 +4,7 @@ export default { things: [ 'a', 'b', 'c' ] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const divs = target.querySelectorAll('div'); assert.equal(divs[0].foo, 0); diff --git a/test/runtime/samples/transition-js-each-block-intro/_config.js b/test/runtime/samples/transition-js-each-block-intro/_config.js index 42d69665cf..14e17ae8a9 100644 --- a/test/runtime/samples/transition-js-each-block-intro/_config.js +++ b/test/runtime/samples/transition-js-each-block-intro/_config.js @@ -5,7 +5,7 @@ export default { intro: true, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { let divs = target.querySelectorAll('div'); assert.equal(divs[0].foo, 0); assert.equal(divs[1].foo, 0); diff --git a/test/runtime/samples/transition-js-each-block-keyed-intro-outro/_config.js b/test/runtime/samples/transition-js-each-block-keyed-intro-outro/_config.js index 9927289ee5..5d1ae5d3e9 100644 --- a/test/runtime/samples/transition-js-each-block-keyed-intro-outro/_config.js +++ b/test/runtime/samples/transition-js-each-block-keyed-intro-outro/_config.js @@ -9,7 +9,7 @@ export default { intro: true, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { const divs = target.querySelectorAll('div'); divs[0].i = 0; // for debugging divs[1].i = 1; diff --git a/test/runtime/samples/transition-js-each-block-keyed-intro/_config.js b/test/runtime/samples/transition-js-each-block-keyed-intro/_config.js index c37cb8101d..f6b1416789 100644 --- a/test/runtime/samples/transition-js-each-block-keyed-intro/_config.js +++ b/test/runtime/samples/transition-js-each-block-keyed-intro/_config.js @@ -9,7 +9,7 @@ export default { intro: true, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { let divs = target.querySelectorAll('div'); assert.equal(divs[0].foo, 0); assert.equal(divs[1].foo, 0); diff --git a/test/runtime/samples/transition-js-each-block-keyed-outro/_config.js b/test/runtime/samples/transition-js-each-block-keyed-outro/_config.js index 1c98ec3198..f3677ef89a 100644 --- a/test/runtime/samples/transition-js-each-block-keyed-outro/_config.js +++ b/test/runtime/samples/transition-js-each-block-keyed-outro/_config.js @@ -7,7 +7,7 @@ export default { ] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { const divs = target.querySelectorAll( 'div' ); component.things = [ diff --git a/test/runtime/samples/transition-js-each-block-outro/_config.js b/test/runtime/samples/transition-js-each-block-outro/_config.js index e9a7644383..b36a3d93eb 100644 --- a/test/runtime/samples/transition-js-each-block-outro/_config.js +++ b/test/runtime/samples/transition-js-each-block-outro/_config.js @@ -3,7 +3,7 @@ export default { things: [ 'a', 'b', 'c' ] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { const divs = target.querySelectorAll( 'div' ); component.things = [ 'a' ]; diff --git a/test/runtime/samples/transition-js-each-else-block-intro-outro/_config.js b/test/runtime/samples/transition-js-each-else-block-intro-outro/_config.js index d51fdecb2e..692713840d 100644 --- a/test/runtime/samples/transition-js-each-else-block-intro-outro/_config.js +++ b/test/runtime/samples/transition-js-each-else-block-intro-outro/_config.js @@ -3,7 +3,7 @@ export default { things: ['a', 'b', 'c'] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.things = []; let div = target.querySelector('div'); assert.equal(div.foo, 0); diff --git a/test/runtime/samples/transition-js-each-else-block-intro/_config.js b/test/runtime/samples/transition-js-each-else-block-intro/_config.js index dccfbd1a03..77edb37ef2 100644 --- a/test/runtime/samples/transition-js-each-else-block-intro/_config.js +++ b/test/runtime/samples/transition-js-each-else-block-intro/_config.js @@ -3,7 +3,7 @@ export default { things: ['a', 'b', 'c'] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.things = []; const div = target.querySelector('div'); assert.equal(div.foo, 0); diff --git a/test/runtime/samples/transition-js-each-else-block-outro/_config.js b/test/runtime/samples/transition-js-each-else-block-outro/_config.js index 163cbbd08d..fb5d9cb823 100644 --- a/test/runtime/samples/transition-js-each-else-block-outro/_config.js +++ b/test/runtime/samples/transition-js-each-else-block-outro/_config.js @@ -2,7 +2,7 @@ export default { props: { things: [] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { const div = target.querySelector('div'); component.things = ['a', 'b', 'c']; diff --git a/test/runtime/samples/transition-js-each-keyed-unchanged/_config.js b/test/runtime/samples/transition-js-each-keyed-unchanged/_config.js index a36b1a4610..ddf83e4397 100644 --- a/test/runtime/samples/transition-js-each-keyed-unchanged/_config.js +++ b/test/runtime/samples/transition-js-each-keyed-unchanged/_config.js @@ -3,7 +3,7 @@ export default { numbers: [1, 2, 3, 4, 5] }, - test({ assert, component, target, raf }) { + test({ assert, component, target }) { const divs1 = target.querySelectorAll('div'); assert.equal(divs1[0].foo, undefined); diff --git a/test/runtime/samples/transition-js-each-unchanged/_config.js b/test/runtime/samples/transition-js-each-unchanged/_config.js index 671aa2af74..2dfa1f65ac 100644 --- a/test/runtime/samples/transition-js-each-unchanged/_config.js +++ b/test/runtime/samples/transition-js-each-unchanged/_config.js @@ -3,7 +3,7 @@ export default { numbers: [1, 2, 3, 4, 5] }, - test({ assert, component, target, raf }) { + test({ assert, component, target }) { const divs1 = target.querySelectorAll('div'); assert.equal(divs1[0].foo, undefined); diff --git a/test/runtime/samples/transition-js-if-block-bidi/_config.js b/test/runtime/samples/transition-js-if-block-bidi/_config.js index 1587a92ad6..68242ecbbf 100644 --- a/test/runtime/samples/transition-js-if-block-bidi/_config.js +++ b/test/runtime/samples/transition-js-if-block-bidi/_config.js @@ -1,5 +1,5 @@ export default { - 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-2/_config.js b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/_config.js index fb885b0826..ed88103f2c 100644 --- a/test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/_config.js +++ b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/_config.js @@ -12,7 +12,7 @@ export default {
5
`, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { raf.tick(100); component.threshold = 4; diff --git a/test/runtime/samples/transition-js-if-block-in-each-block-bidi/_config.js b/test/runtime/samples/transition-js-if-block-in-each-block-bidi/_config.js index 712be980aa..b02ccffc81 100644 --- a/test/runtime/samples/transition-js-if-block-in-each-block-bidi/_config.js +++ b/test/runtime/samples/transition-js-if-block-in-each-block-bidi/_config.js @@ -13,7 +13,7 @@ export default { intro: true, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { const divs = target.querySelectorAll('div'); assert.equal(divs[0].foo, 0); diff --git a/test/runtime/samples/transition-js-if-block-intro-outro/_config.js b/test/runtime/samples/transition-js-if-block-intro-outro/_config.js index 06f72653e4..89fbaac1e6 100644 --- a/test/runtime/samples/transition-js-if-block-intro-outro/_config.js +++ b/test/runtime/samples/transition-js-if-block-intro-outro/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; let div = target.querySelector('div'); assert.equal(div.foo, 0); diff --git a/test/runtime/samples/transition-js-if-else-block-dynamic-outro/_config.js b/test/runtime/samples/transition-js-if-else-block-dynamic-outro/_config.js index 4985d39850..c3f6334576 100644 --- a/test/runtime/samples/transition-js-if-else-block-dynamic-outro/_config.js +++ b/test/runtime/samples/transition-js-if-else-block-dynamic-outro/_config.js @@ -3,7 +3,7 @@ export default { z: 'z' }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { assert.equal(target.querySelector('div'), component.no); component.x = true; diff --git a/test/runtime/samples/transition-js-if-else-block-not-dynamic-outro/_config.js b/test/runtime/samples/transition-js-if-else-block-not-dynamic-outro/_config.js index 1c0c6e0543..9bd793c3ad 100644 --- a/test/runtime/samples/transition-js-if-else-block-not-dynamic-outro/_config.js +++ b/test/runtime/samples/transition-js-if-else-block-not-dynamic-outro/_config.js @@ -1,5 +1,5 @@ export default { - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { const t = target.querySelector('#t'); await (component.condition = false); diff --git a/test/runtime/samples/transition-js-if-else-block-outro/_config.js b/test/runtime/samples/transition-js-if-else-block-outro/_config.js index 1dc5af8f6c..0d56cba09b 100644 --- a/test/runtime/samples/transition-js-if-else-block-outro/_config.js +++ b/test/runtime/samples/transition-js-if-else-block-outro/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { assert.equal(target.querySelector('div'), component.no); component.x = true; diff --git a/test/runtime/samples/transition-js-if-elseif-block-outro/_config.js b/test/runtime/samples/transition-js-if-elseif-block-outro/_config.js index b11f33e7c1..9a61c2e45b 100644 --- a/test/runtime/samples/transition-js-if-elseif-block-outro/_config.js +++ b/test/runtime/samples/transition-js-if-elseif-block-outro/_config.js @@ -4,7 +4,7 @@ export default { y: true }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { assert.equal(target.querySelector('div'), component.no); component.x = true; diff --git a/test/runtime/samples/transition-js-initial/_config.js b/test/runtime/samples/transition-js-initial/_config.js index 3760a1cbfb..770b2a8cc9 100644 --- a/test/runtime/samples/transition-js-initial/_config.js +++ b/test/runtime/samples/transition-js-initial/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-intro-enabled-by-option/_config.js b/test/runtime/samples/transition-js-intro-enabled-by-option/_config.js index af8e957b19..b4d4dd2053 100644 --- a/test/runtime/samples/transition-js-intro-enabled-by-option/_config.js +++ b/test/runtime/samples/transition-js-intro-enabled-by-option/_config.js @@ -3,7 +3,7 @@ export default { skip_if_hydrate: true, - test({ assert, component, target, window, raf }) { + test({ assert, target, raf }) { const div = target.querySelector('div'); assert.equal(div.foo, 0); diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/_config.js b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/_config.js index e209e0a80c..cada0124c6 100644 --- a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/_config.js +++ b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, target, raf }) { const div = target.querySelector('div'); assert.equal(div.foo, undefined); diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default/_config.js b/test/runtime/samples/transition-js-intro-skipped-by-default/_config.js index e209e0a80c..cada0124c6 100644 --- a/test/runtime/samples/transition-js-intro-skipped-by-default/_config.js +++ b/test/runtime/samples/transition-js-intro-skipped-by-default/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, target, raf }) { const div = target.querySelector('div'); assert.equal(div.foo, undefined); diff --git a/test/runtime/samples/transition-js-local/_config.js b/test/runtime/samples/transition-js-local/_config.js index 5f9cf9048a..f2d2c0384d 100644 --- a/test/runtime/samples/transition-js-local/_config.js +++ b/test/runtime/samples/transition-js-local/_config.js @@ -4,7 +4,7 @@ export default { y: true }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.x = true; let div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-nested-await/_config.js b/test/runtime/samples/transition-js-nested-await/_config.js index 78dbe5ae41..e0f26580cc 100644 --- a/test/runtime/samples/transition-js-nested-await/_config.js +++ b/test/runtime/samples/transition-js-nested-await/_config.js @@ -10,7 +10,7 @@ export default { promise }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.x = true; fulfil(); diff --git a/test/runtime/samples/transition-js-nested-component/_config.js b/test/runtime/samples/transition-js-nested-component/_config.js index f1ca81c52e..87d7aaa233 100644 --- a/test/runtime/samples/transition-js-nested-component/_config.js +++ b/test/runtime/samples/transition-js-nested-component/_config.js @@ -3,7 +3,7 @@ export default { x: false }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.x = true; const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-nested-each-keyed-2/_config.js b/test/runtime/samples/transition-js-nested-each-keyed-2/_config.js index c2d782c0f2..1040d1af53 100644 --- a/test/runtime/samples/transition-js-nested-each-keyed-2/_config.js +++ b/test/runtime/samples/transition-js-nested-each-keyed-2/_config.js @@ -4,7 +4,7 @@ export default { things: ['a', 'b'] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target }) { component.x = false; assert.htmlEqual(target.innerHTML, ''); } diff --git a/test/runtime/samples/transition-js-nested-each-keyed/_config.js b/test/runtime/samples/transition-js-nested-each-keyed/_config.js index 5ec416afd9..a74aba5610 100644 --- a/test/runtime/samples/transition-js-nested-each-keyed/_config.js +++ b/test/runtime/samples/transition-js-nested-each-keyed/_config.js @@ -4,7 +4,7 @@ export default { things: ['a'] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.x = true; const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-nested-if/_config.js b/test/runtime/samples/transition-js-nested-if/_config.js index 7d48077aca..9e4c634967 100644 --- a/test/runtime/samples/transition-js-nested-if/_config.js +++ b/test/runtime/samples/transition-js-nested-if/_config.js @@ -4,7 +4,7 @@ export default { y: true }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.x = true; const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-nested-intro/_config.js b/test/runtime/samples/transition-js-nested-intro/_config.js index 9c23290b1a..5d27f84839 100644 --- a/test/runtime/samples/transition-js-nested-intro/_config.js +++ b/test/runtime/samples/transition-js-nested-intro/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); assert.equal(div.foo, 0); diff --git a/test/runtime/samples/transition-js-parameterised-with-state/_config.js b/test/runtime/samples/transition-js-parameterised-with-state/_config.js index b143e8fdd6..07dd1ad906 100644 --- a/test/runtime/samples/transition-js-parameterised-with-state/_config.js +++ b/test/runtime/samples/transition-js-parameterised-with-state/_config.js @@ -3,7 +3,7 @@ export default { duration: 200 }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); assert.equal(div.foo, 0); diff --git a/test/runtime/samples/transition-js-parameterised/_config.js b/test/runtime/samples/transition-js-parameterised/_config.js index 6655cd374d..222e9e713e 100644 --- a/test/runtime/samples/transition-js-parameterised/_config.js +++ b/test/runtime/samples/transition-js-parameterised/_config.js @@ -1,5 +1,5 @@ export default { - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const div = target.querySelector('div'); assert.equal(div.foo, 0); diff --git a/test/runtime/samples/transition-js-slot-2/_config.js b/test/runtime/samples/transition-js-slot-2/_config.js index 0f0cad5e41..1785941252 100644 --- a/test/runtime/samples/transition-js-slot-2/_config.js +++ b/test/runtime/samples/transition-js-slot-2/_config.js @@ -4,7 +4,7 @@ export default {
Foo
`, - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { await component.hide(); const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-slot-3/_config.js b/test/runtime/samples/transition-js-slot-3/_config.js index 67cc0b46d2..0dfe3281fc 100644 --- a/test/runtime/samples/transition-js-slot-3/_config.js +++ b/test/runtime/samples/transition-js-slot-3/_config.js @@ -3,7 +3,7 @@ export default {
Foo
`, - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { await component.hide(); const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-slot-4-cancelled/_config.js b/test/runtime/samples/transition-js-slot-4-cancelled/_config.js index d6b7c31132..8be95f0150 100644 --- a/test/runtime/samples/transition-js-slot-4-cancelled/_config.js +++ b/test/runtime/samples/transition-js-slot-4-cancelled/_config.js @@ -9,7 +9,7 @@ export default { props: 'Foo' }, - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { await component.hide(); const [, div] = target.querySelectorAll('div'); diff --git a/test/runtime/samples/transition-js-slot-5-cancelled-overflow/_config.js b/test/runtime/samples/transition-js-slot-5-cancelled-overflow/_config.js index aedc87f0b6..556f75eccd 100644 --- a/test/runtime/samples/transition-js-slot-5-cancelled-overflow/_config.js +++ b/test/runtime/samples/transition-js-slot-5-cancelled-overflow/_config.js @@ -12,7 +12,7 @@ export default { props: 'Foo' }, - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { await component.hide(); const [, div] = target.querySelectorAll('div'); diff --git a/test/runtime/samples/transition-js-slot-6-spread-cancelled/_config.js b/test/runtime/samples/transition-js-slot-6-spread-cancelled/_config.js index 1d42c9cf71..960e02a8f6 100644 --- a/test/runtime/samples/transition-js-slot-6-spread-cancelled/_config.js +++ b/test/runtime/samples/transition-js-slot-6-spread-cancelled/_config.js @@ -12,7 +12,7 @@ export default { props: 'Foo' }, - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { await component.hide(); const [, div] = target.querySelectorAll('div'); diff --git a/test/runtime/samples/transition-js-slot-7-spread-cancelled-overflow/_config.js b/test/runtime/samples/transition-js-slot-7-spread-cancelled-overflow/_config.js index aedc87f0b6..556f75eccd 100644 --- a/test/runtime/samples/transition-js-slot-7-spread-cancelled-overflow/_config.js +++ b/test/runtime/samples/transition-js-slot-7-spread-cancelled-overflow/_config.js @@ -12,7 +12,7 @@ export default { props: 'Foo' }, - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { await component.hide(); const [, div] = target.querySelectorAll('div'); diff --git a/test/runtime/samples/transition-js-slot-fallback/_config.js b/test/runtime/samples/transition-js-slot-fallback/_config.js index 67cc0b46d2..0dfe3281fc 100644 --- a/test/runtime/samples/transition-js-slot-fallback/_config.js +++ b/test/runtime/samples/transition-js-slot-fallback/_config.js @@ -3,7 +3,7 @@ export default {
Foo
`, - async test({ assert, component, target, window, raf }) { + async test({ assert, component, target, raf }) { await component.hide(); const div = target.querySelector('div'); diff --git a/test/runtime/samples/transition-js-slot/_config.js b/test/runtime/samples/transition-js-slot/_config.js index e4d1c85a9f..3c1cbeec10 100644 --- a/test/runtime/samples/transition-js-slot/_config.js +++ b/test/runtime/samples/transition-js-slot/_config.js @@ -7,7 +7,7 @@ export default {
`, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = true; const p = target.querySelector('p'); assert.equal(p.foo, 0); diff --git a/test/runtime/samples/whitespace-each-block/_config.js b/test/runtime/samples/whitespace-each-block/_config.js index 269e21781b..9f3f5735ed 100644 --- a/test/runtime/samples/whitespace-each-block/_config.js +++ b/test/runtime/samples/whitespace-each-block/_config.js @@ -3,7 +3,7 @@ export default { characters: ['a', 'b', 'c'] }, - test({ assert, component, target }) { + test({ assert, target }) { assert.equal( target.textContent, 'a b c ' diff --git a/test/runtime/samples/whitespace-list/_config.js b/test/runtime/samples/whitespace-list/_config.js index 1ba852726c..c3c9d31333 100644 --- a/test/runtime/samples/whitespace-list/_config.js +++ b/test/runtime/samples/whitespace-list/_config.js @@ -14,7 +14,7 @@ export default { `, - test({ assert, component, target }) { + test({ assert, target }) { const ul = target.querySelector('ul'); assert.equal(ul.childNodes.length, 5); diff --git a/test/runtime/samples/whitespace-normal/_config.js b/test/runtime/samples/whitespace-normal/_config.js index 9b82576c06..90ca0b42c0 100644 --- a/test/runtime/samples/whitespace-normal/_config.js +++ b/test/runtime/samples/whitespace-normal/_config.js @@ -3,7 +3,7 @@ export default { name: 'world' }, - test({ assert, component, target }) { + test({ assert, target }) { assert.equal( target.textContent, 'Hello world! How are you?' diff --git a/test/runtime/samples/window-bind-scroll-update/_config.js b/test/runtime/samples/window-bind-scroll-update/_config.js index ac6f54ad55..60bdb4b7f6 100644 --- a/test/runtime/samples/window-bind-scroll-update/_config.js +++ b/test/runtime/samples/window-bind-scroll-update/_config.js @@ -24,7 +24,7 @@ export default { clock = null; }, - async test({ assert, component, target, window }) { + async test({ assert, component, window }) { assert.equal(window.pageYOffset, 0); // clear the previous 'scrolling' state diff --git a/test/runtime/samples/window-binding-resize/_config.js b/test/runtime/samples/window-binding-resize/_config.js index c396666014..c99e92a07b 100644 --- a/test/runtime/samples/window-binding-resize/_config.js +++ b/test/runtime/samples/window-binding-resize/_config.js @@ -16,7 +16,7 @@ export default { skip_if_ssr: true, // there's some kind of weird bug with this test... it compiles with the wrong require.extensions hook for some bizarre reason - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const event = new window.Event('resize'); Object.defineProperties(window, { diff --git a/test/runtime/samples/window-binding-scroll-store/_config.js b/test/runtime/samples/window-binding-scroll-store/_config.js index 0ce87efee0..47951506bf 100644 --- a/test/runtime/samples/window-binding-scroll-store/_config.js +++ b/test/runtime/samples/window-binding-scroll-store/_config.js @@ -8,7 +8,7 @@ export default { } }); }, - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { assert.equal(window.pageYOffset, 0); const event = new window.Event('scroll'); diff --git a/test/runtime/samples/window-event-custom/_config.js b/test/runtime/samples/window-event-custom/_config.js index 15644bc8e8..2e3b577b86 100644 --- a/test/runtime/samples/window-event-custom/_config.js +++ b/test/runtime/samples/window-event-custom/_config.js @@ -1,7 +1,7 @@ export default { html: '

escaped: false

', - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const event = new window.KeyboardEvent('keydown', { key: 'Escape' }); diff --git a/test/runtime/samples/window-event/_config.js b/test/runtime/samples/window-event/_config.js index 90c6562f95..9abde274e9 100644 --- a/test/runtime/samples/window-event/_config.js +++ b/test/runtime/samples/window-event/_config.js @@ -3,7 +3,7 @@ export default { skip_if_ssr: true, // there's some kind of weird bug with this test... it compiles with the wrong require.extensions hook for some bizarre reason - async test({ assert, component, target, window }) { + async test({ assert, target, window }) { const event = new window.Event('resize'); Object.defineProperties(window, { From 0d7c583364ad87697473af19898f255be0584f21 Mon Sep 17 00:00:00 2001 From: Mohamed Haddi Date: Sun, 10 Oct 2021 18:11:10 +0100 Subject: [PATCH 3/8] [docs] align input controls (#6831) --- .../06-bindings/02-numeric-inputs/app-a/App.svelte | 7 ++++++- .../06-bindings/02-numeric-inputs/app-b/App.svelte | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/site/content/tutorial/06-bindings/02-numeric-inputs/app-a/App.svelte b/site/content/tutorial/06-bindings/02-numeric-inputs/app-a/App.svelte index ac4fadf012..795090a8bd 100644 --- a/site/content/tutorial/06-bindings/02-numeric-inputs/app-a/App.svelte +++ b/site/content/tutorial/06-bindings/02-numeric-inputs/app-a/App.svelte @@ -13,4 +13,9 @@ -

{a} + {b} = {a + b}

\ No newline at end of file +

{a} + {b} = {a + b}

+ + \ No newline at end of file diff --git a/site/content/tutorial/06-bindings/02-numeric-inputs/app-b/App.svelte b/site/content/tutorial/06-bindings/02-numeric-inputs/app-b/App.svelte index 798d57e021..a419675623 100644 --- a/site/content/tutorial/06-bindings/02-numeric-inputs/app-b/App.svelte +++ b/site/content/tutorial/06-bindings/02-numeric-inputs/app-b/App.svelte @@ -13,4 +13,9 @@ -

{a} + {b} = {a + b}

\ No newline at end of file +

{a} + {b} = {a + b}

+ + \ No newline at end of file From b6b7f5c8a46c18712c502a41341a81e586e9e97c Mon Sep 17 00:00:00 2001 From: Vaibhav Rai Date: Wed, 13 Oct 2021 01:43:44 +0530 Subject: [PATCH 4/8] [fix] properly respect sveltePath when rewriting user imports (#6842) --- src/compiler/compile/create_module.ts | 21 +++--- test/js/samples/custom-svelte-path/_config.js | 5 ++ .../js/samples/custom-svelte-path/expected.js | 64 +++++++++++++++++++ .../samples/custom-svelte-path/input.svelte | 9 +++ 4 files changed, 90 insertions(+), 9 deletions(-) create mode 100644 test/js/samples/custom-svelte-path/_config.js create mode 100644 test/js/samples/custom-svelte-path/expected.js create mode 100644 test/js/samples/custom-svelte-path/input.svelte diff --git a/src/compiler/compile/create_module.ts b/src/compiler/compile/create_module.ts index 037b2b396e..c9f925c4b4 100644 --- a/src/compiler/compile/create_module.ts +++ b/src/compiler/compile/create_module.ts @@ -26,7 +26,7 @@ export default function create_module( helpers.sort((a, b) => (a.name < b.name) ? -1 : 1); globals.sort((a, b) => (a.name < b.name) ? -1 : 1); - + const formatter = wrappers[format]; if (!formatter) { @@ -43,7 +43,7 @@ function edit_source(source, sveltePath) { } function get_internal_globals( - globals: Array<{ name: string; alias: Identifier }>, + globals: Array<{ name: string; alias: Identifier }>, helpers: Array<{ name: string; alias: Identifier }> ) { return globals.length > 0 && { @@ -66,7 +66,7 @@ function get_internal_globals( init: helpers.find(({ name }) => name === 'globals').alias }] }; -} +} function esm( program: any, @@ -93,12 +93,15 @@ function esm( const internal_globals = get_internal_globals(globals, helpers); // edit user imports - imports.forEach(node => { - node.source.value = edit_source(node.source.value, sveltePath); - }); - exports_from.forEach(node => { - node.source!.value = edit_source(node.source!.value, sveltePath); - }); + function rewrite_import(node) { + const value = edit_source(node.source.value, sveltePath); + if (node.source.value !== value) { + node.source.value = value; + node.source.raw = null; + } + } + imports.forEach(rewrite_import); + exports_from.forEach(rewrite_import); const exports = module_exports.length > 0 && { type: 'ExportNamedDeclaration', diff --git a/test/js/samples/custom-svelte-path/_config.js b/test/js/samples/custom-svelte-path/_config.js new file mode 100644 index 0000000000..19a7366845 --- /dev/null +++ b/test/js/samples/custom-svelte-path/_config.js @@ -0,0 +1,5 @@ +export default { + options: { + sveltePath: 'a/b/svelte' + } +}; diff --git a/test/js/samples/custom-svelte-path/expected.js b/test/js/samples/custom-svelte-path/expected.js new file mode 100644 index 0000000000..3210f216d3 --- /dev/null +++ b/test/js/samples/custom-svelte-path/expected.js @@ -0,0 +1,64 @@ +/* generated by Svelte vX.Y.Z */ +import { + SvelteComponent, + append, + detach, + element, + init, + insert, + noop, + safe_not_equal, + set_data, + text +} from "a/b/svelte/internal"; + +import { onMount } from "a/b/svelte"; + +function create_fragment(ctx) { + let h1; + let t0; + let t1; + let t2; + + return { + c() { + h1 = element("h1"); + t0 = text("Hello "); + t1 = text(/*name*/ ctx[0]); + t2 = text("!"); + }, + m(target, anchor) { + insert(target, h1, anchor); + append(h1, t0); + append(h1, t1); + append(h1, t2); + }, + p(ctx, [dirty]) { + if (dirty & /*name*/ 1) set_data(t1, /*name*/ ctx[0]); + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(h1); + } + }; +} + +function instance($$self, $$props, $$invalidate) { + let name = ''; + + onMount(() => { + $$invalidate(0, name = 'world'); + }); + + return [name]; +} + +class Component extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal, {}); + } +} + +export default Component; \ No newline at end of file diff --git a/test/js/samples/custom-svelte-path/input.svelte b/test/js/samples/custom-svelte-path/input.svelte new file mode 100644 index 0000000000..03d31e7c7b --- /dev/null +++ b/test/js/samples/custom-svelte-path/input.svelte @@ -0,0 +1,9 @@ + + +

Hello {name}!

\ No newline at end of file From 3f11232d241bc721eb084229da720b6079cdee6c Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 12 Oct 2021 16:16:44 -0400 Subject: [PATCH 5/8] -> v3.43.2 --- CHANGELOG.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59bdc33c5b..883fdcd56f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## 3.43.2 + +* Fix regression where user-specified `import`s were not rewritten according to the `sveltePath` option ([#6834](https://github.com/sveltejs/svelte/issues/6834)) + ## 3.43.1 * Prevent a rejecting promise used in `{#await}` during SSR from appearing as an unhandled rejection ([#6789](https://github.com/sveltejs/svelte/issues/6789)) diff --git a/package-lock.json b/package-lock.json index 872f3c61ea..4ea2ce35bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "svelte", - "version": "3.43.1", + "version": "3.43.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "svelte", - "version": "3.43.1", + "version": "3.43.2", "license": "MIT", "devDependencies": { "@ampproject/remapping": "^0.3.0", diff --git a/package.json b/package.json index 5b67d2c541..511ca60e05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.43.1", + "version": "3.43.2", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From be1eff0305236fbf0c103ba94638d8d6c428a77b Mon Sep 17 00:00:00 2001 From: Bjorn Lu <34116392+bluwy@users.noreply.github.com> Date: Mon, 18 Oct 2021 01:04:35 +0800 Subject: [PATCH 6/8] [feat] add enableSourcemap option (#6835) --- site/content/docs/04-compile-time.md | 2 ++ src/compiler/compile/Component.ts | 30 ++++++++++++------- src/compiler/compile/index.ts | 3 +- src/compiler/compile/render_dom/index.ts | 13 ++++++-- src/compiler/compile/render_ssr/index.ts | 5 +++- .../compile/utils/check_enable_sourcemap.ts | 10 +++++++ src/compiler/interfaces.ts | 3 ++ test/sourcemaps/index.ts | 12 ++++---- .../samples/no-sourcemap/_config.js | 5 ++++ .../samples/no-sourcemap/input.svelte | 11 +++++++ test/sourcemaps/samples/no-sourcemap/test.js | 4 +++ .../samples/only-css-sourcemap/_config.js | 5 ++++ .../samples/only-css-sourcemap/input.svelte | 11 +++++++ .../samples/only-css-sourcemap/test.js | 4 +++ .../samples/only-js-sourcemap/_config.js | 5 ++++ .../samples/only-js-sourcemap/input.svelte | 11 +++++++ .../samples/only-js-sourcemap/test.js | 4 +++ 17 files changed, 117 insertions(+), 21 deletions(-) create mode 100644 src/compiler/compile/utils/check_enable_sourcemap.ts create mode 100644 test/sourcemaps/samples/no-sourcemap/_config.js create mode 100644 test/sourcemaps/samples/no-sourcemap/input.svelte create mode 100644 test/sourcemaps/samples/no-sourcemap/test.js create mode 100644 test/sourcemaps/samples/only-css-sourcemap/_config.js create mode 100644 test/sourcemaps/samples/only-css-sourcemap/input.svelte create mode 100644 test/sourcemaps/samples/only-css-sourcemap/test.js create mode 100644 test/sourcemaps/samples/only-js-sourcemap/_config.js create mode 100644 test/sourcemaps/samples/only-js-sourcemap/input.svelte create mode 100644 test/sourcemaps/samples/only-js-sourcemap/test.js diff --git a/site/content/docs/04-compile-time.md b/site/content/docs/04-compile-time.md index ed6977f81f..8e709d7c37 100644 --- a/site/content/docs/04-compile-time.md +++ b/site/content/docs/04-compile-time.md @@ -82,6 +82,8 @@ The following options can be passed to the compiler. None are required: | `loopGuardTimeout` | 0 | A `number` that tells Svelte to break the loop if it blocks the thread for more than `loopGuardTimeout` ms. This is useful to prevent infinite loops. **Only available when `dev: true`** | `preserveComments` | `false` | If `true`, your HTML comments will be preserved during server-side rendering. By default, they are stripped out. | `preserveWhitespace` | `false` | If `true`, whitespace inside and between elements is kept as you typed it, rather than removed or collapsed to a single space where possible. +| `sourcemap` | `object | string` | An initial sourcemap that will be merged into the final output sourcemap. This is usually the preprocessor sourcemap. +| `enableSourcemap` | `boolean | { js: boolean; css: boolean; }` | If `true`, Svelte generate sourcemaps for components. Use an object with `js` or `css` for more granular control of sourcemap generation. By default, this is `true`. | `outputFilename` | `null` | A `string` used for your JavaScript sourcemap. | `cssOutputFilename` | `null` | A `string` used for your CSS sourcemap. | `sveltePath` | `"svelte"` | The location of the `svelte` package. Any imports from `svelte` or `svelte/[module]` will be modified accordingly. diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 202e14fd98..4d4cf909fd 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -36,6 +36,7 @@ import { clone } from '../utils/clone'; import compiler_warnings from './compiler_warnings'; import compiler_errors from './compiler_errors'; import { extract_ignores_above_position, extract_svelte_ignore_from_comments } from '../utils/extract_svelte_ignore'; +import check_enable_sourcemap from './utils/check_enable_sourcemap'; interface ComponentOptions { namespace?: string; @@ -343,21 +344,28 @@ export default class Component { ? { code: null, map: null } : result.css; - const sourcemap_source_filename = get_sourcemap_source_filename(compile_options); + const js_sourcemap_enabled = check_enable_sourcemap(compile_options.enableSourcemap, 'js'); - js = print(program, { - sourceMapSource: sourcemap_source_filename - }); + if (!js_sourcemap_enabled) { + js = print(program); + js.map = null; + } else { + const sourcemap_source_filename = get_sourcemap_source_filename(compile_options); - js.map.sources = [ - sourcemap_source_filename - ]; + js = print(program, { + sourceMapSource: sourcemap_source_filename + }); - js.map.sourcesContent = [ - this.source - ]; + js.map.sources = [ + sourcemap_source_filename + ]; - js.map = apply_preprocessor_sourcemap(sourcemap_source_filename, js.map, compile_options.sourcemap as (string | RawSourceMap | DecodedSourceMap)); + js.map.sourcesContent = [ + this.source + ]; + + js.map = apply_preprocessor_sourcemap(sourcemap_source_filename, js.map, compile_options.sourcemap as (string | RawSourceMap | DecodedSourceMap)); + } } return { diff --git a/src/compiler/compile/index.ts b/src/compiler/compile/index.ts index 96b24bceee..afe9c56cf4 100644 --- a/src/compiler/compile/index.ts +++ b/src/compiler/compile/index.ts @@ -13,6 +13,7 @@ const valid_options = [ 'name', 'filename', 'sourcemap', + 'enableSourcemap', 'generate', 'errorMode', 'varsReport', @@ -82,7 +83,7 @@ function validate_options(options: CompileOptions, warnings: Warning[]) { } export default function compile(source: string, options: CompileOptions = {}) { - options = Object.assign({ generate: 'dom', dev: false }, options); + options = Object.assign({ generate: 'dom', dev: false, enableSourcemap: true }, options); const stats = new Stats(); const warnings = []; diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts index f74f4cdf1c..89af0c297c 100644 --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -10,6 +10,7 @@ import { ImportDeclaration, ClassDeclaration, FunctionExpression, Node, Statemen import { apply_preprocessor_sourcemap } from '../../utils/mapped_code'; import { RawSourceMap, DecodedSourceMap } from '@ampproject/remapping/dist/types/types'; import { flatten } from '../../utils/flatten'; +import check_enable_sourcemap from '../utils/check_enable_sourcemap'; export default function dom( component: Component, @@ -34,9 +35,15 @@ export default function dom( const css = component.stylesheet.render(options.filename, !options.customElement); - css.map = apply_preprocessor_sourcemap(options.filename, css.map, options.sourcemap as string | RawSourceMap | DecodedSourceMap); + const css_sourcemap_enabled = check_enable_sourcemap(options.enableSourcemap, 'css'); - const styles = component.stylesheet.has_styles && options.dev + if (css_sourcemap_enabled) { + css.map = apply_preprocessor_sourcemap(options.filename, css.map, options.sourcemap as string | RawSourceMap | DecodedSourceMap); + } else { + css.map = null; + } + + const styles = css_sourcemap_enabled && component.stylesheet.has_styles && options.dev ? `${css.code}\n/*# sourceMappingURL=${css.map.toUrl()} */` : css.code; @@ -521,7 +528,7 @@ export default function dom( constructor(options) { super(); - ${css.code && b`this.shadowRoot.innerHTML = \`\`;`} + ${css.code && b`this.shadowRoot.innerHTML = \`\`;`} @init(this, { target: this.shadowRoot, props: ${init_props}, customElement: true }, ${definition}, ${has_create_fragment ? 'create_fragment' : 'null'}, ${not_equal}, ${prop_indexes}, null, ${dirty}); diff --git a/src/compiler/compile/render_ssr/index.ts b/src/compiler/compile/render_ssr/index.ts index b35a6ce6ff..9d2c1cc60b 100644 --- a/src/compiler/compile/render_ssr/index.ts +++ b/src/compiler/compile/render_ssr/index.ts @@ -10,6 +10,7 @@ import { extract_names } from 'periscopic'; import { walk } from 'estree-walker'; import { invalidate } from '../render_dom/invalidate'; +import check_enable_sourcemap from '../utils/check_enable_sourcemap'; export default function ssr( component: Component, @@ -200,11 +201,13 @@ export default function ssr( main ].filter(Boolean); + const css_sourcemap_enabled = check_enable_sourcemap(options.enableSourcemap, 'css'); + const js = b` ${css.code ? b` const #css = { code: "${css.code}", - map: ${css.map ? string_literal(css.map.toString()) : 'null'} + map: ${css_sourcemap_enabled && css.map ? string_literal(css.map.toString()) : 'null'} };` : null} ${component.extract_javascript(component.ast.module)} diff --git a/src/compiler/compile/utils/check_enable_sourcemap.ts b/src/compiler/compile/utils/check_enable_sourcemap.ts new file mode 100644 index 0000000000..51f07c353a --- /dev/null +++ b/src/compiler/compile/utils/check_enable_sourcemap.ts @@ -0,0 +1,10 @@ +import { EnableSourcemap } from '../../interfaces'; + +export default function check_enable_sourcemap( + enable_sourcemap: EnableSourcemap, + namespace: keyof Extract +) { + return typeof enable_sourcemap === 'boolean' + ? enable_sourcemap + : enable_sourcemap[namespace]; +} diff --git a/src/compiler/interfaces.ts b/src/compiler/interfaces.ts index 7446c4c14b..b999fbd803 100644 --- a/src/compiler/interfaces.ts +++ b/src/compiler/interfaces.ts @@ -131,6 +131,8 @@ export interface Warning { export type ModuleFormat = 'esm' | 'cjs'; +export type EnableSourcemap = boolean | { js: boolean; css: boolean }; + export type CssHashGetter = (args: { name: string; filename: string | undefined; @@ -147,6 +149,7 @@ export interface CompileOptions { varsReport?: 'full' | 'strict' | false; sourcemap?: object | string; + enableSourcemap?: EnableSourcemap; outputFilename?: string; cssOutputFilename?: string; sveltePath?: string; diff --git a/test/sourcemaps/index.ts b/test/sourcemaps/index.ts index 903629c06b..fc021cd6a7 100644 --- a/test/sourcemaps/index.ts +++ b/test/sourcemaps/index.ts @@ -85,11 +85,13 @@ describe('sourcemaps', () => { ); } - assert.deepEqual( - js.map.sources.slice().sort(), - (config.js_map_sources || ['input.svelte']).sort(), - 'js.map.sources is wrong' - ); + if (js.map) { + assert.deepEqual( + js.map.sources.slice().sort(), + (config.js_map_sources || ['input.svelte']).sort(), + 'js.map.sources is wrong' + ); + } if (css.map) { assert.deepEqual( css.map.sources.slice().sort(), diff --git a/test/sourcemaps/samples/no-sourcemap/_config.js b/test/sourcemaps/samples/no-sourcemap/_config.js new file mode 100644 index 0000000000..5b84d40554 --- /dev/null +++ b/test/sourcemaps/samples/no-sourcemap/_config.js @@ -0,0 +1,5 @@ +export default { + compile_options: { + enableSourcemap: false + } +}; diff --git a/test/sourcemaps/samples/no-sourcemap/input.svelte b/test/sourcemaps/samples/no-sourcemap/input.svelte new file mode 100644 index 0000000000..6d39eaad0e --- /dev/null +++ b/test/sourcemaps/samples/no-sourcemap/input.svelte @@ -0,0 +1,11 @@ + + +

{foo}

+ + diff --git a/test/sourcemaps/samples/no-sourcemap/test.js b/test/sourcemaps/samples/no-sourcemap/test.js new file mode 100644 index 0000000000..127459a54e --- /dev/null +++ b/test/sourcemaps/samples/no-sourcemap/test.js @@ -0,0 +1,4 @@ +export function test({ assert, js, css }) { + assert.equal(js.map, null); + assert.equal(css.map, null); +} diff --git a/test/sourcemaps/samples/only-css-sourcemap/_config.js b/test/sourcemaps/samples/only-css-sourcemap/_config.js new file mode 100644 index 0000000000..767e10a4b9 --- /dev/null +++ b/test/sourcemaps/samples/only-css-sourcemap/_config.js @@ -0,0 +1,5 @@ +export default { + compile_options: { + enableSourcemap: { css: true } + } +}; diff --git a/test/sourcemaps/samples/only-css-sourcemap/input.svelte b/test/sourcemaps/samples/only-css-sourcemap/input.svelte new file mode 100644 index 0000000000..6d39eaad0e --- /dev/null +++ b/test/sourcemaps/samples/only-css-sourcemap/input.svelte @@ -0,0 +1,11 @@ + + +

{foo}

+ + diff --git a/test/sourcemaps/samples/only-css-sourcemap/test.js b/test/sourcemaps/samples/only-css-sourcemap/test.js new file mode 100644 index 0000000000..a7ac6a9b0b --- /dev/null +++ b/test/sourcemaps/samples/only-css-sourcemap/test.js @@ -0,0 +1,4 @@ +export function test({ assert, js, css }) { + assert.equal(js.map, null); + assert.notEqual(css.map, null); +} diff --git a/test/sourcemaps/samples/only-js-sourcemap/_config.js b/test/sourcemaps/samples/only-js-sourcemap/_config.js new file mode 100644 index 0000000000..0b3b7987f1 --- /dev/null +++ b/test/sourcemaps/samples/only-js-sourcemap/_config.js @@ -0,0 +1,5 @@ +export default { + compile_options: { + enableSourcemap: { js: true } + } +}; diff --git a/test/sourcemaps/samples/only-js-sourcemap/input.svelte b/test/sourcemaps/samples/only-js-sourcemap/input.svelte new file mode 100644 index 0000000000..6d39eaad0e --- /dev/null +++ b/test/sourcemaps/samples/only-js-sourcemap/input.svelte @@ -0,0 +1,11 @@ + + +

{foo}

+ + diff --git a/test/sourcemaps/samples/only-js-sourcemap/test.js b/test/sourcemaps/samples/only-js-sourcemap/test.js new file mode 100644 index 0000000000..b150653c3d --- /dev/null +++ b/test/sourcemaps/samples/only-js-sourcemap/test.js @@ -0,0 +1,4 @@ +export function test({ assert, js, css }) { + assert.notEqual(js.map, null); + assert.equal(css.map, null); +} From e055570765dbaf41efb2af880f9b5110adc6888c Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 17 Oct 2021 13:07:27 -0400 Subject: [PATCH 7/8] -> v3.44.0 --- CHANGELOG.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 883fdcd56f..81ef8805d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Svelte changelog +## 3.44.0 + +* Add `enableSourcemap` compiler option ([#6835](https://github.com/sveltejs/svelte/pull/6835)) + ## 3.43.2 * Fix regression where user-specified `import`s were not rewritten according to the `sveltePath` option ([#6834](https://github.com/sveltejs/svelte/issues/6834)) diff --git a/package-lock.json b/package-lock.json index 4ea2ce35bc..e8bc9889a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "svelte", - "version": "3.43.2", + "version": "3.44.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "svelte", - "version": "3.43.2", + "version": "3.44.0", "license": "MIT", "devDependencies": { "@ampproject/remapping": "^0.3.0", diff --git a/package.json b/package.json index 511ca60e05..60ee4f179d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.43.2", + "version": "3.44.0", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", From 883c47b45de057726e44cd07b880bce37b1cef43 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 17 Oct 2021 13:16:12 -0400 Subject: [PATCH 8/8] [site] fix escaping in table of compiler options --- site/content/docs/04-compile-time.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/docs/04-compile-time.md b/site/content/docs/04-compile-time.md index 8e709d7c37..843daf2f84 100644 --- a/site/content/docs/04-compile-time.md +++ b/site/content/docs/04-compile-time.md @@ -82,8 +82,8 @@ The following options can be passed to the compiler. None are required: | `loopGuardTimeout` | 0 | A `number` that tells Svelte to break the loop if it blocks the thread for more than `loopGuardTimeout` ms. This is useful to prevent infinite loops. **Only available when `dev: true`** | `preserveComments` | `false` | If `true`, your HTML comments will be preserved during server-side rendering. By default, they are stripped out. | `preserveWhitespace` | `false` | If `true`, whitespace inside and between elements is kept as you typed it, rather than removed or collapsed to a single space where possible. -| `sourcemap` | `object | string` | An initial sourcemap that will be merged into the final output sourcemap. This is usually the preprocessor sourcemap. -| `enableSourcemap` | `boolean | { js: boolean; css: boolean; }` | If `true`, Svelte generate sourcemaps for components. Use an object with `js` or `css` for more granular control of sourcemap generation. By default, this is `true`. +| `sourcemap` | `object \| string` | An initial sourcemap that will be merged into the final output sourcemap. This is usually the preprocessor sourcemap. +| `enableSourcemap` | `boolean \| { js: boolean; css: boolean; }` | If `true`, Svelte generate sourcemaps for components. Use an object with `js` or `css` for more granular control of sourcemap generation. By default, this is `true`. | `outputFilename` | `null` | A `string` used for your JavaScript sourcemap. | `cssOutputFilename` | `null` | A `string` used for your CSS sourcemap. | `sveltePath` | `"svelte"` | The location of the `svelte` package. Any imports from `svelte` or `svelte/[module]` will be modified accordingly.