repo stringclasses 21
values | pull_number float64 45 194k | instance_id stringlengths 16 34 | issue_numbers stringlengths 6 27 | base_commit stringlengths 40 40 | patch stringlengths 263 270k | test_patch stringlengths 312 408k | problem_statement stringlengths 38 47.6k | hints_text stringlengths 1 257k ⌀ | created_at stringdate 2016-01-11 17:37:29 2024-10-18 14:52:41 | language stringclasses 4
values | Dockerfile stringclasses 279
values | P2P stringlengths 2 10.2M | F2P stringlengths 11 38.9k | F2F stringclasses 86
values | test_command stringlengths 27 11.4k | task_category stringclasses 5
values | is_no_nodes bool 2
classes | is_func_only bool 2
classes | is_class_only bool 2
classes | is_mixed bool 2
classes | num_func_changes int64 0 238 | num_class_changes int64 0 70 | num_nodes int64 0 264 | is_single_func bool 2
classes | is_single_class bool 2
classes | modified_nodes stringlengths 2 42.2k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sveltejs/svelte | 1,137 | sveltejs__svelte-1137 | ['1135'] | 86a07652d8d0c2f2895a7fea4610cf7beb43609b | diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts
--- a/src/generators/dom/index.ts
+++ b/src/generators/dom/index.ts
@@ -245,20 +245,20 @@ export default function dom(
${(templateProperties.oncreate || generator.hasComponents || generator.hasComplexBindings || generator.hasIntroTransitions) &... | diff --git a/test/js/samples/collapses-text-around-comments/expected-bundle.js b/test/js/samples/collapses-text-around-comments/expected-bundle.js
--- a/test/js/samples/collapses-text-around-comments/expected-bundle.js
+++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js
@@ -167,7 +167,7 @@ function ... | oncreate order should reflect component order
No REPL, pending https://github.com/sveltejs/svelte.technology/issues/205, but if you have a situation like this...
```html
<!-- App.html -->
<Nested name='foo'/>
<Nested name='bar'/>
<script>
import Nested from './Nested.html';
export default {
compon... | null | 2018-01-26 18:35:46+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['js window-binding-scroll', 'js inline-style-optimized-multiple', 'js event-handlers-custom', 'runtime component-binding-conditional (inline helpers)', 'js inline-style-optimized-url', 'js setup-method', 'js legacy-input-type', 'js css-media-query', 'js title', 'js use-elements-as-anchors', 'js collapses-text-around-c... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/shared/index.js->program->function_declaration:callAll", "src/generators/dom/index.ts->program->function_declaration:dom"] |
sveltejs/svelte | 1,148 | sveltejs__svelte-1148 | ['1143'] | 56e9343294d4a83806ab4640c6f4df968a258353 | diff --git a/src/generators/nodes/Attribute.ts b/src/generators/nodes/Attribute.ts
--- a/src/generators/nodes/Attribute.ts
+++ b/src/generators/nodes/Attribute.ts
@@ -540,6 +540,7 @@ const attributeLookup = {
'textarea',
],
},
+ volume: { appliesTo: ['audio', 'video'] },
width: {
appliesTo: ['canvas', 'em... | diff --git a/test/js/samples/media-bindings/expected-bundle.js b/test/js/samples/media-bindings/expected-bundle.js
--- a/test/js/samples/media-bindings/expected-bundle.js
+++ b/test/js/samples/media-bindings/expected-bundle.js
@@ -226,6 +226,12 @@ function create_main_fragment(state, component) {
component.set({ buf... | HTML <audio> volume attribute
I know that `volume` is not one of the documented bind properties for `<audio>`, but I'm surprised that setting the attribute doesn't work at all. This can be worked around with refs, but it would be handy if svelte did that for us when changing `volume`.
```html
<audio src="{{src}}" v... | Volume attributes currently compile the same way any regular attribute does:
```javascript
setAttribute(audio, "volume", state.volume);
```
Is there some corresponding property that needs to be used instead, that was missed [here](https://github.com/sveltejs/svelte/blob/56e9343294d4a83806ab4640c6f4df968a258353/... | 2018-02-03 17:33:43+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['js media-bindings'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 3 | 0 | 3 | false | false | ["src/generators/nodes/Binding.ts->program->function_declaration:isComputed", "src/validate/html/validateElement.ts->program->function_declaration:validateElement", "src/generators/nodes/Binding.ts->program->class_declaration:Binding->method_definition:munge"] |
sveltejs/svelte | 1,149 | sveltejs__svelte-1149 | ['1138'] | ca779a452d5fc841de9f51ce7ead58b6318679ff | diff --git a/src/css/Stylesheet.ts b/src/css/Stylesheet.ts
--- a/src/css/Stylesheet.ts
+++ b/src/css/Stylesheet.ts
@@ -25,12 +25,13 @@ class Rule {
this.selectors.forEach(selector => selector.apply(node, stack)); // TODO move the logic in here?
}
- isUsed() {
+ isUsed(dev: boolean) {
if (this.parent && this.p... | diff --git a/test/css/samples/cascade-false-empty-rule-dev/_config.js b/test/css/samples/cascade-false-empty-rule-dev/_config.js
new file mode 100644
--- /dev/null
+++ b/test/css/samples/cascade-false-empty-rule-dev/_config.js
@@ -0,0 +1,4 @@
+export default {
+ cascade: false,
+ dev: true
+};
\ No newline at end of fi... | Compiler should warn on empty style block
Small thing, but when tidying up components this would be helpful
[REPL](https://svelte.technology/repl?version=1.51.1&gist=b1fe8552385dbae6a8ca57f7f1c568ce)
```html
<div class='foo'>
no styles
</div>
<style>
.foo {
/* this should be warned about */
}
... | Maybe it should only warn when built in production? I know in development I'll leave empty blocks to fill in later, having a warning when running in development seems annoying.
I agree w/ @PaulBGD I can't tell you how many times I leave empty CSS selectors *on purpose* as a reminder to come back—so this has the potenti... | 2018-02-03 23:00:23+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['css cascade-false-empty-rule'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | false | false | true | 7 | 1 | 8 | false | false | ["src/css/Stylesheet.ts->program->class_declaration:Atrule->method_definition:isUsed", "src/css/Stylesheet.ts->program->class_declaration:Rule->method_definition:isUsed", "src/index.ts->program->function_declaration:compile", "src/css/Stylesheet.ts->program->class_declaration:Rule->method_definition:minify", "src/css/S... |
sveltejs/svelte | 1,150 | sveltejs__svelte-1150 | ['1131'] | 37d526003643c54c4e8eb093604cce9a16d2e778 | diff --git a/src/generators/nodes/AwaitBlock.ts b/src/generators/nodes/AwaitBlock.ts
--- a/src/generators/nodes/AwaitBlock.ts
+++ b/src/generators/nodes/AwaitBlock.ts
@@ -127,8 +127,10 @@ export default class AwaitBlock extends Node {
if (@isPromise(${promise})) {
${promise}.then(function(${value}) {
+ ... | diff --git a/test/runtime/samples/await-set-simultaneous/_config.js b/test/runtime/samples/await-set-simultaneous/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/await-set-simultaneous/_config.js
@@ -0,0 +1,16 @@
+export default {
+ test(assert, component, target) {
+ const promise = Promise.r... | component.set doesn't update ui when called from an awaiting promise
Repro: https://svelte.technology/repl?version=1.53.0&gist=bfd178f583f0be414daadb871a1e18d6
As shown in the repl, when calling this.set at the end of the awaited promise's chain, it fails to update the ui. The second button with the setTimeout works... | null | 2018-02-04 03:45:35+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime await-set-simultaneous (shared helpers)', 'runtime await-set-simultaneous (shared helpers , hydration)', 'runtime await-set-simultaneous (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/AwaitBlock.ts->program->class_declaration:AwaitBlock->method_definition:build"] |
sveltejs/svelte | 1,153 | sveltejs__svelte-1153 | ['1100'] | 29a156957fa0360046c11e5e66204df99e08f202 | diff --git a/src/generators/nodes/Component.ts b/src/generators/nodes/Component.ts
--- a/src/generators/nodes/Component.ts
+++ b/src/generators/nodes/Component.ts
@@ -140,40 +140,47 @@ export default class Component extends Node {
const setParentFromChildOnChange = new CodeBuilder();
const setParentFromChildO... | diff --git a/test/runtime/samples/store-component-binding/TextInput.html b/test/runtime/samples/store-component-binding/TextInput.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/store-component-binding/TextInput.html
@@ -0,0 +1 @@
+<input bind:value>
\ No newline at end of file
diff --git a/test/runt... | Component bindings can't access store
In an app with `store` support, any component can do this...
```html
<input bind:value=$whatever>
```
...but this doesn't work:
```html
<Widget bind:x=$y/>
```
It just sets `$y` on the parent component, rather than setting `y` on the store.
| null | 2018-02-04 15:52:23+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime store-component-binding (shared helpers)', 'runtime store-component-binding (inline helpers)', 'runtime store-component-binding (shared helpers , hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/Component.ts->program->class_declaration:Component->method_definition:build"] |
sveltejs/svelte | 1,160 | sveltejs__svelte-1160 | ['1108'] | 0ef8229077908ffbfe8507804f3fb9f5a13fee28 | diff --git a/src/generators/nodes/Element.ts b/src/generators/nodes/Element.ts
--- a/src/generators/nodes/Element.ts
+++ b/src/generators/nodes/Element.ts
@@ -162,6 +162,8 @@ export default class Element extends Node {
this.generator.slots.add(slotName);
}
+ if (this.name === 'noscript') return;
+
const ch... | diff --git a/test/runtime/samples/noscript-removal/_config.js b/test/runtime/samples/noscript-removal/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/noscript-removal/_config.js
@@ -0,0 +1,9 @@
+export default {
+ 'skip-ssr': true,
+
+ html: `
+ <div>foo</div>
+
+ <div>foo<div>foo</div></div>
+... | <noscript> handling
Via https://github.com/sveltejs/sapper/issues/76. It probably makes sense just to ignore anything inside a `<noscript>` that's part of the template (except in SSR mode), since the fact that the component is rendering is proof that `<noscript>` doesn't apply.
| Agreed, as long as long as we document that `<noscript>`, if needed, should be placed outside the context of any given component. | 2018-02-08 06:26:37+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime noscript-removal (shared helpers)', 'runtime noscript-removal (inline helpers)', 'runtime noscript-removal (shared helpers , hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/generators/nodes/Element.ts->program->class_declaration:Element->method_definition:build", "src/generators/nodes/Element.ts->program->class_declaration:Element->method_definition:build->function_declaration:toHTML"] |
sveltejs/svelte | 1,169 | sveltejs__svelte-1169 | ['1166'] | 173792fd90c1258ad7bd123af9cd55ee6b2d4196 | diff --git a/src/generators/nodes/Component.ts b/src/generators/nodes/Component.ts
--- a/src/generators/nodes/Component.ts
+++ b/src/generators/nodes/Component.ts
@@ -5,10 +5,17 @@ import CodeBuilder from '../../utils/CodeBuilder';
import getTailSnippet from '../../utils/getTailSnippet';
import getObject from '../../... | diff --git a/test/js/samples/legacy-default/_config.js b/test/js/samples/legacy-default/_config.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/legacy-default/_config.js
@@ -0,0 +1,5 @@
+export default {
+ options: {
+ legacy: true
+ }
+};
\ No newline at end of file
diff --git a/test/js/samples/legacy-def... | Output ['default'] instead of .default
Things like `slots.default` don't work in Lynx and Mosaic 😀
We need to use `slots['default']` instead. Via https://github.com/sveltejs/svelte/pull/1159
| (Forgot to add — we probably only want to do this in `legacy` mode)
Lynx and Mosaic, lol 👌 | 2018-02-10 17:22:39+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['js legacy-default'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 5 | 0 | 5 | false | false | ["src/generators/nodes/Component.ts->program->function_declaration:mungeEventHandler", "src/generators/nodes/Component.ts->program->function_declaration:quoteIfNecessary", "src/generators/nodes/Component.ts->program->class_declaration:Component->method_definition:build", "src/generators/nodes/Slot.ts->program->class_de... |
sveltejs/svelte | 1,185 | sveltejs__svelte-1185 | ['1144', '1144'] | a80104374b43598ecaee30dbf83e18168b3d905d | diff --git a/src/generators/nodes/Slot.ts b/src/generators/nodes/Slot.ts
--- a/src/generators/nodes/Slot.ts
+++ b/src/generators/nodes/Slot.ts
@@ -57,6 +57,7 @@ export default class Slot extends Element {
block.builders.create.pushCondition(`!${content_name}`);
block.builders.hydrate.pushCondition(`!${content_nam... | diff --git a/test/runtime/samples/component-slot-dynamic/Nested.html b/test/runtime/samples/component-slot-dynamic/Nested.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/component-slot-dynamic/Nested.html
@@ -0,0 +1,13 @@
+<slot>
+ <span>{{foo}}</span>
+</slot>
+
+<script>
+ export default {
+ data(... | `text is undefined` error with hydrated slotted component with default slot contents using bound computed properties
The setup is as convoluted as the title suggests, ha. I'm trying to do something pretty stupid, so I'm not exactly surprised that things break, but I found it interesting it seems to happen only when all... | Finally taking a poke at this — it's a hell of a bug. Think I've whittled it down to [this](https://svelte.technology/repl?version=1.55.0&gist=0fde0f660ffbe7a4eeb249d77c0333e0) — if the default slotted content has anything dynamic, it causes problems.
Your repro was using Sapper 0.5.1 which actually got hydrating ba... | 2018-02-24 17:15:47+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime component-slot-dynamic (shared helpers , hydration)', 'runtime component-slot-dynamic (shared helpers)', 'runtime component-slot-dynamic (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/Slot.ts->program->class_declaration:Slot->method_definition:build"] |
sveltejs/svelte | 1,190 | sveltejs__svelte-1190 | ['1118', '1118'] | 0c3e44ac05c651c12c94e047bf712cb86278d345 | diff --git a/src/css/Stylesheet.ts b/src/css/Stylesheet.ts
--- a/src/css/Stylesheet.ts
+++ b/src/css/Stylesheet.ts
@@ -69,7 +69,7 @@ class Rule {
transform(code: MagicString, id: string, keyframes: Map<string, string>, cascade: boolean) {
if (this.parent && this.parent.node.type === 'Atrule' && this.parent.node.na... | diff --git a/test/css/index.js b/test/css/index.js
--- a/test/css/index.js
+++ b/test/css/index.js
@@ -95,7 +95,7 @@ describe('css', () => {
css: read(`test/css/samples/${dir}/expected.css`)
};
- assert.equal(dom.css.replace(/svelte-\d+/g, 'svelte-xyz'), expected.css);
+ assert.equal(dom.css.replace(/sve... | Use classes instead of attributes for scoping
Classes are always faster than attributes. We should consider using them:
```html
<!-- this... -->
<div class='svelte-xyz123'>...</div>
<div class='svelte-xyz123 foo'>...</div>
<!-- ...instead of this: -->
<div svelte-xyz123>...</div>
<div svelte-xyz123 class='fo... | Attributes are main reason why I don't use scoped styles in Svelte. Classes really should be used for this.
If we did something like #890 and deprecated passing a string (maybe allowing passing an array?) we could in a non-backwards compatibility way have no issue with making this change.
Attributes are main reason why... | 2018-02-24 23:41:49+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['css cascade-false', 'css omit-scoping-attribute-attribute-selector-equals-case-insensitive', 'css combinator-child', 'ssr styles-nested', 'css cascade-false-keyframes-from-to', 'css cascade-false-universal-selector', 'css supports-query', 'css omit-scoping-attribute-descendant-global-inner-class', 'css omit-scoping-a... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 7 | 0 | 7 | false | false | ["src/generators/nodes/Attribute.ts->program->class_declaration:Attribute->method_definition:render", "src/generators/server-side-rendering/visitors/Element.ts->program->function_declaration:visitElement", "src/utils/hash.ts->program->function_declaration:hash", "src/generators/nodes/Element.ts->program->class_declarat... |
sveltejs/svelte | 1,199 | sveltejs__svelte-1199 | ['1195', '1195'] | 8aaf92aca282a81475964a6460de3f1ed46159f6 | diff --git a/src/generators/nodes/IfBlock.ts b/src/generators/nodes/IfBlock.ts
--- a/src/generators/nodes/IfBlock.ts
+++ b/src/generators/nodes/IfBlock.ts
@@ -313,15 +313,12 @@ function compound(
const current_block_type = block.getUniqueName(`current_block_type`);
const current_block_type_and = hasElse ? '' : `${c... | diff --git a/test/js/samples/if-block-no-update/expected-bundle.js b/test/js/samples/if-block-no-update/expected-bundle.js
--- a/test/js/samples/if-block-no-update/expected-bundle.js
+++ b/test/js/samples/if-block-no-update/expected-bundle.js
@@ -189,6 +189,10 @@ var proto = {
function create_main_fragment(component, ... | bug with select_block_type function
We have code wich work perfect in 1.54.1 version. But in 1.56 this code not working.
Exampes:
- [54.1](https://svelte.technology/repl?version=1.54.1&gist=c5fefd4ac9568c773a668237108ad8c1)
- [56](https://svelte.technology/repl?version=1.56.0&gist=c5fefd4ac9568c773a668237108ad8... | Was just preparing a [REPL](https://svelte.technology/repl?version=1.56.0&gist=9bf16064d22bb098855ee5b1244902a4) about the same problem:
Throws "item is not defined" - seems to happen when using `{{else}}` inside `{{#each}}`. If the `{{else}}` is removed, no error is thrown.
Works fine with 0.55.
It _looks_ like ... | 2018-03-02 21:08:00+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime if-block-else-in-each (inline helpers)', 'js if-block-no-update', 'runtime if-block-else-in-each (shared helpers , hydration)', 'runtime if-block-else-in-each (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/IfBlock.ts->program->function_declaration:compound"] |
sveltejs/svelte | 1,210 | sveltejs__svelte-1210 | ['1201', '1201'] | 18d3313838bb744017f18a60d28046c2af645ac8 | diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts
--- a/src/generators/dom/index.ts
+++ b/src/generators/dom/index.ts
@@ -267,7 +267,7 @@ export default function dom(
this._fragment.c();
this._fragment.${block.hasIntroMethod ? 'i' : 'm'}(this.shadowRoot, null);
- if (options.target) thi... | diff --git a/test/js/samples/collapses-text-around-comments/expected-bundle.js b/test/js/samples/collapses-text-around-comments/expected-bundle.js
--- a/test/js/samples/collapses-text-around-comments/expected-bundle.js
+++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js
@@ -171,7 +171,7 @@ function ... | always use `_mount`, even if top-level
Using `this._mount(target, anchor)` instead of `this._fragment.m(target, anchor)` would fix https://github.com/sveltejs/svelte-loader/issues/43. Using a private `_mount` method like this is arguably a bit of a hack, and we could discuss whether we need to make it a public method f... | 2018-03-06 17:31:01+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['js window-binding-scroll', 'runtime transition-js-nested-intro (shared helpers , hydration)', 'js inline-style-optimized-multiple', 'js legacy-default', 'js event-handlers-custom', 'js inline-style-optimized-url', 'js setup-method', 'js legacy-input-type', 'js css-media-query', 'runtime transition-js-nested-intro (in... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 2 | 0 | 2 | false | false | ["src/shared/index.js->program->function_declaration:_mount", "src/generators/dom/index.ts->program->function_declaration:dom"] | |
sveltejs/svelte | 1,216 | sveltejs__svelte-1216 | ['1213'] | c45b18a387f6e20b26c4630cbef7f5d7812c9395 | diff --git a/src/generators/dom/Block.ts b/src/generators/dom/Block.ts
--- a/src/generators/dom/Block.ts
+++ b/src/generators/dom/Block.ts
@@ -112,9 +112,13 @@ export default class Block {
this.hasOutroMethod = false;
this.outros = 0;
- this.aliases = new Map();
- this.variables = new Map();
this.getUnique... | diff --git a/test/runtime/samples/deconflict-component-refs/_config.js b/test/runtime/samples/deconflict-component-refs/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/deconflict-component-refs/_config.js
@@ -0,0 +1,17 @@
+export default {
+ html: `
+ <ul>
+ <li><input></li>
+ <li>bar</li>... | can't use `component` as a context name
Eek, I really caused some damage with #1173: https://svelte.technology/repl?version=1.56.2&gist=a3cf9f2071401f3d6ee7a92e049b8d97
The line `var component = state.component` unsurprisingly breaks everything. This is the root cause of https://github.com/sveltejs/svelte.technology... | Same is true for 'state': https://svelte.technology/repl?version=1.56.2&gist=0961ec1f092efd58571345fc5b5515f2 | 2018-03-07 15:01:30+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime deconflict-component-refs (shared helpers , hydration)', 'runtime deconflict-component-refs (inline helpers)', 'runtime deconflict-component-refs (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/dom/Block.ts->program->class_declaration:Block->method_definition:constructor"] |
sveltejs/svelte | 1,220 | sveltejs__svelte-1220 | ['1206'] | 89c830ebe7bdb2a198e8f2df0ba915d731629ec0 | diff --git a/src/generators/nodes/EachBlock.ts b/src/generators/nodes/EachBlock.ts
--- a/src/generators/nodes/EachBlock.ts
+++ b/src/generators/nodes/EachBlock.ts
@@ -75,6 +75,7 @@ export default class EachBlock extends Node {
}
this.contextProps = [
+ `${this.block.listName}: ${this.block.listName}`,
`${... | diff --git a/test/js/samples/each-block-changed-check/expected-bundle.js b/test/js/samples/each-block-changed-check/expected-bundle.js
--- a/test/js/samples/each-block-changed-check/expected-bundle.js
+++ b/test/js/samples/each-block-changed-check/expected-bundle.js
@@ -212,6 +212,7 @@ function create_main_fragment(com... | Another 1.56 context bug
Via [StackOverflow](https://stackoverflow.com/questions/49119171/event-computed-property-issue/49120647#49120647):
```html
<p><input bind:value=search></p>
{{#each categories.filter(predicate) as category}}
<!-- the click event should work, right? -->
<button on:click='console.lo... | Poked around in the REPL, dunno if this is helpful but here goes nothing.
https://gist.github.com/tivac/7c74c2b8f8927612b4f057ad16d5e782#file-output-js-L33-L36
`create_main_fragment` is calling `create_each_block` and passing it a `category` and a `category_index` in the `state` object.
https://gist.github.com... | 2018-03-09 03:03:17+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime each-block-array-literal (inline helpers)', 'js each-block-changed-check', 'runtime each-block-array-literal (shared helpers)', 'runtime each-block-array-literal (shared helpers , hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:init"] |
sveltejs/svelte | 1,226 | sveltejs__svelte-1226 | ['1224'] | d9136d97aef3d94322ad50820da42dd5e4e73658 | diff --git a/src/generators/nodes/Attribute.ts b/src/generators/nodes/Attribute.ts
--- a/src/generators/nodes/Attribute.ts
+++ b/src/generators/nodes/Attribute.ts
@@ -141,7 +141,7 @@ export default class Attribute {
shouldCache = true;
}
- if (node._needsCssAttribute && propertyName === 'className') {
+ ... | diff --git a/test/runtime/samples/svg-with-style/_config.js b/test/runtime/samples/svg-with-style/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/svg-with-style/_config.js
@@ -0,0 +1,17 @@
+export default {
+ compileOptions: {
+ cascade: false
+ },
+
+ data: {
+ x: 'bar'
+ },
+
+ html: `
+ <... | .className can't be used to set classes on SVG elements
Via https://github.com/sveltejs/svelte.technology/issues/216
As of Svelte 1.57.0 we are using classes to scope styles instead of attributes, and SVG DOM elements do not implement a `className` setter, so trying to set that throws an exception. Classes _are_ all... | null | 2018-03-12 12:15:17+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime svg-with-style (inline helpers)', 'runtime svg-with-style (shared helpers , hydration)', 'ssr svg-with-style', 'runtime svg-with-style (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 3 | 0 | 3 | false | false | ["src/generators/nodes/Attribute.ts->program->class_declaration:Attribute->method_definition:render", "src/generators/nodes/Element.ts->program->class_declaration:Element->method_definition:build", "src/server-side-rendering/register.js->program->function_declaration:register"] |
sveltejs/svelte | 1,227 | sveltejs__svelte-1227 | ['1223'] | dc4fdcf77e6156da9579c03d83668f86b5a54c1a | diff --git a/src/generators/nodes/Element.ts b/src/generators/nodes/Element.ts
--- a/src/generators/nodes/Element.ts
+++ b/src/generators/nodes/Element.ts
@@ -438,8 +438,8 @@ export default class Element extends Node {
}
node.attributes.forEach((attr: Node) => {
- const value = node._needsCssAttribute && a... | diff --git a/test/css/samples/cascade-false-nested/_config.js b/test/css/samples/cascade-false-nested/_config.js
new file mode 100644
--- /dev/null
+++ b/test/css/samples/cascade-false-nested/_config.js
@@ -0,0 +1,7 @@
+export default {
+ cascade: false,
+
+ data: {
+ dynamic: 'x'
+ }
+};
\ No newline at end of file
d... | CSS - Class not applied to child elements
> Linux Mint 18.3 Cinnamon
> Google Chrome Version 65.0.3325.146 (Official Build) (64-bit)
> Firefox Quantum 58.0.2 (64-bit)
> svelte: ^1.57.1
[Svelte REPL gist](https://svelte.technology/repl?version=1.57.1&gist=64afb258047bba01ced7946648335bd5)
```html
<!-- DevTools I... | null | 2018-03-12 15:26:30+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['css cascade-false-nested'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/Element.ts->program->class_declaration:Element->method_definition:build->function_declaration:toHTML"] |
sveltejs/svelte | 1,228 | sveltejs__svelte-1228 | ['1223'] | dc4fdcf77e6156da9579c03d83668f86b5a54c1a | diff --git a/src/css/Selector.ts b/src/css/Selector.ts
--- a/src/css/Selector.ts
+++ b/src/css/Selector.ts
@@ -1,16 +1,19 @@
import MagicString from 'magic-string';
+import Stylesheet from './Stylesheet';
import { gatherPossibleValues, UNKNOWN } from './gatherPossibleValues';
import { Validator } from '../validate/i... | diff --git a/test/css/samples/cascade-false-nested/_config.js b/test/css/samples/cascade-false-nested/_config.js
new file mode 100644
--- /dev/null
+++ b/test/css/samples/cascade-false-nested/_config.js
@@ -0,0 +1,7 @@
+export default {
+ cascade: false,
+
+ data: {
+ dynamic: 'x'
+ }
+};
\ No newline at end of file
d... | CSS - Class not applied to child elements
> Linux Mint 18.3 Cinnamon
> Google Chrome Version 65.0.3325.146 (Official Build) (64-bit)
> Firefox Quantum 58.0.2 (64-bit)
> svelte: ^1.57.1
[Svelte REPL gist](https://svelte.technology/repl?version=1.57.1&gist=64afb258047bba01ced7946648335bd5)
```html
<!-- DevTools I... | null | 2018-03-12 18:42:51+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['css cascade-false-nested'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 13 | 3 | 16 | false | false | ["src/generators/nodes/Attribute.ts->program->class_declaration:Attribute->method_definition:render", "src/generators/Generator.ts->program->class_declaration:Generator->method_definition:constructor", "src/generators/nodes/Element.ts->program->class_declaration:Element", "src/css/Selector.ts->program->class_declaratio... |
sveltejs/svelte | 1,231 | sveltejs__svelte-1231 | ['1229'] | 0ac77019d0bbde3c626f5da36a8637cffa7788f9 | diff --git a/src/generators/dom/Block.ts b/src/generators/dom/Block.ts
--- a/src/generators/dom/Block.ts
+++ b/src/generators/dom/Block.ts
@@ -44,6 +44,7 @@ export default class Block {
listNames: Map<string, string>;
indexName: string;
listName: string;
+ listAlias: string;
builders: {
init: CodeBuilder;
... | diff --git a/test/js/samples/deconflict-builtins/expected-bundle.js b/test/js/samples/deconflict-builtins/expected-bundle.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/deconflict-builtins/expected-bundle.js
@@ -0,0 +1,324 @@
+function noop() {}
+
+function assign(target) {
+ var k,
+ source,
+ i = 1,
+ ... | Context variable overrides shared helper when `hydratable: true`
It seems having keys with the same name as shared helpers can cause problems in v1.57 SSR.
eg. This runs fine on the repl, but will error when SSRing because `claim` will try to call `children`:
https://svelte.technology/repl?version=1.57.0&gist=9a2... | null | 2018-03-13 16:34:56+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['js deconflict-builtins'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 3 | 1 | 4 | false | false | ["src/generators/dom/Block.ts->program->class_declaration:Block", "src/generators/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:build", "src/generators/dom/Block.ts->program->class_declaration:Block->method_definition:constructor", "src/generators/nodes/EachBlock.ts->program->class_declara... |
sveltejs/svelte | 1,237 | sveltejs__svelte-1237 | ['1209'] | 0ac77019d0bbde3c626f5da36a8637cffa7788f9 | diff --git a/src/generators/nodes/Attribute.ts b/src/generators/nodes/Attribute.ts
--- a/src/generators/nodes/Attribute.ts
+++ b/src/generators/nodes/Attribute.ts
@@ -518,7 +518,6 @@ const attributeLookup = {
type: {
appliesTo: [
'button',
- 'input',
'command',
'embed',
'object',
| diff --git a/test/js/samples/input-without-blowback-guard/expected-bundle.js b/test/js/samples/input-without-blowback-guard/expected-bundle.js
--- a/test/js/samples/input-without-blowback-guard/expected-bundle.js
+++ b/test/js/samples/input-without-blowback-guard/expected-bundle.js
@@ -33,6 +33,10 @@ function removeLis... | Input types in IE
The way Svelte creates inputs that are not supported in IE throws an 'Invalid argument' error.
Example:
https://svelte.technology/repl?version=1.56.2&gist=fa8724f2cbebbcf391e3184b0bc5c39c
I have a hard time finding some good docs on this, but here are some similar issues:
https://github.com/em... | null | 2018-03-14 20:57:23+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['js input-without-blowback-guard'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | true | false | false | false | 0 | 0 | 0 | false | false | [] |
sveltejs/svelte | 1,239 | sveltejs__svelte-1239 | ['1221'] | 0ac77019d0bbde3c626f5da36a8637cffa7788f9 | diff --git a/src/shared/transitions.js b/src/shared/transitions.js
--- a/src/shared/transitions.js
+++ b/src/shared/transitions.js
@@ -106,7 +106,7 @@ export function wrapTransition(component, node, fn, params, intro, outgroup) {
// when introing, discard old animations if there are any
return anim && (pr... | diff --git a/test/runtime/samples/transition-css-duration/_config.js b/test/runtime/samples/transition-css-duration/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/transition-css-duration/_config.js
@@ -0,0 +1,11 @@
+export default {
+ test(assert, component, target, window, raf) {
+ component... | Transitions not cancelled
Haven't fully diagnosed this but it seems maybe the transition manager is behaving as though the initial transition were still in play:
* https://svelte.technology/repl?version=1.55.0&gist=8411165d371374aab0ed259edf1c954e
* https://svelte.technology/repl?version=1.57.1&gist=51c62c40f99041f... | null | 2018-03-15 01:42:32+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime transition-css-duration (inline helpers)', 'runtime transition-css-duration (shared helpers)', 'runtime transition-css-duration (shared helpers , hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/shared/transitions.js->program->function_declaration:wrapTransition"] |
sveltejs/svelte | 1,243 | sveltejs__svelte-1243 | ['1240', '1240'] | 6f866bbb4c3a1d0f04d67ff67568809b879b958a | diff --git a/src/generators/dom/Block.ts b/src/generators/dom/Block.ts
--- a/src/generators/dom/Block.ts
+++ b/src/generators/dom/Block.ts
@@ -19,8 +19,6 @@ export interface BlockOptions {
changeableIndexes?: Map<string, boolean>;
indexNames?: Map<string, string>;
listNames?: Map<string, string>;
- indexName?: st... | diff --git a/test/js/samples/deconflict-builtins/expected-bundle.js b/test/js/samples/deconflict-builtins/expected-bundle.js
--- a/test/js/samples/deconflict-builtins/expected-bundle.js
+++ b/test/js/samples/deconflict-builtins/expected-bundle.js
@@ -204,14 +204,14 @@ var proto = {
function create_main_fragment(compon... | Access to item of cycle from "if" statement if item name same as list name in object
Example:
https://svelte.technology/repl?version=1.57.3&gist=f4516e85ec78b9f36191940f00856367
This not working, because for the cycle over an item of an object we should pull up list object to the event handler and in this case, we ... | 2018-03-15 18:09:14+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime each-block-deconflict-name-context (shared helpers)', 'runtime each-block-deconflict-name-context (inline helpers)', 'js deconflict-builtins', 'js each-block-changed-check', 'runtime each-block-deconflict-name-context (shared helpers , hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 5 | 1 | 6 | false | false | ["src/generators/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:build", "src/generators/dom/Block.ts->program->class_declaration:Block", "src/generators/nodes/Component.ts->program->class_declaration:Component->method_definition:build", "src/generators/dom/Block.ts->program->class_declarati... | |
sveltejs/svelte | 1,258 | sveltejs__svelte-1258 | ['1254', '1254'] | 35a7fc6d3280cb628605343d1edc777b00ad9b1e | diff --git a/src/generators/nodes/EachBlock.ts b/src/generators/nodes/EachBlock.ts
--- a/src/generators/nodes/EachBlock.ts
+++ b/src/generators/nodes/EachBlock.ts
@@ -54,9 +54,11 @@ export default class EachBlock extends Node {
this.block.contextTypes.set(this.context, 'each');
this.block.indexNames.set(this.cont... | diff --git a/test/helpers.js b/test/helpers.js
--- a/test/helpers.js
+++ b/test/helpers.js
@@ -174,7 +174,7 @@ function capitalise(str) {
return str[0].toUpperCase() + str.slice(1);
}
-export function showOutput(cwd, options = {}, s = svelte) {
+export function showOutput(cwd, options = {}, compile = svelte.compil... | Element name can conflict with local context var
[REPL](https://svelte.technology/repl?version=1.57.4&gist=67af4efd3216f0ddadf3c66e8b7c5e05) — the `i` in `{{#each tagList as tag, i}}` conflicts with the `<i>` element
Element name can conflict with local context var
[REPL](https://svelte.technology/repl?version=1.57.4&g... | 2018-03-18 23:49:37+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime deconflict-elements-indexes (shared helpers)', 'runtime deconflict-elements-indexes (inline helpers)', 'runtime deconflict-elements-indexes (shared helpers , hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:init"] | |
sveltejs/svelte | 1,292 | sveltejs__svelte-1292 | ['1291'] | 78f506a50b8aeda6796594db4657334c13bcd160 | diff --git a/src/generators/nodes/EachBlock.ts b/src/generators/nodes/EachBlock.ts
--- a/src/generators/nodes/EachBlock.ts
+++ b/src/generators/nodes/EachBlock.ts
@@ -296,7 +296,7 @@ export default class EachBlock extends Node {
block.builders.update.addBlock(deindent`
var ${each_block_value} = ${snippet};
- ... | diff --git a/test/runtime/samples/each-block-keyed-static/_config.js b/test/runtime/samples/each-block-keyed-static/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/each-block-keyed-static/_config.js
@@ -0,0 +1,10 @@
+export default {
+ data: {
+ x: [{ z: 1 }, { z: 2 }],
+ },
+
+ html: `
+ <p>... | Keyed each blocks break with static content
[REPL](https://svelte.technology/repl?version=1.58.5&gist=b72943d6863d322b077c61b36a0c19ba).
The offending code:
```js
each_blocks_1 = updateKeyedEach(each_blocks_1, component, changed, "z",, each_value, each_lookup, each_anchor.parentNode, false, create_each_block, "... | null | 2018-03-30 19:44:47+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime each-block-keyed-static (inline helpers)', 'runtime each-block-keyed-static (shared helpers)', 'runtime each-block-keyed-static (shared helpers , hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:buildKeyed"] |
sveltejs/svelte | 1,294 | sveltejs__svelte-1294 | ['531'] | 78f506a50b8aeda6796594db4657334c13bcd160 | diff --git a/src/generators/nodes/Element.ts b/src/generators/nodes/Element.ts
--- a/src/generators/nodes/Element.ts
+++ b/src/generators/nodes/Element.ts
@@ -516,8 +516,16 @@ export default class Element extends Node {
});
`);
+
+ block.builders.hydrate.addBlock(deindent`
+ if (${handlerName}.teard... | diff --git a/test/js/samples/event-handlers-custom/expected-bundle.js b/test/js/samples/event-handlers-custom/expected-bundle.js
--- a/test/js/samples/event-handlers-custom/expected-bundle.js
+++ b/test/js/samples/event-handlers-custom/expected-bundle.js
@@ -199,6 +199,10 @@ function create_main_fragment(component, sta... | `.destroy()` vs `.teardown()` for custom events
in the [custom methods documentation](https://svelte.technology/guide#custom-methods) the event `longpress` returns `{destroy}` but the generated code in the REPL has `longpress_handler.teardown()` called in the destroy method. The longpress event would never get removed.... | I believe this is a docs issue, not a codegen issue. After `teardown` was renamed to `destroy` for components, the docs were updated ([link](https://github.com/sveltejs/svelte.technology/pull/71)), but the update was overenthusiastic in scope, as `teardown` was still used for custom event definitions ([link](https://gi... | 2018-03-30 19:50:32+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime dev-warning-custom-event-destroy-not-teardown (shared helpers , hydration)', 'js event-handlers-custom', 'runtime dev-warning-custom-event-destroy-not-teardown (inline helpers)', 'runtime dev-warning-custom-event-destroy-not-teardown (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/Element.ts->program->class_declaration:Element->method_definition:addEventHandlers"] |
sveltejs/svelte | 1,298 | sveltejs__svelte-1298 | ['795'] | ae25641f8b5c3deb393b4aed5eba26e4f8b52f3a | diff --git a/src/css/Stylesheet.ts b/src/css/Stylesheet.ts
--- a/src/css/Stylesheet.ts
+++ b/src/css/Stylesheet.ts
@@ -375,7 +375,7 @@ export default class Stylesheet {
render(cssOutputFilename: string, shouldTransformSelectors: boolean) {
if (!this.hasStyles) {
- return { css: null, cssMap: null };
+ return... | diff --git a/test/css/index.js b/test/css/index.js
--- a/test/css/index.js
+++ b/test/css/index.js
@@ -81,7 +81,7 @@ describe('css', () => {
checkCodeIsValid(dom.code);
checkCodeIsValid(ssr.code);
- assert.equal(dom.css, ssr.css);
+ assert.equal(dom.css.toString(), ssr.css.toString());
assert.deepEq... | const { js, css } = svelte.compile(...)
This is a relatively minor aesthetic thing, but the current API doesn't treat CSS as a first-class citizen. Rather than this...
```js
const { code, map, css, cssMap, ast } = svelte.compile(...);
```
...I think we should have this:
```js
const { js, css, ast } = svelte... | Then again v2 will change the return value to a Promise, so perhaps it makes sense to wait until then. | 2018-04-01 15:18:11+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['sourcemaps basic', 'sourcemaps binding', 'sourcemaps static-no-script', 'sourcemaps each-block', 'sourcemaps css-cascade-false', 'sourcemaps script', 'sourcemaps binding-shorthand', 'sourcemaps css'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 4 | 0 | 4 | false | false | ["src/css/Stylesheet.ts->program->class_declaration:Stylesheet->method_definition:render", "src/generators/Generator.ts->program->class_declaration:Generator->method_definition:generate", "src/generators/server-side-rendering/index.ts->program->function_declaration:ssr", "src/generators/dom/index.ts->program->function_... |
sveltejs/svelte | 1,308 | sveltejs__svelte-1308 | ['1307'] | db21e80a99ec5103f64cb9578c9f86e60cc59fbf | diff --git a/src/generators/nodes/Component.ts b/src/generators/nodes/Component.ts
--- a/src/generators/nodes/Component.ts
+++ b/src/generators/nodes/Component.ts
@@ -145,8 +145,10 @@ export default class Component extends Node {
}
});
+ block.addVariable(levels);
+
statements.push(deindent`
- ... | diff --git a/test/runtime/samples/spread-component-dynamic/Foo.html b/test/runtime/samples/spread-component-dynamic/Foo.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/spread-component-dynamic/Foo.html
@@ -0,0 +1 @@
+<p>a: {{a}}</p>
\ No newline at end of file
diff --git a/test/runtime/samples/spread... | switch_instance_spread_levels is not defined
[REPL](https://svelte.technology/repl?version=1.60.0&gist=6acdb5552f0aa44dbc55bf9f770e7093). This prevents you from using spread props with `<:Component>`, which is perhaps where they're most useful.
| null | 2018-04-03 20:46:53+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime spread-component-dynamic (shared helpers , hydration)', 'runtime spread-component-dynamic (shared helpers)', 'runtime spread-component-dynamic (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/Component.ts->program->class_declaration:Component->method_definition:build"] |
sveltejs/svelte | 1,309 | sveltejs__svelte-1309 | ['1306'] | 4661fbbb5eb65715f25a237782a18a8a408049f0 | diff --git a/src/generators/nodes/EachBlock.ts b/src/generators/nodes/EachBlock.ts
--- a/src/generators/nodes/EachBlock.ts
+++ b/src/generators/nodes/EachBlock.ts
@@ -298,7 +298,7 @@ export default class EachBlock extends Node {
block.builders.update.addBlock(deindent`
var ${each_block_value} = ${snippet};
- ... | diff --git a/test/runtime/samples/each-block-keyed-siblings/_config.js b/test/runtime/samples/each-block-keyed-siblings/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/each-block-keyed-siblings/_config.js
@@ -0,0 +1,22 @@
+export default {
+ data: {
+ ones: [{ text: '1' }],
+ twos: [{ text: '... | DOM order is not guaranteed when using keys
If you add a key to an each block, when that updates, the DOM order of the component is no longer guaranteed - maybe it's moving those updates to the end.
```
{{#each ones as one @text}}
<div>{{one.text}}</div>
{{/each}}
{{#each twos as two @text}}
<div>{{two.te... | null | 2018-04-04 10:38:18+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime each-block-keyed-siblings (shared helpers , hydration)', 'runtime each-block-keyed-siblings (shared helpers)', 'runtime each-block-keyed-siblings (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 3 | 0 | 3 | false | false | ["src/shared/keyed-each.js->program->function_declaration:updateKeyedEach", "src/shared/keyed-each.js->program->function_declaration:updateKeyedEach->function_declaration:insert", "src/generators/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:buildKeyed"] |
sveltejs/svelte | 1,310 | sveltejs__svelte-1310 | ['1300'] | b4ade9d4b2e32657bbc95b4cdbfcd2322a8bdbef | diff --git a/src/css/Selector.ts b/src/css/Selector.ts
--- a/src/css/Selector.ts
+++ b/src/css/Selector.ts
@@ -223,6 +223,9 @@ const operators = {
};
function attributeMatches(node: Node, name: string, expectedValue: string, operator: string, caseInsensitive: boolean) {
+ const spread = node.attributes.find(attr =>... | diff --git a/test/css/samples/spread/_config.js b/test/css/samples/spread/_config.js
new file mode 100644
--- /dev/null
+++ b/test/css/samples/spread/_config.js
@@ -0,0 +1,3 @@
+export default {
+ cascade: false
+};
\ No newline at end of file
diff --git a/test/css/samples/spread/expected.css b/test/css/samples/spread/... | Spread properties cause CSS to be DCE'd incorrectly
[REPL](https://svelte.technology/repl?version=1.60.0&gist=678853cb781d28931abbc159c22d2d7f)
```html
<div {{...props}} >
Big red Comic Sans
</div>
<style>
.foo {
color: red;
font-size: 2em;
font-family: 'Comic Sans MS';
}
</style>
```
`.foo`... | null | 2018-04-04 10:47:16+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['css spread'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/css/Selector.ts->program->function_declaration:attributeMatches"] |
sveltejs/svelte | 1,311 | sveltejs__svelte-1311 | ['1278'] | 8717ff8c3c4fdb71b1cac0da6173b02bf82af56d | diff --git a/src/generators/nodes/Component.ts b/src/generators/nodes/Component.ts
--- a/src/generators/nodes/Component.ts
+++ b/src/generators/nodes/Component.ts
@@ -1,4 +1,6 @@
import deindent from '../../utils/deindent';
+import flattenReference from '../../utils/flattenReference';
+import validCalleeObjects from '... | diff --git a/test/runtime/samples/component-events-console/Widget.html b/test/runtime/samples/component-events-console/Widget.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/component-events-console/Widget.html
@@ -0,0 +1 @@
+<button on:click>click me</button>
\ No newline at end of file
diff --git a... | console.log unreachable when used in a component event
https://svelte.technology/repl?version=1.58.0&gist=09304b4620a1c31a3387457ca53b795f
```html
<svg viewBox='0 0 1000 1000' style='width: 100%; height: 100%;'>
{{#each icons as icon}}
<Icon x="{{icon.x}}" y="{{icon.y}}" z="{{icon.size}}" fill="{{icon.fil... | null | 2018-04-04 11:24:51+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime component-events-console (shared helpers , hydration)', 'runtime component-events-console (shared helpers)', 'runtime component-events-console (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/Component.ts->program->function_declaration:mungeEventHandler"] |
sveltejs/svelte | 1,312 | sveltejs__svelte-1312 | ['1275'] | 8717ff8c3c4fdb71b1cac0da6173b02bf82af56d | diff --git a/src/generators/Generator.ts b/src/generators/Generator.ts
--- a/src/generators/Generator.ts
+++ b/src/generators/Generator.ts
@@ -398,7 +398,7 @@ export default class Generator {
return alias;
}
- getUniqueNameMaker() {
+ getUniqueNameMaker(names: string[]) {
const localUsedNames = new Set();
... | diff --git a/test/runtime/samples/component-name-deconflicted/Nested.html b/test/runtime/samples/component-name-deconflicted/Nested.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/component-name-deconflicted/Nested.html
@@ -0,0 +1 @@
+<span>{{nested}}</span>
\ No newline at end of file
diff --git a/t... | If in #each block naming collision
Stuff broke after 1.55.1 for me, I got naming collisions in this case:
```html
{{#each list as nested}}
{{#if true}}
<Nested :nested/>
{{/if}}
{{/each}}
<script>
import Nested from './Nested.html';
export default {
data: () => ({
list: [1,2]
}),
... | I think https://github.com/sveltejs/svelte/blob/fcfbffe50bf27caaca37749cdca05f5d5e42d727/src/generators/nodes/EachBlock.ts#L64 should be changed to
```javascript
const context = this.generator.getUniqueName(this.context);
```
However if I change it I get 3 errors on the runtime deconflict-component-refs test. | 2018-04-04 12:20:25+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime component-name-deconflicted (shared helpers , hydration)', 'runtime component-name-deconflicted (shared helpers)', 'runtime component-name-deconflicted (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 4 | 1 | 5 | false | false | ["src/generators/Generator.ts->program->class_declaration:Generator->method_definition:getUniqueNameMaker", "src/generators/dom/index.ts->program->class_declaration:DomGenerator", "src/generators/dom/index.ts->program->class_declaration:DomGenerator->method_definition:getUniqueNameMaker", "src/generators/dom/Block.ts->... |
sveltejs/svelte | 1,313 | sveltejs__svelte-1313 | ['1270'] | 8717ff8c3c4fdb71b1cac0da6173b02bf82af56d | diff --git a/src/validate/html/validateElement.ts b/src/validate/html/validateElement.ts
--- a/src/validate/html/validateElement.ts
+++ b/src/validate/html/validateElement.ts
@@ -102,7 +102,20 @@ export default function validateElement(
);
}
- checkTypeAttribute(validator, node);
+ if (node.name === ... | diff --git a/test/validator/samples/binding-select-multiple-dynamic/errors.json b/test/validator/samples/binding-select-multiple-dynamic/errors.json
new file mode 100644
--- /dev/null
+++ b/test/validator/samples/binding-select-multiple-dynamic/errors.json
@@ -0,0 +1,12 @@
+[{
+ "message": "'multiple' attribute cannot ... | Two-way binding select does not allow for dynamic multiple attribute
The two-way binding on multiple select elements don't take a dynamically set `multiple`-attribute into consideration.
Maybe this is as intended, in which case it appears to be missing from the documentation (or I simply overlooked it).
A [simple R... | null | 2018-04-04 12:30:17+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['validate binding-select-multiple-dynamic'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/validate/html/validateElement.ts->program->function_declaration:validateElement"] |
sveltejs/svelte | 1,314 | sveltejs__svelte-1314 | ['1269'] | 8717ff8c3c4fdb71b1cac0da6173b02bf82af56d | diff --git a/src/css/Selector.ts b/src/css/Selector.ts
--- a/src/css/Selector.ts
+++ b/src/css/Selector.ts
@@ -167,7 +167,8 @@ function applySelector(blocks: Block[], node: Node, stack: Node[], toEncapsulate
}
else if (selector.type === 'TypeSelector') {
- if (node.name !== selector.name && selector.name !== ... | diff --git a/test/css/samples/omit-scoping-element-uppercase/_config.js b/test/css/samples/omit-scoping-element-uppercase/_config.js
new file mode 100644
--- /dev/null
+++ b/test/css/samples/omit-scoping-element-uppercase/_config.js
@@ -0,0 +1,22 @@
+export default {
+ cascade: false,
+
+ warnings: [{
+ message: 'P co... | Capitalization throws off CSS scoping
If you put this in REPL:
```
<h1>
Big red Comic Sans
</h1>
<H1>
Big red Comic Sans
</H1>
<style>
h1 {
color: red;
font-size: 2em;
font-family: 'Comic Sans MS';
}
</style>
```
You'll see one of the H1s is styled the other is not. Element names are ... | null | 2018-04-04 12:43:05+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['css omit-scoping-element-uppercase'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/css/Selector.ts->program->function_declaration:applySelector"] |
sveltejs/svelte | 1,315 | sveltejs__svelte-1315 | ['1268'] | 8717ff8c3c4fdb71b1cac0da6173b02bf82af56d | diff --git a/src/generators/nodes/Window.ts b/src/generators/nodes/Window.ts
--- a/src/generators/nodes/Window.ts
+++ b/src/generators/nodes/Window.ts
@@ -51,6 +51,8 @@ export default class Window extends Node {
// TODO verify that it's a valid callee (i.e. built-in or declared method)
generator.addSourcemapL... | diff --git a/test/runtime/samples/window-event-custom/_config.js b/test/runtime/samples/window-event-custom/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/window-event-custom/_config.js
@@ -0,0 +1,15 @@
+export default {
+ html: `<p>escaped: false</p>`,
+
+ test(assert, component, target, wind... | Custom events not working on <:Window>
Custom events are not being respected (used) when listening to them on `<:Window>`. The repl wasn't saving for me just now so you can copy-paste this into it to see. It gives an error about the `escKey` custom event being unused and in the source you can see it has `window.addEven... | null | 2018-04-04 13:13:33+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime window-event-custom (inline helpers)', 'runtime window-event-custom (shared helpers , hydration)', 'runtime window-event-custom (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/validate/html/validateWindow.ts->program->function_declaration:validateWindow", "src/generators/nodes/Window.ts->program->class_declaration:Window->method_definition:build"] |
sveltejs/svelte | 1,333 | sveltejs__svelte-1333 | ['1331'] | 0ebe5355e198c88b746f5263b3ef847b48b055ea | diff --git a/src/validate/html/validateElement.ts b/src/validate/html/validateElement.ts
--- a/src/validate/html/validateElement.ts
+++ b/src/validate/html/validateElement.ts
@@ -294,5 +294,6 @@ function checkSlotAttribute(validator: Validator, node: Node, attribute: Node, s
}
function isDynamic(attribute: Node) {
... | diff --git a/test/validator/samples/select-multiple/input.html b/test/validator/samples/select-multiple/input.html
new file mode 100644
--- /dev/null
+++ b/test/validator/samples/select-multiple/input.html
@@ -0,0 +1,3 @@
+<select bind:value multiple>
+ <option>1</option>
+</select>
\ No newline at end of file
| Regression 1.60.1 -> 1.60.2 :: <select multiple... results in Module build failed
https://svelte.technology/repl?version=1.60.2&gist=3d32d3e082562a4de08b054f46e7756e
The example works with v 1.60.1 but not with 1.60.2.
I believe this is due to incorrect flow here:
https://github.com/sveltejs/svelte/blob/master/s... | null | 2018-04-12 01:33:03+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['validate select-multiple'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/validate/html/validateElement.ts->program->function_declaration:isDynamic"] |
sveltejs/svelte | 1,345 | sveltejs__svelte-1345 | ['1069'] | 8a99ce911ce5274b36ad7db2bdba1360f5a1b4e3 | diff --git a/src/generators/Generator.ts b/src/generators/Generator.ts
--- a/src/generators/Generator.ts
+++ b/src/generators/Generator.ts
@@ -84,6 +84,7 @@ export default class Generator {
source: string;
name: string;
options: CompileOptions;
+ v2: boolean;
customElement: CustomElementOptions;
tag: string... | diff --git a/test/js/samples/dev-warning-missing-data-computed/_actual-bundle-v2.js b/test/js/samples/dev-warning-missing-data-computed/_actual-bundle-v2.js
--- a/test/js/samples/dev-warning-missing-data-computed/_actual-bundle-v2.js
+++ b/test/js/samples/dev-warning-missing-data-computed/_actual-bundle-v2.js
@@ -226,7... | Destructuring syntax for computed properties
I was about to respond to [this HN comment](https://news.ycombinator.com/item?id=16056010) explaining why it'd be impossible, but then I realised... it isn't!
```js
computed: {
hours: ({time}) => time.getHours(),
minutes: ({time}) => time.getMinutes(),
seconds: ... | That would be a trivial-but-annoying change to make across our codebase. What's the benefit?
I don't even understand what the second version is doing, so maybe that's why I don't get the value proposition yet (beyond typing more characters).
I don't think it makes the code more readable and while it could give more ... | 2018-04-15 18:51:50+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['runtime computed-values-deconflicted (shared helpers, v2)', 'runtime computed-values-function-dependency (shared helpers, v2)', 'runtime computed-values (shared helpers, v2)', 'runtime computed-values-default (shared helpers, v2)', 'runtime computed-function (shared helpers, v2)', 'js dev-warning-missing-data-compute... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | false | false | true | 6 | 2 | 8 | false | false | ["src/generators/Generator.ts->program->class_declaration:Generator->method_definition:constructor", "src/generators/Generator.ts->program->class_declaration:Generator", "src/validate/index.ts->program->function_declaration:validate", "src/validate/index.ts->program->class_declaration:Validator", "src/validate/js/propV... |
sveltejs/svelte | 1,357 | sveltejs__svelte-1357 | ['1337', '1337'] | d215279ef115e909d9d72291c6884de70c73b94e | diff --git a/src/generators/nodes/Component.ts b/src/generators/nodes/Component.ts
--- a/src/generators/nodes/Component.ts
+++ b/src/generators/nodes/Component.ts
@@ -37,7 +37,7 @@ export default class Component extends Node {
attribute.expression.arguments.forEach((arg: Node) => {
block.addDependencies(ar... | diff --git a/test/runtime/samples/spread-each-component/Nested.html b/test/runtime/samples/spread-each-component/Nested.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/spread-each-component/Nested.html
@@ -0,0 +1 @@
+<div data-a={a} data-b={b}></div>
\ No newline at end of file
diff --git a/test/runt... | Each blocks with spread attributes on children not updating
[REPL](https://svelte.technology/repl?version=1.60.3&gist=00df74713efec24d6b0580763e4b0edb). I *think* what's happening here is that it doesn't believe the first each block to be dynamic; it doesn't recognise that there's a dynamic attribute, so it doesn't bot... | Neither this trigger any wire when you change order of element in the array.
svelte v1.60.3
```html
{{#each tabs as tabID, index }}
<Tab :tabID :index on:tabReorderStart="hTabReorderStart(event)" on:tabReorderEnd="hTabReorderEnd(event)" />
{{/each}}
```
tabs is a computed property, and `tabID` is a `Strin... | 2018-04-20 19:13:39+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['runtime spread-each-element (shared helpers, hydration)', 'runtime spread-each-element (inline helpers)', 'runtime spread-each-component (shared helpers, hydration)', 'runtime spread-each-component (inline helpers)', 'runtime spread-each-element (shared helpers)', 'runtime spread-each-component (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/generators/nodes/Element.ts->program->class_declaration:Element->method_definition:init", "src/generators/nodes/Component.ts->program->class_declaration:Component->method_definition:init", "src/utils/flattenReference.ts->program->function_declaration:flatten", "src/utils/flattenReference.ts->program->function_dec... |
sveltejs/svelte | 1,364 | sveltejs__svelte-1364 | ['1356', '1356'] | a78f37d0bfae7304865b20c39d20c3f9d26801d3 | diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts
--- a/src/generators/dom/index.ts
+++ b/src/generators/dom/index.ts
@@ -218,16 +218,6 @@ export default function dom(
`if (!document.getElementById("${generator.stylesheet.id}-style")) @add_css();`)
}
- ${hasInitHooks && deindent`
- var ... | diff --git a/test/js/samples/deconflict-globals/expected-bundle.js b/test/js/samples/deconflict-globals/expected-bundle.js
--- a/test/js/samples/deconflict-globals/expected-bundle.js
+++ b/test/js/samples/deconflict-globals/expected-bundle.js
@@ -5,6 +5,11 @@ function assign(tar, src) {
return tar;
}
+function ass... | onstate: changed is empty if data property not mentioned in template
[REPL](https://svelte.technology/repl?version=2.0.0&gist=b000d1c0362207f646684a88d18d3785) contains just a property `test` and an `onstate` listener.
`onstate` fires, but `changed` is empty. If `test` is used in the template, `changed` is `{test: 1... | 2018-04-22 14:51:32+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['runtime onstate-no-template (shared helpers, hydration)', 'runtime onstate-no-template (shared helpers)', 'js deconflict-globals', 'runtime onstate-no-template (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/shared/utils.js->program->function_declaration:assignTrue", "src/generators/dom/index.ts->program->function_declaration:dom"] | |
sveltejs/svelte | 1,365 | sveltejs__svelte-1365 | ['1354'] | a78f37d0bfae7304865b20c39d20c3f9d26801d3 | diff --git a/src/shared/index.js b/src/shared/index.js
--- a/src/shared/index.js
+++ b/src/shared/index.js
@@ -13,11 +13,12 @@ export function blankObject() {
export function destroy(detach) {
this.destroy = noop;
this.fire('destroy');
- this.set = this.get = noop;
+ this.set = noop;
if (detach !== false) this... | diff --git a/test/js/samples/action/expected-bundle.js b/test/js/samples/action/expected-bundle.js
--- a/test/js/samples/action/expected-bundle.js
+++ b/test/js/samples/action/expected-bundle.js
@@ -24,11 +24,12 @@ function blankObject() {
function destroy(detach) {
this.destroy = noop;
this.fire('destroy');
- thi... | component.get() can return undefined after component destroyed
Since `this.get('foo')` is deprecated (https://github.com/sveltejs/svelte/pull/1347), I've been working on migrating all usages to `let { foo } = this.get()`.
However I've found that the two aren't exactly equivalent, since `this.get()` can actually retu... | Related: it would be useful to be able to know within an asynchronous callback whether the component was destroyed or not, without having to attach an `on('destroy')` listener. (I notice https://github.com/sveltejs/svelte/pull/948 was not merged.)
Can we combine these two problems into a solution? Does `component.get()... | 2018-04-22 14:59:45+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['js window-binding-scroll', 'js inline-style-optimized-multiple', 'js event-handlers-custom', 'js inline-style-optimized-url', 'js setup-method', 'js legacy-input-type', 'js css-media-query', 'runtime get-after-destroy (shared helpers, hydration)', 'js title', 'runtime get-after-destroy (inline helpers)', 'js use-elem... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/shared/index.js->program->function_declaration:destroy"] |
sveltejs/svelte | 1,366 | sveltejs__svelte-1366 | ['1353'] | a78f37d0bfae7304865b20c39d20c3f9d26801d3 | diff --git a/src/generators/nodes/Component.ts b/src/generators/nodes/Component.ts
--- a/src/generators/nodes/Component.ts
+++ b/src/generators/nodes/Component.ts
@@ -10,6 +10,7 @@ import mungeAttribute from './shared/mungeAttribute';
import Node from './shared/Node';
import Block from '../dom/Block';
import Attribu... | diff --git a/test/runtime/samples/component-event-not-stale/Button.html b/test/runtime/samples/component-event-not-stale/Button.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/component-event-not-stale/Button.html
@@ -0,0 +1 @@
+<button on:click><slot/></button>
\ No newline at end of file
diff --git... | Component data not updated when firing an event as a result of an event fired in a nested component.
I have come across an issue when firing a custom event which is triggered as a result of an event fired in a nested component.
If you fire the custom event within the components directive, the data seems to be from t... | Looks like the issue was added in 1.56.0: https://svelte.technology/repl?version=1.55.1&gist=60bdf43e8b114186d23cd85893295748 | 2018-04-22 16:06:58+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['runtime component-event-not-stale (shared helpers)', 'runtime component-event-not-stale (shared helpers, hydration)', 'runtime component-event-not-stale (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/Component.ts->program->function_declaration:mungeEventHandler"] |
sveltejs/svelte | 1,374 | sveltejs__svelte-1374 | ['1368', '1368'] | ed605bfa790f5989bca5241adddcb30367a8c70b | diff --git a/src/Stats.ts b/src/Stats.ts
--- a/src/Stats.ts
+++ b/src/Stats.ts
@@ -78,7 +78,9 @@ export default class Stats {
total: now() - this.startTime
}, collapseTimings(this.timings));
- const imports = compiler.imports.map(node => {
+ // TODO would be good to have this info even
+ // if options.gener... | diff --git a/test/stats/index.js b/test/stats/index.js
--- a/test/stats/index.js
+++ b/test/stats/index.js
@@ -56,4 +56,12 @@ describe('stats', () => {
}
});
});
+
+ it('returns a stats object when options.generate is false', () => {
+ const { stats } = svelte.compile('', {
+ generate: false
+ });
+
+ ass... | Stats object different with generate: false
When running compile with `generate: false`, the stats object returned is a quite different to normal
e.g. `generate: false`
```js
Stats {
startTime: 73029841.411771,
stack: [],
timings:
[ { label: 'parse',
start: 73029841.442941,
end: 73029... | 2018-04-29 01:04:25+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['stats hooks', 'stats returns a stats object when options.generate is false'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/index.ts->program->function_declaration:compile", "src/Stats.ts->program->class_declaration:Stats->method_definition:render"] | |
sveltejs/svelte | 1,375 | sveltejs__svelte-1375 | ['1369'] | ed605bfa790f5989bca5241adddcb30367a8c70b | diff --git a/src/compile/dom/index.ts b/src/compile/dom/index.ts
--- a/src/compile/dom/index.ts
+++ b/src/compile/dom/index.ts
@@ -113,8 +113,6 @@ export default function dom(
? 'svelte/shared.js'
: options.shared || '';
- let prototypeBase = `${name}.prototype`;
-
const proto = sharedPath
? `@proto`
: ... | diff --git a/test/custom-elements/samples/custom-method/main.html b/test/custom-elements/samples/custom-method/main.html
new file mode 100644
--- /dev/null
+++ b/test/custom-elements/samples/custom-method/main.html
@@ -0,0 +1,13 @@
+<p>{foo}</p>
+
+<script>
+ export default {
+ tag: 'custom-element',
+
+ methods: {
+... | Custom element missing methods
I've created a basic custom element based on [template-custom-element](https://github.com/sveltejs/template-custom-element) but the component's methods don't seem to being added to the compiled JS.
My component
```HTML
<h1>Hello {{name}}!</h1>
<button on:click="saySomething()">Cli... | null | 2018-04-29 02:26:41+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['js css-shadow-dom-keyframes'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/dom/index.ts->program->function_declaration:dom"] |
sveltejs/svelte | 1,376 | sveltejs__svelte-1376 | ['1297'] | ed605bfa790f5989bca5241adddcb30367a8c70b | diff --git a/src/compile/nodes/EventHandler.ts b/src/compile/nodes/EventHandler.ts
--- a/src/compile/nodes/EventHandler.ts
+++ b/src/compile/nodes/EventHandler.ts
@@ -80,5 +80,13 @@ export default class EventHandler extends Node {
this.args.forEach(arg => {
arg.overwriteThis(this.parent.var);
});
+
+ if (thi... | diff --git a/test/runtime/samples/event-handler-custom-this/_config.js b/test/runtime/samples/event-handler-custom-this/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/event-handler-custom-this/_config.js
@@ -0,0 +1,22 @@
+export default {
+ html: `<input>`,
+
+ test(assert, component, target, ... | `this` has wrong meaning in custom event handler
In this situation ([REPL](https://svelte.technology/repl?version=1.59.0&gist=08ce28e21758796e9651169507eb6af3))...
```html
<p>Select the input, hit 'enter', check the console</p>
<input on:enter='this.blur()'>
<script>
export default {
events: {
en... | I have a couple things to point out.
1. Would fixing this break BC
2. Will fixing this mean we cannot access the component context anymore from inside the handlers
3. The new `actions` have a similar signature, would they benefit from being called in the context of the node
Good news all round:
1. No, because a... | 2018-04-29 02:53:52+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['runtime event-handler-custom-this (shared helpers, hydration)', 'runtime event-handler-custom-this (shared helpers)', 'runtime event-handler-custom-this (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:constructor->method_definition:enter->method_definition:enter", "src/compile/nodes/EventHandler.ts->program->class_declaration:EventHandler->method_definition:render", "src/utils/flattenReference.ts->program->function_dec... |
sveltejs/svelte | 1,377 | sveltejs__svelte-1377 | ['1303'] | ed605bfa790f5989bca5241adddcb30367a8c70b | diff --git a/src/compile/Compiler.ts b/src/compile/Compiler.ts
--- a/src/compile/Compiler.ts
+++ b/src/compile/Compiler.ts
@@ -564,16 +564,29 @@ export default class Compiler {
if (templateProperties.computed) {
const dependencies = new Map();
+ const fullStateComputations = [];
+
templatePropert... | diff --git a/test/runtime/samples/computed-state-object/_config.js b/test/runtime/samples/computed-state-object/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/computed-state-object/_config.js
@@ -0,0 +1,21 @@
+export default {
+ data: { a: 1 },
+
+ html: `
+ <p>a: 1</p>
+ <p>x: 2</p>
+ <p>y... | "current data object" in templates (re: spread)
Follow-on to #195 -
In order to use the spread functionality to pass arbitrary properties that were applied to the current component on to child components, we need to be able to reference the current data/state object in the template.
I think `{{...state}}` and `{... | One thing about template tags — `{{this}}` is already totally valid if you have a property called 'this': https://svelte.technology/repl?version=1.60.0&gist=3a6b97e3ec254df98cc99db546de4520
You can't, however, use it in expressions (even `{{(this)}}` fails).
So I wonder if the right move here is to make `this` b... | 2018-04-29 03:40:13+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['ssr computed-state-object', 'runtime computed-state-object (inline helpers)', 'runtime computed-state-object (shared helpers, hydration)', 'runtime computed-state-object (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 4 | 0 | 4 | false | false | ["src/validate/js/propValidators/computed.ts->program->function_declaration:computed", "src/compile/Compiler.ts->program->class_declaration:Compiler->method_definition:walkJs", "src/compile/dom/index.ts->program->function_declaration:dom", "src/compile/ssr/index.ts->program->function_declaration:ssr"] |
sveltejs/svelte | 1,378 | sveltejs__svelte-1378 | ['1286'] | ed605bfa790f5989bca5241adddcb30367a8c70b | diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts
--- a/src/compile/nodes/EachBlock.ts
+++ b/src/compile/nodes/EachBlock.ts
@@ -443,9 +443,9 @@ export default class EachBlock extends Node {
`;
block.builders.update.addBlock(deindent`
- var ${each_block_value} = ${snippet};
-
... | diff --git a/test/js/samples/deconflict-builtins/expected-bundle.js b/test/js/samples/deconflict-builtins/expected-bundle.js
--- a/test/js/samples/deconflict-builtins/expected-bundle.js
+++ b/test/js/samples/deconflict-builtins/expected-bundle.js
@@ -186,9 +186,9 @@ function create_main_fragment(component, ctx) {
},... | Only recalculate each_value if necessary
Svelte knows that it doesn't need to update each blocks whose dependencies haven't changed. But it isn't smart not to recalculate `each_value`. In [this example](https://svelte.technology/repl?version=1.58.4&gist=04aeba5150c7e3aaa4c7066d61d3c1e6)...
```html
{{#each Object.en... | null | 2018-04-29 03:51:25+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['js each-block-changed-check', 'js deconflict-builtins'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:buildUnkeyed"] |
sveltejs/svelte | 1,379 | sveltejs__svelte-1379 | ['1251'] | ed605bfa790f5989bca5241adddcb30367a8c70b | diff --git a/src/compile/nodes/AwaitBlock.ts b/src/compile/nodes/AwaitBlock.ts
--- a/src/compile/nodes/AwaitBlock.ts
+++ b/src/compile/nodes/AwaitBlock.ts
@@ -98,6 +98,8 @@ export default class AwaitBlock extends Node {
block.addVariable(promise);
block.addVariable(resolved);
+ block.maintainContext = true;
+
... | diff --git a/test/runtime/samples/await-in-each/_config.js b/test/runtime/samples/await-in-each/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/await-in-each/_config.js
@@ -0,0 +1,31 @@
+let fulfil;
+
+let thePromise = new Promise(f => {
+ fulfil = f;
+});
+
+const items = [{
+ title: 'a title'... | `await` loses access to outer `each` variable
```html
{{#each items as item}}
{{#await item.data}}
<p>{{item.title}}: Loading...</p>
{{then result}}
<p>{{item.title}}: {{result}}</p>
{{/await}}
{{/each}}
<script>
export default {
data() {
return {
items: [{
title: 'Some data',
... | null | 2018-04-29 13:48:30+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['runtime await-in-each (inline helpers)', 'runtime await-in-each (shared helpers)', 'runtime await-in-each (shared helpers, hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/AwaitBlock.ts->program->class_declaration:AwaitBlock->method_definition:build"] |
sveltejs/svelte | 1,381 | sveltejs__svelte-1381 | ['703'] | dbab1a886d3657d99445e275e7587a016f3d87dc | diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts
--- a/src/compile/nodes/EachBlock.ts
+++ b/src/compile/nodes/EachBlock.ts
@@ -16,7 +16,7 @@ export default class EachBlock extends Node {
iterations: string;
index: string;
context: string;
- key: string;
+ key: Expression;
scope: Temp... | diff --git a/test/parser/samples/each-block-keyed/output.json b/test/parser/samples/each-block-keyed/output.json
--- a/test/parser/samples/each-block-keyed/output.json
+++ b/test/parser/samples/each-block-keyed/output.json
@@ -1,5 +1,4 @@
{
- "hash": "1x6az5m",
"html": {
"start": 0,
"end": 54,
@@ -38,7 +37,24 ... | {{#each things as thing by thing}}
As mentioned in #700, it's sometimes useful to be able to use a list item as the basis for keyed updates, rather than a property of each list item.
That could be done a few different ways, e.g.:
```html
{{#each things as thing @}}
{{#each things as thing @this}}
{{#each thing... | I actually really hate this in AngularJS. I can never get it right, and the documentation is very unclear.
The only support I'd want to see is the ability to iterate Objects by key, which could be done in a simple, javascripty way:
```
{{ #each things as key, value }}
```
It seems #704 canonizes the `@property`... | 2018-04-29 15:35:08+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['ssr each-block-keyed-non-prop', 'runtime each-block-keyed-non-prop (inline helpers)', 'parse each-block-keyed', 'runtime each-block-keyed-non-prop (shared helpers, hydration)', 'runtime each-block-keyed-non-prop (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | false | false | true | 4 | 1 | 5 | false | false | ["src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:buildKeyed", "src/shared/keyed-each.js->program->function_declaration:updateKeyedEach", "src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:constructor", "src/compile/nodes/EachBlock.ts->progra... |
sveltejs/svelte | 1,384 | sveltejs__svelte-1384 | ['1287'] | 2c3f846623bee52be6d209931a34fa7a8045a856 | diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts
--- a/src/compile/nodes/EachBlock.ts
+++ b/src/compile/nodes/EachBlock.ts
@@ -66,7 +66,7 @@ export default class EachBlock extends Node {
this.var = block.getUniqueName(`each`);
this.iterations = block.getUniqueName(`${this.var}_blocks... | diff --git a/test/js/samples/deconflict-builtins/expected-bundle.js b/test/js/samples/deconflict-builtins/expected-bundle.js
--- a/test/js/samples/deconflict-builtins/expected-bundle.js
+++ b/test/js/samples/deconflict-builtins/expected-bundle.js
@@ -161,11 +161,7 @@ function create_main_fragment(component, ctx) {
va... | Deduplicate each_context generation
```diff
function create_main_fragment(component, state) {
var each_anchor;
var each_value = state.Object.entries(state.things);
+
+ function get_each_context(state, each_value, i) {
+ return assign(assign({}, state), {
+ each_value: each_value,
+ key_value... | null | 2018-04-29 18:42:14+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['js each-block-changed-check', 'js deconflict-builtins'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 5 | 0 | 5 | false | false | ["src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:buildKeyed", "src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:build", "src/shared/keyed-each.js->program->function_declaration:updateKeyedEach", "src/compile/nodes/EachBlock.ts->program->cla... |
sveltejs/svelte | 1,392 | sveltejs__svelte-1392 | ['1390'] | 01cdffa46ea3bdf658cbfd999bbdc5698f8640c6 | diff --git a/src/compile/nodes/EventHandler.ts b/src/compile/nodes/EventHandler.ts
--- a/src/compile/nodes/EventHandler.ts
+++ b/src/compile/nodes/EventHandler.ts
@@ -77,16 +77,18 @@ export default class EventHandler extends Node {
}
}
- this.args.forEach(arg => {
- arg.overwriteThis(this.parent.var);
- })... | diff --git a/test/runtime/samples/event-handler-each-this/_config.js b/test/runtime/samples/event-handler-each-this/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/event-handler-each-this/_config.js
@@ -0,0 +1,28 @@
+export default {
+ data: {
+ items: ['foo', 'bar', 'baz'],
+ },
+
+ html: `
+... | `this` overwritten as component name in arguments of hoisted event handler
See [2.1.1](https://svelte.technology/repl?version=2.1.1&gist=3edebbc9ba03ffeed57bea1c20312113) vs [2.2.0](https://svelte.technology/repl?version=2.2.0&gist=3edebbc9ba03ffeed57bea1c20312113).
This _might_ be as simple as wrapping [this](https... | > I realised the other day that the 'is this a descendant of an each block or not?' test doesn't really make sense, since the component _itself_ could be in an each block
@Rich-Harris Sooo ... what does this mean for what we want to do here? Are you suggesting that we _always_ want to hoist event handlers (unless i... | 2018-05-01 00:26:07+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['runtime event-handler-each-this (shared helpers)', 'runtime event-handler-each-this (inline helpers)', 'runtime event-handler-each-this (shared helpers, hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/EventHandler.ts->program->class_declaration:EventHandler->method_definition:render"] |
sveltejs/svelte | 1,395 | sveltejs__svelte-1395 | ['1327'] | 8eb327b492a0e84720d0df4ad1974249d973b3c6 | diff --git a/store.js b/store.js
--- a/store.js
+++ b/store.js
@@ -20,24 +20,24 @@ function Store(state, options) {
}
assign(Store.prototype, {
- _add: function(component, props) {
+ _add(component, props) {
this._dependents.push({
component: component,
props: props
});
},
- _init: function(props)... | diff --git a/test/runtime/samples/store-computed-oncreate/_config.js b/test/runtime/samples/store-computed-oncreate/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/store-computed-oncreate/_config.js
@@ -0,0 +1,11 @@
+import { Store } from '../../../../store.js';
+
+export default {
+ 'skip-ssr'... | Defining store computed property after it is referenced in a template causes initial value to be undefined
It does not seem like store can be used in the repl (https://github.com/sveltejs/svelte.technology/issues/213), so I'll explain the issue here.
I am mixing in computed properties into a store. It does not seem ... | With the v2 upgrade, the `compute` helper function is now:
```javascript
export function compute(store, name, deps, fn) {
const values__deps = []
const state = store.get()
for (let i=0; i < deps.length; i++) {
values__deps.push(state[deps[i]])
}
const __set = {}
__set[name] = fn(...values__de... | 2018-05-01 01:36:35+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['runtime store-computed-oncreate (shared helpers, hydration)', 'runtime store-computed-oncreate (shared helpers)', 'runtime store-computed-oncreate (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 9 | 0 | 9 | false | false | ["store.js->program->method_definition:set", "store.js->program->method_definition:_set", "store.js->program->method_definition:_sortComputedProperties->function_declaration:visit", "store.js->program->method_definition:_init", "store.js->program->method_definition:compute", "store.js->program->method_definition:_add",... |
sveltejs/svelte | 1,401 | sveltejs__svelte-1401 | ['1394'] | 6ec21f7a206a9fc46a3c86e3f3ac941556da1863 | diff --git a/src/compile/nodes/Attribute.ts b/src/compile/nodes/Attribute.ts
--- a/src/compile/nodes/Attribute.ts
+++ b/src/compile/nodes/Attribute.ts
@@ -66,11 +66,7 @@ export default class Attribute extends Node {
return expression;
});
- // TODO this would be better, but it breaks some stuff
- // th... | diff --git a/test/js/samples/component-static-array/expected-bundle.js b/test/js/samples/component-static-array/expected-bundle.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/component-static-array/expected-bundle.js
@@ -0,0 +1,183 @@
+function noop() {}
+
+function assign(tar, src) {
+ for (var k in src) ... | Literals in props should not be updated
In a case like [this](https://svelte.technology/repl?version=2.4.0&gist=37fdb194fd90bf5e3b19996cc10d5bd2)...
```html
<List items='{[1, 2, 3]}'/>
```
...`items` should never be updated, even if `<List>` had other properties that *were* being updated.
| To clarify:
```diff
function create_main_fragment(component, ctx) {
var list_initial_data = { items: [1, 2, 3] };
var list = new List({
root: component.root,
data: list_initial_data
});
return {
c: function create() {
list._fragment.c();
},
m: function mount(target, anchor) {
li... | 2018-05-02 01:43:05+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['js component-static-array'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:build", "src/compile/nodes/Attribute.ts->program->class_declaration:Attribute->method_definition:getValue", "src/compile/nodes/Attribute.ts->program->class_declaration:Attribute->method_definition:constructor", "src/compile/nodes/... |
sveltejs/svelte | 1,402 | sveltejs__svelte-1402 | ['1397'] | 6ec21f7a206a9fc46a3c86e3f3ac941556da1863 | diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts
--- a/src/compile/nodes/EachBlock.ts
+++ b/src/compile/nodes/EachBlock.ts
@@ -31,10 +31,6 @@ export default class EachBlock extends Node {
this.context = info.context.name || 'each'; // TODO this is used to facilitate binding; currently fai... | diff --git a/test/runtime/samples/dev-warning-missing-data-each/_config.js b/test/runtime/samples/dev-warning-missing-data-each/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/dev-warning-missing-data-each/_config.js
@@ -0,0 +1,22 @@
+export default {
+ dev: true,
+
+ data: {
+ letters: [
+ ... | Each block key incorrectly treated as expected data property
https://svelte.technology/repl?version=2.4.1&gist=6650af687dd70e62050e9b0d27e59c03
The keyed each block causes the runtime dev warning `<App> was created without expected data property 'letter'`, which it should not.
cc @johnmuhl
| null | 2018-05-02 01:43:25+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['runtime dev-warning-missing-data-each (shared helpers, hydration)', 'runtime dev-warning-missing-data-each (inline helpers)', 'runtime dev-warning-missing-data-each (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:constructor"] |
sveltejs/svelte | 1,408 | sveltejs__svelte-1408 | ['1407'] | a75d5935a3c82f139db134c9f14f85004a2b918f | diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts
--- a/src/compile/nodes/Element.ts
+++ b/src/compile/nodes/Element.ts
@@ -191,6 +191,10 @@ export default class Element extends Node {
block.outros += 1;
}
+ if (this.ref) {
+ this.parent.cannotUseInnerHTML();
+ }
+
const valueAttr... | diff --git a/test/runtime/samples/refs-no-innerhtml/_config.js b/test/runtime/samples/refs-no-innerhtml/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/refs-no-innerhtml/_config.js
@@ -0,0 +1,7 @@
+export default {
+ html: '<div><canvas></canvas></div>',
+ test ( assert, component, target ) {
+... | Canvas ref not working in div
Subj, a small modified example from the documentation:
https://svelte.technology/repl?version=2.4.2&gist=b06728bb9e129364fe7cd9e514275843
the problem started with 2.2.0 version.
This ref just not exist in a component.refs object.
| Looks like we're not correctly recognizing that we can't use the static `.innerHTML` shortcut when there's a ref. `Element#init` needs some code to the effect of `if (this.ref) this.parent.cannotUseInnerHTML();`. | 2018-05-03 08:02:30+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['runtime refs-no-innerhtml (shared helpers, hydration)', 'runtime refs-no-innerhtml (shared helpers)', 'runtime refs-no-innerhtml (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:init"] |
sveltejs/svelte | 1,414 | sveltejs__svelte-1414 | ['1413', '1413'] | 7ad374d8c261eea23f2e5025b3940c061affe65e | diff --git a/src/compile/nodes/Component.ts b/src/compile/nodes/Component.ts
--- a/src/compile/nodes/Component.ts
+++ b/src/compile/nodes/Component.ts
@@ -16,6 +16,7 @@ import Binding from './Binding';
import EventHandler from './EventHandler';
import Expression from './shared/Expression';
import { AppendTarget } fr... | diff --git a/test/runtime/samples/spread-component-dynamic-undefined/_config.js b/test/runtime/samples/spread-component-dynamic-undefined/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/spread-component-dynamic-undefined/_config.js
@@ -0,0 +1,19 @@
+export default {
+ data: {
+ props: {
+ a:... | Spread props on dynamic components fail if no initial value
Bit of an edge case here...
If you have a `<svelte:component>` whose `this` doesn't have a value, and it has spread properties, then any updates will fail because the initial spread 'levels' have not been set. [REPL](https://svelte.technology/repl?version=2... | 2018-05-03 20:15:30+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['runtime spread-component-dynamic-undefined (shared helpers)', 'runtime spread-component-dynamic-undefined (shared helpers, hydration)', 'runtime spread-component-dynamic-undefined (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:build"] | |
sveltejs/svelte | 1,420 | sveltejs__svelte-1420 | ['956', '956'] | 49c594e526156dc4cbafec4035730bcb844b0b0f | diff --git a/src/compile/nodes/AwaitBlock.ts b/src/compile/nodes/AwaitBlock.ts
--- a/src/compile/nodes/AwaitBlock.ts
+++ b/src/compile/nodes/AwaitBlock.ts
@@ -42,6 +42,8 @@ export default class AwaitBlock extends Node {
block.addDependencies(this.expression.dependencies);
let isDynamic = false;
+ let hasIntros... | diff --git a/test/runtime/samples/transition-js-await-block/_config.js b/test/runtime/samples/transition-js-await-block/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/transition-js-await-block/_config.js
@@ -0,0 +1,35 @@
+let fulfil;
+let reject;
+
+let promise = new Promise((f, r) => {
+ fulf... | transitions in await blocks
Follow-up to #952. This currently doesn't work:
```html
{{#await promise}}
<p transition:fade>loading...</p>
{{then value}}
<p class='content' transition:fade>{{value}}</p>
{{catch error}}
<div class='toast' transition:fly='{y: 100}'>{{error.message}}</div>
{{/await}}
```
tr... | 2018-05-05 19:14:47+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['runtime transition-js-await-block (inline helpers)', 'runtime transition-js-await-block (shared helpers)', 'runtime transition-js-await-block (shared helpers, hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/compile/nodes/AwaitBlock.ts->program->class_declaration:AwaitBlock->method_definition:build", "src/shared/await-block.js->program->function_declaration:handlePromise->function_declaration:update", "src/shared/await-block.js->program->function_declaration:handlePromise", "src/compile/nodes/AwaitBlock.ts->program->... | |
sveltejs/svelte | 1,423 | sveltejs__svelte-1423 | ['1419'] | dc8b0d6be148ec636ebf9e98947b67740876d5d5 | diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts
--- a/src/compile/nodes/Element.ts
+++ b/src/compile/nodes/Element.ts
@@ -988,13 +988,18 @@ const events = [
eventNames: ['input'],
filter: (node: Element, name: string) =>
node.name === 'textarea' ||
- node.name === 'input' && !/radio... | diff --git a/test/js/samples/input-range/expected-bundle.js b/test/js/samples/input-range/expected-bundle.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/input-range/expected-bundle.js
@@ -0,0 +1,198 @@
+function noop() {}
+
+function assign(tar, src) {
+ for (var k in src) tar[k] = src[k];
+ return tar;
+}... | <input type=range bind:value> duplicates handlers unnecessarily
With [this markup](https://svelte.technology/repl?version=2.4.4&gist=cdf74219bd9a8a06d6af6a9d9cf9d888)...
```html
<input type=range bind:value>
```
...Svelte could generate leaner code:
```diff
function create_main_fragment(component, ctx) {
... | null | 2018-05-06 00:13:25+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['js input-range'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | true | false | false | false | 0 | 0 | 0 | false | false | [] |
sveltejs/svelte | 1,428 | sveltejs__svelte-1428 | ['1425'] | e1db82773d13836f4d1746b99398982398fc228e | diff --git a/src/compile/dom/Block.ts b/src/compile/dom/Block.ts
--- a/src/compile/dom/Block.ts
+++ b/src/compile/dom/Block.ts
@@ -232,7 +232,7 @@ export default class Block {
}
}
- if (this.hasIntroMethod) {
+ if (this.hasIntroMethod || this.hasOutroMethod) {
if (hasIntros) {
properties.addBlock(de... | diff --git a/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js b/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js
@@ -0,0 +1,39 @@
+export default {
+ data: {
+ things: [
+ ... | outro is not aborted
If a block has an outro, and the block is recreated during that outro, the transition isn't aborted — the content is still removed. [REPL](https://svelte.technology/repl?version=2.4.4&gist=ec5210f14bc4d27ce1994e8bc14895fa)
| null | 2018-05-06 16:21:11+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['runtime transition-js-aborted-outro-in-each (shared helpers)', 'runtime transition-js-aborted-outro (shared helpers, hydration)', 'runtime transition-js-aborted-outro (shared helpers)', 'runtime transition-js-aborted-outro-in-each (inline helpers)', 'runtime transition-js-aborted-outro (inline helpers)', 'runtime tra... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 12 | 0 | 12 | false | false | ["src/shared/transitions.js->program->function_declaration:generateRule", "src/compile/nodes/AwaitBlock.ts->program->class_declaration:AwaitBlock->method_definition:build", "src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:build", "src/shared/transitions.js->program->function_decl... |
sveltejs/svelte | 1,446 | sveltejs__svelte-1446 | ['1445'] | 5dd149ef7b92cc84a19386319a2acb8d2aa8d725 | diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts
--- a/src/parse/state/tag.ts
+++ b/src/parse/state/tag.ts
@@ -439,6 +439,7 @@ function readSequence(parser: Parser, done: () => boolean) {
chunks.push(currentChunk);
}
+ parser.allowWhitespace();
const expression = readExpression(parser);
... | diff --git a/test/runtime/samples/attribute-dynamic-reserved/_config.js b/test/runtime/samples/attribute-dynamic-reserved/_config.js
--- a/test/runtime/samples/attribute-dynamic-reserved/_config.js
+++ b/test/runtime/samples/attribute-dynamic-reserved/_config.js
@@ -3,11 +3,17 @@ export default {
class: 'foo'
},
... | Reserved keywords cause error when used in an expression with spaces around the keyword
When using reserved JavaScript keywords in an expression, if the expression has spaces in between the curly brackets and the keyword, the parser will throw an error.
This throws: `<div class="{ class }"></div>`
But this does not... | I haven't tested this but I _think_ we should be able to fix this with just a `parser.allowWhitespace()` inserted as the first line of the `readExpression` function [here](https://github.com/sveltejs/svelte/blob/5dd149ef7b92cc84a19386319a2acb8d2aa8d725/src/parse/read/expression.ts#L7) and have it not break sourcemaps.
... | 2018-05-11 00:06:56+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['runtime attribute-dynamic-reserved (shared helpers)', 'ssr attribute-dynamic-reserved', 'runtime attribute-dynamic-reserved (shared helpers, hydration)', 'runtime attribute-dynamic-reserved (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/parse/state/tag.ts->program->function_declaration:readSequence"] |
sveltejs/svelte | 1,448 | sveltejs__svelte-1448 | ['547'] | 3c1bcfab7966037980fa81f3072a79d3ea535d50 | diff --git a/src/compile/dom/index.ts b/src/compile/dom/index.ts
--- a/src/compile/dom/index.ts
+++ b/src/compile/dom/index.ts
@@ -227,7 +227,7 @@ export default function dom(
this._fragment.c();
this._fragment.${block.hasIntroMethod ? 'i' : 'm'}(this.shadowRoot, null);
- if (options.target) this._mount(opt... | diff --git a/test/cli/samples/basic/expected/Main.js b/test/cli/samples/basic/expected/Main.js
--- a/test/cli/samples/basic/expected/Main.js
+++ b/test/cli/samples/basic/expected/Main.js
@@ -1,4 +1,4 @@
-/* src/Main.html generated by Svelte v2.4.4 */
+/* src/Main.html generated by Svelte v2.5.1 */
function create_ma... | Skip transitions on initial render
Particularly in the case of components that are replacing server-rendered HTML, you might want transitions to only run when data changes, rather than running when the component is first rendered.
Best way to do this is presumably with a directive along these lines...
```html
<d... | Could skip be an optional property on the animation similar to delay, duration, etc.?
`<div in:fade='{ initial: false }'>...</div>`
or maybe more generic
`<div in:fade='{ enabled: false }'>...</div>`
The `component.observe` method takes the parameter `{ init: false }` to skip the initial trigger. We could go w... | 2018-05-12 16:14:59+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['js window-binding-scroll', 'js inline-style-optimized-multiple', 'cli dir-subdir', 'runtime transition-js-intro-skipped-by-default (shared helpers)', 'js event-handlers-custom', 'js inline-style-optimized-url', 'js setup-method', 'js legacy-input-type', 'js css-media-query', 'js input-range', 'cli dir', 'js title', '... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 4 | 0 | 4 | false | false | ["src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:build", "src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:remount", "src/compile/dom/index.ts->program->function_declaration:dom", "src/shared/index.js->program->function_declaration:_mount"] |
sveltejs/svelte | 1,464 | sveltejs__svelte-1464 | ['1461'] | ee052dc7bd199190d2e3e493429c68b7435f8210 | diff --git a/src/compile/nodes/Component.ts b/src/compile/nodes/Component.ts
--- a/src/compile/nodes/Component.ts
+++ b/src/compile/nodes/Component.ts
@@ -5,7 +5,7 @@ import stringifyProps from '../../utils/stringifyProps';
import CodeBuilder from '../../utils/CodeBuilder';
import getTailSnippet from '../../utils/get... | diff --git a/test/runtime/samples/component-slot-name-with-hyphen/Nested.html b/test/runtime/samples/component-slot-name-with-hyphen/Nested.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/component-slot-name-with-hyphen/Nested.html
@@ -0,0 +1,3 @@
+<div>
+ <slot name="foo-bar"/>
+</div>
\ No newline ... | Slot names are not escaped correctly
When creating slots, it appears that the slot name is not escaped correctly if the name doesn't follow Javascript naming conventions. For example:
```
<slot name="some-slot"></slot>
```
results in an error similar to:
```
ERROR in ./component/BasePage.sv.html
Module bu... | null | 2018-05-14 23:56:01+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime component-slot-name-with-hyphen (shared helpers)', 'runtime component-slot-name-with-hyphen (shared helpers, hydration)', 'runtime component-slot-name-with-hyphen (inline helpers)', 'ssr component-slot-name-with-hyphen'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 13 | 0 | 13 | false | false | ["src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:build", "src/compile/nodes/Slot.ts->program->class_declaration:Slot->method_definition:ssr", "src/utils/quoteIfNecessary.ts->program->function_declaration:quoteIfNecessary", "src/compile/nodes/Slot.ts->program->function_declaratio... |
sveltejs/svelte | 1,477 | sveltejs__svelte-1477 | ['1460'] | cffbd2709c9004acd99acb37993a65728a721986 | diff --git a/src/compile/dom/index.ts b/src/compile/dom/index.ts
--- a/src/compile/dom/index.ts
+++ b/src/compile/dom/index.ts
@@ -182,7 +182,7 @@ export default function dom(
})}
${compiler.bindingGroups.length &&
`this._bindingGroups = [${Array(compiler.bindingGroups.length).fill('[]').join(', ')}];`}
- t... | diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.html b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.html
@@ -0,0 +1,16 @@
+<div tran... | Nested components play intros when they shouldn't
Components should inherit the `intro` status of their parents. Currently, [they don't](https://svelte.technology/repl?version=2.6.1&gist=bc219a76f492f6f0ae8a545a863f8e95).
| null | 2018-05-17 01:37:15+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime transition-js-intro-skipped-by-default-nested (shared helpers)', 'runtime transition-js-intro-skipped-by-default-nested (shared helpers, hydration)', 'runtime transition-js-intro-skipped-by-default-nested (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compile/dom/index.ts->program->function_declaration:dom", "src/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:addTransitions"] |
sveltejs/svelte | 1,479 | sveltejs__svelte-1479 | ['1470'] | cffbd2709c9004acd99acb37993a65728a721986 | diff --git a/src/compile/dom/index.ts b/src/compile/dom/index.ts
--- a/src/compile/dom/index.ts
+++ b/src/compile/dom/index.ts
@@ -55,6 +55,10 @@ export default function dom(
compiler.fragment.build();
const { block } = compiler.fragment;
+ if (compiler.options.nestedTransitions) {
+ block.hasOutroMethod = true;... | diff --git a/test/runtime/samples/if-block-component-without-outro/Widget.html b/test/runtime/samples/if-block-component-without-outro/Widget.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/if-block-component-without-outro/Widget.html
@@ -0,0 +1 @@
+<div>A wild component appears</div>
\ No newline at... | Error with transition changes in 2.6.1
See https://svelte.technology/repl?version=2.6.1&gist=7b57b551d51b754e048a2fab07c18459
Components within an if-statement throw an error:
```
component1._fragment.o is not a function
```
| null | 2018-05-17 01:55:44+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime if-block-component-without-outro (shared helpers)', 'runtime if-block-component-without-outro (shared helpers, hydration)', 'runtime if-block-component-without-outro (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/dom/index.ts->program->function_declaration:dom"] |
sveltejs/svelte | 1,490 | sveltejs__svelte-1490 | ['1489'] | 80077c13c384efd889ccaf5579440922a76ff0b4 | diff --git a/src/compile/nodes/Component.ts b/src/compile/nodes/Component.ts
--- a/src/compile/nodes/Component.ts
+++ b/src/compile/nodes/Component.ts
@@ -290,7 +290,7 @@ export default class Component extends Node {
}
statements.push(deindent`
- if (${binding.prop} in ${binding.obj}) {
+ if (${bind... | diff --git a/test/runtime/samples/dynamic-component-bindings-recreated-b/Green.html b/test/runtime/samples/dynamic-component-bindings-recreated-b/Green.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/dynamic-component-bindings-recreated-b/Green.html
@@ -0,0 +1,11 @@
+<p>green {foo}</p>
+
+<script>
+ ... | <svelte:component> bindings don't run on change
Sibling issue to #1488 — when a `<svelte:component>` is first created, Svelte runs `_bind`. But that doesn't happen when the `this` value changes. [REPL](https://svelte.technology/repl?version=2.6.3&gist=44ee86d9f03e5dbca311e3b3782aab4f)
| null | 2018-05-24 12:35:35+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime dynamic-component-bindings-recreated-b (inline helpers)', 'runtime dynamic-component-bindings-recreated-b (shared helpers)', 'runtime dynamic-component-bindings-recreated-b (shared helpers, hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:build", "src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:ssr"] |
sveltejs/svelte | 1,493 | sveltejs__svelte-1493 | ['1492'] | 9e52cf931da6078c9e34803d1be971632b82f6cf | diff --git a/src/compile/dom/Block.ts b/src/compile/dom/Block.ts
--- a/src/compile/dom/Block.ts
+++ b/src/compile/dom/Block.ts
@@ -44,7 +44,9 @@ export default class Block {
maintainContext: boolean;
hasAnimation: boolean;
- hasIntroMethod: boolean;
+ hasIntros: boolean;
+ hasOutros: boolean;
+ hasIntroMethod: bo... | diff --git a/test/runtime/samples/if-block-else-partial-outro/Foo.html b/test/runtime/samples/if-block-else-partial-outro/Foo.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/if-block-else-partial-outro/Foo.html
@@ -0,0 +1 @@
+foo
\ No newline at end of file
diff --git a/test/runtime/samples/if-block-... | outroing is not defined with nestedTransitions: true
With the `nestedTransitions: true` option, it's possible to end up in a situation where one branch of an `if` block potentially has outros, but another doesn't, and Svelte checks for a non-existent `outroing` variable in the block that doesn't upon update.
```html... | null | 2018-05-25 03:43:31+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime if-block-else-partial-outro (inline helpers)', 'runtime if-block-else-partial-outro (shared helpers)', 'runtime if-block-else-partial-outro (shared helpers, hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 12 | 1 | 13 | false | false | ["src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:buildKeyed", "src/compile/dom/Block.ts->program->class_declaration:Block->method_definition:addOutro", "src/compile/dom/Block.ts->program->class_declaration:Block", "src/compile/nodes/Attribute.ts->program->class_declaration:Attri... |
sveltejs/svelte | 1,498 | sveltejs__svelte-1498 | ['1497', '1497'] | 058f7ea43a94cd880d086457c72cab7a10463eec | diff --git a/src/compile/nodes/AwaitBlock.ts b/src/compile/nodes/AwaitBlock.ts
--- a/src/compile/nodes/AwaitBlock.ts
+++ b/src/compile/nodes/AwaitBlock.ts
@@ -172,12 +172,13 @@ export default class AwaitBlock extends Node {
}
if (this.pending.block.hasOutroMethod && this.compiler.options.nestedTransitions) {
+ ... | diff --git a/test/runtime/samples/nested-transition-detach-each/_config.js b/test/runtime/samples/nested-transition-detach-each/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/nested-transition-detach-each/_config.js
@@ -0,0 +1,41 @@
+export default {
+ data: {
+ visible: false,
+ rows: [1, 2... | Another nestedTransitions bug
[REPL](https://svelte.technology/repl?version=2.6.5&gist=eda1eecbbd0d218b3f0e17817e8348a2)
Another nestedTransitions bug
[REPL](https://svelte.technology/repl?version=2.6.5&gist=eda1eecbbd0d218b3f0e17817e8348a2)
| That looks the same as mine, although my transition isn't nested https://svelte.technology/repl?version=2.6.0&gist=bddff497d8ec8f3bac0ca8001513b655, I think transition inside of a loop is what's borked.
That looks the same as mine, although my transition isn't nested https://svelte.technology/repl?version=2.6.0&gist=bd... | 2018-05-25 20:37:59+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime nested-transition-detach-each (shared helpers, hydration)', 'runtime nested-transition-detach-each (inline helpers)', 'runtime nested-transition-detach-each (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:buildKeyed", "src/compile/nodes/AwaitBlock.ts->program->class_declaration:AwaitBlock->method_definition:build", "src/compile/nodes/IfBlock.ts->program->class_declaration:IfBlock->method_definition:build", "src/compile/nodes/EachBl... |
sveltejs/svelte | 1,516 | sveltejs__svelte-1516 | ['1515'] | 7032ec745cdf17f25c47659ebb989c88fe24a157 | diff --git a/src/compile/nodes/Component.ts b/src/compile/nodes/Component.ts
--- a/src/compile/nodes/Component.ts
+++ b/src/compile/nodes/Component.ts
@@ -176,7 +176,7 @@ export default class Component extends Node {
const { name, dependencies } = attr;
const condition = dependencies.size > 0 && (dependen... | diff --git a/test/runtime/samples/spread-component-multiple-dependencies/Widget.html b/test/runtime/samples/spread-component-multiple-dependencies/Widget.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/spread-component-multiple-dependencies/Widget.html
@@ -0,0 +1 @@
+{foo} {baz}
diff --git a/test/run... | Using {...spread} alongside ternary errors out
[REPL](https://svelte.technology/repl?version=2.7.0&gist=a189e5e7181ed608a837a6a614a4dd25)
If you have some attribute defined by a ternary operator and try to spread some object, this happens:
 has two or more dependencies. It's an order of operations thing. In the code for this REPL example, we're generating `changed.visible || changed.value && { value: ctx.visible ? ctx.value : '****' }`... | 2018-05-30 16:04:34+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime spread-component-multiple-dependencies (shared helpers, hydration)', 'runtime spread-element-multiple-dependencies (inline helpers)', 'runtime spread-element-multiple-dependencies (shared helpers)', 'runtime spread-component-multiple-dependencies (shared helpers)', 'runtime spread-element-multiple-dependencie... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:build", "src/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:addSpreadAttributes"] |
sveltejs/svelte | 1,529 | sveltejs__svelte-1529 | ['1527'] | 7c0986fded4b24a62881929912bf33283175aa8a | diff --git a/src/compile/dom/Block.ts b/src/compile/dom/Block.ts
--- a/src/compile/dom/Block.ts
+++ b/src/compile/dom/Block.ts
@@ -142,6 +142,10 @@ export default class Block {
}
addVariable(name: string, init?: string) {
+ if (name[0] === '#') {
+ name = this.alias(name.slice(1));
+ }
+
if (this.variables... | diff --git a/test/runtime/samples/nested-transition-if-block-not-remounted/Span.html b/test/runtime/samples/nested-transition-if-block-not-remounted/Span.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/nested-transition-if-block-not-remounted/Span.html
@@ -0,0 +1 @@
+<span><slot></slot></span>
\ No n... | Nested transitions cause inputs to lose focus
See the [REPL](https://svelte.technology/repl?version=2.7.1&gist=ba601f15c9b99c3aee760bf15f3b27a6).
It looks like the issue is that the `<input>` is getting remounted because the `if` block's intro method is being called, and there's no check in place to ensure that it's... | null | 2018-06-06 21:24:50+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime nested-transition-if-block-not-remounted (shared helpers, hydration)', 'runtime nested-transition-if-block-not-remounted (inline helpers)', 'runtime nested-transition-if-block-not-remounted (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 6 | 0 | 6 | false | false | ["src/compile/dom/Block.ts->program->class_declaration:Block->method_definition:toString", "src/compile/nodes/Attribute.ts->program->class_declaration:Attribute->method_definition:renderStyle", "src/compile/nodes/Attribute.ts->program->class_declaration:Attribute->method_definition:render", "src/compile/nodes/shared/Ta... |
sveltejs/svelte | 1,533 | sveltejs__svelte-1533 | ['1532'] | b76f0744019dabc6ba0468f9bca8c5f501fc7d02 | diff --git a/src/shared/utils.js b/src/shared/utils.js
--- a/src/shared/utils.js
+++ b/src/shared/utils.js
@@ -15,6 +15,7 @@ export function isPromise(value) {
}
export function callAfter(fn, i) {
+ if (i === 0) fn();
return () => {
if (!--i) fn();
};
| diff --git a/test/runtime/samples/each-block-empty-outro/Thing.html b/test/runtime/samples/each-block-empty-outro/Thing.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/each-block-empty-outro/Thing.html
@@ -0,0 +1 @@
+<p>{thing}</p>
\ No newline at end of file
diff --git a/test/runtime/samples/each-bl... | Empty lists with transitions prevent DOM from being removed
[REPL](https://svelte.technology/repl?version=2.7.1&gist=87122d2f34f1b5ed6cf34f5fb008a390). The outro callback is never called if the list is empty.
| null | 2018-06-08 13:31:08+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime each-block-empty-outro (inline helpers)', 'runtime each-block-empty-outro (shared helpers, hydration)', 'runtime each-block-empty-outro (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/shared/utils.js->program->function_declaration:callAfter"] |
sveltejs/svelte | 1,555 | sveltejs__svelte-1555 | ['887'] | 17000e38f66d184389b8fd562a3a7f4b0a39bdb3 | diff --git a/src/compile/nodes/Component.ts b/src/compile/nodes/Component.ts
--- a/src/compile/nodes/Component.ts
+++ b/src/compile/nodes/Component.ts
@@ -5,7 +5,7 @@ import stringifyProps from '../../utils/stringifyProps';
import CodeBuilder from '../../utils/CodeBuilder';
import getTailSnippet from '../../utils/get... | diff --git a/test/runtime/samples/component-binding-invalid-identifier/Counter.html b/test/runtime/samples/component-binding-invalid-identifier/Counter.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/component-binding-invalid-identifier/Counter.html
@@ -0,0 +1,14 @@
+<button on:click='set({ "x-count"... | Component arguments that are not valid JS identifiers
<!--
Thanks for raising an issue! (For *questions*, we recommend instead using https://stackoverflow.com and adding the 'svelte' tag.)
To help us help you, if you've found a bug please consider the following:
* If you can demonstrate the bug using https://sve... | Thanks! Yeah, something should be done about this. I'm wondering though whether it might be better to instead disallow attributes like `b-c` on nested components. There are definitely some other places in Svelte where property names that aren't valid as `.whatever` keys aren't supported.
I think once #1106 gets settled... | 2018-06-22 17:45:04+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime component-binding-invalid-identifier (inline helpers)', 'ssr component-invalid-identifier', 'runtime component-invalid-identifier (shared helpers, hydration)', 'runtime component-binding-invalid-identifier (shared helpers)', 'runtime component-binding-invalid-identifier (shared helpers, hydration)', 'runtime ... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:build", "src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:ssr"] |
sveltejs/svelte | 1,574 | sveltejs__svelte-1574 | ['1571'] | 2bb62c3436038a442d27953287a25c6a1b1adddd | diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts
--- a/src/compile/nodes/Element.ts
+++ b/src/compile/nodes/Element.ts
@@ -252,12 +252,8 @@ export default class Element extends Node {
if (this.name === 'noscript') return;
- const childState = {
- parentNode: this.var,
- parentNodes: ... | diff --git a/test/runtime/samples/template/_config.js b/test/runtime/samples/template/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/template/_config.js
@@ -0,0 +1,23 @@
+export default {
+ // solo: 1,
+
+ html: `
+ <template>
+ <div>foo</div>
+ </template>
+ `,
+
+ test(assert, component,... | <template> innerHTML is empty
[REPL](https://svelte.technology/repl?version=2.8.1&gist=3514780be4b12b55811bf8df1fc557b4)
Basically, it should work: [JSFIDDLE](http://jsfiddle.net/hwL2qv75/2/)
| null | 2018-07-01 18:05:29+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime template (shared helpers, hydration)', 'runtime template (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:build"] |
sveltejs/svelte | 1,582 | sveltejs__svelte-1582 | ['1581'] | 2edc56b91996288f1a86c3fe409d8e3d85dc7e8f | diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts
--- a/src/compile/nodes/Element.ts
+++ b/src/compile/nodes/Element.ts
@@ -152,8 +152,14 @@ export default class Element extends Node {
);
this.attributes.forEach(attr => {
- if (attr.dependencies.size) {
+ if (
+ attr.chunks &&
+ ... | diff --git a/test/runtime/samples/attribute-dynamic-no-dependencies/_config.js b/test/runtime/samples/attribute-dynamic-no-dependencies/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/attribute-dynamic-no-dependencies/_config.js
@@ -0,0 +1,5 @@
+export default {
+ html: `
+ <div><div title='fo... | Over-permissive logic for .innerHTML optimizations
See https://github.com/simonlayfield/svelte-each-index - Svelte is using the .innerHTML optimization when it shouldn't. The `{i}`s in the loop should be dynamic.
As of #1499 this won't be reproducible in dev mode / in the repl.
cc @simonlayfield
| Reduced example:
```html
{#each foo as bar, i}
<div><div title={i}>x</div></div>
{/each}
<script>
export default {
data: () => ({ foo: [0, 1, 2, 3, 4] }),
};
</script>
```
So far it seems that the relevant factors seem to be: if we have an each loop, and we are only using its key (not its value), ... | 2018-07-08 05:50:24+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime attribute-dynamic-no-dependencies (inline helpers)', 'runtime attribute-dynamic-no-dependencies (shared helpers)', 'runtime attribute-dynamic-no-dependencies (shared helpers, hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:init"] |
sveltejs/svelte | 1,584 | sveltejs__svelte-1584 | ['1580'] | 2edc56b91996288f1a86c3fe409d8e3d85dc7e8f | diff --git a/src/compile/nodes/IfBlock.ts b/src/compile/nodes/IfBlock.ts
--- a/src/compile/nodes/IfBlock.ts
+++ b/src/compile/nodes/IfBlock.ts
@@ -250,7 +250,7 @@ export default class IfBlock extends Node {
dynamic,
{ name, anchor, hasElse }
) {
- const select_block_type = block.getUniqueName(`select_block_typ... | diff --git a/test/runtime/samples/if-block-outro-unique-select-block-type/Component.html b/test/runtime/samples/if-block-outro-unique-select-block-type/Component.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/if-block-outro-unique-select-block-type/Component.html
@@ -0,0 +1 @@
+<div></div>
diff --gi... | if_block_creators[current_block_type_index] is not a function
I was trying to create component with several if-else statements, that depends on component data variable.
First statement block should add one of nested components, second statement block should add some button tags.
I got an error **if_block_creator... | (Things are a bit more confusing in the REPL at the moment than the should be because of [this issue](https://github.com/sveltejs/svelte.technology/issues/327). For now, it's best to look at this by downloading the .zip and running it locally.)
The issue here seems to be that the two `select_block_type` functions ar... | 2018-07-08 14:57:59+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime if-block-outro-unique-select-block-type (shared helpers)', 'runtime if-block-outro-unique-select-block-type (shared helpers, hydration)', 'runtime if-block-outro-unique-select-block-type (inline helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/IfBlock.ts->program->class_declaration:IfBlock->method_definition:buildCompoundWithOutros"] |
sveltejs/svelte | 1,586 | sveltejs__svelte-1586 | ['1559'] | 7774c6d92a657d6b12e1b79ef6a04aa4435f27b9 | diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts
--- a/src/compile/nodes/EachBlock.ts
+++ b/src/compile/nodes/EachBlock.ts
@@ -189,6 +189,7 @@ export default class EachBlock extends Node {
if (this.else) {
const each_block_else = compiler.getUniqueName(`${each}_else`);
+ const mou... | diff --git a/test/runtime/samples/each-block-else-mount-or-intro/Widget.html b/test/runtime/samples/each-block-else-mount-or-intro/Widget.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/each-block-else-mount-or-intro/Widget.html
@@ -0,0 +1 @@
+Foo
diff --git a/test/runtime/samples/each-block-else-mou... | each_else.i is not a function
REPL: https://svelte.technology/repl?version=2.8.1&gist=d929e4517407a49609079c0fabc4ad0f
Only if an array is empty.
| Interesting. This has something to do with there being a nested component in the main `{#each}` part but not in the `{:else}`. I'll have to dig a bit more to figure out which methods are supposed to be defined on which fragments.
@Conduitry Yes, it's related to a nested component. Without it, everything works. | 2018-07-09 14:29:07+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime each-block-else-mount-or-intro (shared helpers, hydration)', 'runtime each-block-else-mount-or-intro (inline helpers)', 'runtime each-block-else-mount-or-intro (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 1 | 1 | 2 | false | false | ["src/compile/nodes/ElseBlock.ts->program->class_declaration:ElseBlock", "src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:build"] |
sveltejs/svelte | 1,587 | sveltejs__svelte-1587 | ['1573'] | 7774c6d92a657d6b12e1b79ef6a04aa4435f27b9 | diff --git a/src/shared/index.js b/src/shared/index.js
--- a/src/shared/index.js
+++ b/src/shared/index.js
@@ -47,9 +47,12 @@ export function fire(eventName, data) {
var handler = handlers[i];
if (!handler.__calling) {
- handler.__calling = true;
- handler.call(this, data);
- handler.__calling = false;
+ ... | diff --git a/test/cli/samples/basic/expected/Main.js b/test/cli/samples/basic/expected/Main.js
--- a/test/cli/samples/basic/expected/Main.js
+++ b/test/cli/samples/basic/expected/Main.js
@@ -100,9 +100,12 @@ function fire(eventName, data) {
var handler = handlers[i];
if (!handler.__calling) {
- handler.__call... | Event handler removed after callback fails
Hello,
I found what I think is a bug.
I listen to windows keyup events in a child component, so I can add and remove this component in a #if block (because my component is kind of a lightbox slideshow so most of the time it is not visible, so I want the event listeners t... | What's happening here is the `__calling` flag on the handler is getting set to true, and then never set to false again because of the exception, and so the `this.fire(...)` doesn't actually call any more handlers for this event.
In other areas, Svelte has taken the position that not having unhandled exceptions is th... | 2018-07-09 16:43:49+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['js window-binding-scroll', 'js inline-style-optimized-multiple', 'cli dir-subdir', 'js event-handlers-custom', 'js inline-style-optimized-url', 'js setup-method', 'js legacy-input-type', 'js css-media-query', 'js input-range', 'cli dir', 'js title', 'cli sourcemap', 'cli dir-sourcemap', 'runtime component-events-fire... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/shared/index.js->program->function_declaration:fire"] |
sveltejs/svelte | 1,597 | sveltejs__svelte-1597 | ['1596'] | 63e64c6f42b16fe00f316d128f814a051bda3b9b | diff --git a/src/compile/nodes/Component.ts b/src/compile/nodes/Component.ts
--- a/src/compile/nodes/Component.ts
+++ b/src/compile/nodes/Component.ts
@@ -429,12 +429,13 @@ export default class Component extends Node {
`)}
${this.ref && `#component.refs.${this.ref} = ${name};`}
- }
-
- ${this.re... | diff --git a/test/runtime/samples/dynamic-component-nulled-out/Foo.html b/test/runtime/samples/dynamic-component-nulled-out/Foo.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/dynamic-component-nulled-out/Foo.html
@@ -0,0 +1 @@
+<p>Foo</p>
\ No newline at end of file
diff --git a/test/runtime/samples... | Dynamic component instances aren't nulled out if they no longer exist
resulting in bugs like this: https://svelte.technology/repl?version=2.9.4&gist=548cb46d598080e13992ccacb9989a10
This affects the forthcoming version of Sapper. AFAICT it's an easy fix — PR inbound
| null | 2018-07-17 18:11:36+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime dynamic-component-nulled-out (inline helpers)', 'runtime dynamic-component-nulled-out (shared helpers)', 'runtime dynamic-component-nulled-out (shared helpers, hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/Component.ts->program->class_declaration:Component->method_definition:build"] |
sveltejs/svelte | 1,609 | sveltejs__svelte-1609 | ['1608'] | f2ac545e28cda0c114dba2514bac7e63aac11b91 | diff --git a/src/validate/html/validateElement.ts b/src/validate/html/validateElement.ts
--- a/src/validate/html/validateElement.ts
+++ b/src/validate/html/validateElement.ts
@@ -145,6 +145,22 @@ export default function validateElement(
message: `'checked' binding can only be used with <input type="checkbox"> or... | diff --git a/test/js/samples/input-files/expected-bundle.js b/test/js/samples/input-files/expected-bundle.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/input-files/expected-bundle.js
@@ -0,0 +1,199 @@
+function noop() {}
+
+function assign(tar, src) {
+ for (var k in src) tar[k] = src[k];
+ return tar;
+}... | Can not bind to 'files' attribute of input element
I recently tried:
```
<input type="file" multiple bind:files="files">
```
And received the compile time error:
```
[!] (svelte plugin) ValidationError: 'files' is not a valid binding
```
Am currently working on a PR.
| null | 2018-07-23 02:11:56+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['js input-files'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/validate/html/validateElement.ts->program->function_declaration:validateElement"] |
sveltejs/svelte | 1,610 | sveltejs__svelte-1610 | ['1600'] | f2ac545e28cda0c114dba2514bac7e63aac11b91 | diff --git a/src/shared/dom.js b/src/shared/dom.js
--- a/src/shared/dom.js
+++ b/src/shared/dom.js
@@ -220,7 +220,7 @@ export function addResizeListener(element, fn) {
return {
cancel: () => {
- win.removeEventListener('resize', fn);
+ win && win.removeEventListener('resize', fn);
element.removeChild(obj... | diff --git a/test/js/samples/bind-width-height/expected-bundle.js b/test/js/samples/bind-width-height/expected-bundle.js
--- a/test/js/samples/bind-width-height/expected-bundle.js
+++ b/test/js/samples/bind-width-height/expected-bundle.js
@@ -43,7 +43,7 @@ function addResizeListener(element, fn) {
return {
cance... | addResizeListener bug
It's possible (albeit unusual) for [this line](https://github.com/sveltejs/svelte/blob/82c9217e534fef018b04dbfa0bf7483303f3dcb8/src/shared/dom.js#L223) to run before `win` has been set
| This bug hit me yesterday... During a demo no less.
In my case I was destroying a component too quickly after it was instantiated, using a `<svelte:component>` | 2018-07-23 14:13:10+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['js bind-width-height'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/shared/dom.js->program->function_declaration:addResizeListener"] |
sveltejs/svelte | 1,612 | sveltejs__svelte-1612 | ['1589', '1589'] | f2ac545e28cda0c114dba2514bac7e63aac11b91 | diff --git a/src/compile/nodes/IfBlock.ts b/src/compile/nodes/IfBlock.ts
--- a/src/compile/nodes/IfBlock.ts
+++ b/src/compile/nodes/IfBlock.ts
@@ -90,6 +90,9 @@ export default class IfBlock extends Node {
dynamic = true;
block.addDependencies(node.else.block.dependencies);
}
+
+ if (node.else.block.... | diff --git a/test/runtime/samples/if-block-no-outro-else-with-outro/Widget.html b/test/runtime/samples/if-block-no-outro-else-with-outro/Widget.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/if-block-no-outro-else-with-outro/Widget.html
@@ -0,0 +1 @@
+<div>A wild component appears</div>
\ No newline... | Uncaught ReferenceError: current is not defined
### Steps to reproduce
1. Open gist: https://svelte.technology/repl?version=2.9.3&gist=906410361695020ab832e410780acc69
2. Type something in the text box
3. Look at the console for the error
This only happens when the else block has a nested component.
And, on... | I'm also running into `Uncaught ReferenceError: current is not defined` errors, but I'm not using transitions at all. It happens in a larger application I'm working on now, but so far I haven't been able to create a minimal example which triggers it.
I'm also running into `Uncaught ReferenceError: current is not define... | 2018-07-23 15:17:10+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime ani... | ['runtime if-block-no-outro-else-with-outro (shared helpers, hydration)', 'runtime if-block-no-outro-else-with-outro (inline helpers)', 'runtime if-block-no-outro-else-with-outro (shared helpers)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/IfBlock.ts->program->class_declaration:IfBlock->method_definition:init->function_declaration:attachBlocks"] |
sveltejs/svelte | 1,627 | sveltejs__svelte-1627 | ['1598'] | 814a32357f794ed575c956efbce30d2698cf6713 | diff --git a/src/compile/nodes/MustacheTag.ts b/src/compile/nodes/MustacheTag.ts
--- a/src/compile/nodes/MustacheTag.ts
+++ b/src/compile/nodes/MustacheTag.ts
@@ -10,7 +10,7 @@ export default class MustacheTag extends Tag {
) {
const { init } = this.renameThisMethod(
block,
- value => `${this.var}.data = ${v... | diff --git a/test/cli/samples/globals/expected/Main.js b/test/cli/samples/globals/expected/Main.js
--- a/test/cli/samples/globals/expected/Main.js
+++ b/test/cli/samples/globals/expected/Main.js
@@ -26,7 +26,7 @@ var Main = (function(answer) { "use strict";
p(changed, ctx) {
if (changed.answer) {
- text_... | this.set({ value: null }) behaves differently to initial null value
https://svelte.technology/repl?version=2.9.4&gist=10632ba5ca7614778159a4f6b36584a6
| null | 2018-08-04 13:35:47+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['cli dir-subdir', 'css combinator-child', 'create should return undefined when source is invalid ', 'cli dir', 'css attribute-selector-only-name', 'css css-vars', 'css empty-rule', 'cli sourcemap', 'create should return a component constructor', 'cli dir-sourcemap', 'css empty-class', 'css attribute-selector-unquoted'... | ['cli store', 'cli globals'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compile/nodes/MustacheTag.ts->program->class_declaration:MustacheTag->method_definition:build", "src/shared/dom.js->program->function_declaration:setData"] |
sveltejs/svelte | 1,811 | sveltejs__svelte-1811 | ['1807'] | c29dc42e2ede0ff2b23435b9fb8c577ea02306ce | diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts
--- a/src/compile/render-dom/index.ts
+++ b/src/compile/render-dom/index.ts
@@ -146,9 +146,18 @@ export default function dom(
const hasInitHooks = !!(templateProperties.oncreate || templateProperties.onstate || templateProperties.onupdate)... | diff --git a/test/cli/samples/dev/expected/Main.js b/test/cli/samples/dev/expected/Main.js
--- a/test/cli/samples/dev/expected/Main.js
+++ b/test/cli/samples/dev/expected/Main.js
@@ -28,7 +28,10 @@ function create_main_fragment(component, ctx) {
function Main(options) {
this._debugName = '<Main>';
- if (!options |... | In dev mode, provide better error than 'cannot read property _init of null'
If a component references a store `$property`, it will try to subscribe to the store. If there is no store, it will result in a weird error. The error could be much friendlier, at least in dev mode
| null | 2018-10-27 18:34:10+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['cli dir-subdir', 'css combinator-child', 'create should return undefined when source is invalid ', 'cli dir', 'css attribute-selector-only-name', 'css css-vars', 'css empty-rule', 'cli amd', 'cli sourcemap', 'create should return a component constructor', 'cli dir-sourcemap', 'css empty-class', 'css attribute-selecto... | ['cli dev'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compile/render-ssr/index.ts->program->function_declaration:ssr", "src/compile/render-dom/index.ts->program->function_declaration:dom"] |
sveltejs/svelte | 1,899 | sveltejs__svelte-1899 | ['1897'] | 29052aba7d0b78316d3a52aef1d7ddd54fe6ca84 | diff --git a/src/compile/nodes/shared/Expression.ts b/src/compile/nodes/shared/Expression.ts
--- a/src/compile/nodes/shared/Expression.ts
+++ b/src/compile/nodes/shared/Expression.ts
@@ -261,7 +261,7 @@ export default class Expression {
if (dirty.length) component.has_reactive_assignments = true;
- co... | diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js
--- a/test/js/samples/action-custom-event-handler/expected.js
+++ b/test/js/samples/action-custom-event-handler/expected.js
@@ -43,32 +43,32 @@ function foo(node, callback) {
// code goes her... | Better invalidation
This can be improved:
```js
function define($$self, $$props, $$make_dirty) {
let { name } = $$props;
function input_input_handler() {
name = this.value;
$$make_dirty('name');
}
$$self.$$.get = () => ({ name, input_input_handler });
$$self.$$.set = $$props => {
... | null | 2018-12-22 23:34:58+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime comp... | ['js window-binding-scroll', 'js inline-style-optimized-multiple', 'js instrumentation-template-if-no-block', 'js inline-style-optimized-url', 'js setup-method', 'js legacy-input-type', 'js css-media-query', 'js input-range', 'js instrumentation-script-x-equals-x', 'js title', 'js dynamic-import', 'js use-elements-as-a... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 15 | 0 | 15 | false | false | ["src/internal/scheduler.js->program->function_declaration:flush", "src/compile/render-dom/index.ts->program->function_declaration:dom", "src/internal/scheduler.js->program->function_declaration:update", "src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:addB... |
sveltejs/svelte | 1,907 | sveltejs__svelte-1907 | ['1902'] | 4fbc0c0f5259fd2e69d12459adb8a9c7a8fe90be | diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts
--- a/src/compile/render-dom/index.ts
+++ b/src/compile/render-dom/index.ts
@@ -131,10 +131,10 @@ export default function dom(
if (expected.length) {
dev_props_check = deindent`
const { ctx } = this.$$;
+ const props = ${optio... | diff --git a/test/custom-elements/samples/no-missing-prop-warnings/test.js b/test/custom-elements/samples/no-missing-prop-warnings/test.js
--- a/test/custom-elements/samples/no-missing-prop-warnings/test.js
+++ b/test/custom-elements/samples/no-missing-prop-warnings/test.js
@@ -12,7 +12,7 @@ export default function (ta... | Erroneous missing data warnings
Missing data warnings shouldn't be emitted if a prop was provided, even if it equals `null` or `undefined`: [REPL](https://v3.svelte.technology/repl?version=3.0.0-alpha8&gist=1a7796ea08f2c20115c4e0b2b1e87254)
| null | 2018-12-23 19:29:52+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime hash... | ['runtime dev-warning-missing-data-binding (with hydration)', 'js debug-foo-bar-baz-things', 'runtime dev-warning-missing-data (with hydration)', 'runtime dev-warning-missing-data ', 'runtime dev-warning-missing-data-binding ', 'js debug-empty', 'runtime dev-warning-missing-data-component ', 'runtime dev-warning-missin... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/render-dom/index.ts->program->function_declaration:dom"] |
sveltejs/svelte | 1,909 | sveltejs__svelte-1909 | ['1898'] | eefe120e708204effea315da2ab4920efbcc1f9d | diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts
--- a/src/compile/render-dom/wrappers/Element/index.ts
+++ b/src/compile/render-dom/wrappers/Element/index.ts
@@ -494,7 +494,7 @@ export default class ElementWrapper extends Wrapper {
block.addVariable... | diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js
--- a/test/js/samples/bind-width-height/expected.js
+++ b/test/js/samples/bind-width-height/expected.js
@@ -13,7 +13,7 @@ function create_fragment(component, ctx) {
m(target, anchor) {
insert(target, div,... | resize bindings broken in v3
The handler isn't being called with the element as context
https://v3.svelte.technology/repl?version=3.0.0-alpha8&gist=0eb9e3a2d22b981b67924c326ed1293a
| null | 2018-12-23 20:55:01+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime hash... | ['js bind-width-height'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:addBindings"] |
sveltejs/svelte | 1,910 | sveltejs__svelte-1910 | ['1908'] | eefe120e708204effea315da2ab4920efbcc1f9d | diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts
--- a/src/compile/render-dom/wrappers/Element/index.ts
+++ b/src/compile/render-dom/wrappers/Element/index.ts
@@ -403,7 +403,9 @@ export default class ElementWrapper extends Wrapper {
const groups = event... | diff --git a/test/runtime/samples/binding-this-and-value/_config.js b/test/runtime/samples/binding-this-and-value/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/binding-this-and-value/_config.js
@@ -0,0 +1,24 @@
+export default {
+ html: `
+ <input>
+ <p>value: initial</p>
+ `,
+
+ ssrHtml: ... | v3: Bindings broken when binding this and value
Here's a [REPL](https://v3.svelte.technology/repl?version=3.0.0-alpha9&gist=06e5b13e5ca1b9fb811f4178843b1e87) - when typing into the input, `$$node is not defined` is thown and the binding not updated.
| null | 2018-12-23 21:33:45+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime hash... | ['runtime binding-this-and-value ', 'runtime binding-this-and-value (with hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:addBindings"] |
sveltejs/svelte | 1,923 | sveltejs__svelte-1923 | ['1919'] | ff2a21e63ad243c6e19a7ac84e69021d3a788a9e | diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts
--- a/src/compile/render-dom/wrappers/Element/index.ts
+++ b/src/compile/render-dom/wrappers/Element/index.ts
@@ -410,7 +410,7 @@ export default class ElementWrapper extends Wrapper {
.filter(group => gr... | diff --git a/test/runtime/samples/binding-input-text-contextual-deconflicted/_config.js b/test/runtime/samples/binding-input-text-contextual-deconflicted/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/binding-input-text-contextual-deconflicted/_config.js
@@ -0,0 +1,37 @@
+export default {
+ pr... | Event handlers not deconflicted when one is binding inside each loop and one outside
```html
<input bind:value={foo}>
{#each [] as bar}
<input bind:value={bar}>
{/each}
```
results in code that look like
```javascript
function input_input_handler() {
foo = this.value;
$$invalidate('foo', foo);
}... | null | 2018-12-29 02:06:02+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime hash... | ['runtime binding-input-text-contextual-deconflicted ', 'runtime binding-input-text-contextual-deconflicted (with hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:addBindings"] |
sveltejs/svelte | 1,925 | sveltejs__svelte-1925 | ['1924'] | ff2a21e63ad243c6e19a7ac84e69021d3a788a9e | diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts
--- a/src/compile/render-dom/index.ts
+++ b/src/compile/render-dom/index.ts
@@ -80,7 +80,7 @@ export default function dom(
$$invalidate('${component.meta.props_object}', ${component.meta.props_object});
`}
${props.map(prop =>
... | diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js
--- a/test/js/samples/action-custom-event-handler/expected.js
+++ b/test/js/samples/action-custom-event-handler/expected.js
@@ -43,15 +43,15 @@ function foo(node, callback) {
// code goes her... | Internal state can be exposed
[REPL](https://v3.svelte.technology/repl?version=3.0.0-alpha12&gist=454e39c0b3c8b0e93d8bdbcd83d1017d)
| null | 2018-12-29 02:56:38+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime hash... | ['js window-binding-scroll', 'js inline-style-optimized-multiple', 'js inline-style-optimized-url', 'js input-range', 'runtime internal-state (with hydration)', 'js title', 'js use-elements-as-anchors', 'js collapses-text-around-comments', 'js debug-foo', 'js input-without-blowback-guard', 'js dont-use-dataset-in-legac... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 3 | 0 | 3 | false | false | ["src/internal/Component.js->program->class_declaration:SvelteComponent->method_definition:$set", "src/internal/Component.js->program->method_definition:$set", "src/compile/render-dom/index.ts->program->function_declaration:dom"] |
sveltejs/svelte | 1,926 | sveltejs__svelte-1926 | ['1918'] | ff2a21e63ad243c6e19a7ac84e69021d3a788a9e | diff --git a/src/compile/Component.ts b/src/compile/Component.ts
--- a/src/compile/Component.ts
+++ b/src/compile/Component.ts
@@ -164,7 +164,7 @@ export default class Component {
this.fragment = new Fragment(this, ast.html);
if (!options.customElement) this.stylesheet.reify();
- this.stylesheet.warnOnUnusedSe... | diff --git a/test/css/index.js b/test/css/index.js
--- a/test/css/index.js
+++ b/test/css/index.js
@@ -69,6 +69,8 @@ describe('css', () => {
})
);
+ assert.deepEqual(dom.stats.warnings, domWarnings);
+
const ssr = svelte.compile(
input,
Object.assign(config, {
@@ -81,6 +83,8 @@ describe('css'... | `stats.warnings` does not include all warnings
`stats.warnings` does not include any unused CSS selector warnings. There may be other warnings it's missing. We need to call `stats.warn` instead of `options.onwarn` whenever we have a warning.
This is present in v2 and v3.
| null | 2018-12-29 03:24:37+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime hash... | ['css unused-selector-ternary', 'css unused-selector', 'css omit-scoping-attribute-descendant', 'css empty-class', 'css unused-selector-leading'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 8 | 0 | 8 | false | false | ["src/compile/Component.ts->program->class_declaration:Component->method_definition:constructor", "src/compile/index.ts->program->function_declaration:normalize_options", "src/compile/index.ts->program->function_declaration:compile", "src/compile/wrapModule.ts->program->function_declaration:getGlobals", "src/compile/wr... |
sveltejs/svelte | 1,929 | sveltejs__svelte-1929 | ['1914'] | cd4f987f4ed53086510962b29a14c337f3d2cf8f | diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts
--- a/src/compile/nodes/Element.ts
+++ b/src/compile/nodes/Element.ts
@@ -585,7 +585,7 @@ export default class Element extends Node {
if (modifier === 'passive') {
if (passiveEvents.has(handler.name)) {
- if (!handler.usesEventOb... | diff --git a/test/js/samples/event-handler-no-passive/expected.js b/test/js/samples/event-handler-no-passive/expected.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/event-handler-no-passive/expected.js
@@ -0,0 +1,50 @@
+/* generated by Svelte vX.Y.Z */
+import { SvelteComponent as SvelteComponent_1, addLis... | `passive: true` is applied to events incorrectly
[REPL](https://v3.svelte.technology/repl?version=3.0.0-alpha12&gist=d52fe6c7022188241e15190f2cbd4de2). In v3, Svelte assumes you're never using the `event` object, so it applies the `passive: true` modifier more liberally.
| null | 2018-12-29 15:28:10+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime hash... | ['js event-handler-no-passive'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 2 | 1 | 3 | false | false | ["src/compile/nodes/EventHandler.ts->program->class_declaration:EventHandler->method_definition:constructor", "src/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:validateEventHandlers", "src/compile/nodes/EventHandler.ts->program->class_declaration:EventHandler"] |
sveltejs/svelte | 1,930 | sveltejs__svelte-1930 | ['1894'] | cd4f987f4ed53086510962b29a14c337f3d2cf8f | diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts
--- a/src/compile/render-dom/index.ts
+++ b/src/compile/render-dom/index.ts
@@ -279,7 +279,7 @@ export default function dom(
const user_code = component.javascript || (
component.ast.js.length === 0 && filtered_props.length > 0
- ? ... | diff --git a/test/runtime/index.js b/test/runtime/index.js
--- a/test/runtime/index.js
+++ b/test/runtime/index.js
@@ -126,7 +126,9 @@ describe("runtime", () => {
global.window = window;
- // Put the constructor on window for testing
+ if (config.before_test) config.before_test();
+
+ // Put thing... | Implicit props can break stuff
This component...
```html
<p>process.env.BASEURL: {process.env.BASEURL}</p>
```
...doesn't work, whereas this one does:
```html
<script>
// ...
</script>
<p>process.env.BASEURL: {process.env.BASEURL}</p>
```
That's because `process` is assumed to be an implicit prop... | What's the difference between an unknown global and an implicit prop? These seem impossible to distinguish.
My thinking is something like this should work:
```js
const { process = global.process } = $$props;
```
Oh, gotcha, so the compiler _wouldn't_ distinguish between them. A runtime fallback makes sense then. | 2018-12-29 15:59:01+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime hash... | ['runtime globals-accessible-directly-process (with hydration)', 'ssr globals-accessible-directly-process', 'runtime globals-accessible-directly-process '] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/render-dom/index.ts->program->function_declaration:dom"] |
sveltejs/svelte | 1,932 | sveltejs__svelte-1932 | ['1931'] | fc0ef221aff4789c7c579932e70c5f8243e97f32 | diff --git a/src/compile/Component.ts b/src/compile/Component.ts
--- a/src/compile/Component.ts
+++ b/src/compile/Component.ts
@@ -537,7 +537,6 @@ export default class Component {
});
this.extract_imports_and_exports(script.content, this.imports, this.props);
- this.rewrite_props();
this.hoist_instance_decl... | diff --git a/test/runtime/samples/prop-without-semicolon/_config.js b/test/runtime/samples/prop-without-semicolon/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/prop-without-semicolon/_config.js
@@ -0,0 +1,3 @@
+export default {
+ html: `<h1>Hello world!</h1>`
+};
\ No newline at end of file
d... | missing semi-colon after `export` generates invalid code
## Description
A component with an `export` statement that doesn't end in a semi-colon will compile successfully, but the generated code is invalid. Rollup throws a confusing error like ` Unexpected token (Note that you need plugins to import files that are no... | null | 2018-12-29 19:00:31+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime hash... | ['runtime prop-without-semicolon (with hydration)', 'runtime prop-without-semicolon ', 'ssr prop-without-semicolon'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/compile/Component.ts->program->class_declaration:Component->method_definition:walk_instance_js", "src/compile/Component.ts->program->class_declaration:Component->method_definition:rewrite_props", "src/compile/render-ssr/index.ts->program->function_declaration:ssr", "src/compile/render-dom/index.ts->program->funct... |
sveltejs/svelte | 1,934 | sveltejs__svelte-1934 | ['1896'] | f8517edba9fe99c95c9723d97f168455c6afd19a | diff --git a/src/compile/nodes/Binding.ts b/src/compile/nodes/Binding.ts
--- a/src/compile/nodes/Binding.ts
+++ b/src/compile/nodes/Binding.ts
@@ -7,7 +7,6 @@ export default class Binding extends Node {
name: string;
expression: Expression;
isContextual: boolean;
- usesContext: boolean;
obj: string;
prop: str... | diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js
--- a/test/js/samples/input-files/expected.js
+++ b/test/js/samples/input-files/expected.js
@@ -1,8 +1,8 @@
/* generated by Svelte vX.Y.Z */
-import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachN... | Media bindings broken in v3
https://v3.svelte.technology/repl?version=3.0.0-alpha8&demo=binding-media-elements
| null | 2018-12-31 04:38:31+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['js media-bindings', 'js input-files'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 15 | 4 | 19 | false | false | ["src/compile/render-dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:render", "src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:isMediaNode", "src/compile/nodes/Binding.ts->program->class_declaration:Binding->method_... |
sveltejs/svelte | 1,935 | sveltejs__svelte-1935 | ['1933', '1933'] | cc9a172d7c3ed152a261294dd19d4e6c96c06fbd | diff --git a/src/compile/Component.ts b/src/compile/Component.ts
--- a/src/compile/Component.ts
+++ b/src/compile/Component.ts
@@ -683,7 +683,7 @@ export default class Component {
// reference instance variables other than other
// hoistable functions. TODO others?
- const { hoistable_names, hoistable_nodes } ... | diff --git a/test/runtime/samples/animation-js-easing/_config.js b/test/runtime/samples/animation-js-easing/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/animation-js-easing/_config.js
@@ -0,0 +1,56 @@
+export default {
+ props: {
+ things: [
+ { id: 1, name: 'a' },
+ { id: 2, name: 'b' ... | Animate directive functions must be exported to be used with an easing function
When using `animate` directives the correspdoning function must be marked as an `export` in order to be used with an easing function. Without an easing function they work fine, any reference to an easing function within the function body ca... | 2018-12-31 15:44:54+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['runtime animation-js-easing (with hydration)', 'runtime animation-js-easing '] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 6 | 0 | 6 | false | false | ["src/compile/Component.ts->program->class_declaration:Component->method_definition:hoist_instance_declarations->method_definition:enter", "src/compile/nodes/Animation.ts->program->class_declaration:Animation->method_definition:constructor", "src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:... | |
sveltejs/svelte | 1,936 | sveltejs__svelte-1936 | ['1883'] | d6552025e458f236a700456f4ec08e1e724df9a2 | diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts
--- a/src/compile/render-dom/index.ts
+++ b/src/compile/render-dom/index.ts
@@ -257,6 +257,7 @@ export default function dom(
const filtered_props = component.props.filter(prop => {
if (component.hoistable_names.has(prop.name)) return fa... | diff --git a/test/runtime/samples/store-auto-subscribe-implicit/_config.js b/test/runtime/samples/store-auto-subscribe-implicit/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/store-auto-subscribe-implicit/_config.js
@@ -0,0 +1,28 @@
+import { writable } from '../../../../store.js';
+
+export d... | Using store autosubscription in template without instance script generates invalid code
```html
{$foo}
```
This generates code that attempts to declare `$foo` twice. If we want to allow this syntax, I would _think_ it should just have an implicit prop `foo`, and not `$foo`. In the compiler's current state, I don't... | _Maybe_ a single set `template_references` could continue to be sufficient for all of these different things - but it does seem better to split up its duties a bit.
- one set containing the actual instance/module data items that are being referred to. This includes stuff in the template (without `$`s) as well as sto... | 2018-12-31 15:53:18+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['runtime store-auto-subscribe-implicit ', 'runtime store-auto-subscribe-implicit (with hydration)', 'ssr store-auto-subscribe-implicit'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compile/render-ssr/index.ts->program->function_declaration:ssr", "src/compile/render-dom/index.ts->program->function_declaration:dom"] |
sveltejs/svelte | 1,942 | sveltejs__svelte-1942 | ['1938'] | 45d375e15d9841da27e033a26a36e431b389a66e | diff --git a/src/compile/nodes/EventHandler.ts b/src/compile/nodes/EventHandler.ts
--- a/src/compile/nodes/EventHandler.ts
+++ b/src/compile/nodes/EventHandler.ts
@@ -2,6 +2,7 @@ import Node from './shared/Node';
import Expression from './shared/Expression';
import Component from '../Component';
import deindent from... | diff --git a/test/runtime/samples/each-block-function/_config.js b/test/runtime/samples/each-block-function/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/each-block-function/_config.js
@@ -0,0 +1,15 @@
+export default {
+ html: `
+ <p>1, 2, 3</p>
+ <p>2, 4, 6</p>
+ <p>3, 6, 9</p>
+ `,
+
+ ... | scope issue in v3
pngwn says this might be a bug so I'm filing an issue here. Please close if that doesn't apply.
Using more than one each loop and referring to the other enumerator in a function returns a `func not defined` error. There is a repl example for that: https://v3.svelte.technology/repl?version=3.0.0-alp... | null | 2019-01-02 00:10:52+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['runtime each-block-function (with hydration)', 'runtime each-block-function '] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 17 | 1 | 18 | false | false | ["src/compile/render-dom/wrappers/shared/addActions.ts->program->function_declaration:addActions", "src/compile/render-dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:render", "src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_d... |
sveltejs/svelte | 1,961 | sveltejs__svelte-1961 | ['1957'] | dcad65b118d932a10081ab74b89adf472437b600 | diff --git a/src/compile/Component.ts b/src/compile/Component.ts
--- a/src/compile/Component.ts
+++ b/src/compile/Component.ts
@@ -170,6 +170,7 @@ export default class Component {
const props = [...this.template_references];
this.declarations.push(...props);
addToSet(this.writable_declarations, this.templat... | diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js
--- a/test/js/samples/deconflict-builtins/expected.js
+++ b/test/js/samples/deconflict-builtins/expected.js
@@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
-import { SvelteComponent as SvelteComponent_1, app... | Event handlers not deconflicted with other identifiers
```html
<button type='button' on:click={() => foo()}>Blah</button>
{click_handler}
```
| null | 2019-01-04 18:51:13+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['js select-dynamic-value', 'runtime event-handler-deconflicted (with hydration)', 'runtime event-handler-deconflicted ', 'js deconflict-builtins'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/Component.ts->program->class_declaration:Component->method_definition:constructor"] |
sveltejs/svelte | 1,962 | sveltejs__svelte-1962 | ['1960', '1960'] | dcad65b118d932a10081ab74b89adf472437b600 | diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts
--- a/src/parse/state/tag.ts
+++ b/src/parse/state/tag.ts
@@ -379,7 +379,7 @@ function readAttribute(parser: Parser, uniqueNames: Set<string>) {
parser.allowWhitespace();
const colon_index = name.indexOf(':');
- const type = colon_index !== 1 && get_dir... | diff --git a/test/runtime/samples/prop-not-action/Nested.html b/test/runtime/samples/prop-not-action/Nested.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/prop-not-action/Nested.html
@@ -0,0 +1 @@
+<h1>Hello {user.name}!</h1>
\ No newline at end of file
diff --git a/test/runtime/samples/prop-not-act... | Props starting with "use" are interpreted as action
When using a prop called user (`<Nested user={currentUser}/>`)
it throws `Actions can only be applied to DOM elements, not components`.
Props starting with "use" are interpreted as action
When using a prop called user (`<Nested user={currentUser}/>`)
it throws `Acti... | 2019-01-04 19:04:13+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['runtime prop-not-action ', 'ssr prop-not-action', 'runtime prop-not-action (with hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/parse/state/tag.ts->program->function_declaration:readAttribute"] | |
sveltejs/svelte | 1,964 | sveltejs__svelte-1964 | ['1963'] | dcad65b118d932a10081ab74b89adf472437b600 | diff --git a/src/compile/render-dom/wrappers/Window.ts b/src/compile/render-dom/wrappers/Window.ts
--- a/src/compile/render-dom/wrappers/Window.ts
+++ b/src/compile/render-dom/wrappers/Window.ts
@@ -114,7 +114,7 @@ export default class WindowWrapper extends Wrapper {
});
block.event_listeners.push(deindent`... | diff --git a/test/runtime/samples/window-binding-multiple-handlers/_config.js b/test/runtime/samples/window-binding-multiple-handlers/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/window-binding-multiple-handlers/_config.js
@@ -0,0 +1,3 @@
+export default {
+ html: '<button>Click</button>'
+}... | Malformed generated code with window bindings
https://v3.svelte.technology/repl?version=3.0.0-alpha16&gist=43969a7de7c0308e1a7c11cf6c1beff0
Uncomment the button to see the error.
At first glance, it would seem that at https://github.com/sveltejs/svelte/blob/dcad65b118d932a10081ab74b89adf472437b600/src/compile/ren... | null | 2019-01-05 01:36:22+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['runtime window-binding-multiple-handlers (with hydration)', 'runtime window-binding-multiple-handlers '] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 1 | 1 | 2 | false | false | ["src/compile/render-dom/wrappers/Window.ts->program->class_declaration:WindowWrapper->method_definition:render", "src/compile/render-dom/wrappers/Window.ts->program->class_declaration:WindowWrapper"] |
sveltejs/svelte | 1,965 | sveltejs__svelte-1965 | ['1948', '1948'] | c1ee21b022cf59d1682ecec0a11c9ad9e9a48d94 | diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts
--- a/src/parse/state/tag.ts
+++ b/src/parse/state/tag.ts
@@ -5,16 +5,20 @@ import { decodeCharacterReferences } from '../utils/html';
import isVoidElementName from '../../utils/isVoidElementName';
import { Parser } from '../index';
import { Node } from '.... | diff --git a/test/parser/samples/error-svelte-selfdestructive/error.json b/test/parser/samples/error-svelte-selfdestructive/error.json
new file mode 100644
--- /dev/null
+++ b/test/parser/samples/error-svelte-selfdestructive/error.json
@@ -0,0 +1,10 @@
+{
+ "code": "invalid-tag-name",
+ "message": "Valid <svelte:...> t... | svelte:component and svelte:self parsed too loosely
`<svelte:componentfoo` and `<svelte:selffoo` are both accepted and parsed as `<svelte:component foo` and `<svelte:self foo`, because of how they are parsed: `if (parser.eat(SELF))` and `if (parser.eat(COMPONENT))`. We should go up to the next whitespace, forward slash... | 2019-01-05 03:04:36+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['parse error-svelte-selfdestructive'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/parse/state/tag.ts->program->function_declaration:readTagName"] | |
sveltejs/svelte | 1,967 | sveltejs__svelte-1967 | ['1939'] | c1ee21b022cf59d1682ecec0a11c9ad9e9a48d94 | diff --git a/src/compile/render-dom/wrappers/AwaitBlock.ts b/src/compile/render-dom/wrappers/AwaitBlock.ts
--- a/src/compile/render-dom/wrappers/AwaitBlock.ts
+++ b/src/compile/render-dom/wrappers/AwaitBlock.ts
@@ -80,7 +80,7 @@ export default class AwaitBlockWrapper extends Wrapper {
status,
renderer,
b... | diff --git a/test/runtime/samples/await-containing-if/_config.js b/test/runtime/samples/await-containing-if/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/await-containing-if/_config.js
@@ -0,0 +1,35 @@
+let fulfil;
+
+let thePromise = new Promise(f => {
+ fulfil = f;
+});
+
+export default {
... | if inside an await block mounts to an undefined element
Happy new year! Here's another bug I've run into on the latest v3 alpha. I'm not sure whether this is also present in v2.x.
For the code below, the compiler generates code that doesn't mount the `if_block` properly when the condition changes. Here is a full exa... | null | 2019-01-05 03:58:35+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['runtime await-containing-if (with hydration)', 'runtime await-containing-if '] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/render-dom/wrappers/AwaitBlock.ts->program->class_declaration:AwaitBlockWrapper->method_definition:constructor"] |
sveltejs/svelte | 1,969 | sveltejs__svelte-1969 | ['1852'] | 2d3dbdd6a97d395408d0ae1eed3d4495bcc7d09e | diff --git a/src/compile/render-dom/wrappers/Element/Attribute.ts b/src/compile/render-dom/wrappers/Element/Attribute.ts
--- a/src/compile/render-dom/wrappers/Element/Attribute.ts
+++ b/src/compile/render-dom/wrappers/Element/Attribute.ts
@@ -187,7 +187,7 @@ export default class AttributeWrapper {
? `${element.v... | diff --git a/test/runtime/samples/attribute-unknown-without-value/_config.js b/test/runtime/samples/attribute-unknown-without-value/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/attribute-unknown-without-value/_config.js
@@ -0,0 +1,3 @@
+export default {
+ html: '<div potato=""></div>'
+};
\ ... | No attribute value rendered as "true"
I'd like to render an element attribute with an optional value. For example,
```html
<div no-value></div>
```
However, svelte is rendering this with the value of "true",
```html
<div no-value="true"></div>
```
If I add an empty string value, the rendering is as expected... | IIRC that behaviour is valid for XHTML. Maybe Svelte is doing something here …
Only with HTML5 it became valid for an attribute to not have a value. That is, it's mere presence implied the value of `true`. | 2019-01-05 17:26:12+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['runtime attribute-unknown-without-value (with hydration)', 'runtime attribute-unknown-without-value '] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compile/render-dom/wrappers/Element/Attribute.ts->program->class_declaration:AttributeWrapper->method_definition:stringify", "src/compile/render-dom/wrappers/Element/Attribute.ts->program->class_declaration:AttributeWrapper->method_definition:render"] |
sveltejs/svelte | 1,970 | sveltejs__svelte-1970 | ['1846'] | 88b6a26a355887d470a4fdaf5583218d62747899 | diff --git a/site/content/guide/06-special-components.md b/site/content/guide/06-special-components.md
--- a/site/content/guide/06-special-components.md
+++ b/site/content/guide/06-special-components.md
@@ -114,11 +114,9 @@ You can also bind to certain values — so far `innerWidth`, `outerWidth`, `inne
```
-### `<s... | diff --git a/test/parser/samples/error-svelte-selfdestructive/error.json b/test/parser/samples/error-svelte-selfdestructive/error.json
--- a/test/parser/samples/error-svelte-selfdestructive/error.json
+++ b/test/parser/samples/error-svelte-selfdestructive/error.json
@@ -1,10 +1,10 @@
{
"code": "invalid-tag-name",
- ... | document mouseenter/mouseleave not fired on Firefox
It seems that Firefox does not fire `mouseenter`/`mouseleave` events on the document, so the new `<svelte:document on:mouseenter/mouseleave>` does not work there. It looks like they are fired on `document.body`, and they are also fired there on Chrome.
I know the w... | I think we should create a svelte special component for each unique html tag and useful global object.
Let's see, we already have and in plans:
```html
<svelte:self>
<svelte:component/>
<svelte:window />
<svelte:document />
<svelte:head />
<svelte:meta />
```
We missed following possible components:
``... | 2019-01-05 19:16:18+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['parse error-svelte-selfdestructive', 'runtime document-event (with hydration)', 'runtime document-event ', 'ssr document-event'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 4 | 2 | 6 | false | false | ["src/compile/nodes/shared/mapChildren.ts->program->function_declaration:getConstructor", "src/compile/render-ssr/Renderer.ts->program->class_declaration:Renderer", "src/compile/nodes/shared/mapChildren.ts->program->function_declaration:mapChildren", "src/parse/state/tag.ts->program->function_declaration:readSequence",... |
sveltejs/svelte | 1,974 | sveltejs__svelte-1974 | ['1916'] | 88b6a26a355887d470a4fdaf5583218d62747899 | diff --git a/src/compile/render-dom/wrappers/Element/Binding.ts b/src/compile/render-dom/wrappers/Element/Binding.ts
--- a/src/compile/render-dom/wrappers/Element/Binding.ts
+++ b/src/compile/render-dom/wrappers/Element/Binding.ts
@@ -24,7 +24,8 @@ export default class BindingWrapper {
handler: {
usesContext: bool... | diff --git a/test/runtime/samples/binding-this-with-context/_config.js b/test/runtime/samples/binding-this-with-context/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/binding-this-with-context/_config.js
@@ -0,0 +1,59 @@
+export default {
+ html: `<div>foo</div><div>bar</div><div>baz</div>
+ <... | Array of refs are not working
Seems original RFC and #1877 propose that we gonna able to do this to collect multiple nodes as refs:
```html
{#each items as item, i}
<a bind:this={elems[i]}>{item}</a>
{/each}
<script>
let items = [...];
let elems = [];
</script>
```
But for now new REPL throws an error... | null | 2019-01-09 05:08:16+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['runtime class-shortcut ', 'runtime class-boolean (with hydration)', 'runtime binding-this-with-context ', 'runtime class-with-dynamic-attribute (with hydration)', 'runtime bindings-before-onmount ', 'runtime class-shortcut (with hydration)', 'runtime class-in-each ', 'runtime component (with hydration)', 'runtime bin... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 2 | 1 | 3 | false | false | ["src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:addBindings", "src/compile/render-dom/wrappers/Element/Binding.ts->program->class_declaration:BindingWrapper", "src/compile/render-dom/wrappers/Element/Binding.ts->program->function_declaration:getEventHandl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.